:root {
    --bg-dark: #edf4ff;
    --bg-panel: rgba(255, 255, 255, 0.96);
    --border-light: rgba(44, 98, 198, 0.16);
    --text-primary: #153567;
    --text-secondary: #55709b;
    --primary: #2d68f6;
    --primary-hover: #1c56df;
    --surface-alt: #f3f8ff;
    --success: #2db58c;
    --warning: #f4a548;
    --danger: #ef5a6f;
    --heart-active: #ef4444;
    
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
    
    --radius: 12px;
    --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }
body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(to bottom right, #FFF9FC 0%, #FFE4EC 50%, #E6DFF3 100%);
    background-attachment: fixed;
    color: var(--text-primary);

    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }
.glow-text {
    font-size: clamp(2.5rem, 8vw, 4.75rem);
    font-weight: 800;
    background: linear-gradient(to right, #12386e, #2d68f6 54%, #6da0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    margin-bottom: 1rem;
    text-shadow: 0 14px 32px rgba(76, 130, 233, 0.18);
}
.eyebrow {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5472aa;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 42rem;
    margin-inline: auto;
    line-height: 1.8;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.w-full { width: 100%; }
.inline { display: inline-block; }
.float-right { float: right; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 0.5rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    font-family: inherit; font-weight: 700; font-size: 1.05rem;
    cursor: pointer; transition: all var(--transition); border: none;
    text-decoration: none;
    min-height: 52px;
}
.btn-large { padding: 1.1rem 2.25rem; font-size: 1.125rem; border-radius: 999px; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; border-radius: 999px; }

.btn-primary { 
    background: linear-gradient(to right, #ff6b9d, #ffb3c1); 
    color: white; 
    border-radius: 999px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.2);
}
.btn-primary:hover { 
    background: linear-gradient(to right, #ff5e91, #ffa8b8); 
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.35);
    transform: translateY(-1px);
}
.btn-outline { 
    background-color: white; 
    border: 1px solid rgba(255, 107, 157, 0.35); 
    color: #ff6b9d; 
}
.btn-outline:hover { 
    background-color: rgba(255, 107, 157, 0.04); 
    border-color: #ff6b9d;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.1);
}
.btn-ghost { 
    background-color: transparent; 
    border: 1px solid rgba(255, 107, 157, 0.15); 
    color: #ff6b9d; 
}
.btn-ghost:hover { 
    background-color: rgba(255, 107, 157, 0.06); 
}
.btn-success { background-color: var(--success); color: white; border-radius: 999px; }
.btn-warning { background-color: var(--warning); color: white; border-radius: 999px; }
.btn-danger { background-color: var(--danger); color: white; border-radius: 999px; }

.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 1rem 1.5rem 0;
}
.site-nav-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(26, 69, 142, 0.08);
    backdrop-filter: blur(16px);
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: var(--text-primary);
}
.site-brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 14px;
    background: white;
    padding: 0.2rem;
    box-shadow: 0 10px 24px rgba(45, 104, 246, 0.1);
}
.site-brand-copy {
    display: grid;
    gap: 0.2rem;
}
.site-brand-kicker {
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.site-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.btn-nav {
    min-height: 46px;
    padding-inline: 1.15rem;
}

.hero {
    position: relative; padding: 1.4rem 1.5rem 3rem; overflow: hidden;
}
.hero-shell {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(45, 104, 246, 0.12);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(29, 83, 178, 0.1);
    backdrop-filter: blur(16px);
}
.hero-content {
    text-align: center;
    padding-top: 3rem;
}
.hero-brand-card {
    padding: 1rem;
    max-width: 360px;
    background: white;
}
.hero-brand-logo {
    display: block;
    width: 100%;
    height: auto;
}
.admin-kicker,
.partner-label {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-bg-glow {
    position: absolute; top: 50%; left: 50%; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(89, 152, 255, 0.18) 0%, rgba(255,255,255,0) 70%);
    transform: translate(-50%, -50%); z-index: 1; pointer-events: none;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.modal-backdrop {
    position: fixed; inset: 0; background: rgba(21, 53, 103, 0.3); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 100;
    opacity: 1; transition: opacity var(--transition);
}
.modal-backdrop.hidden { opacity: 0; pointer-events: none; display: none !important;}
.modal {
    width: 90%; max-width: 500px; padding: 2rem; position: relative;
    transform: scale(1); transition: transform var(--transition);
}
.modal-backdrop.hidden .modal { transform: scale(0.95); }
.close-btn {
    position: absolute; top: 1rem; right: 1rem; background: transparent; border: none;
    color: var(--text-secondary); cursor: pointer; border-radius: 50%; padding: 0.5rem;
    transition: all var(--transition);
}
.close-btn:hover { color: #ff6b9d; background: rgba(255, 107, 157, 0.1); }

.modal-large { max-width: 900px; padding: 0; overflow: hidden; border-radius: 20px; width: 95%; max-height: 90vh; }
.image-modal-content { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr); background: white; height: 650px; max-height: 85vh; }

@media (max-width: 768px) {
    .image-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: minMax(250px, 45vh) auto;
        overflow-y: auto;
        height: 85vh;
    }
    .img-wrapper {
        min-height: 0;
        height: 100%;
    }
}

.img-wrapper {
    min-height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    overflow: hidden;
}
.img-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.image-modal-sidebar { padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; overflow-y: auto; }
.modal-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.modal-text h3 { font-size: 1.75rem; margin-bottom: 0.75rem; color: #111; }
.modal-text p { color: #444; white-space: pre-wrap; line-height: 1.6; }
.modal-actions { display: flex; align-items: center; border-top: 1px solid var(--border-light); padding-top: 1.25rem; margin-top: 1rem; }
.modal-hint { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem; }

.form-group { margin-bottom: 1.5rem; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
label { display: block; margin-bottom: 0.6rem; font-size: 0.98rem; font-weight: 700; color: var(--text-secondary); }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%; padding: 0.95rem 1rem; border-radius: 10px;
    background: white; border: 1px solid rgba(133, 167, 232, 0.55);
    color: var(--text-primary); font-family: inherit; font-size: 1.05rem; transition: border var(--transition), background var(--transition);
    min-height: 52px;
}
textarea { min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); background: #fafdff; }
.char-counter-container {
    text-align: right;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    opacity: 0.8;
}

.file-drop-area {
    position: relative; border: 2px dashed rgba(93, 138, 225, 0.34); border-radius: 16px;
    padding: 2rem; text-align: center; color: var(--text-secondary); transition: border var(--transition), background var(--transition);
    font-size: 1.05rem;
    min-height: 140px;
    display: grid;
    place-items: center;
    background: var(--surface-alt);
}
.file-drop-area:hover { border-color: var(--primary); color: var(--text-primary); background: #edf4ff; }
.file-drop-area input[type="file"] {
    position: absolute; top:0; left:0; width:100%; height:100%; opacity:0; cursor:pointer;
}
.upload-preview {
    margin-top: 1rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--surface-alt);
    padding: 0.8rem;
}
.upload-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}
.remove-image-btn {
    margin-top: 0.75rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    min-height: auto;
}

.gallery-container { padding-bottom: 4rem; }
.gallery-tier { margin-bottom: 3rem; }
.gallery-intro {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
}
.gallery-intro h2 {
    font-size: clamp(1.8rem, 5vw, 2.3rem);
    margin-bottom: 0.5rem;
}
.gallery-intro p,
.gallery-note {
    color: var(--text-secondary);
    line-height: 1.7;
}
.empty-gallery {
    padding: 3rem 2rem;
    text-align: center;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    background: white;
}
.empty-gallery svg {
    width: 2rem;
    height: 2rem;
}

.tier-main { 
    display: flex; justify-content: center; 
}
.card-main { 
    width: 100%; max-width: 800px; aspect-ratio: 16/9; 
}

.tier-secondary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;
    max-width: 900px; margin-inline: auto;
}
.card-secondary { aspect-ratio: 4/3; }

.tier-regular {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem;
}
.card-regular { aspect-ratio: 1; }

.memory-card {
    position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
    box-shadow: var(--shadow-sm); transform: translateY(0); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.memory-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); z-index: 10; }
.memory-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; background: rgba(0,0,0,0.3);}
.memory-card:hover img { transform: scale(1.05); }

.card-overlay {
    position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
    opacity: 1; transition: background var(--transition); display: flex; align-items: flex-end; padding: 1.5rem;
}
@media (max-width: 768px) {
    .card-overlay { background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%); padding: 1rem; }
}
.memory-card:hover .card-overlay { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 65%); }
.card-info { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
.card-info h3, .card-info h4 { margin: 0; text-shadow: 0 2px 4px rgba(0,0,0,0.5); font-weight: 500; color: white; }

.like-badge {
    display: inline-flex; align-items: center; gap: 0.35rem; 
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 0.5rem 0.85rem; border-radius: 999px; font-size: 0.95rem; font-weight: 600;
    transition: all var(--transition); cursor: pointer; border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.like-badge:hover { background: rgba(255, 255, 255, 0.4); border-color: rgba(255,255,255,0.6); transform: scale(1.05) translateY(-2px); }
.like-badge .heart-icon { width: 16px; height: 16px; stroke: white; fill: transparent; transition: all var(--transition); }
.like-badge.liked .heart-icon { stroke: var(--heart-active); fill: var(--heart-active); }
.modal-like {
    display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; border: none;
    font-size: 1.3rem; font-weight: 600; cursor: pointer; color: var(--text-primary); padding: 0;
    transition: transform 0.2s ease;
}
.modal-like:hover { transform: scale(1.05); }
.modal-like .heart-icon { width: 28px; height: 28px; stroke: #888; fill: transparent; transition: all 0.2s; }
.modal-like.liked .heart-icon { stroke: var(--heart-active); fill: var(--heart-active); }

.admin-layout .admin-main { padding-top: 1rem; padding-bottom: 3rem;}
.admin-nav { background: transparent; border-bottom: none; padding: 1rem 0 0.5rem; }
.admin-nav .admin-kicker, .admin-nav h1 { display: none; }
.admin-nav .nav-content { justify-content: flex-end; }
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}
.login-card {
    max-width: 440px;
    padding: 2.5rem;
}


.dashboard-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.summary-stats {
    display: flex;
    gap: 1rem;
}
.summary-stats div {
    min-width: 110px;
    padding: 1rem;
    border-radius: 12px;
    background: #eef4ff;
}
.summary-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) {
    .dashboard-grid { grid-template-columns: repeat(3, 1fr); }
}
.queue-section { background: rgba(255,255,255,0.96); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.queue-section h2 { font-size: 1.25rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.queue-pending h2 { color: var(--primary); }
.queue-approved h2 { color: var(--success); }
.queue-rejected h2 { color: var(--text-secondary); }

.card-list { display: flex; flex-direction: column; gap: 1rem; }
.admin-card { overflow: hidden; display: flex; flex-direction: column;}
.admin-card img { width: 100%; height: 200px; object-fit: cover; background: #e6efff;}
.admin-card-body { padding: 1rem; font-size: 0.96rem; }
.caption-text { color: var(--text-secondary); font-style: italic; margin-top: 0.5rem; }
.meta-line { color: var(--text-secondary); margin-top: 0.5rem; font-size: 0.82rem; }
.badge { padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.badge-main { background: linear-gradient(to right, #6ba4ff, #2f6bff); color: white; }
.badge-secondary { background: var(--primary); color: white; }
.badge-regular { background: #e9f1ff; color: var(--text-secondary); }
.tier-main { border: 1px solid #7db2ff; }
.opacity-50 { opacity: 0.5; }
.empty-state { color: var(--text-secondary); }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.flash-messages { margin-bottom: 1rem; }
.flash { padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border-light); margin-bottom: 0.5rem; }
.flash-success { background: rgba(45, 181, 140, 0.1); color: #72e2bc; border-color: rgba(45, 181, 140, 0.2); }
.flash-error { background: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
.error-page {
    min-height: calc(100vh - 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}
.error-panel {
    width: min(100%, 640px);
    padding: 2rem;
    text-align: center;
}
.error-code {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}
.error-message {
    color: var(--text-secondary);
    margin: 1rem auto 2rem;
    max-width: 36rem;
}
.site-footer-bar {
    padding: 0 1.5rem 2rem;
}
.footer-bar-shell {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center;
    padding: 1.3rem 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: 24px;
    background: white;
    box-shadow: 0 18px 45px rgba(26, 69, 142, 0.08);
}
.footer-bar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.footer-copy {
    color: var(--text-secondary);
    max-width: 36rem;
    line-height: 1.7;
}
.footer-partner {
    min-width: 250px;
    text-align: right;
}
.partner-logo {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-top: 0.7rem;
}

@media (max-width: 900px) {
    .image-modal-content {
        grid-template-columns: 1fr;
    }

    .image-modal-sidebar {
        padding-top: 1.25rem;
    }

    .gallery-intro,
    .dashboard-summary,
    .summary-stats,
    .image-modal-sidebar {
        display: grid;
    }

    .summary-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-shell,
    .footer-bar-shell {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hero-brand-card,
    .footer-partner {
        max-width: none;
        text-align: left;
    }

    .hero-brand-card {
        justify-self: start;
        width: min(100%, 420px);
    }

    .partner-logo {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 1.2rem;
    }

    .hero-content {
        padding-top: 0;
        text-align: left;
    }

    .site-nav-shell,
    .site-nav-actions,
    .hero-actions,
    .nav-content,
    .dashboard-summary,
    .gallery-intro {
        display: grid;
    }

    .site-brand {
        align-items: start;
    }

    .hero-actions .btn,
    .site-nav-actions .btn,
    .nav-content .btn,
    .admin-actions .btn,
    .flex-gap .btn {
        width: 100%;
    }

    .nav-content,
    .dashboard-summary,
    .gallery-intro {
        gap: 1rem;
    }

    .admin-actions {
        display: grid;
        gap: 0.75rem;
    }

    .inline,
    .float-right {
        display: block;
        float: none;
    }

    .flex-gap {
        display: grid;
    }

    .card-info {
        gap: 0.75rem;
        align-items: center;
    }
}

/* ════════════════════════════════════════
   MAIN PAGE — Wireframe layout
   ════════════════════════════════════════ */

.layout-page {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

/* ── Logo bar ── */
.logo-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    margin-bottom: 2rem;
}
.logo-bar-img { 
    height: 80px; 
    width: auto; 
    filter: brightness(0.9) saturate(1.4); /* Make the blue more vibrant to match Danson */
}
.logo-bar-danson { 
    height: 55px; 
    width: auto; 
    margin-left: auto; 
}

/* ── Title row ── */
.title-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.page-title {
    grid-column: 2;
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    color: var(--text-primary);
}
.share-toggle {
    grid-column: 3;
    justify-self: end;
}
.share-toggle i {
    vertical-align: middle;
}

/* ── Share modal popup ── */
.share-modal {
    max-width: 380px;
    padding: 2rem;
    display: grid;
    gap: 1rem;
    justify-items: center;
    text-align: center;
}
.share-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}
.share-qr-box {
    width: 100%;
    aspect-ratio: 1;
    max-width: 240px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(45, 104, 246, 0.16);
    border-radius: 16px;
    background: #f7fbff;
    padding: 1rem;
}
.share-qr-box canvas,
.share-qr-box img {
    max-width: 100%;
    height: auto;
}
.share-qr-placeholder {
    color: #8aa0c5;
    font-size: 1.2rem;
    letter-spacing: 0.16em;
}
.share-modal-actions {
    width: 100%;
    display: grid;
    gap: 0.75rem;
}
.share-message {
    min-height: 1.3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.share-message[data-tone="success"] {
    color: var(--success);
}
.share-message[data-tone="error"] {
    color: var(--danger);
}

/* ── Stats row ── */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}
.stats-card {
    min-width: 200px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    transition: transform var(--transition);
}
.stats-card:hover {
    transform: translateY(-5px);
}
.stats-value {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ff6b8b; /* Pink tone from user screenshot */
    line-height: 1;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 12px rgba(255, 107, 139, 0.2);
}
.stats-label {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Upload row ── */
.upload-row {
    text-align: center;
    margin-bottom: 1.5rem;
}


/* ── Upload modal popup ── */
.upload-modal {
    max-width: 480px;
    padding: 2rem;
}
.upload-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.upload-modal .form-group {
    margin-bottom: 1.25rem;
}
.upload-modal .compact-drop {
    min-height: 100px;
}
.form-message {
    min-height: 1.3rem;
    margin-top: 0.6rem;
    font-size: 0.92rem;
}

/* ── Feature grid (Main + Secondary) ── */
.feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(160px, 0.7fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    min-height: 400px;
}
.feature-secondary-stack {
    display: grid;
    gap: 1rem;
    grid-template-rows: 1fr 1fr;
    height: 100%;
    min-height: 0;
}
.feature-card {
    position: relative;
    appearance: none;
    border: 1px solid rgba(45, 104, 246, 0.16);
    background: #f6faff;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    min-height: 0;
}
.feature-main {
    height: 100%;
    width: 100%;
}
.feature-secondary {
    height: 100%;
    width: 100%;
}
.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.feature-label {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    background: rgba(21, 53, 103, 0.78);
    color: white;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    z-index: 2;
}
.feature-placeholder {
    display: grid;
    place-items: center;
    color: #7a93bc;
    background: linear-gradient(135deg, #f8fbff, #edf4ff);
}

/* ── Gallery box ── */
.gallery-box {
    padding: 1.25rem;
}
.gallery-box-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.gallery-thumb-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}
.gallery-thumb {
    position: relative;
    appearance: none;
    aspect-ratio: 1;
    border: 1px solid rgba(45, 104, 246, 0.14);
    background: #f6faff;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-thumb .card-overlay {
    padding: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .gallery-thumb-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .feature-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .feature-main {
        aspect-ratio: 4 / 3;
        height: auto;
    }
    .feature-secondary-stack {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .feature-secondary {
        aspect-ratio: 1;
    }
    .gallery-thumb-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .title-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 0.8rem;
    }
    .page-title {
        grid-column: 1;
    }
    .share-toggle {
        grid-column: 1;
        justify-self: center;
    }
    .logo-bar {
        flex-wrap: wrap;
    }
}

/* gallery section spacing for inline gallery below box */
.gallery-section {
    margin-top: 2rem;
}


.admin-wireframe-header {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.admin-wireframe-header h2 {
    margin: 0;
}

.admin-stat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-stat-strip span {
    border: 1px solid rgba(45, 104, 246, 0.16);
    background: #f3f8ff;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

.admin-tab-bar {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
}

.admin-tab {
    appearance: none;
    border: 1px solid rgba(45, 104, 246, 0.16);
    background: #fdfdfd;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.admin-tab:hover {
    background: #f0f6ff;
    border-color: #accfff;
    transform: translateY(-1px);
}

.admin-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.admin-row-list {
    display: grid;
    gap: 1rem;
}

.admin-row-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) minmax(180px, 220px);
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-row-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03);
}

.admin-row-thumb {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    background: #e6efff;
}

.admin-row-meta {
    min-width: 0;
}

.admin-row-name {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.admin-row-caption {
    color: var(--text-secondary);
    line-height: 1.6;
}

.admin-row-actions {
    display: grid;
    gap: 0.6rem;
}

.tier-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (max-width: 1100px) {
    .gallery-thumb-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .layout-page {
        padding-top: 0.6rem;
    }

    .feature-grid,
    .tier-chip-row,
    .admin-tab-bar {
        grid-template-columns: 1fr;
        display: grid;
        height: auto;
        min-height: auto;
    }

    .admin-row-card {
        grid-template-columns: 80px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 1rem;
        padding: 1rem;
    }

    .admin-row-thumb {
        width: 80px;
        height: 80px;
        grid-column: 1;
        grid-row: 1;
    }

    .admin-row-meta {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .admin-row-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .gallery-thumb-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── Password Field ── */
.password-field-group {
    position: relative;
    display: flex;
    align-items: center;
}
.password-field-group input {
    padding-right: 3.5rem !important;
}
.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.password-toggle:hover {
    color: var(--primary);
}

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 380px;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }

.toast-content {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

@keyframes toast-in {
    from { transform: translateX(100%) scale(0.9); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}
.toast-fade-out {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
}
/* ── Gallery Pagination ── */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1rem;
}
.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.pagination-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 157, 0.2);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ff6b9d;
}
.pagination-btn:hover:not(:disabled) {
    background: #ff6b9d;
    color: white;
    border-color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}
.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
}
.pagination-info {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 0.5rem;
}
.pagination-info span {
    color: var(--text-secondary);
    font-weight: 400;
}

@media (max-width: 768px) {
    .pagination-container {
        margin-top: 2rem;
        gap: 1rem;
    }
}

/* ── Admin Dashboard Redesign ── */
.admin-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    padding: 0.5rem 0;
}
.admin-dashboard-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.75rem;
    font-weight: 700;
    color: #ff6b9d;
    margin: 0;
}
.back-to-gallery {
    font-weight: 600;
    color: #ff6b9d !important;
    border-color: rgba(255, 107, 157, 0.2) !important;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06); }

.stat-info { display: flex; flex-direction: column; gap: 0.75rem; }
.stat-label { font-size: 1rem; font-weight: 600; color: #9a9ca3; }
.stat-value { font-size: 3rem; font-weight: 800; line-height: 1; }

.stat-icon-box {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
}
.stat-icon-box i { width: 32px; height: 32px; stroke-width: 2.5px; }

/* Colors */
.text-pink { color: #ff6b9d; }
.text-green { color: #2db58c; }
.text-red { color: #fa4b51; }

.bg-pink-soft { background-color: #ff6b9d; } /* Solid color like in the image box */
.bg-green-soft { background-color: #2db58c; }
.bg-red-soft { background-color: #fa4b51; }

.stat-icon-box i { color: white; } /* Icons are white in the colored boxes in the image */

@media (max-width: 900px) {
    .admin-stats-grid { grid-template-columns: 1fr; }
    .admin-dashboard-header { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
    .admin-dashboard-title { position: static; transform: none; text-align: left; }
}
