/* ============================================================
   GLOBAL RESET & SMOOTH SCROLL
   ============================================================ */
html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================================
   DARK PANEL — GLOBAL CONTEXT OVERRIDES
   Automatically darkens native select/textarea/input elements
   and common Tailwind bg-white / text-gray patterns inside
   the authenticated dark panel area.
   ============================================================ */
.panel-bg select,
.panel-bg textarea {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: border-color .15s, background .15s;
}

.panel-bg select:focus,
.panel-bg textarea:focus {
    background: rgba(37, 150, 255, 0.06) !important;
    border-color: rgba(74, 174, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(37, 150, 255, 0.10) !important;
    outline: none;
}

.panel-bg select option {
    background: #13141f;
    color: rgba(255, 255, 255, 0.85);
}

/* Tailwind utility overrides inside panel — re-maps light classes to dark equivalents */
.panel-bg .bg-white {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
}

.panel-bg .bg-gray-50 {
    background: rgba(255, 255, 255, 0.025) !important;
}

.panel-bg .bg-gray-100 {
    background: rgba(255, 255, 255, 0.04) !important;
}

.panel-bg .text-gray-900,
.panel-bg .text-gray-800 {
    color: rgba(255, 255, 255, 0.88) !important;
}

.panel-bg .text-gray-700,
.panel-bg .text-gray-600 {
    color: rgba(255, 255, 255, 0.55) !important;
}

.panel-bg .text-gray-500,
.panel-bg .text-gray-400 {
    color: rgba(255, 255, 255, 0.35) !important;
}

.panel-bg .border-gray-200,
.panel-bg .border-gray-100 {
    border-color: rgba(255, 255, 255, 0.07) !important;
}

.panel-bg .divide-gray-200>*+* {
    border-color: rgba(255, 255, 255, 0.07) !important;
}

/* ============================================================
   BRAND COLORS
   ============================================================ */
.bg-brand-gradient {
    background-color: #2596ff;
}

.text-brand-gradient {
    background: linear-gradient(to right, #2596ff 0%, #762de9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-brand-gradient {
    border-color: #2596ff;
}

.hover\:bg-brand-gradient-light:hover {
    background-color: #1a7fe0;
}

.hover\:bg-brand-gradient-dark:hover {
    background-color: #1565c0;
}

/* ============================================================
   PANEL — PAGE BACKGROUNDS
   ============================================================ */
/* Main content area background */
.panel-bg {
    background: #0a0b14 !important;
    color: rgba(255, 255, 255, 0.75);
    /* Base white for all panel text */
}

/* ============================================================
   PANEL — SIDEBAR
   ============================================================ */
.sidebar-bg {
    background: #0f0f1a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sidebar-divider {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sidebar-divider-top {
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sidebar-nav-active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(37, 150, 255, 0.25), rgba(118, 45, 233, 0.15)) !important;
    box-shadow: inset 0 0 0 1px rgba(37, 150, 255, 0.2);
}

.sidebar-admin-active,
.sidebar-acct-active {
    color: #fff;
    background: rgba(37, 150, 255, 0.18);
}

.sidebar-user-pill {
    background: rgba(255, 255, 255, 0.04);
    border-radius: .75rem;
}

.sidebar-avatar {
    background: linear-gradient(135deg, #2596ff, #762de9) !important;
    color: #fff !important;
}

.sidebar-soon-badge {
    font-size: 9px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    padding: 1px 7px;
    border-radius: 20px;
}

/* ============================================================
   PANEL — TOP HEADER BAR
   ============================================================ */
.topbar-bg {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(20px);
}

/* ============================================================
   PANEL — SHARED CARDS
   ============================================================ */
.dash-card,
.gen-card,
.gal-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    box-shadow: none;
    transition: border-color .25s ease, box-shadow .25s ease, transform .2s ease;
    /* Force all text white inside dark cards */
    color: rgba(255, 255, 255, 0.85);
}

/* ── Uniform glow hover — same on every card type ── */
.dash-card:hover,
.gen-card:hover,
.gal-card:hover {
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

/* Popular plan card keeps its indigo ring but still gets depth on hover */
.dash-card.ring-2:hover,
.gen-card.ring-2:hover {
    box-shadow:
        0 0 0 2px rgba(99, 102, 241, 0.6),
        0 0 30px rgba(99, 102, 241, 0.2),
        0 10px 32px rgba(0, 0, 0, 0.3);
}

/* ── Billing page plan cards — indigo glow border on hover ── */
.billing-plan-card {
    transition: border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}

.billing-plan-card:hover {
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.18),
        0 0 22px rgba(99, 102, 241, 0.14),
        0 8px 28px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px);
}

.billing-plan-card.ring-2:hover {
    box-shadow:
        0 0 0 2px rgba(99, 102, 241, 0.65),
        0 0 32px rgba(99, 102, 241, 0.22),
        0 10px 34px rgba(0, 0, 0, 0.3) !important;
}

.card-divider {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}




/* ============================================================
   PANEL — STAT ICON BADGES
   ============================================================ */
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-icon-amber {
    background: rgba(245, 158, 11, 0.12);
}

.stat-icon-indigo {
    background: rgba(37, 150, 255, 0.12);
}

.stat-icon-green {
    background: rgba(16, 185, 129, 0.12);
}

.stat-icon-violet {
    background: rgba(139, 79, 240, 0.12);
}

/* ============================================================
   PANEL — WELCOME BANNER (Dashboard)
   ============================================================ */
.welcome-banner {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1040 50%, #0d1a3a 100%) !important;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.welcome-banner-glow-a {
    position: absolute;
    top: -60px;
    left: -40px;
    width: 260px;
    height: 260px;
    background: rgba(37, 150, 255, 0.25);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.welcome-banner-glow-b {
    position: absolute;
    bottom: -80px;
    right: 60px;
    width: 220px;
    height: 220px;
    background: rgba(118, 45, 233, 0.2);
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.welcome-banner-cta {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: .75rem;
    font-weight: 700;
    font-size: .875rem;
    padding: .75rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    text-decoration: none;
    transition: background .15s;
}

.welcome-banner-cta:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ============================================================
   PANEL — CREDIT PROGRESS BAR
   ============================================================ */
.credit-bar-track {
    height: 6px;
    border-radius: 99px;
    background: #f1f3f8;
    overflow: hidden;
}

.credit-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    transition: width .4s;
}

/* ============================================================
   PANEL — GRADIENT BUTTONS
   ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, #2596ff, #762de9);
    color: #fff;
    border: none;
    border-radius: .75rem;
    font-weight: 700;
    padding: .6rem 1.2rem;
    font-size: .875rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(37, 150, 255, 0.3);
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 150, 255, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: .75rem;
    font-weight: 600;
    padding: .6rem 1.2rem;
    font-size: .875rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* ============================================================
   GENERATOR PAGE — FORM INPUTS & DROPDOWNS
   ============================================================ */
.gen-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: .35rem;
}

.gen-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: .75rem;
    padding: .625rem .9rem;
    font-size: .875rem;
    color: rgba(255, 255, 255, 0.85);
    transition: border-color .15s, background .15s, box-shadow .15s;
    outline: none;
}

.gen-input:focus {
    background: rgba(37, 150, 255, 0.06);
    border-color: rgba(74, 174, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(37, 150, 255, .10);
}

.gen-input:hover:not(:focus) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.gen-dropdown-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: .75rem;
    padding: .6rem .9rem;
    font-size: .875rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    outline: none;
}

.gen-dropdown-btn:hover,
.gen-dropdown-btn:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(74, 174, 255, 0.4);
}

.gen-dropdown-menu {
    position: absolute;
    z-index: 40;
    width: 100%;
    margin-top: .35rem;
    background: #13141f;
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: .9rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    padding: .35rem 0;
}

.gen-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: .6rem 1rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: background .1s, color .1s;
    background: none;
    border: none;
}

.gen-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.gen-dropdown-item.selected {
    background: rgba(37, 150, 255, 0.12);
    color: #4aaeff;
    font-weight: 600;
}

.style-chip,
.gen-style-card {
    cursor: pointer;
    border-radius: .85rem;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color .15s, box-shadow .15s;
    position: relative;
}

.style-chip.active,
.gen-style-card.active {
    border-color: #4aaeff;
    box-shadow: 0 0 0 3px rgba(37, 150, 255, .18);
    background: rgba(37, 150, 255, 0.08);
}

.resolution-card {
    border-radius: .9rem;
    padding: .8rem;
    border: 2px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: rgba(255, 255, 255, 0.04);
}

.resolution-card.active {
    border-color: #4aaeff;
    background: rgba(37, 150, 255, 0.08);
}

.resolution-card:hover:not(.active) {
    border-color: rgba(74, 174, 255, 0.4);
    background: rgba(255, 255, 255, 0.07);
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #2596ff, #762de9);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    padding: .95rem 1.5rem;
    border-radius: .9rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    box-shadow: 0 4px 20px rgba(37, 150, 255, .35);
    transition: transform .2s, box-shadow .2s, opacity .2s;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 150, 255, .45);
}

.generate-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gal-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 15, 26, 0.88) 0%, rgba(15, 15, 26, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity .22s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: .9rem;
}

.gal-card:hover .gal-overlay {
    opacity: 1;
}

.gal-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, transform .15s;
    border: none;
    text-decoration: none;
    flex-shrink: 0;
}

.gal-action-btn:hover {
    transform: scale(1.08);
}

.gal-action-btn.btn-expand {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.gal-action-btn.btn-download {
    background: rgba(37, 150, 255, 0.85);
    color: #fff;
}

.gal-action-btn.btn-edit {
    background: rgba(139, 79, 240, 0.85);
    color: #fff;
}

.gal-action-btn.btn-delete {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: .6rem;
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: border-color .15s, background .15s, color .15s;
    background: rgba(255, 255, 255, 0.04);
}

.page-btn:hover {
    border-color: rgba(74, 174, 255, 0.5);
    color: #4aaeff;
    background: rgba(37, 150, 255, 0.06);
}

.page-btn.active {
    background: linear-gradient(135deg, #2596ff, #762de9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(37, 150, 255, .3);
}

.page-btn.disabled {
    opacity: .4;
    pointer-events: none;
}

/* ============================================================
   LANDING PAGE HERO
   ============================================================ */
.hero-section {
    background: #060b18;
    position: relative;
    overflow: hidden;
}

.hero-glow-a {
    position: absolute;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: rgba(37, 150, 255, 0.20);
    border-radius: 50%;
    filter: blur(120px);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-glow-b {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background: rgba(139, 79, 240, 0.15);
    border-radius: 50%;
    filter: blur(100px);
    transform: translate(30%, 30%);
    pointer-events: none;
}

/* Dark section background (marquee, FAQ, Feature B) */
.section-dark {
    background: #060b18;
}

/* Floating UI card backgrounds */
.float-card-bg {
    background: #0f172a;
}

.float-card-bg-overlay {
    background: rgba(15, 23, 42, 0.95);
}

.float-card-bg-soft {
    background: rgba(15, 23, 42, 0.9);
}

/* ============================================================
   MODALS — SHARED BACKDROP & CARD
   ============================================================ */
.modal-backdrop {
    background: rgba(10, 10, 20, 0.75);
    backdrop-filter: blur(6px);
}

.modal-card {
    background: #13141f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.55);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 480px) {
    .guide-modal-box {
        border-radius: 1rem !important;
        max-height: 95vh !important;
    }
    .guide-modal-box .modal-header {
        padding: 1rem !important;
    }
    .guide-modal-box [style*="padding:1.25rem 1.5rem"] {
        padding: 1rem !important;
    }
    .guide-modal-box .btn-primary {
        font-size: 0.875rem;
    }
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.animate-shimmer {
    background-size: 200% 100%;
    animation: shimmer 1.8s linear infinite;
}

/* ============================================================
   SCROLLBARS
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0b14;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ============================================================
   SHARED UTILITY — DIVIDERS & BORDERS
   ============================================================ */
/* horizontal rule inside a card/section */
.divider-soft {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.divider-soft-t {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.divider-soft-l {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* dashed empty-state border */
.empty-dashed {
    border: 2px dashed rgba(255, 255, 255, 0.08);
}

/* ============================================================
   SHARED UTILITY — ICON BADGE (small section icon)
   ============================================================ */
/* indigo tinted icon box used in card headers */
.icon-box-indigo {
    background: linear-gradient(135deg, rgba(37, 150, 255, 0.15), rgba(118, 45, 233, 0.1));
}

.icon-box-indigo-sm {
    background: linear-gradient(135deg, rgba(37, 150, 255, 0.12), rgba(118, 45, 233, 0.08));
}

.icon-box-indigo-xs {
    background: rgba(37, 150, 255, 0.10);
}

/* ============================================================
   SHARED UTILITY — LABEL HINT TEXT
   ============================================================ */
.label-hint {
    color: #d1d5db;
    font-weight: 400;
}

/* ============================================================
   SHARED UTILITY — TOAST / ALERTS
   ============================================================ */
.toast-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: .75rem;
}

/* ============================================================
   GENERATOR — OUTPUT PANEL INTERNALS
   ============================================================ */
/* Generated badge */
.generated-badge {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .6875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
}

/* Empty state area inside output card */
.output-empty {
    border: 2px dashed rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1rem;
}

/* Output image card */
.output-image {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
}

/* Headline result panel */
.result-headline-panel {
    background: rgba(37, 150, 255, 0.06);
    border: 1px solid rgba(37, 150, 255, 0.15);
    border-radius: 1rem;
}

/* Download action button inside output */
.btn-download-img {
    background: linear-gradient(135deg, #2596ff, #762de9);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 150, 255, 0.3);
    border-radius: .75rem;
    font-weight: 700;
    font-size: .75rem;
    padding: .5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
}

.btn-download-img:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 150, 255, 0.4);
}

/* ============================================================
   GENERATOR — PREMIUM LOADING STATE
   ============================================================ */

/* ── Overlay ── */
.gen-loading-overlay {
    position: absolute;
    inset: 0;
    top: 72px;
    /* below card header */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 1.25rem 1.25rem;
    background: linear-gradient(160deg, #0a0a14 0%, #0f0e22 40%, #0a0f1e 100%);
    z-index: 20;
    overflow: hidden;
}

/* ── Ambient background orbs ── */
.gen-loading-orb-a {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 150, 255, 0.22) 0%, transparent 70%);
    top: -80px;
    left: -80px;
    filter: blur(40px);
    animation: orb-drift-a 8s ease-in-out infinite;
    pointer-events: none;
}

.gen-loading-orb-b {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 79, 240, 0.18) 0%, transparent 70%);
    bottom: -60px;
    right: -40px;
    filter: blur(50px);
    animation: orb-drift-b 10s ease-in-out infinite;
    pointer-events: none;
}

.gen-loading-orb-c {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(30px);
    animation: orb-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

/* ── Central icon container ── */
.gen-loading-icon-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 28px;
}

/* Outer slow ring */
.gen-loading-ring-outer {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    border: 1.5px solid rgba(37, 150, 255, 0.2);
    animation: ring-rotate 6s linear infinite;
}

.gen-loading-ring-outer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4aaeff;
    box-shadow: 0 0 10px 3px rgba(37, 150, 255, 0.8);
}

/* Middle medium ring */
.gen-loading-ring-mid {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #9a3fe8;
    border-right-color: rgba(139, 79, 240, 0.3);
    animation: ring-rotate 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Inner fast ring */
.gen-loading-ring-inner {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: #4aaeff;
    border-left-color: rgba(37, 150, 255, 0.25);
    animation: ring-rotate-rev 1.2s linear infinite;
}

/* Core glowing circle */
.gen-loading-core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(37, 150, 255, 0.35), rgba(139, 79, 240, 0.15) 50%, transparent 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: core-pulse 2.5s ease-in-out infinite;
}

/* Impula brand logo inside the loading core */
.gen-loading-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 12px;
    animation: logo-breathe 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.7)) drop-shadow(0 0 28px rgba(37, 150, 255, 0.4));
}

@keyframes logo-breathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.65)) drop-shadow(0 0 24px rgba(37, 150, 255, 0.35));
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.9)) drop-shadow(0 0 40px rgba(37, 150, 255, 0.55));
    }
}

/* ── Floating particles ── */
.gen-loading-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gen-loading-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(37, 150, 255, 0.7);
    animation: particle-float linear infinite;
}

/* ── Text area ── */
.gen-loading-stage {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(37, 150, 255, 0.8);
    margin-bottom: .5rem;
}

.gen-loading-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .35rem;
    letter-spacing: -.01em;
}

.gen-loading-sub {
    font-size: .72rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 1.8rem;
}

/* ── Premium segmented progress bar ── */
.gen-loading-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}

.gen-loading-step {
    height: 3px;
    flex: 1;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.gen-loading-step-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #4aaeff, #9a3fe8);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gen-loading-step.done .gen-loading-step-fill {
    width: 100%;
    background: #4aaeff;
}

.gen-loading-step.active .gen-loading-step-fill {
    width: 100%;
    background: linear-gradient(90deg, #4aaeff, #9a3fe8, #4aaeff);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

/* ── Keyframes ── */
@keyframes orb-drift-a {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 20px) scale(1.1);
    }
}

@keyframes orb-drift-b {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-25px, -15px) scale(1.08);
    }
}

@keyframes orb-pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

@keyframes ring-rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ring-rotate-rev {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes core-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 150, 255, 0);
    }

    50% {
        box-shadow: 0 0 30px 8px rgba(37, 150, 255, 0.25);
    }
}

@keyframes particle-float {
    0% {
        transform: translateY(0) scale(1);
        opacity: .8;
    }

    100% {
        transform: translateY(-200px) scale(0.3);
        opacity: 0;
    }
}

/* Legacy aliases kept for any other usages */
.loading-glow {
    background: rgba(37, 150, 255, 0.18);
    border-radius: 50%;
    filter: blur(48px);
}

.loading-ring {
    background: rgba(37, 150, 255, 0.08);
    border: 5px solid rgba(37, 150, 255, 0.15);
    border-top-color: #4aaeff;
    animation: ring-rotate 1s linear infinite;
    border-radius: 50%;
    position: absolute;
    inset: 0;
}

.loading-progress-track {
    height: 6px;
    background: #e8eaf0;
    border-radius: 999px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4aaeff, #9a3fe8, #4aaeff);
    background-size: 200% 100%;
    animation: shimmer 1.8s linear infinite;
}

/* ============================================================
   GALLERY — LIGHTBOX
   ============================================================ */
.lightbox-img-panel {
    background: #0f0f1a;
}

.lightbox-close-btn {
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.7);
    border-radius: .75rem;
    transition: color .15s;
}

.lightbox-close-btn:hover {
    color: #fff;
}

.lightbox-sidebar {
    border-left: 1px solid #f0f2f7;
}

.lightbox-platform-badge {
    background: #eff6ff;
    color: #4aaeff;
    border-radius: 999px;
}

/* ============================================================
   GALLERY — SUCCESS badge / PRO badge
   ============================================================ */
.pro-badge {
    background: #fbbf24;
    color: #713f12;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
}

/* ============================================================
   SHARED — MODAL ICON BOX
   ============================================================ */
.modal-icon-box {
    background: rgba(37, 150, 255, 0.10);
    border-radius: .75rem;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* modal image preview (edit modal) */
.modal-preview-img {
    background: #f0f2f7;
    border: 1px solid #e8eaf0;
    border-radius: .85rem;
}

/* ============================================================
   BRAND QUICK-VIEW (inline panel)
   ============================================================ */
.brand-qv-row {
    border-bottom: 1px solid #f0f2f7;
    padding-top: .375rem;
    padding-bottom: .375rem;
}

/* ============================================================
   BRAND TAILWIND OVERRIDES — #2596FF → #762DE9
   Remaps Tailwind CDN indigo/violet classes to brand palette
   ============================================================ */

/* Text colors */
.text-indigo-400 {
    color: #60b4ff !important;
}

.text-indigo-500 {
    color: #4aaeff !important;
}

.text-indigo-600 {
    color: #2596ff !important;
}

.text-indigo-700 {
    color: #1a7fe0 !important;
}

.text-purple-400 {
    color: #a78bfa !important;
}

.text-purple-500 {
    color: #8b4ff0 !important;
}

.text-purple-600 {
    color: #762de9 !important;
}

.text-violet-400 {
    color: #a78bfa !important;
}

.text-violet-500 {
    color: #8b4ff0 !important;
}

.text-violet-600 {
    color: #762de9 !important;
}

/* Background colors */
.bg-indigo-50 {
    background-color: #eff6ff !important;
}

.bg-indigo-100 {
    background-color: #dbeafe !important;
}

.bg-indigo-500 {
    background-color: #4aaeff !important;
}

.bg-indigo-600 {
    background-color: #2596ff !important;
}

.bg-purple-500 {
    background-color: #8b4ff0 !important;
}

.bg-purple-600 {
    background-color: #762de9 !important;
}

/* Background opacity variants */
.bg-indigo-500\/10 {
    background-color: rgba(37, 150, 255, 0.10) !important;
}

.bg-indigo-500\/20 {
    background-color: rgba(37, 150, 255, 0.20) !important;
}

.bg-indigo-500\/30 {
    background-color: rgba(37, 150, 255, 0.30) !important;
}

.bg-purple-500\/10 {
    background-color: rgba(118, 45, 233, 0.10) !important;
}

.bg-purple-500\/20 {
    background-color: rgba(118, 45, 233, 0.20) !important;
}

.bg-purple-500\/30 {
    background-color: rgba(118, 45, 233, 0.30) !important;
}

/* Hover background */
.hover\:bg-indigo-50:hover {
    background-color: #eff6ff !important;
}

.hover\:bg-indigo-100:hover {
    background-color: #dbeafe !important;
}

.hover\:bg-indigo-500\/30:hover {
    background-color: rgba(37, 150, 255, 0.30) !important;
}

/* Border colors */
.border-indigo-200 {
    border-color: #bfdbfe !important;
}

.border-indigo-400 {
    border-color: #60b4ff !important;
}

.border-indigo-500 {
    border-color: #4aaeff !important;
}

.border-indigo-500\/20 {
    border-color: rgba(37, 150, 255, 0.20) !important;
}

.border-purple-500\/20 {
    border-color: rgba(118, 45, 233, 0.20) !important;
}

.border-purple-500\/30 {
    border-color: rgba(118, 45, 233, 0.30) !important;
}

/* Gradient from/to */
.from-indigo-500 {
    --tw-gradient-from: #4aaeff !important;
}

.from-indigo-600 {
    --tw-gradient-from: #2596ff !important;
}

.to-indigo-600 {
    --tw-gradient-to: #2596ff !important;
}

.from-purple-500 {
    --tw-gradient-from: #8b4ff0 !important;
}

.from-purple-600 {
    --tw-gradient-from: #762de9 !important;
}

.to-purple-600 {
    --tw-gradient-to: #762de9 !important;
}

.to-violet-600 {
    --tw-gradient-to: #762de9 !important;
}

/* Ring / focus ring */
.ring-indigo-500 {
    --tw-ring-color: rgba(37, 150, 255, 0.5) !important;
}

.focus\:ring-indigo-500:focus {
    --tw-ring-color: rgba(37, 150, 255, 0.5) !important;
}

/* Accent */
.accent-indigo-600 {
    accent-color: #2596ff !important;
}

/* ---- Semantic Abstractions ---- */
.bg-hero-dark {
    background-color: #060b18;
}

.hero-h1 {
    font-size: clamp(3rem, 6.5vw, 5.5rem);
    color: #ffffff;
}

.section-eyebrow-brand {
    color: #2596ff;
    border-color: rgba(79, 70, 229, .25);
    background-color: rgba(79, 70, 229, .06);
}

.noise-pattern {
    background-image: url('data:image/svg+xml,%3Csvg viewBox=\\' 0 0 200 200\\' xmlns=\\' http: //www.w3.org/2000/svg\\'%3E%3Cfilter id=\\'n\\'%3E%3CfeTurbulence type=\\'fractalNoise\\' baseFrequency=\\'.75\\' numOctaves=\\'4\\' stitchTiles=\\'stitch\\'/%3E%3C/filter%3E%3Crect width=\\'100%25\\' height=\\'100%25\\' filter=\\'url(%23n)\\' opacity=\\'.05\\'/%3E%3C/svg%3E');
    }

    .glow-blob-1 {
        width:600px; height:600px; background:rgba(67, 56, 202, 0.22); filter:blur(120px); transform:translate(-50%, -50%);
    }

    .glow-blob-2 {
        width:500px; height:500px; background:rgba(109, 40, 217, 0.2); filter:blur(100px); transform:translate(33%, 33%);
    }

    .glow-blob-3 {
        width:360px; height:360px; background:rgba(37, 99, 235, 0.12); filter:blur(80px); transform:translate(-50%, -50%);
    }

    /* ---- Engine Loading Particles ---- */
    .particle-1 {
        width:4px; height:4px; left:20%; bottom:15%; animation-duration:3.2s; animation-delay:0s; opacity:.6;
    }

    .particle-2 {
        width:3px; height:3px; left:35%; bottom:8%; animation-duration:4.1s; animation-delay:.6s; opacity:.4;
    }

    .particle-3 {
        width:5px; height:5px; left:55%; bottom:20%; animation-duration:3.7s; animation-delay:1.2s; opacity:.5; background:rgba(168, 85, 247, 0.7);
    }

    .particle-4 {
        width:3px; height:3px; left:72%; bottom:12%; animation-duration:4.5s; animation-delay:.3s; opacity:.4;
    }

    .particle-5 {
        width:4px; height:4px; left:82%; bottom:25%; animation-duration:3.9s; animation-delay:1.5s; opacity:.5; background:rgba(59, 130, 246, 0.7);
    }

    .particle-6 {
        width:3px; height:3px; left:44%; bottom:30%; animation-duration:4.8s; animation-delay:.9s; opacity:.35;
    }

    /* ---- Alpine Cloak ---- */
    [x-cloak] {
        display: none !important;
    }

    /* ============================================================
   GALLERY PAGE CUSTOM STYLES
   ============================================================ */
    .dash-hero {
        position: relative;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(37, 99, 235, 0.08) 50%, rgba(139, 92, 246, 0.12) 100%);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 1.25rem;
        overflow: hidden;
    }

    .dash-hero::before {
        content:'';
        position:absolute; inset:0;
        background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency=".75" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)" opacity=".04"/%3E%3C/svg%3E');
        pointer-events:none;
    }

    .dash-hero-glow {
        position:absolute; width:420px; height:420px; border-radius:50%;
        background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
        filter:blur(80px); top:-160px; right:-80px; pointer-events:none;
    }

    .dash-hero-glow-b {
        position:absolute; width:300px; height:300px; border-radius:50%;
        background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
        filter:blur(70px); bottom:-120px; left:-60px; pointer-events:none;
    }

    /* Grid */
    .gal-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

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

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

    @media (min-width:1080px) {
        .gal-grid {
            grid-template-columns: repeat(5, 1fr);
        }
    }

    @media (min-width:1280px) {
        .gal-grid {
            grid-template-columns: repeat(6, 1fr);
        }
    }

    /* Card */
    .gal-card-premium {
        position: relative;
        border-radius: 14px;
        overflow: hidden;
        background: #14142a;
        border: 1px solid rgba(255, 255, 255, 0.07);
        cursor: pointer;
        aspect-ratio: 1 / 1;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .gal-card-premium:hover {
        transform: translateY(-4px) scale(1.015);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(37, 150, 255, 0.3),
        0 0 30px rgba(37, 150, 255, 0.08);
        border-color: rgba(37, 150, 255, 0.3);
    }

    /* Skeleton shimmer */
    .gal-skel {
        position: absolute;
        inset: 0;
        background: linear-gradient(100deg,
            rgba(20, 20, 42, 1) 30%,
            rgba(40, 40, 70, 1) 50%,
            rgba(20, 20, 42, 1) 70%);
        background-size: 300% 100%;
        animation: gal-skel-move 1.5s ease infinite;
    }

    .gal-skel.done {
        display: none;
    }

    @keyframes gal-skel-move {
        0% {
            background-position: 100% 0;
        }

        100% {
            background-position: -100% 0;
        }
    }

    /* Lazy image */
    .gal-lazy-img {
        width: 100%; height: 100%;
        object-fit: cover; display: block;
        opacity: 0; transition: opacity 0.35s ease;
        position: absolute; inset: 0;
    }

    .gal-lazy-img.visible {
        opacity: 1;
    }

    /* Hover overlay */
    .gal-overlay-premium {
        position: absolute; inset: 0;
        background: linear-gradient(to top,
            rgba(8, 8, 24, 0.95) 0%,
            rgba(8, 8, 24, 0.55) 45%,
            transparent 80%);
        opacity: 0;
        transition: opacity 0.2s ease;
        display: flex; flex-direction: column;
        justify-content: flex-end;
        padding: 12px 10px 10px;
    }

    .gal-card-premium:hover .gal-overlay-premium {
        opacity: 1;
    }

    /* Platform tag */
    .gal-tag {
        font-size: 9px; font-weight: 900;
        text-transform: uppercase; letter-spacing: 0.12em;
        color: #60b4ff;
        margin-bottom: 8px;
        display: block;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }

    /* Action buttons */
    .gal-actions-row {
        display: flex; gap: 4px; align-items: center;
    }

    .gal-act-btn {
        width: 28px; height: 28px;
        border-radius: 7px; border: none;
        display: flex; align-items: center; justify-content: center;
        font-size: 10px; cursor: pointer;
        transition: transform 0.15s, filter 0.15s;
        text-decoration: none; flex-shrink: 0;
    }

    .gal-act-btn:hover {
        transform: scale(1.12); filter: brightness(1.15);
    }

    .gal-act-expand {
        background: rgba(255, 255, 255, 0.12); color: #fff;
    }

    .gal-act-download {
        background: rgba(37, 150, 255, 0.85); color: #fff;
    }

    .gal-act-edit {
        background: rgba(118, 45, 233, 0.85); color: #fff;
    }

    .gal-act-delete {
        background: rgba(239, 68, 68, 0.8); color: #fff;
    }

    /* ── LIGHTBOX ─────────────────────────────────────────────── */
    .lb-backdrop {
        position: fixed; inset: 0; z-index: 9998;
        background: rgba(5, 5, 18, 0.9);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        display: flex; align-items: center; justify-content: center;
        padding: 16px;
    }

    .lb-shell {
        position: relative;
        width: 100%; max-width: 1020px;
        max-height: 92vh;
        display: flex; flex-direction: column;
        border-radius: 22px; overflow: hidden;
        background: rgba(12, 12, 28, 0.97);
        border: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow: 0 32px 100px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(37, 150, 255, 0.06);
    }

    @media (min-width:640px) {
        .lb-shell {
            flex-direction: row;
        }
    }

    .lb-img-side {
        flex: 1;
        background: #080818;
        display: flex; align-items: center; justify-content: center;
        min-height: 280px; padding: 20px;
        position: relative;
    }

    .lb-img-side::before {
        content: '';
        position: absolute; inset: 0;
        background: radial-gradient(ellipse 80% 80% at 50% 50%,
            rgba(37, 150, 255, 0.06) 0%, transparent 70%);
        pointer-events: none;
    }

    .lb-img-side img {
        max-width: 100%; max-height: 72vh;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
        position: relative;
    }

    .lb-info-side {
        width: 100%; flex-shrink: 0;
        padding: 22px 20px;
        display: flex; flex-direction: column; gap: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        overflow-y: auto;
    }

    @media (min-width:640px) {
        .lb-info-side {
            width: 270px;
            border-top: none;
            border-left: 1px solid rgba(255, 255, 255, 0.05);
            max-height: 92vh;
        }
    }

    .lb-platform-chip {
        display: inline-flex; align-items: center;
        font-size: 9px; font-weight: 900;
        letter-spacing: 0.12em; text-transform: uppercase;
        padding: 4px 11px; border-radius: 20px;
        background: rgba(37, 150, 255, 0.1);
        color: #60b4ff;
        border: 1px solid rgba(37, 150, 255, 0.2);
    }

    .lb-section-label {
        font-size: 9px; font-weight: 800;
        text-transform: uppercase; letter-spacing: 0.1em;
        color: rgba(255, 255, 255, 0.2);
        margin-bottom: 6px; display: block;
    }

    .lb-prompt-body {
        font-size: 12px; color: rgba(255, 255, 255, 0.5);
        line-height: 1.75; white-space: pre-wrap;
        word-break: break-word; flex: 1;
    }

    .lb-date-txt {
        font-size: 10px; color: rgba(255, 255, 255, 0.25);
    }

    .lb-close-btn {
        position: absolute; top: 14px; right: 14px; z-index: 10;
        width: 32px; height: 32px; border-radius: 9px;
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.5);
        font-size: 12px; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        transition: background 0.15s, color 0.15s;
    }

    .lb-close-btn:hover {
        background: rgba(255, 255, 255, 0.14); color: #fff;
    }

    .lb-act-bar {
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        display: flex; flex-direction: column; gap: 8px;
    }

    .lb-btn-ghost {
        width: 100%; display: flex;
        align-items: center; justify-content: center; gap: 8px;
        font-size: 13px; font-weight: 700;
        color: rgba(255, 255, 255, 0.6);
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 10px 16px; border-radius: 12px;
        cursor: pointer; transition: background 0.15s, color 0.15s;
    }

    .lb-btn-ghost:hover {
        background: rgba(255, 255, 255, 0.09); color: #fff;
    }

    /* ── EDIT MODAL ────────────────────────────────────────────── */
    .em-backdrop {
        position: fixed; inset: 0; z-index: 9999;
        background: rgba(5, 5, 18, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        display: flex; align-items: center; justify-content: center;
        padding: 16px;
    }

    .em-shell {
        width: 100%; max-width: 560px;
        background: rgba(12, 12, 28, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    }

    .em-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 18px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .em-icon {
        width: 32px; height: 32px; border-radius: 9px;
        background: rgba(37, 150, 255, 0.12);
        border: 1px solid rgba(37, 150, 255, 0.2);
        display: flex; align-items: center; justify-content: center;
    }

    .em-title {
        font-size: 14px; font-weight: 800; color: rgba(255, 255, 255, 0.88);
        margin-left: 10px;
    }

    .em-close-btn {
        width: 28px; height: 28px; border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: none; color: rgba(255, 255, 255, 0.4);
        font-size: 12px; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        transition: background 0.15s, color 0.15s;
    }

    .em-close-btn:hover {
        background: rgba(255, 255, 255, 0.1); color: #fff;
    }

    .em-body {
        padding: 20px; display: flex; flex-direction: column; gap: 14px;
    }

    .em-preview {
        width: 100%; max-height: 200px;
        object-fit: contain; border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: #080818;
    }

    .em-label {
        font-size: 9px; font-weight: 800;
        text-transform: uppercase; letter-spacing: 0.1em;
        color: rgba(255, 255, 255, 0.25); margin-bottom: 6px; display: block;
    }

    .em-textarea {
        width: 100%; background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 12px; padding: 10px 14px;
        font-size: 13px; color: rgba(255, 255, 255, 0.8);
        resize: vertical; outline: none;
        transition: border-color 0.2s;
        font-family: inherit;
    }

    .em-textarea:focus {
        border-color: rgba(37, 150, 255, 0.4);
    }

    .em-footer {
        display: flex; justify-content: flex-end; gap: 10px;
        padding: 16px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .em-cancel-btn {
        padding: 9px 18px; font-size: 13px; font-weight: 600;
        color: rgba(255, 255, 255, 0.45);
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px; cursor: pointer;
        transition: background 0.15s;
    }

    .em-cancel-btn:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    /* ── Page stat pill ─────────────────────────────────────── */
    .stat-pill {
        display: inline-flex; align-items: center; gap: 6px;
        background: #fff;
        border: 1px solid #e8eaf0;
        border-radius: 20px; padding: 4px 12px;
        font-size: 11px; font-weight: 700;
        color: #4b5563;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    }

    /* ── Pagination ─────────────────────────────────────────── */
    .gp-btn {
        display: inline-flex; align-items: center; justify-content: center;
        width: 36px; height: 36px; border-radius: .6rem;
        border: 1.5px solid #e8eaf0;
        font-size: 13px; font-weight: 700;
        color: #6b7280;
        background: #fff;
        text-decoration: none;
        transition: all 0.15s;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    }

    .gp-btn:hover {
        border-color: #4aaeff; color: #2596ff;
    }

    .gp-btn.active {
        background: linear-gradient(135deg, #2596ff, #762de9);
        border-color: transparent; color: #fff;
        box-shadow: 0 4px 12px rgba(37, 150, 255, 0.25);
    }

    .gp-btn.disabled {
        opacity: 0.3; pointer-events: none;
    }    }
} /* end @media gallery section */

/* ==============================================================
   RESPONSIVE FIXES — breakpoints not compiled in Tailwind v4
   ============================================================== */

/* ── Sidebar: mobile hidden by x-show+x-cloak, desktop always flex via !important ── */
.sidebar-responsive {
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .sidebar-responsive {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        top: auto !important; left: auto !important; bottom: auto !important;
        translate: none !important;
        transform: none !important;
        height: 100% !important;
        z-index: auto !important;
    }
    .sidebar-hamburger-btn { display: none !important; }
}

/* ── Social Post two-column layout ── */
@media (min-width: 1024px) {
    .sp-two-col {
        display: grid;
        grid-template-columns: 5fr 8fr;
        gap: 1.5rem;
        align-items: start;
    }
    .sp-left-col {
        position: sticky;
        top: 1.5rem;
        align-self: start;
    }
}

/* ── Dashboard stat tiles: 4 cols on lg ── */
@media (min-width: 1024px) {
    .dash-stats-4col { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ── Public navbar mobile ── */
@media (max-width: 639px) {
    .pub-nav-login { display: none !important; }
    .pub-nav-logo  { height: 3rem !important; }
    .pub-nav-wrap  { padding-left: 1rem !important; padding-right: 1rem !important; }
    .pub-nav-h     { height: 4rem !important; }
}

/* ── Topbar generate button ── */
@media (max-width: 639px) {
    .topbar-gen-btn { padding: .35rem .65rem !important; }
    .topbar-gen-label { display: none; }
}

/* ── iOS 100dvh fix (dynamic viewport height) ── */
@supports (height: 100dvh) {
    body.flex.overflow-hidden { height: 100dvh !important; }
}
