/* ==========================================================================
   tiventy Event Ticketing Design System - Warm Discovery Edition
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');
@import url("https://cdn.jsdelivr.net/npm/@flaticon/flaticon-uicons@3.3.1/css/all/all.min.css");
@import url('brand-tokens.css');

:root {
    /* Warm Brand Theme Values (Light Mode) */
    --background: #FCFAF7;         /* Soft warm cream */
    --foreground: #201510;         /* Rich espresso brown */
    --card: #FFFFFF;
    --card-hover: #FAF7F2;
    --card-foreground: #201510;
    --popover: #FFFFFF;
    --popover-foreground: #201510;
    --primary: #FF5B22;            /* Flat Warm Sunset Orange */
    --primary-rgb: 255, 91, 34;
    --primary-hover: #E04610;      /* Darker Orange Hover */
    --primary-foreground: #FAF7F2; /* Cream text on orange */
    --secondary: #F8F0E5;          /* Warm beige/cream */
    --secondary-hover: #EDE2D3;
    --secondary-foreground: #201510;
    --accent: #FEC868;             /* Flat Amber Gold */
    --accent-rgb: 254, 200, 104;
    --muted: #6B5E56;              /* Amber grey text */
    --muted-foreground: #7E7167;
    --border: var(--border-warm, rgba(32, 21, 16, 0.10)); /* Warm delicate border */
    --input: var(--border-warm, rgba(32, 21, 16, 0.10));
    
    --success-color: var(--state-success, #16A34A);
    --success-bg: var(--state-success-bg, rgba(22, 163, 74, 0.12));
    --success-border: var(--state-success-border, rgba(22, 163, 74, 0.25));
    --warning-color: var(--state-warning, #D97706);
    --warning-bg: var(--state-warning-bg, rgba(217, 119, 6, 0.12));
    --warning-border: var(--state-warning-border, rgba(217, 119, 6, 0.25));
    --danger-color: var(--state-danger, #DC2626);
    --danger-bg: var(--state-danger-bg, rgba(220, 38, 38, 0.12));
    --danger-border: var(--state-danger-border, rgba(220, 38, 38, 0.25));
    
    /* Typography */
    --font-primary: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 64px;
    
    --radius: 12px; /* Smooth modern rounded corners */
    --transition: all 0.2s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(32, 21, 16, 0.04);
    --shadow-md: 0 4px 12px -1px rgba(32, 21, 16, 0.06), 0 2px 4px -2px rgba(32, 21, 16, 0.04);
    --shadow-lg: 0 12px 24px -4px rgba(32, 21, 16, 0.08), 0 4px 6px -4px rgba(32, 21, 16, 0.04);
}

:root.dark, html.dark {
    /* Warm Brand Theme Values (Dark Mode) */
    --background: #0E0B0A;         /* Warm dark cocoa */
    --foreground: #FDFBF7;         /* Warm cream text */
    --card: #181210;               /* Warm dark clay card */
    --card-hover: #221A17;
    --card-foreground: #FDFBF7;
    --popover: #181210;
    --popover-foreground: #FDFBF7;
    --primary: #FF5B22;            /* Flat Warm Sunset Orange */
    --primary-rgb: 255, 91, 34;
    --primary-hover: #E04610;
    --primary-foreground: #FAF7F2;
    --secondary: #221A17;          /* Warm dark clay hover */
    --secondary-hover: #2D231F;
    --secondary-foreground: #FDFBF7;
    --accent: #FEC868;             /* Flat Amber Gold */
    --accent-rgb: 254, 200, 104;
    --muted: #A69C95;              /* Amber grey text */
    --muted-foreground: #8C827B;
    --border: var(--border-dark-warm, rgba(255, 91, 34, 0.14)); /* Warm subtle orange border */
    --input: var(--border-dark-warm, rgba(255, 91, 34, 0.14));
    
    --success-color: var(--state-success, #16A34A);
    --success-bg: var(--state-success-bg, rgba(22, 163, 74, 0.12));
    --success-border: var(--state-success-border, rgba(22, 163, 74, 0.25));
    --warning-color: var(--state-warning, #D97706);
    --warning-bg: var(--state-warning-bg, rgba(217, 119, 6, 0.12));
    --warning-border: var(--state-warning-border, rgba(217, 119, 6, 0.25));
    --danger-color: var(--state-danger, #DC2626);
    --danger-bg: var(--state-danger-bg, rgba(220, 38, 38, 0.12));
    --danger-border: var(--state-danger-border, rgba(220, 38, 38, 0.25));
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--foreground);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

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

a:hover {
    color: var(--muted);
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-xxl);
}

/* Top Navigation Bar - Matching Hero Background Color */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height, 80px);
    background: var(--warm-hero-bg, #F8F0E5);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    transition: background 0.3s, border-color 0.3s;
    box-sizing: border-box;
    width: 100%;
}

:root.dark .glass-nav, html.dark .glass-nav {
    background: var(--warm-hero-bg, #130e09);
    border-bottom: 1px solid var(--border);
}

.nav-logo-custom {
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -1.5px;
    color: var(--primary);
    display: flex;
    align-items: center;
}

/* Global Nav Search Bar - Perfectly aligned with landing page input design */
.nav-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 7px 16px;
    width: 220px;
    margin: 0;
    box-shadow: none !important;
    transition: width 0.25s ease, border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

html.dark .nav-search-form, :root.dark .nav-search-form {
    background: #181210;
    border-color: rgba(255, 91, 34, 0.22);
}

.nav-search-form:focus-within {
    width: 260px;
    border-color: var(--primary);
    box-shadow: none !important;
    outline: none !important;
}

.nav-search-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.nav-search-input,
.nav-search-input:focus,
.nav-search-input:active,
.nav-search-input:focus-visible {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--foreground);
    width: 100%;
    padding: 0;
}

html.dark .nav-search-input,
:root.dark .nav-search-input {
    color: var(--foreground);
}

.nav-search-input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.8;
}

@media (max-width: 900px) {
    .nav-search-form {
        display: none;
    }
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-items a:not(.btn-cta) {
    text-decoration: none;
    font-weight: 500;
    color: var(--foreground);
    font-size: 15px;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s;
}

.nav-items a:not(.btn-cta):hover {
    opacity: 1;
    color: var(--primary);
}

.btn-cta {
    background: var(--primary) !important;
    color: #FAF7F2 !important;
    padding: 11px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--primary) !important;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cta:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #FAF7F2 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.25);
}

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

.theme-toggle-btn-discover {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.theme-toggle-btn-discover:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Sun / Moon Icons Display Switch */
html.dark .sun-icon, :root.dark .sun-icon {
    display: block;
}
html.dark .moon-icon, :root.dark .moon-icon {
    display: none;
}
html:not(.dark) .sun-icon, :root:not(.dark) .sun-icon {
    display: none;
}
html:not(.dark) .moon-icon, :root:not(.dark) .moon-icon {
    display: block;
}

@media (max-width: 768px) {
    .nav-items a:not(.btn-cta) {
        display: none;
    }
    .glass-nav {
        padding: 0 4%;
    }
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: var(--secondary);
    border-color: var(--primary);
}

.theme-toggle-btn svg {
    transition: transform 0.3s ease;
    pointer-events: none;
}

.theme-toggle-btn svg * {
    pointer-events: none;
}

.theme-toggle-btn:hover svg {
    transform: rotate(15deg);
}

.sun-icon {
    display: none;
}
.moon-icon {
    display: block;
}

:root.dark .sun-icon {
    display: block;
}
:root.dark .moon-icon {
    display: none;
}

.mobile-header-theme-btn {
    display: none;
}

/* Mobile drawer close button: hidden by default on desktop */
.drawer-close-btn {
    display: none;
}

/* Desktop Header Action Theme Toggle (Inline in header alongside Logout) */
.admin-header-theme-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.admin-header-theme-btn:hover {
    background: var(--secondary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.desktop-header-theme-btn {
    position: fixed;
    top: 16px;
    right: 24px;
    z-index: 100;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.desktop-header-theme-btn:hover {
    background: var(--secondary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.admin-mobile-topbar {
    display: none;
}

/* Brand styling helpers */
.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-family: var(--font-primary);
    color: var(--foreground);
    line-height: 1;
}

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

.logo-tagline {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Hero Section (Full-bleed viewport width) */
.hero-full-bleed {
    width: 100%;
    background-color: var(--background);
    border-top: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 24px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-lg);
    transition: var(--transition);
}

:root.dark .hero-full-bleed {
    background-color: var(--background);
}

.hero-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content .display-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-md);
    color: #09090b !important;
}

:root.dark .hero-content .display-title {
    color: #ffffff !important;
}

.hero-content .hero-subtitle {
    font-size: 16px;
    color: #27272a !important;
    max-width: 600px;
    line-height: 1.6;
}

:root.dark .hero-content .hero-subtitle {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Unified Search Widget inside Hero */
.hero-search-widget {
    display: flex;
    align-items: center;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 6px 12px 6px 24px;
    width: 100%;
    max-width: 680px;
    margin-top: 32px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.hero-search-widget:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

:root.dark .hero-search-widget:focus-within {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

.hero-search-input:focus,
.hero-filter-select:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.search-icon {
    color: var(--muted);
    flex-shrink: 0;
}

.hero-search-input {
    background: transparent;
    border: none;
    color: var(--foreground);
    font-family: var(--font-primary);
    font-size: 15px;
    width: 100%;
    outline: none;
}

.hero-search-input::placeholder {
    color: var(--muted);
}

.hero-search-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border);
    margin: 0 16px;
}

.location-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.location-icon {
    color: var(--muted);
}

.hero-filter-select {
    background-color: transparent;
    border: none;
    color: var(--foreground);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 24px 8px 4px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

@media (max-width: 640px) {
    .hero-search-widget {
        flex-direction: column;
        border-radius: var(--radius);
        padding: 12px;
        gap: 12px;
        align-items: stretch;
    }
    .hero-search-divider {
        display: none;
    }
    .search-input-wrapper {
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
    }
    .location-select-wrapper {
        justify-content: flex-start;
        padding-top: 4px;
    }
    .hero-filter-select {
        width: 100%;
        background-position: right center;
    }
}

/* Event Page Header Banner (Inherited contained header) */
.event-hero {
    position: relative;
    text-align: center;
    max-width: 1000px;
    margin: var(--space-xl) auto var(--space-xxl);
    padding: var(--space-xxl) var(--space-xl);
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.95)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

:root.dark .event-hero {
    background-image: linear-gradient(to bottom, rgba(9, 9, 11, 0.65), rgba(9, 9, 11, 0.9)), url('../images/hero-bg.png');
    border-color: var(--border);
}

.event-hero h2 {
    color: #09090b !important;
}

.event-hero p,
.event-hero div {
    color: #27272a !important;
}

:root.dark .event-hero h2 {
    color: #ffffff !important;
}

:root.dark .event-hero p,
:root.dark .event-hero div {
    color: rgba(255, 255, 255, 0.8) !important;
}

.event-hero {
    margin-bottom: var(--space-xl);
}

/* Event Card Links (Full Card Click Target) */
.event-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.event-card-link:hover .event-card {
    border-color: var(--foreground);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Dialog Modals */
dialog:not([open]) {
    display: none !important;
}

dialog[open] {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

dialog.shadcn-dialog {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--card);
    color: var(--foreground);
    padding: var(--space-xl);
    max-width: 600px;
    width: calc(100% - var(--space-xl) * 2);
    max-height: min(90vh, 760px);
    box-shadow: var(--shadow-lg);
    outline: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 1000;
    box-sizing: border-box;
}
dialog.shadcn-dialog[open] {
    display: flex;
    flex-direction: column;
}
dialog.shadcn-dialog::backdrop {
    background-color: rgba(9, 9, 11, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Custom Minimalist Confirmation Dialog */
dialog#custom-confirm-dialog {
    border: none;
    border-radius: 14px;
    padding: 0;
    background: transparent;
    width: 90%;
    max-width: 440px;
    outline: none;
    margin: 0 !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: none;
    z-index: 9999;
}
dialog#custom-confirm-dialog::backdrop {
    background-color: rgba(14, 11, 10, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
/* Close Button in Dialog Header */
.dialog-close-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
}
.dialog-close-btn:hover {
    color: var(--foreground);
    background-color: var(--secondary);
}

/* Scalable filter dropdowns */
.filter-select {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-family: var(--font-primary);
    font-size: 14px;
    padding: 10px 32px 10px 14px;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.filter-select:focus {
    border-color: var(--primary);
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

/* Cards (Standard elevated surfaces) */
.glass-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-xl);
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.search-group {
    flex: 1 1 300px;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-family: var(--font-primary);
    font-size: 14px;
    background-color: var(--background);
    color: var(--foreground);
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    background-color: var(--card);
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

.location-tags-container {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    align-items: center;
}

.location-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-right: var(--space-xs);
}

.location-filter-tag {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.location-filter-tag:hover {
    background-color: var(--secondary);
}

.location-filter-tag.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

/* Event Directory / Lists */
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.tier-card {
    position: relative;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.tier-card:hover {
    border-color: rgba(255, 91, 34, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.tier-card.selected {
    border: 1.5px solid var(--primary) !important;
    background-color: var(--card);
    box-shadow: 0 0 0 2px rgba(255, 91, 34, 0.12), 0 8px 24px -4px rgba(32, 21, 16, 0.08);
}

:root.dark .tier-card.selected {
    border: 1.5px solid var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(255, 91, 34, 0.18), 0 8px 24px -4px rgba(0, 0, 0, 0.35);
}

.tier-name {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
    color: var(--foreground);
}

.tier-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--foreground);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.tier-info {
    font-size: 13px;
    color: var(--muted-foreground);
}

.tier-info span {
    font-weight: 600;
    color: var(--foreground);
}

.tier-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 11px;
    background: rgba(255, 91, 34, 0.1);
    color: var(--primary);
    border: 1px solid rgba(255, 91, 34, 0.22);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.9);
    transition: var(--transition);
}

.tier-card.selected .tier-badge {
    opacity: 1;
    transform: scale(1);
}

/* Category & Tags */
.tags-container {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.category-tag {
    background-color: rgba(255, 91, 34, 0.08);
    color: var(--primary);
    border: 1px solid rgba(255, 91, 34, 0.15);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* Category tabs for portal */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    width: 100%;
    max-width: 680px;
}

.category-tab {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 99px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.category-tab:hover {
    background-color: var(--secondary);
    border-color: var(--muted);
}

.category-tab.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

/* Checkout summary panel */
.checkout-summary-card {
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.checkout-summary-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 6px 0;
}

.checkout-summary-row.total {
    font-weight: 700;
    border-top: 1px solid var(--border);
    padding-top: var(--space-sm);
    margin-top: 4px;
}

.checkout-summary-label {
    color: var(--muted-foreground);
}

.checkout-summary-value {
    font-weight: 500;
    color: var(--foreground);
}

.checkout-summary-row.total .checkout-summary-value {
    font-weight: 700;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}


/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 13px;
    font-weight: 500;
    color: var(--foreground);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-family: var(--font-primary);
    font-size: 14px;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: var(--transition);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input::placeholder, textarea::placeholder {
    color: var(--muted-foreground);
    opacity: 0.5;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

/* Buttons */
.action-btn {
    background-color: var(--primary);
    border: none;
    color: var(--primary-foreground);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: 100%;
}

.action-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.action-btn:disabled {
    background: var(--secondary);
    color: var(--muted);
    cursor: not-allowed;
}

.secondary-btn {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.secondary-btn:hover:not(:disabled) {
    background-color: var(--secondary);
}

/* Partner Logo Strip */
.logo-strip {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-xxl);
    box-shadow: var(--shadow-sm);
}

.logo-strip-item {
    font-weight: 700;
    font-size: 16px;
    color: var(--muted);
    letter-spacing: -0.02em;
}

.table-container {
    overflow-x: auto;
    margin-top: var(--space-md);
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

/* Card Table Integration - eliminates redundant nested box/card boundary */
.glass-card > .table-container,
.glass-card.table-card > .table-container {
    border: none;
    border-radius: 0;
    margin-top: 0;
    margin-bottom: 0;
    box-shadow: none;
    background: transparent;
}

.glass-card.table-card {
    padding: 0;
    overflow: hidden;
}

.glass-card.table-card .table-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
}

.glass-card.table-card .table-card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(32, 21, 16, 0.015);
}

.dark .glass-card.table-card .table-card-footer {
    background: rgba(255, 255, 255, 0.015);
}

/* Sleek Minimalist Table Scrollbar */
.table-container::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.table-container::-webkit-scrollbar-track {
    background: rgba(var(--foreground-rgb, 32, 21, 16), 0.02);
    border-radius: 9999px;
}
.table-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 9999px;
}
.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    vertical-align: middle;
}

th {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    background: rgba(32, 21, 16, 0.02);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.dark th {
    background: rgba(255, 255, 255, 0.03);
}

thead tr:first-child th:first-child {
    border-top-left-radius: var(--radius);
}
thead tr:first-child th:last-child {
    border-top-right-radius: var(--radius);
}

/* In seamless card tables, remove corner radii on th */
.table-card thead tr:first-child th:first-child,
.table-card thead tr:first-child th:last-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

tbody tr:last-child td {
    border-bottom: none;
}
tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius);
}
tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius);
}

.table-card tbody tr:last-child td:first-child,
.table-card tbody tr:last-child td:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Users Table contained column layout */
.users-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.users-table th, .users-table td {
    padding: 11px 8px;
    font-size: 13px;
    vertical-align: middle;
}
.users-table th:first-child, .users-table td:first-child {
    padding-left: 18px;
}
.users-table th:last-child, .users-table td:last-child {
    padding-right: 18px;
}

.col-profile {
    width: 24%;
    min-width: 160px;
}
.col-role {
    width: 8%;
    min-width: 68px;
    text-align: center;
}
.col-2fa {
    width: 8%;
    min-width: 72px;
    text-align: center;
}
.col-fees {
    width: 14%;
    min-width: 115px;
}
.col-settlement {
    width: 14%;
    min-width: 115px;
}
.col-payout {
    width: 10%;
    min-width: 80px;
    text-align: center;
}
.col-account {
    width: 11%;
    min-width: 95px;
    text-align: center;
}
.col-actions {
    width: 11%;
    min-width: 95px;
    text-align: right;
}

/* Status Badges - compact and contained */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

/* Role Badges - Minimal Brand Palette (No purple) */
.status-pill.role-superadmin {
    background: rgba(32, 21, 16, 0.08);
    color: var(--foreground);
    border: 1px solid rgba(32, 21, 16, 0.20);
    font-weight: 700;
}
.dark .status-pill.role-superadmin {
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.status-pill.role-creator {
    background: rgba(255, 91, 34, 0.10);
    color: var(--primary, #ff5b22);
    border: 1px solid rgba(255, 91, 34, 0.25);
}

.status-pill.role-host {
    background: var(--state-neutral-bg);
    color: var(--state-neutral);
    border: 1px solid var(--state-neutral-border);
}

.status-pill.role-scanner {
    background: rgba(16, 185, 129, 0.10);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Metric / Stat Cards Dynamic Typography */
.stat-card-value {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-top: var(--space-xs);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    text-align: center;
}

/* Table Card Pagination Controls (Clean & Uniform) */
.table-pagination {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
}

.table-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--font-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    user-select: none;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1;
}

.table-pagination-btn:hover:not(.active) {
    background: var(--secondary);
    border-color: var(--border);
    color: var(--foreground);
}

.table-pagination-btn.active {
    background: var(--primary, #FF5B22) !important;
    border-color: var(--primary, #FF5B22) !important;
    color: #ffffff !important;
    font-weight: 700;
    cursor: default;
    pointer-events: none;
}


tbody tr {
    transition: background-color var(--transition-speed, 0.2s) ease;
}

tbody tr:hover {
    background-color: rgba(32, 21, 16, 0.02);
}

.dark tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.status-pill.paid,
.status-pill.active,
.status-pill.verified {
    background: rgba(16, 185, 129, 0.10);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-pill.pending,
.status-pill.unverified {
    background: rgba(245, 158, 11, 0.10);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-pill.failed,
.status-pill.disabled,
.status-pill.rejected {
    background: rgba(239, 68, 68, 0.10);
    color: var(--danger-color, #ef4444);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-pill.disputed {
    background: rgba(239, 68, 68, 0.10);
    color: var(--danger-color, #ef4444);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-pill.overlimit {
    background: rgba(217, 119, 6, 0.10);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.status-pill.neutral {
    background: rgba(128, 128, 128, 0.08);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
}

/* Scanner Layout */
.scanner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .scanner-grid {
        grid-template-columns: 1fr;
    }
}

.scanner-video-container {
    width: 100% !important;
    max-width: 280px !important;
    height: 280px !important;
    aspect-ratio: 1 / 1 !important;
    background: #000000 !important;
    border-radius: var(--radius, 12px) !important;
    overflow: hidden !important;
    position: relative !important;
    margin: 0 auto !important;
    border: 1px solid var(--border) !important;
}

#reader {
    width: 100% !important;
    height: 100% !important;
    max-width: 280px !important;
    max-height: 280px !important;
    aspect-ratio: 1 / 1 !important;
    border: none !important;
    overflow: hidden !important;
    position: relative !important;
    background: #000000 !important;
}

#reader__scan_region {
    width: 100% !important;
    height: 100% !important;
    max-width: 280px !important;
    max-height: 280px !important;
    aspect-ratio: 1 / 1 !important;
    position: relative !important;
    overflow: hidden !important;
    background: #000000 !important;
}

#reader video {
    width: 100% !important;
    height: 100% !important;
    max-width: 280px !important;
    max-height: 280px !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: auto !important;
    border-radius: inherit !important;
}

#reader__dashboard_section,
#reader__header_message,
#qr-canvas {
    display: none !important;
}

/* Scan Result Modal Popup - Exact App Dialog Design */
dialog#scan-modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    background: transparent;
    width: 92%;
    max-width: 440px;
    outline: none;
    margin: 0 !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: none;
    z-index: 9999;
}

dialog#scan-modal[open] {
    display: block;
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -47%) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

dialog#scan-modal::backdrop {
    background-color: rgba(14, 11, 10, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.scanner-result-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-lg);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    transition: var(--transition);
    min-height: 250px;
    background-color: var(--card);
}

.scanner-result-panel.status-success {
    background: var(--success-bg);
    border-color: var(--success-color);
}

.scanner-result-panel.status-warning {
    background: var(--warning-bg);
    border-color: var(--warning-color);
}

.scanner-result-panel.status-error {
    background: var(--danger-bg);
    border-color: var(--danger-color);
}

.scanner-result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.scanner-result-detail {
    font-size: 14px;
    margin-bottom: var(--space-xs);
}

.scanner-result-detail span {
    font-weight: 600;
}

.scanner-placeholder {
    text-align: center;
    color: var(--muted);
}

.scan-history-list {
    margin-top: var(--space-md);
    font-family: var(--font-mono);
    font-size: 12px;
    list-style: none;
}

/*.scan-history-list li {
    padding: var(--space-xs) 0;
    border-bottom: 1px dashed var(--border);
}

/* Event Cards & Thumbnails */
.event-card {
    display: flex;
    flex-direction: column;
    padding: 0 !important; /* Remove card default padding to bleed the image */
    overflow: hidden;
    height: 100%;
}

.event-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background-color: var(--secondary);
}

.event-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-card-image {
    transform: scale(1.03);
}

.event-card-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-card-footer {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.display-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Admin Left Sidebar Layout & UI Audits
   ========================================================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--card);
    border-right: 1px solid var(--border);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    z-index: 50;
    transition: var(--transition);
    overflow: hidden;
    box-sizing: border-box;
}

.admin-sidebar-brand {
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

.admin-menu-toggle-btn {
    display: none;
}

.admin-sidebar-brand a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 0px;
    min-height: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    padding-right: 4px;
    margin-bottom: var(--space-sm);
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.admin-sidebar-nav a:hover {
    color: var(--foreground);
    background-color: var(--secondary);
}

.admin-sidebar-nav a.active {
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.10);
    font-weight: 600;
}

.admin-sidebar-nav a i {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: var(--transition);
}

.admin-sidebar-nav a:hover i,
.admin-sidebar-nav a.active i {
    color: var(--primary);
}


.admin-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    margin-top: auto;
    flex-shrink: 0;
}

.admin-sidebar-footer .theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
    padding: 2px 4px;
}

.admin-sidebar-footer .logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.25);
    text-decoration: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.admin-sidebar-footer .logout-btn:hover {
    background: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
}

.admin-main {
    flex-grow: 1;
    margin-left: 260px; /* Offset by sidebar width */
    padding: var(--space-xl) var(--space-lg);
    transition: var(--transition);
    min-width: 0;
}

/* Button transitions & focus ring improvements */
.action-btn, .secondary-btn, .remove-btn, .theme-toggle-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover:not(:disabled), .secondary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.action-btn:active:not(:disabled), .secondary-btn:active:not(:disabled) {
    transform: translateY(0);
    scale: 0.98;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="datetime-local"],
input[type="url"],
select,
textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

/* Responsive sidebar for Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-sidebar {
        width: 220px;
    }
    .admin-main {
        margin-left: 220px;
        padding: var(--space-lg);
    }
}

/* Specific mobile layout (screen width <= 768px) for admin dashboard: Top Header & Full-Height Drawer */
@media (max-width: 768px) {
    .desktop-header-theme-btn,
    .admin-header-theme-btn {
        display: none !important;
    }
    
    .admin-layout {
        display: block !important;
        width: 100% !important;
    }
    
    /* Dedicated Mobile Top Header Bar */
    .admin-mobile-topbar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: var(--card) !important;
        border-bottom: 1px solid var(--border) !important;
        z-index: 850 !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 var(--space-md) !important;
        box-shadow: var(--shadow-sm) !important;
        box-sizing: border-box !important;
    }
    
    .admin-mobile-topbar .admin-menu-toggle-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        color: var(--foreground) !important;
        cursor: pointer !important;
        padding: var(--space-xs) !important;
        border-radius: var(--radius-sm) !important;
        transition: var(--transition) !important;
    }
    
    .admin-mobile-topbar .admin-menu-toggle-btn:hover {
        background: var(--secondary) !important;
    }

    .admin-mobile-topbar .logo-text {
        font-size: 20px !important;
        font-weight: 800 !important;
    }
    
    .admin-mobile-topbar .header-theme-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Slide-out Sidebar Drawer: Full-height cohesive container */
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        background: var(--card) !important;
        border-right: 1px solid var(--border) !important;
        border-bottom: none !important;
        border-top: none !important;
        border-left: none !important;
        z-index: 1000 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        transform: translateX(-100%) !important;
        -webkit-transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0 !important;
        visibility: hidden !important;
    }
    
    .admin-sidebar.drawer-open {
        transform: translateX(0) !important;
        -webkit-transform: translateX(0) !important;
        visibility: visible !important;
    }
    
    /* Drawer Header Brand */
    .admin-sidebar-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 16px !important;
        border-bottom: 1px solid var(--border) !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
        background: var(--card) !important;
    }
    
    .admin-sidebar-brand .logo-tagline {
        display: block !important;
        font-size: 11px !important;
        color: var(--muted) !important;
    }
    
    .drawer-close-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background: rgba(128, 128, 128, 0.08) !important;
        border: none !important;
        color: var(--muted-foreground) !important;
        font-size: 18px !important;
        line-height: 1 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    
    .drawer-close-btn:hover,
    .drawer-close-btn:active {
        background: rgba(128, 128, 128, 0.16) !important;
        color: var(--foreground) !important;
    }
    
    /* Drawer Nav: Naturally scrolling complete list */
    .admin-sidebar-nav {
        flex: 1 1 0px !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 12px 10px 24px 10px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .admin-sidebar-nav a {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 11px 14px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: var(--muted) !important;
        text-decoration: none !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        transition: background-color 0.2s ease, color 0.2s ease !important;
    }
    
    .admin-sidebar-nav a:hover,
    .admin-sidebar-nav a:active {
        background: var(--secondary) !important;
        color: var(--foreground) !important;
    }
    
    .admin-sidebar-nav a.active {
        background: rgba(var(--primary-rgb), 0.10) !important;
        color: var(--primary) !important;
        font-weight: 600 !important;
    }
    
    .admin-sidebar-nav a i {
        font-size: 18px !important;
        color: inherit !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .admin-sidebar-nav a.active i {
        color: var(--primary) !important;
    }
    
    /* Drawer Footer: Docked at the bottom of the drawer */
    .admin-sidebar-footer {
        flex-shrink: 0 !important;
        margin-top: auto !important;
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)) 16px !important;
        border-top: 1px solid var(--border) !important;
        background: var(--card) !important;
        position: static !important;
        width: auto !important;
        transform: none !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .admin-sidebar-footer .theme-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        font-size: 13.5px !important;
        color: var(--muted) !important;
        padding: 0 2px !important;
    }
    
    .admin-sidebar-footer .theme-row span {
        display: inline !important;
        color: var(--foreground) !important;
    }
    
    .admin-sidebar-footer .logout-btn {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        height: 42px !important;
        font-size: 13.5px !important;
        font-weight: 600 !important;
        border-radius: var(--radius) !important;
        box-sizing: border-box !important;
    }
    
    /* Dynamic Backdrop Overlay */
    .admin-sidebar-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(2px) !important;
        -webkit-backdrop-filter: blur(2px) !important;
        z-index: 999 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    .admin-sidebar-overlay.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
        margin-top: 60px !important;
        padding: var(--space-md) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   Host Profile, Settings Tabs & Onboarding On-the-Fly Styles
   ========================================================================== */

/* Tabs Control inside Account settings */
.account-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
}

.account-tabs::-webkit-scrollbar {
    display: none;
}

.account-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 8px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.account-tab:hover {
    color: var(--foreground);
}

.account-tab.active {
    color: var(--foreground);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Profile circular image display */
.avatar-circle-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border);
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: var(--space-md);
}

.avatar-circle-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-circle-wrapper::after {
    content: "Upload";
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    opacity: 0;
    transition: var(--transition);
}

.avatar-circle-wrapper:hover::after {
    opacity: 1;
}

/* Username input group prefix */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-addon {
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-right: none;
    color: var(--muted);
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    user-select: none;
}

.input-group input {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Host Info Card inside Storefront details view */
.host-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    margin-top: var(--space-xxl);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

@media (max-width: 640px) {
    .host-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.host-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.host-info {
    flex-grow: 1;
}

.host-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 2px;
}

.host-username {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: var(--space-sm);
}

.host-bio {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.host-socials {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.host-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--card);
    transition: var(--transition);
    text-decoration: none;
}

.host-social-btn:hover {
    background: var(--secondary);
    color: var(--foreground);
    border-color: var(--muted);
}

/* Multi-step Registration wizard */
.step-container {
    width: 100%;
    max-width: 500px;
    padding: var(--space-xl);
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.step-header {
    margin-bottom: var(--space-xl);
}

.step-indicator {
    display: flex;
    gap: 8px;
    margin-bottom: var(--space-md);
}

.step-dot {
    flex: 1;
    height: 4px;
    background-color: var(--border);
    border-radius: 2px;
}

.step-dot.active {
    background-color: var(--primary);
}

.step-dot.completed {
    background-color: var(--primary);
    opacity: 0.85;
}

.option-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.option-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.option-card:hover {
    border-color: var(--muted);
}

.option-card.selected {
    border-color: var(--primary);
    background-color: var(--secondary);
}

.option-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: var(--secondary);
    color: var(--foreground);
}

.option-card.selected .option-icon {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Event Details Layout Grid */
.event-details-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
    align-items: start;
    margin-bottom: var(--space-xxl);
}
@media (max-width: 768px) {
    .event-details-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* Event Poster Container & Image */
.event-poster-container {
    width: 100%;
}
.event-poster img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    display: block;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.event-poster-placeholder {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: var(--secondary);
    border: 2px dashed var(--border);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    transition: var(--transition-smooth);
}
.event-poster-placeholder:hover {
    border-color: var(--primary);
    color: var(--foreground);
    background: rgba(24, 24, 27, 0.02);
}
.poster-icon {
    stroke: currentColor;
    opacity: 0.6;
}
.poster-text {
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-primary);
}

/* Slug Prefix Inputs */
.slug-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--card);
    transition: border-color var(--transition-smooth);
}
.slug-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.slug-input-group-prefix {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--secondary);
    padding: 12px 12px 12px 16px;
    border-radius: var(--radius) 0 0 var(--radius);
    user-select: none;
    border-right: 1px solid var(--border);
}
.slug-input-group input {
    border: none !important;
    background: transparent !important;
    padding: 12px 16px !important;
    border-radius: 0 var(--radius) var(--radius) 0 !important;
    font-family: var(--font-primary);
    font-size: 13px;
    flex: 1;
    width: 100%;
    outline: none !important;
    box-shadow: none !important;
}

/* Styled Trash/Remove Button */
.remove-btn {
    background: var(--danger-glow);
    color: var(--danger-color);
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 13px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 41px;
}
.remove-btn:hover {
    background: var(--danger-color);
    color: #FFFFFF;
    border-color: var(--danger-color);
}

/* Rounded Host Profile Social Media SVGs */
.host-social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    transition: var(--transition-smooth);
    text-decoration: none;
}
.host-social-icon-link:hover {
    background: var(--foreground);
    color: var(--background);
    border-color: var(--foreground);
    transform: scale(1.1);
}
.host-social-icon-link svg {
    width: 18px;
    height: 18px;
}

/* Custom Styled DateTime input fields */
input[type="datetime-local"] {
    appearance: none;
    -webkit-appearance: none;
    color: var(--foreground);
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-sm) var(--space-md);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-smooth);
    outline: none;
}
input[type="datetime-local"]:focus {
    border-color: var(--primary);
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

/* Wizard step display & headers */
.modal-step-section {
    display: none;
}
.modal-step-section.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.modal-step-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 16px 24px 20px 24px;
    -webkit-overflow-scrolling: touch;
}

.modal-step-body::-webkit-scrollbar,
dialog.shadcn-dialog::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.modal-step-body::-webkit-scrollbar-track,
dialog.shadcn-dialog::-webkit-scrollbar-track {
    background: transparent;
}
.modal-step-body::-webkit-scrollbar-thumb,
dialog.shadcn-dialog::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 9999px;
}

.modal-step-footer, .ticket-step-footer {
    flex-shrink: 0;
    padding: 14px 24px;
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid var(--border);
    background: var(--card);
}

.wizard-steps-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: var(--space-xl);
    padding: 0 var(--space-sm);
}
.wizard-steps-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    z-index: 1;
    transform: translateY(-50%);
}
.wizard-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 2;
    transition: var(--transition-smooth);
}
.wizard-step-dot.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 0 0 4px rgba(var(--primary-glow), 0.2);
}
.wizard-step-dot.completed {
    border-color: var(--success-color);
    background: var(--success-color);
    color: #FFFFFF;
}

/* Styled drop-downs for Select forms */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

/* Admin Table Custom Actions Dropdown overlay */
.actions-dropdown {
    position: relative;
    display: inline-block;
}

.actions-dropdown.active {
    z-index: 99999;
}

tr:has(.actions-dropdown.active),
tr.dropdown-active {
    position: relative;
    z-index: 99999 !important;
}

td:has(.actions-dropdown.active),
td.dropdown-active {
    position: relative;
    z-index: 99999 !important;
}

.actions-dropdown-btn {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 5px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    transition: var(--transition);
    user-select: none;
    white-space: nowrap;
}

.actions-dropdown-btn:hover,
.actions-dropdown.active .actions-dropdown-btn {
    background: var(--secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.actions-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.20), 0 2px 8px rgba(0, 0, 0, 0.10);
    z-index: 999999;
    min-width: 175px;
    display: none;
    flex-direction: column;
    padding: 6px 0;
    overflow: hidden;
}

.actions-dropdown.active .actions-dropdown-menu {
    display: flex;
}

.actions-dropdown.open-up .actions-dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 6px;
}

.actions-dropdown-menu[style*="position: fixed"] {
    margin: 0 !important;
}

.actions-dropdown-item {
    padding: 9px 16px;
    font-size: 13px;
    color: var(--foreground);
    text-decoration: none;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.actions-dropdown-item svg {
    flex-shrink: 0;
}

.actions-dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

/* Text Truncation with Ellipsis */
.truncate-cell {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}
.truncate-cell.url-link {
    max-width: 150px;
}
.truncate-cell.venue-cell {
    max-width: 140px;
}
.truncate-cell.title-cell {
    max-width: 140px;
}

/* Expired & Sold Out ticket category styling */
.tier-card.sold-out, .tier-card.expired {
    border-color: var(--border) !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}
.tier-card.sold-out .tier-badge {
    background: var(--danger-color) !important;
    color: white !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}
.tier-card.expired .tier-badge {
    background: var(--muted) !important;
    color: white !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}
.tier-card.sold-out .tier-price, .tier-card.expired .tier-price {
    color: var(--muted);
}

/* Listings Header & Responsive Category Filters */
.listings-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-sm);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.listings-title {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    border: none;
    padding: 0;
}

.date-filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: 0 12px;
    height: 38px;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.date-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.calendar-icon {
    color: var(--muted-foreground);
    margin-right: 8px;
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.date-filter-input {
    border: none !important;
    background: transparent !important;
    color: var(--foreground);
    font-family: var(--font-primary);
    font-size: 14px;
    outline: none !important;
    padding: 0 !important;
    cursor: pointer;
    width: 130px;
    height: 100%;
    position: relative;
    z-index: 1;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
}

.date-filter-input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

.clear-date-btn {
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 10;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.clear-date-btn:hover {
    color: var(--foreground);
    background: var(--border);
}

@media (max-width: 768px) {
    .listings-header-container {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    .date-filter-container {
        width: 100%;
    }
    .date-input-wrapper {
        width: 100%;
        flex-grow: 1;
    }
    .date-filter-input {
        width: 100%;
        flex-grow: 1;
    }
}

/* Hamburger Menu Styles */
.menu-toggle-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--foreground);
    transition: var(--transition);
}

.menu-toggle-btn:hover {
    background-color: var(--secondary);
}

.mobile-nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
    z-index: 101;
}

.mobile-nav-menu.active {
    display: flex;
}

.mobile-nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    padding: 10px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.mobile-nav-menu a:hover {
    background-color: var(--secondary);
    color: var(--foreground);
}

.mobile-nav-menu .nav-btn {
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--foreground);
    justify-content: center;
    height: 38px;
}

@media (max-width: 768px) {
    .floating-nav .nav-links a {
        display: none !important;
    }
    .menu-toggle-btn {
        display: inline-flex;
    }
}

/* Inline Quantity Selector & Cart Summary CSS */
.qty-control {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 6px;
    width: fit-content;
    transition: var(--transition);
}

.dark .qty-control {
    background: rgba(255, 255, 255, 0.05);
}

.qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.qty-btn:hover:not(:disabled) {
    background: var(--foreground);
    color: var(--background);
    border-color: var(--foreground);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-val {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    color: var(--foreground);
}

.cart-summary-panel {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 800px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 16px -6px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

:root.dark .cart-summary-panel {
    background: rgba(24, 24, 27, 0.95);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 16px -6px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.cart-summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
}

.cart-summary-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
}

.cart-summary-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--foreground);
    flex-shrink: 0;
}

:root.dark .cart-summary-icon {
    background: var(--secondary-hover);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--foreground);
    color: var(--background);
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card);
}

.cart-summary-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cart-summary-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.cart-summary-items {
    font-size: 14px;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-summary-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-shrink: 0;
}

.cart-summary-price {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.cart-summary-price-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.cart-summary-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--foreground);
    font-family: var(--font-primary);
}

.cart-checkout-btn {
    width: auto !important;
    padding: 10px 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: var(--radius) !important;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.has-cart-summary {
    padding-bottom: 120px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Mobile responsiveness for cart summary panel */
@media (max-width: 640px) {
    .cart-summary-panel {
        bottom: 16px;
        width: calc(100% - 24px);
        padding: 12px 16px;
    }
    
    .cart-summary-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    
    .cart-summary-left {
        width: 100%;
    }
    
    .cart-summary-right {
        justify-content: space-between;
        width: 100%;
        border-top: 1px solid var(--border);
        padding-top: 10px;
        margin-top: 4px;
    }
    
    .cart-summary-price {
        text-align: left;
    }
    
    .cart-checkout-btn {
        flex: 1;
        max-width: 200px;
    }
    
    body.has-cart-summary {
        padding-bottom: 180px;
    }
}

/* Split Layout for Register Onboarding Screen */
.split-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--background);
    display: flex;
}

.split-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
}

.split-right-panel {
    flex: 1;
    background: linear-gradient(180deg, rgba(14, 11, 10, 0.72) 0%, rgba(20, 14, 12, 0.85) 100%), url('../images/onboarding_party_bg.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    padding: var(--space-xxl);
    position: relative;
    overflow: hidden;
}

/* Mobile responsiveness for Split Layout onboarding */
@media (max-width: 900px) {
    .split-body {
        flex-direction: column;
    }
    
    .split-right-panel {
        display: none; /* Hide marketing panel on mobile to optimize screen space for forms */
    }
    
    .split-left-panel {
        padding: var(--space-lg);
        width: 100%;
    }
}

/* Dashboard Header & Buyers Log Action Layouts */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.admin-header-select {
    text-align: left;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.dashboard-card-actions {
    display: flex;
    gap: var(--space-sm);
    flex-grow: 1;
    max-width: 500px;
    justify-content: flex-end;
}

.dashboard-search-form {
    display: flex;
    gap: var(--space-xs);
    flex-grow: 1;
    max-width: 350px;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: var(--space-lg) !important;
    }
    
    .admin-header-select {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }
    
    .admin-event-picker-group {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    .active-event-label {
        display: none !important;
    }
    
    .admin-event-picker-group .custom-combobox {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .admin-event-picker-group .combobox-trigger {
        width: 100% !important;
    }
    
    .admin-event-picker-group .edit-event-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    .admin-header-theme-btn,
    .admin-header-logout,
    .admin-header a[href="logout.php"] {
        display: none !important;
    }
    
    .dashboard-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    
    .dashboard-card-actions {
        max-width: none;
        width: 100%;
        justify-content: space-between;
    }
    
    .dashboard-search-form {
        max-width: none;
        flex-grow: 1;
    }
}

/* Ticket Tiers Grid Layout in Event Creation Wizard */
.tier-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1.2fr 1fr 1fr 2fr 42px;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.tier-row input {
    width: 100%;
    min-width: 0;
}

.edit-tier-row {
    display: grid;
    grid-template-columns: 1.8fr 1.8fr 1fr 0.8fr 0.8fr 1.6fr 1fr 42px;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.edit-tier-row input, .edit-tier-row select {
    width: 100%;
    min-width: 0;
}

/* Edit Ticket Tier Card Styles */
.edit-tier-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition: all 0.2s ease;
}

.edit-tier-card:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.edit-tier-card.collapsed {
    padding-bottom: var(--space-xs);
}

.edit-tier-card.collapsed .edit-tier-card-grid {
    display: none;
}

.edit-tier-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.edit-tier-card.collapsed .edit-tier-card-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.edit-tier-card:not(.collapsed) .edit-tier-card-collapse-icon {
    transform: rotate(90deg);
}

.edit-tier-card-meta-pill {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--muted-foreground);
    font-weight: 500;
}

.edit-tier-card-title {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.edit-tier-card-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-md);
}

.edit-tier-card-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

@media (max-width: 768px) {
    .edit-tier-card-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}

@media (max-width: 768px) {
    .dashboard-card-actions {
        flex-direction: column !important;
        gap: var(--space-xs) !important;
        align-items: stretch !important;
        max-width: none !important;
        width: 100% !important;
    }
    
    .dashboard-search-form {
        max-width: none !important;
        width: 100% !important;
    }
    
    .dashboard-card-actions .secondary-btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 640px) {
    .tier-row, .edit-tier-row {
        grid-template-columns: 1fr !important;
        gap: var(--space-sm) !important;
        border: 1px solid var(--border);
        padding: var(--space-md);
        border-radius: var(--radius);
        background: var(--card);
        margin-top: 16px !important;
        position: relative;
    }
    
    .tier-row .remove-btn, .edit-tier-row .remove-btn {
        width: 100% !important;
        margin-top: var(--space-xs) !important;
    }
    
    .tier-row > div:last-child, .edit-tier-row > div:last-child {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .slug-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .slug-input-group-prefix {
        border-right: none !important;
        border-bottom: 1px solid var(--border);
        border-radius: var(--radius) var(--radius) 0 0 !important;
        padding: 8px 12px !important;
        text-align: center;
    }
    
    .slug-input-group input {
        border-radius: 0 0 var(--radius) var(--radius) !important;
    }
}

@media (max-width: 768px) {
    /* Eliminate weird double boundary / card within a card on mobile screens */
    .glass-card.table-card,
    .glass-card:has(.table-container) {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .glass-card.table-card .table-card-header {
        border: 1px solid var(--border) !important;
        border-radius: var(--radius) !important;
        margin-bottom: var(--space-md) !important;
        background: var(--card) !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .events-search-toolbar,
    .users-search-toolbar,
    .discounts-search-toolbar {
        border: 1px solid var(--border) !important;
        border-radius: var(--radius) !important;
        margin-bottom: var(--space-md) !important;
        background: var(--card) !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .glass-card.table-card .table-card-footer {
        border: 1px solid var(--border) !important;
        border-radius: var(--radius) !important;
        margin-top: var(--space-md) !important;
        background: var(--card) !important;
        box-shadow: var(--shadow-sm) !important;
    }

    /* Responsive Table Styles for Mobile stacking */
    .table-container {
        border: none;
        box-shadow: none;
        background: transparent;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .table-container table {
        border-collapse: separate;
        border-spacing: 0 var(--space-md);
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .table-container thead {
        display: none !important; /* Hide header rows visually */
    }

    .table-container tbody {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .table-container tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: var(--space-md);
        margin-bottom: var(--space-md);
        box-shadow: var(--shadow-sm);
        transition: box-shadow 0.2s ease;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .table-container tr:hover {
        box-shadow: var(--shadow-md);
    }

    .table-container tr:hover td {
        background: transparent !important; /* Disable hover td background shift */
    }

    .table-container td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        font-size: 13px;
        padding: var(--space-sm) 0;
        border-bottom: 1px dashed var(--border);
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    .table-container td > div,
    .table-container td > span,
    .table-container td > a,
    .table-container td > strong {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 65% !important;
        text-align: right;
    }

    .table-container td[data-label="Message"] {
        align-items: flex-start !important;
    }

    .table-container td[data-label="Message"] strong,
    .table-container td[data-label="Message"] > div,
    .table-container td[data-label="Message"] > span {
        white-space: normal !important;
        word-break: break-word !important;
        text-align: right !important;
        max-width: 65% !important;
        line-height: 1.35 !important;
    }

    .table-container td[data-label="Request URI"] {
        word-break: break-all !important;
    }

    .table-container td:last-child {
        border-bottom: none;
        padding-bottom: 0;
        justify-content: flex-end;
    }

    .table-container td:last-child > div {
        max-width: 100%;
    }

    .table-container td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        text-align: left;
        margin-right: var(--space-md);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
    }
    
    /* Make primary label stand out as a card header styling */
    .table-container td:first-child,
    .table-container td[data-label="Event Title"],
    .table-container td[data-label="Buyer"],
    .table-container td[data-label="User Profile"] {
        display: block !important;
        text-align: left !important;
        font-size: 15px;
        border-bottom: 1px solid var(--border) !important;
        padding-top: 0 !important;
        padding-bottom: var(--space-sm) !important;
        margin-bottom: var(--space-xs) !important;
        width: 100% !important;
    }
    
    .table-container td:first-child::before,
    .table-container td[data-label="Event Title"]::before,
    .table-container td[data-label="Buyer"]::before,
    .table-container td[data-label="User Profile"]::before {
        display: block !important;
        margin-bottom: 4px !important;
        text-align: left !important;
    }

    .table-container td:first-child > div,
    .table-container td[data-label="Event Title"] > div,
    .table-container td[data-label="Buyer"] > div,
    .table-container td[data-label="User Profile"] > div {
        max-width: 100% !important;
        text-align: left !important;
    }
    
    /* Fix alignment for actions button dropdown on mobile */
    .table-container td[data-label="Action"],
    .table-container td[data-label="Actions"] {
        justify-content: flex-end;
    }

    /* Clean empty-state row on mobile (no dashed divider or pseudo-label) */
    .table-container td[colspan] {
        display: block !important;
        text-align: center !important;
        border-bottom: none !important;
        padding: 16px 10px !important;
        margin: 0 !important;
        font-size: 13px !important;
        color: var(--muted-foreground) !important;
    }
    .table-container td[colspan]::before {
        display: none !important;
    }
    .table-container tr:has(td[colspan]) {
        padding: 8px 14px !important;
    }
}

/* Multi-step Checkout Progress Flow Responsive Styles */
.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    width: 100%;
}
.progress-node {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s ease, color 0.3s ease;
}
.progress-node.active {
    background: var(--primary) !important;
    color: var(--primary-foreground) !important;
}
.progress-node.inactive {
    background: var(--secondary) !important;
    color: var(--muted-foreground) !important;
}
.progress-node .node-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    transition: background 0.3s ease, color 0.3s ease;
}
.progress-node.active .node-num {
    background: rgba(255,255,255,0.2) !important;
    color: var(--primary-foreground) !important;
}
.progress-node.inactive .node-num {
    background: var(--border) !important;
    color: var(--muted-foreground) !important;
}
#progress-line {
    flex: 1;
    height: 2px;
    max-width: 40px;
    background: var(--border);
    transition: background 0.3s ease;
}

@media (max-width: 640px) {
    dialog.shadcn-dialog {
        padding: var(--space-md) var(--space-sm) !important;
        width: calc(100% - 24px) !important;
    }
    .checkout-progress {
        gap: 4px;
        margin-bottom: 16px;
    }
    .progress-node {
        padding: 4px 8px;
        font-size: 11px;
        gap: 4px;
    }
    .progress-node .node-text {
        display: none;
    }
    /* Convert the node into a simple clean circle when text is hidden on mobile */
    .progress-node {
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }
    .progress-node .node-num {
        width: 100% !important;
        height: 100% !important;
        background: transparent !important;
        font-size: 12px !important;
        line-height: 28px !important;
    }
    .progress-node.active .node-num {
        color: var(--primary-foreground) !important;
    }
    .progress-node.inactive .node-num {
        color: var(--muted-foreground) !important;
    }
    #progress-line {
        max-width: 60px; /* Connect circles with a visible line */
    }
}

/* Make all date fields clickable */
input[type="date"],
input[type="datetime-local"] {
    cursor: pointer !important;
}

/* Animated Grid Background */
.hero-full-bleed {
    position: relative !important;
    overflow: hidden !important;
}

.hero-full-bleed > * {
    position: relative;
    z-index: 2;
}

.hero-full-bleed > .animated-grid-bg {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(var(--cols, 15), var(--cell-size, 6rem)) !important;
    grid-template-rows: repeat(var(--rows, 10), var(--cell-size, 6rem)) !important;
    gap: 1px !important;
    opacity: 0.18 !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%) !important;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%) !important;
}

:root.dark .hero-full-bleed > .animated-grid-bg {
    opacity: 0.55 !important;
}

.animated-grid-cell {
    background-color: var(--base-color, rgba(255,255,255,0.05));
    border-radius: 4px;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease, border-radius 0.3s ease;
    animation: animated-grid-cell-pulse var(--anim-duration, 3s) ease-in-out infinite;
}

@keyframes animated-grid-cell-pulse {
    0%, 100% {
        border-radius: 4px;
        background-color: var(--base-color);
        transform: scale(0.96);
    }
    50% {
        border-radius: 50%;
        background-color: var(--anim-color);
        transform: scale(0.85);
    }
}

/* Fix mobile menu stacking context under main copy */
.app-container:has(.floating-nav) {
    position: relative !important;
    z-index: 1000 !important;
}

/* Editorial Picks Section */
.editorial-picks-section {
    margin-top: 40px;
    margin-bottom: 56px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.editorial-header-container {
    margin-bottom: 28px;
}

.editorial-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 9999px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}

.editorial-title {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    border: none;
    padding: 0;
    color: var(--foreground);
}

.editorial-subtitle {
    font-size: 15px;
    color: var(--muted-foreground);
    max-width: 600px;
    line-height: 1.5;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 1024px) {
    .editorial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .editorial-grid {
        grid-template-columns: 1fr;
    }
}

.editorial-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.editorial-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-md);
}

:root.dark .editorial-card {
    background: rgba(22, 22, 26, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

:root.light .editorial-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.editorial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    border-color: var(--primary);
}

.editorial-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.editorial-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-card:hover .editorial-card-image {
    transform: scale(1.05);
}

.editorial-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--primary-foreground);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
}

.editorial-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 12px;
}

.editorial-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--foreground);
    margin: 0;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.editorial-card:hover .editorial-card-title {
    color: var(--primary);
}

.editorial-card-date,
.editorial-card-venue {
    display: flex;
    align-items: center;
    font-size: 13.5px;
    color: var(--muted-foreground);
    margin: 0;
    line-height: 1.4;
}

/* Mobile Custom Nav Menu Drawer styling */
.menu-toggle-btn-discover {
    display: none;
    background: transparent;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 8px;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mobile-nav-menu-custom {
    display: none;
    position: absolute;
    top: var(--header-height, 80px);
    left: 0;
    right: 0;
    background: var(--warm-hero-bg, #F8F0E5);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg) 6%;
    flex-direction: column;
    gap: var(--space-md);
    z-index: 9999;
    box-shadow: var(--shadow-md);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

:root.dark .mobile-nav-menu-custom, html.dark .mobile-nav-menu-custom {
    background: var(--warm-hero-bg, #130e09);
}

.mobile-nav-menu-custom.active {
    display: flex !important;
}

.mobile-nav-menu-custom a {
    text-decoration: none;
    font-weight: 600;
    color: var(--foreground);
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

:root.dark .mobile-nav-menu-custom a, html.dark .mobile-nav-menu-custom a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-sm) 0;
}

.mobile-theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.mobile-theme-row span {
    font-size: 15px;
    font-weight: 600;
    color: var(--foreground);
}

/* Media Query overrides for mobile navigation */
@media (max-width: 768px) {
    .nav-items {
        display: none !important;
    }
    .menu-toggle-btn-discover {
        display: flex !important;
    }
}

/* ==========================================================================
   Unified Option Menus, Custom Select Dropdowns & Funding-Style Admin Layout
   ========================================================================== */

/* 1. Native <select> global fallback: proper chevron inset (14px from edge) & brand focus */
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: var(--card) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B5E56' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px 14px !important;
    padding-right: 38px !important;
    padding-left: 14px !important;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

:root.dark select,
html.dark select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A69C95' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

select:hover {
    border-color: var(--brand-primary) !important;
}

select:focus {
    outline: none !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px var(--brand-primary-glow, rgba(255, 91, 34, 0.14)) !important;
}

select option {
    background-color: var(--card) !important;
    color: var(--foreground) !important;
    padding: 8px 12px;
}

/* 2. Progressive-Enhancement Custom Select (.tiventy-custom-select) */
.tiventy-custom-select,
.tiventy-custom-select,
.ThePartyCompany-custom-select,
.thepartycompany-custom-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 125px;
    font-family: var(--font-sans);
    vertical-align: middle;
}

.tiventy-select-native-hidden,
.ThePartyCompany-select-native-hidden,
.thepartycompany-select-native-hidden,
select.tiventy-select-native-hidden,
select.ThePartyCompany-select-native-hidden,
select.thepartycompany-select-native-hidden {
    display: none !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.tiventy-select-trigger,
.ThePartyCompany-select-trigger,
.thepartycompany-select-trigger {
    width: 100%;
    height: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--foreground);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-align: left;
    user-select: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    box-sizing: border-box;
}

.tiventy-select-trigger:hover,
.ThePartyCompany-select-trigger:hover,
.thepartycompany-select-trigger:hover {
    border-color: var(--brand-primary);
    background-color: var(--secondary);
}

.tiventy-custom-select.open .tiventy-select-trigger,
.tiventy-select-trigger:focus-visible {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-glow, rgba(255, 91, 34, 0.14));
}

.tiventy-select-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.tiventy-select-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--muted-foreground);
    transition: transform 0.2s ease, color 0.2s ease;
}

.tiventy-custom-select.open .tiventy-select-chevron {
    transform: rotate(180deg);
    color: var(--brand-primary);
}

/* Unified Option Menu Popover (.tiventy-select-menu) */
.tiventy-select-menu {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28) !important;
    padding: 5px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 9999999 !important;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

.tiventy-select-menu.open {
    display: block;
    animation: tiventyMenuIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tiventyMenuIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tiventy-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 11px;
    border: none;
    background: transparent;
    border-radius: 7px;
    color: var(--foreground);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
    box-sizing: border-box;
}

.tiventy-select-option:hover,
.tiventy-select-option:focus-visible {
    background-color: var(--secondary);
    outline: none;
}

.tiventy-select-option.selected {
    background-color: var(--brand-primary-glow, rgba(255, 91, 34, 0.10));
    color: var(--brand-primary);
    font-weight: 700;
}

.tiventy-select-option.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.tiventy-select-option-check {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--brand-primary);
    opacity: 0;
    transition: opacity 0.12s ease;
}

.tiventy-select-option.selected .tiventy-select-option-check {
    opacity: 1;
}

/* Multi-select Checkbox inside Filter Option Menus */
.tiventy-option-checkbox {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 1.5px solid var(--border);
    background: var(--background);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.12s ease, border-color 0.12s ease;
    box-sizing: border-box;
}

.tiventy-option-checkbox svg {
    width: 10px;
    height: 10px;
    color: var(--brand-primary-foreground, #FAF7F2);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.tiventy-select-option.selected .tiventy-option-checkbox {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.tiventy-select-option.selected .tiventy-option-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

.tiventy-select-menu-options {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tiventy-select-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 6px 3px 6px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    background: var(--card);
}

.tiventy-menu-btn-clear {
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.12s ease, background-color 0.12s ease;
}

.tiventy-menu-btn-clear:hover {
    color: var(--foreground);
    background: var(--secondary);
}

.tiventy-menu-btn-apply {
    border: none;
    background: var(--brand-primary);
    color: var(--brand-primary-foreground, #FAF7F2);
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s ease;
}

.tiventy-menu-btn-apply:hover {
    background: var(--brand-primary-hover, #E04610);
}

/* Single-Row Filter Control Bar Enforcement on Desktop */
@media (min-width: 900px) {
    .credits-filter-bar,
    .events-search-toolbar,
    .discounts-search-toolbar,
    .settlements-filter-bar,
    .dashboard-search-form,
    .events-search-form,
    .discounts-search-form {
        flex-wrap: nowrap !important;
    }

    .dashboard-search-form,
    .events-search-form,
    .discounts-search-form {
        max-width: none !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .credits-filter-bar .search-input-wrap,
    .events-search-toolbar .events-search-box,
    .discounts-search-toolbar .discounts-search-box {
        flex: 2 1 340px !important;
        min-width: 260px !important;
        max-width: none !important;
    }

    .credits-filter-bar .tiventy-custom-select,
    .events-search-toolbar .tiventy-custom-select,
    .discounts-search-toolbar .tiventy-custom-select,
    .settlements-filter-bar .tiventy-custom-select {
        flex: 0 1 165px !important;
        min-width: 120px !important;
        max-width: 195px !important;
    }

    .credits-filter-bar button,
    .credits-filter-bar a.secondary-btn,
    .events-search-toolbar button,
    .events-search-toolbar a.secondary-btn,
    .discounts-search-toolbar button,
    .discounts-search-toolbar a.secondary-btn,
    .settlements-filter-bar button,
    .settlements-filter-bar a.secondary-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
}

/* Unified Filter Bar Controls & Submit Button Styling across all Admin Pages */
.credits-filter-bar input[type="text"],
.events-search-toolbar .events-search-input,
.discounts-search-toolbar #discounts-search-input,
.settlements-filter-bar .form-control {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
    background-color: var(--card) !important;
    color: var(--foreground) !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
}

.credits-filter-bar .tiventy-custom-select,
.events-search-toolbar .tiventy-custom-select,
.discounts-search-toolbar .tiventy-custom-select,
.settlements-filter-bar .tiventy-custom-select,
.dashboard-search-form .tiventy-custom-select {
    height: 36px !important;
}

.credits-filter-bar .tiventy-select-trigger,
.events-search-toolbar .tiventy-select-trigger,
.discounts-search-toolbar .tiventy-select-trigger,
.settlements-filter-bar .tiventy-select-trigger,
.dashboard-search-form .tiventy-select-trigger {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
    background-color: var(--card) !important;
    color: var(--foreground) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.credits-filter-bar button[type="submit"],
.events-search-toolbar .events-search-submit-btn,
.discounts-search-toolbar button[type="submit"],
.settlements-filter-bar button[type="submit"],
.dashboard-search-form .events-search-submit-btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 16px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
    background-color: var(--card) !important;
    color: var(--foreground) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease !important;
}

.credits-filter-bar button[type="submit"]:hover,
.events-search-toolbar .events-search-submit-btn:hover,
.discounts-search-toolbar button[type="submit"]:hover,
.settlements-filter-bar button[type="submit"]:hover,
.dashboard-search-form .events-search-submit-btn:hover {
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
    background-color: var(--secondary) !important;
}

/* Mobile & Tablet Filter Bar Layout (< 900px) — prevents horizontal collision & broken pills */
@media (max-width: 899px) {
    .credits-filter-bar,
    .events-search-toolbar,
    .discounts-search-toolbar,
    .dashboard-search-form,
    .events-search-form,
    .discounts-search-form {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .credits-filter-bar {
        padding: 12px 14px !important;
        border: 1px solid var(--border) !important;
        border-radius: 0 0 12px 12px !important;
        margin-bottom: 14px !important;
        background: var(--card) !important;
    }

    .credits-card-tabs {
        padding: 0 14px !important;
        border: 1px solid var(--border) !important;
        border-bottom: none !important;
        border-radius: 12px 12px 0 0 !important;
        background: var(--card) !important;
    }

    .credits-card-tabs .account-tabs {
        width: 100% !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        gap: 20px !important;
        justify-content: flex-start !important;
        border-bottom: 1px solid var(--border) !important;
    }

    .credits-card-tabs .account-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .credits-card-tabs .account-tab {
        padding: 10px 4px !important;
        font-size: 12.5px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .credits-filter-bar .search-input-wrap,
    .events-search-toolbar .events-search-box,
    .discounts-search-toolbar .discounts-search-box,
    .dashboard-search-form .events-search-box {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .credits-filter-bar .tiventy-custom-select,
    .events-search-toolbar .tiventy-custom-select,
    .discounts-search-toolbar .tiventy-custom-select,
    .dashboard-search-form .tiventy-custom-select {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: calc(50% - 4px) !important;
        max-width: 100% !important;
        width: auto !important;
    }

    .settlements-filter-bar .tiventy-custom-select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }

    .dashboard-search-form .events-search-submit-btn,
    .events-search-form .events-search-submit-btn,
    .discounts-search-form button[type="submit"],
    .credits-filter-bar button[type="submit"],
    .settlements-filter-bar .filter-field-actions button[type="submit"] {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: calc(50% - 4px) !important;
        justify-content: center !important;
    }

    .events-search-toolbar > a.secondary-btn {
        width: 100% !important;
        height: 36px !important;
        border-radius: 8px !important;
        justify-content: center !important;
    }
}

/* 3. Harmonize Actions Dropdown (.actions-dropdown-btn & .actions-dropdown-menu) */
.actions-dropdown-btn {
    padding: 0 12px !important;
    height: 32px !important;
    gap: 7px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
    background: var(--card) !important;
    color: var(--foreground) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease !important;
}

.actions-dropdown-btn:hover,
.actions-dropdown.active .actions-dropdown-btn {
    border-color: var(--brand-primary) !important;
    background: var(--secondary) !important;
}

.actions-dropdown-menu {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 5px !important;
    min-width: 170px !important;
}

.actions-dropdown-item {
    border-radius: 7px !important;
    padding: 8px 11px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    transition: background-color 0.12s ease, color 0.12s ease !important;
}

.actions-dropdown-item:hover {
    background: var(--secondary) !important;
}

/* 4. Shared Funding-Applications-Style Layout (.credits-kpi-grid, .credits-card, .credits-filter-bar) */
.credits-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .credits-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .credits-kpi-card {
        padding: 12px 14px !important;
    }
    .credits-kpi-value {
        font-size: 18px !important;
    }
}

.credits-kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.credits-kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
}

.credits-kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--foreground);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.credits-card {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
}

.credits-card-tabs {
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--card);
}

.credits-card-tabs .account-tabs {
    margin-bottom: 0;
    border-bottom: none;
    gap: 22px;
}

.credits-card-tabs .account-tab {
    padding: 14px 2px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.credits-filter-bar {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.credits-filter-bar .search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.credits-filter-bar .search-input-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    pointer-events: none;
}

.credits-filter-bar .search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.credits-filter-bar .search-input:focus {
    border-color: var(--brand-primary);
}

.credits-filter-bar .filter-select {
    height: 36px;
    padding: 0 38px 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 13px;
    font-weight: 500;
    min-width: 150px;
    outline: none;
    cursor: pointer;
}

.credits-filter-bar .tiventy-custom-select {
    height: 36px;
}

.credits-filter-bar .tiventy-select-trigger {
    height: 36px;
    min-height: 36px;
    background-color: var(--background);
}

.cell-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cell-primary {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--foreground);
    line-height: 1.3;
}

.cell-secondary {
    font-size: 12px;
    color: var(--muted-foreground);
    line-height: 1.3;
}

/* Shared Detail Modal Card */
.detail-modal-card {
    background: var(--card);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.detail-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.detail-modal-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 80vh;
    overflow-y: auto;
}

.detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    padding: 14px 16px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
}

@media (max-width: 520px) {
    .detail-specs-grid {
        grid-template-columns: 1fr;
    }
}

.detail-spec-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-spec-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
}

.detail-spec-value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--foreground);
    word-break: break-word;
}

/* ==========================================================================
   Onboarding / Empty State Card (Events, Invites & RSVPs, Discounts, Dashboard)
   ========================================================================== */
.admin-empty-state-card {
    background: var(--bg-subtle, rgba(248, 240, 229, 0.55));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 64px 24px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

html.dark .admin-empty-state-card,
body.dark .admin-empty-state-card {
    background: var(--card, #181210);
    border-color: var(--border-dark-warm, rgba(255, 91, 34, 0.14));
}

.admin-empty-state-illustration {
    width: 112px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px auto;
}

.admin-empty-state-title {
    font-family: var(--font-display, var(--font-primary));
    font-size: 18px;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.admin-empty-state-desc {
    font-size: 14px;
    color: var(--muted-foreground);
    line-height: 1.55;
    max-width: 390px;
    margin: 0 auto 24px auto;
}

.admin-empty-state-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brand-primary, #FF5B22);
    color: var(--brand-primary-foreground, #FAF7F2);
    border: 1px solid var(--brand-primary, #FF5B22);
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    box-shadow: none;
}

.admin-empty-state-btn:hover {
    background: var(--brand-primary-hover, #E04610);
    border-color: var(--brand-primary-hover, #E04610);
    color: var(--brand-primary-foreground, #FAF7F2);
    transform: translateY(-1px);
}

/* ==========================================================================
   Reusable Atomic Button, Modal Footer, Poster Upload & Category Card Classes
   ========================================================================== */
.btn-header-cta,
.admin-header .action-btn {
    width: auto !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: var(--radius) !important;
    white-space: nowrap !important;
}

.btn-auto,
.modal-step-footer .action-btn,
.modal-step-footer .secondary-btn {
    width: auto !important;
    padding: 10px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-sm {
    width: auto !important;
    padding: 7px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap;
}

.btn-danger-outline {
    color: var(--state-danger, var(--danger-color)) !important;
    border-color: var(--state-danger, var(--danger-color)) !important;
}

.modal-btn-back {
    margin-right: auto !important;
}

.form-textarea-compact {
    min-height: 90px !important;
    height: 90px !important;
    padding: 10px 14px !important;
    resize: none !important;
    box-sizing: border-box !important;
}

.poster-upload-field {
    display: flex;
    gap: 14px;
    align-items: center;
    height: 90px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-sizing: border-box;
}

.poster-preview-box {
    width: 72px;
    height: 72px;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid var(--border);
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.form-hint {
    font-size: 11px;
    color: var(--muted-foreground);
    margin-top: 4px;
    line-height: 1.35;
}

.ticket-category-card {
    background: rgba(var(--foreground-rgb), 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 4px;
}

.ticket-category-card-title {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--primary);
}

.ticket-category-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.form-group .tiventy-select-trigger {
    min-height: 41px;
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================================================
   1. Unified Admin Page Headers & Title Typography (.admin-header, .admin-page-title)
   ========================================================================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: var(--space-lg);
}

.admin-page-title,
.admin-header h1,
.admin-header h2 {
    font-family: var(--font-display, var(--font-primary));
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    margin: 0 !important;
    color: var(--foreground);
    line-height: 1.2;
}

/* ==========================================================================
   2. Atomic Alert & Feedback Banners (.alert-banner, .alert-success, .alert-danger, .alert-warning)
   ========================================================================== */
.alert-banner {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    line-height: 1.45;
}

.alert-success {
    background: var(--state-success-bg, var(--success-bg));
    color: var(--state-success, var(--success-color));
    border: 1px solid var(--state-success-border, var(--success-color));
}

.alert-danger {
    background: var(--state-danger-bg, var(--danger-bg));
    color: var(--state-danger, var(--danger-color));
    border: 1px solid var(--state-danger-border, var(--danger-color));
}

.alert-warning {
    background: var(--state-warning-bg, rgba(217, 119, 6, 0.10));
    color: var(--state-warning, #D97706);
    border: 1px solid var(--state-warning-border, rgba(217, 119, 6, 0.28));
}

.alert-info {
    background: var(--state-neutral-bg, var(--secondary));
    color: var(--state-neutral, var(--foreground));
    border: 1px solid var(--state-neutral-border, var(--border));
}

/* ==========================================================================
   3. Unified KPI Metric Summary Cards (.kpi-grid, .kpi-card, .kpi-label, .kpi-value)
   ========================================================================== */
.kpi-grid,
.dashboard-kpi-grid,
.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .kpi-grid,
    .dashboard-kpi-grid,
    .kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .kpi-card,
    .dashboard-kpi-card {
        padding: 12px 14px !important;
    }
    .kpi-value,
    .dashboard-kpi-value {
        font-size: 18px !important;
    }
}

.kpi-card,
.dashboard-kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.kpi-label,
.dashboard-kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
}

.kpi-value,
.dashboard-kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--foreground);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ==========================================================================
   4. Atomic Modal Dialog Shell, Header, Title & Close Button
   ========================================================================== */
dialog.shadcn-dialog.modal-sm {
    max-width: 480px;
    width: min(480px, calc(100vw - 32px));
    padding: 0;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
}

dialog.shadcn-dialog.modal-md {
    max-width: 560px;
    width: min(560px, calc(100vw - 32px));
    max-height: min(88vh, 720px);
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
}

dialog.shadcn-dialog.modal-lg {
    max-width: 860px;
    width: min(860px, calc(100vw - 32px));
    height: min(88vh, 720px);
    max-height: min(88vh, 760px);
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px 14px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--card);
    gap: 12px;
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    color: var(--foreground);
    line-height: 1.25;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted-foreground);
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.modal-close-btn:hover {
    color: var(--foreground);
    background: var(--secondary);
}

/* ==========================================================================
   5. Unified Admin Data Tables, Search Toolbars & Table Footers
   ========================================================================== */
.admin-data-table th,
.credits-card table th,
.events-table th,
.users-table th {
    padding: 11px 16px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    background: rgba(32, 21, 16, 0.025);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

:root.dark .admin-data-table th,
html.dark .admin-data-table th,
:root.dark .credits-card table th,
html.dark .credits-card table th,
:root.dark .events-table th,
html.dark .events-table th,
:root.dark .users-table th,
html.dark .users-table th {
    background: rgba(255, 255, 255, 0.02);
}

.admin-data-table td,
.credits-card table td,
.events-table td,
.users-table td {
    padding: 12px 16px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--border);
    font-size: 13px !important;
}

.admin-data-table tbody tr:last-child td,
.credits-card table tbody tr:last-child td,
.events-table tbody tr:last-child td,
.users-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-data-table tbody tr:hover,
.credits-card table tbody tr:hover,
.events-table tbody tr:hover,
.users-table tbody tr:hover {
    background: rgba(255, 91, 34, 0.02);
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.nowrap {
    white-space: nowrap !important;
}

.table-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    background: rgba(32, 21, 16, 0.015);
}

/* ==========================================================================
   6. Atomic Badges & Fee Summary Boxes (.badge-addon, .fee-summary-grid, .fee-summary-box)
   ========================================================================== */
.badge-addon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(254, 200, 104, 0.20);
    color: var(--state-neutral, #8D3E14);
    border: 1px solid rgba(254, 200, 104, 0.50);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.fee-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.fee-summary-box {
    font-size: 13px;
    color: var(--muted-foreground);
    line-height: 1.5;
    padding: 10px 12px;
    background: rgba(32, 21, 16, 0.03);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

:root.dark .fee-summary-box,
html.dark .fee-summary-box {
    background: rgba(255, 255, 255, 0.03);
}

.fee-summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
    margin-bottom: 2px;
}

.fee-summary-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--foreground);
}

/* ==========================================================================
   7. Public Split-Hero & CTA Buttons (discover.php & promote_event.php)
   ========================================================================== */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brand-primary, #FF5B22);
    color: var(--brand-primary-foreground, #FAF7F2);
    border: 1px solid var(--brand-primary, #FF5B22);
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    box-shadow: none;
}

.btn-cta:hover {
    background: var(--brand-primary-hover, #E04610);
    border-color: var(--brand-primary-hover, #E04610);
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--card, #FFFFFF);
    color: var(--foreground, #201510);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-secondary:hover {
    border-color: var(--brand-primary, #FF5B22);
    color: var(--brand-primary, #FF5B22);
    transform: translateY(-1px);
}





