/* SINTERA · identidade visual v0.3 — APENAS APRESENTAÇÃO.
 * Origem: Guia_de_Versoes.pdf (marca Sintera) e layout aprovado.
 * app.css original permanece íntegro para facilitar revisão e reversão.
 * Não contém lógica financeira ou fiscal. */
:root {
  --ink: #2B2F33;
  --muted: #677982;
  --bg: #F7F6F3;
  --line: #E0E4E6;
  --green: #1F4E5F;
  --green2: #153D4A;
  --dark: #153C48;
  --gold: #D9DEE2;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 7px 22px rgba(30, 55, 66, .055);
  font-family: 'Saira', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
}
body { background: var(--bg); font-size: 13px; }
h1,h2,h3,.metric-value,.company-title,.account-code { font-family:'Saira','Segoe UI',Arial,sans-serif; }
h1 { font-weight: 700; letter-spacing: -.9px; font-size:clamp(26px,3vw,34px); }
h2 { font-weight: 700; letter-spacing: -.35px; }
.sidebar {
  width: 272px;
  background: linear-gradient(165deg,#164654 0%,#123D4A 58%,#0F3340 100%);
  color: #F3F7F8;
  padding: 24px 14px 18px;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
}
.sidebar::before {
  content:'';
  position:absolute;
  inset:auto -105px -115px 15px;
  height:320px;
  opacity:.08;
  background:url("../brand/sintera-simbolo-reversa.18ebb3d51b6e.svg") center/contain no-repeat;
  pointer-events:none;
  z-index:-1;
}
.brand { display:block; margin:2px 8px 32px; padding:3px 2px; }
.brand-logo { display:block; width:100%; max-width:210px; height:auto; }
.sidebar-label { color:#A9C8D1; letter-spacing:1.45px; font-size:10px; padding-left:15px; margin-bottom:12px; }
.company-switch {
  border:1px solid rgba(217,222,226,.22);
  background:rgba(255,255,255,.055);
  border-radius:11px;
  padding:11px 10px;
  margin:0 3px 20px;
}
.company-switch:hover { background:rgba(255,255,255,.105); }
.company-avatar { background:rgba(217,222,226,.17); color:#FFFFFF; font-size:17px; font-family:'Saira', sans-serif; }
.company-switch-copy strong { color:#FFFFFF; font-size:11px; }
.company-switch-copy small { color:#C9D9DF; }
.switch-arrow { width:14px; height:14px; margin-left:auto; flex:none; color:#E3EAED; }
.side-nav { gap:5px; }
.nav-link { color:#D8E6EA; padding:12px 13px; font-size:12px; font-weight:600; line-height:1.3; border-radius:9px; min-height:44px; }
.nav-link:hover,.nav-link.active { color:#fff; background:rgba(74,143,165,.42); }
.nav-link.active { box-shadow:inset 3px 0 0 #C7DEE4; }
.nav-icon { width:20px; height:20px; flex:none; color:#D6E8EB; stroke:currentColor; }
.nav-link.active .nav-icon { color:#fff; }
.sidebar-help { border-color:rgba(217,222,226,.24); background:rgba(255,255,255,.035); color:#DFEDF0; }
.sidebar-help small { color:#B2CFD6; }
.status-dot { background:#89C7C8; box-shadow:0 0 0 3px rgba(137,199,200,.13); }
.sidebar-user { border-color:rgba(217,222,226,.20); }
.user-avatar,.topbar-avatar { background:#D9DEE2; color:#1F4E5F; font-weight:800; }
.sidebar-user-info small { color:#BBCFD5; }
.logout-button { color:#DAE8EC; display:inline-flex; align-items:center; gap:7px; }
.logout-button:hover { color:#FFF; }
.logout-icon { width:17px; height:17px; }
.app-main { background:var(--bg); }
.topbar { min-height:86px; height:auto; padding:16px clamp(22px,3.2vw,50px); background:#FFFFFF; border-bottom:1px solid var(--line); box-shadow:0 2px 12px rgba(31,78,95,.018); }
.topbar-title { display:flex; flex-direction:column; gap:4px; min-width:0; }
.topbar-eyebrow { font-size:10px; letter-spacing:1.25px; font-weight:700; color:#668490; }
.topbar-title strong { font-size:19px; letter-spacing:-.25px; color:#2B2F33; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar-right { gap:20px; color:#617681; font-size:11px; white-space:nowrap; }
.secure-label { color:#627881; }
.topbar-shield { display:inline-block; width:17px; height:17px; color:#1F4E5F; }
.topbar-date { color:#394D55; }
.topbar-avatar { border-radius:50%; width:35px; height:35px; display:grid; place-items:center; font-size:12px; flex:none; }
.page-content { max-width:1530px; padding:34px clamp(22px,3.2vw,50px) 26px; }
.page-heading { margin-bottom:26px; }
.page-heading p { color:#73838B; }
.overline { color:#1F4E5F; letter-spacing:1.45px; margin-bottom:11px; }
.btn { border-radius:9px; padding:11px 17px; font-size:12px; }
.btn-primary { background:#1F4E5F; box-shadow:0 4px 13px rgba(31,78,95,.14); }
.btn-primary:hover { background:#143B49; }
.btn-outline { color:#1F4E5F; border-color:#D5DFE3; }
.btn-outline:hover { background:#ECF3F5; }
.stats-strip { background:#ECF3F5; color:#1F4E5F; border-color:#D5E4E9; }
.stats-strip span { color:#607782; }
.strip-icon { background:#D9E7EC; color:#1F4E5F; }
.company-card,.metric-card,.surface-card,.empty-state { border-color:#E1E5E7; box-shadow:var(--shadow); }
.company-card:hover { border-color:#A9C8D2; box-shadow:0 13px 30px rgba(31,78,95,.10); }
.company-monogram { background:#E7F0F2; color:#1F4E5F; font-family:'Saira',sans-serif; }
.company-title { font-weight:700; font-size:16px; }
.company-tags span { background:#EEF3F5; color:#506B76; }
.company-card-foot { color:#70818A; }
.empty-state { border-style:dashed; }
.empty-icon { background:#E7F0F2; color:#1F4E5F; }
.panel-toolbar { color:#6C7D84; }
.field-input { border-color:#D8E0E3; color:#304650; }
.field-input:focus { border-color:#1F4E5F; box-shadow:0 0 0 3px rgba(31,78,95,.13); }
.metric-grid { gap:16px; margin-bottom:19px; }
.metric-card { min-height:149px; border-radius:13px; position:relative; overflow:hidden; padding:21px 22px 19px; }
.metric-card::after { content:''; width:95px; height:95px; background:linear-gradient(140deg,rgba(31,78,95,.045),rgba(31,78,95,0)); transform:rotate(42deg); position:absolute; right:-35px; bottom:-45px; border-radius:12px; pointer-events:none; }
.metric-top { color:#5C737C; font-weight:600; font-size:12px; }
.metric-value { font-size:clamp(20px,2.5vw,27px); letter-spacing:-.75px; font-weight:700; color:#2B2F33; }
.metric-bottom { color:#82929A; }
.metric-icon.green { color:#1F4E5F; background:#E7F1F3; }
.metric-icon.amber { color:#A46642; background:#FBF1E9; }
.metric-icon.white { color:#D9DEE2; border-color:rgba(217,222,226,.43); }
.metric-featured { background:linear-gradient(140deg,#1C5667,#123F4D); color:#FFF; border-color:#1A5060; }
.metric-featured .metric-value { color:#FFF; }
.metric-featured .metric-top { color:#D5E6EB; }
.metric-featured .metric-bottom { color:#C7D9DF; }
.metric-featured::after { background:url("../brand/sintera-simbolo-reversa.18ebb3d51b6e.svg") center/contain no-repeat; opacity:.10; width:142px; height:142px; right:-23px; bottom:-59px; transform:none; }
.dashboard-columns { grid-template-columns:minmax(0,1.56fr) minmax(315px,1fr); gap:17px; }
.surface-card { border-radius:13px; }
.surface-head { padding:20px 22px; }
.text-link { color:#1F4E5F; }
.data-table th { background:#F5F7F7; color:#5F7883; font-size:10px; }
.data-table td { border-top-color:#EEF1F2; }
.data-table tbody tr:hover { background:#F7FAFA; }
.table-total { background:#EAF2F4; }
.table-total td { color:#1F4E5F; }
.quick-stat strong { color:#2B2F33; }
.chip-success { color:#18634D; background:#E4F4EC; }
.chip-warning { color:#996522; background:#FFF3DE; }
.chip-soft { color:#3F6978; background:#E7F1F3; }
.quick-link { background:#F0F5F6; border-color:#DEE8EB; color:#1F4E5F; }
.quick-link:hover { background:#E7EFF2; }
.notice { background:#EFF4F5; border-color:#DCE8EB; color:#647984; }
.notice-icon { border-color:#7A9AA8; color:#1F4E5F; }
.notice strong { color:#1F4E5F; }
.account-code { color:#1F4E5F; }
.count-pill { color:#1F4E5F; background:#EAF1F3; }
.table-action { color:#1F4E5F; }
.field-check { accent-color:#1F4E5F; }
.form-aside-icon { color:#1F4E5F; background:#E9F1F3; }
.form-aside h3 { color:#2B2F33; }
.entry-side-label { color:#1F4E5F; }
.side-badge.debit { background:#E6F1F3; color:#1F4E5F; }
.side-badge.credit { background:#FFF3E8; color:#A36B3E; }
.info-inline { background:#F0F5F7; border-color:#DCE8EC; color:#3C6877; }
.report-tabs a { background:#E8F1F3; color:#1F4E5F; }
.report-tabs a:hover { background:#D8E8EC; }
.report-line.main { background:#F6F9F9; color:#1F4E5F; }
.report-line.total { background:#E9F2F4; color:#1F4E5F; }
.flash { background:#E9F4F4; border-color:#D5E8E9; color:#22606B; }
.flash-error { background:#FFF0ED; border-color:#F4DAD7; color:#A84640; }
.footer { border-color:#E1E6E8; color:#84949B; }
/* Login mantém os mesmos campos e a mesma lógica de autenticação. */
.login-body { background:#F7F6F3; }
.login-layout { grid-template-columns:minmax(0,1.08fr) minmax(430px,1fr); }
.login-hero { background:linear-gradient(150deg,#1F4E5F 0%,#123946 100%); padding:45px clamp(35px,6vw,85px); }
.login-hero::before { content:''; position:absolute; border:0; border-radius:0; width:340px; height:340px; right:-90px; bottom:-80px; opacity:.11; background:url("../brand/sintera-simbolo-reversa.18ebb3d51b6e.svg") center/contain no-repeat; }
.login-hero::after { display:none; }
.login-brand { max-width:280px; }
.login-brand img { display:block; width:100%; height:auto; }
.login-hero h1 { font-family:'Saira','Segoe UI',sans-serif; font-size:clamp(31px,3.6vw,48px); font-weight:700; line-height:1.35; letter-spacing:-1.4px; }
.login-hero h1 em { color:#D9DEE2; }
.login-kicker { color:#C7DAE0; }
.login-hero-content p { color:#D4E2E6; }
.login-footnote { color:#C4D5DB; }
.login-box h2 { font-family:'Saira','Segoe UI',sans-serif; font-weight:700; }
.login-assurance { color:#71848E; }
@media(max-width:1100px) {
  .sidebar { width:231px; }
  .brand-logo { max-width:190px; }
  .page-content { padding:30px 23px 25px; }
  .topbar { padding:14px 23px; }
  .dashboard-columns { grid-template-columns:1fr; }
}
@media(max-width:790px) {
  .sidebar { width:100%; height:auto; min-height:0; overflow:visible; padding:12px 16px 10px; }
  .sidebar::before { display:none; }
  .brand { margin:2px 0 12px; width:171px; }
  .brand-logo { width:100%; max-width:171px; }
  .side-nav { gap:6px; padding-bottom:2px; }
  .nav-link { min-height:38px; padding:9px 11px; font-size:11px; }
  .nav-icon { width:18px; height:18px; }
  .sidebar-label { display:none; }
  .topbar { min-height:65px; height:auto; padding:11px 18px; }
  .topbar-title strong { font-size:16px; }
  .topbar-eyebrow { font-size:8px; letter-spacing:.8px; }
  .topbar-right { gap:9px; }
  .topbar-date { font-size:10px; }
  .topbar-avatar { width:30px; height:30px; font-size:11px; }
  .page-content { padding:23px 18px; }
  .metric-grid { grid-template-columns:1fr; }
  .metric-card { min-height:115px; }
  .login-brand { max-width:215px; }
  .login-hero { min-height:285px; padding:27px; }
  .login-hero-content { margin:35px 0; }
}
@media(max-width:430px) {
  .topbar-date { display:none; }
  .topbar { gap:8px; }
  .page-heading { gap:18px; }
  .metric-value { font-size:23px; }
  .login-hero { min-height:260px; }
}

/* v0.4 — Menu vertical compacto. No desktop não depende de rolagem em alturas usuais. */
@media (min-width:791px) {
  .sidebar { padding: 15px 10px 11px; overflow-x:hidden; overflow-y:auto; scrollbar-width:none; }
  .sidebar::-webkit-scrollbar { display:none; }
  .brand { margin: 0 8px 16px; padding:2px; }
  .brand-logo { max-width:185px; }
  .sidebar-label { margin-bottom:6px; font-size:9px; }
  .company-switch { margin:0 3px 10px; padding:7px 9px; }
  .company-avatar { height:29px; width:29px; font-size:14px; }
  .side-nav { gap:2px; }
  .nav-link { min-height:35px; padding:8px 11px; font-size:11px; gap:9px; }
  .nav-icon { height:18px; width:18px; }
  .sidebar-help { padding:8px 9px; margin-bottom:7px; line-height:1.3; font-size:10px; }
  .sidebar-user { padding:9px 3px 4px; }
  .user-avatar { height:27px; width:27px; }
  .logout-button { padding:6px 8px; }
  .sidebar::before { opacity:.065; }
}
@media (min-width:791px) and (max-height:670px) {
  .brand { margin-bottom:9px; }
  .sidebar-label { margin-bottom:3px; }
  .nav-link { min-height:31px; padding:6px 10px; }
  .sidebar-help { margin-bottom:4px; padding:5px 8px; }
  .sidebar-user { padding-top:5px; }
  .company-switch { margin-bottom:7px; }
}
/* v0.4 — Importação de notas em dois passos; classes apenas visuais. */
.document-upload-zone { border:1.5px dashed #9CB7C1; background:#F3F8F9; border-radius:12px; padding:21px 18px; text-align:center; }
.document-upload-zone .field-input { background:#fff; max-width:100%; }
.document-upload-title { font-weight:700; color:#1F4E5F; font-size:15px; margin:0 0 7px; }
.document-details.is-hidden { display:none; }
.document-details { border-top:1px solid #E1E8EB; padding-top:18px; margin-top:6px; }
.document-status { font-size:12px; line-height:1.6; border-radius:9px; padding:10px 12px; background:#EEF4F6; color:#315A67; }
.document-status[data-level="warning"] { background:#FFF5E5; color:#805825; }
.document-status[data-level="error"] { background:#FFF0EE; color:#9E3D35; }
.document-status ul { margin:7px 0 0 19px; }
.document-manual-button { border:0; background:none; color:#1F4E5F; text-decoration:underline; cursor:pointer; font-size:12px; padding:6px; }
.document-step-title { color:#1F4E5F; font-size:13px; font-weight:800; margin:0 0 14px; }

.document-details [hidden], .document-status[hidden], .document-details [data-field="account"][hidden] { display:none !important; }

/* v0.6 — Recebimentos vinculados a notas fiscais */
.receipt-summary,.receipt-form-card,.receipt-history{margin-bottom:18px}
.receipt-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;padding:0 23px 23px}
.receipt-stats>div{display:flex;flex-direction:column;gap:7px;background:#F5F8F8;border:1px solid #E5EBED;border-radius:11px;padding:14px}
.receipt-stats small{color:#71848D;font-size:11px}
.receipt-stats strong{color:#263940;font-size:18px;font-weight:700}
.receipt-notice{margin-bottom:18px}
.receipt-form,.receipt-settlement-form{padding:2px 23px 23px}
.receipt-form .form-actions{margin-top:18px}
.receipt-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:12px 0}
.receipt-input-grid .form-field{display:flex;flex-direction:column;gap:7px}
.receipt-input-grid label{color:#445D67;font-weight:600;font-size:12px}
.receipt-posting-preview{background:#EFF5F6;border:1px solid #D5E4E7;border-radius:9px;padding:13px;color:#345762;line-height:1.7}
.receipt-record{border-top:1px solid #E7ECEE;padding:20px 23px}
.receipt-record:first-of-type{border-top:0}
.receipt-record-head{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#293F47}
.receipt-record-head strong{font-weight:700}
.receipt-record-head .chip{margin-left:12px}
.receipt-record-sub{color:#6A7B83;font-size:12px;margin-top:9px;line-height:1.65}
.receipt-cancelled{opacity:.7}
.receipt-settlement-box{margin-top:15px;border:1px solid #D8E4E8;border-radius:10px;padding:13px 16px;background:#F9FBFB}
.receipt-settlement-box summary{color:#1F4E5F;font-weight:700;cursor:pointer}
.receipt-settlement-form{padding:14px 0 0}
.receipt-settlement-list{padding:12px 0 0}
.receipt-settlement-row{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:12px;padding:9px 0;color:#607984}
.receipt-empty{padding:0 23px 23px;color:#788990}
.receipt-record form .table-action{margin-top:8px}
[hidden]{display:none !important}
@media(max-width:850px){.receipt-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:550px){.receipt-stats,.receipt-input-grid{grid-template-columns:1fr}.receipt-record-head,.receipt-settlement-row{align-items:flex-start;flex-direction:column}}

/* v0.7 — formulário profissional de notas fiscais */
.invoice-section{padding:20px 0;border-top:1px solid #e4e9eb}
.invoice-section-header{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}
.invoice-section-header h2{font-size:15px;margin:0 0 5px;color:#2b2f33}
.invoice-section-header p{margin:0;font-size:12px;color:#6c7b83;line-height:1.55}
.invoice-section-index{width:30px;height:30px;border-radius:8px;flex:none;background:#e6f0f2;color:#1f4e5f;display:grid;place-items:center;font-weight:800;font-size:11px}
.invoice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 17px}
.invoice-grid.one-column{grid-template-columns:1fr}
.invoice-grid .form-field{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.invoice-grid label,.invoice-tax-item>label:first-child{color:#42535d;font-size:12px;font-weight:700}
.invoice-tip{background:#f3f7f8;border-left:3px solid #1f4e5f;color:#617680;padding:10px 13px;border-radius:5px;margin:11px 0 0;font-size:12px}
.invoice-tax-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.invoice-tax-item{background:#f8fafb;border:1px solid #e1e7eb;padding:12px;border-radius:10px;display:flex;flex-direction:column;gap:7px}
.invoice-tax-item input[type="number"]{width:100%}
.invoice-tax-retention{display:flex;align-items:center;gap:7px;font-size:11px;color:#5a6b73;cursor:pointer}
.invoice-tax-retention input{width:15px;height:15px;accent-color:#1f4e5f}
.invoice-audit{padding:13px 15px;border-radius:10px;border:1px solid #d7e3e8;background:#f3f8fa;color:#345561}
.invoice-audit strong{font-size:12px}
.invoice-audit p{margin:5px 0 0;font-size:11px;line-height:1.6}
.invoice-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0 23px 18px}
.invoice-meta-grid>div{background:#f6f9fa;border:1px solid #e3eaed;border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:5px}
.invoice-meta-grid small{font-size:10px;color:#72818b}
.invoice-meta-grid strong{font-size:12px;color:#2b414a;overflow-wrap:anywhere}
.invoice-taxes-display{padding:0 23px 20px;display:flex;flex-wrap:wrap;gap:8px}
.invoice-tax-chip{font-size:11px;border:1px solid #d5e3e7;border-radius:8px;background:#eff5f6;padding:6px 11px;color:#2f5966}
.invoice-tax-chip.retained{background:#fff5e8;color:#85582f;border-color:#f2dfbd}
@media(max-width:690px){.invoice-grid,.invoice-tax-grid,.invoice-meta-grid{grid-template-columns:1fr}}

.invoice-tax-expand{border:1px solid #dee7eb;border-radius:10px;background:#fbfcfc;padding:10px 12px}
.invoice-tax-expand>summary{font-weight:700;color:#1f4e5f;cursor:pointer;font-size:12px;padding:5px 3px}
.invoice-tax-expand[open]>summary{margin-bottom:12px}

/* v0.8 — filtros por intervalo, histórico auditável, ações e comprovantes */
.filter-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px}
.range-filter{display:flex;align-items:end;gap:9px;flex-wrap:wrap;padding:0;margin:0}
.range-field{display:flex;flex-direction:column;gap:4px;min-width:150px}
.range-field label{font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:#637b83;font-weight:700}
.range-filter input[type="date"]{border-radius:9px;border:1px solid #cedde2;background:#fff;min-height:38px;width:158px;padding:7px 9px;color:#2b2f33;box-shadow:0 1px 1px rgba(31,78,95,.025)}
.range-filter input[type="date"]:focus{border-color:#1f4e5f;outline:2px solid rgba(31,78,95,.14)}
.range-separator{color:#667f89;align-self:center;margin-top:12px;font-size:12px}
.table-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0}
.table-actions form{display:inline-flex;margin:0;padding:0}
.table-actions .table-action{margin:0!important;display:inline-flex;align-items:center;justify-content:center;white-space:normal;text-align:center;min-height:30px;padding:6px 10px;line-height:1.3;border:1px solid #d7e4e7;border-radius:7px;background:#f8fbfb;font-size:11px;color:#1f4e5f;font-weight:700;text-decoration:none;cursor:pointer}
.table-actions .table-action:hover,.table-actions .table-action:focus{background:#e5f0f2;border-color:#aecbd2}
.table-actions .action-primary{background:#1f4e5f;color:#fff;border-color:#1f4e5f}
.table-actions .action-danger{background:#fff6f5;color:#9e4540;border-color:#efd1cc}
.table-actions .action-danger:hover{background:#ffeae6}
.proof-field{margin-top:13px;display:flex;flex-direction:column;gap:7px}
.proof-field label{font-size:12px;color:#375c69;font-weight:700}
.proof-field input[type=file]{padding:9px;background:#fff;max-width:100%;height:auto}
.wrap-id{overflow-wrap:anywhere;font-size:11px!important}
.totals-row td{background:#edf5f6;border-top:2px solid #bad1d8;font-weight:700}
.receipt-record .table-actions{margin-top:10px}
@media(max-width:760px){.range-filter{width:100%;}.range-field{flex:1;min-width:130px}.range-filter input[type=date]{width:100%}}
