/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg:        #0a0a0b;
    --color-surface:   #141416;
    --color-surface-2: #1c1c20;
    --color-border:    #2a2a2f;
    --color-text:      #eeeef0;
    --color-muted:     #8a8a8f;
    --color-accent:    #6c5ce7;
    --color-accent-h:  #8577ed;
    --color-accent-glow: rgba(108, 92, 231, 0.25);
    --color-warm:      #f4a261;
    --color-overlay:   rgba(0, 0, 0, 0.92);
    --radius:          16px;
    --radius-sm:       10px;
    --shadow:          0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg:       0 12px 48px rgba(0, 0, 0, 0.5);
    --transition:      0.2s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font:            "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                       Roboto, Helvetica, Arial, sans-serif;
    --font-display:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                       Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
    :root {
        --color-bg:        #f8f7f4;
        --color-surface:   #ffffff;
        --color-surface-2: #f0eeeb;
        --color-border:    #e0ddd8;
        --color-text:      #1a1a1c;
        --color-muted:     #7a7872;
        --color-accent:    #6c5ce7;
        --color-accent-h:  #5a48d5;
        --color-accent-glow: rgba(108, 92, 231, 0.15);
        --color-overlay:   rgba(0, 0, 0, 0.85);
        --shadow:          0 2px 16px rgba(0, 0, 0, 0.06);
        --shadow-lg:       0 8px 40px rgba(0, 0, 0, 0.12);
    }
}

html {
    font-family: var(--font);
    font-size: 16px;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-h);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ── Layout helpers ─────────────────────────────────────────────────────────── */
.container {
    width: min(100%, 1280px);
    margin-inline: auto;
    padding: 2.5rem 1.5rem;
    flex: 1;
}

/* ── Site header ────────────────────────────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid var(--color-border);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: color-mix(in srgb, var(--color-surface) 85%, transparent);
}

.site-header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    width: min(100%, 1280px);
    margin-inline: auto;
    padding: 0 1.5rem;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
    transition: color var(--transition);
    flex-shrink: 0;
}

.site-title:hover {
    color: var(--color-accent);
}

.site-nav {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 2rem;
}

.site-nav-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: auto;
}

.site-nav-center a,
.site-nav-right .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-muted);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.site-nav-center a:hover,
.site-nav-right .nav-link:hover {
    color: var(--color-text);
    background: var(--color-surface-2);
}

.site-nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

/* Hamburger button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    position: absolute;
    left: 9px;
    transition: transform var(--transition), opacity var(--transition);
}

.hamburger span:nth-child(1) { top: 12px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 26px; }

.hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile header */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.25rem;
        margin-left: 0;
        box-shadow: var(--shadow-lg);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav-center,
    .site-nav-right {
        flex-direction: column;
        width: 100%;
        gap: 0.125rem;
    }

    .site-nav-center {
        margin-right: 0;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--color-border);
    }

    .site-nav-right {
        padding-top: 0.75rem;
    }

    .site-nav-center a,
    .site-nav-right .nav-link {
        display: block;
        width: 100%;
        padding: 0.625rem 0.875rem;
    }

    .site-nav-right .btn {
        width: 100%;
        text-align: center;
    }
}

/* ── Site footer ────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.875rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    width: min(100%, 1280px);
    margin-inline: auto;
    padding: 3rem 1.5rem 2rem;
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.footer-col p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-muted);
    max-width: 280px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.footer-col ul a {
    font-size: 0.8125rem;
    color: var(--color-muted);
    transition: color var(--transition);
}

.footer-col ul a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    text-align: center;
    padding: 1.25rem 1.5rem;
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1.5rem 1.5rem;
    }
}

/* ── Page title ─────────────────────────────────────────────────────────────── */
.page-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

/* ── Hero section (homepage) ───────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--color-accent), var(--color-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-muted);
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Album list controls ────────────────────────────────────────────────────── */
.list-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.search-box {
    font: inherit;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    width: min(300px, 100%);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* ── Album grid ─────────────────────────────────────────────────────────────── */
.album-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.album-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
}

.album-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.album-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.album-thumb-wrap {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-surface-2);
    position: relative;
}

.album-thumb-wrap--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-no-photo {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.album-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.album-card:hover .album-thumb {
    transform: scale(1.06);
}

.album-info {
    padding: 1rem 1.125rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
}

.album-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.album-date {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.album-count {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

/* ── Empty / no-results notices ─────────────────────────────────────────────── */
.empty-notice {
    color: var(--color-muted);
    font-size: 1.0625rem;
    margin-top: 1rem;
    line-height: 1.6;
}

.empty-notice a {
    font-weight: 600;
}

.no-results {
    color: var(--color-muted);
    font-size: 1rem;
    margin-top: 1rem;
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────────── */
.breadcrumb {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--color-accent);
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ── Album page header ──────────────────────────────────────────────────────── */
.album-header {
    margin-bottom: 2.5rem;
}

.album-meta-date {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    color: var(--color-muted);
}

.album-description {
    margin-top: 0.75rem;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--color-muted);
    max-width: 640px;
}

/* ── Photo grid ─────────────────────────────────────────────────────────────── */
.photo-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 0.625rem;
    }
}

.photo-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    position: relative;
}

.photo-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition);
}

.photo-item:hover .photo-thumb {
    transform: scale(1.08);
    filter: brightness(1.05);
}

/* ── Lightbox ───────────────────────────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lb-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.lightbox[hidden] {
    display: none;
}

@keyframes lb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lb-figure {
    position: relative;
    max-width: min(94vw, 1400px);
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lb-img {
    max-width: 100%;
    max-height: calc(92dvh - 3rem);
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.7);
    transition: opacity 0.2s ease;
}

.lb-caption {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    margin-top: 0.75rem;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Lightbox buttons */
.lb-close,
.lb-prev,
.lb-next {
    position: fixed;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), border-color var(--transition);
    backdrop-filter: blur(12px);
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.2);
}

.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev  { left: 1.25rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1.25rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 480px) {
    .lb-prev { left: 0.5rem; }
    .lb-next { right: 0.5rem; }
    .lb-close,
    .lb-prev,
    .lb-next { width: 40px; height: 40px; font-size: 1.25rem; }
}

/* ── Flash messages ────────────────────────────────────────────────────────── */
.flash-messages {
    padding-top: 1rem;
    padding-bottom: 0;
}

.flash {
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    border: 1px solid;
}

.flash-success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.2);
}

.flash-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

.flash-info {
    background: rgba(108, 92, 231, 0.1);
    color: var(--color-accent);
    border-color: rgba(108, 92, 231, 0.2);
}

@media (prefers-color-scheme: light) {
    .flash-success { background: #eafaf1; color: #1e8449; border-color: #a9dfbf; }
    .flash-error   { background: #fdedec; color: #c0392b; border-color: #f5b7b1; }
    .flash-info    { background: #eee8ff; color: #5a48d5; border-color: #c5b9f2; }
}

/* ── Auth forms ────────────────────────────────────────────────────────────── */
.auth-page {
    max-width: 440px;
    margin: 3rem auto;
}

.auth-page h1 {
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.125rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    font: inherit;
    font-size: 0.9375rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: -0.01em;
}

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

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 16px var(--color-accent-glow);
}

.btn-primary:hover {
    background: var(--color-accent-h);
    color: #fff;
    box-shadow: 0 6px 24px var(--color-accent-glow);
}

.btn-secondary {
    background: var(--color-surface-2);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.4375rem 0.875rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-glow);
}

.btn-lg {
    font-size: 1.0625rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
}

.contact-subtitle {
    text-align: center;
    color: var(--color-muted);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.auth-links {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-muted);
    text-align: center;
}

.error-list {
    list-style: none;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.125rem;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

@media (prefers-color-scheme: light) {
    .error-list { background: #fdedec; color: #c0392b; border-color: #f5b7b1; }
}

.error-list li + li {
    margin-top: 0.25rem;
}

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.dash-subtitle {
    font-size: 0.9375rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

.dash-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Dashboard album cards */
.dash-album-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition);
}

.dash-album-card:hover {
    border-color: var(--color-accent);
}

.dash-album-card .album-info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1rem 1.125rem 0.75rem;
    flex: 1;
}

.dash-album-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.125rem 1rem;
    flex-wrap: wrap;
}

.dash-limit {
    font-size: 0.8125rem;
    color: var(--color-muted);
    padding: 0.5rem 0.875rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* ── Photo management grid ─────────────────────────────────────────────────── */
.manage-photo-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .manage-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }
}

.manage-photo-item {
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: border-color var(--transition);
}

.manage-photo-item:hover {
    border-color: var(--color-accent);
}

.manage-photo-item img {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
}

.manage-photo-item.is-cover {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
}

.manage-photo-actions {
    display: flex;
    gap: 0.375rem;
    padding: 0.625rem;
    flex-wrap: wrap;
}

.manage-photo-name {
    font-size: 0.75rem;
    color: var(--color-muted);
    padding: 0 0.625rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Upload area ───────────────────────────────────────────────────────────── */
.upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: border-color var(--transition), background var(--transition);
}

.upload-area.drag-over {
    border-color: var(--color-accent);
    background: var(--color-accent-glow);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-area label {
    cursor: pointer;
    color: var(--color-accent);
    font-weight: 600;
}

.upload-area label:hover {
    text-decoration: underline;
}

.upload-hint {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
}

.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-surface-2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-warm));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ── Form actions ──────────────────────────────────────────────────────────── */
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* ── Inline form ───────────────────────────────────────────────────────────── */
.inline-form {
    display: inline;
}

/* ── User profile header ───────────────────────────────────────────────────── */
.user-header {
    margin-bottom: 2.5rem;
}

.user-header h1 {
    margin-bottom: 0.25rem;
}

.user-header .album-count {
    font-size: 1rem;
    color: var(--color-muted);
}

/* ── Feature cards (homepage) ──────────────────────────────────────────────── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.875rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--color-muted);
    line-height: 1.5;
}

/* ── Section divider ───────────────────────────────────────────────────────── */
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

/* ── Admin panel ───────────────────────────────────────────────────────────── */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-stat-card--role {
    position: relative;
}

.admin-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.admin-stat-label {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.admin-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.admin-role-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-role-badge--member      { background: var(--color-surface-2); color: var(--color-muted); }
.admin-role-badge--vip         { background: rgba(244, 162, 97, 0.15); color: var(--color-warm); }
.admin-role-badge--admin       { background: rgba(108, 92, 231, 0.15); color: var(--color-accent); }
.admin-role-badge--super_admin { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

.admin-status-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
}

.admin-status-badge--active    { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.admin-status-badge--pending   { background: rgba(244, 162, 97, 0.15); color: var(--color-warm); }
.admin-status-badge--suspended { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

.admin-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-search {
    max-width: 240px;
}

.admin-filter-select {
    max-width: 160px;
}

.admin-table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--color-surface-2);
}

.admin-user-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-user-email {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.admin-date {
    font-size: 0.8125rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.admin-desc-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-action-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    background: var(--color-surface-2);
    color: var(--color-muted);
    font-family: monospace;
}

.admin-row-actions {
    display: flex;
    gap: 0.375rem;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
}

.admin-page-info {
    font-size: 0.875rem;
    color: var(--color-muted);
}

.admin-user-detail {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.8;
}

.admin-danger-zone {
    margin-top: 2.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-sm);
    background: rgba(231, 76, 60, 0.05);
}

.admin-danger-zone h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.admin-danger-zone p {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

/* ── Contact messages (admin) ──────────────────────────────────────────────── */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    transition: border-color var(--transition);
}

.message-card--read {
    border-left-color: var(--color-border);
    opacity: 0.75;
}

.message-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.message-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.message-name {
    font-size: 0.9375rem;
}

.message-email {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.message-date {
    font-size: 0.8125rem;
    color: var(--color-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-body {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── Cookie consent banner ─────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner p {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin: 0;
}

/* ── Legal pages ───────────────────────────────────────────────────────────── */
.legal-page h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.legal-page h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.375rem;
}

.legal-page p,
.legal-page li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-muted);
}

.legal-page ul {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.legal-page li + li {
    margin-top: 0.25rem;
}

.legal-updated {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }
}
