
:root{--bg:#f5f7fb;--card:#fff;--text:#172033;--muted:#6b7280;--line:#e5e7eb;--primary:#234d7d;--primary2:#2e6ca8;--danger:#b42318;--success:#067647;--shadow:0 8px 24px rgba(16,24,40,.06)}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}.app-shell{min-height:100vh;display:grid;grid-template-columns:250px 1fr}.sidebar{background:#14283d;color:#eef5fb;padding:24px 18px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;padding:0 8px 24px;min-height:54px}.brand-mark{width:42px;height:42px;min-width:42px;border-radius:12px;background:transparent;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:none}.brand-mark img{width:42px;height:42px;max-width:42px;max-height:42px;object-fit:contain;display:block;filter:none}.brand strong{display:block;letter-spacing:.6px;font-size:14px;line-height:1.1}.brand span{font-size:12px;opacity:.65;display:block;margin-top:4px}.sidebar nav{display:grid;gap:7px}.sidebar nav a{padding:12px 13px;border-radius:10px;color:#c8d5e1;display:flex;gap:11px;align-items:center;font-weight:600;font-size:14px}.sidebar nav a:hover,.sidebar nav a.active{background:#213d58;color:#fff}.sidebar-bottom{margin-top:auto;border-top:1px solid rgba(255,255,255,.1);padding-top:18px}.user-chip{display:flex;gap:10px;align-items:center}.avatar{width:36px;height:36px;border-radius:50%;background:#d7e8f7;color:#17324c;display:grid;place-items:center;font-weight:700}.user-chip strong{display:block;font-size:13px}.user-chip span{font-size:11px;opacity:.65}.logout{display:block;margin-top:14px;color:#dbe7f0;font-size:13px}.content{padding:30px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.eyebrow{text-transform:uppercase;font-size:11px;color:#7a8494;letter-spacing:1.2px;font-weight:700}.topbar h1{margin:3px 0 0;font-size:25px}.grid{display:grid;gap:18px}.kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:22px}.card{background:var(--card);border:1px solid #e8ebef;border-radius:15px;box-shadow:var(--shadow)}.kpi{padding:20px}.kpi .label{font-size:12px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.6px}.kpi .value{font-size:30px;font-weight:800;margin-top:8px}.kpi .hint{font-size:12px;color:var(--muted);margin-top:5px}.panel{padding:20px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px}.panel-head h2{font-size:17px;margin:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:9px;padding:10px 14px;font-weight:700;font-size:13px;cursor:pointer}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:#183f69}.btn-light{background:#f1f4f7;color:#314156}.btn-danger{background:#fff0ee;color:var(--danger)}.btn-sm{padding:7px 10px;font-size:12px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:15px}.toolbar input,.toolbar select{height:40px;border:1px solid #d8dee7;border-radius:9px;padding:0 11px;background:#fff;min-width:150px}.toolbar .grow{flex:1;min-width:220px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}.table{width:100%;border-collapse:collapse;background:#fff;min-width:820px}.table th{background:#f8fafc;text-align:left;padding:12px 13px;font-size:11px;text-transform:uppercase;letter-spacing:.55px;color:#657084;border-bottom:1px solid var(--line)}.table td{padding:12px 13px;border-bottom:1px solid #edf0f3;font-size:13px;vertical-align:middle}.table tr:last-child td{border-bottom:0}.table tr:hover td{background:#fbfcfe}.actions{display:flex;gap:6px}.badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eef5fb;color:#285d8a;font-size:12px;font-weight:700}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field label{display:block;font-size:12px;font-weight:700;color:#526174;margin-bottom:7px}.field input,.field select{width:100%;height:44px;border:1px solid #d7dee7;border-radius:9px;padding:0 12px;font-size:14px;background:#fff}.field input:focus,.field select:focus{outline:0;border-color:#6a9bc5;box-shadow:0 0 0 3px rgba(46,108,168,.12)}.field.full{grid-column:1/-1}.form-actions{margin-top:20px;display:flex;gap:10px}.alert{padding:12px 14px;border-radius:10px;margin-bottom:16px;font-size:13px}.alert.success{background:#ecfdf3;color:#067647;border:1px solid #abefc6}.alert.error{background:#fef3f2;color:#b42318;border:1px solid #fecdca}.empty{padding:38px;text-align:center;color:var(--muted)}.pagination{display:flex;gap:6px;justify-content:flex-end;margin-top:15px;flex-wrap:wrap}.pagination a,.pagination span{min-width:34px;height:34px;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;background:#fff;font-size:12px}.pagination .current{background:var(--primary);color:#fff;border-color:var(--primary)}.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top right,#dbeaf7,transparent 35%),linear-gradient(135deg,#eef4f9,#f8fafc)}.login-card{width:min(430px,92vw);background:#fff;border:1px solid #e4e9ef;border-radius:20px;padding:34px;box-shadow:0 20px 60px rgba(22,46,69,.12)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.login-brand .brand-mark{width:54px;height:54px;min-width:54px;border-radius:14px}.login-brand .brand-mark img{width:54px;height:54px;max-width:54px;max-height:54px}.login-card h1{font-size:23px;margin:0}.login-card p{color:var(--muted);font-size:13px;margin:5px 0 0}.login-card .field{margin-bottom:14px}.login-card .btn{width:100%;height:44px;margin-top:8px}.login-foot{text-align:center;font-size:11px;color:#98a2b3;margin-top:18px}.two-col{grid-template-columns:1.35fr .65fr}.list-clean{list-style:none;margin:0;padding:0}.list-clean li{display:flex;justify-content:space-between;gap:15px;padding:11px 0;border-bottom:1px solid #edf0f3;font-size:13px}.list-clean li:last-child{border-bottom:0}.muted{color:var(--muted)}.danger-text{color:var(--danger)}
@media(max-width:980px){.app-shell{grid-template-columns:78px 1fr}.sidebar{padding:20px 12px}.brand{justify-content:center}.brand>div:not(.brand-mark),.sidebar nav a{font-size:0}.sidebar nav a span{font-size:17px}.sidebar nav a{justify-content:center}.user-chip>div:not(.avatar),.logout{display:none}.kpis{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.app-shell{display:block}.sidebar{position:relative;height:auto;display:block;padding:12px}.brand{padding:0 5px 12px;justify-content:flex-start}.sidebar nav{grid-template-columns:repeat(3,1fr)}.sidebar nav a{font-size:11px;justify-content:center}.sidebar nav a span{font-size:14px}.sidebar-bottom{display:none}.content{padding:18px}.kpis,.two-col,.form-grid{grid-template-columns:1fr}.toolbar{display:grid}.toolbar input,.toolbar select{width:100%}.topbar h1{font-size:22px}}
/* Instalador em etapa única */
.install-card{width:min(690px,94vw);padding:32px 34px}.installer-page{padding:28px 0}.install-section{padding:2px 0}.install-section-title{display:flex;align-items:center;gap:12px;margin-bottom:18px}.install-section-title strong{display:block;font-size:15px;color:#26364a}.install-section-title small{display:block;margin-top:3px;color:#7a8494;font-size:11px;font-weight:500}.step-number{width:30px;height:30px;border-radius:9px;background:#edf4fa;color:#234d7d;display:grid;place-items:center;font-weight:800;font-size:13px;flex:0 0 auto}.install-grid{grid-template-columns:1.5fr .5fr}.install-grid .field:nth-child(3),.install-grid .field:nth-child(4){grid-column:auto}.install-divider{height:1px;background:#e8edf2;margin:24px 0}.install-note{margin-top:13px;padding:10px 12px;border-radius:9px;background:#f7f9fb;color:#687588;font-size:11px;line-height:1.45}.password-wrap{position:relative}.password-wrap input{padding-right:74px}.password-toggle{position:absolute;right:7px;top:6px;height:32px;border:0;border-radius:7px;background:#eef3f7;color:#42546a;font-size:11px;font-weight:700;cursor:pointer;padding:0 10px}.install-submit{height:48px!important;margin-top:26px!important;font-size:14px!important}.install-summary{display:grid;gap:8px;margin:18px 0}.install-check{display:flex;align-items:center;gap:9px;padding:9px 11px;border:1px solid #e5ece9;border-radius:9px;background:#fbfefc;font-size:12px;color:#344054}.install-check span{width:20px;height:20px;border-radius:50%;background:#ecfdf3;color:#067647;display:grid;place-items:center;font-weight:900}.install-login-btn{width:100%;height:46px;margin-top:8px}.field-port{max-width:150px}
@media(max-width:700px){.install-card{padding:24px 20px}.install-grid{grid-template-columns:1fr}.field-port{max-width:none}.install-section-title small{line-height:1.4}}


/* Dashboard moderno e executivo */
.dashboard-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding:26px 28px;margin-bottom:20px;background:linear-gradient(135deg,#ffffff 0%,#f7fbff 100%);border:1px solid #e7eef5}
.hero-kicker{text-transform:uppercase;font-size:11px;letter-spacing:1px;font-weight:800;color:#5e7793;margin-bottom:10px}.dashboard-hero h2{margin:0 0 8px;font-size:30px;line-height:1.05}.dashboard-hero p{margin:0;color:#5f6e82;max-width:760px;line-height:1.55}.hero-meta{background:#f7fafd;border:1px solid #e5edf5;border-radius:16px;padding:18px 20px;min-width:250px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}.hero-date-label{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:#6f8096;font-weight:800;margin-bottom:8px}.hero-meta strong{display:block;font-size:16px;color:#17324c}.hero-meta span{display:block;margin-top:6px;font-size:12px;color:#748397}
.dashboard-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:20px}.stat-card{padding:18px 18px 16px;display:flex;gap:14px;align-items:flex-start;position:relative;overflow:hidden}.stat-card::after{content:"";position:absolute;right:-18px;top:-18px;width:88px;height:88px;border-radius:24px;opacity:.1;background:currentColor}.stat-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;font-size:24px;flex:0 0 auto;background:#eef4fb}.stat-content .label{font-size:12px;color:#607186;font-weight:800;text-transform:uppercase;letter-spacing:.8px}.stat-content .value{font-size:42px;font-weight:900;line-height:1;margin:8px 0 6px}.stat-content .hint{font-size:12px;color:#6d7b8d}.accent-blue{color:#2083d8}.accent-blue .stat-icon{background:#eaf5ff}.accent-purple{color:#7c5bff}.accent-purple .stat-icon{background:#f2edff}.accent-green{color:#20a870}.accent-green .stat-icon{background:#ebfbf4}.accent-orange{color:#f08a24}.accent-orange .stat-icon{background:#fff3e8}
.dashboard-main-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.8fr);gap:18px;margin-bottom:18px}.dashboard-side-stack{display:grid;gap:18px}.panel-chart{padding-bottom:18px}.compact-panel{padding-bottom:16px}.month-chart{height:255px;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;align-items:end;padding:12px 4px 0;border-top:1px solid #eef2f6;margin-top:14px}.month-col{display:flex;flex-direction:column;align-items:center;gap:8px;height:100%}.month-value{font-size:12px;font-weight:800;color:#607186;min-height:18px}.month-bar-wrap{height:180px;width:100%;display:flex;align-items:flex-end;justify-content:center}.month-bar{width:min(34px,100%);border-radius:12px 12px 4px 4px;background:linear-gradient(180deg,#46a3ff 0%, #1d7dd8 100%);box-shadow:0 10px 18px rgba(29,125,216,.18)}.month-label{font-size:12px;color:#607186;font-weight:700}
.rank-list{display:grid;gap:14px;margin-top:6px}.rank-item{display:grid;gap:8px}.rank-row{display:flex;justify-content:space-between;gap:12px;align-items:center}.rank-name{font-size:13px;font-weight:700;color:#1d2f45}.rank-row strong{font-size:13px;color:#17324c}.rank-bar{height:10px;border-radius:999px;background:#edf2f7;overflow:hidden}.rank-bar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#62b3ff 0%,#2181dc 100%)}.rank-bar.folder span{background:linear-gradient(90deg,#7ad4a6 0%,#23a866 100%)}
.latest-panel{padding-bottom:18px}.panel-head-mobile{align-items:flex-start}.panel-actions-inline{display:flex;gap:8px;flex-wrap:wrap}.table td:first-child,.table th:first-child{width:70px}.badge{min-width:36px;justify-content:center}
@media(max-width:1180px){.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-main-grid{grid-template-columns:1fr}.hero-meta{min-width:220px}}
@media(max-width:760px){.dashboard-hero{padding:20px;display:grid}.dashboard-hero h2{font-size:24px}.hero-meta{min-width:0}.dashboard-stats{grid-template-columns:1fr}.month-chart{gap:8px;overflow-x:auto;padding-bottom:8px}.month-chart::-webkit-scrollbar{height:8px}.month-chart::-webkit-scrollbar-thumb{background:#c8d5e3;border-radius:999px}.month-col{min-width:40px}.panel-actions-inline{width:100%}.panel-actions-inline .btn{flex:1}}

/* Dashboard moderno e executivo */
.executive-hero{background:linear-gradient(135deg,#ffffff 0%,#f6fbff 50%,#eff7ff 100%)}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.hero-meta-wrap{display:grid;gap:12px;min-width:280px}.hero-meta.mini{min-width:0}.trend.positive{color:#0f9b57}.trend.negative{color:#d92d20}.trend.neutral{color:#5d6b7f}
.executive-highlights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:20px}.highlight-card{padding:18px 20px;border:1px solid #e8eef5;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)}.highlight-label{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.8px;color:#68798e}.highlight-value{font-size:34px;font-weight:900;line-height:1.1;margin-top:8px;color:#17324c}.highlight-title{font-size:20px;font-weight:800;line-height:1.2;margin-top:8px;color:#17324c}.highlight-foot{margin-top:8px;font-size:12px;color:#708095}.panel-tag{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:#eef5fb;color:#285d8a;font-size:12px;font-weight:800}
@media(max-width:980px){.executive-highlights{grid-template-columns:1fr}.hero-meta-wrap{min-width:0}}
@media(max-width:760px){.hero-actions .btn{flex:1}.executive-highlights{grid-template-columns:1fr}}
