:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #101113;
    color: #f6f5f2;
    font-synthesis: none;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 12% 0%, rgba(71, 198, 165, .14), transparent 34rem),
        #101113;
}

button, input, select { font: inherit; }
[hidden] { display: none !important; }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 36px; }
.login-card { width: min(420px, 100%); margin: 8vh auto; padding: 36px; border: 1px solid #303237; border-radius: 24px; background: rgba(25, 27, 30, .94); box-shadow: 0 28px 100px #0006; }
.brand-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: #baf3d8; color: #10271d; font-size: 28px; font-weight: 800; }
.brand-mark.small { width: 44px; height: 44px; border-radius: 14px; font-size: 23px; }
.eyebrow { margin: 0 0 8px; color: #9caa9f; font-size: 11px; font-weight: 750; letter-spacing: .16em; }
.login-card .eyebrow { margin-top: 24px; color: #baf3d8; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 27px; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.025em; }
.muted, .hint { color: #a4a6aa; line-height: 1.55; }
.stack { display: grid; gap: 17px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #d8d9d8; font-size: 13px; font-weight: 650; }
input, select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #393c40; border-radius: 11px; outline: none; background: #141619; color: #f6f5f2; }
input:focus, select:focus { border-color: #91d6b9; box-shadow: 0 0 0 3px #91d6b922; }
.button { min-height: 42px; padding: 0 16px; border: 1px solid #393c40; border-radius: 11px; background: #24272a; color: #f6f5f2; font-weight: 700; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); background: #303438; }
a.button { display: inline-flex; align-items: center; text-decoration: none; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.button.primary { border-color: #baf3d8; background: #baf3d8; color: #10271d; }
.button.primary:hover { background: #d1ffe9; }
.button.quiet { background: transparent; }
.button.danger { border-color: #683b3d; color: #ffb8b3; background: #3a2225; }
.small-button { min-height: 34px; padding: 0 11px; font-size: 12px; }
.topbar, .brand, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar { margin-bottom: 28px; }
.brand { justify-content: flex-start; }
.brand .eyebrow { margin-bottom: 4px; }
.brand h1 { margin: 0; font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card, .panel-card { border: 1px solid #303237; border-radius: 18px; background: rgba(25, 27, 30, .9); }
.stat-card { display: grid; gap: 12px; padding: 20px 22px; color: #aeb0b3; font-size: 13px; }
.stat-card strong { color: #f6f5f2; font-size: 30px; letter-spacing: -.04em; }
.panel-card { margin-top: 18px; padding: 24px; }
.section-heading { margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; color: #baf3d8; font-size: 12px; }
.status-dot::before { width: 7px; height: 7px; border-radius: 50%; background: #82e3b7; content: ""; box-shadow: 0 0 14px #82e3b7; }
.create-form { display: grid; grid-template-columns: 1.2fr .8fr 1fr auto; align-items: end; gap: 13px; }
.hint { margin: 14px 0 0; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; white-space: nowrap; }
th { padding: 0 12px 12px; color: #909398; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 14px 12px; border-top: 1px solid #303237; }
.pill { display: inline-block; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.positive { background: #183b2e; color: #a8f1cc; }
.muted-pill { background: #303237; color: #b3b5b9; }
.muted { color: #989a9f; }
.empty { padding: 28px 12px; color: #9b9da2; text-align: center; }
.notice { padding: 12px 14px; border-radius: 11px; font-size: 13px; }
.error { border: 1px solid #693d40; background: #351f22; color: #ffb8b3; }
.created-code { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 18px 20px; border: 1px solid #2d684d; border-radius: 16px; background: #183127; }
.created-code .eyebrow { color: #a8f1cc; }
.created-code code { display: block; margin: 8px 0; color: #effff6; font-size: clamp(17px, 4vw, 25px); font-weight: 750; letter-spacing: .08em; overflow-wrap: anywhere; }
.created-code .muted { margin: 0; font-size: 12px; }
footer { padding: 24px 0 0; color: #777a7f; font-size: 12px; text-align: center; }

@media (max-width: 820px) {
    .create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .create-form .button { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .shell { width: min(100% - 24px, 1120px); padding-top: 24px; }
    .login-card { padding: 26px 22px; }
    .stats { gap: 10px; }
    .stat-card { padding: 16px; }
    .panel-card { padding: 18px 14px; }
    .topbar { align-items: flex-start; }
    .create-form { grid-template-columns: 1fr; }
    .create-form .button { grid-column: auto; }
}
