/* ============================================================
   File: assets/css/style.css
   Purpose: Modern professional styling for the whole system
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #eef2ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --sidebar-w: 260px;
}

* { box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--light);
    color: var(--dark);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}
.sidebar .brand {
    padding: 24px 20px;
    font-size: 18px;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar .brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px;
}
.sidebar-section {
    padding: 16px 12px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
}
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    margin: 2px 8px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.sidebar nav a:hover {
    background: rgba(99, 102, 241, 0.15);
    color: white;
}
.sidebar nav a.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.sidebar nav a i { font-size: 18px; width: 20px; text-align: center; }

/* MAIN CONTENT */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.topbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.topbar .user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
}
.user-badge .avatar {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 12px;
}
.content { padding: 28px; }

/* CARDS */
.stat-card {
    background: white;
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-card .label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 6px;
}
.stat-card .value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.icon-primary { background: var(--primary-light); color: var(--primary); }
.icon-success { background: #d1fae5; color: var(--success); }
.icon-warning { background: #fef3c7; color: var(--warning); }
.icon-danger  { background: #fee2e2; color: var(--danger); }
.icon-info    { background: #cffafe; color: var(--info); }

/* CARDS (generic) */
.card-modern {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-modern .card-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-modern .card-head h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}
.card-modern .card-body { padding: 22px; }

/* TABLES */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table-modern th {
    background: var(--light);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.table-modern td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.table-modern tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover { background: var(--light); }

/* BADGES */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #cffafe; color: #155e75; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* BUTTONS */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}
.btn-primary-m { background: var(--primary); color: white; }
.btn-primary-m:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.btn-success-m { background: var(--success); color: white; }
.btn-success-m:hover { background: #059669; }
.btn-warning-m { background: var(--warning); color: white; }
.btn-warning-m:hover { background: #d97706; }
.btn-danger-m  { background: var(--danger); color: white; }
.btn-danger-m:hover { background: #dc2626; }
.btn-ghost {
    background: white;
    color: var(--dark);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--light); }

/* LOGIN */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -200px; right: -100px;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    bottom: -150px; left: -100px;
}
.login-card {
    background: white;
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1;
}
.login-card h1 {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
}
.login-card p.sub {
    text-align: center;
    color: var(--gray);
    margin-bottom: 30px;
    font-size: 14px;
}
.form-control-modern {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--light);
}
.form-control-modern:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.form-label-m {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark);
}

/* QUEUE STATUS */
.queue-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.queue-number-big {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 10px 0;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.queue-progress {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    height: 10px;
    margin: 20px 0;
    overflow: hidden;
}
.queue-progress-bar {
    background: white;
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease;
}
.queue-stat-box {
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(10px);
}
.queue-stat-box .lbl { font-size: 12px; opacity: 0.85; margin-bottom: 6px; }
.queue-stat-box .val { font-size: 26px; font-weight: 800; }

/* DISPLAY BOARD */
.display-board {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: white;
    padding: 40px;
}
.display-board h1 {
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
}
.display-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}
.display-section {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
}
.display-section h2 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 20px;
    text-align: center;
}
.now-serving {
    font-size: 100px;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: 4px;
    margin: 20px 0;
}
.queue-list-display { list-style: none; padding: 0; }
.queue-list-display li {
    font-size: 28px;
    font-weight: 700;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
}
.queue-list-display li:last-child { border: none; }
.queue-list-display .name { font-size: 14px; color: #94a3b8; font-weight: 400; }

/* TOASTS */
.toast-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
}
.toast-modern {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s ease;
    min-width: 300px;
}
.toast-modern.success { border-left-color: var(--success); }
.toast-modern.error   { border-left-color: var(--danger); }
.toast-modern.warning { border-left-color: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* PRINT */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main { margin-left: 0 !important; }
    body { background: white; }
}

/* MOBILE */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .mobile-toggle { display: block; }
    .display-grid { grid-template-columns: 1fr; }
    .now-serving { font-size: 60px; }
    .content { padding: 16px; }
}