:root {
    color-scheme: dark;
    font-family: Inter, 'Segoe UI', Arial, sans-serif;
    background: #0d1119;
    color: #edf2fc;
    font-synthesis: none;
    line-height: 1.5;
    --surface: #161e2c;
    --bar: #101620;
    --field: #0e1520;
    --muted: #a9b8cf;
    --line: #2a384f;
    --control-line: #536782;
    --blue: #5279f5;
    --blue-hover: #6a8dff;
    --accent-text: #9cb6ff;
    --button-text: #090f1c;
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 0; margin: 0; }
h1, h2, h3, p, ul { margin: 0; }
button, input, select { font: inherit; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }

.shell { width: min(100% - 48px, 1080px); margin-inline: auto; }
.topbar { background: var(--bar); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 750; font-size: 1.08rem; white-space: nowrap; }
.topbar-label, .profile { color: var(--muted); font-size: .875rem; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile span, .service-info { min-width: 0; overflow-wrap: anywhere; }

.auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100svh - 71px);
    padding: 32px 20px 72px;
    background: radial-gradient(ellipse at 50% 24%, #19263e, #0d1119 69%);
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.login { width: min(100%, 420px); padding: clamp(24px, 7vw, 40px); box-shadow: 0 20px 52px #02050d66; }
h1 { font-size: clamp(1.65rem, 4vw, 2.1rem); letter-spacing: -.032em; line-height: 1.18; }
.login h1 { margin-bottom: 28px; }
h2 { font-size: 1.125rem; line-height: 1.3; }
h3 { font-size: 1rem; }
.text-link { font-weight: 600; }

.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .875rem; }
.form input, .form select {
    appearance: auto;
    min-height: 46px;
    width: 100%;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid var(--control-line);
    border-radius: 8px;
    background: var(--field);
    color: inherit;
    font-size: 1rem;
    font-weight: 400;
}
.form .button { margin-top: 4px; }
.button {
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--blue);
    color: var(--button-text);
    font-weight: 650;
    font-size: .925rem;
    cursor: pointer;
}
.button:hover { background: var(--blue-hover); }
.button.secondary { color: #d8e3f6; background: var(--surface); border-color: var(--control-line); }
.button.secondary:hover { background: #23324a; }
.button.small { min-height: 38px; padding: 7px 12px; font-size: .85rem; }

.content { padding-block: 46px 70px; }
.content > h1 { margin-bottom: 24px; }
.notice { margin-bottom: 20px; border-radius: 8px; background: #16352b; color: #97e1b6; padding: 11px 14px; font-size: .925rem; }
.notice.error { background: #391f2b; color: #ffb5c0; }
.empty, .muted { color: var(--muted); }
.empty { padding: 18px 22px; }
.service-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.service { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; }
.service-info p { margin-top: 3px; font-size: .925rem; }
.service-status, .pending { color: #f4cb87; }
.pending { padding: 7px 10px; border-radius: 8px; background: #372914; font-size: .875rem; }
.dashboard-section + .dashboard-section { margin-top: 30px; }
.dashboard-section > h2, .editor > h2 { margin-bottom: 14px; }
.admin-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.editor { padding: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 620px) {
    .shell { width: calc(100% - 32px); }
    .topbar-inner { min-height: 60px; }
    .auth-shell { min-height: calc(100svh - 61px); }
    .content { padding-block: 32px 56px; }
    .admin-forms { grid-template-columns: 1fr; }
    .service { flex-direction: column; align-items: flex-start; }
}
