:root {
    --primary: #1D4ED8;
    --primary-dark: #1E3A8A;
    --secondary: #2563EB;
    --accent: #0369A1;
    --success: #047857;
    --warning: #B45309;
    --danger: #DC2626;
    --surface: #F8FAFC;
    --surface-2: #FFFFFF;
    --surface-3: #E2E8F0;
    --border: #CBD5E1;
    --text: #020617;
    --text-muted: #334155;
    --glass: rgba(255, 255, 255, 0.85);
    --glow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--surface);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--glow);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
    -webkit-text-fill-color: initial;
    display: block;
    margin-top: -2px;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.825rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(99, 102, 241, 0.15);
}

.main-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--primary);
}

.btn:active {
    transform: scale(0.97);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-waiting {
    background: rgba(100, 116, 139, 0.3);
    color: #94A3B8;
}

.badge-calling {
    background: rgba(245, 158, 11, 0.2);
    color: #FCD34D;
    animation: pulse-badge 1.5s infinite;
}

.badge-serving {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.badge-done {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.badge-skip {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

@keyframes pulse-badge {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.925rem;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
}

.footer {
    margin-top: auto;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    width: 100%;
}

.footer p {
    margin: 0;
    color: var(--text-muted);
}

.footer .footer-brand {
    font-weight: 700;
    color: var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 3px solid var(--success);
}

.toast-warning {
    border-left: 3px solid var(--warning);
}

.toast-error {
    border-left: 3px solid var(--danger);
}

.toast-info {
    border-left: 3px solid var(--primary);
}

/* Pulse */
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* WS indicator */
.ws-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ws-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background 0.3s;
}

.ws-dot.connected {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

.ws-dot.error {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 99px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
    align-items: center;
    justify-content: center;
}

.nav-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.875rem 1rem;
        position: relative;
    }

    .main-content {
        padding: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface-2);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        z-index: 99;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.2s ease-out;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin Dashboard UI Enhancements */
.mini-stat::after {
    content: '';
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 5rem;
    opacity: 0.05;
    transform: rotate(-10deg);
    pointer-events: none;
}
.ms-total::after {
    content: '\f0c9'; /* fa-bars */
}
.ms-pending::after {
    content: '\f0f6'; /* fa-file-alt */
}
.ms-admin::after {
    content: '\f013'; /* fa-cog */
}
.ms-done::after {
    content: '\f058'; /* fa-check-circle */
}

/* User profile card in sidebar */
.profile-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: var(--glow);
}

.profile-info h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.profile-info p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0 0;
}

/* Custom search style */
.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-wrapper i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.25rem !important;
    background: #F1F5F9;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Hide Default DataTable Search */
.dataTables_filter {
    display: none !important;
}

/* WhatsApp pill styling */
.wa-badge {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    color: #047857 !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.75rem !important;
    border-radius: 99px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.wa-badge:hover {
    background: #10B981 !important;
    color: white !important;
    border-color: #10B981 !important;
    transform: translateY(-1px);
}

