/* JOB Esquadrias — tema completo (CSS puro; não depende de classes Tailwind arbitrárias no JS) */
:root {
  --cpf-green: #3A6332;
  --cpf-green-dark: #2d4d28;
  --cpf-blue: #0000FF;
  --cpf-sidebar-bg: #252440;
  --cpf-navy: #163B4D;
  --cpf-navy-deep: #0B1F33;
  --cpf-gold: #D4A62A;
  --cpf-bg: #F5F7FA;
  --cpf-card: #FFFFFF;
  --cpf-text: #1B2430;
  --cpf-muted: #64748b;
  --cpf-border: rgba(22, 59, 77, 0.14);
  --color-primary: #3A6332;
}

body {
  background: var(--cpf-bg) !important;
  color: var(--cpf-text);
}

/* Importar CSV no celular — input sobre o botão (evita display:none) */
.cpf-page-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.cpf-page-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.cpf-csv-import-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 48px;
  padding: 0.75rem 1rem !important;
  border-radius: 0.75rem !important;
  border: 2px solid rgba(58, 99, 50, 0.28) !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(58, 99, 50, 0.12);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.cpf-csv-import-label {
  font-size: 0.8125rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.cpf-csv-import-btn svg,
.cpf-csv-import-btn .lucide {
  width: 1.25rem !important;
  height: 1.25rem !important;
  flex-shrink: 0;
}

.cpf-csv-import-btn:active:not(:has(input:disabled)) {
  transform: scale(0.98);
  background: rgba(58, 99, 50, 0.06) !important;
}

.cpf-file-input-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
  z-index: 2;
}

.cpf-file-input-overlay:disabled {
  cursor: not-allowed;
}

/* Ações do card de produto — sempre visíveis (PC e celular) */
.cpf-product-card-actions {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

.cpf-product-action-btn {
  min-height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cpf-product-action-btn--delete {
  border-color: rgba(244, 63, 94, 0.25);
}

@media (max-width: 767px) {
  .cpf-product-card-actions {
    gap: 0.375rem;
  }

  .cpf-product-action-btn {
    min-height: 36px;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.6875rem !important;
  }
}

@media (max-width: 767px) {
  .cpf-page-actions-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
  }

  .cpf-page-actions-bar > * {
    width: 100% !important;
    max-width: 100%;
    flex: none !important;
    min-height: 48px;
    justify-content: center;
    box-sizing: border-box;
  }

  .cpf-csv-import-btn {
    order: -1;
    min-height: 56px;
    padding: 1rem 1.25rem !important;
    border: 2px solid var(--cpf-green) !important;
    background: linear-gradient(180deg, #fff 0%, #f0f7ee 100%) !important;
    box-shadow: 0 4px 16px rgba(58, 99, 50, 0.2);
  }

  .cpf-csv-import-label {
    font-size: 1rem !important;
    letter-spacing: 0.04em;
  }

  .cpf-csv-import-btn svg,
  .cpf-csv-import-btn .lucide {
    width: 1.5rem !important;
    height: 1.5rem !important;
  }

  .cpf-page-actions-bar .btn-secondary,
  .cpf-page-actions-bar .btn-primary {
    min-height: 48px;
    padding-block: 0.75rem !important;
  }

  .cpf-page-actions-bar .text-xs {
    font-size: 0.8125rem !important;
  }
}

@media (min-width: 768px) {
  .cpf-page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cpf-page-actions-bar {
    width: auto;
    justify-content: flex-end;
    align-items: center;
  }

  .cpf-csv-import-btn {
    min-width: 11rem;
  }
}

.cpf-login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--cpf-bg) !important;
}

.cpf-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--cpf-card);
  border: 1px solid var(--cpf-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: 0 12px 40px rgba(22, 59, 77, 0.08);
}

.cpf-login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cpf-login-logo {
  display: block;
  height: 52px !important;
  width: auto !important;
  max-width: 96px !important;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.cpf-login-title {
  font-size: 1.45rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0;
}

.cpf-login-title-green { color: var(--cpf-green); }
.cpf-login-title-dark { color: var(--cpf-navy-deep); }

.cpf-login-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--cpf-muted);
}

.cpf-login-welcome {
  margin: 1.25rem 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cpf-navy-deep);
}

.cpf-login-sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--cpf-muted);
}

.cpf-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.cpf-field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}

.cpf-field-wrap {
  position: relative;
}

.cpf-field-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.cpf-field-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: var(--cpf-text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cpf-field-input.pl-10 { padding-left: 2.5rem; }
.cpf-field-input.pr-10 { padding-right: 2.5rem; }

.cpf-field-input:focus {
  border-color: var(--cpf-green);
  box-shadow: 0 0 0 3px rgba(58, 99, 50, 0.12);
}

.cpf-field-input::placeholder { color: #94a3b8; }

.cpf-pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 0.75rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
}

.cpf-pw-toggle:hover { color: var(--cpf-green); }

.cpf-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.cpf-login-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.cpf-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--cpf-green);
}

.cpf-login-forgot {
  border: none;
  background: none;
  color: var(--cpf-green);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
}

.cpf-login-forgot:hover { text-decoration: underline; }

.cpf-login-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.75rem;
  background: var(--cpf-green);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(58, 99, 50, 0.25);
  transition: background 0.15s, opacity 0.15s;
}

.cpf-login-submit:hover { background: var(--cpf-green-dark); }
.cpf-login-submit:disabled { opacity: 0.6; pointer-events: none; }

.cpf-login-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.cpf-login-footer p {
  margin: 0;
  font-size: 0.6875rem;
  color: #94a3b8;
}

.cpf-login-error { font-size: 0.75rem; font-weight: 600; color: #D9534F; margin: 0; }
.cpf-login-warn { font-size: 0.75rem; font-weight: 600; color: #b45309; margin: 0; line-height: 1.4; }

.cpf-spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--cpf-navy);
  border-top-color: transparent;
  border-radius: 50%;
  animation: cpf-spin 0.8s linear infinite;
}

@keyframes cpf-spin { to { transform: rotate(360deg); } }

/* ── App shell ── */
.cpf-app-shell {
  background: var(--cpf-bg) !important;
  border: 3px solid var(--cpf-blue);
  border-radius: 0;
}

.cpf-main-panel {
  background: var(--cpf-bg) !important;
  border-left: 2px solid rgba(0, 0, 255, 0.2);
}

.cpf-topbar {
  position: relative;
  z-index: 60;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 2px solid rgba(58, 99, 50, 0.22);
  box-shadow: 0 1px 3px rgba(22, 59, 77, 0.06);
}

@media (min-width: 640px) {
  .cpf-topbar { padding: 0 1.5rem; }
}

.cpf-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--cpf-green);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(58, 99, 50, 0.2);
  transition: background 0.15s;
}

.cpf-btn-primary:hover { background: var(--cpf-green-dark); }

/* ── Sidebar ── */
.cpf-sidebar {
  background: var(--cpf-sidebar-bg) !important;
  color: #fff;
  border-right: 1px solid rgba(212, 166, 42, 0.25);
}

.cpf-sidebar-brand {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cpf-sidebar-brand img {
  height: 2.75rem;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.cpf-sidebar-brand-title {
  font-weight: 900;
  font-size: 0.875rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin: 0;
}

.cpf-sidebar-brand-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0.125rem 0 0;
  letter-spacing: 0.04em;
}

.cpf-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: left;
}

.cpf-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.cpf-nav-btn--active {
  background: rgba(212, 166, 42, 0.18);
  border-color: rgba(212, 166, 42, 0.4);
  color: var(--cpf-gold);
  font-weight: 600;
}

.cpf-nav-icon { color: rgba(255, 255, 255, 0.7); }
.cpf-nav-icon--active { color: var(--cpf-gold); }

.cpf-sidebar-admin-label {
  padding: 1.5rem 0.75rem 0.5rem;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
}

.cpf-sidebar-user {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cpf-sidebar-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--cpf-green);
  border: 1px solid rgba(212, 166, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cpf-sidebar-avatar span {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

/* ── Sistema: cards, botões, links ── */
.cpf-app-shell .btn-primary {
  background: linear-gradient(135deg, var(--cpf-green) 0%, var(--cpf-green-dark) 100%) !important;
  box-shadow: 0 8px 20px rgba(58, 99, 50, 0.28) !important;
}

.cpf-app-shell .card-sleek {
  background: #fff !important;
  border: 1px solid rgba(58, 99, 50, 0.14) !important;
  border-top: 3px solid var(--cpf-green) !important;
  box-shadow: 0 4px 18px rgba(58, 99, 50, 0.08) !important;
}

.cpf-app-shell .card-sleek-dark {
  background: linear-gradient(135deg, var(--cpf-navy) 0%, var(--cpf-green) 100%) !important;
  border: 1px solid rgba(212, 166, 42, 0.35) !important;
}

.cpf-app-shell .brand-title { color: var(--cpf-green) !important; }
.cpf-app-shell .brand-accent { color: var(--cpf-blue) !important; }
.cpf-app-shell .form-label { color: var(--cpf-green) !important; }

.cpf-app-shell .text-blue-600,
.cpf-app-shell a.text-blue-600,
.cpf-app-shell .hover\:text-blue-600:hover {
  color: var(--cpf-green) !important;
}

.cpf-app-shell .bg-blue-600,
.cpf-app-shell .hover\:bg-blue-700:hover {
  background-color: var(--cpf-green) !important;
}

.cpf-app-shell .table-header-sleek th {
  background: rgba(58, 99, 50, 0.08) !important;
  color: var(--cpf-green) !important;
}

.cpf-app-shell .bg-slate-50,
.cpf-app-shell .bg-slate-50\/50,
.cpf-app-shell .bg-slate-50\/80 {
  background-color: #f4f8f5 !important;
}

.cpf-topbar h1 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cpf-navy-deep);
}

.cpf-topbar input[type="text"] {
  background: #eef4f0;
  border: 1px solid rgba(58, 99, 50, 0.15);
  border-radius: 0.5rem;
  color: var(--cpf-text);
}

.cpf-topbar input[type="text"]:focus {
  border-color: var(--cpf-green);
  box-shadow: 0 0 0 2px rgba(58, 99, 50, 0.15);
  outline: none;
}

.cpf-login-sub.text-center {
  text-align: center;
  padding-top: 0.25rem;
  font-size: 0.75rem;
}

.cpf-app-shell .text-slate-800 { color: var(--cpf-navy-deep) !important; }

/* Autocomplete de produtos (pedidos / orçamentos) */
.cpf-ac-wrap {
  position: relative;
  overflow: visible !important;
  z-index: 30;
}

.cpf-ac-wrap .absolute.z-30 {
  z-index: 50;
}

/* Modal — nome do usuário (Firebase Auth não tem campo nome) */
.cpf-name-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(11, 31, 51, 0.55);
}

.cpf-name-modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(11, 31, 51, 0.2);
  border: 1px solid var(--cpf-border);
}

.cpf-name-modal-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--cpf-navy-deep);
  margin-bottom: 0.5rem;
}

.cpf-name-modal-sub {
  font-size: 0.8125rem;
  color: var(--cpf-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.cpf-name-modal .cpf-field-input {
  width: 100%;
  text-transform: uppercase;
}

.cpf-name-modal .cpf-login-submit {
  margin-top: 0.75rem;
}



/* ── Orçamento: painel financeiro + observações (formulário) ── */
.cpf-quote-fin-grid { width: 100%; }
.cpf-quote-fin-grid > * { min-width: 0; }
.cpf-quote-obs-panel textarea.form-input { min-height: 120px; font-size: 0.875rem; line-height: 1.4; }
.cpf-quote-fin-panel { padding: 1rem 1.125rem !important; }
.cpf-quote-fin-panel .cpf-fin-label { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.cpf-quote-fin-panel .cpf-fin-input { min-height: 40px; font-size: 0.875rem !important; }
.cpf-quote-fin-panel .cpf-fin-row--subtotal { padding-bottom: 0.5rem; border-bottom: 1px solid rgba(148,163,184,.25); margin-bottom: 0.25rem; }
.cpf-btn-gerar-pedido { display: none !important; }
.cpf-quote-fin-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
}
@media (min-width: 1024px) {
  .cpf-quote-fin-grid { grid-template-columns: 1fr 1fr !important; gap: 2rem !important; }
}
.cpf-quote-obs-panel textarea.form-input {
  word-break: break-word;
  overflow-wrap: anywhere;
}
.cpf-btn-salvar-quote { display: none !important; }
.cpf-quote-detail-actions .btn-primary,
.cpf-quote-detail-actions .btn-secondary { min-height: 44px; }

@media (max-width: 767px) {
  .cpf-quote-fin-grid { gap: 1rem !important; }
  .cpf-quote-obs-panel, .cpf-quote-fin-panel { padding: 1rem !important; }
  .cpf-quote-fin-panel .cpf-fin-row { padding: 0.35rem 0; }
  .cpf-quote-fin-panel .cpf-fin-input { width: 100% !important; max-width: none !important; }
  .cpf-quote-detail-header { align-items: stretch !important; }
  .cpf-quote-detail-actions { width: 100%; }
  .cpf-quote-detail-actions .btn-primary, .cpf-quote-detail-actions .btn-secondary {
    flex: 1 1 calc(50% - 0.25rem); justify-content: center; min-height: 44px;
  }
}
@media (min-width: 768px) {
  .cpf-quote-fin-panel .cpf-fin-input { max-width: 7rem; }
}

/* Cabeçalho do orçamento — leitura na tela (celular / detalhes) */
@media screen {
  .print-document-root .cpf-print-header > .flex {
    align-items: flex-start;
    gap: 8px;
  }

  .print-document-root .cpf-print-brand img {
    height: 52px !important;
    width: auto !important;
  }

  .print-document-root .cpf-print-brand-name {
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    max-width: 9rem;
  }

  .print-document-root .print-store-contact {
    font-size: 9px !important;
    line-height: 1.35 !important;
    letter-spacing: 0.06em !important;
  }

  .print-document-root .cpf-print-doc-label {
    font-size: 9px !important;
    letter-spacing: 0.12em !important;
  }

  .print-document-root .cpf-print-doc-number {
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
  }
}

@media screen and (max-width: 767px) {
  .print-document-root .cpf-print-header > .flex {
    flex-wrap: wrap;
  }

  .print-document-root .cpf-print-brand {
    flex: 0 1 auto;
    max-width: 48%;
  }

  .print-document-root .cpf-print-doc-title {
    flex: 1 1 auto;
    min-width: 42%;
    text-align: right !important;
  }

  .print-document-root .cpf-print-contact {
    flex: 1 1 100% !important;
    order: 3;
    margin-top: 6px;
    padding-top: 6px !important;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    text-align: center !important;
  }

  .print-document-root .print-store-contact {
    font-size: clamp(8px, 2.5vw, 10px) !important;
  }

  .print-document-root .cpf-print-doc-number {
    font-size: clamp(0.95rem, 4.5vw, 1.15rem) !important;
  }
}

@media print {
  .print-document-root .cpf-print-brand img {
    height: 56px !important;
  }

  .print-document-root .cpf-print-brand-name {
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .print-document-root .print-store-contact {
    font-size: 9px !important;
  }

  .print-document-root .cpf-print-doc-number {
    font-size: 14px !important;
  }
}

/* Cabeçalho de impressão — logo + nome da empresa */
.print-document-root .cpf-print-header {
  border-top: 3px solid var(--cpf-green, #3A6332);
  border-radius: 8px 8px 0 0;
  padding-top: 4px;
}

.print-document-root .cpf-print-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.print-document-root .cpf-print-brand-name {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f172a;
  line-height: 1.15;
  white-space: nowrap;
}

/* Alerta de pedidos em produção */
.cpf-prod-alert-inner {
  border: 1px solid rgba(247, 25, 30, 0.35);
  background: linear-gradient(90deg, #fff5f5 0%, #fffbeb 100%);
  border-left: 4px solid #F7191E;
  border-radius: 10px;
  padding: 10px 14px;
}

.cpf-prod-alert-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #991b1b;
  margin: 0 0 4px;
}

.cpf-prod-alert-text {
  font-size: 13px;
  font-weight: 600;
  color: #7f1d1d;
  margin: 0;
}

/* Asterisco de campo obrigatório — vermelho (label verde não herda) */
.cpf-app-shell .form-label .cpf-req-ast,
.cpf-app-shell .form-label .text-rose-500 {
  color: #ef4444 !important;
  font-weight: 800;
}

.cpf-app-shell .form-label .cpf-label-optional {
  color: #64748b !important;
  font-weight: 500;
  font-size: 0.72em;
  text-transform: none;
  letter-spacing: normal;
}

/* Texto menor nos inputs — nomes longos de produto */
.cpf-app-shell .form-input.cpf-input-compact,
.cpf-app-shell .cpf-ac-wrap .form-input {
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
}

.cpf-app-shell .cpf-ac-wrap .absolute button,
.cpf-app-shell .cpf-ac-wrap .absolute .px-3 {
  font-size: 0.7rem !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: break-word !important;
  text-align: left !important;
}

/* Grade de itens (pedido/orçamento) — inputs menores */
.cpf-app-shell .grid .form-input.py-1,
.cpf-app-shell .grid .form-input.text-xs {
  font-size: 0.6875rem !important;
  line-height: 1.2 !important;
}

/* ── Impressão: uma página só quando couber; sem 2ª página em branco ── */
@media print {
  html,
  body,
  #root,
  .cpf-app-shell,
  .cpf-main-panel,
  .cpf-main-panel > main,
  .cpf-main-panel > main > div {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  /* Barra lateral, topo e botões não entram na impressão */
  aside,
  .cpf-topbar,
  .cpf-page-header,
  .brand-header-panel,
  .print\:hidden {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  .print-document-root {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 6px !important;
    box-shadow: none !important;
    border: none !important;
    background: #fff !important;
    page-break-after: avoid !important;
    break-after: avoid-page !important;
  }

  .print-document-root.card-sleek {
    box-shadow: none !important;
    border: none !important;
  }

  .order-print-items {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .order-print-items thead {
    display: table-header-group !important;
  }

  .order-print-items tbody tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .order-print-items tbody tr:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }
}


/* Botão principal: enviar orçamento */
.cpf-btn-enviar-cliente {
  min-height: 48px !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}
@media (max-width: 767px) {
  .cpf-quote-detail-actions { gap: 0.5rem !important; }
  .cpf-btn-enviar-cliente {
    flex: 1 1 100% !important;
    order: -1;
    width: 100%;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
  .cpf-quote-detail-actions .btn-secondary { flex: 1 1 calc(50% - 0.25rem); justify-content: center; }
}

/* Modal / banner de compartilhamento */
.cpf-share-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483644; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px; background: #163B4D; color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.28); font: 600 14px system-ui, sans-serif;
}
.cpf-share-banner span { flex: 1; line-height: 1.3; }
.cpf-share-banner button {
  flex-shrink: 0; border: 0; border-radius: 10px; padding: 10px 14px;
  background: #059669; color: #fff; font: 700 12px system-ui, sans-serif; cursor: pointer;
}
.cpf-share-modal-backdrop {
  position: fixed; inset: 0; z-index: 2147483646; background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.cpf-share-modal {
  background: #fff; border-radius: 16px; padding: 20px; max-width: 360px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,.25); text-align: center;
}
.cpf-share-modal-title { margin: 0 0 8px; font: 800 16px system-ui, sans-serif; color: #163B4D; }
.cpf-share-modal-desc { margin: 0 0 14px; font: 500 13px/1.4 system-ui, sans-serif; color: #64748b; }
.cpf-share-modal-preview {
  width: 100%; max-height: 180px; object-fit: contain; border: 1px solid #e2e8f0;
  border-radius: 8px; margin-bottom: 14px; background: #f8fafc;
}
.cpf-share-modal-primary {
  display: block; width: 100%; margin-bottom: 8px; padding: 14px; border: 0; border-radius: 12px;
  background: #059669; color: #fff; font: 700 14px system-ui, sans-serif; cursor: pointer;
}
.cpf-share-modal-secondary {
  display: block; width: 100%; margin-bottom: 8px; padding: 12px; border: 1px solid #cbd5e1;
  border-radius: 12px; background: #fff; color: #334155; font: 600 13px system-ui, sans-serif; cursor: pointer;
}
.cpf-share-modal-close {
  display: block; width: 100%; padding: 10px; border: 0; background: transparent;
  color: #64748b; font: 600 13px system-ui, sans-serif; cursor: pointer;
}

.cpf-btn-enviar-wa { min-height: 48px !important; font-weight: 800 !important; }
@media (max-width: 767px) {
  .cpf-btn-enviar-wa { flex: 1 1 100% !important; order: -1; width: 100%; }
}
.cpf-share-banner, .cpf-share-modal-backdrop { display: none !important; }

/* === JOB Esquadrias — login original (escuro) === */
body:has(.job-login-screen) {
  background: #081410 !important;
}

.job-login-screen {
  background: #081410 !important;
}

.job-login-card {
  background: #0d1b16 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.job-login-screen .form-label {
  color: #94a3b8 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.job-login-screen .form-input {
  background: #e8f0fe !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.75rem !important;
  color: #0f172a !important;
}

.job-login-screen .form-input:focus {
  border-color: #27ae60 !important;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2) !important;
}

.job-login-submit {
  background: #0c5a44 !important;
  box-shadow: 0 8px 24px rgba(12, 90, 68, 0.35) !important;
}

.job-login-submit:hover:not(:disabled) {
  background: #0a4a38 !important;
}

/* === JOB Esquadrias — marca no menu lateral === */
.cpf-sidebar-brand {
  padding: 1.25rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.cpf-sidebar-brand-inner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.cpf-sidebar-brand-icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.cpf-sidebar-brand-icon-img {
  display: block;
  height: 2.5rem;
  width: auto;
  max-width: none;
  object-fit: cover;
  object-position: left center;
}

.cpf-sidebar-brand-text {
  min-width: 0;
  flex: 1;
}

.cpf-sidebar-brand-title {
  margin: 0 !important;
  font-size: 0.8125rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  white-space: normal !important;
}

.cpf-sidebar-brand-accent {
  color: #4ade80 !important;
}

.cpf-sidebar-brand-sub {
  margin: 0.2rem 0 0 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  color: rgba(255, 255, 255, 0.55) !important;
  letter-spacing: 0.04em !important;
}
