:root {
    --yellow: #f7be39;
    --green: #32c671;
    --blue: #36bbf7;
    --red: #da4453;

    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #fbfbfc;
    --text: #2e2e2e;
    --text-soft: #555555;
    --muted: #888888;
    --border: #e5e7eb;

    --shadow-sm: 0 6px 18px rgba(0, 0, 0, .05);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, .08);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    --font: "Open Sans", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

::selection {
    background: rgba(247, 190, 57, .45);
}

/* Login */

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 10%, rgba(247, 190, 57, .28), transparent 28%),
        radial-gradient(circle at 90% 80%, rgba(54, 187, 247, .13), transparent 30%),
        linear-gradient(135deg, #ffffff, #f6f7f9);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 38px;
    backdrop-filter: blur(14px);
}

.login-logo {
    width: 88px;
    display: block;
    margin: 0 auto 18px;
}

.login-card h1 {
    text-align: center;
    margin: 0 0 8px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.muted {
    color: var(--muted);
    text-align: center;
    margin: 0 0 24px;
}

/* Header */

.topbar {
    min-height: 74px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand img {
    width: 44px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--text-soft);
}

.topbar nav a {
    padding: 9px 12px;
    border-radius: 999px;
    transition: .18s ease;
}

.topbar nav a:hover {
    background: #f0f1f3;
    color: var(--text);
}

/* Layout */

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 32px auto;
}

.hero,
.page-head {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.hero {
    background:
        radial-gradient(circle at right top, rgba(247,190,57,.25), transparent 30%),
        #2e2e2e;
    color: white;
}

.eyebrow {
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: 12px;
    font-weight: 900;
    margin: 0 0 10px;
}

.page-head .eyebrow {
    color: #b58211;
}

.hero h1,
.page-head h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.page-head p:last-child {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero p {
    color: rgba(255,255,255,.76);
}

.page-head.split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

/* Cards */

.cards,
.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.card,
.resource-card,
.form-card,
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card,
.resource-card,
.form-card {
    padding: 24px;
}

.card,
.resource-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover,
.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #d8dbe0;
}

.card h2,
.resource-card h2,
.form-card h2 {
    margin: 0 0 8px;
    letter-spacing: -0.025em;
}

.card p,
.resource-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

/* Forms */

label {
    display: block;
    margin: 18px 0 7px;
    font-size: 13px;
    font-weight: 900;
    color: var(--text);
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .18s ease, box-shadow .18s ease;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px rgba(247,190,57,.2);
}

input:disabled {
    background: #f2f3f5;
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 18px;
}

.checks {
    display: grid;
    gap: 10px;
}

.check-row,
.mini-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-row {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    margin: 0;
}

.check-row.inline {
    margin-top: 18px;
}

.check-row input,
.mini-check input {
    width: auto;
    margin: 0;
}

.mini-check {
    margin: 0;
    font-weight: 800;
}

/* Buttons */

button,
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--yellow);
    color: var(--text);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, filter .16s ease, background .16s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    filter: brightness(.98);
}

.btn.secondary {
    background: #eef0f3;
    color: var(--text);
}

.btn.danger {
    background: var(--red);
    color: #fff;
}

.btn.small {
    padding: 8px 13px;
    font-size: 13px;
}

.login-card button {
    width: 100%;
    margin-top: 22px;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.actions button,
.actions .btn {
    width: auto;
}

.small-link {
    color: #167aa8;
    font-weight: 900;
}

.actions-cell {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Alerts / pills */

.alert {
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    margin: 18px 0;
    font-weight: 800;
}

.alert.danger {
    background: rgba(218,68,83,.12);
    color: var(--red);
}

.alert.success {
    background: rgba(50,198,113,.13);
    color: #1f8f4f;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
}

.pill.green {
    background: rgba(50,198,113,.13);
    color: #1f8f4f;
}

.pill.red {
    background: rgba(218,68,83,.13);
    color: var(--red);
}

.pill.blue {
    background: rgba(54,187,247,.14);
    color: #177aa8;
}

/* Tables */

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

th,
td {
    text-align: left;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    background: var(--surface-soft);
}

tbody tr:hover {
    background: #fafafa;
}

td small,
.muted-text {
    color: var(--muted);
}

/* Resources */

.resource-card {
    display: flex;
    flex-direction: column;
}

.resource-card h2 {
    margin-top: 16px;
}

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.resource-meta span {
    background: #f0f1f3;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
    color: var(--text-soft);
}

.resource-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.resource-actions .btn,
.resource-card > .btn {
    flex: 1;
    width: 100%;
}

/* Login extras */

.login-extra {
    text-align: center;
    margin: 18px 0 0;
}

.login-extra a {
    color: #167aa8;
    font-weight: 900;
}

/* Responsive */

@media (max-width: 900px) {
    .cards,
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        height: auto;
        padding: 18px;
        gap: 14px;
    }

    .topbar nav {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, 1160px);
        margin: 22px auto;
    }

    .cards,
    .resource-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-head.split {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-card {
        padding: 28px;
    }

    .hero,
    .page-head,
    .form-card,
    .card,
    .resource-card {
        padding: 22px;
    }

    .actions,
    .resource-actions {
        flex-direction: column;
    }

    .actions button,
    .actions .btn,
    .resource-actions .btn {
        width: 100%;
    }
}