/* Soul Pet's - Tema branco e vermelho melhorado */
:root {
  --primary: #c1121f; /* vermelho */
  --primary-dark: #8f0d17;
  --primary-light: #fee2e2;
  --bg: #f8fafc; /* fundo suave */
  --bg-white: #ffffff;
  --text: #1f2937;
  --text-light: #4b5563;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --success: #10b981;
  --success-bg: #d1fae5;
  --error: #ef4444;
  --error-bg: #fee2e2;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* { 
  box-sizing: border-box; 
}

html, body { 
  margin: 0; 
  padding: 0; 
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  background-attachment: fixed;
  color: var(--text); 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { 
  max-width: 1400px; 
  margin: 0 auto; 
  padding: 32px 24px;
}

/* Header melhorado */
.header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 24px; 
  padding: 24px 32px; 
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-light);
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.header .brand { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  text-decoration: none; 
  color: var(--text);
  transition: transform 0.2s;
}

.header .brand:hover {
  transform: translateX(-2px);
}

.header img.logo { 
  height: 50px; 
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(193, 18, 31, 0.2));
}

.header h1 { 
  font-size: 24px; 
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

/* Botões melhorados */
.btn { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; 
  padding: 12px 20px; 
  border-radius: 10px; 
  text-decoration: none; 
  border: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover { 
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary { 
  background: var(--bg-white); 
  color: var(--primary); 
  border: 2px solid var(--primary);
  box-shadow: none;
}

.btn.secondary:hover { 
  background: var(--primary-light);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Cards melhorados */
.card { 
  background: var(--bg-white); 
  border: 1px solid var(--border-light); 
  border-radius: 16px; 
  padding: 32px; 
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.form-card {
  padding: 32px;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 28px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 16px;
  border-bottom: 3px solid var(--primary-light);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 24px; 
}

/* Layout melhorado para páginas com formulário e lista */
.page-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}

.form-card {
  position: sticky;
  top: 24px;
}

.list-card {
  min-width: 0; /* Permite que a tabela faça scroll */
}

/* Formulários melhorados */
form .field { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
  margin-bottom: 24px; 
}

label { 
  font-weight: 600; 
  color: var(--text);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"], 
input[type="number"], 
input[type="email"], 
select, 
textarea, 
input[type="file"] { 
  padding: 14px 18px; 
  border: 2px solid var(--border); 
  border-radius: 12px; 
  font-size: 16px;
  transition: all 0.3s;
  background: var(--bg-white);
  color: var(--text);
  width: 100%;
}

input[type="text"]:focus, 
input[type="number"]:focus, 
input[type="email"]:focus, 
select:focus, 
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* Tabelas melhoradas */
table { 
  width: 100%; 
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-top: 20px;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

th, td { 
  padding: 18px 20px; 
  text-align: left; 
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
}

th { 
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.8px;
  border-bottom: 3px solid var(--primary);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

tbody tr {
  transition: all 0.2s;
  background: var(--bg-white);
}

tbody tr:hover {
  background: var(--primary-light);
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(193, 18, 31, 0.1);
}

tbody tr:last-child td {
  border-bottom: none;
}

td {
  color: var(--text);
  vertical-align: middle;
}

td strong {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

/* Tabela de clientes específica */
.clients-table {
  min-width: 900px;
}

.clients-table th:nth-child(1) { width: 80px; }
.clients-table th:nth-child(2) { min-width: 250px; }
.clients-table th:nth-child(3) { min-width: 200px; }
.clients-table th:nth-child(4) { min-width: 150px; }
.clients-table th:nth-child(5) { min-width: 200px; }
.clients-table th:nth-child(6) { width: 180px; }

.products-table {
  min-width: 800px;
}

.orders-table {
  min-width: 900px;
}

/* Informações compactas do cliente no orçamento */
.order-info-compact {
  margin-bottom: 32px;
}

.section-title-compact {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  position: relative;
}

.section-title-compact::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary);
}

.client-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.info-card-compact {
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.2s;
}

.info-card-compact:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.info-card-compact.highlight {
  background: linear-gradient(135deg, var(--primary-light) 0%, #fef2f2 100%);
  border-color: var(--primary);
  border-width: 2px;
}

.info-label-compact {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.info-value-compact {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.total-value-compact {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.order-notes-compact {
  background: linear-gradient(135deg, var(--primary-light) 0%, #fef2f2 100%);
  border: 1px solid var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 12px;
}

.order-notes-compact .info-label-compact {
  margin-bottom: 8px;
}

.order-notes-compact .info-value-compact {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-light);
}

/* Status melhorado */
.status { 
  padding: 18px 24px; 
  border-radius: 12px; 
  margin-bottom: 28px;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.status.success { 
  background: var(--success-bg); 
  color: #065f46; 
  border: 2px solid var(--success);
}

.status.error { 
  background: var(--error-bg); 
  color: #991b1b; 
  border: 2px solid var(--error);
}

.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Fotos melhoradas */
.photo { 
  width: 100%; 
  height: 200px; 
  object-fit: cover; 
  border-radius: 12px; 
  border: 2px solid var(--border-light); 
  background: var(--border-light);
  transition: transform 0.3s, box-shadow 0.3s;
}

.photo:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.footer { 
  color: var(--muted); 
  padding: 40px 0; 
  text-align: center; 
  border-top: 2px solid var(--border-light); 
  margin-top: 64px;
  font-size: 15px;
}

/* Modal melhorado */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  cursor: pointer;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.photo-clickable {
  cursor: pointer;
  transition: all 0.3s;
}

.photo-clickable:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* ===== NOVAS FUNCIONALIDADES MELHORADAS ===== */

/* Busca avançada */
.search-form {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
}

.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s;
  background: var(--bg-white);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.search-filter {
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-white);
  min-width: 150px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.search-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* Container de busca com resultados */
.search-container {
  position: relative;
}

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 350px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 8px;
  animation: slideDown 0.3s;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  padding: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--primary-light);
  padding-left: 20px;
}

.search-result-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* Item selecionado */
.selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #fef2f2 100%);
  border: 2px solid var(--primary);
  border-radius: 12px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.selected-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.muted-text {
  color: var(--muted);
  font-size: 14px;
}

/* Botão de remover */
.btn-remove {
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.btn-remove:hover {
  background: #dc2626;
  transform: rotate(90deg) scale(1.1);
  box-shadow: var(--shadow);
}

/* Resultados de produtos na busca */
.product-results {
  max-height: 450px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.product-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.product-info {
  flex: 1;
}

.product-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
  margin-top: 6px;
}

.small {
  font-size: 13px;
}

/* Lista de itens do orçamento */
.items-list {
  min-height: 120px;
  max-height: 450px;
  overflow-y: auto;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #fafafa 0%, #f8fafc 100%);
}

.items-list::-webkit-scrollbar {
  width: 8px;
}

.items-list::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 4px;
}

.items-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.items-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-style: italic;
  font-size: 16px;
}

.order-item-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 12px;
  align-items: flex-start;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.order-item-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.order-item-card:last-child {
  margin-bottom: 0;
}

.item-photo {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border-light);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s;
}

.item-photo:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.item-photo-placeholder {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  border: 2px solid var(--border-light);
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.item-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.item-controls select,
.item-controls input[type="number"] {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
}

.item-controls select:focus,
.item-controls input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.item-subtotal {
  font-weight: 700;
  color: var(--primary);
  font-size: 18px;
  margin-left: auto;
}

/* Seção de total */
.total-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 3px solid var(--primary);
  background: linear-gradient(135deg, var(--primary-light) 0%, #fef2f2 100%);
  padding: 24px;
  border-radius: 12px;
}

.total-display {
  text-align: right;
  font-size: 28px;
  color: var(--primary);
}

.total-display strong {
  font-size: 36px;
  font-weight: 800;
}

/* Ações do formulário */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border-light);
  flex-wrap: wrap;
}

/* Cards de produtos na busca */
.product-card {
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.photo-placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 12px;
  color: var(--muted);
  border: 2px solid var(--border-light);
  font-size: 14px;
}

/* Estatísticas */
.clients-stats {
  margin: 24px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #fef2f2 100%);
  border-radius: 12px;
  border-left: 5px solid var(--primary);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.clients-stats strong {
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 600;
}

.clients-stats .stats-number {
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
  margin-left: 8px;
}

/* Responsividade para mobile */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .form-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .container { 
    padding: 20px 16px; 
  }
  
  .header { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 16px; 
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .header .brand { 
    gap: 12px; 
  }
  
  .header img.logo { 
    height: 40px; 
  }
  
  .header h1 { 
    font-size: 20px; 
  }
  
  .nav { 
    gap: 8px; 
    width: 100%;
  }
  
  .nav .btn {
    flex: 1;
    min-width: 0;
  }
  
  .btn { 
    padding: 12px 16px; 
    font-size: 14px; 
  }
  
  .card { 
    padding: 24px 20px; 
  }
  
  .form-card {
    padding: 24px 20px;
  }
  
  .grid { 
    grid-template-columns: 1fr; 
    gap: 20px; 
  }
  
  .page-layout {
    gap: 20px;
  }
  
  .client-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .info-card-compact {
    padding: 10px 12px;
  }
  
  .info-label-compact {
    font-size: 10px;
  }
  
  .info-value-compact {
    font-size: 13px;
  }
  
  .total-value-compact {
    font-size: 16px;
  }
  
  /* Tabelas responsivas */
  .table-wrapper {
    margin: 16px -20px;
    border-radius: 0;
  }
  
  table { 
    font-size: 14px; 
    min-width: 100%;
  }
  
  th, td { 
    padding: 14px 12px; 
    font-size: 14px;
  }
  
  .clients-table {
    min-width: 800px;
  }
  
  /* Formulários */
  input[type="text"], 
  input[type="number"], 
  input[type="email"], 
  select, 
  textarea, 
  input[type="file"] { 
    padding: 14px; 
    font-size: 16px; /* Evita zoom no iOS */
  }
  
  /* Modal mobile */
  .modal-close { 
    top: 15px; 
    right: 20px; 
    font-size: 32px; 
    width: 40px;
    height: 40px;
  }
  
  .modal-content { 
    max-width: 95%; 
    max-height: 95%; 
  }
  
  /* Botões de ação em tabelas */
  .table-actions { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    min-width: 140px;
  }
  
  .table-actions .btn { 
    padding: 10px 12px; 
    font-size: 13px; 
    text-align: center;
    width: 100%;
    white-space: nowrap;
  }
  
  .table-actions form {
    width: 100%;
  }
  
  .table-actions form button {
    width: 100%;
  }
  
  .search-row {
    flex-direction: column;
  }
  
  .search-input,
  .search-filter {
    width: 100%;
  }
  
  .search-results {
    max-height: 300px;
  }
  
  .order-item-card {
    flex-direction: column;
  }
  
  .item-photo,
  .item-photo-placeholder {
    width: 100%;
    height: 150px;
  }
  
  .item-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .item-subtotal {
    margin-left: 0;
    text-align: right;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
  
  .total-display {
    text-align: center;
    font-size: 24px;
  }
  
  .total-display strong {
    font-size: 32px;
  }
}

/* iPhone específico */
@media (max-width: 428px) {
  .container { 
    padding: 12px 8px; 
  }
  
  .header img.logo { 
    height: 36px; 
  }
  
  .header h1 { 
    font-size: 18px; 
  }
  
  .btn { 
    padding: 14px 16px; 
    font-size: 15px; 
  }
  
  .card { 
    padding: 16px; 
  }
  
  table { 
    font-size: 13px; 
  }
  
  th, td { 
    padding: 10px 6px; 
  }
}

/* Melhorias para touch */
@media (hover: none) and (pointer: coarse) {
  .btn { 
    min-height: 48px;
  }
  
  .photo-clickable:hover { 
    opacity: 1;
    transform: none;
  }
  
  .modal-close:hover { 
    color: #fff;
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  .order-item-card:hover {
    transform: none;
  }
}
