/* Enterprise UI CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Prompt:wght@300;400;500;600&display=swap');

:root {
    /* Enterprise Color Palette */
    --color-primary: #8bc349;
    /* Custom Brand Green */
    --color-primary-hover: #7baf3a;
    --brand-secondary: #016630;
    --color-secondary: #e0e0e0;
    --color-secondary-hover: #d5d5d5;

    --color-success: #198038;
    --color-warning: #f1c21b;
    --color-danger: #da1e28;

    --color-bg: #f4f4f4;
    /* Clean light gray background */
    --color-surface: #ffffff;
    --color-border: #e0e0e0;

    --text-primary: #161616;
    --text-secondary: #525252;
    --text-inverse: #ffffff;

    --border-radius: 4px;
    /* Sharper corners for enterprise feel */
    --font-family: 'Prompt', 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: 0.2s ease;
}

.app-version {
    position: fixed;
    bottom: 0.5rem;
    left: 0.75rem;
    font-size: 0.65rem;
    color: rgba(0, 0, 0, 0.15);
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Clean Login UI --- */
.clean-login-wrapper {
    box-shadow: none !important;
    border: none !important;
    max-width: 640px;
    margin: 4rem auto;
    background: transparent !important;
    padding: 0 1rem;
}

.clean-login-logo {
    text-align: center;
    margin-bottom: 3rem;
}

.clean-login-logo img {
    max-height: 100px;
    object-fit: contain;
}

.clean-login-title {
    text-align: center;
    margin-bottom: 2rem;
}

.clean-login-title h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.clean-login-actions {
    text-align: center;
}

.clean-login-input-group {
    max-width: 500px;
    margin: 0 auto 1rem auto;
}

.clean-login-input {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.clean-login-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(106, 27, 49, 0.1);
}

.clean-login-btn {
    background-color: var(--brand-secondary) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    padding: 0.6rem 2rem !important;
    border-radius: var(--border-radius);
    border: none !important;
    cursor: pointer;
    font-size: 1.1rem !important;
    box-shadow: 0 4px 6px rgba(1, 102, 48, 0.2) !important;
    transition: var(--transition);
}

.clean-login-btn:hover {
    background-color: #014c24 !important;
}

.clean-login-contact {
    margin-top: 3rem;
    font-size: 0.95rem;
}

.clean-login-contact p {
    margin-bottom: 0.5rem;
    white-space: nowrap; /* Prevent falling to next line */
    color: var(--text-secondary);
}

.clean-login-contact a {
    font-weight: 500;
}

.identity-toggle {
    display: flex;
    justify-content: center;
    background: #f0f0f4;
    padding: 4px;
    border-radius: 12px;
    margin: 0 auto 1.5rem auto;
    width: fit-content;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.toggle-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: var(--font-family);
}

.toggle-btn.active {
    background: white;
    color: var(--brand-secondary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-0.5px);
}

.toggle-btn:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.5);
}

.clean-login-admin {
    margin-top: 3rem;
    text-align: right;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: flex;
    gap: 0.2rem;
    background: rgba(240, 240, 244, 0.6);
    padding: 2px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    z-index: 1000;
}

.lang-btn {
    padding: 4px 10px;
    background: transparent;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: var(--font-family);
}

.lang-btn.active {
    background: white;
    color: var(--brand-secondary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
}

.clean-login-admin button {
    background: transparent !important;
    color: #ccc !important;
    border: none !important;
    font-size: 0.8rem !important;
}

.clean-login-admin button:hover {
    color: #999 !important;
}

@media (max-width: 768px) {
    .clean-login-wrapper {
        margin: 2rem auto;
    }

    .clean-login-logo {
        margin-bottom: 2rem;
    }

    .clean-login-logo img {
        max-height: 80px;
    }

    .clean-login-title {
        margin-bottom: 1.5rem;
    }

    .clean-login-title h2 {
        font-size: 1.2rem;
    }

    .clean-login-input {
        padding: 0.7rem;
        font-size: 1rem;
    }

    .clean-login-contact {
        margin-top: 3rem;
        font-size: 0.8rem;
    }

    .clean-login-contact p {
        margin-bottom: 0.5rem;
        white-space: nowrap; /* Keep them together even on mobile */
    }

    .clean-login-contact .phone-line {
        font-size: 0.75rem; /* Slightly smaller for the longest line */
    }

    .toggle-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* Typography Tools */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.text-sm {
    font-size: 0.85rem;
}

/* Layout & Containers */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#pages-container {
    flex: 1;
    padding: 2rem;
    max-width: 98%;
    margin: 0 auto;
    width: 100%;
    padding-top: 5rem;
}

/* Surface & Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Navigation - Clean & Minimal */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-brand i {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.nav-user {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    pointer-events: none;
    white-space: nowrap;
}

.nav-user * {
    pointer-events: auto;
}

.logout-container {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.badge-role {
    background: var(--color-primary);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
}

.btn.primary {
    background: var(--color-primary);
    color: white;
}

.btn.primary:hover {
    background: var(--color-primary-hover);
}

.btn.secondary {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--text-primary);
}

.btn.secondary:hover {
    background: var(--color-secondary);
}

.btn.success {
    background: var(--color-success);
    color: white;
}

.btn.danger {
    background: var(--color-danger);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--text-primary);
}

.full-width {
    width: 100%;
}

.action-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Page Control */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(139, 195, 73, 0.2);
}

.form-group select {
    width: 100%;
    padding: 0.6rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
    background-color: var(--color-surface);
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.file-upload-wrapper {
    position: relative;
    border: 1px dashed var(--color-border);
    border-radius: var(--border-radius);
    text-align: center;
    background: #fafafa;
    transition: var(--transition);
}

.file-upload-wrapper:hover {
    border-color: var(--color-primary);
    background: #f4f8ff;
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-display {
    padding: 1.5rem;
    pointer-events: none;
}

.file-upload-display i {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.zone-queue-info {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
    border: 1.5px solid #c5e1a5;
    border-radius: 12px;
    color: #33691e;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDownIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 12px rgba(139, 195, 73, 0.08);
}

@keyframes slideDownIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseOrange {
    0% { box-shadow: 0 0 0 0 rgba(245, 124, 0, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(245, 124, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 124, 0, 0); }
}

.zone-queue-info i {
    font-size: 1.5rem;
    color: var(--color-primary);
}


/* Admin Tabs */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-tabs-header {
    display: none;
    cursor: pointer;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    background: transparent;
    padding: 0;
    transition: all 0.3s ease;
}

.tab-btn {
    padding: 0.75rem 1.2rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: #f1f8e9;
    color: var(--color-primary);
    box-shadow: none;
}

.badge {
    background: var(--color-danger);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 0.4rem;
    white-space: nowrap;
}

/* Queue order tools */
.queue-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #fafafa;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.queue-actions p {
    margin: 0;
}

.order-controls {
    display: inline-flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    width: 32px;
    background: var(--color-surface);
}

.order-btn {
    background: transparent;
    border: none;
    padding: 0.15rem 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.order-btn:first-child {
    border-bottom: 1px solid var(--color-border);
}

.order-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.order-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--color-bg);
}

/* Stats Admin Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 600;
    margin: 0;
    line-height: 1;
}

/* Tables Enterprise */
.action-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px; /* Prevents columns from squishing and messy wrapping */
    text-align: left;
    border: 1px solid var(--color-border);
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    vertical-align: middle;
    white-space: normal; /* Default allowed, specific overrides below */
}

/* Specific No-Wrap Columns */
.data-table td:nth-child(2), /* Phone */
.data-table td:nth-child(4), /* Zone */
.data-table td:nth-child(6), /* Date */
.data-table td:nth-child(7), /* Duration */
.data-table td:nth-child(8) { /* Status */
    white-space: nowrap !important;
}

.data-table th {
    white-space: nowrap;
}

.data-table th {
    background: #eef1f6;
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

.data-table tbody tr.selected-row {
    background-color: #e8f5e9 !important;
}

.data-table tbody tr.highlight-row td {
    background-color: #dcedc8 !important;
    /* Bright light green color for focus */
    transition: background-color 0.5s ease;
}



/* Collapsible Table Groups */
.zone-group-header {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.zone-group-header:hover {
    background: #eef3fb !important;
}

.zone-group-header .toggle-icon {
    transition: transform var(--transition);
    display: inline-block;
}

.zone-group.collapsed .zone-row {
    display: none;
}

.zone-group.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Status Labels & Badges */
.status-badge, .badge-role {
    padding: 0.3rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap !important; /* Force single line */
    flex-wrap: nowrap !important;
}

.badge-role {
    color: white;
    background: #525252;
}

.status-badge.pending {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

.status-badge.approved {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-badge.allocated {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-badge.rejected {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Status Card Details */
.status-card {
    text-align: center;
    padding: 3rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.status-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.status-icon.pending {
    color: #f57f17;
}

.status-icon.approved {
    color: #2e7d32;
}

.status-icon.allocated {
    color: #1565c0;
}

.status-icon.rejected {
    color: #c62828;
}

.status-details {
    padding: 1.5rem;
}

.status-details h4 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-weight: 600;
    text-align: left;
}

.detail-row {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    gap: 0.3rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 100%;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.detail-value {
    font-size: 0.95rem;
    color: #444;
}

/* Login */
#page-login .card {
    max-width: 400px;
    margin: 3rem auto;
    text-align: center;
    padding: 2.5rem 2rem;
}

.login-header i {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-box {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.25rem 1.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #fbfbfc;
}

.modal-footer .btn {
    min-width: 100px;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    #pages-container {
        padding: 1rem;
        padding-top: 5rem;
    }

    .navbar {
        padding: 0 0.5rem;
    }

    .nav-brand span {
        display: none; /* Hide text, keep icon */
    }

    .user-name {
        max-width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hide user name on small screens */
    .admin-tabs-container {
        width: 100%;
        margin-bottom: 1rem;
        position: relative;
    }

    .admin-tabs-header {
        display: flex;
        box-shadow: var(--shadow-sm);
        margin-bottom: 0.5rem;
    }

    .admin-tabs {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--color-surface);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        padding: 0.5rem;
        border-radius: 12px;
        border: 1px solid var(--color-border);
        display: none;
    }

    .admin-tabs.expanded {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }

    .tab-btn {
        width: 100%;
        text-align: left;
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 0.25rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        border-bottom: none;
        font-size: 1rem;
    }

    .tab-btn i {
        font-size: 1.4rem;
        width: 24px;
        text-align: center;
    }

    .tab-btn.active {
        background: #f1f8e9;
        color: var(--color-primary);
    }

    .admin-menu-chevron {
        transition: transform 0.3s ease;
    }

    .admin-tabs-container.expanded #admin-menu-chevron {
        transform: rotate(180deg);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .queue-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        width: 100%;
        margin-bottom: 0.2rem;
    }

    .card {
        padding: 1rem;
    }

    .status-card {
        padding: 2rem 1rem;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: white;
    color: #333;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid #ccc;
    min-width: 300px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.toast-error {
    border-left-color: #ff5252;
}

.toast.toast-error i {
    color: #ff5252;
}

.toast.toast-success {
    border-left-color: #4caf50;
}

.toast.toast-success i {
    color: #4caf50;
}

.toast.toast-warning {
    border-left-color: #ff9800;
}

.toast.toast-warning i {
    color: #ff9800;
}

.toast i {
    font-size: 1.4rem;
}

/* Custom Multi-Select */
.multi-select-dropdown {
    position: relative;
    min-width: 250px;
    font-family: var(--font-family);
    outline: none;
}

.multi-select-dropdown .selected-options {
    padding: 0.25rem 0.5rem;
    min-height: 38px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-surface);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.multi-select-dropdown.open .selected-options {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(139, 195, 73, 0.2);
}

.multi-select-dropdown .options-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    margin-top: 4px;
    padding: 0.5rem 0;
    max-height: 250px;
    overflow-y: auto;
    white-space: nowrap;
}

.multi-select-dropdown.open .options-container {
    display: block;
}

.multi-select-dropdown .option-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.multi-select-dropdown .option-item:hover {
    background: #f1f8e9;
}

/* Hide the native checkbox, use styling on label */
.multi-select-dropdown .option-item input[type="checkbox"] {
    display: none;
}

.multi-select-dropdown .option-item.selected {
    background: #e8f5e9;
    font-weight: 500;
    color: var(--color-primary);
}

/* Tag/Chip Styles */
.zone-chip {
    background: #eaeff5;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.zone-chip-remove {
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 1.1rem;
    margin-left: 2px;
}

.zone-chip-remove:hover {
    color: #d32f2f;
    background: rgba(0, 0, 0, 0.05);
}

#zone-filter-text {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-height: 24px;
}

/* --- Modern Admin Login UI --- */
.modern-login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modern-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease !important;
    font-family: inherit;
    color: #1e293b;
}

.modern-input:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(139, 195, 73, 0.15) !important;
}

.modern-btn-primary {
    flex: 2;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--color-primary), #76a83a) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(139, 195, 73, 0.3);
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 195, 73, 0.4);
    filter: brightness(1.1);
}

.modern-btn-secondary {
    flex: 1;
    padding: 0.85rem;
    background: white !important;
    color: #64748b !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-btn-secondary:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

.modern-form-group {
    margin-bottom: 0px !important;
    padding-bottom: 20px;
}

/* Action Dropdown Menu */
.action-menu {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid #edf2f7;
    z-index: 1000;
    min-width: 180px;
    padding: 6px;
    animation: fadeInScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.action-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: var(--font-family);
    font-weight: 500;
}

.action-menu-item:hover {
    background: #f7fafc;
    color: var(--color-primary);
}

.action-menu-item i {
    font-size: 1.2rem;
}

.action-menu-item.danger:hover {
    background: #fff5f5;
    color: #e53e3e;
}

.action-menu-divider {
    height: 1px;
    background: #edf2f7;
    margin: 4px 6px;
}
/* --- Action Loader CSS --- */
.action-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.3s ease;
}

.action-loader-overlay.show {
    display: flex;
}

.action-spinner {
    width: 54px;
    height: 54px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px rgba(139, 195, 73, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.action-loader-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    font-family: var(--font-family);
    text-align: center;
}
@keyframes highlightFade {
    0% { background-color: rgba(139, 195, 73, 0.4); box-shadow: inset 0 0 10px rgba(139, 195, 73, 0.2); }
    100% { background-color: transparent; }
}

.row-highlight {
    animation: highlightFade 4s ease forwards !important;
}

@keyframes modalPop { 0% { opacity: 0; transform: scale(0.9) translateY(20px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
