:root {
    color-scheme: light;
    --ink: #101828;
    --muted: #667085;
    --line: #d9dee7;
    --surface: #ffffff;
    --canvas: #f3f5f8;
    --orange: #f7814a;
    --orange-dark: #d95f29;
    --orange-soft: #fff0e8;
    --green: #14866d;
    --red: #b42318;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--canvas);
}
button, input, select, textarea { font: inherit; }
.topbar {
    min-height: 68px;
    padding: 12px clamp(18px, 4vw, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #6f7278;
    font-weight: 750;
    text-decoration: none;
}
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand strong { color: var(--orange); }
.brand small { color: var(--muted); font-weight: 600; }
.page {
    width: min(1500px, calc(100% - 36px));
    margin: 30px auto 60px;
}
.page-auth {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
}
.panel {
    padding: clamp(22px, 3vw, 38px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}
.auth-panel { width: min(520px, 100%); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 46px); letter-spacing: 0; }
h2 { margin-bottom: 4px; font-size: 24px; letter-spacing: 0; }
p { line-height: 1.55; color: var(--muted); }
.dashboard-head {
    margin-bottom: 26px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
}
.key-state {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 650;
}
.status-dot {
    width: 9px;
    height: 9px;
    margin-right: 7px;
    display: inline-block;
    border-radius: 50%;
    background: var(--red);
}
.key-state.is-ok .status-dot { background: var(--green); }
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.7fr);
    gap: 22px;
}
.dashboard-grid + .panel, .panel + .panel { margin-top: 22px; }
.section-heading {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.step {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--orange);
    color: white;
    font-weight: 800;
}
.form-stack, .form-grid { display: grid; gap: 18px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }
label {
    display: grid;
    gap: 7px;
    color: #475467;
    font-weight: 650;
}
label small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 450;
    line-height: 1.45;
}
input, select, textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--orange);
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(247, 129, 74, 0.2);
}
textarea { resize: vertical; }
input[type="file"] { padding: 9px; border-color: var(--line); }
.button {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--orange);
    border-radius: 6px;
    background: var(--orange);
    color: #fff;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button-secondary { background: #fff; color: var(--orange-dark); }
.button-secondary:hover { color: #fff; }
.button-quiet { min-height: 38px; background: #fff; color: var(--ink); border-color: var(--line); }
.button-quiet:hover { color: #fff; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.action-row { display: flex; justify-content: flex-end; }
.demo-limit { transition: opacity 160ms ease; }
.demo-limit.is-muted { opacity: 0.48; }
.summary-panel { align-self: start; }
.process-list {
    margin: 24px 0;
    padding: 0;
    display: grid;
    gap: 18px;
    list-style: none;
}
.process-list li {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: start;
    gap: 10px;
    color: #344054;
    line-height: 1.45;
}
.process-list span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-weight: 750;
}
.independence-note {
    padding: 18px;
    border-left: 4px solid var(--green);
    background: #f2faf7;
}
.independence-note p { margin: 6px 0 0; }
.notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-left: 4px solid var(--green);
    background: #ecf8f4;
}
.notice-error { border-color: var(--red); background: #fff1f0; color: var(--red); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
tr.is-new { background: var(--orange-soft); }
.new-label {
    margin-left: 8px;
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--orange);
    color: white;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.empty-state { padding: 22px; border: 1px dashed var(--line); text-align: center; }
.product-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
    gap: 30px;
}
.product-list { display: grid; align-content: start; gap: 10px; }
.product-row {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.product-row div { display: grid; gap: 4px; }
.product-row span { color: var(--muted); font-size: 13px; }
footer {
    padding: 24px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 900px) {
    .dashboard-grid, .product-layout { grid-template-columns: 1fr; }
    .dashboard-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
    .page { width: min(100% - 20px, 1500px); margin-top: 16px; }
    .topbar { padding: 10px 14px; }
    .brand span { font-size: 14px; }
    .brand img { width: 28px; height: 28px; }
    .panel { padding: 20px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .action-row { justify-content: stretch; }
    .action-row .button { width: 100%; }
    .key-state { width: 100%; }
}
