:root {
    /* Custom Design System Tokens */
    --primary: #6C5199;
    --primary-hover: #5b4382;
    --primary-light: #7c526d;
    
    --secondary: #e2e8f0;       
    --secondary-hover: #e5e7eb;
    
    --bg-body: #f8f9fc;
    --bg-card: #ffffff;
    
    --text-main: #333333;       
    --text-muted: #64748b;
    
    --sidebar-bg: #2F2148;      
    --sidebar-text: #a0929b;
    --sidebar-hover: #d4d4d4;
    --sidebar-active-bg: #412e63; 
    --sidebar-active-text: #ffffff;

    --navbar-bg: #ffffff;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    background-color: var(--bg-body) !important;
    color: var(--text-main);
    font-size: 14px !important; 
    font-weight: 400 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.6);
}

/* Specific Sidebar Scrollbar to match dark theme */
#sidebar ::-webkit-scrollbar-thumb, 
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
#sidebar ::-webkit-scrollbar-thumb:hover, 
.sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-weight: 500 !important; /* Soften headings from default 700 */
    color: inherit;
    letter-spacing: -0.01em;
}

/* Globally soften Bootstrap's aggressive bold weight */
.fw-bold {
    font-weight: 500 !important;
}
.fw-semibold {
    font-weight: 500 !important;
}

/* Uniform form elements and buttons */
input, button, select, textarea, .btn, .form-control, .form-select, .dropdown-item {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Uniform and delicate form labels */
.form-control:focus, .form-select:focus {
    box-shadow: none !important;
    border-color: var(--primary-light) !important;
}

.form-label, label, .col-form-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-muted);
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

.top-navbar {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid rgba(0,0,0,0.05);
}

#sidebar .sidebar-header {
    display: none;
}

ul.components {
    padding: 1rem 0;
    flex-grow: 1;
}

#sidebar ul li {
    margin: 0.25rem 1rem;
}

#sidebar ul li a {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

#sidebar ul li a i {
    font-size: 1.1rem;
    opacity: 0.8;
}

#sidebar ul li a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

#sidebar ul li.active > a {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

/* Top Navbar */
.top-navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    border: none;
    box-shadow: var(--shadow-sm);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-link:focus, .btn-link:active {
    box-shadow: none !important;
    outline: none !important;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.25);
}

.btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border-color);
}
.btn-outline-secondary:hover {
    background-color: #f9fafb;
    color: var(--text-main);
    border-color: #d1d5db;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    background-color: #f9fafb;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Tables */
.table {
    margin-bottom: 0;
    color: var(--text-main);
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background-color: #f9fafb !important;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.bg-success { background-color: var(--success) !important; color: white !important; }
.bg-danger { background-color: var(--danger) !important; color: white !important; }
.bg-warning { background-color: var(--warning) !important; color: #1e293b !important; }
.bg-info { background-color: var(--info) !important; color: white !important; }
.bg-secondary { background-color: #64748b !important; color: white !important; }



@media (max-width: 768px) {
    #sidebar {
        margin-left: 0;
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        top: 56px;
        height: calc(100vh - 56px);
        z-index: 1030;
        box-shadow: var(--shadow-lg);
        transition: transform 0.3s ease-in-out;
    }
    #sidebar.active {
        transform: translateX(0);
    }
}

/* GLOBAL BOOTSTRAP OVERRIDES */
.text-primary { 
    color: var(--primary) !important; 
}
.bg-primary { 
    background-color: var(--primary) !important; 
    color: white !important;
}
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}
.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}
.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: white !important;
}
.border-primary {
    border-color: var(--primary) !important;
}
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: var(--primary) !important;
    color: white !important;
}
.badge.bg-primary {
    background-color: var(--primary) !important;
    color: white !important;
}

.h3, h3 {
    font-size: 1.1rem;
}

/* ==============================================================
   PREMIUM VISITOR UI (Kiosk & Track Status)
============================================================== */

/* Animated Gradient Background */
.kiosk-bg {
    background: linear-gradient(-45deg, #2F2148, #6C5199, #8E7BB3, #2F2148);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 1.25rem;
    overflow: hidden;
}

/* Floating Input Styling */
.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: 0.75rem;
    border: 1px solid rgba(108, 81, 153, 0.2);
    background-color: #fcfbfe;
    padding-left: 3rem; /* Space for icon */
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 81, 153, 0.15);
}

.form-floating > label {
    padding-left: 3rem;
    color: var(--text-muted);
}

.form-floating .input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.25rem;
    z-index: 5;
    pointer-events: none;
}

/* Custom modern button */
.btn-premium {
    background: linear-gradient(135deg, var(--primary), #8E7BB3);
    border: none;
    color: white !important;
    border-radius: 999px;
    padding: 0.75rem 2rem;
    font-weight: 600 !important;
    box-shadow: 0 10px 15px -3px rgba(108, 81, 153, 0.4);
    transition: all 0.3s ease;
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(108, 81, 153, 0.5);
}

/* Status Badge Pulse */
.status-pulse {
    animation: pulseBadge 2s infinite;
}
@keyframes pulseBadge {
    0% { box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(var(--bs-primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0); }
}

/* Digital Ticket Success Screen */
.ticket-ack {
    background: #fff;
    border-radius: 1rem;
    position: relative;
    border: 2px dashed rgba(108, 81, 153, 0.3);
    padding: 2rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}
.ticket-ack::before, .ticket-ack::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #f8f9fc;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(108, 81, 153, 0.1);
}
.ticket-ack::before { left: -15px; border-right-color: transparent; }
.ticket-ack::after { right: -15px; border-left-color: transparent; }

/* Registration Wizard Steps Custom Styling */
#v-pills-tab .nav-link:not(.disabled):not(.active) {
    color: var(--primary) !important;
}
#v-pills-tab .nav-link:not(.disabled):not(.active) .rounded-circle {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}
#v-pills-tab .nav-link.disabled {
    color: var(--text-muted) !important;
}
#v-pills-tab .nav-link.disabled .rounded-circle {
    background-color: var(--secondary) !important;
    color: var(--text-muted) !important;
}

.h4, h4 {
    font-size: 1.2rem;
}
