:root {
    --blue: #1e73e8;
    --blue-dark: #0d4eb7;
    --blue-soft: #e9f4ff;
    --sky: #f5fbff;
    --ink: #0d1b35;
    --muted: #667085;
    --line: #e5edf6;
    --bg: #f6f9fc;
    --white: #ffffff;
    --green: #0c9b62;
    --red: #d33b3b;
    --orange: #c27803;
    --shadow: 0 18px 50px rgba(16, 45, 84, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(30, 115, 232, 0.18), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(41, 190, 210, 0.16), transparent 28%),
        #f8fbff;
}

.login-shell {
    width: min(1040px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1.1fr 430px;
    gap: 48px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), #5bb7ff);
    color: white;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand strong {
    display: block;
    font-size: 18px;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.brand-login {
    margin-bottom: 36px;
}

.login-copy h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    margin: 0 0 22px;
    max-width: 650px;
}

.login-copy p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
    max-width: 560px;
    margin: 0;
}

.login-panel,
.panel,
.stats-grid article {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.login-panel {
    border-radius: 32px;
    padding: 34px;
}

.login-panel h2,
.panel h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.login-panel p {
    color: var(--muted);
    margin: 8px 0 24px;
}

label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    color: var(--ink);
    background: white;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(30, 115, 232, 0.5);
    box-shadow: 0 0 0 4px rgba(30, 115, 232, 0.10);
}

button,
.login-panel button,
.form-grid button {
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    background: var(--blue);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    background: var(--blue-dark);
}

.form-note {
    display: block;
    margin-top: 16px;
    color: var(--muted);
}

.admin-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    background: #07172e;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    margin-bottom: 34px;
}

.sidebar .brand small {
    color: rgba(255, 255, 255, 0.62);
}

.nav {
    display: grid;
    gap: 8px;
}

.nav a {
    padding: 13px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.nav a:hover,
.nav a.is-active {
    background: rgba(255, 255, 255, 0.10);
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 4px;
    color: white;
}

.sidebar-footer small {
    color: rgba(255, 255, 255, 0.58);
}

.sidebar-footer a {
    margin-top: 12px;
    color: #9ed0ff;
    font-weight: 700;
}

.main {
    padding: 30px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 28px;
}

.topbar h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
    letter-spacing: -0.06em;
    margin: 4px 0 0;
}

.eyebrow {
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.topbar-link,
.ghost-button {
    border: 1px solid var(--line);
    background: white;
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--blue);
    font-weight: 800;
}

.menu-button {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stats-grid article {
    border-radius: 24px;
    padding: 22px;
}

.stats-grid span,
.stats-grid small {
    color: var(--muted);
}

.stats-grid strong {
    display: block;
    font-size: 34px;
    letter-spacing: -0.06em;
    margin: 8px 0 4px;
}

.split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.panel {
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 20px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.section-head p {
    color: var(--muted);
    margin: 8px 0 0;
}

.section-head a {
    color: var(--blue);
    font-weight: 800;
}

.list,
.timeline,
.review-list {
    display: grid;
    gap: 12px;
}

.list-row,
.review-item {
    border: 1px solid var(--line);
    background: #fbfdff;
    border-radius: 20px;
    padding: 16px;
}

.list-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.list-row small,
.timeline small,
td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.timeline div {
    border-left: 2px solid var(--blue-soft);
    padding-left: 14px;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    background: #eef2f7;
    color: #475467;
}

.status-success {
    background: #e7f8ef;
    color: var(--green);
}

.status-warning {
    background: #fff7e6;
    color: var(--orange);
}

.status-danger {
    background: #fff0f0;
    color: var(--red);
}

.empty {
    color: var(--muted);
    background: #fbfdff;
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 18px;
}

.alert {
    border-radius: 16px;
    padding: 13px 14px;
    margin: 0 0 18px;
    font-weight: 700;
}

.alert-success {
    background: #e7f8ef;
    color: var(--green);
}

.alert-danger {
    background: #fff0f0;
    color: var(--red);
}

.alert-warning {
    background: #fff7e6;
    color: var(--orange);
}

.review-item {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

.review-main h3 {
    margin: 10px 0 8px;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.review-main p {
    color: var(--muted);
    line-height: 1.6;
}

.subject {
    display: inline-flex;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta span {
    background: white;
    border: 1px solid var(--line);
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
}

.review-actions {
    display: grid;
    gap: 12px;
    align-content: start;
}

.review-actions form {
    display: grid;
    gap: 10px;
}

.success-button {
    background: var(--green);
}

.danger-button {
    background: var(--red);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--line);
    padding: 13px 10px;
}

td {
    padding: 16px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table-action {
    background: white;
    color: var(--blue);
    border: 1px solid var(--line);
    padding: 8px 11px;
    border-radius: 12px;
}

.danger-text {
    color: var(--red);
}

.form-grid {
    display: grid;
    gap: 14px;
}

.error-box {
    width: min(520px, calc(100% - 32px));
    background: white;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
    .admin-body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 20;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split,
    .review-item {
        grid-template-columns: 1fr;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 18px;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-link {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
    }

    .login-panel {
        padding: 24px;
    }
}
