:root {
  color-scheme: light;
  --ink: #1e2923;
  --muted: #536258;
  --paper: #f7f8f5;
  --white: #fff;
  --green: #1d493b;
  --green-dark: #13362a;
  --green-light: #e7f1e5;
  --lime: #d7efa9;
  --border: #d8e0d7;
  --error: #a0312b;
  --amber-bg: #fff0ca;
  --amber: #69440c;
  --radius: 16px;
  font-family: "Instrument Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box }
body { margin: 0 }
button, input, select, textarea { font: inherit }
button, select { cursor: pointer }
[hidden] { display: none !important }
a { color: var(--green) }
h1, h2, h3, p { margin: 0 }
h1, h2, h3 { line-height: 1.17; text-wrap: balance }
:focus-visible { outline: 3px solid #507936; outline-offset: 3px }
.skip { position: fixed; left: 12px; top: -90px; z-index: 5; background: white; padding: 12px }
.skip:focus { top: 10px }
.top { background: var(--white); border-bottom: 1px solid var(--border) }
.top-inner { max-width: 1240px; margin: auto; min-height: 72px; display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 10px 32px }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 750; letter-spacing: -.045em }
.mark { display: grid; grid-template-columns: 13px 7px; grid-template-rows: 9px 7px; gap: 2px; padding: 10px 9px; background: var(--green); border-radius: 9px }
.mark b { background: var(--lime); border-radius: 1px }
.mark b:last-child { grid-column: 1 / -1 }
.session { display: flex; gap: 10px; align-items: center }
.session-name { max-width: 220px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-weight: 650; color: var(--muted); font-size: 14px }
.wrap { max-width: 1240px; padding: 35px 32px 72px; margin: auto }
.loading { margin: 44px auto; padding: 12px 24px; text-align: center; color: var(--muted) }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 25px; padding: 25px 28px 28px; border: 1px solid #dbe7d7; background: #edf5e9; border-radius: 20px }
.eyebrow { color: #355e49; font-weight: 700; font-size: 14px; margin-bottom: 7px }
.hero h1 { font-size: clamp(29px, 4vw, 46px); letter-spacing: -.055em }
.hero p:last-child { margin-top: 9px; max-width: 55ch; color: var(--muted) }
.hero .btn { flex-shrink: 0 }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 13px; margin-bottom: 28px }
.metric { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 21px }
.metric p { color: var(--muted); font-weight: 620; font-size: 14px }
.metric strong { display: block; margin-top: 4px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
.metric small { color: var(--muted); display: block; margin-top: 3px }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden }
.panel-head { padding: 19px 21px 13px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px }
.panel-head h2 { font-size: 23px; letter-spacing: -.035em }
.panel-head p, .subtle { color: var(--muted); font-size: 14px }
.tabs { display: flex; gap: 5px; padding: 7px 19px 13px; flex-wrap: wrap; align-items: center }
.tabs .btn { border-color: transparent; color: var(--muted); background: transparent }
.tabs .btn[aria-current="true"] { background: var(--green-light); color: var(--green-dark); font-weight: 750 }
.section-nav { padding: 0 0 15px; margin-top: -3px }
.documents { list-style: none; margin: 0; padding: 0 }
.record { display: grid; grid-template-columns: minmax(150px, 1.5fr) minmax(125px, 1fr) minmax(85px, .8fr) auto; align-items: center; gap: 10px 15px; padding: 15px 21px; border-top: 1px solid var(--border) }
.record-heading { font-weight: 700; overflow-wrap: anywhere }
.record-heading small { display: block; font-weight: 500; font-size: 13px; color: var(--muted) }
.status { width: fit-content; max-width: 100%; padding: 4px 9px; background: var(--green-light); color: var(--green-dark); border-radius: 7px; font-size: 13px; font-weight: 690 }
.status.pending { background: var(--amber-bg); color: var(--amber) }
.status.rejected { background: #f8e8e5; color: var(--error) }
.money { font-weight: 740; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 1px solid var(--border); border-radius: 9px; background: var(--white); color: var(--ink); padding: 8px 13px; font-weight: 650; text-align: center }
.btn:hover { background: var(--green-light) }
.btn.primary { background: var(--green); border-color: var(--green); color: white; padding-inline: 17px }
.btn.primary:hover { background: var(--green-dark) }
.btn.quiet { border-color: transparent; background: transparent; color: var(--green-dark) }
.btn.quiet:hover { background: var(--green-light) }
.btn.danger { color: var(--error) }
.btn[disabled] { cursor: not-allowed; opacity: .63 }
.empty { padding: 36px 22px 40px; border-top: 1px solid var(--border); color: var(--muted) }
.empty strong { display: block; font-size: 17px; color: var(--ink) }
.empty p { margin-top: 5px }
.more { padding: 14px 21px; border-top: 1px solid var(--border) }
.login-layout { display: grid; grid-template-columns: 1fr .9fr; min-height: 525px; margin: 38px 0 0; background: var(--white); border: 1px solid var(--border); border-radius: 25px; overflow: hidden }
.login-art { padding: 49px 42px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; background: var(--green); color: #fff }
.login-art h1 { font-size: clamp(36px, 5.5vw, 66px); letter-spacing: -.07em }
.login-art p { max-width: 35ch; margin-top: 15px; color: #e5f1e9; font-size: 16px }
.login-flow { display: grid; gap: 0; border: 1px solid #739083; border-radius: var(--radius); overflow: hidden }
.login-flow span { display: flex; gap: 12px; align-items: center; padding: 12px 15px; min-height: 49px; font-weight: 630 }
.login-flow span + span { border-top: 1px solid #739083 }
.login-flow i { width: 8px; height: 8px; background: var(--lime); border-radius: 50% }
.login-box { display: grid; align-items: center; padding: 43px min(6vw, 67px) }
.login-box h2 { font-size: 31px; letter-spacing: -.05em; margin-bottom: 5px }
.login-box .subtle { margin-bottom: 18px }
.login-box .btn { width: 100%; margin-top: 8px }
form { display: grid; gap: 14px }
.field { display: grid; gap: 4px; min-width: 0; align-content: start; font-size: 14px; color: var(--ink); font-weight: 660 }
.field small { font-size: 13px; color: var(--muted); font-weight: 500 }
input, select, textarea { width: 100%; min-width: 0; min-height: 46px; padding: 9px 11px; border: 1px solid #b8c8ba; background: #fff; color: var(--ink); border-radius: 9px; font-size: 16px; font-weight: 500 }
select:disabled, input:disabled { background: var(--paper); color: var(--muted) }
textarea { resize: vertical; min-height: 80px }
::placeholder { color: #5e6c61; opacity: 1 }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.field.span { grid-column: 1 / -1 }
.form-error { color: var(--error); font-size: 14px; font-weight: 620; padding: 8px 10px; background: #faeeeb; border-radius: 8px; overflow-wrap: anywhere }
.form-error:empty { display: none }
dialog { width: min(710px, calc(100% - 24px)); max-height: min(880px, 94dvh); padding: 0; border: 1px solid var(--border); border-radius: 19px; color: var(--ink); background: var(--white); box-shadow: 0 20px 80px #12231f45 }
dialog::backdrop { background: #14291fcc }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 10px; align-items: center; background: white; padding: 15px 22px; border-bottom: 1px solid var(--border) }
.sheet-head h2 { font-size: 24px; letter-spacing: -.04em }
.sheet-body { padding: 20px 22px 24px; display: grid; gap: 14px }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end }
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end }
.rows { display: grid; gap: 8px }
.item { padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); display: grid; gap: 8px; overflow-wrap: anywhere }
.item-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between }
.item-head .btn { min-height: 42px; font-size: 14px }
.item small { color: var(--muted) }
.total { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; background: var(--green-light); padding: 11px 13px; border-radius: 9px }
.total strong { font-size: 23px; font-variant-numeric: tabular-nums }
.requisites, .admin-group { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px }
summary { cursor: pointer; min-height: 38px; line-height: 38px; font-weight: 670 }
.requisites[open] summary { margin-bottom: 6px }
.factual { max-width: 240px }
.checklist { display: flex; flex-wrap: wrap; gap: 5px 13px; margin: 0; padding: 7px 11px; border: 1px solid var(--border); border-radius: 10px }
.check { display: flex; align-items: center; gap: 7px; min-height: 43px }
.check input { width: 18px; min-height: 18px; accent-color: var(--green) }
.admin-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 21px; border-top: 1px solid var(--border); overflow-wrap: anywhere }
.admin-row strong { display: block }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end }
.admin-bar .field { min-width: min(240px, 100%) }
.notice { position: fixed; z-index: 2; right: 20px; bottom: 20px; max-width: min(450px, calc(100vw - 40px)); padding: 12px 17px; background: var(--green-dark); color: white; box-shadow: 0 8px 30px #1d493b33; border-radius: 11px }
.notice.error { background: #812924 }

@media (max-width: 760px) {
  .top-inner, .wrap { padding-inline: 18px }
  .login-layout { margin-top: 3px; grid-template-columns: 1fr; min-height: 0 }
  .login-flow { display: none }
  .login-art, .login-box { padding: 24px }
  .login-art h1 { font-size: clamp(31px, 7vw, 53px) }
  .login-art p { margin-top: 9px }
  .hero { align-items: start; flex-direction: column; padding: 19px 20px 22px }
  .record { grid-template-columns: 1fr auto; gap: 7px 13px }
  .record-heading, .record .status { grid-column: 1 }
  .record .money { grid-column: 2; grid-row: 1; align-self: start }
  .record .record-button { grid-column: 2; grid-row: 2; justify-self: end }
}
@media (max-width: 410px) {
  .top-inner, .wrap { padding-inline: 13px }
  .top-inner { min-height: 64px }
  .brand { font-size: 21px; gap: 7px }
  .session { gap: 0 }
  .session-name { display: none }
  .panel-head, .record, .admin-row { padding-inline: 13px }
  .tabs { padding-inline: 8px }
  .sheet-head, .sheet-body { padding-inline: 13px }
  .form-grid { gap: 7px }
}
