/* ============================================
   Sajjil Job Portal - Main Stylesheet
   Inspired by sajjil.gov.jo design
   ============================================ */

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

:root {
    --primary: #00897B;
    --primary-light: #4DB6AC;
    --primary-dark: #00695C;
    --primary-darker: #004D40;
    --secondary: #26A69A;
    --secondary-light: #80CBC4;
    --accent: #FF8F00;
    --accent-light: #FFB74D;
    --dark: #1B2631;
    --dark-light: #2C3E50;
    --gray-50: #FAFAFA;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --success: #43A047;
    --danger: #E53935;
    --warning: #FB8C00;
    --info: #039BE5;
    --white: #ffffff;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --transition: all 0.25s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.8;
    font-size: 15px;
}

/* RTL Support */
[dir="rtl"] body { font-family: 'Tajawal', sans-serif; }
[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .text-end { text-align: left !important; }

/* ---- Top Bar ---- */
.top-bar {
    background: var(--primary-darker);
    padding: 0.35rem 0;
    font-size: 0.82rem;
}
.top-bar a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 0.2rem 0.7rem;
    transition: var(--transition);
}
.top-bar a:hover { color: #fff; }
.top-bar .separator { color: rgba(255,255,255,0.3); }

/* ---- Navbar ---- */
.navbar-sajjil {
    background: var(--white);
    padding: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.navbar-sajjil .navbar-brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary) !important;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.navbar-sajjil .navbar-brand .brand-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}
.navbar-sajjil .nav-link {
    color: var(--gray-800) !important;
    font-weight: 600;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.93rem;
}
.navbar-sajjil .nav-link:hover {
    color: var(--primary) !important;
    background: rgba(0,137,123,0.06);
}
.navbar-sajjil .nav-link.active {
    color: var(--primary) !important;
    background: rgba(0,137,123,0.1);
}
.navbar-sajjil .btn-lang {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
}
.navbar-sajjil .btn-lang:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.navbar-sajjil .btn-register {
    background: var(--primary);
    color: var(--white) !important;
    border-radius: 25px;
    padding: 0.4rem 1.3rem !important;
    font-weight: 700;
    border: none;
    transition: var(--transition);
}
.navbar-sajjil .btn-register:hover {
    background: var(--primary-dark);
}

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(160deg, var(--primary-darker) 0%, var(--primary-dark) 30%, var(--primary) 60%, var(--secondary) 100%);
    color: white;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section .hero-content { position: relative; z-index: 2; }
.hero-section h1 {
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}
.hero-section h5 {
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.hero-section p {
    font-size: 1.05rem;
    opacity: 0.85;
    margin-bottom: 2rem;
    max-width: 600px;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-cta .btn-hero-primary {
    background: var(--white);
    color: var(--primary-dark);
    border: none;
    border-radius: 30px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.hero-cta .btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.hero-cta .btn-hero-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 30px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}
.hero-cta .btn-hero-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.8);
}
.hero-search {
    background: var(--white);
    border-radius: 50px;
    padding: 5px;
    box-shadow: var(--shadow-lg);
    max-width: 650px;
    margin: 2rem auto 0;
}
.hero-search input {
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    background: transparent;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
}
.hero-search input:focus { outline: none; }
.hero-search .btn {
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 700;
    background: var(--primary);
    color: white;
    border: none;
    transition: var(--transition);
}
.hero-search .btn:hover { background: var(--primary-dark); }

/* ---- Stats Section ---- */
.stats-section {
    padding: 0;
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
}
.stats-bar {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem 2rem;
}
.stat-card {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0,137,123,0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 0.6rem;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
    display: block;
    line-height: 1.2;
}
.stat-card .stat-label {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* ---- Job Cards ---- */
.job-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.job-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.job-card .company-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}
.job-card .job-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    display: block;
    margin-bottom: 0.2rem;
}
.job-card .job-title:hover { color: var(--primary); }
.job-card .company-name {
    color: var(--gray-600);
    font-size: 0.85rem;
}
.job-card .job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.8rem;
}
.job-card .job-meta span {
    background: var(--gray-100);
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--gray-700);
}
.job-card .badge-featured {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}
.job-card .salary {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ---- Section Titles ---- */
.section-title {
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin-top: 0.5rem;
    border-radius: 2px;
}
.text-center .section-title::after { margin: 0.5rem auto 0; }
.section-subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ---- How It Works ---- */
.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.step-card .step-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(0,137,123,0.3);
}
.step-card h5 { font-weight: 700; color: var(--gray-800); }
.step-card p { color: var(--gray-600); font-size: 0.88rem; }

/* ---- NEP Banner ---- */
.nep-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}
.nep-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.nep-banner h3 { font-weight: 800; position: relative; z-index: 1; }
.nep-banner p { opacity: 0.9; position: relative; z-index: 1; }
.nep-banner .btn {
    background: var(--white);
    color: var(--primary-dark);
    border-radius: 25px;
    padding: 0.6rem 2rem;
    font-weight: 700;
    border: none;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}
.nep-banner .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* ---- Company Cards ---- */
.company-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.company-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.company-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 0.8rem;
}

/* ---- Auth Pages ---- */
.auth-card {
    max-width: 480px;
    margin: 3rem auto;
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary);
}
.auth-card h2 {
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}
.auth-card .auth-subtitle {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.auth-card .form-control {
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    border: 1px solid var(--gray-300);
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
}
.auth-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,137,123,0.12);
}
.auth-card .btn-primary {
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem;
    font-weight: 700;
    width: 100%;
    transition: var(--transition);
}
.auth-card .btn-primary:hover { background: var(--primary-dark); }

/* ---- Dashboard Sidebar ---- */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
}
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    flex-shrink: 0;
}
[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--gray-200);
}
.sidebar .sidebar-header {
    padding: 0 1.5rem 1.2rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0.8rem;
}
.sidebar .sidebar-header h6 {
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}
.sidebar .sidebar-header small {
    color: var(--gray-500);
    font-size: 0.8rem;
}
.sidebar .nav-link {
    padding: 0.55rem 1.5rem;
    color: var(--gray-700);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: var(--transition);
    border-radius: 0;
    font-size: 0.9rem;
}
.sidebar .nav-link:hover {
    background: rgba(0,137,123,0.05);
    color: var(--primary);
}
.sidebar .nav-link.active {
    background: rgba(0,137,123,0.08);
    color: var(--primary);
    font-weight: 700;
    border-right: 3px solid var(--primary);
}
[dir="rtl"] .sidebar .nav-link.active {
    border-right: none;
    border-left: 3px solid var(--primary);
}
.sidebar .nav-link i { font-size: 1rem; width: 22px; text-align: center; }

.dashboard-content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
    background: var(--gray-50);
}

/* ---- Dashboard Stat Cards ---- */
.dash-stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
    border-top: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}
[dir="rtl"] .dash-stat-card {
    border-left: 1px solid var(--gray-200);
    border-right: 4px solid var(--primary);
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dash-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}
.dash-stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); }
.dash-stat-card .stat-label { color: var(--gray-600); font-size: 0.83rem; }
.bg-stat-1 { background: var(--primary); }
.bg-stat-2 { background: var(--accent); }
.bg-stat-3 { background: var(--primary-dark); }
.bg-stat-4 { background: var(--info); }
.border-stat-2 { border-color: var(--accent) !important; }
.border-stat-3 { border-color: var(--primary-dark) !important; }
.border-stat-4 { border-color: var(--info) !important; }

/* ---- Admin Dashboard ---- */
.admin-sidebar {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
}
.admin-sidebar .sidebar-header {
    border-bottom-color: rgba(255,255,255,0.08);
}
.admin-sidebar .sidebar-header h6 { color: var(--white); }
.admin-sidebar .sidebar-header small { color: rgba(255,255,255,0.5); }
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
}
.admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--white);
}
.admin-sidebar .nav-link.active {
    background: rgba(0,137,123,0.25);
    color: var(--white);
    border-right-color: var(--primary-light);
}
[dir="rtl"] .admin-sidebar .nav-link.active {
    border-left-color: var(--primary-light);
}
.admin-sidebar .nav-divider {
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 0.5rem 1.5rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding-top: 0.8rem;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* ---- Tables ---- */
.table-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}
.table-card .table { margin: 0; }
.table-card .table th {
    background: var(--gray-50);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    letter-spacing: 0.3px;
}
.table-card .table td { vertical-align: middle; font-size: 0.88rem; }
.table-card .table tbody tr:hover { background: rgba(0,137,123,0.02); }

/* ---- Badges ---- */
.badge-status {
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.2px;
}
.badge-pending { background: #FFF3E0; color: #E65100; }
.badge-active, .badge-approved, .badge-shortlisted { background: #E8F5E9; color: #2E7D32; }
.badge-rejected { background: #FFEBEE; color: #C62828; }
.badge-accepted { background: #E0F2F1; color: #00695C; }
.badge-reviewed { background: #E3F2FD; color: #1565C0; }
.badge-interview { background: #F3E5F5; color: #7B1FA2; }
.badge-completed { background: #E8EAF6; color: #283593; }
.badge-closed, .badge-dropped { background: var(--gray-200); color: var(--gray-700); }
.badge-upcoming { background: #E0F7FA; color: #00838F; }

/* ---- Forms ---- */
.form-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-200);
}
.form-label { font-weight: 600; color: var(--gray-700); font-size: 0.88rem; }
.form-control, .form-select {
    font-family: 'Tajawal', sans-serif;
    border-radius: var(--radius-sm);
    border-color: var(--gray-300);
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,137,123,0.1);
}

/* ---- Footer ---- */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}
.footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.footer a { color: rgba(255,255,255,0.65); text-decoration: none; transition: var(--transition); }
.footer a:hover { color: var(--primary-light); }
.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.85rem;
}
.footer .social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    transition: var(--transition);
    color: rgba(255,255,255,0.7);
}
.footer .social-links a:hover { background: var(--primary); color: white; }
.footer .footer-logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 0.5rem;
}
.footer .footer-desc {
    font-size: 0.88rem;
    line-height: 1.7;
    opacity: 0.75;
}

/* ---- Pagination ---- */
.pagination .page-link {
    color: var(--primary);
    border-radius: var(--radius-sm);
    margin: 0 2px;
    border: 1px solid var(--gray-300);
    font-weight: 500;
    font-size: 0.88rem;
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ---- Filters ---- */
.filter-bar {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

/* ---- Alerts ---- */
.alert { border-radius: var(--radius-sm); border: none; font-size: 0.9rem; }
.alert-success { background: #E8F5E9; color: #2E7D32; }
.alert-danger { background: #FFEBEE; color: #C62828; }
.alert-info { background: #E3F2FD; color: #1565C0; }
.alert-warning { background: #FFF8E1; color: #F57F17; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .sidebar { display: none; }
    .dashboard-wrapper { flex-direction: column; }
    .dashboard-content { padding: 1rem; }
    .hero-section h1 { font-size: 2rem; }
    .hero-section { padding: 3rem 0 2.5rem; }
    .top-bar { display: none; }
    .hero-cta { justify-content: center; }
    .hero-section p { margin: 0 auto 2rem; }
}
@media (max-width: 767px) {
    .stat-card .stat-number { font-size: 1.5rem; }
    .stats-bar { padding: 1rem; }
    .hero-search { flex-direction: column; }
    .auth-card { margin: 1rem; padding: 1.5rem; }
    .nep-banner { padding: 2rem 1.5rem; }
}

/* ---- Mobile sidebar toggle ---- */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    font-size: 1.1rem;
}
[dir="rtl"] .sidebar-toggle { right: auto; left: 20px; }
@media (max-width: 991px) {
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar.show {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        height: 100vh;
        box-shadow: var(--shadow-lg);
    }
    [dir="rtl"] .sidebar.show { left: auto; right: 0; }
}

/* ---- Charts ---- */
.chart-container {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-200);
}

/* ---- Misc ---- */
.text-primary { color: var(--primary) !important; }
.bg-primary-gradient { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn-sajjil {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}
.btn-sajjil:hover { background: var(--primary-dark); color: white; }
.btn-sajjil-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}
.btn-sajjil-outline:hover { background: var(--primary); color: white; }
.cursor-pointer { cursor: pointer; }
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Government Badge ---- */
.gov-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0,137,123,0.08);
    color: var(--primary-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.gov-badge i { font-size: 0.7rem; }

/* ---- Scroll to top ---- */
.scroll-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: var(--transition);
}
[dir="rtl"] .scroll-top { left: auto; right: 20px; }
.scroll-top:hover { background: var(--primary-dark); }
