/* =====================================================
   نظام إدارة العمال - الإمارات العربية المتحدة
   Main Stylesheet
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    --primary: #1a56db;
    --primary-dark: #1e429f;
    --primary-light: #dbeafe;
    --secondary: #0e9f6e;
    --secondary-light: #d1fae5;
    --danger: #e02424;
    --danger-light: #fee2e2;
    --warning: #faca15;
    --warning-light: #fef3c7;
    --info: #3f83f8;
    --info-light: #dbeafe;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --orange: #ea580c;
    --orange-light: #ffedd5;
    --dark: #111827;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --light: #f3f4f6;
    --lighter: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 10px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f1f5f9;
    direction: rtl;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a56db 0%, #0e9f6e 50%, #059669 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    text-align: center;
    animation: slideUp 0.6s ease;
}

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

.login-logo {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    color: var(--white);
    font-size: 36px;
    box-shadow: var(--shadow-lg);
}

.login-card h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; color: var(--dark); }
.login-card .subtitle { color: var(--gray); font-size: 15px; margin-bottom: 32px; }

.form-group { margin-bottom: 20px; text-align: right; }
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
    background: var(--white);
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26,86,219,0.1);
}

.form-control::placeholder { color: var(--gray-light); }

select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 40px; }

textarea.form-control { min-height: 100px; resize: vertical; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.5;
}

.btn-block { width: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(26,86,219,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,86,219,0.4); }

.btn-success {
    background: linear-gradient(135deg, var(--secondary), #0d8a5f);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(14,159,110,0.3);
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(14,159,110,0.4); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c81e1e);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(224,36,36,0.3);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(224,36,36,0.4); }

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: var(--white);
}

.btn-info {
    background: linear-gradient(135deg, var(--info), #1e40af);
    color: var(--white);
}

.btn-outline {
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--dark);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* =====================================================
   LAYOUT
   ===================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0; top: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-logo {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 24px;
    flex-shrink: 0;
}

.sidebar-brand h2 { font-size: 18px; font-weight: 800; line-height: 1.2; }
.sidebar-brand span { font-size: 12px; color: var(--gray); }

.nav-menu { padding: 16px 12px; flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    color: var(--gray);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.nav-item:hover { background: var(--lighter); color: var(--dark); }

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.nav-item .nav-icon { font-size: 20px; width: 28px; text-align: center; }

.nav-badge {
    margin-right: auto;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.nav-item.active .nav-badge { background: var(--white); color: var(--primary); }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-details h4 { font-size: 14px; font-weight: 700; }
.user-details p { font-size: 12px; color: var(--gray); }

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 28px 32px;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title { font-size: 26px; font-weight: 800; color: var(--dark); }

.top-bar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Search Box */
.search-box {
    position: relative;
    width: 280px;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--gray-light);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26,86,219,0.1);
}

/* Notification Button */
.notif-btn {
    position: relative;
    width: 44px; height: 44px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.notif-btn:hover { background: var(--lighter); border-color: var(--primary); }

.notif-count {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* =====================================================
   STATS CARDS
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before { opacity: 1; }

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--secondary-light); color: var(--secondary); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.yellow { background: var(--warning-light); color: #d97706; }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }

.stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--dark);
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    font-weight: 600;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
}

.stat-trend.up { color: var(--secondary); }
.stat-trend.down { color: var(--danger); }

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title { font-size: 18px; font-weight: 700; color: var(--dark); }

/* =====================================================
   TABLES
   ===================================================== */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table th {
    text-align: right;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

.data-table tr:hover { background: var(--lighter); }

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

/* Status Badges */
.status-badge {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    white-space: nowrap;
}

.status-active { background: var(--secondary-light); color: #065f46; }
.status-pending { background: var(--warning-light); color: #92400e; }
.status-danger { background: var(--danger-light); color: #991b1b; }
.status-info { background: var(--info-light); color: #1e40af; }
.status-expired { background: #f3f4f6; color: var(--gray); }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* Action Buttons */
.action-btns { display: flex; gap: 6px; }

.action-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    color: var(--gray);
}

.action-btn:hover { background: var(--lighter); }
.action-btn.edit:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.action-btn.delete:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }
.action-btn.view:hover { border-color: var(--secondary); color: var(--secondary); background: var(--secondary-light); }

/* =====================================================
   FILTERS & TABS
   ===================================================== */
.filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--white);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray);
}

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

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tabs {
    display: flex;
    gap: 4px;
    background: var(--light);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    width: fit-content;
}

.tab {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray);
}

.tab:hover { color: var(--dark); }

.tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* =====================================================
   MODALS
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

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

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

.modal-lg { max-width: 1000px; }
.modal-sm { max-width: 500px; }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title { font-size: 20px; font-weight: 800; }

.modal-close {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--light);
    cursor: pointer;
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    color: var(--gray);
}

.modal-close:hover { background: var(--border); color: var(--dark); }

.modal-body { padding: 32px; }

.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    position: sticky;
    bottom: 0;
    background: var(--white);
    z-index: 10;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group.full-width { grid-column: 1 / -1; }

/* =====================================================
   STEPS TIMELINE
   ===================================================== */
.steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 24px 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 19px;
    top: 48px;
    width: 2px;
    height: calc(100% - 32px);
    background: var(--border);
}

.step-dot {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
    font-weight: 700;
}

.step-dot.completed { background: var(--secondary); color: var(--white); }
.step-dot.pending { background: var(--warning); color: #92400e; }
.step-dot.waiting { background: var(--border); color: var(--gray); }
.step-dot.skipped { background: #f3f4f6; color: var(--gray-light); text-decoration: line-through; }

.step-content { flex: 1; padding-top: 2px; }
.step-content h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.step-content p { font-size: 13px; color: var(--gray); }
.step-date { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 4px; }

/* =====================================================
   NOTIFICATIONS PANEL
   ===================================================== */
.notif-panel {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 380px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notif-panel.active { transform: translateX(0); }

.notif-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-header h3 { font-size: 18px; font-weight: 800; }

.notif-list { flex: 1; overflow-y: auto; padding: 16px; }

.notif-item {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    border-right: 4px solid var(--primary);
    background: var(--lighter);
    transition: var(--transition);
    cursor: pointer;
}

.notif-item:hover { background: #f1f5f9; }
.notif-item.danger { border-right-color: var(--danger); }
.notif-item.warning { border-right-color: var(--warning); }
.notif-item.success { border-right-color: var(--secondary); }
.notif-item.info { border-right-color: var(--info); }

.notif-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.notif-item p { font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.notif-time { font-size: 12px; color: var(--gray-light); }

/* =====================================================
   TOASTS
   ===================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-xl);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: all;
    min-width: 300px;
}

.toast.success { background: var(--secondary); }
.toast.error { background: var(--danger); }
.toast.warning { background: #d97706; }
.toast.info { background: var(--primary); }

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

/* =====================================================
   QUICK ACTIONS
   ===================================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.quick-action {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--dark);
}

.quick-action:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.qa-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
}

.quick-action h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.quick-action p { font-size: 13px; color: var(--gray); }

/* =====================================================
   ALERT BANNERS
   ===================================================== */
.alert-banner {
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-banner.warning {
    background: linear-gradient(135deg, var(--warning-light), #fde68a);
    border: 1px solid #f59e0b;
}

.alert-banner.danger {
    background: linear-gradient(135deg, var(--danger-light), #fecaca);
    border: 1px solid var(--danger);
}

.alert-banner.info {
    background: linear-gradient(135deg, var(--info-light), #bfdbfe);
    border: 1px solid var(--info);
}

.alert-banner .banner-icon { font-size: 32px; }
.alert-banner h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.alert-banner p { font-size: 14px; }

/* =====================================================
   WORKER DETAIL
   ===================================================== */
.worker-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.worker-avatar-lg {
    width: 80px; height: 80px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 32px;
    font-weight: 800;
    flex-shrink: 0;
}

.worker-detail-info h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.worker-detail-info p { color: var(--gray); font-size: 15px; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.detail-item {
    background: var(--lighter);
    border-radius: var(--radius);
    padding: 16px;
}

.detail-item label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.detail-item span {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

/* =====================================================
   ACTIVITY LOG
   ===================================================== */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-avatar {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content { flex: 1; }
.activity-content h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.activity-content p { font-size: 13px; color: var(--gray); margin-bottom: 4px; }
.activity-time { font-size: 12px; color: var(--gray-light); }

/* =====================================================
   SETTINGS
   ===================================================== */
.settings-group { margin-bottom: 32px; }

.settings-group h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}

.toggle-track {
    width: 48px;
    height: 26px;
    background: var(--border);
    border-radius: var(--radius-full);
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-track.active { background: var(--secondary); }

.toggle-thumb {
    width: 22px; height: 22px;
    background: var(--white);
    border-radius: var(--radius-full);
    position: absolute;
    top: 2px; right: 2px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-track.active .toggle-thumb { right: 24px; }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--gray); font-size: 14px; }

/* =====================================================
   PROGRESS
   ===================================================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-fill.green { background: var(--secondary); }
.progress-fill.yellow { background: var(--warning); }
.progress-fill.red { background: var(--danger); }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-btn {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark);
    text-decoration: none;
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =====================================================
   MOBILE MENU
   ===================================================== */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px; right: 20px;
    z-index: 150;
    width: 48px; height: 48px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 20px;
    box-shadow: var(--shadow);
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
}

.sidebar-overlay.active { display: block; }

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeIn 0.4s ease forwards; }

/* Loading Spinner */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-right: 0; padding: 20px; }
    .mobile-toggle { display: flex; }
    .form-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .login-card { padding: 32px 24px; margin: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .top-bar { flex-direction: column; align-items: flex-start; }
    .search-box { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .modal { margin: 10px; }
    .notif-panel { width: 100%; }
    .quick-actions { grid-template-columns: 1fr; }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .sidebar, .top-bar, .mobile-toggle, .action-btns, .btn {
        display: none !important;
    }
    .main-content { margin-right: 0; padding: 0; }
    .card { box-shadow: none; border: 1px solid #000; }
}

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }
