/*
 * Copyright (c) 2026.  SimplyMetadata LLC
 *
 * theme.css — a clean, modern "warm editorial archive" refresh.
 * Loaded after styles.css; layers presentation only (no behaviour changes).
 * Uses the existing semantic variables (--bg, --text, --accent, …) so both
 * light and dark schemes keep working.
 */

/* ====================================================================
   Design tokens
   ==================================================================== */

:root {
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Warm paper canvas + crisp white cards (light default) */
    --surface-canvas: #f5f1ea;
    --surface-card: #ffffff;
    --surface-sunken: #efeae1;
    --hairline: rgba(41, 30, 20, 0.12);
    --hairline-soft: rgba(41, 30, 20, 0.07);

    --shadow-sm: 0 1px 2px rgba(38, 25, 15, 0.05), 0 1px 3px rgba(38, 25, 15, 0.06);
    --shadow-md: 0 2px 6px -2px rgba(38, 25, 15, 0.10), 0 8px 20px -12px rgba(38, 25, 15, 0.20);
    --shadow-lg: 0 6px 16px -6px rgba(38, 25, 15, 0.16), 0 18px 40px -18px rgba(38, 25, 15, 0.28);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;

    --nav-height: 60px;

    /* A single confident accent, drawn from the brick-red brand */
    --brand: var(--clr-red-500);
    --brand-strong: var(--clr-red-700);
    --brand-tint: color-mix(in srgb, var(--clr-red-500) 9%, transparent);
    --brand-tint-strong: color-mix(in srgb, var(--clr-red-500) 16%, transparent);
}

@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme]),
    :host(:not([data-theme])) {
        --surface-canvas: #0e1015;
        --surface-card: #171b22;
        --surface-sunken: #1e232c;
        --hairline: rgba(230, 235, 245, 0.12);
        --hairline-soft: rgba(230, 235, 245, 0.06);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 2px 8px -2px rgba(0, 0, 0, 0.5), 0 10px 24px -14px rgba(0, 0, 0, 0.6);
        --shadow-lg: 0 8px 20px -8px rgba(0, 0, 0, 0.55), 0 24px 48px -20px rgba(0, 0, 0, 0.7);

        --brand: var(--clr-red-400);
        --brand-strong: var(--clr-red-300);
    }
}

[data-theme="dark"] {
    --surface-canvas: #0e1015;
    --surface-card: #171b22;
    --surface-sunken: #1e232c;
    --hairline: rgba(230, 235, 245, 0.12);
    --hairline-soft: rgba(230, 235, 245, 0.06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px -2px rgba(0, 0, 0, 0.5), 0 10px 24px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 20px -8px rgba(0, 0, 0, 0.55), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
    --brand: var(--clr-red-400);
    --brand-strong: var(--clr-red-300);
}

/* ====================================================================
   Base typography & canvas
   ==================================================================== */

html {
    /* Slightly larger base type: 18px instead of 16px. Everything sized in
       rem (nearly all of the app) scales with it. */
    font-size: 112.5%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--surface-canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.002em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    letter-spacing: -0.015em;
    font-weight: 560;
}

a {
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.06em;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    transition: color 140ms ease;
}

::selection {
    background: var(--brand-tint-strong);
}

/* ====================================================================
   Header / primary nav
   ==================================================================== */

body > main {
    padding-top: var(--nav-height);
}

body > header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding-left: 18px;
    padding-right: 18px;
    background-color: color-mix(in srgb, var(--surface-card) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(12px);
    backdrop-filter: saturate(1.6) blur(12px);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    body > header nav {
        padding-left: 28px;
        padding-right: 28px;
    }
}

body > header nav ul {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body > header nav li {
    padding: 0;
}

/* Brand wordmark */
body > header nav .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    /* Reset Pico's negative nav-anchor vertical margins so the tall (image +
       wordmark) brand centres on the same axis as the text links. */
    margin: 0 6px 0 0;
    flex-shrink: 0;
}

body > header nav .brand img {
    border-radius: 8px;
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

body > header nav .brand .brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 640px) {
    body > header nav .brand .brand-name {
        display: none;
    }
}

/* Nav links: quiet by default, warm pill on hover, accent when active */
body > header nav li > a:not(.brand) {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    white-space: nowrap;
    transition: background 150ms ease, color 150ms ease;
}

body > header nav li > a:not(.brand):hover {
    background: var(--brand-tint);
    color: var(--brand-strong);
}

body > header nav li > a[aria-current="page"] {
    background: var(--brand-tint-strong);
    color: var(--brand-strong);
    font-weight: 600;
}

/* ====================================================================
   Landing page
   ==================================================================== */

.archive-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(32px, 6vw, 72px) 20px clamp(20px, 3vw, 32px);
    text-align: center;
}

.archive-hero .eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 18px;
}

.archive-hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    line-height: 1.02;
    margin: 0 0 18px;
    font-weight: 540;
}

.archive-hero h1 em {
    font-style: italic;
    color: var(--brand);
}

.archive-hero p {
    max-width: 40rem;
    margin: 0 auto;
    font-size: 1.12rem;
    line-height: 1.65;
    color: var(--text-light);
}

.archive-hero .hero-rule {
    width: 64px;
    height: 3px;
    margin: 26px auto 0;
    background: var(--brand);
    border-radius: 3px;
    opacity: 0.85;
}

.archive-sections {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 20px 64px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    list-style: none;
}

/* Quiet login link at the foot of the index page */
.index-login {
    margin: -24px 0 48px;
    text-align: center;
    font-size: 0.85rem;
}

.index-login a {
    color: var(--text-light);
}

.archive-sections li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.archive-section-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 22px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1),
                box-shadow 200ms ease, border-color 200ms ease;
}

.archive-section-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(160deg, var(--brand-tint), transparent 60%);
    opacity: 0;
    transition: opacity 220ms ease;
}

.archive-section-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--hairline));
}

.archive-section-card:hover::after {
    opacity: 1;
}

.archive-section-card .section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--brand-tint-strong);
    color: var(--brand-strong);
    margin-bottom: 18px;
}

.archive-section-card .section-icon i {
    font-size: 24px;
    cursor: inherit;
    margin: 0;
}

.archive-section-card .section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 560;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.archive-section-card .section-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.archive-section-card .section-go {
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 180ms ease;
}

.archive-section-card:hover .section-go {
    gap: 10px;
}

/* Multiple destination links at the foot of a section card */
.archive-section-card .section-links {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.archive-section-card .section-links a {
    color: var(--brand);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.archive-section-card .section-links a:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

/* ====================================================================
   Boxes / cards
   ==================================================================== */

.bstr-box.outlined {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
    overflow: clip;
}

@media (max-width: 768px) {
    .bstr-box.outlined {
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }
}

.bstr-box .bstr-box-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--hairline);
    background: var(--surface-card);
}

.bstr-box .bstr-box-header strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 560;
    letter-spacing: -0.01em;
}

.bstr-box .bstr-box-header .showing-page-title-info {
    vertical-align: baseline;
}

.bstr-box .bstr-box-header .mobile-paginator-container {
    border-top: 1px solid var(--hairline);
    margin-top: 10px;
    padding-top: 8px;
}

.bstr-box .bstr-box-content {
    padding: 18px;
}

/* ====================================================================
   Page bars (list / gallery / form control strips)
   ==================================================================== */

.bstr-spacer {
    height: calc(var(--nav-height) + 2px);
}

/* ====================================================================
   Page navigation bar (.bstr-page-bar)
   ==================================================================== */

.bstr-page-bar nav {
    top: var(--nav-height);
    height: auto;
    min-height: 52px;
    background: color-mix(in srgb, var(--surface-card) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(10px);
    backdrop-filter: saturate(1.5) blur(10px);
    border-top: none;
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
    padding: 6px 12px;
}

.bstr-list-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

/* Pagination arrows */
.bstr-nav-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bstr-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 !important;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: 50%;
    color: var(--text);
    box-sizing: border-box;
    transition: background 150ms ease, border-color 150ms ease, transform 100ms ease;
    cursor: pointer;
}

.bstr-nav-btn:hover:not([disabled]) {
    background: var(--brand-tint);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--hairline));
    color: var(--brand-strong);
    transform: translateY(-1px);
}

.bstr-nav-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Main Controls Wrapper */
.bstr-nav-controls {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
    gap: 12px;
}

/* Search Input Group */
.bstr-search-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-grow: 1;
    max-width: 320px;
}

.bstr-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.bstr-search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: var(--pico-muted-color, #777);
    font-size: 18px;
    pointer-events: none;
}

.bstr-search-input-wrapper input[type=search] {
    height: 38px;
    width: 100%;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-canvas);
    padding: 0 14px 0 34px !important;
    margin: 0 !important;
    font-size: 0.88rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.bstr-search-input-wrapper input[type=search]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
    background: var(--surface-card);
}

/* Submit & More buttons inside search group */
.bstr-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: 50%;
    color: var(--brand);
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.bstr-search-submit:hover {
    background: var(--brand-tint);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--hairline));
    color: var(--brand-strong);
    transform: translateY(-1px);
}

.bstr-more-wrapper {
    flex-shrink: 0;
}

.bstr-more-wrapper details.dropdown.bstr-more {
    margin: 0 !important;
    padding: 0 !important;
}

.bstr-more-wrapper details.dropdown.bstr-more summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: 50%;
    color: var(--brand);
    padding: 0 !important;
    margin: 0 !important;
    transition: background 150ms ease, border-color 150ms ease;
}

.bstr-more-wrapper details.dropdown.bstr-more summary:hover {
    background: var(--brand-tint);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--hairline));
}

.bstr-more-wrapper details.dropdown.bstr-more summary::after {
    display: none !important;
}

/* More Dropdown Menu contents styling */
nav details.dropdown.bstr-more ul {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    padding: 4px;
}

nav details.dropdown.bstr-more ul li {
    outline: none;
    border-radius: 6px;
}

/* Action Buttons Group */
.bstr-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Elegant Action Pills */
.bstr-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    margin: 0 !important;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 550;
    text-decoration: none !important;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}

.bstr-action-btn i {
    font-size: 18px;
    margin: 0;
    color: var(--brand);
}

.bstr-action-btn:hover {
    background: var(--brand-tint);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--hairline));
    color: var(--brand-strong);
    transform: translateY(-1px);
}

.bstr-action-btn:hover i {
    color: var(--brand-strong);
}

/* Responsive Rules for Mobile */
@media (max-width: 768px) {
    .bstr-page-bar nav {
        padding: 8px 12px;
    }

    .bstr-list-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .bstr-nav-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    .bstr-search-group {
        max-width: none;
        width: 100%;
    }

    .bstr-actions-group {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 6px;
    }

    .bstr-action-btn {
        flex: 1;
        padding: 0 4px;
        font-size: 0.75rem;
        gap: 4px;
    }

    .bstr-action-btn i {
        font-size: 16px;
    }

    .bstr-spacer {
        height: 108px !important;
    }
}

/* ====================================================================
   Tables
   ==================================================================== */

.bstr-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 0;
    font-size: 0.92rem;
}

.bstr-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface-sunken);
    border-bottom: 1px solid var(--hairline);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-light);
    white-space: nowrap;
}

.bstr-table thead th .sort-column {
    cursor: pointer;
}

.bstr-table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--hairline-soft);
    background: transparent;
    vertical-align: middle;
}

.bstr-table tbody tr {
    transition: background 130ms ease;
}

.bstr-table tbody tr:hover td {
    background: var(--brand-tint);
}

.bstr-table tbody tr:last-child td {
    border-bottom: none;
}

/* ====================================================================
   Image gallery
   ==================================================================== */

.bstr-gallery {
    gap: 22px;
    padding: 18px;
}

.bstr-gallery-item {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
    transition: transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1),
                box-shadow 200ms ease, border-color 200ms ease;
}

.bstr-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--hairline));
}

.bstr-gallery-item img {
    height: 320px;
    transition: transform 320ms ease;
}

.bstr-gallery-item .bstr-gallery-link {
    overflow: hidden;
}

.bstr-gallery-item:hover img {
    transform: scale(1.03);
}

.bstr-gallery-item .bstr-gallery-caption {
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.bstr-gallery-item .bstr-gallery-photos {
    border-top: 1px solid var(--hairline);
    padding: 10px;
    color: var(--brand);
    font-weight: 500;
    transition: background 150ms ease;
}

.bstr-gallery-item .bstr-gallery-photos:hover {
    background: var(--brand-tint);
}

.bstr-gallery-item .bstr-gallery-missing {
    height: 320px;
    background: var(--surface-sunken);
    color: var(--text-light);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .bstr-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 8px;
    }

    .bstr-gallery-item img,
    .bstr-gallery-item .bstr-gallery-missing {
        height: 160px;
    }
}

/* Phones: a single full-width column */
@media (max-width: 600px) {
    .bstr-gallery {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bstr-gallery-item img,
    .bstr-gallery-item .bstr-gallery-missing {
        height: 280px;
    }
}

/* ====================================================================
   Pagination
   ==================================================================== */

.bstr-box-footer {
    border-top: 1px solid var(--hairline);
    background: var(--surface-card);
}

.bstr-pagination a,
.bstr-pagination span {
    border-radius: 8px;
    font-weight: 500;
    transition: background 130ms ease;
}

.bstr-pagination a:hover {
    background: var(--brand-tint);
    color: var(--brand-strong);
}

.bstr-pagination .current {
    background: var(--brand);
    color: #fff;
}

/* ====================================================================
   Buttons (shared .btn utilities used on auth / error pages)
   ==================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 160ms ease,
                background 160ms ease, border-color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 80%, transparent);
}

.btn-primary:hover {
    background: var(--brand-strong);
    box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}

.btn-secondary {
    background: var(--surface-card);
    color: var(--text);
    border-color: var(--hairline);
}

.btn-secondary:hover {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--hairline));
    color: var(--brand-strong);
}

.btn-block {
    width: 100%;
}

/* ====================================================================
   Auth pages (login / register / change password)
   ==================================================================== */

.auth-card {
    max-width: 420px;
    margin: clamp(32px, 8vh, 88px) auto;
    padding: 40px 36px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card h2 {
    font-size: 1.85rem;
    margin: 0 0 6px;
}

.auth-card .auth-subtitle {
    color: var(--text-light);
    margin: 0 0 28px;
    font-size: 0.96rem;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-group > label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
}

.auth-form .form-group input[type="text"],
.auth-form .form-group input[type="email"],
.auth-form .form-group input[type="password"] {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    background: var(--surface-canvas);
    margin: 0;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-form .form-group input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
    outline: none;
}

.auth-form .checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
}

.auth-form .btn-block {
    margin-top: 8px;
}

.auth-footer {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--brand);
    font-weight: 600;
}

/* Profile page reuses the same card language */
.profile-card {
    max-width: 520px;
    margin: clamp(32px, 8vh, 88px) auto;
    padding: 40px 36px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.profile-card h2 {
    font-size: 1.85rem;
    margin: 0 0 24px;
}

.profile-info .info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.profile-info .info-row label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-light);
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* ====================================================================
   Error pages
   ==================================================================== */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height) - 120px);
    padding: 40px 20px;
    text-align: center;
}

.error-content .error-code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 600;
    line-height: 1;
    color: var(--brand);
    letter-spacing: -0.04em;
}

.error-content h2 {
    font-size: 1.8rem;
    margin: 8px 0 10px;
}

.error-content p {
    color: var(--text-light);
    max-width: 32rem;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====================================================================
   Flash messages
   ==================================================================== */

.flash-messages {
    max-width: 1180px;
    margin: 12px auto 0;
    padding: 0 20px;
}

.flash-messages .alert {
    border-radius: var(--radius-sm);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.94rem;
}

.flash-messages .alert-success {
    border-left: 3px solid var(--clr-jade-500);
}

.flash-messages .alert-error {
    border-left: 3px solid var(--brand);
}

.flash-messages .close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    width: auto;
    padding: 0 4px;
    float: none;
}

/* ====================================================================
   Footer
   ==================================================================== */

body > footer {
    margin-top: 48px;
    padding: 22px 0 28px;
    border-top: 1px solid var(--hairline);
    color: var(--text-light);
}

body > footer sup {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

/* ====================================================================
   Form detail cards (record edit) — soften the label/value grid
   ==================================================================== */

.bstr-form dl dt {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}
