/* style.css - Carnival Mode Glassmorphism Style System */

@import url('fonts.css');

:root {
    --bg-gradient: radial-gradient(circle at 10% 20%, rgb(35, 12, 60) 0%, rgb(18, 5, 36) 90%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-glow: rgba(236, 72, 153, 0.2);
    
    --primary: #f43f5e; /* Vibrant Rose */
    --secondary: #a855f7; /* Vibrant Purple */
    --accent: #f59e0b; /* Golden Amber */
    --success: #10b981; /* Emerald */
    --info: #0ea5e9; /* Sky Blue */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    position: relative;
}

/* Background floating glow blobs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

body::before {
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation: floatBlob 20s infinite alternate;
}

body::after {
    background: var(--secondary);
    bottom: 10%;
    right: 10%;
    animation: floatBlob2 25s infinite alternate;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 50px) scale(1.2); }
}

@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1.2); }
    100% { transform: translate(-100px, -60px) scale(0.9); }
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), 0 0 15px var(--glass-glow);
}

/* Layout */
#app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar navigation */
#sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    border-right: 1px solid var(--glass-border);
    background: rgba(20, 6, 40, 0.4);
    backdrop-filter: blur(20px);
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

#sidebar .logo-area {
    padding: 24px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
}

#sidebar .logo-area img,
#sidebar .logo-area .logo-avatar-placeholder {
    width: 45%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: var(--transition);
}

#sidebar .logo-area h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #f43f5e, #a855f7, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    word-break: break-word;
    white-space: normal;
    transition: var(--transition);
    opacity: 1;
    height: auto;
}

#sidebar.collapsed .logo-area {
    width: 100% !important;
    height: var(--sidebar-collapsed-width);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
}

#sidebar.collapsed .logo-area img,
#sidebar.collapsed .logo-area .logo-avatar-placeholder {
    width: 60% !important;
    border-radius: 6px !important;
}

#sidebar.collapsed .logo-area h1 {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

.nav-menu {
    list-style: none;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.25) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px solid rgba(244, 63, 94, 0.35) !important;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.25), inset 0 0 8px rgba(255, 255, 255, 0.05);
    color: #fff !important;
}

.nav-item.active a i {
    color: var(--primary) !important;
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

#sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 12px 0;
    gap: 0 !important;
}

#sidebar .nav-item a .nav-label {
    opacity: 1;
    max-width: 220px;
    display: inline-block;
    transition: opacity 0.2s ease, max-width 0.25s ease;
    overflow: hidden;
}

#sidebar.collapsed .nav-item a .nav-label {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}

.sidebar-toggle {
    margin: auto 15px 20px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-main);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-toggle:hover {
    background: var(--primary);
}

/* Main Content Area */
#main-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 18px;
    border-radius: 50px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* Forms styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1 !important;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}

select.form-control option {
    background-color: #1a082e;
    color: #fff !important;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}

.btn-danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Table Design */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: transparent !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-main) !important;
}

.table th, .table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    background-color: transparent !important;
    color: inherit !important;
}

.table th {
    background-color: rgba(255, 255, 255, 0.04) !important;
    font-weight: 600;
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr:last-child td {
    border-bottom: none;
}

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

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Alerts and Badges */
.badge {
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-suspended {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* Login Page Specific Layout */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(to right, #f43f5e, #a855f7, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

/* Dashboard Specific UI Elements */
.stat-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card .icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.4rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Active Token Card Classes (Color Coded Countdown Alerts) */
.token-card {
    padding: 20px;
    border-left: 5px solid var(--info);
    position: relative;
    max-width: 400px;
    width: 100%;
}

.token-card.alert-yellow {
    border-left-color: var(--accent);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
    animation: pulseYellow 2s infinite alternate;
}

.token-card.alert-red {
    border-left-color: var(--primary);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.25);
    animation: pulseRed 1s infinite alternate;
}

@keyframes pulseYellow {
    0% { border-color: rgba(245, 158, 11, 0.5); }
    100% { border-color: rgba(245, 158, 11, 1); }
}

@keyframes pulseRed {
    0% { border-color: rgba(244, 63, 94, 0.5); transform: scale(1); }
    100% { border-color: rgba(244, 63, 94, 1); transform: scale(1.02); }
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.token-no {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.1rem;
}

.token-category {
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 5px;
    color: var(--text-muted);
}

.token-timer {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 15px 0;
    letter-spacing: 1px;
}

.token-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.token-details p strong {
    color: var(--text-main);
}

.token-footer {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* End Alert Area Layout */
.end-alert-area {
    background: rgba(239, 68, 68, 0.1);
    border: 2px dashed rgba(239, 68, 68, 0.4);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.05);
}

.end-alert-area h3 {
    color: #f87171;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.end-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Receipt Print Preview Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #fff;
    color: #000;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* 80mm Thermal Receipt style target */
.receipt-container {
    width: 80mm;
    margin: 0 auto;
    padding: 10px;
    background: #fff;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.4;
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
}

.receipt-logo {
    max-width: 60px;
    max-height: 60px;
    margin-bottom: 5px;
}

.receipt-title {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
}

.receipt-details {
    margin-bottom: 15px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.receipt-divider {
    border-top: 1px dashed #000;
    margin: 10px 0;
}

.receipt-total {
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 10px;
    border-top: 1px dashed #000;
    padding-top: 10px;
}

/* --- REUSABLE UTILITY CLASSES (Restructuring out inline styles) --- */

.w-full { width: 100%; }
.h-fit { height: fit-content; }
.hidden { display: none !important; }

/* Text styles */
.text-muted { color: var(--text-muted) !important; }
.text-main { color: var(--text-main) !important; }
.text-white { color: #ffffff !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: #ef4444 !important; }
.text-info { color: #38bdf8 !important; }
.text-accent { color: var(--accent) !important; }

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

.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-mono { font-family: monospace !important; }
.uppercase { text-transform: uppercase !important; }

/* Font size modifiers */
.fs-xs { font-size: 0.75rem !important; }
.fs-sm { font-size: 0.8rem !important; }
.fs-md { font-size: 0.85rem !important; }
.fs-lg { font-size: 0.95rem !important; }
.fs-xl { font-size: 1.1rem !important; }
.fs-2xl { font-size: 1.2rem !important; }
.fs-3xl { font-size: 1.3rem !important; }
.fs-4xl { font-size: 1.8rem !important; }
.fs-5xl { font-size: 2rem !important; }

/* Margins & paddings */
.m-auto { margin: auto; }
.mt-5 { margin-top: 5px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-25 { margin-top: 25px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-5 { margin-bottom: 5px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-25 { margin-bottom: 25px !important; }
.mb-30 { margin-bottom: 30px !important; }
.mb-35 { margin-bottom: 35px !important; }

.p-10 { padding: 10px !important; }
.p-25 { padding: 25px !important; }

/* Custom padding and borders */
.card-header-divider {
    border-top: 1px solid var(--glass-border);
    margin: 20px 0;
    padding-top: 15px;
}

.demo-account-box {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px;
}

.user-avatar-sm {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: var(--accent);
    flex-shrink: 0;
}

.currency-badge {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--accent);
    padding: 1px 5px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
    letter-spacing: 0.5px;
    margin-right: 4px;
}



.user-logout-btn {
    color: #f87171 !important;
}

.flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
}

.gap-10 { gap: 10px !important; }
.gap-15 { gap: 15px !important; }
.gap-20 { gap: 20px !important; }

.receipt-text-muted {
    font-size: 10px;
    margin-top: 4px;
    white-space: pre-wrap;
}

.receipt-footer-delay {
    font-size: 10px;
    text-align: center;
}

.receipt-grace-msg {
    margin-top: 5px;
    font-style: italic;
    color: #555;
}

/* KPI Card backgrounds */
.bg-success-light { background: rgba(16, 185, 129, 0.1) !important; }
.bg-danger-light { background: rgba(239, 68, 68, 0.1) !important; }

/* Report layout tabs styling */
.report-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}
.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.max-w-200-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media print {
    html, body {
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }
    .receipt-container {
        width: 80mm;
        padding: 0;
        margin: 0 auto !important;
    }
}

/* --- AJAX MODALS --- */
.pk-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 6vh 20px;
    z-index: 990;
}

.pk-modal.active {
    display: flex;
}

.pk-modal-content {
    width: 90%;
    max-width: 520px;
    padding: 30px;
    position: relative;
    animation: pkSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pkSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pk-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.pk-modal-header h3 {
    margin: 0;
    font-weight: 700;
    color: #fff;
    font-size: 1.3rem;
}

.pk-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.pk-modal-close:hover {
    color: var(--primary);
}

/* --- CUSTOM DIALOGS (Alert / Confirm) --- */
.pk-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 3, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.pk-dialog-overlay.active {
    display: flex;
}

.pk-dialog-box {
    max-width: 420px;
    width: 90%;
    padding: 35px 30px;
    text-align: center;
    animation: pkPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 25px rgba(168, 85, 247, 0.15);
}

@keyframes pkPopIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pk-dialog-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.pk-dialog-icon.alert { color: var(--accent); }
.pk-dialog-icon.confirm { color: var(--primary); }
.pk-dialog-icon.success { color: var(--success); }

.pk-dialog-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.pk-dialog-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

.pk-dialog-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* --- TOAST NOTIFICATIONS --- */
#pk-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pk-toast {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 25px;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    animation: pkToastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: var(--transition);
}

.pk-toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}

@keyframes pkToastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.pk-toast.success { border-left: 5px solid var(--success); }
.pk-toast.danger { border-left: 5px solid #ef4444; }
.pk-toast.info { border-left: 5px solid var(--info); }
.pk-toast.warning { border-left: 5px solid var(--accent); }

/* Custom Date Picker Styles */
.custom-date-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-date-wrapper .date-icon {
    position: absolute;
    left: 15px;
    color: var(--accent);
    pointer-events: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 5;
}

.custom-date-input {
    padding-left: 45px !important;
    cursor: pointer;
    position: relative;
}

.custom-date-input:focus + .date-icon {
    color: var(--primary);
}

.custom-date-input::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Custom Dropdown / Select Component Styles */
.pk-custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.pk-custom-select.active {
    z-index: 1060;
}

.pk-custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main) !important;
    font-size: 0.95rem;
    height: 48px;
    transition: var(--transition);
}

.pk-custom-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08) !important;
}

.pk-custom-select.active .pk-custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
    background: rgba(255, 255, 255, 0.08) !important;
}

.pk-custom-select-trigger .trigger-arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.pk-custom-select.active .trigger-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.pk-custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(30, 27, 38, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px;
    z-index: 1050;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pk-custom-select.active .pk-custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pk-custom-option {
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pk-custom-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.pk-custom-option.selected {
    background: rgba(168, 85, 247, 0.15);
    color: var(--primary);
    font-weight: 600;
}

/* Category Tiles Grid for POS Dashboard */
.category-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.category-tile {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    user-select: none;
}

.category-tile:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.category-tile.active {
    background: rgba(168, 85, 247, 0.15) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.category-tile .tile-icon {
    font-size: 1.5rem;
    color: var(--accent);
    transition: all 0.3s ease;
}

.category-tile.active .tile-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.category-tile .tile-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
    display: block;
    line-height: 1.2;
}

.category-tile .tile-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 6px;
}

/* Multi-step Wizard Progress Bar */
.wizard-steps-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
    padding: 0 16px;
}

.wizard-progress-line-container {
    position: absolute;
    top: 50%;
    left: 16px;
    right: 16px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-50%);
    z-index: 1;
}

.wizard-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
    width: 0%;
}

.wizard-step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e1b26;
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 3;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.wizard-step-node.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.wizard-step-node.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.wizard-step-content.hidden {
    display: none !important;
}

/* Player Count Node Selector */
.player-count-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.player-count-selector .count-node {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    user-select: none;
    text-align: center;
    line-height: 1.2;
    padding: 4px;
}

.player-count-selector .count-node:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.player-count-selector .count-node.active {
    background: rgba(168, 85, 247, 0.15) !important;
    border-color: var(--primary) !important;
    color: var(--primary);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.count-custom-input-wrapper {
    width: 80px;
}

.count-custom-input-wrapper input {
    height: 42px !important;
    text-align: center;
    padding: 0 !important;
    font-weight: 700;
}

/* Active Session Header Filter Overrides */
#active-search-filter {
    border-radius: 8px !important;
    height: 36px !important;
    padding-left: 30px !important;
    font-size: 0.85rem !important;
}

#custom-select-active-category-filter {
    width: 170px !important;
    display: inline-block !important;
}

#custom-select-active-category-filter .pk-custom-select-trigger {
    height: 36px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
}

#custom-select-active-category-filter .pk-custom-select-options {
    top: calc(100% + 4px) !important;
    border-radius: 8px !important;
}

/* Register Session Card-Button Hover Micro-Interactions */
.register-session-btn-card {
    transition: all 0.3s ease !important;
}

.register-session-btn-card:hover {
    border-color: var(--primary) !important;
    background: rgba(244, 63, 94, 0.05) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.15);
}

.register-session-btn-card:hover .icon-wrap {
    transform: scale(1.1);
    background: var(--primary) !important;
    color: #fff !important;
}

/* Strict 3-Column Layout for Active Sessions Grid on Desktop */
#active-tokens-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1400px) {
    #active-tokens-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    #active-tokens-grid {
        grid-template-columns: 1fr !important;
    }
}
