

:root {
  --ink: #15372f;
  --ink-soft: #557068;
  --paper: #f5f7f1;
  --card: #ffffff;
  --line: #dde5dc;
  --mint: #d9f0dc;
  --green: #176b4b;
  --green-dark: #0f5139;
  --coral: #ee795e;
  --coral-soft: #fff0eb;
  --gold: #d59f31;
  --gold-soft: #fff7df;
  --shadow: 0 18px 50px rgba(35, 66, 52, 0.08);
}

.paused { color: #ad4700; }
.pause-label { display: block; font-size: 11px; color: #ad4700; font-weight: 650; }
.program-label { display: block; font-size: 11px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-panel { max-width: 510px; width: 100%; padding: 36px; }
.login-panel h1 { font-size: 36px; }
.login-panel p { line-height: 1.55; }
.login-panel .field { margin: 18px 0; }
.login-logo { width: 100%; height: auto; margin-bottom: 24px; }
.privacy-panel { max-width: 850px; line-height: 1.7; }
.error { padding: 14px 18px; border: 1px solid #b94336; background: #fff1ef; color: #812b22; border-radius: 12px; margin: 0 0 18px; }
.sidebar-note a { color: #ecffed; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
.privacy-actions { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.modal { max-height: 90vh; overflow-y: auto; }
@media(max-width: 760px) { .top-actions { flex-wrap: wrap; } .search input { width: 100%; } .page-toolbar { flex-wrap: wrap; } .login-panel { padding: 24px; } }

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(217, 240, 220, 0.9), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
}

button, input, select { font: inherit; }
button { color: inherit; }

::selection { background: #b7dfc2; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 22px; background: #113f32; color: #f8fff8; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; margin: 2px 4px 34px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px 14px 14px 4px; background: var(--coral); display: grid; place-items: center; font-weight: 850; letter-spacing: -0.04em; box-shadow: 0 9px 22px rgba(0,0,0,.16); }
.brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.brand small { display: block; color: #b9d5c7; font-size: 11px; margin-top: 2px; letter-spacing: .06em; text-transform: uppercase; }
.nav-list { display: grid; gap: 7px; }
.nav-button { width: 100%; border: 0; background: transparent; color: #c9ded4; display: flex; align-items: center; gap: 12px; border-radius: 13px; padding: 12px 13px; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-button:hover { background: rgba(255,255,255,.07); color: white; }
.nav-button.active { background: #f5fff6; color: var(--green-dark); font-weight: 760; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.nav-icon { width: 23px; height: 23px; border-radius: 8px; background: rgba(255,255,255,.09); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.nav-button.active .nav-icon { background: var(--mint); }
.sidebar-note { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 6px 0; color: #b9d5c7; font-size: 12px; line-height: 1.55; }
.sidebar-note strong { color: white; display: block; margin-bottom: 3px; }

.main { min-width: 0; padding: 34px 42px 54px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 34px; }
.eyebrow { color: var(--green); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 7px; }
h1 { margin: 0; font-size: clamp(30px, 3.3vw, 47px); line-height: 1.03; letter-spacing: -.045em; font-weight: 820; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.search { position: relative; }
.search input { width: min(300px, 26vw); border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.84); padding: 12px 15px 12px 41px; outline: none; color: var(--ink); transition: .15s; }
.search input:focus { border-color: #82b898; box-shadow: 0 0 0 4px rgba(23,107,75,.09); }
.search::before { content: "⌕"; position: absolute; left: 15px; top: 7px; font-size: 22px; color: #71887f; }
.primary-button, .secondary-button, .ghost-button { border: 0; border-radius: 13px; padding: 12px 17px; cursor: pointer; font-weight: 760; transition: .16s ease; }
.primary-button { background: var(--coral); color: #fff; box-shadow: 0 10px 24px rgba(238,121,94,.24); }
.primary-button:hover { background: #df684e; transform: translateY(-1px); }
.secondary-button { background: var(--green); color: white; }
.secondary-button:hover { background: var(--green-dark); }
.ghost-button { background: #eef3ed; color: var(--green-dark); }
.ghost-button:hover { background: #e1eae0; }
.danger-button { border: 1px solid #c64d3d; border-radius: 13px; padding: 11px 16px; cursor: pointer; font-weight: 760; background: #fff1ef; color: #9b3026; }
.danger-button:hover { background: #fbded9; }
.icon-button { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }

.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; padding: 31px 34px; border-radius: 25px; background: #154e3d; color: white; box-shadow: var(--shadow); margin-bottom: 22px; }
.hero::after { content: ""; position: absolute; right: -70px; top: -90px; width: 280px; height: 280px; border-radius: 50%; border: 54px solid rgba(217,240,220,.11); }
.hero h2 { margin: 0 0 12px; font-size: clamp(24px, 2.5vw, 37px); line-height: 1.08; letter-spacing: -.035em; max-width: 650px; }
.hero p { margin: 0; color: #cde1d7; line-height: 1.6; max-width: 620px; }
.hero-side { align-self: center; justify-self: end; text-align: right; z-index: 1; }
.hero-date { display: inline-block; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.13); border-radius: 15px; padding: 13px 16px; }
.hero-date strong { display: block; font-size: 21px; }
.hero-date small { color: #bdd5c9; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid rgba(219,228,218,.88); border-radius: 19px; padding: 21px; box-shadow: 0 10px 30px rgba(35,66,52,.045); }
.kpi-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--ink-soft); font-size: 12px; font-weight: 740; }
.kpi-badge { width: 33px; height: 33px; border-radius: 11px; display: grid; place-items: center; background: var(--mint); color: var(--green); font-weight: 850; }
.kpi.coral .kpi-badge { background: var(--coral-soft); color: var(--coral); }
.kpi.gold .kpi-badge { background: var(--gold-soft); color: #9d6a00; }
.kpi-value { margin-top: 14px; font-size: 31px; font-weight: 830; letter-spacing: -.04em; }
.kpi-sub { margin-top: 3px; color: #7b9189; font-size: 12px; }

.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 21px; padding: 22px; box-shadow: 0 12px 38px rgba(35,66,52,.05); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.panel h2, .panel h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.panel-sub { color: var(--ink-soft); font-size: 12px; margin-top: 4px; }
.progress-row { display: grid; grid-template-columns: 104px 1fr 48px; gap: 12px; align-items: center; margin: 17px 0; font-size: 13px; }
.progress-track { height: 10px; background: #edf1eb; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--green); transition: width .35s ease; }
.progress-fill.coral { background: var(--coral); }
.progress-row strong { text-align: right; }
.alert-list { display: grid; gap: 10px; }
.alert-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; padding: 12px; border-radius: 14px; background: #f8faf6; }
.alert-symbol { width: 38px; height: 38px; border-radius: 12px; background: var(--gold-soft); color: #9a6800; display: grid; place-items: center; font-weight: 900; }
.alert-item strong { display: block; font-size: 13px; }
.alert-item small { color: var(--ink-soft); }
.link-button { border: 0; background: transparent; color: var(--green); font-weight: 800; cursor: pointer; padding: 5px; }

.page-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.page-toolbar h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.page-toolbar p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; }
.filters { display: flex; gap: 9px; flex-wrap: wrap; }
.filter-button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 13px; cursor: pointer; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.filter-button.active { color: white; background: var(--green); border-color: var(--green); }
.select { border: 1px solid var(--line); background: white; border-radius: 13px; padding: 10px 36px 10px 13px; color: var(--ink); outline: none; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 19px; background: white; box-shadow: 0 12px 38px rgba(35,66,52,.04); }
table { width: 100%; border-collapse: collapse; min-width: 770px; }
th { padding: 13px 16px; text-align: left; background: #f1f5ef; color: #687f77; text-transform: uppercase; letter-spacing: .055em; font-size: 10px; }
td { padding: 13px 16px; border-top: 1px solid #edf1eb; font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #fbfcfa; }
.person-cell { display: flex; align-items: center; gap: 11px; font-weight: 720; }
.avatar { width: 37px; height: 37px; flex: 0 0 auto; border-radius: 12px; background: var(--mint); color: var(--green-dark); display: grid; place-items: center; font-size: 12px; font-weight: 850; }
.avatar.co { background: var(--coral-soft); color: #a8422e; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 760; background: #edf3ed; color: #527066; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { background: #e0f4e4; color: #1a714d; }
.status.warn { background: var(--gold-soft); color: #986600; }
.status.danger { background: var(--coral-soft); color: #ac4936; }
.muted { color: #80928c; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }

.signature-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.signature-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.signature-card { background: white; border: 1px solid var(--line); border-radius: 19px; overflow: hidden; }
.signature-card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: #f3f6f1; }
.signature-card-head strong { font-size: 14px; }
.signature-card-head span { color: var(--ink-soft); font-size: 11px; }
.signature-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-top: 1px solid #edf1eb; }
.signature-row .person-cell { font-size: 12px; }
.toggle { width: 49px; height: 27px; flex: 0 0 auto; border: 0; border-radius: 999px; background: #dce4dc; padding: 3px; cursor: pointer; transition: .18s; }
.toggle::after { content: ""; display: block; width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .18s; }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(22px); }
.signature-summary { position: sticky; top: 25px; }
.ring { position: relative; --p: 0; width: 150px; aspect-ratio: 1; margin: 14px auto 18px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), #e8eee7 0); display: grid; place-items: center; }
.ring::before { content: ""; width: 112px; aspect-ratio: 1; border-radius: 50%; background: white; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.ring-label strong { font-size: 28px; display: block; }
.ring-label small { color: var(--ink-soft); }

.alert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.deadline-list { display: grid; gap: 9px; }
.deadline { display: grid; grid-template-columns: 1fr auto; gap: 13px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 13px; }
.deadline strong { display: block; font-size: 13px; }
.deadline small { color: var(--ink-soft); }

.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(10,37,29,.54); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 22px; }
.modal { width: min(680px, 100%); max-height: calc(100vh - 44px); overflow: auto; background: white; border-radius: 24px; padding: 25px; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 21px; }
.modal-head h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.modal-head p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 800; color: #5d746c; text-transform: uppercase; letter-spacing: .055em; }
.field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; padding: 11px 12px; color: var(--ink); outline: none; }
.field input:focus, .field select:focus { border-color: #79ac8e; box-shadow: 0 0 0 4px rgba(23,107,75,.08); }
.check-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; font-size: 13px; }
.check-row input { accent-color: var(--green); width: 17px; height: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; background: var(--ink); color: white; border-radius: 13px; padding: 12px 16px; box-shadow: 0 15px 40px rgba(0,0,0,.22); font-size: 13px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-soft); }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--green); font-weight: 800; }
.loading::before { content: ""; width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--mint); border-top-color: var(--green); animation: spin .8s linear infinite; margin-right: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .sidebar { padding: 25px 14px; align-items: center; }
  .brand { margin-bottom: 30px; }
  .brand > div:last-child, .nav-label, .sidebar-note { display: none; }
  .nav-button { justify-content: center; padding: 12px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .alert-grid { grid-template-columns: 1fr; }
  .signature-layout { grid-template-columns: 1fr; }
  .signature-summary { position: relative; top: auto; order: -1; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; bottom: 0; top: auto; width: 100%; height: 70px; padding: 9px 12px; display: block; }
  .brand, .sidebar-note { display: none; }
  .nav-list { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .nav-button { padding: 8px 4px; flex-direction: column; gap: 3px; font-size: 9px; }
  .nav-label { display: block; }
  .nav-icon { width: 24px; height: 24px; }
  .main { padding: 24px 16px 100px; }
  .topbar { align-items: flex-start; margin-bottom: 25px; }
  .top-actions { flex-direction: column-reverse; align-items: end; }
  .search input { display: none; }
  .search::before { display: none; }
  .hero { grid-template-columns: 1fr; padding: 25px; }
  .hero-side { justify-self: start; text-align: left; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 25px; }
  .signature-groups, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .page-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 440px) {
  .kpi-grid { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
  .primary-button { padding: 10px 12px; }
}

.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; }

.accounts-shell { max-width: 1180px; margin: 0 auto; padding: 42px 28px 70px; }
.accounts-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.accounts-head > div > p:last-child { color: var(--ink-soft); max-width: 680px; line-height: 1.6; }
.button-link { display: inline-block; text-decoration: none; white-space: nowrap; }
.accounts-grid { display: grid; gap: 20px; }
.invite-form { display: grid; grid-template-columns: 1.35fr .65fr auto; gap: 12px; align-items: end; margin-top: 22px; }
.invite-result { margin-top: 22px; padding: 18px; border: 1px solid #82b898; border-radius: 16px; background: #eff9f0; }
.invite-result p { color: var(--ink-soft); }
.invite-result small { display: block; color: var(--ink-soft); margin-top: 10px; }
.copy-row { display: flex; gap: 9px; }
.copy-row input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: white; color: var(--ink); }
.accounts-table { min-width: 620px; }
@media (max-width: 800px) { .accounts-head { flex-direction: column; } .invite-form { grid-template-columns: 1fr; } .copy-row { flex-direction: column; } .accounts-shell { padding: 28px 16px 50px; } }
