:root {
    color-scheme: light;
    --ink: #202b2a;
    --muted: #697674;
    --paper: #f5f7f4;
    --surface: #ffffff;
    --line: #dce4df;
    --green: #176b59;
    --green-deep: #104e43;
    --mint: #e4f1eb;
    --coral: #bc5848;
    --coral-pale: #fae9e4;
    --gold: #a57a2b;
    --radius: 7px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Aptos", "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: var(--green-deep); color: white; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; letter-spacing: .02em; }
.brand strong { color: #a9d8be; font-weight: 700; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid #78ad94; border-radius: 50%; color: #d1ebdd; font: 600 11px Georgia, serif; }
.topbar-tools { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.status-dot { color: #d5e9de; }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #8fd09d; }
.logout { color: #e6f0ea; border-bottom: 1px solid #8eafa0; padding-bottom: 2px; }
.workspace { display: grid; grid-template-columns: 208px minmax(0, 1fr); max-width: 1600px; min-height: calc(100vh - 64px); margin: 0 auto; }
.rail { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 38px 20px; border-right: 1px solid var(--line); background: #eef3ef; }
.rail-label, .eyebrow { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.rail-label { padding: 0 12px 10px; }
.rail-link { padding: 10px 12px; color: #52615e; border-radius: 5px; }
.rail-link.active { color: var(--green-deep); background: #dcebe2; font-weight: 700; }
.rail-foot { position: absolute; bottom: 28px; left: 32px; color: #83918c; font-size: 10px; line-height: 1.8; letter-spacing: .1em; }
.content { min-width: 0; padding: 42px clamp(22px, 4vw, 64px) 28px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font: 500 34px/1.15 Georgia, "Times New Roman", serif; letter-spacing: 0; }
h2 { margin: 0; font: 500 21px/1.2 Georgia, "Times New Roman", serif; letter-spacing: 0; }
.muted { margin: 0; color: var(--muted); }
.date-stamp { color: #63716e; font-size: 12px; text-transform: capitalize; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel { min-width: 0; padding: 21px 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.panel-index { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--mint); color: var(--green); font: 600 11px Georgia, serif; }
.panel-heading .eyebrow { margin: 1px 0 4px; font-size: 9px; }
.stack-form { display: grid; gap: 13px; }
.stack-form label { display: grid; gap: 6px; color: #465452; font-size: 12px; font-weight: 600; }
.stack-form input, .stack-form select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #cfd9d3; border-radius: 4px; outline: none; background: #fff; color: var(--ink); font-weight: 400; }
.stack-form input:focus, .stack-form select:focus { border-color: var(--green); box-shadow: 0 0 0 3px #176b5917; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.optional { color: #87918e; font-size: 10px; font-weight: 400; }
.field-note { margin: -4px 0 0; color: #74807d; font-size: 11px; }
.button { min-height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 13px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; }
.button.primary { justify-self: start; margin-top: 3px; background: var(--green); color: white; }
.button.primary:hover:not(:disabled) { background: var(--green-deep); }
.button.secondary { border-color: var(--line); background: white; color: var(--green-deep); }
.data-section { margin-top: 38px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; min-width: 660px; border-collapse: collapse; text-align: left; }
th { padding: 11px 14px; background: #edf3ef; color: #697673; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
td { padding: 12px 14px; border-top: 1px solid #e8ede9; color: #596562; font-size: 12px; vertical-align: middle; }
.primary-cell { color: var(--ink); font-weight: 700; }
.url-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.tag-active { background: var(--mint); color: var(--green-deep); }
.tag-inactive { background: #edf0ef; color: #68736f; }
.empty { padding: 18px 14px; color: #82908b; text-align: center; }
.small { font-size: 11px; }
code { color: var(--green-deep); font-size: 11px; }
.error-cell { max-width: 250px; color: var(--coral); }
.retry-button { min-width: 32px; min-height: 32px; padding: 3px; border-color: #e4c9c2; background: var(--coral-pale); color: #994536; font-size: 17px; }
.notice { position: sticky; z-index: 2; top: 12px; margin: 0 0 16px; padding: 11px 14px; border: 1px solid #bddbcc; border-radius: 5px; background: #edf7f0; color: var(--green-deep); }
.notice.error { border-color: #efc8bd; background: #fff0eb; color: #973c2d; }
.page-footer { margin-top: 42px; padding-top: 15px; border-top: 1px solid var(--line); color: #86918e; font-size: 11px; }
.page-footer span { padding: 0 6px; color: var(--coral); }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(ellipse at 20% 0%, #dcece1 0, transparent 42%), var(--paper); }
.login-shell { width: min(100%, 420px); padding: 36px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 20px 60px #20382a12; }
.login-shell .brand-mark { width: 46px; height: 46px; margin-bottom: 25px; background: var(--green-deep); color: #d1ebdd; }
.login-shell h1 { font-size: 30px; }
.login-shell > .muted { margin-bottom: 25px; }
.login-shell .button { width: 100%; margin-top: 7px; }
.login-page { background: radial-gradient(ellipse at 20% 0%, #f5e9bd 0, transparent 42%), #f8f9fa; color: #111; font-family: Inter, "Segoe UI", sans-serif; }
.login-shell { border-color: #e3e6e8; border-radius: 8px; box-shadow: 0 20px 60px rgb(17 17 17 / 8%); }
.login-brand { display: grid; width: 100%; height: 94px; place-items: center; margin-bottom: 23px; overflow: hidden; border-radius: 6px; background: #111; }
.login-brand img { width: 120px; height: 90px; object-fit: contain; }
.login-shell .eyebrow { color: #927000; }
.login-shell h1 { color: #111; font-family: Inter, "Segoe UI", sans-serif; font-size: 28px; font-weight: 700; }
.login-shell .stack-form label { color: #40474b; }
.login-shell .stack-form input:focus { border-color: #d4a000; box-shadow: 0 0 0 3px rgb(245 184 19 / 18%); }
.login-shell .button.primary { background: #111; color: #fff; }
.login-shell .button.primary:hover:not(:disabled) { background: #f5b813; color: #111; }

@media (max-width: 900px) {
    .workspace { grid-template-columns: 1fr; }
    .rail { flex-direction: row; align-items: center; gap: 8px; padding: 10px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
    .rail-label { padding: 0 8px; }
    .rail-link { padding: 8px 10px; }
    .rail-foot { position: static; margin-left: auto; text-align: right; }
    .content { padding-top: 30px; }
}
@media (max-width: 620px) {
    .topbar { height: 58px; padding: 0 16px; }
    .topbar-tools { gap: 12px; }
    .status-dot { font-size: 0; }
    .status-dot::before { margin-right: 0; }
    .workspace { min-height: calc(100vh - 58px); }
    .rail { gap: 3px; padding: 8px 12px; }
    .rail-label { display: none; }
    .rail-link { padding: 8px; font-size: 11px; }
    .rail-foot { font-size: 8px; }
    .content { padding: 26px 15px 22px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    h1 { font-size: 30px; }
    .form-grid { grid-template-columns: 1fr; }
    .panel { padding: 18px 16px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .login-shell { padding: 27px 22px; }
}