/* ==============================================================================
   AC MOTORES ELÉTRICOS & FERRAMENTAS - SISTEMA DE GESTÃO E OPERAÇÃO
   Design Industrial Moderno, Responsivo, Otimizado para Balcão, Bancada e Mobile
   ============================================================================== */

:root {
  --primary: #0284c7;         /* Azul Elétrico */
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #0f172a;       /* Grafite / Navy Profundo */
  --accent: #f97316;          /* Laranja Solda / Alta Visibilidade */
  --accent-hover: #ea580c;
  --success: #10b981;         /* Verde Concluído / Aprovado */
  --success-light: #d1fae5;
  --warning: #f59e0b;         /* Âmbar Atenção */
  --warning-light: #fef3c7;
  --danger: #ef4444;          /* Vermelho Alerta / Queimado */
  --danger-light: #fee2e2;
  --info: #6366f1;            /* Índigo / Testes */
  
  --bg-main: #f1f5f9;         /* Fundo da aplicação */
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --border: #e2e8f0;
  --border-focus: #38bdf8;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ==============================================================================
   LAYOUT & SIDEBAR
   ============================================================================== */
.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.sidebar-header {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-img {
  width: 100%;
  max-width: 210px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  object-fit: contain;
  background-color: #fff;
  padding: 4px;
}

.logo-text h1 {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
  margin: 0;
}

.sidebar-nav {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background-color: rgba(2, 132, 199, 0.18);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
  font-weight: 600;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.nav-badge.alert {
  background-color: var(--danger);
  color: #fff;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: rgba(0, 0, 0, 0.2);
}

.server-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.offline {
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

/* ==============================================================================
   MAIN CONTENT AREA
   ============================================================================== */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  background-color: var(--bg-main);
}

.top-bar {
  background-color: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: var(--shadow-sm);
}

.top-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.page-title-box h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
}

.page-title-box p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--primary-light);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-hover);
  cursor: pointer;
  transition: var(--transition);
}

.network-badge:hover {
  background-color: #bae6fd;
}

.content-body {
  padding: 24px;
  flex-grow: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   BUTTONS & CONTROLS
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-accent {
  background-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(249, 115, 22, 0.25);
}
.btn-accent:hover {
  background-color: var(--accent-hover);
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  background-color: #059669;
}

.btn-outline {
  background-color: #fff;
  color: var(--text-main);
  border-color: var(--border);
}
.btn-outline:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.btn-danger-outline {
  background-color: #fff;
  color: var(--danger);
  border-color: #fca5a5;
}
.btn-danger-outline:hover {
  background-color: var(--danger-light);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 0.95rem;
  border-radius: var(--radius);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ==============================================================================
   DASHBOARD STATS CARDS
   ============================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: #fff;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.stat-content h3 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-content .stat-number {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--secondary);
}

.stat-content .stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.blue { background-color: var(--primary-light); color: var(--primary); }
.stat-icon.orange { background-color: #ffedd5; color: var(--accent); }
.stat-icon.green { background-color: var(--success-light); color: var(--success); }
.stat-icon.amber { background-color: var(--warning-light); color: var(--warning); }
.stat-icon.indigo { background-color: #e0e7ff; color: var(--info); }

/* ==============================================================================
   CARD CONTAINERS & DATA TABLES
   ============================================================================== */
.card {
  background-color: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafafa;
}

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  padding: 12px 16px;
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

/* ==============================================================================
   BADGES & TAGS
   ============================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-motor {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-solda {
  background-color: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.badge-ferramenta {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Status de OS */
.status-orcamento { background-color: #fef3c7; color: #b45309; }
.status-aguardando { background-color: #f3e8ff; color: #7e22ce; }
.status-aprovado { background-color: #e0f2fe; color: #0284c7; }
.status-bancada { background-color: #dbeafe; color: #1d4ed8; font-weight: 700; }
.status-testes { background-color: #e0e7ff; color: #4338ca; }
.status-concluido { background-color: #d1fae5; color: #065f46; font-weight: 700; }
.status-entregue { background-color: #e2e8f0; color: #334155; }

/* ==============================================================================
   PONTO DE VENDA (PDV) - BALCÃO DE PEÇAS
   ============================================================================== */
.pdv-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 20px;
  min-height: 600px;
}

.pdv-catalog {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input-wrapper input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  background-color: #fff;
  transition: var(--transition);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.category-filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  padding: 5px 12px;
  border-radius: 9999px;
  background-color: #fff;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.chip:hover, .chip.active {
  background-color: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  max-height: 580px;
  overflow-y: auto;
  padding-right: 4px;
}

.part-card {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.part-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.part-card-code {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.part-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary);
  margin: 4px 0 8px 0;
  line-height: 1.25;
}

.part-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.part-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--success);
}

.part-stock {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.pdv-cart {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 650px;
}

.cart-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
}

.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
}

.cart-item-unit-price {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background-color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-qty-input {
  width: 44px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
}

.cart-item-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary);
  min-width: 60px;
  text-align: right;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  background-color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cart-summary-line.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.payment-method-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pay-btn {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.pay-btn.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==============================================================================
   FORMS & INPUTS
   ============================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group.col-span-2 {
  grid-column: span 2;
}

.form-group.col-span-full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-main);
  background-color: #fff;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 70px;
}

.form-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
  padding-bottom: 6px;
  margin: 16px 0 10px 0;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==============================================================================
   MODAIS
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.modal-box {
  background-color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-box.modal-lg {
  max-width: 950px;
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafafa;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  color: var(--danger);
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background-color: #f8fafc;
}

/* ==============================================================================
   CALCULADORA DE BOBINAGEM & ELETRICA
   ============================================================================== */
.calc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.calc-result-box {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 14px;
}

.calc-result-box h4 {
  font-size: 0.75rem;
  color: #166534;
  text-transform: uppercase;
}

.calc-result-box .result-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #15803d;
}

/* ==============================================================================
   TOAST NOTIFICATIONS
   ============================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background-color: var(--secondary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.2s ease-out;
}

.toast.success { background-color: #065f46; }
.toast.error { background-color: #991b1b; }
.toast.warning { background-color: #92400e; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==============================================================================
   IMPRESSÃO: ORDENS DE SERVIÇO, RECIBOS E CUPOM TÉRMICO
   ============================================================================== */
#print-area {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  #print-area, #print-area * {
    visibility: visible;
  }
  #print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 10mm;
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .no-print {
    display: none !important;
  }
}

/* Layout específico para Cupom Térmico (80mm) */
.cupom-termico {
  width: 76mm;
  font-family: "Courier New", Courier, monospace;
  font-size: 9pt;
  line-height: 1.25;
}

.cupom-termico .cabecalho {
  text-align: center;
  border-bottom: 1px dashed #000;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.cupom-termico .linha-pontilhada {
  border-bottom: 1px dashed #000;
  margin: 6px 0;
}

/* Folha A4 de Ordem de Serviço */
.print-os-a4 {
  border: 1px solid #000;
  padding: 14px;
  margin-bottom: 14px;
}

.print-os-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.print-table th, .print-table td {
  border: 1px solid #333;
  padding: 5px 8px;
  font-size: 9.5pt;
}

.print-canhoto {
  margin-top: 25px;
  border-top: 1px dashed #000;
  padding-top: 15px;
}

/* ==============================================================================
   RESPONSIVIDADE (TABLETS E SMARTPHONES)
   ============================================================================== */
@media (max-width: 900px) {
  .pdv-layout {
    grid-template-columns: 1fr;
  }
  .pdv-cart {
    height: auto;
    min-height: 450px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100vh;
  }
  .sidebar.mobile-open {
    left: 0;
  }
  .mobile-menu-btn {
    display: block;
  }
  .content-body {
    padding: 14px;
  }
  .top-bar {
    padding: 10px 14px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-group.col-span-2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================================
   ESTILOS ESPECÍFICOS: PROPOSTA TÉCNICA (PERITAGEM) & COMERCIAL
   ============================================================================== */
.pt-modal-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.pt-modal-nav .chip {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.fotos-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
  min-height: 80px;
  padding: 8px;
  background-color: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.upload-foto-box {
  border: 2px dashed #93c5fd;
  background-color: #eff6ff;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-foto-box:hover {
  background-color: #dbeafe;
  border-color: var(--primary);
}
