/* ============ Auth pages ============ */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--cream);
}

.auth-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
}

.auth-shell::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, var(--poppy-glow) 0%, transparent 70%);
    pointer-events: none;
}

.auth-shell::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -120px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(214, 255, 61, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
    margin-bottom: 28px;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
}

.auth-card__title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-card__lede {
    color: var(--slate);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.auth-error {
    padding: 10px 14px;
    background: var(--poppy-soft);
    border: 1px solid var(--poppy);
    color: var(--poppy-deep);
    border-radius: var(--r-md);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field > span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
}

.auth-field > span small {
    font-weight: 500;
    color: var(--slate-soft);
    margin-left: 4px;
}

.auth-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--slate-line);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--cream);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--poppy);
    box-shadow: 0 0 0 3px var(--poppy-glow);
}

.auth-hint {
    font-size: 0.78rem;
    color: var(--slate-soft);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--slate-soft);
    font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--slate-line);
}

.auth-oauth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-oauth .btn {
    padding: 0.65em 1em;
    font-size: 0.92rem;
    color: var(--ink);
    border-color: var(--slate-line);
}

.auth-oauth .btn:hover {
    border-color: var(--ink);
    background: var(--cream);
    color: var(--ink);
}

.auth-foot {
    margin-top: 26px;
    text-align: center;
    color: var(--slate);
    font-size: 0.92rem;
}

.auth-foot a {
    color: var(--poppy);
    font-weight: 600;
}


/* ============ Dashboard shell ============ */

.dashboard-body {
    background: var(--cream);
    min-height: 100vh;
    margin: 0;
}

.dash {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

@media (min-width: 880px) {
    .dash {
        grid-template-columns: 240px 1fr;
    }
}

.dash__side {
    background: var(--ink);
    color: var(--cream);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    border-right: 1px solid var(--slate-line-dark);
}

@media (min-width: 880px) {
    .dash__side {
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.dash__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--cream);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 6px 8px;
}

.dash__brand:hover {
    color: var(--cream);
}

.dash__brand .nav__logo {
    color: var(--cream);
}

.dash__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.dash__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--slate-soft);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.94rem;
    border-radius: var(--r-md);
    border-left: 2px solid transparent;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.dash__link svg {
    width: 18px;
    height: 18px;
    color: var(--slate-soft);
    transition: color 160ms ease;
}

.dash__link:hover {
    color: var(--cream);
    background: rgba(255, 248, 238, 0.05);
}

.dash__link:hover svg {
    color: var(--cream);
}

.dash__link.is-active {
    background: rgba(255, 57, 87, 0.15);
    color: var(--cream);
    border-left-color: var(--poppy);
}

.dash__link.is-active svg {
    color: var(--poppy);
}

.dash__link--muted {
    color: var(--slate);
    font-size: 0.88rem;
}

.dash__side-foot {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 18px;
    border-top: 1px solid var(--slate-line-dark);
}


.dash__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

.dash__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px;
    border-bottom: 1px solid var(--slate-line);
    background: var(--cream);
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 16px;
    flex-wrap: wrap;
}

.dash__top-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.dash__top-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash__plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--cream-warm);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash__plan-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 3px rgba(214, 255, 61, 0.25);
}

.dash__menu {
    position: relative;
}

.dash__menu summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: var(--r-pill);
    border: 1px solid var(--slate-line);
    background: var(--white);
    transition: border-color 160ms ease;
}

.dash__menu summary::-webkit-details-marker { display: none; }

.dash__menu summary:hover {
    border-color: var(--slate-soft);
}

.dash__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--poppy);
    color: var(--cream);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
}

.dash__avatar--initial {
    background: var(--poppy);
}

.dash__email {
    font-size: 0.86rem;
    color: var(--ink);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash__menu-body {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--white);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.dash__menu-body a,
.dash__signout {
    display: block;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    color: var(--ink);
    text-align: left;
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dash__menu-body a:hover,
.dash__signout:hover {
    background: var(--cream-warm);
    color: var(--poppy);
}

.dash__content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (max-width: 879px) {
    .dash__content { padding: 22px; }
    .dash__top { padding: 18px 22px; }
}


/* ============ Dashboard content ============ */

.dash-grid {
    display: grid;
    gap: 16px;
}

.dash-grid--3 {
    grid-template-columns: 1fr;
}

@media (min-width: 760px) {
    .dash-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.dash-card {
    background: var(--white);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-lg);
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-card__label {
    font-size: 0.82rem;
    color: var(--slate);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.dash-card__num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.dash-card__sub {
    font-size: 0.85rem;
    color: var(--slate);
}

.dash-card__bar {
    margin-top: 6px;
    height: 8px;
    background: var(--cream-warm);
    border-radius: var(--r-pill);
    overflow: hidden;
}

.dash-card__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--poppy) 0%, var(--poppy-deep) 100%);
    transition: width 600ms ease;
}


.dash-row {
    background: var(--white);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-lg);
    padding: 24px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dash-row--danger {
    border-color: var(--poppy);
    background: var(--poppy-soft);
}

.dash-row__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dash-row__head h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.dash-row__sub {
    font-size: 0.85rem;
    color: var(--slate);
}

.dash-row__link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--poppy);
}


.dash-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--slate-line);
    border-radius: var(--r-md);
    overflow-x: auto;
}

.dash-table__head,
.dash-table__row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr 0.6fr;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
}

.dash-table--keys .dash-table__head,
.dash-table--keys .dash-table__row {
    grid-template-columns: 1.2fr 1fr 1fr 1fr 0.7fr 0.7fr;
}

.dash-table__head {
    background: var(--cream-warm);
    border-bottom: 1px solid var(--slate-line);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate);
}

.dash-table__row {
    border-bottom: 1px solid var(--slate-line);
    font-size: 0.9rem;
}

.dash-table__row:last-child {
    border-bottom: 0;
}

.dash-table__row.is-revoked {
    opacity: 0.6;
}

.dash-table__label {
    font-weight: 600;
    color: var(--ink);
}

.dash-table__mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--slate);
}

.dash-table__dim {
    color: var(--slate-soft);
}

.dash-table__action {
    padding: 5px 10px;
    border: 1px solid var(--slate-line);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--slate);
    background: var(--white);
}

.dash-table__action:hover {
    border-color: var(--poppy);
    color: var(--poppy);
}


.dash-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dash-pill--ok {
    background: var(--lime);
    color: var(--ink);
}

.dash-pill--off {
    background: var(--slate-line);
    color: var(--slate);
}


.dash-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--slate);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}


.dash-keyform {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-keyform input {
    flex: 1;
    min-width: 220px;
    padding: 11px 14px;
    border: 1.5px solid var(--slate-line);
    border-radius: var(--r-md);
    font-size: 0.94rem;
    background: var(--cream);
    color: var(--ink);
}

.dash-keyform input:focus {
    outline: none;
    border-color: var(--poppy);
    box-shadow: 0 0 0 3px var(--poppy-glow);
}


.dash-flash {
    background: var(--ink);
    color: var(--cream);
    padding: 18px 20px;
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-flash--ok {
    background: var(--lime);
    color: var(--ink);
}

.dash-flash--err {
    background: var(--poppy-soft);
    color: var(--poppy-deep);
    border: 1px solid var(--poppy);
}

.dash-flash__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dash-flash__copy {
    padding: 5px 12px;
    border-radius: var(--r-sm);
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 0;
}

.dash-flash__value {
    display: block;
    font-family: var(--font-mono);
    background: var(--ink-deep);
    color: var(--cream);
    padding: 10px 14px;
    border-radius: var(--r-md);
    font-size: 0.86rem;
    word-break: break-all;
    user-select: all;
}

.dash-flash__hint {
    font-size: 0.85rem;
    opacity: 0.85;
}

.dash-flash__hint code {
    background: rgba(255, 248, 238, 0.12);
    padding: 1px 6px;
    border-radius: var(--r-sm);
}


.dash-quickstart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dash-quickstart__code {
    margin: 0;
    background: var(--ink);
    color: var(--cream);
    padding: 18px 20px;
    border-radius: var(--r-md);
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
}

.dash-quickstart__hint {
    color: var(--slate);
    font-size: 0.9rem;
}

.dash-quickstart__hint a {
    color: var(--poppy);
    font-weight: 600;
}


/* ============ Usage chart ============ */

.dash-chart {
    width: 100%;
    overflow: hidden;
}

.dash-chart svg {
    display: block;
}

.dash-chart__legend {
    margin-top: 12px;
    display: flex;
    gap: 18px;
    font-size: 0.85rem;
    color: var(--slate);
    flex-wrap: wrap;
}

.dash-chart__sw {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

.dash-chart__sw--bar { background: var(--poppy); }
.dash-chart__sw--cache { background: var(--lime); }
.dash-chart__sw--err { background: var(--ink); opacity: 0.4; }


.dash-tier-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.92rem;
    padding: 4px 0;
    border-bottom: 1px dashed var(--slate-line);
}

.dash-tier:last-child {
    border-bottom: 0;
}

.dash-tier__name {
    font-family: var(--font-mono);
    color: var(--slate);
}

.dash-tier__count {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
}


/* ============ Billing ============ */

.dash-current-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px;
    background: var(--ink);
    color: var(--cream);
    border-radius: var(--r-lg);
}

.dash-current-plan__label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cream);
}

.dash-current-plan__meta {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    color: var(--slate-soft);
    font-size: 0.92rem;
    flex-wrap: wrap;
}

.dash-current-plan__meta strong {
    color: var(--cream);
}

.dash-current-plan__renew {
    margin-top: 10px;
    color: var(--slate-soft);
    font-size: 0.85rem;
}

.dash-current-plan__bal {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-current-plan__bal .dash-card__label {
    color: var(--slate-soft);
}

.dash-current-plan__bal .dash-card__num {
    color: var(--cream);
}


.dash-plans {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 760px) {
    .dash-plans { grid-template-columns: repeat(5, 1fr); gap: 10px; }
}

.dash-plan {
    position: relative;
    background: var(--white);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-lg);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-plan.is-current {
    border-color: var(--poppy);
    background: var(--poppy-soft);
}

.dash-plan.is-recommended {
    border-color: var(--ink);
}

.dash-plan__badge {
    position: absolute;
    top: -10px;
    right: 12px;
    padding: 2px 9px;
    background: var(--lime);
    color: var(--ink);
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dash-plan h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 0;
}

.dash-plan__price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.dash-plan__num {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink);
}

.dash-plan__per {
    color: var(--slate);
    font-size: 0.8rem;
}

.dash-plan ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.84rem;
    color: var(--slate);
    flex: 1;
}

.dash-plan ul b {
    color: var(--ink);
    font-weight: 600;
}

.dash-billing__note,
.dash-billing__paygnote {
    color: var(--slate);
    font-size: 0.88rem;
    line-height: 1.55;
}

.dash-billing__paygnote a {
    color: var(--poppy);
    font-weight: 600;
}


/* ============ Settings ============ */

.dash-kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 600px) {
    .dash-kv { grid-template-columns: 1fr 1fr; }
}

.dash-kv > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: var(--cream-warm);
    border-radius: var(--r-md);
    border: 1px solid var(--slate-line);
}

.dash-kv__k {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--slate);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-kv__v {
    font-size: 0.95rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}


.dash-form-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-form-inline input {
    flex: 1;
    min-width: 220px;
    padding: 11px 14px;
    border: 1.5px solid var(--slate-line);
    border-radius: var(--r-md);
    background: var(--cream);
    font-size: 0.95rem;
}

.dash-form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 440px;
}


.btn--danger {
    background: var(--poppy-deep);
    color: var(--cream);
    box-shadow: 0 6px 22px -8px rgba(216, 31, 60, 0.5);
}

.btn--danger:hover {
    background: #B81834;
    color: var(--cream);
}


/* ============ Admin panel ============ */

.dash__side--admin {
    background: var(--ink-deep);
    border-right-color: rgba(214, 255, 61, 0.18);
}

.dash__admin-tag {
    margin-left: 6px;
    padding: 1px 7px;
    background: var(--lime);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: var(--r-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash__side--admin .dash__link.is-active {
    background: rgba(214, 255, 61, 0.12);
    border-left-color: var(--lime);
}

.dash__side--admin .dash__link.is-active svg {
    color: var(--lime);
}

.dash__plan-chip--admin {
    background: var(--lime);
    color: var(--ink);
    border-color: var(--lime);
}

.dash__plan-chip--admin .dash__plan-dot {
    background: var(--ink);
    box-shadow: none;
}

.dash__inline { display: inline; }

.admin-body .dash__signout {
    color: var(--ink);
}

.dash-grid--4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 760px) {
    .dash-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
    .dash-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.admin-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-filter input[type="search"] {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border: 1.5px solid var(--slate-line);
    border-radius: var(--r-md);
    font-size: 0.95rem;
    background: var(--cream);
    color: var(--ink);
}

.admin-filter input[type="search"]:focus {
    outline: none;
    border-color: var(--poppy);
    box-shadow: 0 0 0 3px var(--poppy-glow);
}

.admin-filter select {
    padding: 10px 14px;
    border: 1.5px solid var(--slate-line);
    border-radius: var(--r-md);
    font-size: 0.92rem;
    background: var(--cream);
    color: var(--ink);
}

.admin-filter__count {
    color: var(--slate);
    font-size: 0.9rem;
    margin-left: auto;
}

.admin-pager {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-pager__info {
    color: var(--slate);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.dash-table--users .dash-table__head,
.dash-table--users .dash-table__row {
    grid-template-columns: 1.4fr 0.7fr 0.8fr 0.9fr 0.9fr 0.6fr;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 540px;
}

.admin-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--slate-line);
    border-radius: var(--r-md);
    font-size: 0.95rem;
    background: var(--cream);
    color: var(--ink);
}

.admin-form input[type="number"],
.admin-form input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--slate-line);
    border-radius: var(--r-md);
    font-size: 0.95rem;
    background: var(--cream);
    color: var(--ink);
}

.admin-form--inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    flex-wrap: wrap;
}

.admin-flags {
    display: flex;
    gap: 18px;
    border: 0;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.admin-flags label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--ink);
    cursor: pointer;
}

.dash-pill--err {
    background: var(--poppy);
    color: var(--cream);
}


/* ============ Docs page ============ */

.doc-shell {
    max-width: 1140px;
    margin: 0 auto;
    padding: 48px 24px 96px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .doc-shell {
        grid-template-columns: 220px 1fr;
        gap: 56px;
        padding: 64px 48px 120px;
    }
}

.doc-toc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 18px 0;
    border-top: 2px solid var(--ink);
}

.doc-toc__label {
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate);
    margin-bottom: 6px;
}

.doc-toc a {
    padding: 4px 0;
    font-size: 0.92rem;
    color: var(--slate);
    transition: color 160ms ease;
}

.doc-toc a:hover {
    color: var(--poppy);
}

.doc-body {
    max-width: 760px;
}

.doc-h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.doc-lede {
    color: var(--slate);
    font-size: 1.1rem;
    margin-bottom: 48px;
    line-height: 1.55;
}

.doc-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 48px 0 14px;
    letter-spacing: -0.02em;
    scroll-margin-top: 96px;
}

.doc-body h3,
.doc-h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 32px 0 10px;
    letter-spacing: -0.015em;
}

.doc-body p,
.doc-body ul {
    color: var(--ink);
    line-height: 1.65;
    margin-bottom: 14px;
}

.doc-body a {
    color: var(--poppy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.doc-body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 1px 6px;
    background: var(--cream-warm);
    border-radius: var(--r-sm);
}

.doc-code {
    margin: 14px 0 26px;
    background: var(--ink);
    color: var(--cream);
    padding: 18px 22px;
    border-radius: var(--r-md);
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre;
}

.doc-list {
    margin: 14px 0 14px 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 28px;
    border: 1px solid var(--slate-line);
    border-radius: var(--r-md);
    overflow: hidden;
    font-size: 0.92rem;
}

.doc-table th,
.doc-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--slate-line);
}

.doc-table th {
    background: var(--cream-warm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate);
}

.doc-table tr:last-child td {
    border-bottom: 0;
}

.doc-hr {
    margin: 64px 0 24px;
    border: 0;
    border-top: 1px solid var(--slate-line);
}

.doc-foot {
    color: var(--slate);
    font-size: 0.95rem;
}


/* ============ Changelog page ============ */

.changelog-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 64px 24px 120px;
}

.changelog-head {
    margin-bottom: 48px;
}

.changelog-head h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.changelog-head p {
    color: var(--slate);
    font-size: 1.05rem;
}

.changelog {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.changelog__entry {
    background: var(--white);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-lg);
    padding: 28px 28px 22px;
}

.changelog__entry header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.changelog__version {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--poppy);
}

.changelog__date {
    color: var(--slate-soft);
    font-size: 0.88rem;
}

.changelog__tag {
    padding: 2px 9px;
    background: var(--cream-warm);
    border: 1px solid var(--slate-line);
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--slate);
}

.changelog__tag--launch {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
}

.changelog__entry h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.changelog__entry ul {
    padding-left: 22px;
    color: var(--slate);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.changelog__entry ul b {
    color: var(--ink);
    font-weight: 600;
}

.changelog__entry code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--cream-warm);
    padding: 1px 6px;
    border-radius: var(--r-sm);
}

.dash-card__num--bad {
    color: var(--poppy);
}

.dash-card-block {
    background: #fff;
    border: 1px solid var(--cream-border);
    border-radius: var(--r-md);
    padding: 1.1rem 1.2rem;
}

.dash-row__h2 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.8rem;
    color: var(--ink);
    letter-spacing: -0.005em;
}

.dash-kv__v--mono {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-soft);
    word-break: break-all;
}

.dash-pre {
    background: #1a1a22;
    color: #e5e2d9;
    padding: 1rem 1.1rem;
    border-radius: var(--r-md);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.admin-setting {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--cream-border);
}

.admin-setting:last-child {
    border-bottom: 0;
}

.admin-setting > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-setting strong {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}

.admin-form--grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem 1rem;
    align-items: end;
}

.admin-form--grid > .admin-form__foot {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.admin-form__foot {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.dash-table--users .dash-table__row,
.dash-table--users .dash-table__head {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}


.dash-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    margin: 0 0 24px;
    border-radius: var(--r-lg);
    border: 1px solid;
    font-size: 0.94rem;
    line-height: 1.45;
}

.dash-banner__icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
}

.dash-banner__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.dash-banner__body strong {
    font-weight: 600;
}

.dash-banner__body span {
    color: var(--slate);
    font-size: 0.88rem;
}

.dash-banner__body code {
    font-family: var(--font-mono);
    font-size: 0.84em;
    padding: 1px 5px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--r-sm);
}

.dash-banner__action {
    flex: 0 0 auto;
}

.dash-banner--warn {
    background: #FFF6E5;
    border-color: #F0CE7B;
    color: #6C4A00;
}

.dash-banner--warn .dash-banner__icon {
    color: #B97A00;
}

.dash-banner--info {
    background: var(--poppy-soft);
    border-color: rgba(255, 57, 87, 0.25);
    color: var(--ink);
}

.dash-banner--info .dash-banner__icon {
    color: var(--poppy);
}

@media (max-width: 640px) {
    .dash-banner {
        flex-wrap: wrap;
    }
    .dash-banner__action {
        flex: 1 1 100%;
    }
    .dash-banner__action button {
        width: 100%;
    }
}


.auth-card--verified,
.auth-card--unverified {
    max-width: 540px;
    padding: 44px 40px 36px;
}

.verify-success {
    text-align: center;
    margin-bottom: 36px;
}

.verify-success__ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    color: var(--poppy);
    border-radius: 50%;
    background: var(--poppy-soft);
    position: relative;
}

.verify-success__ring svg {
    width: 56px;
    height: 56px;
}

.verify-success__circle {
    stroke-dasharray: 176;
    stroke-dashoffset: 176;
    animation: verify-ring-draw 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 100ms forwards;
}

.verify-success__tick {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: verify-tick-draw 380ms cubic-bezier(0.2, 0.8, 0.2, 1) 720ms forwards;
}

@keyframes verify-ring-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes verify-tick-draw {
    to { stroke-dashoffset: 0; }
}

.verify-success__title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 0 12px;
    text-wrap: balance;
}

.verify-success__lede {
    color: var(--slate);
    line-height: 1.55;
    font-size: 1rem;
    max-width: 420px;
    margin: 0 auto;
}

.verify-success__lede strong {
    color: var(--ink);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.94em;
    padding: 1px 6px;
    background: var(--cream-warm);
    border-radius: 4px;
}

.verify-next {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.verify-next__step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--slate-line);
    border-radius: var(--r-md);
    color: var(--ink);
    text-decoration: none;
    background: var(--cream);
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.verify-next__step:hover {
    border-color: var(--poppy);
    transform: translateY(-1px);
    background: var(--white);
    color: var(--ink);
}

.verify-next__num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--poppy);
    letter-spacing: 0.06em;
}

.verify-next__step h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin: 0 0 2px;
    font-weight: 600;
    color: var(--ink);
}

.verify-next__step p {
    margin: 0;
    color: var(--slate);
    font-size: 0.86rem;
    line-height: 1.45;
}

.verify-next__step p code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    padding: 1px 5px;
    background: var(--cream-warm);
    border-radius: 4px;
    color: var(--ink);
}

.verify-next__arrow {
    color: var(--slate-soft);
    font-size: 1.4rem;
    transition: color 160ms ease, transform 160ms ease;
}

.verify-next__step:hover .verify-next__arrow {
    color: var(--poppy);
    transform: translateX(2px);
}

.verify-next__primary {
    width: 100%;
    text-align: center;
}

.verify-fail {
    text-align: center;
    margin-bottom: 28px;
}

.verify-fail__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    color: #B97A00;
    border-radius: 50%;
    background: #FFF6E5;
}

.verify-fail__icon svg {
    width: 56px;
    height: 56px;
}

.verify-fail__title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 12px;
    text-wrap: balance;
}

.verify-fail__lede {
    color: var(--slate);
    line-height: 1.55;
    font-size: 0.98rem;
    max-width: 420px;
    margin: 0 auto;
}

.verify-fail__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.verify-fail__actions .btn {
    width: 100%;
    text-align: center;
}

.verify-fail__support {
    text-align: center;
    color: var(--slate-soft);
    font-size: 0.88rem;
    margin: 0;
}

.verify-fail__support a {
    color: var(--poppy);
}

@media (max-width: 480px) {
    .auth-card--verified,
    .auth-card--unverified {
        padding: 32px 24px 28px;
    }
    .verify-success__title { font-size: 1.8rem; }
    .verify-fail__title { font-size: 1.6rem; }
}
