/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary: #0B6E99;
    --primary-dark: #085578;
    --primary-light: #0E8FBE;
    --accent: #14B8A6;
    --bg: #F0F5F8;
    --sidebar: #0B1C28;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: #0B6E99;
    --card: #FFFFFF;
    --text: #1A1A1A;
    --text-muted: #6B6B6B;
    --text-sidebar: rgba(255, 255, 255, 0.7);
    --text-sidebar-hover: #FFFFFF;
    --border: #E5E1DC;
    --success: #2D6A4F;
    --warning: #B45309;
    --danger: #B91C1C;
    --info: #1D4ED8;
    --purple: #7C3AED;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   SIDEBAR - MODERN DESIGN
   ============================================ */
.sidebar {
    width: 280px;
    background: var(--sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sidebar Scrollbar - Custom & Beautiful */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.3s;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
}

.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.brand-text span {
    font-size: .7rem;
    opacity: 0.6;
    display: block;
}

/* Sidebar Close Button (mobile) */
.sidebar-close {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sidebar-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Business Switcher */
.biz-switch {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.biz-switch select {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.biz-switch select:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.biz-switch select:focus {
    outline: none;
    border-color: var(--primary-light);
}

.biz-switch select option {
    color: #111;
    background: #fff;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 8px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

/* Nav Links */
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    text-decoration: none;
    font-weight: 500;
    font-size: .88rem;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--text-sidebar-hover);
}

.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 2px 12px rgba(11, 110, 153, 0.3);
}

.sidebar-nav .nav-link .nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-link .nav-text {
    flex: 1;
}

.sidebar-nav .nav-link .nav-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
}

/* Nav Divider */
.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 12px 8px;
}

/* Nav Section */
.nav-section {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.4;
    padding: 12px 14px 4px;
    font-weight: 700;
    color: #fff;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

.user-name {
    font-size: .85rem;
    font-weight: 600;
    color: #fff;
}

.sidebar-copy {
    font-size: .7rem;
    opacity: 0.35;
    text-align: center;
}

/* ============================================
   SIDEBAR RESPONSIVE
   ============================================ */
.overlay-sidebar {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-sidebar.open {
    display: block;
    opacity: 1;
}

/* Desktop: sidebar visible */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0) !important;
    }
    .sidebar-close {
        display: none !important;
    }
    .overlay-sidebar {
        display: none !important;
    }
    .menu-btn {
        display: none !important;
    }
}

/* Mobile: sidebar hidden by default */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
        box-shadow: var(--shadow-lg);
        border-left: none;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex !important;
    }

    .overlay-sidebar.open {
        display: block;
        opacity: 1;
    }

    .menu-btn {
        display: flex !important;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* RTL Support */
html[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

html[dir="rtl"] .sidebar.open {
    transform: translateX(0);
}

html[dir="rtl"] .main {
    margin-right: 280px;
    margin-left: 0;
}

html[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

html[dir="ltr"] .sidebar.open {
    transform: translateX(0);
}

html[dir="ltr"] .main {
    margin-right: 0;
    margin-left: 280px;
}

@media (max-width: 768px) {
    html[dir="ltr"] .main,
    html[dir="rtl"] .main {
        margin: 0 !important;
    }
}

/* ============================================
   MENU BUTTON - Modern Design
   ============================================ */
.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s, transform 0.2s;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.menu-btn:active {
    transform: scale(0.92);
}

.menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    background: var(--card);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 64px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 110, 153, 0.1);
}

.search-icon {
    opacity: 0.4;
    font-size: .9rem;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: .85rem;
    color: var(--text);
    min-width: 160px;
}

.search-box input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ============================================
   STAFF BAR
   ============================================ */
.staff-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    flex-wrap: wrap;
}

.staff-name {
    font-weight: 600;
}

.role-badge {
    background: rgba(139, 26, 43, 0.12);
    color: var(--primary);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 700;
}

.logout-btn {
    font-size: .75rem;
    padding: 4px 12px;
}

/* ============================================
   LANGUAGE BUTTON
   ============================================ */
.lang-btn {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-family: inherit;
    font-weight: 700;
    font-size: .78rem;
    cursor: pointer;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: .88rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 110, 153, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: .8rem;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    color: #fff;
}

.btn-info {
    background: var(--info);
    color: #fff;
}

.btn-purple {
    background: var(--purple);
    color: #fff;
}

/* ============================================
   CONTENT
   ============================================ */
.content {
    padding: 28px;
    flex: 1;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.red { background: rgba(139, 26, 43, 0.1); }
.stat-icon.gold { background: rgba(201, 162, 39, 0.15); }
.stat-icon.green { background: rgba(45, 106, 79, 0.12); }
.stat-icon.blue { background: rgba(29, 78, 216, 0.1); }
.stat-icon.purple { background: rgba(124, 58, 237, 0.1); }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.stat-info p {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   PANEL / CARD
   ============================================ */
.panel {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.panel-body {
    padding: 0;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

thead {
    background: var(--bg);
}

th {
    padding: 10px 14px;
    text-align: right;
    font-weight: 700;
    color: var(--text-muted);
    font-size: .78rem;
    white-space: nowrap;
}

td {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(139, 26, 43, 0.02);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending {
    background: rgba(180, 83, 9, 0.12);
    color: var(--warning);
}
.badge-processing {
    background: rgba(29, 78, 216, 0.1);
    color: var(--info);
}
.badge-done {
    background: rgba(45, 106, 79, 0.12);
    color: var(--success);
}
.badge-cancelled {
    background: rgba(185, 28, 28, 0.1);
    color: var(--danger);
}
.badge-available {
    background: rgba(45, 106, 79, 0.12);
    color: var(--success);
}
.badge-assigned {
    background: rgba(29, 78, 216, 0.1);
    color: var(--info);
}
.badge-reserved {
    background: rgba(180, 83, 9, 0.12);
    color: var(--warning);
}
.badge-returned {
    background: rgba(124, 58, 237, 0.12);
    color: var(--purple);
}
.badge-departed {
    background: rgba(180, 83, 9, 0.12);
    color: var(--warning);
}
.badge-guarantee {
    background: rgba(22, 163, 74, 0.12);
    color: #16A34A;
}
.badge-expired {
    background: rgba(120, 113, 108, 0.15);
    color: #57534E;
}

/* ============================================
   ACTIONS
   ============================================ */
.actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.actions button {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    cursor: pointer;
    font-size: .85rem;
    transition: all 0.15s;
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.actions button:hover {
    border-color: var(--primary);
    background: rgba(139, 26, 43, 0.05);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.4;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    width: 100%;
    max-width: 120px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #52B788);
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-text {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================
   FILTERS
   ============================================ */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    align-items: center;
}

.filters select,
.filters input {
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .85rem;
    background: var(--card);
    color: var(--text);
    min-width: 140px;
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--sidebar);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 360px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-success {
    background: rgba(45, 106, 79, 0.12);
    border: 1px solid rgba(45, 106, 79, 0.2);
    color: var(--success);
}

.alert-danger {
    background: rgba(185, 28, 28, 0.12);
    border: 1px solid rgba(185, 28, 28, 0.2);
    color: var(--danger);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.25s ease;
}

.modal.modal-lg { max-width: 740px; }
.modal.modal-xl { max-width: 900px; }

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 1;
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    position: sticky;
    bottom: 0;
    background: var(--card);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .9rem;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }

    .main {
        margin: 0 !important;
    }

    .topbar {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .topbar-left {
        flex: 1;
    }

    .topbar h2 {
        font-size: 1rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .search-box {
        flex: 1;
        min-width: 100px;
    }

    .search-box input {
        min-width: 80px;
        width: 100%;
    }

    .content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-info h3 {
        font-size: 1.2rem;
    }

    .dash-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .filters select,
    .filters input {
        min-width: 100%;
        width: 100%;
    }

    .filters .btn {
        width: 100%;
        justify-content: center;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .staff-name {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .sidebar {
        width: 260px;
    }

    .topbar {
        padding: 8px 12px;
    }

    .topbar h2 {
        font-size: .9rem;
    }

    .content {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stat-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .stat-info h3 {
        font-size: 1rem;
    }

    .stat-info p {
        font-size: .68rem;
    }

    .staff-bar .role-badge {
        font-size: .6rem;
        padding: 2px 8px;
    }

    .logout-btn {
        font-size: .65rem;
        padding: 3px 8px;
    }

    .lang-btn {
        font-size: .7rem;
        padding: 4px 8px;
    }

    .menu-btn svg {
        width: 20px;
        height: 20px;
    }

    .search-box {
        padding: 4px 10px;
    }

    .search-box input {
        font-size: .78rem;
    }

    .table-wrap table {
        font-size: .72rem;
        min-width: 500px;
    }

    th, td {
        padding: 6px 8px;
    }

    .badge {
        font-size: .6rem;
        padding: 2px 6px;
    }

    .actions button {
        font-size: .7rem;
        padding: 3px 6px;
        min-width: 24px;
        min-height: 24px;
    }

    .dash-hero {
        padding: 14px 16px;
        flex-direction: column;
        text-align: center;
    }

    .dash-hero-actions {
        width: 100%;
        justify-content: center;
    }

    .dash-hero-actions .btn-sm {
        font-size: .72rem;
        padding: 6px 12px;
    }
}

/* ============================================
   DASHBOARD HERO
   ============================================ */
.dash-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(135deg, #0B1C28 0%, #0B6E99 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.dash-hero-text h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.dash-hero-text p {
    font-size: .85rem;
    opacity: 0.85;
}

.dash-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dash-hero-actions .btn-outline {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.dash-hero-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: #fff;
}

.dash-hero-actions .btn-primary {
    background: #fff;
    color: #0B6E99;
}

.dash-hero-actions .btn-primary:hover {
    background: #e0f2fe;
    color: #085578;
}

/* ============================================
   CLEANING STATS
   ============================================ */
.cleaning-stats {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 28px;
}

.cleaning-card {
    border-color: rgba(14, 116, 144, 0.25);
}

.cleaning-icon {
    background: rgba(14, 116, 144, 0.12);
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ============================================
   INFO BOX
   ============================================ */
.info-box {
    background: rgba(29, 78, 216, 0.06);
    border: 1px solid rgba(29, 78, 216, 0.15);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: .85rem;
    line-height: 1.7;
    margin-bottom: 14px;
}

.info-box.warn {
    background: rgba(180, 83, 9, 0.08);
    border-color: rgba(180, 83, 9, 0.2);
}

.info-box.success {
    background: rgba(45, 106, 79, 0.06);
    border-color: rgba(45, 106, 79, 0.15);
}

.info-box.purple {
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.15);
}

/* ============================================
   BIZ TAGS
   ============================================ */
.biz-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
}

.biz-tag.skymonda {
    background: rgba(139, 26, 43, 0.12);
    color: #0B6E99;
}

.biz-tag.taj {
    background: rgba(14, 116, 144, 0.12);
    color: #0e7490;
}

/* ============================================
   WORKFLOW (Dossier)
   ============================================ */
.dossier {
    font-size: .88rem;
}

.dossier-top {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.dossier-photo {
    width: 90px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #f0f0f0;
}

.dossier-photo-ph {
    width: 90px;
    height: 110px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: .75rem;
}

.dossier-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px 16px;
}

.dossier-meta .dm label {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
}

.dossier-meta .dm span {
    font-weight: 700;
    font-size: .9rem;
}

.dossier-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}

.dossier-status.st-approval { background: #1D4ED8; }
.dossier-status.st-visa,
.dossier-status.st-embassy,
.dossier-status.st-shipping { background: #0369A1; }
.dossier-status.st-ticket,
.dossier-status.st-arrival { background: #C2410C; }
.dossier-status.st-receiving,
.dossier-status.st-guarantee { background: #15803D; }
.dossier-status.st-quittance,
.dossier-status.st-archive { background: #92400E; }
.dossier-status.st-completed { background: #166534; }
.dossier-status.st-cancelled { background: #B91C1C; }

.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.dossier-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dossier-card .dc-head {
    padding: 8px 12px;
    font-weight: 700;
    font-size: .82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.dossier-card .dc-body {
    padding: 10px 12px;
    background: var(--card);
    font-size: .84rem;
    line-height: 1.7;
}

.dossier-card .dc-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 2px 0;
}

.dossier-card .dc-row .lbl {
    color: var(--text-muted);
    font-weight: 600;
}

.dossier-card .dc-row .val {
    font-weight: 700;
    text-align: left;
    direction: ltr;
}

.dc-head.h-sponsor { background: #475569; }
.dc-head.h-finance { background: #0F766E; }
.dc-head.h-approval { background: #1D4ED8; }
.dc-head.h-visa { background: #0369A1; }
.dc-head.h-embassy { background: #0E7490; }
.dc-head.h-shipping { background: #4338CA; }
.dc-head.h-ticket { background: #B45309; }
.dc-head.h-arrival { background: #C2410C; }
.dc-head.h-receiving { background: #15803D; }
.dc-head.h-guarantee { background: #166534; }
.dc-head.h-quittance { background: #92400E; }
.dc-head.h-archive { background: #57534E; }
.dc-head.h-return { background: #7C3AED; }

.dossier-stages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dossier-stage {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.dossier-stage:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.dossier-stage .ds-head {
    padding: 8px 12px;
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.dossier-stage .ds-body {
    padding: 10px 12px;
    font-size: .84rem;
    background: #fafafa;
    display: none;
}

.dossier-stage.open .ds-body { display: block; }
.dossier-stage.done .ds-body { display: block; }
.dossier-stage.current {
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.35);
}

.ds-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    flex-shrink: 0;
}

.dossier-stage.done .ds-check {
    background: #fff;
    color: #166534;
    font-weight: 800;
}

/* ============================================
   STAGE DATA
   ============================================ */
.stage-data {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 8px;
    font-size: .84rem;
    line-height: 1.8;
}

.stage-data .sd-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stage-data .sd-label {
    color: var(--text-muted);
    font-weight: 600;
}

/* ============================================
   FINANCE TABLE
   ============================================ */
.fin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    margin-top: 6px;
}

.fin-table th,
.fin-table td {
    border: 1px solid var(--border);
    padding: 4px 8px;
    text-align: center;
}

.fin-table th {
    background: rgba(15, 118, 110, 0.1);
    font-weight: 700;
}

/* ============================================
   HISTORY ITEMS
   ============================================ */
.history-item {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: .85rem;
}

.history-item .h-title {
    font-weight: 700;
}

.history-item .h-meta {
    color: var(--text-muted);
    font-size: .78rem;
    margin-top: 2px;
}

/* ============================================
   FILE PREVIEW
   ============================================ */
.file-preview {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-preview img {
    max-width: 200px;
    max-height: 140px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.file-preview .file-name {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   PERMISSIONS GRID
   ============================================ */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: .85rem;
}

.perm-item input {
    width: auto;
}

/* ============================================
   MESSAGE BUBBLE
   ============================================ */
.msg-bubble {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.msg-bubble .msg-meta {
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.msg-bubble .msg-body {
    font-size: .9rem;
}

.msg-bubble.alert-black {
    border-color: #b91c1c;
    background: #fef2f2;
}

/* ============================================
   ROW ARCHIVED
   ============================================ */
.row-archived {
    background: #f0fdf4 !important;
}

.row-minimized td {
    padding: 6px 10px !important;
    font-size: .85rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-purple { color: var(--purple); }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }