:root {
    --ink: #17202a;
    --muted: #667085;
    --line: #d9e0e8;
    --panel: #ffffff;
    --page: #f5f7fa;
    --nav: #101828;
    --nav-active: #2f6bff;
    --accent: #0f8b8d;
    --success: #147d48;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

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

a {
    color: #1f5eff;
    font-weight: 700;
    text-decoration: none;
}

input,
select,
textarea,
button {
    border-radius: 6px;
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    padding: 10px 12px;
}

button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #101828 0%, #16313a 55%, #f4b942 55%, #f4b942 100%);
}

.login-shell {
    width: min(440px, 100%);
}

.login-panel,
.content-section,
.stat-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
}

.login-panel {
    padding: 32px;
}

.brand-mark {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: #f4b942;
    color: #101828;
    font-weight: 900;
}

.login-panel h1,
.topbar h1,
.content-section h2,
.detail-grid h2 {
    margin: 8px 0;
    letter-spacing: 0;
}

.login-panel p,
.eyebrow,
.stat-card span,
td,
label {
    color: var(--muted);
}

.form-stack,
.notification-form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.primary-button,
.secondary-button {
    min-height: 42px;
    padding: 10px 16px;
}

.primary-button {
    background: var(--accent);
    color: #fff;
}

.secondary-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    background: var(--nav);
    color: #fff;
    padding: 22px 16px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    font-weight: 900;
}

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

.nav-item {
    border-radius: 6px;
    color: #d0d5dd;
    padding: 12px 14px;
}

.nav-item.active,
.nav-item:hover {
    background: #23314a;
    color: #fff;
}

.logout-link {
    margin-top: 18px;
    color: #ffb4ab;
}

.app-main {
    margin-left: 264px;
    padding: 28px;
}

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

.eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.user-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: #e7f8f4;
    color: #075e54;
    font-size: 12px;
    font-weight: 900;
    padding: 4px 10px;
    white-space: nowrap;
}

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

.stat-card {
    padding: 20px;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    line-height: 1.1;
}

.content-section {
    margin-bottom: 18px;
    padding: 20px;
}

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

.section-heading h2 {
    font-size: 20px;
}

.toolbar,
.inline-form {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(180px, 1fr) auto;
    gap: 10px;
    margin-bottom: 16px;
}

.inline-form {
    grid-template-columns: minmax(180px, 1fr) auto;
    margin-bottom: 0;
}

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

table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 13px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--ink);
    font-size: 12px;
    text-transform: uppercase;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
}

.notification-form {
    max-width: 760px;
}

.alert {
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
    font-weight: 800;
}

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

.alert-error {
    background: #fef3f2;
    color: var(--danger);
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: auto;
    }

    .app-main {
        margin-left: 0;
        padding: 18px;
    }

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

    .toolbar,
    .inline-form {
        grid-template-columns: 1fr;
    }
}
