/* ============================================================
   Dimas HR — site.css v2.0
   Dark Sidebar Modern Admin Theme (Vuexy/Metronic Style)
   RTL Arabic — No CDN — All Local
   ============================================================ */

/* ── Google Fonts (Noto Sans Arabic) ─────────────────────── */
/* ملاحظة: لو مفيش انترنت، هيرجع Tahoma تلقائيًا */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
    /* Primary Brand */
    --brand-primary:     #1b3a6b;
    --brand-primary-rgb: 27, 58, 107;
    --brand-light:       #2a5298;
    --brand-dark:        #122848;
    --brand-accent:      #4a90d9;

    /* Sidebar */
    --sidebar-bg:        #0f1929;
    --sidebar-header-bg: #0a1220;
    --sidebar-text:      rgba(255,255,255,0.65);
    --sidebar-text-hover:rgba(255,255,255,0.95);
    --sidebar-active-bg: rgba(74,144,217,0.15);
    --sidebar-active-text:#4a90d9;
    --sidebar-active-border:#4a90d9;
    --sidebar-icon:      rgba(255,255,255,0.4);
    --sidebar-icon-active:#4a90d9;
    --sidebar-section:   rgba(255,255,255,0.25);
    --sidebar-w:         260px;
    --sidebar-collapsed: 72px;

    /* Topbar */
    --topbar-h:          64px;
    --topbar-bg:         #ffffff;
    --topbar-border:     #e9ecef;
    --topbar-shadow:     0 2px 8px rgba(0,0,0,0.06);

    /* Content */
    --content-bg:        #f5f7fb;
    --card-bg:           #ffffff;
    --card-radius:       12px;
    --card-shadow:       0 2px 12px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 6px 24px rgba(0,0,0,0.10);

    /* Typography */
    --font-family:       'Noto Sans Arabic', Tahoma, Arial, sans-serif;
    --text-primary:      #1e2a3b;
    --text-secondary:    #6b7a8d;
    --text-muted:        #9aa3af;

    /* Status Colors */
    --success:  #28c76f;
    --danger:   #ea5455;
    --warning:  #ff9f43;
    --info:     #00cfe8;

    /* Borders & Dividers */
    --border:      #e9ecef;
    --border-light:#f0f2f5;

    /* Transitions */
    --tr-fast:  0.15s ease;
    --tr-med:   0.25s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background:  var(--content-bg);
    color:       var(--text-primary);
    font-size:   14px;
    line-height: 1.6;
    margin: 0;
}

/* ── Layout Wrapper ──────────────────────────────────────── */
#layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════ */
#sidebar {
    position: fixed;
    top: 0; right: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    overflow: hidden;
    transition: width var(--tr-med);
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
}

/* Logo / Brand Header */
#sidebar .sidebar-header {
    background: var(--sidebar-header-bg);
    padding: 0 20px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

#sidebar .sidebar-logo {
    width: 36px; height: 36px;
    background: var(--brand-accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

#sidebar .sidebar-brand-text {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
}

#sidebar .sidebar-brand-sub {
    color: var(--sidebar-text);
    font-size: 11px;
    margin-top: -2px;
    white-space: nowrap;
}

#sidebar .sidebar-brand-copy {
    min-width: 0;
    flex: 1;
}

#sidebar .sidebar-settings-gear {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 9px;
    color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.09);
    text-decoration: none;
    font-size: 18px;
    transition: all var(--tr-fast);
}

#sidebar .sidebar-settings-gear:hover,
#sidebar .sidebar-settings-gear.active {
    color: #fff;
    background: rgba(74,144,217,.24);
    border-color: rgba(74,144,217,.55);
}

/* Scroll Area */
#sidebar .sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0;
}

#sidebar .sidebar-scroll::-webkit-scrollbar { width: 4px; }
#sidebar .sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
#sidebar .sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* Section Labels */
#sidebar .nav-section {
    padding: 16px 20px 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--sidebar-section);
}

/* Nav Links */
#sidebar .nav-item { margin: 1px 10px; }

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 400;
    transition: all var(--tr-fast);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

#sidebar .nav-link:hover {
    color: var(--sidebar-text-hover);
    background: rgba(255,255,255,0.06);
}

#sidebar .nav-link.active {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active-bg);
    font-weight: 500;
}

#sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    right: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--sidebar-active-border);
    border-radius: 3px 0 0 3px;
}

/* Icons */
#sidebar .nav-icon {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: var(--sidebar-icon);
    flex-shrink: 0;
    transition: color var(--tr-fast);
}

#sidebar .nav-link:hover .nav-icon,
#sidebar .nav-link.active .nav-icon {
    color: var(--sidebar-icon-active);
}

/* Sidebar Footer */
#sidebar .sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 12px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════════════════════ */
#main-wrapper {
    margin-right: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-right var(--tr-med);
}

#topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-h);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    box-shadow: var(--topbar-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1020;
    gap: 16px;
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-end {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Page Title in Topbar */
.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* User Badge */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--tr-fast);
}

.topbar-user:hover { background: var(--border-light); }

.topbar-avatar {
    width: 34px; height: 34px;
    min-width: 34px; max-width: 34px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--brand-accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
    flex-shrink: 0;
}


.topbar-avatar-img {
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* Icon Buttons in Topbar */
.topbar-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--tr-fast);
    text-decoration: none;
}

.topbar-btn:hover {
    background: var(--border-light);
    color: var(--brand-primary);
}

/* ══════════════════════════════════════════════════════════
   CONTENT AREA
   ══════════════════════════════════════════════════════════ */
#content-area {
    flex: 1;
    padding: 24px;
}

/* Page Header */
.page-header {
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.page-header .page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Breadcrumb */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.breadcrumb-bar a { color: var(--brand-accent); text-decoration: none; }
.breadcrumb-bar a:hover { text-decoration: underline; }
.breadcrumb-bar .sep { color: var(--border); }

/* ══════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

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

.card-header h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body { padding: 20px; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD STAT CARDS
   ══════════════════════════════════════════════════════════ */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--tr-med);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
    border-color: rgba(var(--brand-primary-rgb), 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 100%;
    background: var(--stat-color, var(--brand-accent));
    opacity: 0;
    transition: opacity var(--tr-fast);
}

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

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--stat-color-bg, rgba(74,144,217,0.1));
    color: var(--stat-color, var(--brand-accent));
}

.stat-body { flex: 1; min-width: 0; }

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.stat-link {
    font-size: 11px;
    color: var(--brand-accent);
    opacity: 0;
    transition: opacity var(--tr-fast);
}

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

/* Stat Color Variants */
.stat-blue   { --stat-color: #4a90d9; --stat-color-bg: rgba(74,144,217,0.1); }
.stat-green  { --stat-color: #28c76f; --stat-color-bg: rgba(40,199,111,0.1); }
.stat-orange { --stat-color: #ff9f43; --stat-color-bg: rgba(255,159,67,0.1); }
.stat-purple { --stat-color: #7367f0; --stat-color-bg: rgba(115,103,240,0.1); }
.stat-red    { --stat-color: #ea5455; --stat-color-bg: rgba(234,84,85,0.1); }
.stat-teal   { --stat-color: #00cfe8; --stat-color-bg: rgba(0,207,232,0.1); }

/* ══════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════ */
.table-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.table-wrapper .table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.table-wrapper .table-header h5 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.table { margin: 0; }
.table > thead > tr > th {
    background: #f8f9fb;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
}

.table > tbody > tr > td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13.5px;
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table > tbody > tr:hover > td { background: #fafbff; }

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: var(--font-family);
    color: var(--text-primary);
    padding: 9px 14px;
    transition: all var(--tr-fast);
    background: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
    outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
    font-family: var(--font-family);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    padding: 9px 18px;
    transition: all var(--tr-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
}

.btn-primary:hover {
    background: #3a7ec9;
    border-color: #3a7ec9;
    color: #fff;
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.btn-outline-primary:hover {
    background: var(--brand-accent);
    color: #fff;
}

.btn-sm { font-size: 12px; padding: 6px 12px; border-radius: 6px; }
.btn-lg { font-size: 15px; padding: 12px 24px; border-radius: 10px; }

.btn-icon {
    width: 34px; height: 34px;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 15px;
}

/* ══════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════ */
.badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.3px;
}

.badge-success { background: rgba(40,199,111,0.12); color: #28a745; }
.badge-danger  { background: rgba(234,84,85,0.12);  color: #dc3545; }
.badge-warning { background: rgba(255,159,67,0.12); color: #fd7e14; }
.badge-info    { background: rgba(0,207,232,0.12);  color: #17a2b8; }
.badge-primary { background: rgba(74,144,217,0.12); color: #1b3a6b; }

/* Bootstrap badge overrides */
.badge.bg-success { background: rgba(40,199,111,0.12) !important; color: #28a745 !important; }
.badge.bg-danger  { background: rgba(234,84,85,0.12)  !important; color: #dc3545 !important; }
.badge.bg-secondary { background: rgba(108,117,125,0.12) !important; color: #6c757d !important; }

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    border-radius: 14px 14px 0 0;
}

.modal-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border); padding: 14px 24px; }

/* ══════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════ */
.alert {
    border: none;
    border-radius: 10px;
    font-size: 13.5px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(40,199,111,0.1); color: #1e7e34; }
.alert-danger  { background: rgba(234,84,85,0.1);  color: #c82333; }
.alert-info    { background: rgba(0,207,232,0.1);  color: #0c8fad; }
.alert-warning { background: rgba(255,159,67,0.1); color: #c47a00; }

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════════════ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--sidebar-bg);
}

.login-brand-panel {
    flex: 0 0 42%;
    background: linear-gradient(145deg, var(--brand-dark) 0%, var(--brand-primary) 60%, var(--brand-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    top: -80px; left: -80px;
    width: 320px; height: 320px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.login-brand-logo {
    width: 72px; height: 72px;
    background: rgba(255,255,255,0.12);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 800; color: #fff;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(255,255,255,0.2);
}

.login-brand-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    position: relative; z-index: 1;
    margin-bottom: 8px;
}

.login-brand-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    text-align: center;
    position: relative; z-index: 1;
    line-height: 1.7;
    max-width: 280px;
}

.login-form-panel {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

.login-form-inner {
    width: 100%;
    max-width: 380px;
}

.login-form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-form-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ══════════════════════════════════════════════════════════
   TABLES — Pure Bootstrap (no DataTables dependency)
   ══════════════════════════════════════════════════════════ */
.dimas-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

.dimas-table thead th {
    background: #f3f5f8;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

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

.dimas-table tbody tr:hover td {
    background: #f8f9ff;
}

.dimas-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

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

/* Search + Pagination Toolbar */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.table-search {
    position: relative;
    max-width: 260px;
    flex: 1;
}

.table-search input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: #fff;
    transition: border-color var(--tr-fast);
}

.table-search input:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(74,144,217,0.12);
}

.table-search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

/* Pagination */
.dimas-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0; padding: 0;
}

.dimas-pagination .page-item .page-link {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--tr-fast);
    background: #fff;
}

.dimas-pagination .page-item.active .page-link {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
}

.dimas-pagination .page-item .page-link:hover {
    background: var(--border-light);
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.table-info {
    font-size: 12px;
    color: var(--text-muted);
}

/* Empty State */
.table-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.table-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.table-empty-text {
    font-size: 14px;
}

/* ══════════════════════════════════════════════════════════
   SWEETALERT2 OVERRIDES
   ══════════════════════════════════════════════════════════ */
.swal2-popup {
    border-radius: 16px !important;
    font-family: var(--font-family) !important;
    padding: 24px !important;
}

.swal2-title { font-size: 18px !important; font-weight: 700 !important; }
.swal2-html-container { font-size: 14px !important; }

.swal2-confirm {
    border-radius: 8px !important;
    font-family: var(--font-family) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    padding: 9px 22px !important;
}

/* ══════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════ */
.text-brand   { color: var(--brand-accent); }
.text-muted   { color: var(--text-muted) !important; }
.bg-brand     { background: var(--brand-accent); }
.border-brand { border-color: var(--brand-accent) !important; }

.shadow-card  { box-shadow: var(--card-shadow); }
.radius-lg    { border-radius: var(--card-radius); }
.radius-sm    { border-radius: 8px; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Icon Placeholder (قبل تحميل Icon Libraries) */
.ico {
    display: inline-block;
    width: 1em; height: 1em;
    vertical-align: -0.125em;
    font-style: normal;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Desktop Always Open / Mobile Overlay Only
   ══════════════════════════════════════════════════════════ */

/* Desktop >= 992px: Sidebar ثابت مفتوح دائمًا — لا toggle */
@media (min-width: 992px) {
    #btnSidebarToggle  { display: none !important; }
    .sidebar-overlay   { display: none !important; }
}

/* Mobile & Tablet <= 991px: Sidebar Overlay */
@media (max-width: 991px) {
    #sidebar {
        width: 0 !important;
        overflow: hidden;
        box-shadow: none;
    }

    #main-wrapper { margin-right: 0 !important; }

    #sidebar.mobile-open {
        width: var(--sidebar-w) !important;
        overflow-y: auto;
        box-shadow: -4px 0 24px rgba(0,0,0,0.4);
    }

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

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

    #btnSidebarToggle { display: flex !important; }

    .login-brand-panel { display: none; }
}

@media (max-width: 575px) {
    #content-area { padding: 16px; }
    .stat-card { flex-direction: column; text-align: center; }
}

/* V0.7.0 — unified print basics */
@media print {
    #sidebar, #topbar, .sidebar-overlay, .btn, button, .no-print { display: none !important; }
    #main-wrapper { margin: 0 !important; }
    #content-area { padding: 0 !important; }
    .card, .table-wrapper { box-shadow: none !important; border: 1px solid #ddd !important; page-break-inside: avoid; }
    body { background: #fff !important; color: #000 !important; }
    a { color: #000 !important; text-decoration: none !important; }
    .table { width: 100% !important; font-size: 11px !important; }
}


/* Sidebar accordion panels */
#sidebar .nav-section.nav-panel-title {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 10px 2px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
}
#sidebar .nav-section.nav-panel-title:hover {
    background: rgba(255,255,255,0.06);
    color: var(--sidebar-text-hover);
}
#sidebar .nav-section.nav-panel-title::after {
    content: '▾';
    font-size: 12px;
    transition: transform .16s ease;
}
#sidebar .nav-section.nav-panel-title.collapsed::after {
    transform: rotate(90deg);
}
#sidebar .nav-section.nav-panel-title.expanded {
    color: var(--sidebar-text-hover);
}

/* ══════════════════════════════════════════════════════════
   V0.7.6.7 - Daily attendance fixed row colors
   الغياب أحمر، إجازة الموظف لبني، عطلة الفرع رمادي، الانتظام أخضر، أي حالة أخرى أصفر
   ══════════════════════════════════════════════════════════ */
.table tbody tr.attendance-row-absent > td,
.table tbody tr.attendance-row-absent > th {
    background-color: #fde2e2 !important;
    color: #842029 !important;
}

.table tbody tr.attendance-row-leave > td,
.table tbody tr.attendance-row-leave > th {
    background-color: #dff5ff !important;
    color: #055160 !important;
}

.table tbody tr.attendance-row-holiday > td,
.table tbody tr.attendance-row-holiday > th {
    background-color: #e9ecef !important;
    color: #495057 !important;
}

.table tbody tr.attendance-row-present > td,
.table tbody tr.attendance-row-present > th {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
}

.table tbody tr.attendance-row-other > td,
.table tbody tr.attendance-row-other > th {
    background-color: #fff3cd !important;
    color: #664d03 !important;
}

.table tbody tr.attendance-row-absent:hover > td,
.table tbody tr.attendance-row-leave:hover > td,
.table tbody tr.attendance-row-holiday:hover > td,
.table tbody tr.attendance-row-present:hover > td,
.table tbody tr.attendance-row-other:hover > td {
    filter: brightness(0.98);
}


/* ══════════════════════════════════════════════════════════
   V0.7.6.10 - Bootstrap sorting only
   ══════════════════════════════════════════════════════════ */
.dimas-sortable-header {
    cursor: pointer !important;
    user-select: none;
    white-space: nowrap;
    vertical-align: middle !important;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.dimas-sortable-header:hover {
    background-color: rgba(var(--bs-primary-rgb), .08) !important;
}

.dimas-sortable-header:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px rgba(var(--bs-primary-rgb), .45);
}

.dimas-sort-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    margin-inline-start: .4rem;
    padding: .18rem .35rem;
    font-size: .68rem;
    line-height: 1;
    vertical-align: middle;
    pointer-events: none;
}

.dimas-sortable-header.dimas-sort-asc,
.dimas-sortable-header.dimas-sort-desc {
    background-color: rgba(var(--bs-primary-rgb), .11) !important;
}

/* Attendance colors are now applied with Bootstrap contextual row classes
   (table-danger, table-info, table-secondary, table-success, table-warning). */

@media print {
    .dimas-sort-indicator { display: none !important; }
}

/* V0.15.3.31 - Global floating back-to-top button */
.dimas-back-to-top {
    position: fixed;
    inset-inline-end: 24px;
    bottom: 24px;
    z-index: 1040;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    box-shadow: 0 8px 22px rgba(13, 110, 253, .30);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease,
                background-color .2s ease, box-shadow .2s ease;
}

.dimas-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dimas-back-to-top:hover {
    background: var(--bs-primary-text-emphasis, #084298);
    box-shadow: 0 10px 26px rgba(13, 110, 253, .40);
}

.dimas-back-to-top:focus-visible {
    outline: 3px solid rgba(13, 110, 253, .35);
    outline-offset: 3px;
}

@media (max-width: 575px) {
    .dimas-back-to-top {
        inset-inline-end: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
        font-size: 1.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dimas-back-to-top {
        transition: none;
    }
}
