/* Copyright (c) 2026 Jefferson Tavares — JTS Enterprise. Use governed by LICENSE.txt. */
:root{--navy:#123b5d;--navy-2:#0b2941;--blue:#2563eb;--bg:#f4f7fb;--panel:#fff;--text:#172033;--muted:#64748b;--line:#dbe3ec;--success:#16794d;--success-bg:#e8f7ef;--warning:#a26100;--warning-bg:#fff4d6;--danger:#b42318;--danger-bg:#feeceb;--shadow:0 8px 25px rgba(15,39,64,.07)}
*{box-sizing:border-box}html{font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--text);background:var(--bg)}body{margin:0;font-size:14px}a{color:#145da0;text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}.topbar{height:68px;background:var(--navy-2);color:#fff;display:flex;align-items:center;padding:0 24px;position:sticky;top:0;z-index:30;box-shadow:0 2px 12px rgba(0,0,0,.15)}.brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none}.brand:hover{text-decoration:none}.brand-mark{width:40px;height:40px;border-radius:10px;background:#fff;color:var(--navy);display:grid;place-items:center;font-weight:800;letter-spacing:.5px}.brand strong{display:block;font-size:16px}.brand small{display:block;color:#cbd5e1;font-size:11px;margin-top:3px}.user-area{margin-left:auto;display:flex;align-items:center;gap:16px}.user-area form{margin:0}.link-button{border:0;background:transparent;color:#fff;cursor:pointer;padding:0}.menu-button{display:none;background:transparent;border:0;color:#fff;font-size:22px;margin-right:8px}.app-shell{display:flex;min-height:calc(100vh - 68px)}.sidebar{width:245px;background:#fff;border-right:1px solid var(--line);padding:18px 12px;flex-shrink:0}.sidebar nav{position:sticky;top:86px}.sidebar a{display:block;padding:10px 12px;border-radius:8px;color:#334155;margin:2px 0;font-weight:550}.sidebar a:hover,.sidebar a.active{background:#eaf2f8;color:var(--navy);text-decoration:none}.nav-label{display:block;color:#94a3b8;text-transform:uppercase;font-size:10px;font-weight:800;letter-spacing:.09em;margin:18px 12px 6px}.content{flex:1;min-width:0;padding:28px;max-width:1800px}.page-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}.page-heading h1{margin:0 0 6px;font-size:27px;letter-spacing:-.02em}.page-heading p{margin:0;color:var(--muted)}.eyebrow{text-transform:uppercase;font-size:11px;color:var(--muted);font-weight:800;letter-spacing:.09em}.button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 14px;border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:8px;cursor:pointer;font-weight:650;text-decoration:none}.button:hover{text-decoration:none;background:#f8fafc}.button.primary{background:var(--navy);border-color:var(--navy);color:#fff}.button.danger{background:var(--danger);border-color:var(--danger);color:#fff}.button:disabled{opacity:.5;cursor:not-allowed}.button.full{width:100%}.button-group{display:flex;gap:8px;flex-wrap:wrap}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:18px;margin-bottom:20px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px}.panel-heading h2,.panel h2{margin:0;font-size:17px}.kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:14px;margin-bottom:20px}.kpi-grid.compact{grid-template-columns:repeat(6,1fr)}.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow);min-width:0}.kpi span{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}.kpi strong{display:block;font-size:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi.warning{border-left:4px solid #d38b10}.kpi.danger{border-left:4px solid #d92d20}.kpi.success{border-left:4px solid #209c66}.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.status-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.status-card{padding:14px;border-radius:10px;background:#f1f5f9}.status-card span{display:block;color:var(--muted)}.status-card strong{display:block;font-size:25px;margin-top:5px}.status-card.success{background:var(--success-bg)}.status-card.warning{background:var(--warning-bg)}.status-card.danger{background:var(--danger-bg)}.bar-list{display:grid;gap:10px}.bar-row>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:12px}.bar-track{height:8px;background:#e8edf3;border-radius:99px;overflow:hidden;margin-top:5px}.bar-track span{display:block;height:100%;background:var(--navy);border-radius:99px}.table-wrap{overflow:auto}.panel.table-wrap{padding:0}table{width:100%;border-collapse:collapse;min-width:800px}th,td{text-align:left;padding:11px 12px;border-bottom:1px solid #e7edf3;vertical-align:top}th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#64748b;background:#f8fafc;position:sticky;top:0}td small{display:block;color:var(--muted);margin-top:4px}tbody tr:hover{background:#fafcff}.subrow{background:#f8fafc;color:#475569}.actions{white-space:nowrap}.actions a{margin-right:9px}.danger-link{color:var(--danger)}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2f6;color:#475569;font-size:11px;font-weight:750;white-space:nowrap}.badge.success{background:var(--success-bg);color:var(--success)}.badge.warning{background:var(--warning-bg);color:var(--warning)}.badge.danger{background:var(--danger-bg);color:var(--danger)}.toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px;align-items:center}.search-form{display:flex;gap:8px;flex:1;max-width:760px}.search-form input,.search-form select{height:40px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:8px 10px;min-width:160px}.search-form input{flex:1}.form-panel{max-width:1100px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-field{display:flex;flex-direction:column;gap:6px}.form-field label{font-weight:650}.form-field small{color:var(--muted)}.form-field textarea{min-height:90px;resize:vertical}.form-control,.login-card input{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:9px 10px;background:#fff;min-height:40px}.checkbox-field{display:block}.checkbox-input{margin-right:8px}.required,.field-error{color:var(--danger)}.field-error{font-size:12px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}.detail-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:20px}.detail-summary>div{background:#fff;border:1px solid var(--line);border-radius:10px;padding:13px}.detail-summary span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.detail-summary strong{font-size:15px}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px;margin:0}.detail-grid div{padding-bottom:9px;border-bottom:1px solid #edf1f5}.detail-grid dt{color:var(--muted);font-size:11px;text-transform:uppercase}.detail-grid dd{margin:5px 0 0}.note{background:#f1f5f9;border-left:4px solid var(--navy);padding:12px 14px;border-radius:6px}.two-column{display:grid;grid-template-columns:1fr 1fr;gap:20px}.record-list{list-style:none;padding:0;margin:0}.record-list li{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.record-list span{display:block;color:var(--muted);margin-top:3px}.document-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.document-grid article{border:1px solid var(--line);border-radius:9px;padding:12px;display:flex;align-items:flex-start;gap:11px}.document-grid article>div{flex:1}.document-grid small,.document-grid a{display:block;margin-top:4px}.file-icon{width:34px;height:34px;display:grid;place-items:center;background:#eaf2f8;color:var(--navy);border-radius:8px}.timeline>div{display:flex;gap:10px;margin:9px 0}.timeline-dot{width:9px;height:9px;border-radius:50%;background:var(--navy);margin-top:5px;flex:0 0 auto}.timeline p{margin:0}.timeline small{display:block;color:var(--muted);margin-top:3px}.empty{padding:20px!important;text-align:center;color:var(--muted)}.muted{color:var(--muted)}.pagination{display:flex;justify-content:space-between;align-items:center;margin:14px 0}.pagination a{display:inline-block;padding:7px 11px;border:1px solid var(--line);border-radius:7px;margin-left:5px;background:#fff}.messages{margin-bottom:16px}.message{padding:11px 14px;border-radius:8px;background:#edf4fb;border:1px solid #c9deef;transition:opacity .4s}.message.success{background:var(--success-bg);border-color:#b9e2ca}.message.error{background:var(--danger-bg);border-color:#f6c3be}.message.warning{background:var(--warning-bg);border-color:#efd797}.message.fade{opacity:.45}.narrow-panel{max-width:720px;margin-left:auto;margin-right:auto}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,var(--navy-2),var(--navy))}.login-card{width:min(430px,calc(100% - 32px));background:#fff;padding:30px;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.25)}.login-brand{display:flex;align-items:center;gap:14px}.login-brand h1{margin:0;font-size:23px}.login-brand p{margin:4px 0 0;color:var(--muted)}.stack-form{display:grid;gap:9px;margin-top:20px}.stack-form button{margin-top:10px}.steps{padding-left:20px;line-height:1.8}.import-layout{align-items:start}.issue-list{display:grid;gap:8px}.issue{display:flex;gap:10px;padding:9px 11px;border-radius:7px;background:#f8fafc}.issue.erro{background:var(--danger-bg)}.issue.alerta{background:var(--warning-bg)}.confirmation-bar{position:sticky;bottom:0;background:rgba(244,247,251,.95);backdrop-filter:blur(8px);display:flex;justify-content:flex-end;gap:10px;padding:14px 0}.result-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.result-list div{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:8px}.result-list dt{font-weight:650}.result-list dd{margin:0}.help-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.help-grid .panel{margin:0}.help-grid p{line-height:1.55;color:#475569}
@media(max-width:1300px){.kpi-grid{grid-template-columns:repeat(3,1fr)}.detail-summary{grid-template-columns:repeat(3,1fr)}.help-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.menu-button{display:block}.sidebar{position:fixed;left:-260px;top:68px;bottom:0;z-index:25;transition:left .2s;box-shadow:10px 0 30px rgba(0,0,0,.12)}.sidebar.open{left:0}.content{padding:18px}.dashboard-grid,.two-column{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.document-grid{grid-template-columns:1fr}.user-area>span{display:none}.help-grid{grid-template-columns:1fr}.page-heading{align-items:flex-start}}
@media(max-width:650px){.kpi-grid,.kpi-grid.compact,.detail-summary{grid-template-columns:repeat(2,1fr)}.toolbar,.search-form{flex-direction:column;align-items:stretch}.search-form{max-width:none}.page-heading{flex-direction:column}.topbar{padding:0 12px}.brand small{display:none}.content{padding:14px}.status-grid{grid-template-columns:1fr}}

/* Identidade visual configurável da plataforma */
:root {
  --navy: #0b4a6f;
  --navy-2: #082f49;
  --blue: #14638d;
  --gold: #f2b51d;
  --gold-dark: #bd7d00;
  --bg: #f2f6f8;
  --line: #d6e1e7;
  --shadow: 0 12px 32px rgba(8, 47, 73, .08);
}

body:not(.login-page) {
  background:
    radial-gradient(circle at 100% 0, rgba(242, 181, 29, .08), transparent 25rem),
    var(--bg);
}

.topbar {
  background: linear-gradient(110deg, #061f33, var(--navy-2) 58%, #0b4a6f);
  border-bottom: 3px solid var(--gold);
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 0 1px rgba(255, 249, 230, .92))
    drop-shadow(0 0 3px rgba(242, 181, 29, .42))
    drop-shadow(0 3px 6px rgba(0, 0, 0, .28));
}

.brand strong { letter-spacing: .01em; }
.brand small { color: #c9dce7; }
.sidebar { border-right-color: #cbd9e1; }
.sidebar a { border-left: 3px solid transparent; }
.sidebar a:hover,
.sidebar a.active {
  background: linear-gradient(90deg, #e6f1f6, #f4f8fa);
  border-left-color: var(--gold);
  color: var(--navy-2);
}

.page-heading h1 { color: var(--navy-2); }
.panel,
.kpi,
.detail-summary > div { border-top-color: rgba(11, 74, 111, .25); }
.button.primary {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  border-color: var(--navy-2);
  box-shadow: 0 7px 16px rgba(8, 47, 73, .14);
}
.button.primary:hover {
  background: linear-gradient(135deg, #12628f, #07304a);
}

.login-page {
  display: block;
  min-height: 100vh;
  color: #f8fafc;
  background:
    radial-gradient(circle at 12% 15%, rgba(242, 181, 29, .16), transparent 24rem),
    radial-gradient(circle at 88% 80%, rgba(30, 105, 143, .34), transparent 28rem),
    linear-gradient(135deg, #041725, #082f49 46%, #0b4a6f);
  overflow-x: hidden;
}

.login-page::before,
.login-page::after {
  content: "";
  position: fixed;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
  pointer-events: none;
}
.login-page::before {
  width: min(52vw, 620px);
  height: min(52vw, 620px);
  left: max(-9vw, -130px);
  bottom: max(-12vw, -180px);
  border: 0;
  border-radius: 0;
  background: var(--brand-watermark) center / contain no-repeat;
  opacity: .065;
  filter: grayscale(.2);
}
.login-page::after { width: 32rem; height: 32rem; right: -17rem; top: -20rem; }

.login-shell {
  width: min(1080px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: center;
  gap: clamp(40px, 7vw, 90px);
}

.login-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.login-logo {
  width: min(440px, 82%);
  max-height: 220px;
  object-fit: contain;
  margin: 0 0 8px -8px;
  filter:
    drop-shadow(0 0 1px rgba(255, 249, 230, .9))
    drop-shadow(0 0 7px rgba(242, 181, 29, .34))
    drop-shadow(0 22px 30px rgba(0, 0, 0, .28));
}
.login-logo-placeholder {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  color: #fff;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 38px;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: .08em;
  background: rgba(255,255,255,.08);
  box-shadow: 0 22px 30px rgba(0,0,0,.2);
}
.login-identity p.login-tagline {
  width: min(440px, 82%);
  max-width: 440px;
  margin: 0 0 27px -8px;
  color: #f6d16a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 1.65vw, 20px);
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .01em;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .3);
}
.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffd769;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.login-kicker::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 4px;
  background: var(--gold);
}
.login-identity h1 {
  max-width: 620px;
  margin: 12px 0 12px;
  color: #fff;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.login-identity p {
  max-width: 570px;
  margin: 0;
  color: #c9dce7;
  font-size: 16px;
  line-height: 1.6;
}
.login-identity-copy {
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: rgba(2, 17, 29, .38);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .18);
  backdrop-filter: blur(8px);
}

.login-panel {
  color: var(--text);
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 42px);
  box-shadow: 0 28px 75px rgba(0, 0, 0, .3);
  backdrop-filter: blur(18px);
}
.login-panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.login-lock {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--navy-2);
  background: #fff3ca;
  border: 1px solid #f3d66b;
  border-radius: 13px;
  font-weight: 900;
}
.login-panel h2 { margin: 0; color: var(--navy-2); font-size: 24px; }
.login-panel-heading p { margin: 4px 0 0; color: var(--muted); }
.login-panel .stack-form { margin-top: 0; gap: 10px; }
.login-panel label { color: #243746; font-weight: 700; }
.login-panel input {
  min-height: 48px;
  border: 1px solid #bdccd5;
  border-radius: 11px;
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.login-panel input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(20, 99, 141, .13);
}
.login-panel .button { min-height: 49px; margin-top: 12px; border-radius: 11px; }
.login-support { margin: 20px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.login-footer { position: fixed; left: 20px; right: 20px; bottom: 12px; color: #b9ceda; font-size: 11px; text-align: center; }
.system-footer { margin-top: 32px; padding: 18px 0 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 850px) {
  .login-shell {
    width: min(540px, calc(100% - 28px));
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0;
  }
  .login-identity { align-items: center; text-align: center; }
  .login-logo { width: min(230px, 64vw); margin: 0 0 8px; }
  .login-identity p.login-tagline { width: min(360px, 88vw); margin: 0 0 22px; }
  .login-kicker::before { display: none; }
  .login-identity h1 { font-size: clamp(34px, 10vw, 48px); }
  .login-identity p { font-size: 14px; }
}

@media (max-width: 520px) {
  .login-shell { width: min(100% - 20px, 430px); padding: 22px 0; }
  .login-logo { width: 170px; }
  .login-identity p.login-tagline { max-width: 300px; font-size: 15px; }
  .login-identity h1 { font-size: 34px; }
  .login-identity p { display: none; }
  .login-panel { padding: 25px 21px; border-radius: 18px; }
  .brand-logo { width: 40px; height: 40px; }
}

/* Módulo de relatórios */
.report-filters { max-width: none; }
.report-filter-grid { grid-template-columns: repeat(6, minmax(140px, 1fr)); }
.report-block-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.report-block { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.report-block h3 { margin: 5px 0; font-size: 16px; }
.report-block p { margin: 0; color: var(--muted); }
.report-chart { display: grid; gap: 8px; }
.report-chart-row { display: grid; grid-template-columns: 32px minmax(80px, 1fr) 125px 95px; gap: 9px; align-items: center; font-size: 11px; }
.report-chart-row .bar-track { margin: 0; }
.report-chart-row .bar-track i { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--navy), var(--blue)); border-radius: 99px; }
.report-chart-row strong, .report-chart-row small { text-align: right; }
.report-chart-row small { color: var(--muted); }
.management-indicator-panel { overflow: hidden; }
.trend-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.trend-summary > div { padding: 11px 13px; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 9px; background: #f8fafc; }
.trend-summary > div.warning { border-left-color: #d38b10; }
.trend-summary > div.danger { border-left-color: var(--danger); }
.trend-summary > div.success { border-left-color: var(--success); }
.trend-summary span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.trend-summary strong { font-size: 17px; }
.trend-chart-wrap { width: 100%; overflow: hidden; }
.execution-trend-chart { display: block; width: 100%; height: auto; min-height: 250px; }
.execution-trend-chart text { fill: var(--muted); font-size: 11px; }
.trend-grid-line,.trend-axis-line { stroke: #dfe7ed; stroke-width: 1; }
.trend-axis-line { stroke: #aab8c3; }
.trend-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-line.ideal { stroke: #64748b; stroke-dasharray: 8 7; }
.trend-line.committed { stroke: #d49a24; }
.trend-line.liquidated { stroke: #5791d6; }
.trend-point { stroke: #fff; stroke-width: 2; }
.trend-point.ideal { fill: #64748b; }
.trend-point.committed { fill: #d49a24; }
.trend-point.liquidated { fill: #5791d6; }
.trend-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 11px; }
.trend-legend span::before { content: ''; display: inline-block; width: 18px; height: 3px; margin: 0 6px 3px 0; border-radius: 99px; background: #64748b; }
.trend-legend .committed::before { background: #d49a24; }
.trend-legend .liquidated::before { background: #5791d6; }
.indicator-method { margin: 10px 0 0; font-size: 11px; }
.geo-heatmap-layout { display: grid; grid-template-columns: minmax(420px,1fr) 210px; align-items: center; gap: 20px; }
.geo-heatmap { position: relative; width: min(780px,100%); aspect-ratio: 1.55; margin: 0 auto; overflow: hidden; border-radius: 14px; background: linear-gradient(145deg,#eef6fa,#e2eef3); }
.geo-brazil-shape { position: absolute; inset: 5% 11% 4% 9%; background: #d5e4dc; clip-path: polygon(18% 2%,34% 8%,47% 3%,61% 11%,72% 8%,89% 21%,96% 38%,87% 48%,83% 62%,70% 69%,65% 83%,52% 98%,43% 85%,34% 75%,25% 66%,14% 57%,7% 43%,2% 27%,10% 16%); box-shadow: inset 0 0 0 1px rgba(23,107,97,.16); }
.geo-marker { position: absolute; z-index: 2; width: var(--marker-size); height: var(--marker-size); transform: translate(-50%,-50%); display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #12304a; background: #74c69d; box-shadow: 0 3px 9px rgba(8,47,73,.24); font-size: 8px; font-weight: 800; text-align: center; }
.geo-marker:hover { z-index: 4; transform: translate(-50%,-50%) scale(1.12); text-decoration: none; }
.geo-marker.attention { background: #f2cf66; }
.geo-marker.high { background: #e99a42; }
.geo-marker.critical { color: #fff; background: #d6453d; }
.geo-marker span { max-width: calc(var(--marker-size) - 5px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-heatmap-legend { display: grid; gap: 9px; }
.geo-heatmap-legend > div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.geo-heatmap-legend i { width: 13px; height: 13px; border-radius: 50%; background: #74c69d; }
.geo-heatmap-legend i.attention { background: #f2cf66; }.geo-heatmap-legend i.high { background: #e99a42; }.geo-heatmap-legend i.critical { background: #d6453d; }
.geo-heatmap-legend p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.dashboard-grid-wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.financial-funnel-panel { min-height: 0; margin-bottom: 14px; }
.dashboard-financial-secondary { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
.dashboard-period-filter { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 14px; }
.dashboard-period-copy { display: grid; gap: 3px; min-width: 210px; }
.dashboard-period-copy strong { font-size: 16px; }
.dashboard-period-copy small { max-width: 420px; color: var(--muted); font-size: 10px; }
.dashboard-period-fields { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 9px; }
.dashboard-period-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.dashboard-period-fields input, .dashboard-period-fields select { width: 145px; min-width: 0; padding: 9px 10px; }
.dashboard-period-fields .button-group { flex-wrap: wrap; }
.executive-panel { min-height: 355px; }
.financial-funnel { display: grid; gap: 15px; }
.financial-funnel-row { display: grid; grid-template-columns: 135px minmax(100px, 1fr) 145px; align-items: center; gap: 12px; }
.financial-funnel-row > span { color: var(--muted); font-size: 12px; }
.financial-funnel-row > strong { text-align: right; }
.financial-funnel-row > strong small { display:block; color:var(--muted); font-size:10px; font-weight:500; margin-top:3px; }
.financial-funnel-note { margin:12px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.financial-reading-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:14px 0 9px; padding-top:12px; border-top:1px solid var(--line); }
.financial-reading-heading h3 { margin:0; font-size:14px; }
.financial-reading-heading p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.financial-reading-heading > span { flex:none; border:1px solid var(--line); border-radius:999px; padding:4px 9px; color:var(--muted); font-size:10px; }
.financial-reading-heading-execution { margin-top:4px; }
.financial-execution-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
.financial-funnel-row .bar-track { margin: 0; height: 12px; }
.financial-funnel-row .bar-track i { display: block; height: 100%; min-width: 3px; border-radius: 99px; background: var(--navy); }
.financial-funnel-row .bar-track i.budget { background: linear-gradient(90deg,#123b59,#1e6c91); }
.financial-funnel-row .bar-track i.commitment { background: linear-gradient(90deg,#8a5b09,#d49a24); }
.financial-funnel-row .bar-track i.received { background: linear-gradient(90deg,#196c61,#2ba78f); }
.financial-funnel-row .bar-track i.liquidated { background: linear-gradient(90deg,#315f9c,#5791d6); }
.financial-funnel-row .bar-track i.paid { background: linear-gradient(90deg,#197448,#2db575); }
.financial-funnel-row .bar-track i.garage { background: linear-gradient(90deg,#70479a,#9c70c2); }
.financial-funnel-row .bar-track i.fuel { background: linear-gradient(90deg,#b76517,#df9a35); }
.financial-funnel-row .bar-track i.mobgov { background: linear-gradient(90deg,#176b85,#32a0be); }
.financial-funnel-row .bar-track i.redirect { background: linear-gradient(90deg,#53677a,#7f96a9); }
.financial-funnel-row .bar-track i.blocked { background: linear-gradient(90deg,#9a6910,#d6a12d); }
.financial-funnel-row .bar-track i.reduction { background: linear-gradient(90deg,#a13e3b,#d56b67); }
.credit-destination-panel { min-height: 0; }
.credit-destination-source { text-align:right; flex:0 0 auto; }
.credit-destination-source span { display:block; color:var(--muted); font-size:11px; }
.credit-destination-source strong { display:block; margin-top:4px; font-size:18px; }
.credit-destination-filter { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin:-2px 0 16px; }
.credit-destination-filter label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:650; }
.credit-destination-filter select, .credit-destination-filter input[type="date"] { min-width:180px; min-height:38px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); }
.credit-destination-actions-field { display:grid; gap:5px; min-width:min(270px, 100%); color:var(--muted); font-size:11px; font-weight:650; }
.budget-action-panel form > label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:650; }
.budget-action-panel form > label select, .budget-action-panel form > label input[type="date"] { min-width:190px; min-height:38px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); }
.credit-destination-help { flex:1 1 100%; color:var(--muted); font-size:11px; }
.action-picker { position:relative; min-width:min(270px, 100%); }
.action-picker-toggle { display:flex; min-width:220px; width:100%; align-items:center; justify-content:space-between; gap:18px; text-align:left; }
.action-picker-popover { position:absolute; z-index:30; top:calc(100% + 5px); left:0; width:min(390px, calc(100vw - 36px)); max-height:min(460px, 70vh); overflow:auto; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--surface, #fff); box-shadow:0 12px 32px rgba(15, 39, 58, .2); }
.action-picker-popover[hidden] { display:none; }
.action-picker-tools { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.action-picker-search { flex:1; }
.action-picker-search input { width:100%; min-height:36px; padding:7px 9px; border:1px solid var(--line); border-radius:7px; }
.action-picker-option, .action-picker-year-label { display:flex; align-items:center; gap:8px; padding:6px 8px; color:var(--text); font-size:13px; font-weight:500; cursor:pointer; }
.action-picker-option input, .action-picker-year-label input { flex:0 0 auto; margin:0; }
.action-picker-option:hover, .action-picker-year-label:hover { background:var(--surface-muted, #f3f6f8); }
.action-picker-option small, .action-picker-year-label small { color:var(--muted); font-size:11px; }
.action-picker-all { border-bottom:1px solid var(--line); font-weight:700; }
.action-picker-groups { display:grid; gap:3px; margin-top:5px; }
.action-picker-year { border-bottom:1px solid var(--line); }
.action-picker-year > summary { cursor:pointer; list-style:none; }
.action-picker-year > summary::-webkit-details-marker { display:none; }
.action-picker-year > summary::before { display:inline-block; width:16px; content:'▸'; color:var(--muted); }
.action-picker-year[open] > summary::before { content:'▾'; }
.action-picker-year-label { display:inline-flex; }
.action-picker-year-options { padding:2px 0 7px 22px; }
.action-picker-year-group[hidden], .action-picker-option[hidden] { display:none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:640px) { .action-picker { width:100%; } .action-picker-popover { width:min(390px, calc(100vw - 52px)); } }
.credit-destination-reconciliation { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.credit-destination-reconciliation summary { cursor:pointer; font-weight:700; }
.credit-destination-reconciliation .table-wrap { margin-top:10px; }
.credit-destination-funnel .financial-funnel-row > strong small { display:block; color:var(--muted); font-weight:500; font-size:11px; margin-top:2px; }
.credit-destination-funnel .financial-funnel-row.zero { opacity:.58; }
.execution-rate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.execution-rate { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.execution-rate > span { color: var(--muted); font-size: 10px; line-height: 1.25; }
.rate-ring { --ring-color: #d49a24; position: relative; flex: 0 0 54px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--ring-color) calc(var(--rate) * 1%), #dfe7ed 0); }
.rate-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.rate-ring strong { position: relative; z-index: 1; font-size: 10px; color: var(--text); }
.execution-rate.liquidated .rate-ring { --ring-color: #5791d6; }
.execution-rate.paid .rate-ring { --ring-color: #2db575; }
.executive-alerts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.executive-alerts a { border: 1px solid #efd797; background: var(--warning-bg); color: var(--text); border-radius: 10px; padding: 12px; }
.executive-alerts span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.executive-alerts strong { font-size: 16px; }
.monthly-financial-chart { display: grid; gap: 7px; }
.monthly-financial-row { display: grid; grid-template-columns: 30px minmax(100px,1fr) 125px; gap: 9px; align-items: center; }
.monthly-financial-row > span,.monthly-financial-row small { font-size: 10px; color: var(--muted); }
.monthly-financial-row small { text-align: right; }
.monthly-bars { display: grid; gap: 2px; }
.monthly-analysis-stack { display: grid; gap: 14px; align-content: start; min-width: 0; }
.monthly-analysis-stack > .panel { margin-bottom: 0; }
.monthly-payment-summary dd { font-weight: 650; }
.monthly-bars i { display: block; height: 6px; min-width: 1px; border-radius: 99px; }
.monthly-bars .commitment,.chart-legend .commitment:before { background: #d49a24; }
.monthly-bars .liquidated,.chart-legend .liquidated:before { background: #5791d6; }
.monthly-bars .paid,.chart-legend .paid:before { background: #2db575; }
.chart-legend { display: flex; justify-content: flex-end; gap: 14px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.chart-legend span:before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.operational-kpis { margin-top: 2px; }
.dashboard-subject {
  --subject-accent: var(--navy);
  position: relative;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid #cbd9e2;
  border-radius: 18px;
  background: linear-gradient(145deg, #f7fafc, #edf4f7);
  box-shadow: 0 12px 34px rgba(8, 47, 73, .07);
}
.dashboard-subject-financial { --subject-accent: #b77b13; }
.dashboard-subject-contracts { --subject-accent: #176b61; }
.dashboard-subject-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 3px 14px;
  padding: 2px 2px 13px 15px;
  position: relative;
  border-bottom: 1px solid #d8e2e8;
}
.dashboard-subject-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 13px;
  width: 4px;
  border-radius: 99px;
  background: var(--subject-accent);
}
.dashboard-subject-heading h2 { margin: 2px 0 3px; color: var(--navy-2); font-size: 20px; }
.dashboard-subject-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-subject-heading > a { flex: 0 0 auto; font-size: 12px; font-weight: 700; }
.dashboard-subject .subject-kpis { margin-bottom: 14px; }
.dashboard-subject .kpi { box-shadow: none; background: rgba(255, 255, 255, .94); }
.dashboard-subject .dashboard-grid { gap: 14px; margin-bottom: 14px; }
.dashboard-subject .dashboard-grid > .panel,
.dashboard-subject > .panel:last-child { margin-bottom: 0; }
.contract-overview { padding: 0; overflow: hidden; background: rgba(255, 255, 255, .96); }
.contract-overview-heading { margin: 0; padding: 16px 18px 13px; border-bottom: 1px solid var(--line); }
.contract-overview-heading h2 { margin-top: 2px; }
.contract-overview-heading p { margin: 4px 0 0; font-size: 11px; }
.contract-overview-metrics {
  display: grid;
  grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  padding: 11px 8px;
  background: linear-gradient(90deg, #fbfdfe, #f4f8fa);
}
.overview-metric {
  min-width: 0;
  padding: 9px 16px;
  position: relative;
  border-right: 1px solid #dfe7ec;
}
.overview-metric:last-child { border-right: 0; }
.overview-metric::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 99px;
  background: #8aa2b2;
}
.overview-metric.success::before { background: #209c66; }
.overview-metric.warning::before { background: #d38b10; }
.overview-metric.danger::before { background: #d92d20; }
.overview-metric span { display: block; margin: 5px 0 5px; color: var(--muted); font-size: 11px; }
.overview-metric strong { display: block; color: var(--navy-2); font-size: 20px; line-height: 1.15; }
.overview-metric strong a { color: inherit; }
.overview-metric small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.contract-overview-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  padding: 13px 18px 16px;
  border-top: 1px solid var(--line);
}
.contract-overview-lower h3 { margin: 0 0 8px; color: #40566a; font-size: 11px; letter-spacing: .035em; text-transform: uppercase; }
.status-grid-compact { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.status-grid-compact .status-card {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(112, 137, 154, .12);
}
.status-grid-compact .status-card span { font-size: 10px; line-height: 1.2; }
.status-grid-compact .status-card strong { flex: 0 0 auto; margin: 0; font-size: 18px; }
.operational-alert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.operational-alert {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f9fb;
}
.operational-alert:hover { background: #eef4f7; text-decoration: none; }
.operational-alert span { color: var(--muted); font-size: 10px; line-height: 1.2; }
.operational-alert strong { flex: 0 0 auto; color: var(--navy-2); font-size: 18px; }
.operational-alert.warning { border-color: #efd797; background: var(--warning-bg); }
.operational-alert.danger { border-color: #f1c0bc; background: var(--danger-bg); }
.dashboard-active-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 14px; padding: 9px 13px; border: 1px solid #b9d8e7; border-radius: 9px; color: var(--navy-2); background: #edf7fb; font-size: 12px; }
.budget-action-chart { display: grid; grid-template-columns: minmax(190px, .75fr) minmax(270px, 1.25fr); align-items: center; gap: 24px; }
.budget-action-pie { position: relative; width: min(230px, 100%); aspect-ratio: 1; margin: 4px auto; display: grid; place-items: center; border-radius: 50%; background: var(--budget-pie, #dfe7ed); box-shadow: inset 0 0 0 1px rgba(13,54,83,.06); }
.budget-action-pie::before { content: ''; position: absolute; inset: 24%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.budget-action-pie > div { position: relative; z-index: 1; width: 48%; text-align: center; }
.budget-action-pie small { display: block; color: var(--muted); font-size: 10px; }
.budget-action-pie strong { display: block; margin-top: 4px; font-size: 13px; line-height: 1.2; }
.budget-action-legend { display: grid; gap: 4px; }
.budget-action-legend-row { display: grid; grid-template-columns: 10px minmax(70px, .55fr) minmax(190px, 1.7fr) 54px; align-items: center; gap: 9px; padding: 8px; border: 1px solid transparent; border-bottom-color: #edf1f5; border-radius: 8px; color: var(--text); font-size: 11px; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
a.budget-action-legend-row:hover { border-color: #b9d8e7; background: #f0f8fb; text-decoration: none; transform: translateX(2px); }
.budget-action-legend-row.selected { border-color: #77b4cf; background: #e7f4fa; box-shadow: inset 3px 0 0 var(--navy-2); }
.budget-action-legend-row small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; }
.budget-action-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--slice-color); }
.budget-action-comparison > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.budget-action-comparison span { color: var(--muted); font-size: 9px; }
.budget-action-comparison span strong { margin-left: 3px; color: var(--text); font-size: 10px; }
.budget-action-progress { height: 6px; margin: 4px 0 2px; overflow: hidden; border-radius: 999px; background: #dfe7ed; }
.budget-action-progress i { display: block; height: 100%; border-radius: inherit; background: #d39a28; }
.budget-action-progress.danger i { background: var(--danger); }
.budget-action-execution { text-align: right; color: var(--navy-2); }
.form-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section:first-of-type { margin-top: 8px; padding-top: 0; border-top: 0; }
.commitment-exceptional-origin,.commitment-contract-change { margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.commitment-exceptional-origin summary,.commitment-contract-change summary { padding: 11px 13px; color: var(--navy); cursor: pointer; font-weight: 700; }
.commitment-exceptional-origin[open] summary,.commitment-contract-change[open] summary { border-bottom: 1px solid var(--line); }
.commitment-exceptional-origin > p,.commitment-exceptional-origin > .form-grid,.commitment-contract-change > .form-field { margin: 12px 13px; }
.commitment-complement-choice { padding: 12px; border: 1px solid #c9deef; border-radius: 9px; background: #f2f8fc; }
.commitment-credit-allocation { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.commitment-credit-allocation h3 { margin: 0; font-size: 15px; }
.paai-form { max-width: 1250px; }
.paai-block-control { padding: 12px 14px; border: 1px solid #efd797; border-radius: 9px; background: var(--warning-bg); }
.paai-block-control label { display: flex; align-items: center; gap: 8px; }
.process-filter { max-width: none; flex-wrap: wrap; }
.process-filter input { min-width: 250px; }
.occurrence-summary { margin: 0 0 12px; }
.occurrence-timeline { display: grid; gap: 12px; margin-bottom: 12px; padding-left: 18px; border-left: 3px solid #cfdae3; }
.occurrence-action { position: relative; margin: 0; background: #f8fafc; }
.occurrence-action::before { content: ''; position: absolute; left: -27px; top: 22px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px #b9c8d4; }
.bar-row strong small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.item-distribution .bar-track span { background: linear-gradient(90deg, #b77b13, #e0ac3f); }
@media (max-width: 1300px) {
  .report-filter-grid { grid-template-columns: repeat(3, 1fr); }
  .report-block-grid { grid-template-columns: repeat(2, 1fr); }
  .contract-overview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-metric { border-right: 0; border-bottom: 1px solid #dfe7ec; }
  .contract-overview-lower { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .contract-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .report-filter-grid, .report-block-grid { grid-template-columns: 1fr; }
  .report-chart-row { grid-template-columns: 28px 1fr 105px; }
  .report-chart-row small { display: none; }
  .dashboard-grid-wide { grid-template-columns: 1fr; }
  .dashboard-period-filter, .dashboard-period-fields { align-items: stretch; }
  .dashboard-period-filter { flex-direction: column; }
  .dashboard-period-fields { display: grid; grid-template-columns: 1fr; width: 100%; }
  .dashboard-period-fields input { width: 100%; }
  .execution-rate-grid { grid-template-columns: 1fr; }
  .financial-funnel-row { grid-template-columns: 105px minmax(70px, 1fr) 105px; }
  .budget-action-chart { grid-template-columns: 1fr; }
  .budget-action-pie { width: min(210px, 72vw); }
  .dashboard-active-filter { align-items: flex-start; flex-direction: column; }
  .budget-action-legend-row { grid-template-columns: 10px minmax(65px, .55fr) minmax(150px, 1.45fr) 48px; }
  .dashboard-subject { padding: 10px; border-radius: 14px; }
  .dashboard-subject-heading { align-items: flex-start; flex-direction: column; }
  .contract-overview-metrics { grid-template-columns: 1fr; }
  .status-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operational-alert-grid { grid-template-columns: 1fr; }
  .contract-overview-lower { padding: 12px; }
}

/* Agrupamento visual da execução contratual */
.nav-group { margin: 2px 0; }
.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  color: #334155;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "›"; font-size: 18px; transition: transform .18s ease; }
.nav-group[open] summary::after { transform: rotate(90deg); }
.nav-group summary:hover, .nav-group[open] > summary { background: #f4f8fb; color: var(--navy); }
.nav-submenu { margin: 2px 0 6px 14px; padding-left: 8px; border-left: 2px solid #c9d8e4; }
.sidebar .nav-submenu a { padding: 8px 10px; font-size: 13px; font-weight: 550; }
.checkboxselectmultiple { list-style: none; margin: 0; padding: 8px 10px; }
.checkboxselectmultiple li { margin: 5px 0; }

/* Contenção responsiva: impede grades e tabelas de deslocarem a página inteira. */
html,
body { max-width: 100%; }
body:not(.login-page) { overflow-x: hidden; }
.topbar,
.app-shell { width: 100%; max-width: 100%; }
.brand,
.brand > span,
.content,
.panel,
.dashboard-grid > *,
.two-column > *,
.page-heading > div:first-child,
.bar-row,
.bar-row > div { min-width: 0; }
.brand { flex: 1 1 auto; overflow: hidden; }
.brand strong,
.brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-area { flex: 0 0 auto; }
.content { width: calc(100% - 245px); max-width: none; }
.panel .table-wrap { width: 100%; max-width: 100%; }
.page-heading h1,
.panel-heading h2 { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .dashboard-grid,
  .two-column { grid-template-columns: minmax(0, 1fr); }
  .geo-heatmap-layout { grid-template-columns: 1fr; }
  .geo-heatmap-legend { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .geo-heatmap-legend p { grid-column: 1 / -1; }
}

.form-field.full-width { grid-column: 1 / -1; }
.kpi-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.toolbar .search-form { max-width: none; flex-wrap: wrap; min-width: 0; }
.toolbar .search-form input,
.toolbar .search-form select { flex: 1 1 160px; min-width: 0; }

@media (max-width: 900px) {
  .content { width: 100%; }
  .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-summary { grid-template-columns: 1fr; }
  .geo-heatmap-legend { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 430px) {
  .kpi-grid,
  .kpi-grid.compact,
  .detail-summary { grid-template-columns: minmax(0, 1fr); }
  .kpi-grid.four { grid-template-columns: minmax(0, 1fr); }
  .user-area { gap: 9px; }
}

.automatic-data-grid {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px dashed #b7c8d8;
  border-radius: 14px;
  background: #f4f8fb;
}

.automatic-field input:disabled,
.automatic-field select:disabled,
.automatic-field input[readonly] {
  color: #29465d;
  background: #eaf1f6;
  border-color: #c7d6e2;
  opacity: 1;
}

.help-principle { line-height: 1.55; }
.help-flow { overflow: hidden; }
.help-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: help-flow;
}
.help-flow-steps li { min-width: 0; counter-increment: help-flow; }
.help-flow-steps a {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px 12px 46px;
  position: relative;
  color: var(--text);
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.help-flow-steps a:hover { text-decoration: none; background: #edf4f9; }
.help-flow-steps a::before {
  content: counter(help-flow);
  position: absolute;
  left: 14px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 50%;
  font-weight: 750;
}
.help-flow-steps span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.help-module-grid { align-items: stretch; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-module-grid .panel { position: relative; padding-top: 22px; }
.help-module-grid .panel h2 { padding-right: 42px; }
.help-number {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #eaf2f8;
  border-radius: 9px;
  font-weight: 800;
}
.help-steps { margin: 14px 0; padding-left: 21px; line-height: 1.55; }
.help-steps li + li { margin-top: 7px; }
.help-auto { padding: 11px 12px; color: #40566b!important; background: #f2f6f9; border-left: 3px solid var(--gold); border-radius: 6px; }
.help-scenarios { display: grid; gap: 9px; }
.help-scenarios details { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.help-scenarios summary { padding: 12px 14px; color: var(--navy); background: #f7fafc; cursor: pointer; font-weight: 700; }
.help-scenarios details[open] summary { border-bottom: 1px solid var(--line); }
.help-scenarios p { margin: 0; padding: 13px 14px; line-height: 1.6; color: #475569; }
.help-checklist ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 26px; margin: 0; padding-left: 21px; line-height: 1.5; }
.procurement-summary { grid-template-columns: repeat(6, minmax(140px, 1fr)); }
.procurement-summary > div { min-width: 0; }
.procurement-status-card { grid-column: span 2; }
.procurement-status-grid {
  display: grid!important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.procurement-summary .status-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
}
.procurement-summary .status-mini b { font-size: 15px; }
.procurement-summary .status-mini small {
  min-width: 0;
  margin: 0;
  color: inherit;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .help-flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .procurement-summary { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .procurement-status-card { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .help-module-grid,
  .help-flow-steps,
  .help-checklist ul { grid-template-columns: minmax(0, 1fr); }
  .procurement-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .procurement-status-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Shared indicators: retain complete amounts, including cents, at any width. */
.kpi-grid,
.kpi-grid.compact,
.kpi-grid.four,
.dashboard-subject .kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}
.kpi { padding: 14px; }
.kpi strong {
  font-size: 19px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.detail-summary > div,
.status-card,
.trend-summary > div { min-width: 0; }
.detail-summary > div > strong,
.status-card > strong,
.trend-summary > div > strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.status-card > strong { font-size: 21px; }
#om-map { background: #c8dfea; border: 1px solid #9fb9c6; }
.map-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 16px 0; }
.map-controls input[type="search"] { max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.map-detail-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 16px; margin-top: 12px; }
.map-detail-grid article { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.map-detail-values { margin: 10px 0; }
.map-detail-values > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e2e8f0; padding: 5px 0; }
.map-detail-values dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.geo-heatmap-legend i.neutral { background: #71879b; }
.distribution-columns { display: flex; gap: 12px; overflow-x: auto; padding: 30px 4px 14px; align-items: stretch; }
.distribution-column { flex: 1 0 116px; min-width: 0; text-align: center; }
.distribution-column-plot { height: 210px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 2px solid #9fb2c1; background: repeating-linear-gradient(to top, transparent 0, transparent 51px, #e6edf2 51px, #e6edf2 52px); }
.distribution-column-bar { width: 58px; max-height: 100%; position: relative; background: #12304a; }
.distribution-columns-gold .distribution-column-bar { background: #c99120; }
.distribution-column-bar strong { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; }
.distribution-column-value { display: block; margin: 10px 0 6px; font-size: 11px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.distribution-column-label { display: block; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.delivery-comparison { display:flex; gap:16px; overflow-x:auto; padding:12px 4px 20px; }
.delivery-chart-column { flex:1 0 100px; text-align:center; }
.delivery-chart-column small { display:block; font-size:11px; margin-top:4px; }
.delivery-chart-plot { height:180px; display:flex; align-items:flex-end; justify-content:center; gap:7px; border-bottom:2px solid #9fb2c1; background:repeating-linear-gradient(to top,transparent 0,transparent 44px,#e6edf2 44px,#e6edf2 45px); margin-bottom:8px; }
.delivery-chart-bar { width:28px; max-height:100%; }
.delivery-chart-bar.planned { background:#12304a; }
.delivery-chart-bar.received { background:#20885d; }
.tdv-year-legend { display:flex; gap:16px; flex-wrap:wrap; margin:12px 0; }
.tdv-year-legend i { display:inline-block; width:12px; height:12px; margin-right:6px; }
.tdv-strip { display:flex; overflow-x:auto; gap:24px; padding:30px 6px 16px; }
.tdv-group { flex:0 0 auto; text-align:center; border-right:1px solid #dbe5ec; padding-right:24px; }
.tdv-years { display:flex; gap:10px; }
.tdv-year { width:68px; }
.tdv-plot { height:200px; display:flex; align-items:flex-end; justify-content:center; border-bottom:2px solid #9fb2c1; background:repeating-linear-gradient(to top,transparent 0,transparent 49px,#e6edf2 49px,#e6edf2 50px); }
.tdv-bar { width:28px; position:relative; }
.tdv-bar strong { position:absolute; bottom:calc(100% + 5px); left:50%; transform:translateX(-50%); font-size:11px; white-space:nowrap; }
.tdv-name { display:block; max-width:260px; overflow-wrap:anywhere; margin-top:12px; font-size:12px; }
.tdv-year small { display:block; margin-top:6px; }
#tdv-planned:checked ~ .tdv-unit .tdv-received, #tdv-received:checked ~ .tdv-unit .tdv-planned { display:none; }
.contract-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); gap:14px; margin-bottom:20px; }
.contract-summary > section { min-width:0; padding:16px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.contract-summary h2 { font-size:15px; margin:0 0 12px; }
.contract-summary dl { margin:0; }
.contract-summary dl > div { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; column-gap:12px; row-gap:4px; padding:8px 0; border-bottom:1px solid #edf1f5; }
.contract-summary dt { color:var(--muted); font-size:12px; }
.contract-summary dd { margin:0; font-size:15px; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.contract-summary dd > span:not(.badge) { display:inline-block; }
.contract-summary dd > .delivery-total { display:block; }
.contract-summary .summary-highlight { border-bottom:0; }
.contract-summary small { display:block; margin-top:8px; line-height:1.5; color:var(--muted); font-size:11px; }
.contract-sort-link { display:inline-flex; align-items:center; gap:5px; color:inherit; padding:5px 0; }
.contract-sort-link:hover, .contract-sort-link:focus-visible { color:var(--navy); text-decoration:underline; }
th[aria-sort] .contract-sort-link { color:var(--navy); }

/* Navigation scrolls independently from long report and contract pages. */
.dashboard-distributions { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.dashboard-distributions > .panel { min-width: 0; }
@media (max-width: 1100px) {
  .dashboard-distributions { grid-template-columns: minmax(0, 1fr); }
}
.install-card { position: relative; width: min(580px, calc(100% - 32px)); margin: 24px auto; padding: clamp(20px, 5vw, 32px); background: #fff; color: #1e293b; border: 1px solid #d7e2ec; border-radius: 16px; line-height: 1.5; overflow-wrap: anywhere; box-shadow: 0 12px 36px rgba(0,0,0,.18); }
.install-card > img { display: block; max-width: 100%; object-fit: contain; margin: 0 auto 16px; }
.install-card h1 { font-size: clamp(20px, 5vw, 26px); line-height: 1.3; margin: 0 0 16px; color: #12304a; }
.install-card h2 { font-size: 17px; margin-bottom: 4px; }
.install-card .button-group { display: grid; grid-template-columns: minmax(0, 1fr); margin: 20px 0 12px; }
.install-card .button { min-height: 48px; white-space: normal; text-align: center; }
.install-card [data-install-status] { padding: 12px; border-radius: 8px; background: #f1f5f9; color: #334155; }
.install-card .muted { color: #475569; }
.install-card .install-help { margin: 16px 0; padding: 12px 16px; border: 1px solid #d7e2ec; border-radius: 10px; background: #f8fafc; color: #1e293b; }
.install-card .install-help summary { cursor: pointer; font-weight: 600; color: #12304a; padding: 4px 0; }
.install-card .install-help summary:focus-visible { outline: 2px solid #12304a; outline-offset: 4px; }
.install-card .install-help ol { padding-left: 22px; }
.install-card .install-help li + li { margin-top: 12px; }
.install-card [data-copy-link] { margin-top: 10px; }
.install-card [hidden] { display: none !important; }
.chart-export-panel { position: relative; padding-top: 42px; }
.chart-export-button { position:absolute; right:12px; top:8px; display:grid; place-items:center; width:30px; height:28px; border:1px solid var(--line); border-radius:6px; background:white; color:var(--muted); cursor:pointer; }
.chart-export-button:hover { background:#edf4fb; color:var(--navy); }
.chart-export-button:disabled { opacity:.5; cursor:wait; }
.chart-export-status { display:block; font-size:12px; color:var(--muted); margin-top:6px; }
.chart-export-status:empty { display:none; }
.distribution-view { border: 0; padding: 0; margin: 0; min-width: 0; }
.distribution-view legend { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.distribution-view > label { display: inline-block; margin: 0 18px 14px 4px; cursor: pointer; }
#distribution-top10:checked ~ .item-distribution > .item-distribution-row:nth-child(n+11) { display: none; }
#om-distribution-top10:checked ~ .distribution-columns > .distribution-column:nth-child(n+11) { display: none; }
#om-distribution-top10:checked ~ .om-distribution > .item-distribution-row:nth-child(n+11) { display: none; }
.om-distribution .item-distribution-track span { background: var(--navy); }
.distribution-values-toggle:not(:checked) ~ .item-distribution .distribution-money { display: none; }
.om-distribution .item-distribution-row { grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr); }
.item-distribution { display: grid; gap: 12px; }
.item-distribution-row { display: grid; grid-template-columns: minmax(200px, 2fr) minmax(0, 3fr); gap: 18px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.item-distribution-name { overflow-wrap: anywhere; line-height: 1.4; }
.item-distribution-code, .item-distribution-description { display: block; }
.item-distribution-result { display: grid; grid-template-columns: minmax(40px, 1fr) auto; gap: 5px 12px; align-items: center; }
.item-distribution-result strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.item-distribution-result small { grid-column: 1 / -1; color: var(--muted); }
.item-distribution-track { height: 7px; background: #edf1f5; border-radius: 5px; }
.item-distribution-track span { display: block; height: 100%; background: #c99120; border-radius: inherit; }
@media (max-width: 650px) {
  .item-distribution-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .financial-execution-kpis { grid-template-columns: 1fr; }
  .financial-reading-heading { align-items: flex-start; }
  .financial-reading-heading > span { white-space: nowrap; }
  .monthly-financial-row { grid-template-columns: 25px minmax(40px, 1fr) 105px; gap: 6px; }
  .monthly-payment-summary .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .financial-funnel-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .financial-funnel-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .budget-action-panel form > label { min-width: 0; max-width: 100%; }
  .budget-action-panel select { max-width: 100%; }
  .budget-action-legend-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .budget-action-comparison { grid-column: 2 / -1; grid-row: 2; min-width: 0; overflow-wrap: anywhere; }
  .budget-action-comparison > div:first-child { flex-wrap: wrap; }
  .budget-action-execution { grid-column: 3; grid-row: 1; }
}
.sidebar {
  position: fixed;
  top: 68px;
  bottom: 0;
  left: 0;
  z-index: 25;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}
.sidebar nav { position: static; }
.app-shell { padding-left: 245px; }
.app-shell > .content { width: 100%; }
@media (max-width: 900px) {
  .app-shell { padding-left: 0; }
  .sidebar { left: -260px; }
  .sidebar.open { left: 0; }
}

/* Compact mobile controls without changing desktop layouts or chart exports. */
@media screen and (max-width: 650px) {
  /* Desktop flex-basis is a width; in the stacked form it becomes a height. */
  .content .toolbar .search-form input,
  .content .toolbar .search-form select { flex: 0 1 auto; }
  .content .search-form { gap: 8px; width: 100%; min-width: 0; }
  .content .toolbar .search-form { align-items: stretch; }
  .content .search-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .content .search-form select,
  .content .form-control:not(textarea):not([type="checkbox"]):not([type="radio"]),
  .content .dashboard-period-fields input,
  .content .dashboard-period-fields select {
    width: 100%; min-width: 0; max-width: 100%;
    height: 44px; min-height: 44px; padding: 8px 10px;
    font-size: 16px; line-height: 1.25;
  }
  .content .toolbar { gap: 10px; margin-bottom: 12px; }
  .content .form-grid { gap: 12px; }
  .content .form-field { gap: 4px; }
  .content .page-heading { gap: 12px; margin-bottom: 16px; }
  .content .page-heading h1 { font-size: 24px; }
  .content .button { min-height: 44px; padding: 8px 12px; white-space: normal; }
  .content .button-group { gap: 6px; }
  .content .form-actions { margin-top: 16px; padding-top: 12px; flex-wrap: wrap; }
}
