:root {
  color-scheme: light;
  --ink: #173a39;
  --text: #233c40;
  --muted: #596c70;
  --line: #dce4df;
  --surface: #fff;
  --canvas: #f6f8f5;
  --teal: #075c52;
  --teal-dark: #073f3b;
  --mint: #dff2e9;
  --lime: #d7ef9c;
  --sidebar: #103f3d;
  --warn: #86530d;
  --radius: .85rem;
  --shadow: 0 2px 5px rgb(20 49 39 / .035);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 100%;
  color: var(--text);
  background: var(--canvas);
  text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #43a790; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--teal); text-underline-offset: .17em; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.66rem, 2.6vw, 2.4rem); line-height: 1.14; font-weight: 710; letter-spacing: -.05em; }
h2 { font-size: clamp(1.18rem, 1.8vw, 1.55rem); line-height: 1.23; letter-spacing: -.035em; }
h3 { font-size: 1.06rem; line-height: 1.35; letter-spacing: -.018em; }
p { line-height: 1.55; }
[hidden] { display: none !important; }
.icon { display: inline-block; flex-shrink: 0; vertical-align: -.18em; }
.muted { color: var(--muted); }
.empty, .empty-state { padding: 1.5rem; color: var(--muted); text-align: center; }
.eyebrow { display: block; color: var(--teal); font-size: .76rem; line-height: 1.35; font-weight: 720; letter-spacing: .09em; text-transform: uppercase; }
.app-shell { min-height: 100dvh; display: grid; grid-template-columns: clamp(13rem, 17vw, 16rem) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; z-index: 15; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 1.65rem .85rem 1rem; color: #e6f3ed; background: var(--sidebar); scrollbar-width: thin; scrollbar-color: #48716b transparent; }
.brand { display: flex; gap: .72rem; align-items: center; min-height: 2.6rem; color: inherit; text-decoration: none; }
.sidebar .brand { margin: .05rem .65rem 2.1rem; }
.brand > .icon, .brand-mark, .brand-icon { display: inline-grid; flex: 0 0 auto; width: 2.6rem; height: 2.6rem; padding: .55rem; place-items: center; border-radius: .8rem; background: var(--lime); color: #1a4c43; }
.brand-mark .icon, .brand-icon .icon { width: 100%; height: 100%; }
.brand strong, .brand-name { display: block; font-weight: 740; font-size: 1.22rem; letter-spacing: -.035em; line-height: 1.15; }
.brand small, .brand-sub { display: block; margin-top: .22rem; color: #c2d5cd; font-size: .78rem; line-height: 1.3; }
.nav { display: grid; align-content: start; gap: .25rem; }
.nav-label, .nav-section { margin: .95rem .85rem .5rem; color: #b1c7be; font-size: .73rem; line-height: 1.4; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.nav-btn { display: flex; align-items: center; gap: .78rem; width: 100%; min-height: 2.68rem; border: 0; padding: .64rem .85rem; background: transparent; color: #e0ece7; border-radius: .54rem; text-align: left; text-decoration: none; font-size: .93rem; line-height: 1.4; font-weight: 470; }
.nav-btn .icon { width: 1.14rem; height: 1.14rem; color: #b3d0c6; }
.nav-btn:hover { background: #21534f; color: white; }
.nav-btn.active { background: #d8ecab; color: #163e37; font-weight: 660; }
.nav-btn.active .icon { color: currentColor; }
.sidebar-foot { display: flex; align-items: center; gap: .65rem; margin-top: auto; padding: 1.1rem .55rem .12rem; border-top: 1px solid #3b6159; font-size: .9rem; color: #e5f0e9; }
.sidebar .nav { margin-bottom: 1.5rem; }
.sidebar-foot small { display: block; color: #b3c9be; font-size: .78rem; }
.sidebar-foot .avatar { background: #315e56; color: #e0efc7; }
.sidebar-foot button { color: inherit; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; min-height: 4.15rem; padding: .7rem clamp(1.25rem, 3.4vw, 3.5rem); border-bottom: 1px solid var(--line); background: #fff; }
.topbar > div { display: flex; align-items: center; gap: .65rem; }
.topbar small { color: var(--muted); font-size: .81rem; }
.content { width: min(100%, 100rem); margin: 0 auto; padding: clamp(1.6rem, 2.8vw, 2.85rem) clamp(1.25rem, 3.4vw, 3.5rem) 3rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .95rem; margin-bottom: 1.45rem; }
.page-head .eyebrow { margin-bottom: .48rem; }
.page-head p, .panel-head p { margin-top: .4rem; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.btn, .icon-btn, .mobile-menu { display: inline-flex; align-items: center; justify-content: center; gap: .52rem; padding: .61rem .96rem; min-height: 2.55rem; border: 1px solid var(--line); border-radius: .55rem; background: white; color: var(--ink); font-size: .9rem; font-weight: 620; line-height: 1.25; text-decoration: none; }
.btn:hover, .icon-btn:hover, .mobile-menu:hover { background: #f3f6f2; border-color: #adbfb4; }
.btn.primary, button.primary, a.primary { border-color: var(--teal); background: var(--teal); color: white; }
.btn.primary:hover, button.primary:hover, a.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.btn.secondary { background: #fff; color: var(--ink); }
.btn.ghost, .icon-btn, .mobile-menu { border-color: transparent; background-color: transparent; }
.btn.ghost:hover, .icon-btn:hover { background: #e9f0ea; }
.icon-btn, .mobile-menu { padding: .48rem; min-width: 2.4rem; min-height: 2.4rem; }
.mobile-menu { display: none; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 9.2rem; margin-bottom: 1.25rem; padding: clamp(1.3rem, 2.4vw, 2.25rem); border-radius: var(--radius); background: #164c44; color: #eaf3ed; }
.hero::after, .login-art::after { content: ''; position: absolute; pointer-events: none; z-index: -1; width: 18rem; height: 18rem; right: -4.2rem; top: -6.1rem; border: 1px solid #77a68c66; border-radius: 50%; box-shadow: 0 0 0 1.1rem #164c44, 0 0 0 calc(1.1rem + 1px) #77a68c55, 0 0 0 2.2rem #164c44, 0 0 0 calc(2.2rem + 1px) #77a68c55, 0 0 0 3.3rem #164c44, 0 0 0 calc(3.3rem + 1px) #77a68c44; }
.hero > div:first-child { max-width: min(84%, 45rem); }
.hero h2, .hero h3 { color: white; }
.hero h2 { font-size: clamp(1.3rem, 2vw, 1.75rem); }
.hero p { margin-top: .4rem; color: #dbebe1; font-size: .95rem; }
.hero .eyebrow { margin-bottom: .48rem; color: #d3e99f; }
.hero .btn { margin-top: .85rem; color: #1d493a; border-color: var(--lime); background: var(--lime); }
.hero .btn:hover { background: #e8f7bb; }
.hero-mark { display: grid; flex-shrink: 0; place-items: center; width: 5.55rem; height: 5.55rem; color: #d4eca5; background: #225b4e; border: 1px solid #8fb19a; border-radius: 1.15rem; transform: rotate(-5deg); }
.hero-mark .icon { width: 53%; height: 53%; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.45rem; }
.kpi { position: relative; min-width: 0; display: flex; align-items: flex-start; flex-direction: column; padding: 1.05rem 1.1rem 1.12rem; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
button.kpi:hover, a.kpi:hover { border-color: #8db6a5; background-color: #fdfffb; }
.kpi-icon { display: inline-grid; place-items: center; margin-bottom: .75rem; width: 2.12rem; height: 2.12rem; color: #246250; border-radius: .6rem; background: #e7f2e8; }
.kpi-icon .icon { width: 1.16rem; height: 1.16rem; }
.kpi:nth-child(4n+2) .kpi-icon { background: #e8f1f4; color: #3c6574; }
.kpi:nth-child(4n+3) .kpi-icon { background: #eef0e3; color: #61703b; }
.kpi:nth-child(4n+4) .kpi-icon { background: #faf0dc; color: #885b24; }
.kpi-value { color: var(--ink); font-size: clamp(1.55rem, 2.4vw, 2.13rem); font-weight: 680; letter-spacing: -.055em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.kpi-label, .kpi small { margin-top: .23rem; color: #526764; font-size: .88rem; line-height: 1.35; }
.panel, .unit-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel { margin-bottom: 1.1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; padding: 1.06rem 1.2rem; }
.panel-head h2 { font-size: 1.17rem; line-height: 1.45; }
.panel-body, .panel-pad { padding: .3rem 1.2rem 1.2rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-spacing: 0; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: .83rem 1rem; vertical-align: middle; }
th { background: #f5f8f4; white-space: nowrap; color: #516661; font-weight: 650; font-size: .8rem; border-block: 1px solid var(--line); }
td { border-bottom: 1px solid #e7ece7; line-height: 1.45; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcf9; }
td strong, td small { display: block; }
td small { color: var(--muted); font-size: .8rem; }
td button:not(.btn):not(.badge):not(.icon-btn), .link { border: 0; background: none; color: var(--teal); font-weight: 600; font-size: inherit; padding: .22rem .15rem; text-decoration: underline; text-decoration-color: #a6c7b8; text-underline-offset: .2em; }
.badge { display: inline-flex; max-width: 100%; justify-content: center; align-items: center; gap: .32rem; padding: .24rem .57rem; border: 1px solid #dde6de; border-radius: 2rem; background: #f0f4ee; color: #48614d; font-size: .79rem; line-height: 1.35; font-weight: 600; white-space: nowrap; }
.badge.ok { color: #246344; background: #e6f5ea; border-color: #cee7d3; }
.badge.warn { color: #81551e; background: #fff2d8; border-color: #eedebb; }
.badge.neutral { color: #516169; background: #eef2f3; border-color: #dfe5e7; }
.badge.overdue { color: #98432e; background: #fcece6; border-color: #efd5c9; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: .65rem; background: #e6efe8; color: #32644f; font-size: .8rem; font-weight: 700; }
.progress { display: block; overflow: hidden; height: .47rem; border-radius: 1rem; background: #e7eee7; }
.progress > span, .progress > i { display: block; height: 100%; border-radius: inherit; background: #498669; }
.toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .7rem; margin-bottom: 1rem; }
.panel > .toolbar { padding: .3rem 1.15rem .85rem; margin: 0; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; color: var(--ink); font-size: .91rem; font-weight: 600; line-height: 1.35; }
.field label { font-size: .91rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  min-width: 0; max-width: 100%; min-height: 2.65rem; padding: .6rem .75rem; border: 1px solid #becdc4; border-radius: .48rem;
  color: var(--text); background-color: #fff; font-size: .94rem; font-weight: 450; line-height: 1.32;
}
input::placeholder, textarea::placeholder { color: #677c77; opacity: 1; }
input:disabled, input[readonly], select:disabled, textarea:disabled { color: #516761; background-color: #f3f6f3; }
select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none' stroke='%23445f55' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .62rem center; }
textarea { min-height: 5rem; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--teal); width: 1.02rem; height: 1.02rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.form-grid .wide, .form-grid .full { grid-column: 1 / -1; }
.form-grid input:not([type=checkbox]):not([type=radio]), .form-grid select, .form-grid textarea, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; }
.field small, .hint { color: var(--muted); font-size: .83rem; font-weight: 450; line-height: 1.4; }
dialog { position: fixed; padding: 0; width: min(42rem, calc(100vw - 1.6rem)); max-height: min(90dvh, 56rem); overflow-y: auto; overscroll-behavior: contain; border: 1px solid #c7d5cd; border-radius: 1rem; background: white; color: var(--text); box-shadow: 0 1.2rem 4.4rem #0d322b38; }
dialog::backdrop { background: rgb(9 34 33 / .50); backdrop-filter: blur(2px); }
.modal-head, .modal-foot { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: 1rem 1.35rem; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-foot { justify-content: flex-end; border-top: 1px solid var(--line); }
.modal-body { padding: 1.2rem 1.35rem; }
.toast { position: fixed; z-index: 50; bottom: 1.3rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(92vw, 38rem); padding: .78rem 1rem; border: 1px solid #3a665a; border-radius: .6rem; box-shadow: 0 .3rem 1.3rem #133e332b; background: var(--teal-dark); color: #fff; font-size: .91rem; line-height: 1.45; }
.toast:empty { display: none; }
.error, .error-message, .form-error { color: #963b2b; font-weight: 560; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .85rem; }
.unit-card { display: block; padding: 1.15rem; color: var(--ink); text-align: left; }
button.unit-card:hover { border-color: #8fb59f; background-color: #fcfefb; }
.unit-card .icon { color: var(--teal); }
.unit-card h3 { margin-block: .55rem .3rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-block: .85rem 1.05rem; border-bottom: 1px solid var(--line); }
.tabs > button, .tabs > a { padding: .6rem .7rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 620; font-size: .9rem; }
.tabs > .active { border-bottom-color: var(--teal); color: var(--teal); }
.login-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(19rem, 1.04fr) minmax(20rem, 1fr); align-items: stretch; background: #f7f9f5; }
.login-art { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(2rem, 6vw, 7rem); background: #164c44; color: #e0efe5; }
.login-art::after { width: clamp(16rem, 39vw, 36rem); height: clamp(16rem, 39vw, 36rem); right: -35%; top: -18%; }
.login-art::before { content: ''; position: absolute; z-index: -1; bottom: 0; left: 0; width: 75%; height: 31%; opacity: .26; pointer-events: none; background-image: radial-gradient(#acd4ae 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(12deg, black, transparent 72%); }
.login-art .brand { position: absolute; top: clamp(1.8rem, 5.5vw, 5rem); left: clamp(2rem, 6vw, 7rem); }
.login-art .eyebrow { color: #d7ecac; }
.login-art h1, .login-art h2 { color: #f2f8ef; max-width: 12ch; font-size: clamp(2.3rem, 4.65vw, 4.9rem); font-weight: 610; letter-spacing: -.058em; line-height: 1.035; margin-block: .8rem 1.1rem; text-wrap: initial; }
.login-art p { color: #d3e6d9; max-width: 37ch; font-size: 1.03rem; line-height: 1.65; }
.login-art footer { position: absolute; bottom: clamp(1.8rem, 4.5vw, 4rem); color: #c3d8ca; font-size: .83rem; }
.login-card { align-self: center; justify-self: center; width: min(100% - 3rem, 25rem); margin-block: 3rem; }
.login-card h1 { margin-block: .6rem; }
.login-card > p { color: var(--muted); margin-bottom: 1.25rem; }
.login-card form { display: grid; gap: 1rem; }
.login-card .btn.primary { min-height: 2.9rem; }
.login-card .brand { margin-bottom: 1.7rem; }
.login-card .brand small { color: var(--muted); }
.login-card .field { font-size: .93rem; }
.login-card input:not([type=checkbox]) { min-height: 2.9rem; }
.login-card .hint { margin-top: 1rem; }
.login-card .error:empty, .form-error:empty { display: none; }
@media (min-width: 1550px) {
  .content { padding-inline: 3.5rem; }
  .kpi { padding: 1.27rem 1.3rem; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 12.8rem minmax(0, 1fr); }
  .content { padding-inline: 1.25rem; }
  .topbar { padding-inline: 1.25rem; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 810px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: min(17rem, 84vw); transform: translateX(-103%); visibility: hidden; box-shadow: .8rem 0 2rem #1d3b3026; }
  .sidebar.open, .app-shell.menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .mobile-menu { display: inline-flex; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-art, .login-art .brand { padding-inline: 2rem; }
  .login-art .brand { left: 0; }
  .login-art h1, .login-art h2 { font-size: 2.7rem; }
}
@media (max-width: 630px) {
  .topbar { gap: .35rem; min-height: 3.35rem; padding: .44rem .8rem; }
  .content { padding: 1.22rem .9rem 2.2rem; }
  .page-head { align-items: flex-start; gap: .75rem; margin-bottom: .95rem; }
  .actions { gap: .4rem; }
  .page-head .actions { width: 100%; }
  .hero { min-height: 7.8rem; margin-bottom: .8rem; padding: 1rem; }
  .hero-mark { width: 3.3rem; height: 3.3rem; }
  .kpis, .unit-grid { gap: .6rem; }
  .kpis { margin-bottom: 1rem; }
  .kpi { padding: .84rem .8rem; }
  .kpi-icon { margin-bottom: .55rem; }
  .panel-head, .panel-body, .panel-pad { padding-inline: .85rem; }
  th, td { padding-inline: .75rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .toolbar > .field { flex: 1 1 9rem; }
  .modal-head, .modal-body, .modal-foot { padding-inline: .95rem; }
  .login-shell { display: flex; flex-direction: column; align-items: stretch; }
  .login-art { flex: 0 0 auto; min-height: 12.3rem; padding: 1.25rem 1.45rem; }
  .login-art .brand { position: static; padding: 0; margin-bottom: .8rem; }
  .login-art h1, .login-art h2 { max-width: none; font-size: 1.85rem; margin: .5rem 0; }
  .login-art p { font-size: .89rem; line-height: 1.45; }
  .login-art footer { display: none; }
  .login-card { align-self: center; width: min(100% - 2.5rem, 25rem); margin: 2rem auto; }
}
@media (prefers-reduced-motion: no-preference) {
  button, input, select, .kpi, .unit-card { transition: background-color .13s ease, border-color .13s ease, box-shadow .13s ease; }
  .sidebar { transition: transform .16s ease; }
}
@media print {
  .app-shell { display: block; }
  .sidebar, .topbar, .mobile-menu, .toast, .actions, .btn { display: none !important; }
  body, .main, .content { background: white; }
  .content { padding: 0; }
  .panel, .kpi, .unit-card { box-shadow: none; break-inside: avoid; }
  .table-wrap { overflow: visible; }
}
