/**
 * TASLEEH HR System - Main Stylesheet
 * Modern, Professional, Responsive Design
 */

/* ===== CSS Variables ===== */
:root {
    --tasleeh-gold: #C9A961;
    --tasleeh-gold-light: #d4b978;
    --tasleeh-gold-dark: #b8944a;
    --tasleeh-bronze: #C49A6C;
    --tasleeh-bronze-light: #d4ae85;
    --tasleeh-bronze-dark: #a67d4f;
    --ink: #000000;
    --ink-light: #1a1a1a;
    --ink-lighter: #2d2d2d;
    --tasleeh-white: #ffffff;
    --bg-card: #ffffff;
    --bg-light: #f8f9fa;
    --bg-page: #f0f2f5;
    --border-color: #eaeaea;
    --border-dark: #d0d0d0;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -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);
    --shadow-gold: 0 4px 14px rgba(201, 169, 97, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-gold { color: var(--tasleeh-gold); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-lighter) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

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

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: var(--tasleeh-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-light) 100%);
    padding: 40px 30px;
    text-align: center;
}

.login-logo {
    max-width: 220px;
    margin-bottom: 20px;
}

.login-title {
    color: var(--tasleeh-white);
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-body {
    padding: 40px 30px;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-form .input-icon-wrapper {
    position: relative;
}

.login-form .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.login-form input:focus {
    outline: none;
    border-color: var(--tasleeh-gold);
    background: var(--tasleeh-white);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.1);
}

.login-form .btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--tasleeh-gold) 0%, var(--tasleeh-bronze) 100%);
    color: var(--tasleeh-white);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
}

.login-form .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
}

.login-form .btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    padding: 20px 30px 30px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-light) 100%);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo img {
    height: 45px;
    width: auto;
}

.sidebar-logo-text {
    color: var(--tasleeh-white);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.4;
}

.sidebar-logo-text span {
    color: var(--tasleeh-gold);
    display: block;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    padding: 0 24px;
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--tasleeh-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-item {
    display: block;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition-fast);
    position: relative;
    font-size: 0.9375rem;
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    color: var(--tasleeh-white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--tasleeh-gold);
    background: rgba(201, 169, 97, 0.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--tasleeh-gold), var(--tasleeh-bronze));
    border-radius: 0 4px 4px 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--tasleeh-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--tasleeh-gold), var(--tasleeh-bronze));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tasleeh-white);
    font-weight: 600;
    font-size: 1rem;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    color: var(--tasleeh-white);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: var(--tasleeh-gold);
    font-size: 0.75rem;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ===== Top Header ===== */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--tasleeh-white);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--text-dark);
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--bg-light);
}

.page-title-wrapper h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.page-title-wrapper .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.breadcrumb a:hover {
    color: var(--tasleeh-gold);
}

.breadcrumb .separator {
    color: var(--border-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-search {
    position: relative;
}

.header-search input {
    width: 280px;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    background: var(--bg-light);
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    border-color: var(--tasleeh-gold);
    background: var(--tasleeh-white);
    width: 320px;
}

.header-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-dark);
    font-size: 1.25rem;
    position: relative;
    transition: var(--transition-fast);
}

.header-btn:hover {
    background: var(--bg-light);
    color: var(--tasleeh-gold);
}

.header-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--tasleeh-white);
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Page Content ===== */
.page-content {
    padding: 30px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--tasleeh-gold);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

/* ===== Stats Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--tasleeh-gold), var(--tasleeh-bronze));
}

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

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

.stat-icon.gold {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(196, 154, 108, 0.15));
    color: var(--tasleeh-gold);
}

.stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--tasleeh-gold), var(--tasleeh-bronze));
    color: var(--tasleeh-white);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--tasleeh-gold);
    border: 2px solid var(--tasleeh-gold);
}

.btn-outline:hover {
    background: var(--tasleeh-gold);
    color: var(--tasleeh-white);
}

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

.btn-success:hover {
    background: #0ea572;
}

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

.btn-danger:hover {
    background: #dc3030;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-light);
    transition: var(--transition);
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--tasleeh-gold);
    background: var(--tasleeh-white);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.1);
}

.form-control:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.form-control.error {
    border-color: var(--danger);
}

.form-control.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

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

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' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 16px center;
    padding-right: 48px;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-radius: var(--radius) 0 0 var(--radius);
}

.input-group .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
}

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

/* ===== Tables ===== */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-light);
    white-space: nowrap;
}

.table td {
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(201, 169, 97, 0.05);
}

.table .actions {
    display: flex;
    gap: 8px;
}

.table .employee-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table .employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--tasleeh-gold), var(--tasleeh-bronze));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tasleeh-white);
    font-weight: 600;
    font-size: 0.875rem;
}

.table .employee-info {
    display: flex;
    flex-direction: column;
}

.table .employee-name {
    font-weight: 500;
}

.table .employee-id {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ===== Status Badge ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-gold {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(196, 154, 108, 0.15));
    color: var(--tasleeh-gold);
}

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

.pagination-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
    background: var(--tasleeh-white);
    color: var(--text-dark);
}

.pagination-btn:hover {
    border-color: var(--tasleeh-gold);
    color: var(--tasleeh-gold);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--tasleeh-gold), var(--tasleeh-bronze));
    border-color: transparent;
    color: var(--tasleeh-white);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--tasleeh-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1100px;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-light);
}

/* ===== Alerts ===== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 0.9375rem;
}

.alert-success {
    background: var(--success-light);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: var(--danger-light);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: var(--info-light);
    border: 1px solid var(--info);
    color: var(--info);
}

/* ===== Dropdown ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--tasleeh-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--tasleeh-gold);
}

.dropdown-item i {
    width: 20px;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 14px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: var(--transition-fast);
}

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

.tab-btn.active {
    color: var(--tasleeh-gold);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--tasleeh-gold), var(--tasleeh-bronze));
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ===== File Upload ===== */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--tasleeh-gold);
    background: rgba(201, 169, 97, 0.05);
}

.file-upload.dragover {
    border-color: var(--tasleeh-gold);
    background: rgba(201, 169, 97, 0.1);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--tasleeh-gold);
    margin-bottom: 16px;
}

.file-upload-text {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.file-upload input[type="file"] {
    display: none;
}

/* ===== Progress Bar ===== */
.progress {
    height: 8px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tasleeh-gold), var(--tasleeh-bronze));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

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

.empty-state-icon {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ===== Loading ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--tasleeh-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--tasleeh-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9375rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.toast-close {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.toast-close:hover {
    color: var(--text-dark);
}

.toast-success .toast-icon { color: var(--success); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-danger .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--info); }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .header-search {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .top-header {
        padding: 12px 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .table th,
    .table td {
        padding: 12px;
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 10px 16px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .login-card {
        border-radius: var(--radius-lg);
    }
    
    .login-header,
    .login-body {
        padding: 30px 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .toast {
        min-width: auto;
        margin: 0 12px;
    }
}

/* ===== Overlay for Mobile ===== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== Print Styles ===== */
@media print {
    .sidebar,
    .top-header,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .page-content {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}
