:root {
  --ink: #172521;
  --muted: #687873;
  --paper: #f4f6f0;
  --surface: #fffdf8;
  --line: #dfe6dd;
  --green: #163c34;
  --green-2: #236556;
  --lime: #c8ee72;
  --amber: #f6b64c;
  --red: #d75842;
  --blue: #3377cc;
  --shadow: 0 18px 50px rgba(22, 60, 52, .10);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 85% 0%, rgba(200, 238, 114, .22), transparent 30rem), var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 520px); }
.auth__story { padding: clamp(36px, 7vw, 100px); background: var(--green); color: white; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.auth__story::after { content: ""; position: absolute; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; right: -220px; bottom: -250px; box-shadow: 0 0 0 70px rgba(255,255,255,.04), 0 0 0 140px rgba(255,255,255,.03); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: -.02em; }
.brand__mark { width: 38px; height: 38px; border-radius: 12px 12px 18px 12px; display: grid; place-items: center; background: var(--lime); color: var(--green); font-weight: 900; box-shadow: inset 0 -4px 10px rgba(22,60,52,.13); }
.auth__story h1 { font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; max-width: 780px; margin: 40px 0 24px; }
.auth__story p { max-width: 630px; color: rgba(255,255,255,.72); line-height: 1.65; font-size: 17px; }
.auth__checks { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.auth__checks span { padding: 10px 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: rgba(255,255,255,.8); font-size: 13px; }
.auth__panel { display: grid; place-items: center; padding: 34px; }
.auth__card { width: min(100%, 410px); }
.auth__card h2 { font-size: 32px; letter-spacing: -.04em; margin: 0 0 10px; }
.auth__card > p { color: var(--muted); line-height: 1.6; margin-bottom: 30px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label, .field__label { color: #43544f; font-size: 13px; font-weight: 680; }
.input, .select, .textarea { width: 100%; border: 1px solid #ced8cf; border-radius: 12px; padding: 12px 14px; color: var(--ink); background: white; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(35,101,86,.1); }
.textarea { min-height: 100px; resize: vertical; }
.button { border: 0; border-radius: 12px; padding: 11px 16px; background: var(--green); color: white; font-weight: 720; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, opacity .15s, background .15s; }
.button:hover { transform: translateY(-1px); background: #205347; }
.button:disabled { opacity: .45; cursor: wait; transform: none; }
.button--wide { width: 100%; padding: 14px 18px; }
.button--light { background: white; color: var(--ink); border: 1px solid var(--line); }
.button--light:hover { background: #f8faf6; }
.button--soft { background: #e7efe8; color: var(--green); }
.button--soft:hover { background: #dce9df; }
.button--danger { background: var(--red); }
.button--small { padding: 8px 11px; font-size: 13px; border-radius: 10px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--green); color: white; padding: 24px 18px; display: flex; flex-direction: column; z-index: 10; }
.sidebar .brand { padding: 4px 7px 24px; }
.nav { display: grid; gap: 5px; margin-top: 24px; }
.nav button { background: transparent; border: 0; color: rgba(255,255,255,.68); text-align: left; padding: 11px 13px; border-radius: 11px; display: flex; gap: 10px; align-items: center; font-weight: 620; }
.nav button:hover, .nav button.is-active { background: rgba(255,255,255,.10); color: white; }
.nav__icon { width: 21px; text-align: center; }
.sidebar__user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 8px 3px; }
.sidebar__user strong { display: block; font-size: 14px; }
.sidebar__user span { display: block; color: rgba(255,255,255,.56); font-size: 12px; margin: 3px 0 12px; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user button { color: rgba(255,255,255,.7); border: 0; background: none; padding: 0; font-size: 13px; }
.main { min-width: 0; padding: 34px clamp(22px, 4vw, 58px) 70px; }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1; letter-spacing: -.05em; margin: 0 0 9px; }
.page-head p { color: var(--muted); margin: 0; max-width: 760px; line-height: 1.55; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 26px; }
.metric { background: var(--surface); border: 1px solid rgba(212,221,211,.8); border-radius: 17px; padding: 19px; box-shadow: 0 8px 28px rgba(22,60,52,.045); }
.metric__label { color: var(--muted); font-size: 13px; }
.metric__value { font-size: 30px; font-weight: 780; letter-spacing: -.04em; margin: 9px 0 2px; }
.metric__note { font-size: 12px; color: #89958f; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 16px; }
.card { grid-column: span 12; background: var(--surface); border: 1px solid rgba(212,221,211,.86); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 35px rgba(22,60,52,.05); min-width: 0; }
.card--7 { grid-column: span 7; }
.card--5 { grid-column: span 5; }
.card--4 { grid-column: span 4; }
.card--8 { grid-column: span 8; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card__head h2, .card h2 { margin: 0; letter-spacing: -.03em; font-size: 20px; }
.card__head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.store-list { display: grid; gap: 11px; }
.store-row { padding: 15px; background: #f7f9f4; border-radius: 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; }
.store-row strong { display: block; }
.store-row small { color: var(--muted); display: block; margin-top: 4px; }
.store-row__actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; background: #edf1ec; color: #53645e; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8d9b96; }
.status--verified::before, .status--ready::before, .status--active::before { background: #35a26f; }
.status--prepared::before, .status--awaiting_observation::before, .status--awaiting_site::before { background: var(--blue); }
.status--attention::before, .status--site_mismatch::before, .status--partial::before { background: var(--amber); }
.status--failed::before, .status--uncertain::before, .status--stale::before { background: var(--red); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 13px; }
.table th { color: var(--muted); font-weight: 650; text-align: left; padding: 11px 13px; background: #f5f7f3; position: sticky; top: 0; }
.table td { padding: 12px 13px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: #fbfcf8; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 690; }
.muted { color: var(--muted); }
.empty { padding: 42px 22px; text-align: center; color: var(--muted); border: 1px dashed #ccd6cd; border-radius: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.form-grid .field--wide { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.notice { padding: 14px 16px; border-radius: 13px; background: #eef5e0; color: #365025; border: 1px solid #dceaae; line-height: 1.5; font-size: 13px; }
.notice--warn { background: #fff5dd; border-color: #f3d99b; color: #725019; }
.notice--danger { background: #fff0ec; border-color: #efc3ba; color: #7a3428; }
.job { border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; margin-bottom: 10px; cursor: pointer; transition: transform .15s, border-color .15s; }
.job:hover { transform: translateY(-1px); border-color: #b8c8bb; }
.job h3 { margin: 0 0 5px; font-size: 15px; }
.job p { margin: 0; color: var(--muted); font-size: 12px; }
.preview { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.preview__meta strong { display: block; font-size: 14px; }
.preview__meta small { color: var(--muted); }
.file-drop { border: 1.5px dashed #b7c6b9; border-radius: 14px; padding: 22px; text-align: center; background: #fafbf7; }
.file-drop input { width: 100%; }
.token { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #eef1ea; border-radius: 10px; padding: 12px; word-break: break-all; user-select: all; margin: 12px 0; }
.modal { width: min(620px, calc(100% - 28px)); border: 0; border-radius: 20px; padding: 26px; box-shadow: var(--shadow); color: var(--ink); }
.modal::backdrop { background: rgba(13, 33, 28, .55); backdrop-filter: blur(3px); }
.modal__close { float: right; border: 0; background: #edf1ec; border-radius: 50%; width: 32px; height: 32px; font-size: 20px; }
.modal h2 { margin: 3px 42px 9px 0; letter-spacing: -.03em; }
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--green); color: white; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 430px; transform: translateY(100px); opacity: 0; transition: .2s; z-index: 100; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast.is-error { background: #8e392d; }
.mobile-head { display: none; }
.loader { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.25); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card--7,.card--5,.card--4,.card--8 { grid-column: span 12; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth__story { min-height: 340px; padding: 32px 25px; }
  .auth__story h1 { font-size: 45px; margin-top: 45px; }
  .auth__checks { display: none; }
  .auth__panel { padding: 38px 22px 60px; }
  .shell { display: block; }
  .sidebar { position: fixed; width: min(82vw,280px); transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--green); color: white; position: sticky; top: 0; z-index: 9; }
  .mobile-head button { border: 0; background: rgba(255,255,255,.12); color: white; border-radius: 9px; padding: 8px 10px; }
  .main { padding: 26px 18px 60px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric__value { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field--wide { grid-column: auto; }
  .store-row { grid-template-columns: 1fr; }
  .store-row__actions { justify-content: flex-start; }
}

