/*
 * COSECHAS • GESTÃO COMERCIAL
 * Projeto e desenvolvimento: Juan Erkson
 * Assinatura interna do autor.
 */
:root{--bg:#f4f7fb;--panel:#fff;--text:#18202d;--muted:#758096;--line:#e6ebf2;--brand:#2457f5;--brand2:#173fc2;--green:#159a62;--amber:#c98911;--red:#d84646;--blue:#2f73df;--sidebar:#111827;--shadow:0 10px 30px rgba(17,24,39,.07)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;color:var(--text);background:var(--bg)}button,input,select{font:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:250px;background:var(--sidebar);color:#fff;padding:24px 16px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:30}.brand{display:flex;gap:12px;align-items:center;padding:0 8px 26px}.brand-mark{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#4f7dff,#7b5cff);display:grid;place-items:center;font-weight:800}.brand strong,.brand span{display:block}.brand span{font-size:12px;color:#a9b4c8;margin-top:2px}.sidebar nav{display:grid;gap:6px}.nav-item{border:0;background:transparent;color:#b9c2d0;padding:12px 14px;border-radius:10px;text-align:left;cursor:pointer;display:flex;gap:10px}.nav-item:hover,.nav-item.active{background:#202a3b;color:#fff}.sidebar-footer{margin-top:auto;padding:14px 8px;display:grid;gap:10px;color:#9aa6b8}.main{margin-left:250px;width:calc(100% - 250px);padding:28px 32px 50px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;gap:20px}.topbar h1{margin:0;font-size:28px}.topbar p{margin:4px 0 0;color:var(--muted)}.top-actions{display:flex;gap:10px}.primary,.ghost{border-radius:10px;padding:10px 14px;border:1px solid transparent;cursor:pointer;font-weight:700}.primary{background:var(--brand);color:white}.primary:hover{background:var(--brand2)}.ghost{background:#fff;border-color:var(--line);color:var(--text)}.ghost.small{background:transparent;color:#cbd5e1;border-color:#354158;padding:8px 10px}.mobile-menu{display:none}.view{display:none}.view.active{display:block}.cards{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:16px}.metric-card{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:16px;padding:18px}.metric-card span{font-size:13px;color:var(--muted)}.metric-card strong{display:block;font-size:23px;margin-top:8px}.metric-card small{display:block;color:var(--muted);margin-top:5px}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}.panel{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:16px;padding:18px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.panel h2{font-size:17px;margin:0}.panel p{font-size:13px;color:var(--muted);margin:4px 0 0}.donut-wrap{display:flex;align-items:center;justify-content:center;gap:30px;min-height:260px}.donut{width:180px;height:180px;border-radius:50%;position:relative;background:conic-gradient(var(--green) 0deg,var(--green) 0deg,#e9edf4 0deg)}.donut:after{content:"";position:absolute;inset:26px;background:#fff;border-radius:50%}.donut-center{position:absolute;z-index:2;inset:0;display:grid;place-content:center;text-align:center}.donut-center strong{font-size:28px}.donut-center span{color:var(--muted);font-size:12px}.legend{display:grid;gap:12px}.legend-row{display:flex;align-items:center;gap:10px}.dot{width:10px;height:10px;border-radius:50%}.dot.green{background:var(--green)}.dot.blue{background:var(--blue)}.legend-row span{color:var(--muted);font-size:13px}.legend-row strong{margin-left:auto}.bars{display:grid;gap:18px;padding:16px 4px}.bar-row{display:grid;grid-template-columns:95px 1fr 34px;align-items:center;gap:12px;font-size:13px}.bar-track{height:10px;background:#edf1f6;border-radius:10px;overflow:hidden}.bar-fill{height:100%;border-radius:10px}.bar-fill.wait{background:var(--blue)}.bar-fill.partial{background:var(--amber)}.bar-fill.paid{background:var(--green)}.bar-fill.cancel{background:var(--red)}.table-wrap{overflow:auto}.table-wrap.compact table{font-size:13px}table{width:100%;border-collapse:collapse;min-width:780px}th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);text-align:left;padding:12px;border-bottom:1px solid var(--line)}td{padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:middle}tbody tr:hover{background:#fafbfe}.badge{display:inline-flex;padding:5px 9px;border-radius:99px;font-size:12px;font-weight:800}.badge.wait{background:#e8f1ff;color:#1d62c8}.badge.partial{background:#fff4d8;color:#9a6800}.badge.paid{background:#e4f6ee;color:#11754d}.badge.cancel{background:#fde7e7;color:#b82f2f}.row-actions{display:flex;gap:6px}.icon-btn{border:0;background:transparent;cursor:pointer;font-size:24px;color:var(--muted)}.mini-btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 8px;cursor:pointer}.toolbar{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap}.toolbar select,.search{border:1px solid var(--line);background:#fff;border-radius:10px;height:42px}.toolbar select{padding:0 12px}.search{display:flex;align-items:center;padding:0 12px;flex:1;min-width:250px}.search input{border:0;outline:0;width:100%;padding:0 8px}.activity-list{display:grid;gap:8px}.activity{display:grid;grid-template-columns:44px 1fr auto;gap:10px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:12px}.activity-icon{width:36px;height:36px;border-radius:10px;background:#e8f6ef;color:var(--green);display:grid;place-items:center;font-weight:900}.activity strong,.activity span{display:block}.activity span{font-size:12px;color:var(--muted);margin-top:2px}.activity-value{font-weight:800;color:var(--green)}.empty{padding:22px;text-align:center;color:var(--muted)}.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(10,17,30,.55);z-index:50;align-items:center;justify-content:center;padding:20px}.modal-backdrop.open{display:flex}.modal{width:min(720px,100%);background:#fff;border-radius:18px;box-shadow:0 30px 80px rgba(0,0,0,.22);padding:22px}.modal.narrow{width:min(480px,100%)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.modal-head h2{margin:0}.modal-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid .full{grid-column:1/-1}label{display:grid;gap:7px;font-size:13px;font-weight:700;margin-bottom:14px}label input,label select{height:43px;border:1px solid var(--line);border-radius:10px;padding:0 12px;outline:0;background:#fff}label input:focus,label select:focus{border-color:#91a7ff;box-shadow:0 0 0 3px rgba(36,87,245,.09)}.hidden{display:none}.calc-preview{display:grid;grid-template-columns:1fr 1fr;gap:10px;background:#f7f9fc;border:1px solid var(--line);padding:14px;border-radius:12px;margin-top:2px}.calc-preview span{font-size:12px;color:var(--muted);display:block}.calc-preview strong{font-size:19px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.payment-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;background:#f7f9fc;border:1px solid var(--line);padding:12px;border-radius:12px;margin-bottom:14px}.payment-summary span{display:block;color:var(--muted);font-size:11px}.payment-summary strong{display:block;margin-top:4px;font-size:14px}.toast{position:fixed;right:24px;bottom:24px;background:#111827;color:#fff;padding:12px 16px;border-radius:10px;opacity:0;pointer-events:none;transform:translateY(10px);transition:.2s;z-index:90}.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:1150px){.cards{grid-template-columns:repeat(3,1fr)}.grid.two{grid-template-columns:1fr}}
@media(max-width:780px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0)}.main{margin-left:0;width:100%;padding:20px 14px}.mobile-menu{display:inline-block;border:0;background:transparent;font-size:22px;margin-right:8px}.topbar{align-items:flex-start;flex-direction:column}.top-actions{width:100%}.top-actions button{flex:1}.cards{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.donut-wrap{flex-direction:column}.modal{max-height:92vh;overflow:auto}}
@media(max-width:460px){.cards{grid-template-columns:1fr}.top-actions{flex-wrap:wrap}.payment-summary{grid-template-columns:1fr}}
.period-control{display:flex;align-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}.period-control select{height:40px;border:0;border-left:1px solid var(--line);padding:0 10px;background:#fff;outline:0}.period-pill{padding:0 10px;font-size:12px;font-weight:800;color:var(--green);white-space:nowrap}.period-pill.history{color:var(--amber)}.history-notice{background:#fff8e8;border:1px solid #f1d48a;color:#72520d;padding:12px 14px;border-radius:12px;margin-bottom:14px;font-size:13px}.badge.current{background:#e9edff;color:var(--brand);margin-left:7px}.month-transition{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:16px}.month-transition span,.month-transition strong{display:block}.month-transition span{font-size:11px;color:var(--muted);margin-bottom:4px}.month-transition strong{font-size:16px}.month-arrow{font-size:22px;color:var(--brand);font-weight:800}.month-info{font-size:13px;line-height:1.5;color:var(--muted);background:#f7f9fc;border-radius:10px;padding:12px}.hidden{display:none!important}
@media(max-width:1100px){.top-actions{flex-wrap:wrap}.period-control{order:3}.top-actions .period-control{width:100%}.period-control select{flex:1}}

/* Exportação / impressão do dashboard */
.print-report-head{display:none}.pdf-btn{white-space:nowrap}
@media print{
  @page{size:A4 landscape;margin:10mm}
  *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  html,body{background:#fff!important;width:100%;height:auto}
  body.printing-dashboard .sidebar,
  body.printing-dashboard .topbar,
  body.printing-dashboard .toast,
  body.printing-dashboard .modal-backdrop,
  body.printing-dashboard #view-negociacoes,
  body.printing-dashboard #view-pagamentos,
  body.printing-dashboard #view-historico,
  body.printing-dashboard #view-leads,
  body.printing-dashboard .history-notice{display:none!important}
  body.printing-dashboard .main{margin:0!important;width:100%!important;padding:0!important}
  body.printing-dashboard .view{display:none!important}
  body.printing-dashboard #view-dashboard{display:block!important}
  body.printing-dashboard .print-report-head{display:flex!important;justify-content:space-between;align-items:flex-end;border-bottom:2px solid #18202d;padding:0 0 10px;margin:0 0 12px}
  body.printing-dashboard .print-report-head span{font-size:9px;letter-spacing:.09em;font-weight:800;color:#758096}
  body.printing-dashboard .print-report-head h1{font-size:22px;margin:3px 0 1px}
  body.printing-dashboard .print-report-head p{font-size:11px;color:#758096;margin:0}
  body.printing-dashboard .print-meta{text-align:right}
  body.printing-dashboard .print-meta strong,body.printing-dashboard .print-meta span{display:block}
  body.printing-dashboard .print-meta strong{font-size:11px;color:#18202d}
  body.printing-dashboard .print-meta span{font-size:9px;color:#758096;margin-top:2px}
  body.printing-dashboard .cards{grid-template-columns:repeat(5,1fr)!important;gap:8px!important;margin-bottom:8px!important}
  body.printing-dashboard .metric-card{padding:11px!important;border-radius:10px!important;box-shadow:none!important;break-inside:avoid}
  body.printing-dashboard .metric-card span{font-size:9px!important}
  body.printing-dashboard .metric-card strong{font-size:16px!important;margin-top:4px!important}
  body.printing-dashboard .metric-card small{font-size:8px!important;margin-top:2px!important}
  body.printing-dashboard .grid.two{grid-template-columns:1fr 1fr!important;gap:8px!important;margin-bottom:8px!important}
  body.printing-dashboard .panel{padding:11px!important;border-radius:10px!important;box-shadow:none!important;break-inside:avoid;page-break-inside:avoid}
  body.printing-dashboard .panel-head{margin-bottom:7px!important}
  body.printing-dashboard .panel h2{font-size:12px!important}
  body.printing-dashboard .panel p{font-size:8px!important;margin-top:2px!important}
  body.printing-dashboard .donut-wrap{min-height:140px!important;gap:18px!important}
  body.printing-dashboard .donut{width:112px!important;height:112px!important}
  body.printing-dashboard .donut:after{inset:18px!important}
  body.printing-dashboard .donut-center strong{font-size:18px!important}
  body.printing-dashboard .donut-center span{font-size:8px!important}
  body.printing-dashboard .legend{gap:7px!important}
  body.printing-dashboard .legend-row{font-size:9px!important;gap:6px!important}
  body.printing-dashboard .legend-row span{font-size:9px!important}
  body.printing-dashboard .bars{gap:9px!important;padding:5px 2px!important}
  body.printing-dashboard .bar-row{grid-template-columns:72px 1fr 25px!important;gap:7px!important;font-size:9px!important}
  body.printing-dashboard .bar-track{height:7px!important}
  body.printing-dashboard table{min-width:0!important;font-size:8px!important}
  body.printing-dashboard th{font-size:7px!important;padding:6px!important}
  body.printing-dashboard td{font-size:8px!important;padding:6px!important}
  body.printing-dashboard .activity-list{gap:4px!important}
  body.printing-dashboard .activity{grid-template-columns:28px 1fr auto!important;padding:5px 6px!important;border-radius:7px!important}
  body.printing-dashboard .activity-icon{width:24px!important;height:24px!important;border-radius:6px!important;font-size:10px!important}
  body.printing-dashboard .activity strong{font-size:8px!important}
  body.printing-dashboard .activity span{font-size:7px!important;margin-top:1px!important}
  body.printing-dashboard .activity-value{font-size:8px!important}
  body.printing-dashboard .empty{padding:10px!important;font-size:8px!important}
}


/* Módulo de Leads */
.lead-actions-row{display:flex;justify-content:space-between;gap:18px;align-items:flex-end;margin-bottom:18px}.section-title{margin:0;font-size:22px}.section-subtitle{margin:5px 0 0;color:var(--muted);font-size:13px}.lead-buttons{display:flex;gap:8px}.lead-cards{grid-template-columns:repeat(4,1fr)}.lead-grid{margin-top:0}.lead-week-chart{height:180px;display:grid;grid-template-columns:repeat(7,1fr);gap:10px;align-items:end;padding:12px 4px 0}.lead-day{display:grid;gap:8px;text-align:center}.lead-bar-area{height:140px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.lead-bar-area strong{font-size:12px}.lead-bar{width:min(34px,72%);min-height:5px;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,var(--brand),#7895ff)}.lead-day span{font-size:11px;color:var(--muted);font-weight:700}.lead-comparison{min-height:180px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;text-align:center;position:relative}.compare-number span{display:block;color:var(--muted);font-size:12px}.compare-number strong{display:block;font-size:40px;margin-top:6px}.compare-arrow{font-size:30px;color:var(--brand);font-weight:900}.compare-result{position:absolute;left:50%;transform:translateX(-50%);bottom:4px;font-weight:900;font-size:14px}.compare-result.up{color:var(--green)}.compare-result.down{color:#b82f2f}.whatsapp-btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;background:#e7f8ef;color:#11754d;border:1px solid #bfe8d2;border-radius:9px;padding:7px 10px;font-size:12px;font-weight:800;white-space:nowrap}.whatsapp-btn:hover{background:#d9f4e6}.danger-lite{color:#a52a2a}.lead-import-note{border-top:1px solid var(--line);padding-top:12px;margin-top:10px;color:var(--muted);font-size:12px;line-height:1.5}.leads-table{min-width:1050px}
@media(max-width:900px){.lead-actions-row{align-items:stretch;flex-direction:column}.lead-buttons{width:100%}.lead-buttons button{flex:1}.lead-cards{grid-template-columns:1fr 1fr}}
@media(max-width:500px){.lead-cards{grid-template-columns:1fr}.lead-week-chart{gap:4px}.lead-bar{width:20px}.lead-comparison{grid-template-columns:1fr auto 1fr}.compare-number strong{font-size:30px}}

/* Status de atendimento dos leads */
.lead-status-select{height:34px;border-radius:9px;border:1px solid var(--line);padding:0 9px;font-size:12px;font-weight:800;outline:0;cursor:pointer;background:#fff}
.lead-status-select.lead-new,.badge.lead-new{background:#e8f1ff;color:#1d62c8;border-color:#c8dcfb}
.lead-status-select.lead-contacted,.badge.lead-contacted{background:#eef0ff;color:#4d52b7;border-color:#d7d9fa}
.lead-status-select.lead-noanswer,.badge.lead-noanswer{background:#fff4d8;color:#8f6200;border-color:#f1dfad}
.lead-status-select.lead-qualified,.badge.lead-qualified{background:#e7f8ef;color:#11754d;border-color:#bfe8d2}
.lead-status-select.lead-cof,.badge.lead-cof{background:#e8f7fb;color:#096d85;border-color:#b9e4ee}
.lead-status-select.lead-discarded,.badge.lead-discarded{background:#fde7e7;color:#b82f2f;border-color:#f3c4c4}
.lead-status-print{display:none}
.print-section-title{display:none}

/* Relatório completo em PDF: todas as abas no mesmo arquivo */
@media print{
  @page{size:A4 landscape;margin:9mm}
  *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  html,body{background:#fff!important;width:100%!important;height:auto!important}
  body.printing-all .sidebar,body.printing-all .topbar,body.printing-all .toast,body.printing-all .modal-backdrop{display:none!important}
  body.printing-all .main{margin:0!important;width:100%!important;padding:0!important}
  body.printing-all .view{display:block!important;margin:0!important;padding:0!important}
  body.printing-all #view-negociacoes,body.printing-all #view-pagamentos,body.printing-all #view-leads,body.printing-all #view-historico{break-before:page;page-break-before:always}
  body.printing-all .print-report-head{display:flex!important;justify-content:space-between;align-items:flex-end;border-bottom:2px solid #18202d;padding:0 0 9px;margin:0 0 10px}
  body.printing-all .print-report-head span,body.printing-all .print-section-title span{font-size:8px;letter-spacing:.09em;font-weight:800;color:#758096}
  body.printing-all .print-report-head h1,body.printing-all .print-section-title h1{font-size:20px;margin:3px 0 1px}
  body.printing-all .print-report-head p,body.printing-all .print-section-title p{font-size:9px;color:#758096;margin:0}
  body.printing-all .print-meta{text-align:right}
  body.printing-all .print-meta strong,body.printing-all .print-meta span{display:block}
  body.printing-all .print-meta strong{font-size:9px;color:#18202d}
  body.printing-all .print-meta span{font-size:8px;color:#758096;margin-top:2px}
  body.printing-all .print-section-title{display:block!important;border-bottom:2px solid #18202d;padding:0 0 9px;margin:0 0 10px}
  body.printing-all .history-notice,body.printing-all .toolbar,body.printing-all .lead-actions-row,body.printing-all .lead-import-note,body.printing-all .no-print{display:none!important}
  body.printing-all .cards{grid-template-columns:repeat(5,1fr)!important;gap:7px!important;margin-bottom:8px!important}
  body.printing-all .lead-cards{grid-template-columns:repeat(4,1fr)!important}
  body.printing-all .metric-card{padding:10px!important;border-radius:8px!important;box-shadow:none!important;break-inside:avoid}
  body.printing-all .metric-card span{font-size:8px!important}
  body.printing-all .metric-card strong{font-size:15px!important;margin-top:3px!important}
  body.printing-all .metric-card small{font-size:7px!important;margin-top:2px!important}
  body.printing-all .grid.two{grid-template-columns:1fr 1fr!important;gap:7px!important;margin-bottom:7px!important}
  body.printing-all .panel{padding:10px!important;border-radius:8px!important;box-shadow:none!important;margin-bottom:7px!important}
  body.printing-all #view-dashboard .panel{break-inside:avoid;page-break-inside:avoid}
  body.printing-all #view-negociacoes .panel,body.printing-all #view-pagamentos .panel,body.printing-all #view-leads>.panel,body.printing-all #view-historico .panel{break-inside:auto!important;page-break-inside:auto!important}
  body.printing-all .panel-head{margin-bottom:6px!important}
  body.printing-all .panel h2{font-size:11px!important}
  body.printing-all .panel p{font-size:7px!important;margin-top:2px!important}
  body.printing-all .donut-wrap{min-height:125px!important;gap:16px!important}
  body.printing-all .donut{width:102px!important;height:102px!important}
  body.printing-all .donut:after{inset:17px!important}
  body.printing-all .donut-center strong{font-size:16px!important}
  body.printing-all .donut-center span{font-size:7px!important}
  body.printing-all .legend{gap:6px!important}.legend-row{font-size:8px!important;gap:5px!important}
  body.printing-all .legend-row span{font-size:8px!important}
  body.printing-all .bars{gap:7px!important;padding:4px 2px!important}
  body.printing-all .bar-row{grid-template-columns:68px 1fr 23px!important;gap:6px!important;font-size:8px!important}
  body.printing-all .bar-track{height:6px!important}
  body.printing-all .table-wrap{overflow:visible!important}
  body.printing-all table{min-width:0!important;width:100%!important;font-size:7px!important}
  body.printing-all th{font-size:6.5px!important;padding:5px!important;white-space:nowrap}
  body.printing-all td{font-size:7px!important;padding:5px!important;vertical-align:top}
  body.printing-all tr{break-inside:avoid;page-break-inside:avoid}
  body.printing-all .badge{font-size:6.5px!important;padding:3px 5px!important;white-space:nowrap}
  body.printing-all .lead-status-select{display:none!important}
  body.printing-all .lead-status-print{display:inline-flex!important}
  body.printing-all .leads-table{min-width:0!important;table-layout:auto}
  body.printing-all .lead-grid{break-inside:avoid;page-break-inside:avoid}
  body.printing-all .lead-week-chart{height:120px!important;padding-top:4px!important}
  body.printing-all .lead-bar-area{height:90px!important}
  body.printing-all .lead-comparison{min-height:120px!important}
  body.printing-all .compare-number strong{font-size:26px!important}
  body.printing-all .compare-result{font-size:9px!important}
  body.printing-all .activity-list{gap:3px!important}
  body.printing-all .activity{grid-template-columns:25px 1fr auto!important;padding:4px 5px!important;border-radius:6px!important}
  body.printing-all .activity-icon{width:21px!important;height:21px!important;border-radius:5px!important;font-size:8px!important}
  body.printing-all .activity strong{font-size:7px!important}.activity span{font-size:6px!important}.activity-value{font-size:7px!important}
  body.printing-all .empty{padding:8px!important;font-size:7px!important}
}

/* V6 • Identidade Cosechas e período dinâmico de Leads */
.brand{display:block;padding:0 8px 24px}.brand-logo{display:block;width:100%;max-width:190px;height:auto;margin:0 auto 12px;object-fit:contain}.brand-copy{text-align:center}.brand-copy strong,.brand-copy span{display:block}.brand-copy strong{font-size:14px}.brand-copy span{font-size:11px;color:#a9b4c8;margin-top:3px}.lead-period-select{height:42px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:0 34px 0 12px;font-weight:700;color:var(--text);cursor:pointer}.lead-week-chart{overflow-x:auto;overflow-y:hidden;min-width:0}.lead-day{min-width:54px}.lead-day span{white-space:nowrap}.lead-chart-empty{grid-column:1/-1;align-self:center}.print-report-brand{display:flex;align-items:center;gap:14px}.print-report-brand img{width:112px;height:auto;object-fit:contain}.print-section-brand{display:flex;align-items:center;gap:10px}.print-section-brand img{width:86px;height:auto;object-fit:contain;display:none}
@media(max-width:780px){.brand-logo{max-width:165px}.lead-buttons{flex-wrap:wrap}.lead-period-select{flex:1 1 100%}}

@media print{
  body.printing-all .print-report-head{background:#111827!important;color:#fff!important;border:0!important;border-radius:9px!important;padding:10px 12px!important;align-items:center!important}
  body.printing-all .print-report-brand img{width:104px!important;display:block!important}
  body.printing-all .print-report-head span,body.printing-all .print-report-head p,body.printing-all .print-meta span{color:#cbd5e1!important}
  body.printing-all .print-report-head h1,body.printing-all .print-meta strong{color:#fff!important}
  body.printing-all .print-section-title{background:#111827!important;color:#fff!important;border:0!important;border-radius:9px!important;padding:9px 12px!important}
  body.printing-all .print-section-brand img{display:block!important;width:80px!important}
  body.printing-all .print-section-title span,body.printing-all .print-section-title p{color:#cbd5e1!important}
  body.printing-all .print-section-title h1{color:#fff!important}
  body.printing-all .lead-week-chart{overflow:visible!important}
}

/* ===== Segurança e usuários (v7) ===== */
.auth-protected{visibility:hidden;pointer-events:none;user-select:none}
.auth-screen{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 0%,rgba(35,174,92,.14),transparent 38%),linear-gradient(135deg,#081117,#0c1920 55%,#0b151b)}
.auth-screen.hidden{display:none!important}.auth-card{width:min(460px,100%);background:rgba(15,29,36,.97);border:1px solid rgba(255,255,255,.10);border-radius:24px;padding:30px;box-shadow:0 32px 80px rgba(0,0,0,.42)}
.auth-brand{display:flex;align-items:center;gap:18px;padding-bottom:22px;margin-bottom:24px;border-bottom:1px solid rgba(255,255,255,.08)}.auth-brand img{width:150px;max-height:64px;object-fit:contain}.auth-brand div{display:grid;gap:3px}.auth-brand strong{font-size:17px}.auth-brand span{color:var(--muted);font-size:12px}.auth-panel h1{font-size:28px;margin:0 0 7px}.auth-panel>p{color:var(--muted);margin:0 0 22px}.auth-panel form{display:grid;gap:14px}.auth-submit{width:100%;justify-content:center;margin-top:5px;padding:13px 18px}.auth-error{min-height:18px;color:#ff8080;font-size:12px;font-weight:600}.auth-security-note{margin-top:22px;padding-top:18px;border-top:1px solid rgba(255,255,255,.07);font-size:11px;line-height:1.5;color:var(--muted)}.setup-badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:rgba(35,174,92,.13);color:#68e49a;font-size:10px;font-weight:800;letter-spacing:.08em;margin-bottom:10px}.password-field{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}.password-field input{min-width:0}.password-toggle{border:0;background:transparent;color:#65d891;font-size:11px;font-weight:700;cursor:pointer;padding:8px 0}.password-hint{font-size:11px;color:var(--muted);line-height:1.45}
.user-session{display:flex;align-items:center;gap:9px;padding-left:12px;border-left:1px solid var(--border)}.user-avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;font-weight:800;background:linear-gradient(135deg,var(--green),#167b49);color:white}.user-session-copy{display:grid;min-width:80px;line-height:1.2}.user-session-copy strong{font-size:12px;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-session-copy span{font-size:10px;color:var(--muted)}.logout-btn{border-color:rgba(255,100,100,.18)!important}.users-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:18px}.user-cards{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}.security-panel{margin-top:18px;padding:18px 20px;border:1px solid rgba(255,184,77,.20);background:rgba(255,184,77,.06);border-radius:14px;color:var(--text)}.security-panel strong{display:block;margin-bottom:6px}.security-panel p{margin:0;color:var(--muted);line-height:1.55;font-size:12px}.security-panel code{color:#f0c777}.mini-btn.danger{color:#ff8f8f;border-color:rgba(255,100,100,.18)}
@media(max-width:1100px){.user-session{width:100%;border-left:0;border-top:1px solid var(--border);padding:10px 0 0}.user-cards{grid-template-columns:1fr}.users-head{align-items:stretch;flex-direction:column}}
@media print{#view-usuarios{display:none!important}.user-session{display:none!important}}


/* V8 — autenticação e menu de usuário */
.auth-panel label{color:#e8eef5!important;font-weight:750}
.auth-panel label input{color:#111827;background:#fff;border-color:#d7e0ea}
.auth-panel label input::placeholder{color:#8a96a8;opacity:1}
.auth-panel label input:focus{border-color:#7fa2ff;box-shadow:0 0 0 3px rgba(102,141,255,.22)}
.auth-panel h1{color:#f8fbff}.auth-panel>p{color:#aebdcc}.auth-panel .password-hint{color:#91a4b6}.auth-security-note{color:#91a4b6}

.user-session{position:relative;padding-left:0;border-left:0;display:block}
.user-menu-trigger{display:flex;align-items:center;gap:9px;border:1px solid var(--line);background:#fff;border-radius:12px;padding:7px 9px;cursor:pointer;color:var(--text);min-width:190px;text-align:left;transition:.16s ease}
.user-menu-trigger:hover,.user-menu-trigger[aria-expanded="true"]{border-color:#cbd5e1;box-shadow:0 6px 20px rgba(17,24,39,.08)}
.user-menu-trigger .user-session-copy{flex:1;min-width:0}
.user-menu-trigger .user-session-copy strong{display:block;font-size:12px;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.user-menu-trigger .user-session-copy span{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.user-menu-chevron{font-size:17px;color:#7b8798;transition:transform .16s ease;line-height:1}
.user-menu-trigger[aria-expanded="true"] .user-menu-chevron{transform:rotate(180deg)}
.user-menu-dropdown{position:absolute;right:0;top:calc(100% + 8px);z-index:120;width:270px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:7px;box-shadow:0 18px 44px rgba(17,24,39,.16)}
.user-menu-dropdown button{width:100%;display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:center;text-align:left;border:0;background:transparent;border-radius:9px;padding:10px;cursor:pointer;color:var(--text)}
.user-menu-dropdown button:hover{background:#f5f7fb}.user-menu-dropdown button>span{font-size:16px;color:#64748b;text-align:center}
.user-menu-dropdown button div{display:grid;gap:2px}.user-menu-dropdown button strong{font-size:12px}.user-menu-dropdown button small{font-size:10px;color:var(--muted);font-weight:500}
.user-menu-divider{height:1px;background:var(--line);margin:5px 3px}.user-menu-dropdown .danger-menu strong,.user-menu-dropdown .danger-menu>span{color:#c93f3f}
@media(max-width:1100px){.user-session{width:auto;border-top:0;padding:0}.user-menu-dropdown{right:0}.user-menu-trigger{min-width:175px}}
@media(max-width:780px){.user-session{width:100%}.user-menu-trigger{width:100%}.user-menu-dropdown{left:0;right:0;width:auto}.top-actions .user-session{flex:1 1 100%}}
/* V12 • autenticação Supabase */
.auth-link-button{border:0;background:transparent;color:#73dfa0;font-weight:700;font-size:12px;cursor:pointer;padding:4px 6px 0;justify-self:center}
.auth-link-button:hover{text-decoration:underline}
