/* ============================================
   ArtPiece Journey — Global Stylesheet
   Dark luxury theme with glassmorphism accents
   ============================================ */

/* ─── Design Tokens ─── */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255,255,255,0.04);
    --bg-glass: rgba(255,255,255,0.06);
    --bg-navbar: rgba(10,10,15,0.85);
    --bg-navbar-scrolled: rgba(10,10,15,0.98);
    --border-subtle: rgba(255,255,255,0.08);
    --border-glow: rgba(212,175,55,0.3);

    --gold: #d4af37;
    --gold-light: #f0d060;
    --gold-dark: #a88a20;
    --accent: #c084fc;
    --accent-blue: #60a5fa;

    --text-primary: #f0ece4;
    --text-light: #f0ece4;
    --text-secondary: #aba390;
    --text-muted: #948c7d;

    --font-body: 'Outfit', system-ui, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;

    --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 40px rgba(212,175,55,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --gradient-top: radial-gradient(ellipse 80% 500px at 50% 0%, rgba(212, 175, 55, 0.18) 0%, transparent 100%);
    --gradient-bottom: radial-gradient(ellipse 60% 600px at 90% 100%, rgba(192, 132, 252, 0.08) 0%, transparent 100%);

    --alert-red-text: #ff6b6b;
    --alert-red-title: #ff8b8b;
    --alert-red-bg: rgba(235, 94, 85, 0.08);
    --alert-red-border: rgba(235, 94, 85, 0.4);
}

[data-theme="light"] {
    --bg-primary: #fbf9f4; /* warm creamy ivory */
    --bg-secondary: #f4efe2; /* soft warm beige */
    --bg-card: rgba(0, 0, 0, 0.025);
    --bg-glass: rgba(0, 0, 0, 0.035);
    --bg-navbar: rgba(251, 249, 244, 0.85);
    --bg-navbar-scrolled: rgba(251, 249, 244, 0.98);
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(212, 175, 55, 0.5);

    --text-primary: #1c1a16; /* warm dark charcoal/brown */
    --text-light: #1c1a16;
    --text-secondary: #595246; /* high contrast warm brown */
    --text-muted: #6e675a; /* WCAG AA compliant contrast */

    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(212, 175, 55, 0.12);

    --gradient-top: radial-gradient(ellipse 80% 500px at 50% 0%, rgba(212, 175, 55, 0.25) 0%, transparent 100%);
    --gradient-bottom: radial-gradient(ellipse 60% 600px at 90% 100%, rgba(192, 132, 252, 0.12) 0%, transparent 100%);

    --alert-red-text: #c53030;
    --alert-red-title: #9b2c2c;
    --alert-red-bg: rgba(224, 86, 86, 0.08);
    --alert-red-border: rgba(224, 86, 86, 0.35);
}

[data-theme="light"] .btn-outline-light {
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
}
[data-theme="light"] .btn-outline-light:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
}

/* ─── Premium Modal Theme Adaptation ─── */
.modal-content {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-card) !important;
}
.modal-header, .modal-footer {
    border-color: var(--border-subtle) !important;
}
.modal-title {
    color: var(--gold) !important;
}
/* Ensure form controls inside modals adapt to light/dark themes */
.modal-content .form-control,
.modal-content .form-select {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
}
.modal-content .form-control:focus,
.modal-content .form-select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25) !important;
}
/* Adapt close buttons in light theme */
[data-theme="light"] .modal-header:not([data-force-dark="true"] *) .btn-close,
[data-theme="light"] .btn-close-white:not([data-force-dark="true"] *) {
    filter: invert(1) grayscale(100%) brightness(35%) !important; /* dark charcoal close icon in light theme */
}


/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    background-image: var(--gradient-top), var(--gradient-bottom);
    background-repeat: no-repeat;
    background-position: top center, bottom center;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Navigation ─── */
.navbar {
    position: fixed;
    top: var(--banner-height, 0px);
    left: 0; right: 0;
    z-index: 1000;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: top 0.15s ease-out, background 0.3s ease;
}

.navbar.scrolled { background: var(--bg-navbar-scrolled); }

.nav-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon { color: var(--gold); font-size: 1.4rem; }
.brand-text { font-family: var(--font-display); font-size: 1.25rem; color: var(--text-primary); white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 1.15rem; flex-wrap: nowrap; }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-link:hover { color: var(--text-primary); }

.nav-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary);
    text-decoration: none;
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.nav-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(212,175,55,0.4); }
.nav-btn-outline { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-secondary); }
.nav-btn-outline:hover { border-color: var(--gold); color: var(--gold); box-shadow: none; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; min-width: 44px; min-height: 44px; padding: 10px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ─── Main Content ─── */
.main-content { padding-top: calc(70px + var(--banner-height, 0px)); min-height: 100vh; }

/* ─── Hero Section ─── */
.hero {
    position: relative;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(212,175,55,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 90% 100%, rgba(192,132,252,0.08) 0%, transparent 60%);
}

.hero-content { position: relative; max-width: 800px; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-title em { font-style: italic; color: var(--gold); }

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    letter-spacing: 0.03em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(212,175,55,0.4); }

.btn-secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger { background: rgba(220,38,38,0.15); border: 1px solid rgba(220,38,38,0.3); color: #f87171; }
.btn-danger:hover { background: rgba(220,38,38,0.25); }

/* ─── Section Layout ─── */
.section { padding: 5rem 2rem; }
.section-sm { padding: 3rem 2rem; }
.container { max-width: 1280px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; max-width: 540px; margin: 0 auto; }

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

/* ─── Artist Grid ─── */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.artist-card { text-decoration: none; color: inherit; }

.artist-card-avatar {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-secondary), #1a1a2e);
    overflow: hidden;
    position: relative;
}

.artist-card-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

.artist-card-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--gold);
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(192,132,252,0.06));
}

.artist-card-body { padding: 1.25rem; }
.artist-card-name { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.25rem; }
.artist-card-meta { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Artwork Grid ─── */
.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.artwork-card { text-decoration: none; color: inherit; }

.artwork-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.artwork-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.artwork-card:hover .artwork-card-image img { transform: scale(1.05); }

.artwork-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(212,175,55,0.06), rgba(192,132,252,0.04));
    color: var(--text-muted);
}

.artwork-card-body { padding: 1.25rem; }
.artwork-card-title { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.25rem; }
.artwork-card-artist { font-size: 0.85rem; color: var(--gold); margin-bottom: 0.5rem; }
.artwork-card-meta { font-size: 0.8rem; color: var(--text-muted); }
.artwork-card-price { font-size: 0.95rem; color: var(--text-secondary); font-weight: 500; margin-top: 0.5rem; }

/* ─── Tags ─── */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tag {
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

/* ─── Forms ─── */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.5rem; letter-spacing: 0.04em; }
.form-control {
    width: 100%;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.1); }
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 120px; }

/* ─── Glass Panel & Card ─── */
.glass-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
}

.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
}

/* ─── Dashboard Gold Utilities ─── */
.text-gold {
    color: var(--gold) !important;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    color: var(--bg-primary) !important;
    border: none !important;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212,175,55,0.4);
    color: var(--bg-primary) !important;
}

.font-accent {
    font-family: var(--font-display) !important;
}

.img-thumbnail.bg-dark {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-subtle) !important;
}

/* ─── Badge ─── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge-public { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-private { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

/* ─── Alert ─── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.alert-error { background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #86efac; }

/* ─── Divider ─── */
.divider { border: none; border-top: 1px solid var(--border-subtle); margin: 3rem 0; }

/* ─── Footer ─── */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-container { max-width: 1280px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 0.75rem; }
.footer-tagline { color: var(--text-secondary); font-style: italic; font-family: var(--font-display); margin-bottom: 0.5rem; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Loading Spinner ─── */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 3rem auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Fade-in Animation ─── */
.fade-in { animation: fadeIn 0.6s ease forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }

.slide-up { animation: slideUp 0.6s ease forwards; opacity: 0; transform: translateY(20px); }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .nav-links { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 70px; 
        left: 0; 
        right: 0; 
        background: rgba(10,10,15,0.98); 
        padding: 1.75rem 2rem; 
        gap: 1.25rem; 
        border-bottom: 1px solid var(--border-subtle); 
        backdrop-filter: blur(25px);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .nav-links.open { display: flex; }
    [data-theme="light"] .nav-links { background: rgba(251, 249, 244, 0.98) !important; border-color: rgba(0, 0, 0, 0.1) !important; }
    .nav-toggle { display: flex; }
}

@media (max-width: 768px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .artists-grid, .artworks-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .glass-panel { padding: 1.5rem; }
}

/* ─── Vertical Resume Timeline ─── */
.vertical-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-subtle);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    display: flex;
    justify-content: flex-start;
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
    padding-left: 45px;
}

.timeline-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--gold);
    border-radius: 50%;
    top: 15px;
    left: 20px;
    transform: translateX(-50%);
    border: 3px solid var(--bg-primary);
    z-index: 10;
}

.timeline-card {
    width: 100%;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.timeline-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

/* ─── Serpentine Maze Timeline styling ─── */
.maze-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.maze-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.maze-item-left {
    flex-direction: row;
}

.maze-item-left::before {
    content: '';
    position: absolute;
    left: 38px;
    top: 76px;
    bottom: -4rem;
    width: 3px;
    background: linear-gradient(to bottom, var(--gold) 60%, var(--border-subtle) 100%);
    z-index: 1;
}

.maze-item-left::after {
    content: '';
    position: absolute;
    left: 38px;
    right: 38px;
    bottom: -4rem;
    height: 3px;
    background: var(--border-subtle);
    z-index: 1;
}

.maze-item-right {
    flex-direction: row-reverse;
}

.maze-item-right::before {
    content: '';
    position: absolute;
    right: 38px;
    top: 76px;
    bottom: -4rem;
    width: 3px;
    background: linear-gradient(to bottom, var(--gold) 60%, var(--border-subtle) 100%);
    z-index: 1;
}

.maze-item-right::after {
    content: '';
    position: absolute;
    left: 38px;
    right: 38px;
    bottom: -4rem;
    height: 3px;
    background: var(--border-subtle);
    z-index: 1;
}

.maze-item:last-child {
    margin-bottom: 0;
}

.maze-item:last-child::before,
.maze-item:last-child::after {
    display: none;
}

.maze-circle-container {
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.maze-year-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: #121212;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.maze-item:hover .maze-year-circle {
    transform: scale(1.1);
    background: var(--gold);
    color: #121212;
}

.maze-card {
    flex: 1;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.maze-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.timeline-toggle-btn.active-toggle {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}

.timeline-toggle-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

@media (max-width: 768px) {
    .vertical-timeline::before {
        left: 20px;
        transform: none;
    }
    .timeline-item, .timeline-item:nth-child(even) {
        justify-content: flex-start;
        padding-left: 45px;
        width: 100%;
    }
    .timeline-dot {
        left: 20px;
        transform: translateX(-50%);
    }
    .timeline-card {
        width: 100%;
    }

    /* Maze Timeline Responsive */
    .maze-timeline {
        padding: 1rem 0;
    }
    .maze-item, .maze-item-right {
        flex-direction: row !important;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    .maze-item-left::before, .maze-item-right::before {
        left: 28px !important;
        right: auto !important;
        top: 56px !important;
        bottom: -3rem !important;
        width: 3px !important;
    }
    .maze-item-left::after, .maze-item-right::after {
        display: none !important;
    }
    .maze-year-circle {
        width: 56px;
        height: 56px;
        font-size: 1rem;
    }
    .maze-card {
        padding: 1.25rem;
    }
}

/* ─── Responsive Navigation and Tabs ─── */
@media (max-width: 991.98px) {
    .nav.flex-column.dashboard-nav {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        width: 100% !important;
        border-bottom: none !important;
    }
    .nav.flex-column.dashboard-nav .btn,
    .nav.flex-column.dashboard-nav a.btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        margin-bottom: 0 !important;
        flex: unset !important;
    }
    
    .glass-card {
        max-width: 100% !important;
        /* preserve overflow & padding for nested dropdowns, tooltips, p-0 media cards & table-responsive */

    }

    .profile-tabs, .message-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        border-bottom: none !important;
        width: 100% !important;
    }
    .profile-tabs .nav-item, .message-tabs .nav-item {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    .profile-tabs .nav-link, .message-tabs .nav-link {
        width: 100% !important;
        text-align: center !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: var(--radius-sm) !important;
        padding: 0.6rem 0.5rem !important;
    }
    .profile-tabs .nav-link.active, .message-tabs .nav-link.active {
        border-color: var(--gold) !important;
        background: rgba(212, 175, 55, 0.1) !important;
        color: var(--gold) !important;
    }
}

/* ─── Profile Glowing Backdrop ─── */
.artist-glow-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Huge radial bloom that extends well beyond the image using custom theme variables */
    background: radial-gradient(
        circle at 50% 50%,
        var(--profile-glow-high, rgba(212, 175, 55, 0.55)) 0%,
        var(--profile-glow-medium, rgba(212, 175, 55, 0.25)) 30%,
        var(--profile-glow-low, rgba(212, 175, 55, 0.08)) 55%,
        transparent 70%
    );
    border-radius: 50%;
    padding: 80px;
    margin: -80px;
    transition: background 0.4s ease;
}

/* ─── Small variant (sidebar) — box-shadow survives overflow:hidden ─── */
.artist-glow-container-sm {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Multi-layer glow ring on the image circle */
.artist-glow-container-sm > div {
    box-shadow:
        0 0 0 2px var(--gold),
        0 0 16px 4px var(--border-glow),
        0 0 36px 10px var(--border-glow);
    transition: box-shadow 0.4s ease;
}

/* Custom Dropdown Styling to prevent default white highlights and match gold theme */
.dropdown-menu {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-card) !important;
    backdrop-filter: blur(10px);
}
.dropdown-item {
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    transition: var(--transition);
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(212, 175, 55, 0.08) !important;
    color: var(--gold) !important;
}

/* Custom gold theme utilities */
.bg-gold {
    background-color: var(--gold) !important;
}

.btn-outline-gold {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--bg-primary) !important;
}

/* Global Form Controls & Select Theme Overrides */
.input-group-text {
    background-color: var(--bg-glass) !important;
    border-color: var(--border-subtle) !important;
    color: var(--gold) !important;
}
.form-control {
    background-color: var(--bg-glass) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}
.form-control::placeholder {
    color: var(--text-muted) !important;
}
.form-select {
    background-color: var(--bg-glass) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}
.form-select option {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Global Light Theme Bootstrap Class Overrides for Dashboard Legibility */
[data-theme="light"] .text-light,
[data-theme="light"] .text-white {
    color: var(--text-primary) !important;
}
[data-theme="light"] .text-secondary {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .text-muted {
    color: var(--text-muted) !important;
}
[data-theme="light"] .bg-dark {
    background-color: var(--bg-secondary) !important;
}
[data-theme="light"] .border-secondary {
    border-color: var(--border-subtle) !important;
}
[data-theme="light"] .bg-opacity-25,
[data-theme="light"] .bg-opacity-10,
[data-theme="light"] .bg-opacity-20 {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Universal Headings & Titles in Light Theme */
[data-theme="light"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .section-title, .hero-title, .card-title, .display-1, .display-2, .display-3, .display-4):not(.text-gold):not(.text-white):not(.text-light):not(.text-danger):not(.text-warning):not(.text-success):not(.rotary-hero-container *):not(.dark-accent-banner *):not(.wide-gallery-stage *):not(.wide-artist-stage *) {
    color: var(--text-primary) !important;
}

[data-theme="light"] .text-gold {
    color: #846307 !important; /* rich, warm dark bronze-gold, 4.8:1 contrast on white/ivory */
}
:root .text-gold,
[data-theme="dark"] .text-gold {
    color: var(--gold) !important;
}

/* Universal Gold Buttons & Badges High-Contrast Text */
.btn-gold,
.btn-submit-gold,
a.btn-gold,
button.btn-gold,
.badge-persona-pop {
    color: #0c0d12 !important;
    font-weight: 700 !important;
}

/* Light Mode Protection against Stray Dark-Theme Classes */
[data-theme="light"] .text-light:not(.btn):not(.badge):not(.rotary-hero-container *):not(.dark-accent-banner *):not(.wide-gallery-stage *):not(.wide-artist-stage *),
[data-theme="light"] .text-white:not(.btn):not(.badge):not(.rotary-hero-container *):not(.dark-accent-banner *):not(.wide-gallery-stage *):not(.wide-artist-stage *) {
    color: var(--text-primary) !important;
}

/* Preserve High Contrast on Photo Stages with Dark Scrims in all themes */
.wide-gallery-stage .panoramic-artwork-title,
.wide-gallery-stage .panoramic-artist-credit,
.wide-gallery-stage .panoramic-artist-credit a,
.wide-gallery-stage .panoramic-price-val,
.wide-gallery-stage .panoramic-counter,
.wide-artist-stage .artist-stage-name,
.wide-artist-stage #masterName,
.wide-artist-stage .artist-stage-origin,
.wide-artist-stage .artist-bottom-bar,
.wide-artist-stage .panoramic-counter {
    color: #ffffff !important;
}

/* Environment Disclaimer Ribbon (Dev / Closed Beta) */
#closed-beta-disclaimer-banner {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(18, 18, 22, 0.96) 50%, rgba(212, 175, 55, 0.15) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
    font-size: 0.82rem;
    padding: 0.45rem 1.25rem;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    z-index: 1050;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] #closed-beta-disclaimer-banner {
    background: linear-gradient(90deg, #f7f1df 0%, #fdfbf7 50%, #f7f1df 100%) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.4) !important;
    color: #6d5106 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.rotary-hero-container,
.rotary-hero-container .rotary-sticky-wrapper {
    background: #0a0a0f !important;
}
.rotary-hero-container h1,
.rotary-hero-container h2,
.rotary-hero-container h3,
.rotary-hero-container .editorial-main-title {
    color: #ffffff !important;
}
.rotary-hero-container .vertical-bg-title {
    color: rgba(255, 255, 255, 0.06) !important;
}
.rotary-hero-container .brief-text {
    color: #e2e8f0 !important;
}
.rotary-hero-container .brief-label,
.rotary-hero-container .left-panel-eyebrow {
    color: var(--gold) !important;
}
.rotary-hero-container .footer-segment-title,
.rotary-hero-container .segment-title {
    color: #ffffff !important;
}
.rotary-hero-container .footer-segment-sub,
.rotary-hero-container .segment-desc {
    color: #a0aec0 !important;
}
.rotary-hero-container .nav-control-btn {
    color: #cbd5e1 !important;
}

/* Universal Form Controls across themes */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
}
[data-theme="light"] .form-control::placeholder {
    color: #7a7263 !important;
}

/* Universal Cards & Glass Panels in Light Theme */
[data-theme="light"] .glass-panel:not(.scrim-dark):not(.hero-photo-overlay):not(.live-voucher-card):not([data-force-dark="true"]),
[data-theme="light"] .glass-card:not(.scrim-dark):not(.hero-photo-overlay):not(.live-voucher-card):not([data-force-dark="true"]),
[data-theme="light"] .card:not(.scrim-dark):not(.hero-photo-overlay):not(.live-voucher-card):not([data-force-dark="true"]),
[data-theme="light"] .modal-content:not(.scrim-dark):not(.hero-photo-overlay):not(.live-voucher-card):not([data-force-dark="true"]) {
    background: #ffffff !important;
    background-image: none !important;
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    color: var(--text-primary) !important;
}

/* Universal Accordions in Light Theme */
[data-theme="light"] .accordion-item {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .accordion-button {
    background-color: #f7f4ec !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .accordion-button:not(.collapsed) {
    background-color: rgba(212, 175, 55, 0.16) !important;
    color: #846307 !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3) !important;
}
[data-theme="light"] .accordion-button::after {
    filter: none !important;
}
[data-theme="light"] .accordion-body {
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
}

/* Universal Tables in Light Theme */
[data-theme="light"] .table {
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .table th,
[data-theme="light"] .table-light th {
    background-color: #ede7d8 !important;
    color: #594204 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .table td {
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Universal Badges High-Contrast Fix for BOTH Themes */
.badge.bg-gold,
.badge.bg-warning,
.badge.bg-info {
    color: #0c0d12 !important;
    font-weight: 700 !important;
}
[data-theme="light"] .badge.bg-secondary {
    background-color: #e2dbcc !important;
    color: #3b352b !important;
    font-weight: 600 !important;
}
:root .badge.bg-secondary,
[data-theme="dark"] .badge.bg-secondary {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Pricing Page Cards & Banners in Light Mode */
[data-theme="light"] .plan-card {
    background: #ffffff !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .plan-card.recommended-card {
    background: linear-gradient(180deg, #fffdf9 0%, #fbf6ec 100%) !important;
    border: 2px solid var(--gold) !important;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.22) !important;
}
[data-theme="light"] .plan-card .plan-price {
    color: #1c1a16 !important;
}
[data-theme="light"] .plan-card .plan-header h3 {
    color: #846307 !important;
}
[data-theme="light"] .plan-card .feature-item {
    color: #2b271f !important;
}
[data-theme="light"] .plan-card .feature-item.disabled {
    color: #948c7d !important;
}
[data-theme="light"] .plan-card .feature-desc-box {
    background: #f7f4ea !important;
    color: #4a4336 !important;
    border-left: 3px solid #846307 !important;
}
[data-theme="light"] .plan-card .plan-price-period {
    color: #595246 !important;
}

[data-theme="light"] .glass-card[onclick*="/Performance"],
[data-theme="light"] .glass-card:has(i.fa-chart-line),
[data-theme="light"] .glass-card:has(i.fa-gift) {
    background: #ffffff !important;
    border: 1px solid rgba(212, 175, 55, 0.45) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .glass-card[onclick*="/Performance"] h5,
[data-theme="light"] .glass-card:has(i.fa-chart-line) h5 {
    color: #1c1a16 !important;
}
[data-theme="light"] .glass-card:has(i.fa-gift) h4 {
    color: #846307 !important;
}
[data-theme="light"] .glass-card[onclick*="/Performance"] p,
[data-theme="light"] .glass-card:has(i.fa-gift) p {
    color: #595246 !important;
}

/* Dark Mode Protection against Stray Light-Theme Classes */
[data-theme="dark"] h1.text-dark,
[data-theme="dark"] h2.text-dark,
[data-theme="dark"] h3.text-dark,
[data-theme="dark"] h4.text-dark,
[data-theme="dark"] h5.text-dark,
[data-theme="dark"] h6.text-dark,
[data-theme="dark"] p.text-dark,
[data-theme="dark"] div.text-dark:not(.badge):not(.btn) {
    color: var(--text-primary) !important;
}
[data-theme="dark"] .bg-white:not(.keep-white),
[data-theme="dark"] .bg-light:not(.keep-light) {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Light theme specific legibility fixes for tabs and switcher buttons */
[data-theme="light"] .profile-tabs .nav-link {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .profile-tabs .nav-link:hover {
    color: var(--gold) !important;
}
[data-theme="light"] .profile-tabs .nav-link.active {
    color: var(--gold) !important;
}
[data-theme="light"] .fallback-pill,
[data-theme="light"] .lang-pill {
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}
[data-theme="light"] .fallback-pill:hover,
[data-theme="light"] .lang-pill:hover {
    color: var(--gold) !important;
    border-color: var(--gold) !important;
}

/* ─── Profile Preview Theme Tokens ─── */
.preview-box-dark {
    --preview-bg: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    --preview-text: #f0ece4;
    --preview-text-secondary: #a09880;
    --preview-border: rgba(255,255,255,0.08);
    --preview-bg-card: rgba(255,255,255,0.03);
    --preview-text-muted: rgba(255,255,255,0.4);
    --preview-circle-bg: #121212;
}

.preview-box-light {
    --preview-bg: linear-gradient(135deg, #fbf9f4 0%, #f4efe2 100%);
    --preview-text: #1c1a16;
    --preview-text-secondary: #655e52;
    --preview-border: rgba(0,0,0,0.08);
    --preview-bg-card: rgba(0,0,0,0.03);
    --preview-text-muted: rgba(0,0,0,0.4);
    --preview-circle-bg: #f4efe2;
}

/* ─── Onboarding Checklist Styling ─── */
.onboarding-banner-card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-card) !important;
}

.onboarding-banner-card .step-box {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-subtle) !important;
    transition: var(--transition);
}

.onboarding-banner-card .step-box.completed {
    border-color: rgba(46, 200, 102, 0.3) !important;
}

.onboarding-banner-card .step-number-circle {
    background: var(--bg-glass) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.onboarding-banner-card .step-number-circle.completed {
    background: rgba(46, 200, 102, 0.15) !important;
    color: #2ec866 !important;
    border-color: #2ec866 !important;
}

.onboarding-banner-card .step-title {
    color: var(--text-primary) !important;
}

.onboarding-banner-card .step-title.completed {
    color: var(--text-muted) !important;
    text-decoration: line-through;
}

[data-theme="dark"] .onboarding-banner-card .btn-close {
    filter: var(--bs-btn-close-white-filter);
}

/* ─── Premium Uploader Grid Styling ─── */
.uploader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    min-height: 152px;
}

.uploader-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.uploader-card.saved {
    border-color: var(--border-subtle);
}

.uploader-card.pending {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.uploader-card img, .uploader-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploader-card .delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.uploader-card .delete-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.uploader-card .badge-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 9px;
    text-align: center;
    padding: 2px 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.uploader-card.cover {
    border-color: var(--gold) !important;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.uploader-card.cover .badge-indicator {
    background: var(--gold);
    color: #111;
}

.uploader-add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 2px dashed rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.02);
    color: var(--gold);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.uploader-add-card:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
    transform: scale(1.02);
}

.uploader-add-card i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.uploader-add-card span {
    font-size: 10px;
}

.collaborator-row {
    position: relative;
    z-index: 1;
}
.collaborator-row:focus-within {
    z-index: 10;
}

/* Premium Carousel Controls styling */
.carousel-control-prev, .carousel-control-next {
    width: 46px;
    height: 46px;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0.85 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 16px !important;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    background: var(--gold) !important;
    opacity: 1 !important;
    color: #111 !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.45) !important;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(0.1) invert(0); /* Make the white chevron dark on gold background */
}

/* Layout modes for public lists */
.list-grid-container {
    transition: var(--transition);
}

.list-grid-container.layout-list,
.list-grid-container.layout-compact {
    display: grid !important;
    gap: 1.5rem !important;
}

/* List Layout (Horizontal) */
.list-grid-container.layout-list {
    grid-template-columns: 1fr !important;
}

.list-grid-container.layout-list > div,
.list-grid-container.layout-list > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.list-grid-container.layout-list .card,
.list-grid-container.layout-list .artist-card,
.list-grid-container.layout-list .artwork-card,
.list-grid-container.layout-list .exhibition-card,
.list-grid-container.layout-list .event-card,
.list-grid-container.layout-list .gallery-card,
.list-grid-container.layout-list .course-card-wrapper,
.list-grid-container.layout-list .course-card-wrapper > div,
.list-grid-container.layout-list .course-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem !important;
    text-align: start !important;
    height: auto !important;
    width: 100% !important;
}

.list-grid-container.layout-list .artist-card-avatar,
.list-grid-container.layout-list .artwork-card-image,
.list-grid-container.layout-list .exhibition-img-container,
.list-grid-container.layout-list .event-img-container,
.list-grid-container.layout-list .gallery-img-container,
.list-grid-container.layout-list .course-img-container {
    width: 150px !important;
    height: 150px !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    border-radius: var(--radius-sm) !important;
}

.list-grid-container.layout-list .artist-card-avatar img,
.list-grid-container.layout-list .artwork-card-image img,
.list-grid-container.layout-list .exhibition-img-container img,
.list-grid-container.layout-list .event-img-container img,
.list-grid-container.layout-list .gallery-img-container img,
.list-grid-container.layout-list .course-img-container img {
    border-radius: var(--radius-sm) !important;
}

/* Compact Layout (Dense Grid/Rows) */
.list-grid-container.layout-compact {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 1rem !important;
}

.list-grid-container.layout-compact > div,
.list-grid-container.layout-compact > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
}

.list-grid-container.layout-compact .card,
.list-grid-container.layout-compact .artist-card,
.list-grid-container.layout-compact .artwork-card,
.list-grid-container.layout-compact .exhibition-card,
.list-grid-container.layout-compact .event-card,
.list-grid-container.layout-compact .gallery-card,
.list-grid-container.layout-compact .course-card,
.list-grid-container.layout-compact .glass-card {
    padding: 0.75rem !important;
    height: auto !important;
}

.list-grid-container.layout-compact .artist-card-avatar,
.list-grid-container.layout-compact .artwork-card-image,
.list-grid-container.layout-compact .exhibition-img-container,
.list-grid-container.layout-compact .event-img-container,
.list-grid-container.layout-compact .gallery-img-container,
.list-grid-container.layout-compact .course-img-container {
    height: 100px !important;
    width: 100% !important;
    margin-bottom: 0.5rem !important;
}

.list-grid-container.layout-compact .artist-card-name,
.list-grid-container.layout-compact .artwork-card-title,
.list-grid-container.layout-compact h3,
.list-grid-container.layout-compact h4 {
    font-size: 0.95rem !important;
}

.list-grid-container.layout-compact p,
.list-grid-container.layout-compact .tags,
.list-grid-container.layout-compact .collaborator-row,
.list-grid-container.layout-compact .collaborating-artists,
.list-grid-container.layout-compact .exhibition-details-meta,
.list-grid-container.layout-compact .exhibition-artists-meta {
    display: none !important; /* Hide details in compact view */
}

.list-grid-container.layout-compact .glass-card > div.p-4 {
    padding: 0.75rem !important;
}

/* Layout toggle button styling */
.layout-toggle-group button {
    opacity: 0.6;
    transition: var(--transition);
}
.layout-toggle-group button.active {
    opacity: 1;
    background: rgba(212, 175, 55, 0.15) !important;
    border-radius: var(--radius-sm);
}
.layout-toggle-group button:hover {
    opacity: 1;
    color: var(--gold-light) !important;
}

/* Hide exhibition collaborators by default in grid/compact layouts, only show in list layout */
.list-grid-container:not(.layout-list) .exhibition-collaborators-section {
    display: none !important;
}

/* Custom premium styling for card action buttons */
.course-card .btn-sm,
.event-card .btn-sm,
.exhibition-card .btn-sm,
.glass-card .btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.78rem !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 30px !important;
    min-width: 30px !important;
}

/* Icon-only buttons should be perfectly square/circular and compact */
.course-card button:not([type="submit"]):not(.px-3),
.course-card a.btn:not(.px-3),
.course-card form button:not(.px-3),
.event-card button:not([type="submit"]):not(.px-3),
.event-card a.btn:not(.px-3),
.event-card form button:not(.px-3),
.exhibition-card button:not([type="submit"]):not(.px-3),
.exhibition-card a.btn:not(.px-3),
.exhibition-card form button:not(.px-3) {
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 50% !important;
}

/* Make sure form elements in buttons container do not add extra display blocks */
.course-card form,
.event-card form,
.exhibition-card form {
    display: inline-block !important;
    margin: 0 !important;
}

/* Prevent badges and duration text from wrapping internally */
.badge,
.course-card span.text-gold,
.glass-card span.text-gold,
.course-card-wrapper span.text-gold {
    white-space: nowrap !important;
}

/* Shrink button dimensions in compact layout */
.list-grid-container.layout-compact .course-card .btn-sm,
.list-grid-container.layout-compact .event-card .btn-sm,
.list-grid-container.layout-compact .exhibition-card .btn-sm {
    font-size: 0.72rem !important;
    height: 24px !important;
    min-width: 24px !important;
    padding: 0.15rem 0.35rem !important;
}

.list-grid-container.layout-compact .course-card button:not([type="submit"]):not(.px-3),
.list-grid-container.layout-compact .course-card a.btn:not(.px-3),
.list-grid-container.layout-compact .course-card form button:not(.px-3),
.list-grid-container.layout-compact .event-card button:not([type="submit"]):not(.px-3),
.list-grid-container.layout-compact .event-card a.btn:not(.px-3),
.list-grid-container.layout-compact .event-card form button:not(.px-3),
.list-grid-container.layout-compact .exhibition-card button:not([type="submit"]):not(.px-3),
.list-grid-container.layout-compact .exhibition-card a.btn:not(.px-3),
.list-grid-container.layout-compact .exhibition-card form button:not(.px-3) {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
}

/* Dashboard Tab Styling */
#coursesPageTabs .nav-link, #galleryPageTabs .nav-link {
    color: var(--text-secondary, #a1a1a6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: transparent !important;
    transition: all 0.3s ease;
    margin-inline-end: 8px;
}
#coursesPageTabs .nav-link.active, #galleryPageTabs .nav-link.active {
    color: #000000 !important;
    background-color: #d4af37 !important;
    border-color: #d4af37 !important;
    font-weight: bold;
}
#coursesPageTabs .nav-link:hover:not(.active), #galleryPageTabs .nav-link:hover:not(.active) {
    color: #d4af37 !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

/* ─── Skeleton Loader & Image Fallback UX ─── */
.img-skeleton-wrapper {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.img-skeleton-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.12) 50%,
        transparent 100%
    );
    animation: shimmer 1.8s infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -150%; }
    100% { left: 150%; }
}

img.skeleton-img {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

img.skeleton-img.loaded {
    opacity: 1;
}

.img-skeleton-wrapper.loaded::before {
    display: none;
}

/* ─── Premium Navigation Dropdown Styling ─── */
.dropdown-menu {
    background: rgba(14, 14, 20, 0.96) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: var(--radius-sm, 10px) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55) !important;
    padding: 0.5rem !important;
    min-width: 230px;
    z-index: 1060;
}
.dropdown-item {
    color: var(--text-primary, #f0ece4) !important;
    padding: 0.55rem 0.9rem !important;
    border-radius: 6px !important;
    font-size: 0.88rem !important;
    font-weight: 500;
    transition: var(--transition, all 0.2s ease);
    display: flex;
    align-items: center;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(212, 175, 55, 0.15) !important;
    color: var(--gold, #d4af37) !important;
}

[data-theme="light"] .dropdown-menu {
    background: #ffffff !important;
    border-color: rgba(212, 175, 55, 0.35) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .dropdown-item {
    color: #1c1a16 !important;
}
[data-theme="light"] .dropdown-item:hover,
[data-theme="light"] .dropdown-item:focus {
    background: #f7f4ea !important;
    color: #846307 !important;
}



/* ─── Light Mode Extended Component Contrast Fixes ─── */
[data-theme="light"] .maze-year-circle {
    background: #fbf9f4;
    color: #1c1a16;
    border-color: var(--gold);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.16);
}
[data-theme="light"] .maze-item:hover .maze-year-circle {
    background: var(--gold);
    color: #121212;
}

[data-theme="light"] .table-dark {
    --bs-table-bg: #f8f6f0;
    --bs-table-color: #1c1a16;
    --bs-table-striped-bg: #f2ede2;
    --bs-table-striped-color: #1c1a16;
    --bs-table-active-bg: #ebe4d5;
    --bs-table-active-color: #1c1a16;
    --bs-table-hover-bg: rgba(212, 175, 55, 0.08);
    --bs-table-hover-color: #1c1a16;
    --bs-table-border-color: rgba(0, 0, 0, 0.08);
    background-color: #f8f6f0 !important;
    color: #1c1a16 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .table-dark th {
    background-color: #ede7d8 !important;
    color: #1c1a16 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .table-dark td {
    background-color: #f8f6f0 !important;
    color: #1c1a16 !important;
    border-color: rgba(0, 0, 0, 0.07) !important;
}
[data-theme="light"] .table-dark.table-hover tbody tr:hover > * {
    background-color: rgba(212, 175, 55, 0.08) !important;
    color: #1c1a16 !important;
}

/* Protect bright gold & light text inside dark photo scrims & forced-dark cards */
[data-theme="light"] .hero-scrim .text-gold,
[data-theme="light"] .hero-photo-overlay .text-gold,
[data-theme="light"] .scrim-dark .text-gold,
[data-theme="light"] .live-voucher-card .text-gold,
[data-theme="light"] [data-force-dark="true"] .text-gold,
[data-theme="light"] [style*="linear-gradient(to top, rgba(0,0,0"] .text-gold,
[data-theme="light"] [style*="linear-gradient(to top, rgba(0, 0, 0"] .text-gold,
[data-theme="light"] [style*="linear-gradient(to top, rgba(18, 18, 18"] .text-gold,
[data-theme="light"] [style*="linear-gradient(to top, rgba(10, 10, 15"] .text-gold {
    color: #f3cf55 !important;
}

[data-theme="light"] [data-force-dark="true"],
[data-theme="light"] [data-force-dark="true"] .text-white,
[data-theme="light"] [data-force-dark="true"] .text-light,
[data-theme="light"] .live-voucher-card,
[data-theme="light"] .live-voucher-card .text-white,
[data-theme="light"] .live-voucher-card .text-light {
    color: #f8fafc !important;
}

/* ============================================
   Multi-Layer Artwork Image Protection Shield
   ============================================ */
img.apj-shielded-img,
.artwork-card img,
#zoom-modal-img,
#lightbox-content img,
#timelineModalImage,
#galleryLightboxModal img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Exempt QR codes & interactive cropper/portrait stages */
img[data-qr-value],
#cropperModal img,
.portrait-cropper-stage img,
.cropper-container img,
#avatar-studio-stage img,
#avatar-studio-stage canvas,
[data-allow-image-interaction="true"] img {
    -webkit-user-drag: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -webkit-touch-callout: default !important;
}

.apj-printscreen-blur {
    filter: blur(28px) brightness(0.35) !important;
    transition: filter 0.08s ease !important;
}

.apj-shield-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 16px);
    opacity: 0;
    visibility: hidden;
    z-index: 100000;
    pointer-events: none;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: rgba(16, 16, 22, 0.95);
    color: #f0ece4;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-align: center;
    max-width: min(92vw, 620px);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.apj-shield-toast.apj-shield-toast-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

[data-theme="light"] .apj-shield-toast {
    background: rgba(255, 255, 255, 0.97);
    color: #1c1a16;
    border-color: rgba(168, 138, 32, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

/* Safe-Listed Print Anti-PDF-Scrape Protection */
@media print {
    .apj-shield-toast {
        display: none !important;
    }

    .apj-shielded-img:not([data-qr-value]):not(#printable-labels-sheet *):not(#printable-exhibition-poster *):not(#single-print-target *):not(.coa-diploma-card *):not(.cert-sheet *):not(.certificate-paper *):not(#officialInvoiceModal *) {
        visibility: hidden !important;
        opacity: 0 !important;
    }

    #printable-labels-sheet img,
    #printable-exhibition-poster img,
    #single-print-target img,
    .coa-diploma-card img,
    .cert-sheet img,
    .certificate-paper img,
    #officialInvoiceModal img,
    img[data-qr-value] {
        visibility: visible !important;
        opacity: 1 !important;
    }
}


/* ============================================
   Mobile Responsiveness, Touch UX & RTL Polish
   (320px / 375px / 414px / 768px + iOS/Android)
   ============================================ */

/* 1. Prevent unintended horizontal viewport overflow while preserving sticky positioning */
html, body {
    max-width: 100%;
    overflow-x: clip;
}

/* 2. Global RTL Directional Support (Timelines & Semantic Arrows/Chevrons) */
[dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-arrow-right,
[dir="rtl"] .fa-chevron-left:not(.caret-icon),
[dir="rtl"] .fa-chevron-right:not(.caret-icon) {
    transform: scaleX(-1);
}

[dir="rtl"] .vertical-timeline::before {
    left: auto;
    right: 20px;
}

[dir="rtl"] .timeline-item,
[dir="rtl"] .timeline-item:nth-child(even) {
    padding-left: 0;
    padding-right: 45px;
}

[dir="rtl"] .timeline-dot {
    left: auto;
    right: 20px;
    transform: translateX(50%);
}

@media (max-width: 768px) {
    [dir="rtl"] .maze-item-left::before,
    [dir="rtl"] .maze-item-right::before {
        left: auto !important;
        right: 28px !important;
    }
}

/* 3. Closed-Beta Disclaimer Banner Mobile Wrapping */
#closed-beta-disclaimer-banner {
    flex-wrap: wrap;
}

@media (max-width: 575.98px) {
    #closed-beta-disclaimer-banner {
        font-size: 0.74rem;
        padding: 0.35rem 0.75rem;
        gap: 0.35rem;
        line-height: 1.4;
    }
}

/* 4. Mobile Navbar Drawer, Inline Dropdowns & Safe-Area Viewport Sizing */
@media (max-width: 1100px) {
    .nav-links {
        max-height: calc(100vh - 70px - var(--banner-height, 0px));
        max-height: calc(100dvh - 70px - var(--banner-height, 0px));
        padding: 1.25rem 1.25rem max(1.75rem, env(safe-area-inset-bottom, 0px));
        gap: 0.9rem;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links .dropdown {
        width: 100%;
        text-align: center;
    }

    .nav-links .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none !important;
        width: min(100%, 300px) !important;
        margin: 0.4rem auto 0.15rem !important;
        text-align: start;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        padding: 0 0.9rem;
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .brand-icon {
        font-size: 1.2rem;
    }
}

/* 5. Dashboard Sidebar Mobile Collapse & Full-Span Grid Children */
@media (min-width: 992px) {
    .dashboard-sidebar-header {
        border-bottom: 1px solid var(--border-subtle);
    }
}

@media (max-width: 991.98px) {
    .dashboard-mobile-collapse {
        border-top: 1px solid var(--border-subtle);
    }

    .nav.flex-column.dashboard-nav > div,
    .nav.flex-column.dashboard-nav > hr {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
}

@media (max-width: 575.98px) {
    .nav.flex-column.dashboard-nav {
        grid-template-columns: 1fr !important;
    }

    .nav.flex-column.dashboard-nav .btn,
    .nav.flex-column.dashboard-nav a.btn {
        text-align: start !important;
        justify-content: flex-start !important;
    }

    .nav.flex-column.dashboard-nav a.btn.justify-content-between {
        justify-content: space-between !important;
    }

    .profile-tabs,
    .message-tabs {
        grid-template-columns: 1fr !important;
    }
}

/* 6. Mobile Section Spacing, Card Padding, Modals & Grid Min-Widths */
@media (max-width: 767.98px) {
    .section {
        padding: 2.5rem 1rem;
    }

    .section-sm {
        padding: 1.75rem 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    /* Prevent iOS Safari involuntary page zoom when focusing inputs < 16px */
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea,
    .form-control,
    .form-select,
    .form-control-sm,
    .form-select-sm {
        font-size: 16px !important;
    }

    /* Enlarge uploader delete button touch target for thumbs */
    .uploader-card .delete-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
        top: 6px;
        inset-inline-end: 6px;
        right: auto;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575.98px) {
    .section {
        padding: 2rem 0.75rem;
    }

    .section-sm {
        padding: 1.5rem 0.75rem;
    }

    .artists-grid,
    .artworks-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1.15rem;
    }

    .glass-card.p-5 {
        padding: 1.25rem !important;
    }

    .glass-card.p-4:not(.p-0) {
        padding: 1rem !important;
    }

    .modal-content.glass-card {
        padding: 0 !important;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    /* Allow long badges to wrap cleanly on 320px/375px phones instead of overflowing */
    .badge {
        white-space: normal !important;
        overflow-wrap: anywhere;
        line-height: 1.35;
        max-width: 100%;
    }

    /* Stack horizontal List Layout cards cleanly on narrow phones */
    .list-grid-container.layout-list .card,
    .list-grid-container.layout-list .glass-card,
    .list-grid-container.layout-list .artist-card,
    .list-grid-container.layout-list .artwork-card,
    .list-grid-container.layout-list .exhibition-card,
    .list-grid-container.layout-list .event-card,
    .list-grid-container.layout-list .gallery-card,
    .list-grid-container.layout-list .course-card-wrapper,
    .list-grid-container.layout-list .course-card-wrapper > div,
    .list-grid-container.layout-list .course-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.85rem !important;
    }

    .list-grid-container.layout-list .artist-card-avatar,
    .list-grid-container.layout-list .artwork-card-image,
    .list-grid-container.layout-list .exhibition-img-container,
    .list-grid-container.layout-list .event-img-container,
    .list-grid-container.layout-list .gallery-img-container,
    .list-grid-container.layout-list .course-img-container {
        width: 100% !important;
        height: 185px !important;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 38px;
        height: 38px;
        margin: 0 8px !important;
    }
}
