/* 
 * 🎨 Color Routine – حركة عطاء عدل
 * نظام الألوان الكامل للوحة التحكم
 * Modern Admin Dashboard with Bootstrap 6 Internal
 */

:root {
  /* الألوان الأساسية */
  --color-primary: #01A453;
  --color-primary-light: #33B978;
  --color-primary-dark: #018A46;
  --color-primary-hover: #01995C;
  --color-primary-disabled: #7FD7AE;

  --color-secondary: #16514B;
  --color-secondary-light: #2D6F68;
  --color-secondary-dark: #0E3A36;
  --color-secondary-hover: #1E635C;

  --color-white: #FFFFFF;

  /* ألوان النص */
  --text-primary: #1F2933;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --text-white: #FFFFFF;

  /* ألوان الخلفيات */
  --bg-page: #F7F9F8;
  --bg-card: #FFFFFF;
  --bg-section: #EAF6F1;
  --bg-sidebar: #16514B;
  --bg-header: #16514B;

  /* ألوان الحالات */
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* ألوان الحدود */
  --border-light: #E5E7EB;
  --border-default: #D1D5DB;
  --border-dark: #9CA3AF;

  /* Shadows */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

  /* Aliases */
  --primary: var(--color-primary);
  --secondary: var(--color-secondary);
  --neutral: var(--color-white);
}

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

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Arial', 'Helvetica', sans-serif;
    direction: rtl;
    text-align: right;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.7;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scroll on all admin pages */
body:not(.login-page) {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scroll on login page */
html.login-page-html,
body.login-page {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
    box-sizing: border-box;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
    overflow: hidden;
    pointer-events: none;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    padding: 0;
    margin: 0 auto;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.login-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.login-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.login-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-header h1 {
    color: var(--color-secondary);
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 500;
}

.login-form {
    margin-top: 32px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: var(--error);
    border: 1px solid #fcc;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(204, 51, 51, 0.1);
}

.alert-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #A7F3D0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(1, 164, 83, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}

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

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--text-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: var(--text-primary);
}

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

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

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

.btn-success:hover {
    background: #16A34A;
}

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

.btn-warning:hover {
    background: #D97706;
}

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

.btn-info:hover {
    background: #2563EB;
}

.badge-secondary {
    background: #6C757D;
    color: var(--color-white);
}

.badge-info {
    background: #0dcaf0;
    color: #000;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-block {
    width: 100%;
    position: relative;
    min-height: 48px;
}

.btn-text,
.btn-loader {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.btn-loader {
    display: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

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

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

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--color-white);
    position: fixed;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.sidebar-header {
    display: none;
}

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

.sidebar-footer-version {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    margin-top: auto;
    margin-bottom: 0;
}

.version-text {
    font-size: 0.75rem;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    display: block;
}

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

.nav-section-title {
    padding: 12px 24px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.nav-section:first-child .nav-section-title {
    margin-top: 0;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s;
    border-right: 3px solid transparent;
}

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

.nav-item.active {
    background: rgba(1, 164, 83, 0.2);
    color: var(--color-white);
    border-right-color: var(--color-primary);
}

.nav-icon {
    font-size: 1.3rem;
    margin-left: 12px;
    width: 24px;
    text-align: center;
}

.nav-label {
    font-weight: 500;
}

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

.user-info {
    margin-bottom: 16px;
    text-align: center;
}

.user-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-white);
}

.user-role {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.85);
}

/* Main Content */
/* Admin Header */
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 260px;
    height: 70px;
    background: transparent;
    color: var(--color-white);
    z-index: 1000;
    box-shadow: none;
    border-bottom: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.admin-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.admin-logo {
    display: none;
}

.admin-logo h1 {
    display: none;
}

.admin-logo span {
    display: none;
}

.admin-version {
    display: none;
}

.view-site-btn {
    white-space: nowrap;
    min-width: auto;
    padding: 10px 20px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    position: relative;
    text-decoration: none;
}

.view-site-btn::before {
    content: "🌐";
    font-size: 1.1rem;
}

.view-site-text {
    display: inline;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    margin-right: 0;
    z-index: 10;
    position: relative;
}

/* Admin User Menu */
.admin-user-menu {
    position: relative;
    display: inline-block;
}

.admin-user-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #1F2933;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}

.admin-user-btn:hover,
.admin-user-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Ensure text colors are black for desktop */
@media (min-width: 769px) {
    .admin-user-btn {
        color: #1F2933 !important;
    }
    
    .admin-user-name,
    .admin-user-role,
    .admin-user-arrow {
        color: #1F2933 !important;
    }
    
    /* Hide mobile menu toggle on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 2px;
}

.admin-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #1F2933 !important;
}

.admin-user-role {
    font-size: 0.8rem;
    opacity: 0.85;
    line-height: 1.2;
    color: #1F2933 !important;
}

.admin-user-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
    opacity: 0.8;
    color: #1F2933 !important;
}

.admin-user-btn.active .admin-user-arrow {
    transform: rotate(180deg);
}

.admin-user-dropdown {
    position: fixed;
    min-width: 220px;
    max-width: 300px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    overflow: hidden;
    display: none;
    top: 80px;
    right: 24px;
}

.admin-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #1F2933;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.admin-dropdown-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.admin-dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-dropdown-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1F2933;
    line-height: 1.3;
}

.admin-dropdown-user-role {
    font-size: 0.8rem;
    color: #4B5563;
    opacity: 0.85;
    line-height: 1.2;
}

.admin-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1F2933;
    padding-right: 24px;
}

.admin-dropdown-item-danger {
    color: #DC3545;
}

.admin-dropdown-item-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #DC3545;
}

.admin-dropdown-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.admin-dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 8px 0;
}

.main-content {
    margin-right: 260px;
    padding: 30px;
    min-height: 100vh;
    width: calc(100% - 260px);
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
    margin-top: 70px;
    -webkit-overflow-scrolling: touch;
}

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

.content-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border-light);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary-light);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.dashboard-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.list-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-section);
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid var(--border-light);
}

.list-item:hover {
    background: #E0F2E9;
    border-color: var(--color-primary-light);
}

.list-item-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.list-item-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.table th,
.table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--bg-section);
    font-weight: 600;
    color: var(--text-primary);
}

.table tr:hover {
    background: var(--bg-section);
}

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

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

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

.badge-error {
    background: var(--error);
    color: var(--color-white);
}

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

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

.tab {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

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

.tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Form */
.form {
    max-width: 800px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

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

/* Utility Classes */
.dashboard-container {
    padding: 30px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

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

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Hide any unwanted dropdowns in header */
.dashboard-header .select2-container,
.dashboard-header .select2-dropdown,
.dashboard-header .dropdown-menu {
    display: none !important;
}

/* Ensure Select2 dropdowns use body as parent */
.select2-container {
    position: relative;
}

.select2-dropdown {
    position: absolute;
    z-index: 1051;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-link {
    position: absolute;
    bottom: 15px;
    left: 24px;
    font-size: 0.85rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.stat-card-primary {
    border-left: 4px solid #17A2B8;
}

.stat-card-success {
    border-left: 4px solid var(--color-primary);
}

.stat-card-warning {
    border-left: 4px solid #FFA500;
}

.stat-card-info {
    border-left: 4px solid var(--color-secondary);
}

.stat-card-secondary {
    border-left: 4px solid #6C757D;
}

.stat-card-danger {
    border-left: 4px solid #DC3545;
}

.stat-info small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dashboard-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.today-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.activity-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-section);
    border-radius: 12px;
    flex-shrink: 0;
}

.activity-info h4 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.activity-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.quick-link-card {
    display: block;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--border-light);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-link-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-hover);
    background: var(--bg-section);
}

.quick-link-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.quick-link-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.quick-link-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.table-responsive {
    overflow-x: auto;
}

.empty-text {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Form Row - Horizontal layout for form fields */
.form-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group-half {
    flex: 1;
    min-width: 250px;
    max-width: calc(50% - 0.75rem);
}

.card-header {
    padding: 20px 24px;
    background: var(--bg-section);
    border-bottom: 1px solid var(--border-light);
    border-radius: 12px 12px 0 0;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-secondary);
}

.card-body {
    padding: 24px;
}

.stat-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Additional Utility Classes */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

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

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

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

.btn-outline-danger:hover {
    background: var(--error);
    color: var(--color-white);
}

.border-0 {
    border: 0;
}

.shadow-sm {
    box-shadow: var(--shadow);
}

.bg-white {
    background: var(--bg-card);
}

.border-bottom {
    border-bottom: 1px solid var(--border-light);
}

.table-hover tbody tr:hover {
    background: var(--bg-section);
}

.mb-0 {
    margin-bottom: 0;
}

/* Modal Styles (for users.php) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background: var(--bg-card);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Nav Tabs */
.nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid var(--border-light);
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: transparent;
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background: var(--color-secondary-dark);
    transform: scale(1.05);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* Responsive - Mobile First Approach */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .admin-header {
        right: 240px;
    }
    
    .main-content {
        margin-right: 240px;
        padding: 25px;
        width: calc(100% - 240px);
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    /* Admin Header Mobile */
    .admin-header {
        height: 60px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background: transparent;
        box-shadow: none;
        border-bottom: none;
        transition: background 0.3s ease, box-shadow 0.3s ease;
    }
    
    .admin-header.scrolled {
        background: rgba(255, 255, 255, 0.95);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    /* إخفاء النص في الهاتف - إظهار الأيقونة فقط */
    .view-site-text {
        display: none;
    }
    
    .view-site-btn {
        padding: 8px 12px;
        min-width: auto;
        width: auto;
        border: none !important;
        background: transparent !important;
    }
    
    .view-site-btn::before {
        margin: 0;
    }
    
    .view-site-btn:hover {
        background: rgba(0, 0, 0, 0.05) !important;
        border: none !important;
    }
    
    .admin-header-container {
        justify-content: center;
        position: relative;
    }
    
    .admin-header-left {
        position: absolute;
        left: 12px;
        flex: 0 0 auto;
    }
    
    .admin-header-right {
        margin: 0 auto;
        position: relative;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 12px;
        justify-content: center;
    }
    
    .sidebar {
        top: 60px;
        height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: fixed;
    }
    
    .sidebar-nav {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 120px);
    }
    
    .sidebar-footer-version {
        padding: 12px 20px;
    }
    
    .version-text {
        font-size: 0.7rem;
    }
    
    .admin-header-container {
        padding: 0 12px;
        justify-content: center;
        position: relative;
    }
    
    .admin-logo h1 {
        font-size: 1.2rem;
    }
    
    .admin-logo span {
        font-size: 0.75rem;
    }
    
    .admin-user-btn {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .admin-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .admin-user-info {
        display: none;
    }
    
    .admin-user-arrow {
        display: none;
    }
    
    .admin-user-dropdown {
        top: 70px;
        right: 12px;
        left: 12px;
        min-width: auto;
        max-width: calc(100vw - 24px);
        width: auto;
        background: #FFFFFF;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
    }
    
    .admin-dropdown-header {
        padding: 14px 16px;
        background: rgba(0, 0, 0, 0.02);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .admin-dropdown-user-name {
        font-size: 0.9rem;
    }
    
    .admin-dropdown-user-role {
        font-size: 0.75rem;
    }
    
    .admin-dropdown-item {
        color: #1F2933;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .admin-dropdown-item:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #1F2933;
    }
    
    .admin-dropdown-item-danger {
        color: #DC3545;
    }
    
    .admin-dropdown-item-danger:hover {
        background: rgba(220, 53, 69, 0.1);
        color: #DC3545;
    }
    
    .admin-dropdown-divider {
        background: rgba(0, 0, 0, 0.1);
    }
    
    .view-site-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 120px;
        cursor: pointer;
        pointer-events: auto;
        z-index: 10;
        position: relative;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(1, 164, 83, 0.2);
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
    
    .header-actions .view-site-btn {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        background: rgba(22, 81, 75, 0.9);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: var(--color-white);
        cursor: pointer;
        padding: 10px;
        flex-direction: column;
        gap: 5px;
        position: relative;
        z-index: 1002;
        pointer-events: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle.active {
        background: rgba(22, 81, 75, 1);
        border-color: rgba(255, 255, 255, 0.4);
        transform: scale(1.05);
    }
    
    /* Hide duplicate mobile menu toggle from mobile-menu.php */
    #mobileMenuToggle {
        display: none !important;
    }
    
    .hamburger-line {
        width: 24px;
        height: 3px;
        background: var(--color-white);
        border-radius: 2px;
        transition: all 0.3s;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    .sidebar {
        width: 280px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .sidebar-footer-version {
        padding: 12px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .version-text {
        font-size: 0.7rem;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    html,
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        position: relative;
        height: auto;
        min-height: 100vh;
    }
    
    .main-content {
        margin-right: 0;
        padding: 15px;
        padding-top: 80px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
        overflow-y: visible;
        position: relative;
        min-height: calc(100vh - 80px);
        -webkit-overflow-scrolling: touch;
        height: auto;
    }
    
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
    }
    
    .dashboard-grid,
    .stats-grid {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .stat-card,
    .dashboard-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Login Page Mobile Styles */
    html,
    body.login-page {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }
    
    .login-page {
        padding: 15px;
        min-height: 100vh;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        position: relative;
    }
    
    .login-page::before {
        overflow: hidden;
        pointer-events: none;
    }
    
    .login-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box;
    }
    
    .login-box {
        padding: 30px 20px;
        border-radius: 16px;
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
    }
    
    .login-header {
        margin-bottom: 24px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .login-logo-img {
        width: 60px;
        height: 60px;
        max-width: 100%;
    }
    
    .login-header h1 {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
    
    .login-header p {
        font-size: 0.95rem;
    }
    
    .login-form {
        margin-top: 24px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-group {
        margin-bottom: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-control {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .btn-primary.btn-block {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .alert {
        padding: 12px 14px;
        font-size: 0.85rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .alert-error {
        padding: 14px 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .login-link {
        font-size: 0.85rem;
        display: inline-block;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .login-header h1,
    .login-header p {
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-right: 10px;
        padding-left: 10px;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
    }
    
    .sidebar-header {
        padding: 20px;
    }
    
    .sidebar-header h2 {
        font-size: 1.3rem;
    }
    
    .nav-item {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .nav-icon {
        font-size: 1.2rem;
        width: 24px;
    }
    
    .sidebar-footer {
        padding: 20px;
    }
    
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* On mobile, make form-row vertical */
    .form-row {
        flex-direction: column !important;
        gap: 1rem;
    }
    
    .form-group-half {
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-card {
        padding: 18px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .dashboard-card,
    .card,
    .form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-row {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-control,
    textarea.form-control,
    select.form-control {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    textarea.form-control {
        min-height: 100px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    /* Admin Header Small Mobile */
    .admin-header {
        height: 60px;
        -webkit-overflow-scrolling: touch;
        background: transparent;
        box-shadow: none;
        border-bottom: none;
    }
    
    .admin-header-container {
        justify-content: center;
        position: relative;
    }
    
    .admin-header-left {
        position: absolute;
        left: 10px;
        flex: 0 0 auto;
    }
    
    .admin-header-right {
        margin: 0 auto;
        position: relative;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: center;
    }
    
    /* إخفاء زر عرض الموقع من الداشبورد في الهاتف الصغير */
    .header-actions .view-site-btn {
        display: none !important;
    }
    
    .sidebar {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: fixed;
        max-height: calc(100vh - 60px);
    }
    
    .sidebar-nav {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 140px);
    }
    
    .main-content {
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        height: auto;
    }
    
    .admin-header-container {
        padding: 0 10px;
        justify-content: space-between;
        position: relative;
    }
    
    .admin-header-left {
        position: relative;
        left: 0;
        flex: 0 0 auto;
    }
    
    .admin-header-right {
        margin: 0 auto;
        position: relative;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: center;
    }
    
    .sidebar-footer-version {
        padding: 10px 16px;
    }
    
    .version-text {
        font-size: 0.65rem;
    }
    
    .admin-user-btn {
        padding: 6px 10px;
        gap: 6px;
        pointer-events: auto;
        cursor: pointer;
    }
    
    .admin-user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .admin-user-dropdown {
        top: 70px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: calc(100vw - 20px);
        width: auto;
        background: #FFFFFF;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
    }
    
    .admin-dropdown-header {
        padding: 12px 14px;
        background: rgba(0, 0, 0, 0.02);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .admin-dropdown-user-name {
        font-size: 0.85rem;
    }
    
    .admin-dropdown-user-role {
        font-size: 0.7rem;
    }
    
    .admin-dropdown-item {
        color: #1F2933;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .admin-dropdown-item:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #1F2933;
    }
    
    .admin-dropdown-item-danger {
        color: #DC3545;
    }
    
    .admin-dropdown-item-danger:hover {
        background: rgba(220, 53, 69, 0.1);
        color: #DC3545;
    }
    
    .admin-dropdown-divider {
        background: rgba(0, 0, 0, 0.1);
    }
    
    .view-site-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        width: auto;
        min-width: 140px;
        justify-content: center;
        display: inline-flex !important;
        align-items: center;
        gap: 8px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(1, 164, 83, 0.2);
        cursor: pointer;
        pointer-events: auto;
        z-index: 10;
        position: relative;
        border: none !important;
        background: transparent !important;
    }
    
    .view-site-btn:hover {
        background: rgba(0, 0, 0, 0.05) !important;
        border: none !important;
    }
    
    /* إخفاء زر عرض الموقع من الداشبورد في الهاتف الصغير */
    .header-actions .view-site-btn {
        display: none !important;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .view-site-btn {
        width: 100%;
    }
    
    .admin-logo h1 {
        font-size: 1rem;
    }
    
    .admin-logo span {
        font-size: 0.7rem;
        display: block;
    }
    
    .admin-version {
        font-size: 0.65rem;
    }
    
    html,
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        position: relative;
        height: auto;
        min-height: 100vh;
        -webkit-overflow-scrolling: touch;
    }
    
    .main-content {
        padding: 12px;
        padding-top: 80px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
        overflow-y: visible;
        position: relative;
        min-height: calc(100vh - 80px);
        -webkit-overflow-scrolling: touch;
        height: auto;
    }
    
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 8px;
        padding-left: 8px;
        box-sizing: border-box;
        overflow-x: hidden !important;
    }
    
    .dashboard-grid,
    .stats-grid {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .stat-card,
    .dashboard-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .content-header h1 {
        font-size: 1.3rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .dashboard-card {
        padding: 15px;
    }
    
    .dashboard-card h2 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .mobile-menu-toggle {
        top: 10px;
        right: 10px;
        padding: 10px;
        font-size: 1.3rem;
        background: rgba(22, 81, 75, 0.9);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: var(--color-white);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle.active {
        background: rgba(22, 81, 75, 1);
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    /* Login Page Mobile Styles - Small Screens */
    html,
    body.login-page {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }
    
    .login-page {
        padding: 10px;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }
    
    .login-page::before {
        overflow: hidden;
        pointer-events: none;
    }
    
    .login-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box;
    }
    
    .login-box {
        padding: 24px 16px;
        border-radius: 12px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
    }
    
    .login-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .login-header h1 {
        font-size: 1.6rem;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .login-logo-img {
        width: 50px;
        height: 50px;
        max-width: 100%;
    }
    
    .login-form {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .form-group {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .btn-primary.btn-block {
        padding: 12px 18px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .alert {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .login-header p {
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .login-header h1,
    .login-header p {
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Quill Editor Styles */
.editor-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
}

#editor {
    min-height: 400px;
    background: #fff;
}

.ql-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-light);
}

.ql-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.editor-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.hidden-textarea {
    display: none;
}

.media-preview-image,
.media-preview-video {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
}

/* ============================================
   Enhanced Styles - Modern & Organized
   ============================================ */

/* Container & Layout Improvements */
.container-fluid {
    width: 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* Enhanced Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(1, 164, 83, 0.05);
    transition: background-color 0.2s ease;
}

.table-light {
    background-color: #f8f9fa;
}

.table-light th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-light);
}

/* Enhanced Card Styles */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

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

.card-header {
    padding: 1.25rem;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

.card-body.p-0 {
    padding: 0;
}

/* Enhanced Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.bg-success {
    background-color: var(--success) !important;
    color: var(--color-white) !important;
}

.bg-warning {
    background-color: var(--warning) !important;
    color: var(--color-white) !important;
}

.bg-danger {
    background-color: var(--error) !important;
    color: var(--color-white) !important;
}

.bg-secondary {
    background-color: #6c757d !important;
    color: var(--color-white) !important;
}

.bg-info {
    background-color: var(--info) !important;
    color: var(--color-white) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
}

/* Enhanced Button Styles */
.btn-group {
    display: inline-flex;
    vertical-align: middle;
    gap: 0.5rem;
}

.btn-outline-warning {
    color: var(--warning);
    border-color: var(--warning);
    background-color: transparent;
}

.btn-outline-warning:hover {
    color: var(--color-white);
    background-color: var(--warning);
    border-color: var(--warning);
}

.btn-outline-info {
    color: var(--info);
    border-color: var(--info);
    background-color: transparent;
}

.btn-outline-info:hover {
    color: var(--color-white);
    background-color: var(--info);
    border-color: var(--info);
}

.btn-outline-success {
    color: var(--success);
    border-color: var(--success);
    background-color: transparent;
}

.btn-outline-success:hover {
    color: var(--color-white);
    background-color: var(--success);
    border-color: var(--success);
}

/* Enhanced Alert Styles */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.alert-error {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.alert-warning {
    color: #92400e;
    background-color: #fef3c7;
    border-color: #fde68a;
}

.alert-info {
    color: #1e40af;
    background-color: #dbeafe;
    border-color: #bfdbfe;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

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

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.h3 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.h4 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.h5 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Form Enhancements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--text-muted);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.empty-state-text {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .main-content {
        margin-right: 0;
        padding: 15px;
    }
    
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .btn,
    .action-buttons {
        display: none;
    }
    
    .main-content {
        margin-right: 0;
    }
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

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

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
}

.status-indicator.active {
    background-color: var(--success);
}

.status-indicator.inactive {
    background-color: var(--text-muted);
}

.status-indicator.pending {
    background-color: var(--warning);
}

/* ============================================
   Modern Bootstrap 6 Integration
   ============================================ */

/* Import Bootstrap Internal */
@import url('bootstrap-internal.css');

/* Modern Card Enhancements */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--bg-section) 0%, var(--bg-card) 100%);
    border-bottom: 2px solid var(--border-light);
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.75rem;
}

/* Modern Form Controls */
.form-control {
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 0.875rem 1.125rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

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

.form-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Modern Buttons */
.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(1, 164, 83, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 164, 83, 0.4);
    background: linear-gradient(135deg, var(--color-primary-hover) 0%, var(--color-primary) 100%);
}

.btn-secondary {
    background: var(--text-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

/* Modern Table */
.table {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.table thead th {
    background: linear-gradient(135deg, var(--bg-section) 0%, #f0f9f5 100%);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--color-primary);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: var(--bg-section);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Modern Alerts */
.alert {
    border-radius: 12px;
    padding: 1.125rem 1.5rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-right: 4px solid var(--success);
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-right: 4px solid var(--error);
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-right: 4px solid var(--warning);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-right: 4px solid var(--info);
}

/* Modern Badges */
.badge {
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Modern Nav Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--color-primary);
    background: var(--bg-section);
}

.nav-tabs .nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: transparent;
}

/* Modern Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, var(--color-secondary-dark) 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.nav-item {
    border-radius: 10px;
    margin: 0.25rem 0.75rem;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
}

.nav-item.active {
    background: rgba(1, 164, 83, 0.25);
    border-right: 4px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(1, 164, 83, 0.2);
}

/* Modern Content Header */
.content-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-section) 100%);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.content-header h1 {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 800;
}

/* Modern Dashboard Cards */
.dashboard-card {
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.dashboard-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.dashboard-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

/* Modern Stats Grid */
.stat-card {
    border-radius: 16px;
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-section) 100%);
    border: 2px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(1, 164, 83, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary);
}

.stat-icon-box {
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-box {
    transform: rotate(5deg) scale(1.1);
}

/* Modern Form Row - Already defined above, removed duplicate */

/* Modern Empty State */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-section) 0%, var(--bg-card) 100%);
    border-radius: 16px;
    border: 2px dashed var(--border-light);
}

.empty-state-icon {
    font-size: 5rem;
    opacity: 0.3;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.empty-state-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.password-strength-fill.weak {
    background-color: var(--error);
    width: 33%;
}

.password-strength-fill.medium {
    background-color: var(--warning);
    width: 66%;
}

.password-strength-fill.strong {
    background-color: var(--success);
    width: 100%;
}

.password-strength-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Modern Responsive */
@media (max-width: 768px) {
    .content-header h1 {
        font-size: 1.75rem;
    }
    
    .dashboard-card {
        border-radius: 12px;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group-half {
        min-width: 100%;
    }
}

/* Profile Page Styles */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-left,
.profile-right {
    min-width: 0;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 25px;
    color: white;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.avatar-text {
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: white;
    font-weight: 600;
}

.profile-role {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.profile-email {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .profile-info h3 {
        font-size: 1.2rem;
    }
}
