:root {
    --purple: #2e1749;
    --purple-strong: #5b0f75;
    --purple-soft: #7a2284;
    --yellow: #ffd800;
    --ink: #21172a;
    --muted: #6c6174;
    --surface: #ffffff;
    --page: #f3f0f4;
    --line: #ded7e4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

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

.top-shell {
    align-items: center;
    background: var(--purple-strong);
    border-bottom: 5px solid var(--yellow);
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    min-height: 62px;
    padding: 10px clamp(16px, 4vw, 56px);
}

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

.brand-mark {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    color: var(--purple-strong);
    display: inline-flex;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1;
    text-transform: uppercase;
}

.brand small {
    color: var(--yellow);
    font-size: 11px;
    margin-top: 3px;
}

.nav-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    font-weight: 700;
}

.pill-button,
.primary-button,
.text-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.pill-button {
    border-radius: 999px;
    padding: 9px 16px;
}

.pill-button--light {
    background: var(--yellow);
    color: var(--purple);
}

.primary-button {
    background: var(--purple-soft);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    justify-content: center;
    padding: 13px 22px;
}

.primary-button:hover,
.text-button:hover {
    filter: brightness(1.08);
}

.login-hero {
    align-items: stretch;
    background: linear-gradient(135deg, rgba(46, 23, 73, .94), rgba(91, 15, 117, .9)), url("https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=1600&q=80");
    background-position: center;
    background-size: cover;
    color: #fff;
    display: grid;
    gap: clamp(24px, 5vw, 64px);
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    min-height: calc(100vh - 110px);
    padding: clamp(28px, 7vw, 90px) clamp(18px, 6vw, 84px);
}

.login-copy {
    align-self: center;
    max-width: 660px;
}

.eyebrow {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 12px;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

.login-copy h1,
.dashboard-head h1,
.auth-card h1 {
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1;
    margin-bottom: 18px;
}

.login-copy p:not(.eyebrow) {
    font-size: 19px;
    line-height: 1.45;
    max-width: 540px;
}

.auth-card,
.user-form,
.users-list {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(33, 23, 42, .14);
    color: var(--ink);
    padding: clamp(20px, 4vw, 34px);
}

.auth-card {
    align-self: center;
}

.auth-card h2,
.user-form h1,
.section-title h2 {
    color: var(--purple);
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 18px;
}

label {
    color: var(--purple);
    display: grid;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    margin-bottom: 16px;
}

input,
select {
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    padding: 13px 14px;
    width: 100%;
}

input:focus,
select:focus {
    border-color: var(--purple-soft);
    box-shadow: 0 0 0 3px rgba(122, 34, 132, .14);
    outline: 0;
}

.alert,
.notice {
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert {
    background: #fff0f3;
    border: 1px solid #ffc4cf;
    color: #9f1239;
}

.notice {
    background: #fff9c9;
    border: 1px solid #f2df46;
    color: #5b4700;
}

.dashboard-head {
    align-items: center;
    background: var(--purple);
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 34px clamp(18px, 5vw, 64px);
}

.dashboard-head h1 {
    margin-bottom: 8px;
}

.dashboard-head p:not(.eyebrow) {
    color: #eee6f4;
    margin-bottom: 0;
}

.metabase-frame {
    background: #fff;
    min-height: calc(100vh - 210px);
    padding: 16px;
}

.metabase-frame iframe {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    min-height: calc(100vh - 245px);
    width: 100%;
}

.admin-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    padding: clamp(18px, 5vw, 56px);
}

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

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

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
}

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

.status {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.status.active {
    background: #e9f8ef;
    color: #146c2e;
}

.status.inactive {
    background: #f0edf2;
    color: #746a7c;
}

.text-button {
    background: transparent;
    color: var(--purple-soft);
    padding: 0;
}

.row-actions {
    display: grid;
    gap: 12px;
    min-width: 280px;
}

.reset-form {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(150px, 1fr) auto;
}

.reset-form input {
    padding: 9px 10px;
}

.center-panel {
    display: grid;
    min-height: calc(100vh - 128px);
    place-items: center;
    padding: 28px;
}

.footer-shell {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    padding: 18px clamp(16px, 4vw, 56px);
}

@media (max-width: 820px) {
    .login-hero,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-head,
    .top-shell {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-copy h1,
    .dashboard-head h1,
    .auth-card h1 {
        font-size: 36px;
    }
}
