:root {
    --night: #0B1020;
    --blue: #3568FF;
    --cyan: #17C9D4;
    --violet: #745CFF;
    --cloud: #F4F7FC;
    --slate: #64748B;
    --white: #FFFFFF;
    --green: #22C55E;
    --yellow: #F59E0B;
    --red: #EF4444;
    --critical: #DC2626;
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cloud); color: var(--night); }
a { color: inherit; }
code { background: #e8edf7; border-radius: 6px; padding: 2px 6px; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px clamp(16px, 4vw, 48px);
    background: var(--white);
    border-bottom: 1px solid #dfe7f5;
    position: sticky;
    top: 0;
    z-index: 5;
}
.brand { font-weight: 900; text-decoration: none; font-size: 1.35rem; color: var(--blue); }
nav { display: flex; gap: 14px; align-items: center; }
nav a { text-decoration: none; color: var(--slate); font-weight: 700; }
.page { width: min(1120px, calc(100% - 32px)); margin: 32px auto; }

.hero {
    padding: clamp(32px, 7vw, 84px);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--night), #152556 60%, var(--blue));
    color: var(--white);
}
.hero.compact { padding: clamp(28px, 5vw, 52px); }
.hero h1 { max-width: 820px; margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.05; letter-spacing: 0; }
.hero p { max-width: 720px; color: #d8e3ff; font-size: 1.1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: var(--cyan); }

.grid { display: grid; gap: 18px; margin-top: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .card, .authbox {
    background: var(--white);
    border: 1px solid #dfe7f5;
    border-radius: 8px;
    padding: 22px;
    margin-top: 18px;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card h2, .card h3, .panel h2 { margin-top: 0; }
.dashboard-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.authbox { max-width: 460px; margin: 48px auto; }

form { display: grid; gap: 12px; }
form.inline { display: inline; }
label { display: grid; gap: 6px; color: var(--slate); font-weight: 800; }
input, select, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    font: inherit;
    background: var(--white);
}
textarea { min-height: 88px; }
button, .button {
    border: 0;
    background: var(--blue);
    color: var(--white);
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.button.ghost, button.ghost { background: #e8edf7; color: var(--night); }
.button.small, button.small { padding: 8px 12px; font-size: .92rem; }
.danger-button { background: var(--critical); }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.actions.wrap { flex-wrap: wrap; }

.notice { padding: 14px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 800; }
.notice.success { background: #dcfce7; color: #166534; }
.notice.danger { background: #fee2e2; color: #991b1b; }
.hint { color: var(--slate); font-weight: 800; }

.status {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 8px;
}
.green { background: var(--green); }
.yellow { background: var(--yellow); }
.red { background: var(--red); }
.blue { background: var(--blue); }
.gray { background: #94a3b8; }

.progress { height: 14px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress span { display: block; height: 100%; }
.progress .success { background: var(--green); }
.progress .warning { background: var(--yellow); }
.progress .danger { background: var(--red); }

.list { display: grid; gap: 10px; }
.row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid #edf2f7;
}
.linkrow { text-decoration: none; }
.table { display: grid; gap: 0; overflow-x: auto; }
.tr { display: grid; grid-template-columns: 1.4fr .7fr 1fr .45fr .45fr 1.8fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf2f7; min-width: 980px; }
.th { font-weight: 900; color: var(--slate); }
.admin-actions { display: grid; gap: 8px; }
.upload input[type=file] { padding: 28px; border: 2px dashed #b9c6dd; background: #f8fbff; }

@media (max-width: 820px) {
    .grid.two, .grid.three { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
    .topbar { align-items: flex-start; gap: 12px; flex-direction: column; }
    nav { flex-wrap: wrap; }
    .row { align-items: flex-start; flex-direction: column; }
}
