/* RafatAI - Custom Styles */
/* Arabic RTL Support with Bootstrap 5 */

:root {
    /* Primary Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Sidebar Colors */
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #3b82f6;

    /* Theme Colors - Light Mode (Default) */
    --body-bg: #f1f5f9;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --table-bg: #ffffff;
    --table-border: #e5e7eb;
    --table-stripe: #f9fafb;
    --navbar-bg: #ffffff;
    --footer-bg: #f3f4f6;
    --dropdown-bg: #ffffff;
    --dropdown-border: #e5e7eb;
    --modal-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* ========================================
   DARK MODE THEME
   ======================================== */
[data-theme="dark"] {
    --body-bg: #0f172a;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --card-bg: #1e293b;
    --card-border: #334155;
    --input-bg: #1e293b;
    --input-border: #475569;
    --table-bg: #1e293b;
    --table-border: #334155;
    --table-stripe: #263549;
    --navbar-bg: #1e293b;
    --footer-bg: #1e293b;
    --dropdown-bg: #1e293b;
    --dropdown-border: #334155;
    --modal-bg: #1e293b;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --sidebar-bg: linear-gradient(180deg, #064e3b 0%, #065f46 40%, #047857 100%);
}

/* Dark mode sidebar adjustments */
[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #064e3b 0%, #065f46 40%, #047857 100%);
    border-left-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.1) 0%, transparent 50%);
}

[data-theme="dark"] body,
[data-theme="dark"] .main-content,
[data-theme="dark"] .main-wrapper {
    background-color: var(--body-bg) !important;
    color: var(--text-primary);
}

[data-theme="dark"] .card {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    color: var(--text-primary);
}

[data-theme="dark"] .navbar,
[data-theme="dark"] .navbar-light {
    background-color: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--card-border);
}

[data-theme="dark"] .navbar-text,
[data-theme="dark"] .dropdown-toggle {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .table {
    background-color: var(--table-bg);
    color: var(--text-primary);
    --bs-table-bg: var(--table-bg);
    --bs-table-striped-bg: var(--table-stripe);
    --bs-table-hover-bg: var(--table-stripe);
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: var(--table-border) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--input-bg) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--dropdown-bg);
    border-color: var(--dropdown-border);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--table-stripe);
}

[data-theme="dark"] .modal-content {
    background-color: var(--modal-bg);
    border-color: var(--card-border);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--card-border);
}

[data-theme="dark"] .footer,
[data-theme="dark"] .bg-light {
    background-color: var(--footer-bg) !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .border {
    border-color: var(--card-border) !important;
}

[data-theme="dark"] .shadow-sm {
    box-shadow: 0 1px 3px var(--shadow-color) !important;
}

[data-theme="dark"] .alert {
    border-color: var(--card-border);
}

[data-theme="dark"] .list-group-item {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text-primary);
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text-primary);
}

[data-theme="dark"] .page-link {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text-primary);
}

[data-theme="dark"] .breadcrumb {
    background-color: transparent;
}

[data-theme="dark"] .breadcrumb-item a {
    color: var(--primary-color);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-theme="dark"] label {
    color: var(--text-primary);
}

/* ========================================
   COMPACT MODE
   ======================================== */
.compact-mode .card {
    padding: 0.5rem !important;
}

.compact-mode .card-body {
    padding: 0.75rem !important;
}

.compact-mode .card-header {
    padding: 0.5rem 0.75rem !important;
}

.compact-mode .sidebar {
    width: 200px;
}

.compact-mode .main-wrapper {
    margin-right: 200px;
}

.compact-mode .table td,
.compact-mode .table th {
    padding: 0.35rem 0.5rem !important;
}

.compact-mode .form-control,
.compact-mode .form-select {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem;
}

.compact-mode .btn {
    padding: 0.25rem 0.75rem !important;
    font-size: 0.875rem;
}

.compact-mode .navbar {
    padding: 0.25rem 0.5rem !important;
}

.compact-mode .container-fluid {
    padding: 0.5rem !important;
}

.compact-mode .sidebar-nav .nav-link {
    padding: 8px 16px !important;
}

.compact-mode .sidebar-nav .nav-link span {
    font-size: 12px;
}

.compact-mode .stat-card {
    padding: 0.75rem !important;
}

/* ========================================
   NO ANIMATIONS MODE
   ======================================== */
.no-animations *,
.no-animations *::before,
.no-animations *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

* {
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--body-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ========================================
   SIDEBAR STYLES - Professional Design v2.0
   ======================================== */
.sidebar {
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0f766e 0%, #115e59 40%, #134e4a 100%);
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-header {
    padding: 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    color: #fff;
    transform: translateX(-3px);
}

.sidebar-brand img {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    min-width: 38px;
    min-height: 38px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
}

.brand-logo-img {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    min-width: 38px;
    min-height: 38px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 10px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name-en {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-name-ar {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav .nav {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-nav .nav-item {
    margin: 2px 10px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    border-right: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    transform: translateX(-3px);
}

.sidebar-nav .nav-link:hover::before {
    opacity: 1;
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.3), rgba(20, 184, 166, 0.2));
    border-right-color: #2dd4bf;
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.2);
}

.sidebar-nav .nav-link.active::before {
    opacity: 0;
}

.sidebar-nav .nav-link i {
    font-size: 18px;
    width: 24px;
    margin-left: 12px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}

.sidebar-nav .nav-link span {
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Remove nav-icon wrapper styling */
.nav-icon {
    display: contents;
}

.nav-section {
    padding: 15px 20px 6px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px 10px 5px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-section-header:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-section-header i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    transition: all 0.3s ease;
}

.nav-section-header:hover i {
    color: rgba(255, 255, 255, 0.8);
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.15);
}

.user-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.user-compact:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    margin-right: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: calc(100vw - 260px);
}

/* Navbar */
.navbar {
    padding: 0.75rem 1.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    min-width: 0;
    overflow-x: hidden;
}

/* Footer */
.footer {
    border-top: 1px solid #e2e8f0;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Stats Cards */
.stat-card {
    border-radius: 0.75rem;
    padding: 1.5rem;
    color: #fff;
}

.stat-card.primary { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-card.success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-card.warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-card.info { background: linear-gradient(135deg, #06b6d4, #0891b2); }

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #374151;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 0.75rem;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Sidebar Overlay for Mobile */
.sidebar-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 ease;
    pointer-events: none;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
        z-index: 1000;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-right: 0;
        max-width: 100vw;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .footer {
        display: none !important;
    }
    
    .main-wrapper {
        margin-right: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Blazor Error UI */
#blazor-error-ui {
    z-index: 9999;
}

/* ========================================
   LANDING PAGE STYLES
   ======================================== */

.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

/* Landing Navigation */
.landing-nav {
    padding: 1rem 0;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
}

.landing-nav .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.landing-nav .nav-brand i {
    color: #3b82f6;
}

.landing-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.landing-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.landing-nav .nav-link:hover {
    color: #fff;
}

/* Hero Section */
.hero-section {
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.2));
    filter: blur(80px);
}

.hero-shape.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.hero-shape.shape-2 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: 10%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(59, 130, 246, 0.2));
}

.hero-shape.shape-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    left: 30%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.1));
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    color: #60a5fa;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-item .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.hero-stats .stat-item .stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Dashboard Preview */
.hero-image {
    position: relative;
    z-index: 1;
}

.dashboard-preview {
    background: #1e293b;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #f59e0b; }
.preview-dot.green { background: #22c55e; }

.preview-content {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    min-height: 300px;
}

.preview-sidebar {
    width: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.preview-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-card {
    height: 60px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
}

.preview-table {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: #0f172a;
}

.section-header {
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    color: #60a5fa;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* Laws Section */
.laws-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.law-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.law-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.law-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.law-content h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.law-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Landing Footer */
.landing-footer {
    padding: 4rem 0 2rem;
    background: #0f172a;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand i {
    color: #3b82f6;
}

.footer-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
}

.footer-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-bottom {
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   AUTH PAGES STYLES
   ======================================== */

.auth-page {
    min-height: 100vh;
    background: #f1f5f9;
}

.auth-container {
    min-height: 100vh;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Auth Branding Side */
.auth-branding {
    width: 50%;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.2));
    filter: blur(80px);
    top: -100px;
    left: -100px;
}

.auth-branding::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(59, 130, 246, 0.2));
    filter: blur(80px);
    bottom: -50px;
    right: -50px;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.branding-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 3rem;
}

.branding-logo i {
    color: #60a5fa;
    font-size: 2rem;
}

.branding-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.branding-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.branding-features .feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: none;
    padding: 0;
}

.branding-features .feature-item i {
    color: #22c55e;
    font-size: 1.25rem;
}

.branding-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.5);
}

/* Auth Form Side */
.auth-form-container {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #fff;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 450px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    color: #64748b;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.auth-form .form-control-lg {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.auth-form .form-control-lg:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    padding: 0 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: #64748b;
    margin-bottom: 1rem;
}

.back-home {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.back-home a {
    color: #64748b;
    text-decoration: none;
}

.back-home a:hover {
    color: #3b82f6;
}

/* Auth Responsive */
@media (max-width: 991.98px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-branding {
        width: 100%;
        padding: 2rem;
        min-height: auto;
    }

    .branding-features {
        display: none;
    }

    .auth-form-container {
        width: 100%;
        padding: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .landing-nav .nav-links {
        gap: 0.75rem;
    }

    .landing-nav .nav-link {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .auth-branding {
        padding: 1.5rem;
    }

    .branding-title {
        font-size: 1.5rem;
    }

    .branding-description {
        font-size: 1rem;
    }

    .auth-form-container {
        padding: 1.5rem;
    }
}

/* ========================================
   NEW DASHBOARD STYLES - Professional Design v2.0
   ======================================== */

/* Dashboard Page Container */
.dashboard-page {
    padding: 1.5rem;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Dashboard Loading */
.dashboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    color: #64748b;
    font-size: 1rem;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.3);
}

.dashboard-header::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.15));
    filter: blur(60px);
    top: -100px;
    left: -50px;
    pointer-events: none;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(59, 130, 246, 0.1));
    filter: blur(50px);
    bottom: -50px;
    right: 10%;
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-info h1 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin: 0;
}

.header-date {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.date-display i {
    color: #60a5fa;
    font-size: 1.25rem;
}

.date-display span {
    color: #fff;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-refresh {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-refresh:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-refresh .spin {
    animation: spin 1s linear infinite;
}

/* Stats Section */
.stats-section {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}

.stat-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    pointer-events: none;
}

.stat-card.stat-employees::before { background: #3b82f6; }
.stat-card.stat-increments::before { background: #22c55e; }
.stat-card.stat-promotions::before { background: #f59e0b; }
.stat-card.stat-leaves::before { background: #06b6d4; }
.stat-card.stat-penalties::before { background: #ef4444; }
.stat-card.stat-thanks::before { background: #8b5cf6; }

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-employees .stat-icon-wrapper { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; }
.stat-increments .stat-icon-wrapper { background: linear-gradient(135deg, #22c55e, #4ade80); color: #fff; }
.stat-promotions .stat-icon-wrapper { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; }
.stat-leaves .stat-icon-wrapper { background: linear-gradient(135deg, #06b6d4, #22d3ee); color: #fff; }
.stat-penalties .stat-icon-wrapper { background: linear-gradient(135deg, #ef4444, #f87171); color: #fff; }
.stat-thanks .stat-icon-wrapper { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; }

.stat-details {
    position: relative;
    z-index: 1;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-employees .stat-value { color: #3b82f6; }
.stat-increments .stat-value { color: #22c55e; }
.stat-promotions .stat-value { color: #f59e0b; }
.stat-leaves .stat-value { color: #06b6d4; }
.stat-penalties .stat-value { color: #ef4444; }
.stat-thanks .stat-value { color: #8b5cf6; }

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.stat-meta {
    display: flex;
    align-items: center;
}

.meta-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background: #f1f5f9;
    color: #64748b;
}

.meta-badge.active { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.meta-badge.warning { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.meta-badge.success { background: rgba(34, 197, 94, 0.1); color: #22c55e; }

.stat-trend {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.stat-trend.up { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.stat-trend.attention { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-trend.warning { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Alerts Section */
.alerts-section {
    margin-bottom: 2rem;
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.alert-card:hover {
    transform: translateX(-5px);
}

.alert-card.alert-warning { border-right: 4px solid #f59e0b; }
.alert-card.alert-danger { border-right: 4px solid #ef4444; }
.alert-card.alert-info { border-right: 4px solid #06b6d4; }

.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-warning .alert-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.alert-danger .alert-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.alert-info .alert-icon { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }

.alert-content {
    flex: 1;
}

.alert-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.alert-content p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.alert-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.alert-warning .alert-action { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.alert-warning .alert-action:hover { background: rgba(245, 158, 11, 0.2); }
.alert-danger .alert-action { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.alert-danger .alert-action:hover { background: rgba(239, 68, 68, 0.2); }
.alert-info .alert-action { color: #06b6d4; background: rgba(6, 182, 212, 0.1); }
.alert-info .alert-action:hover { background: rgba(6, 182, 212, 0.2); }

/* Main Content Section */
.main-content-section {
    margin-bottom: 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.charts-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dashboard-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title i {
    font-size: 1.25rem;
    color: #3b82f6;
}

.header-title h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.total-badge,
.period-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 500;
}

.view-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-btn:hover {
    color: #2563eb;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-width: 100% !important;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: #f8fafc;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: currentColor;
    background: #fff;
}

.action-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.action-btn span {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.action-add { color: #3b82f6; }
.action-list { color: #8b5cf6; }
.action-reports { color: #22c55e; }
.action-stats { color: #f59e0b; }
.action-dept { color: #06b6d4; }
.action-settings { color: #64748b; }

/* Department Stats List */
.dept-stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dept-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dept-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dept-name {
    font-size: 0.85rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.dept-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: #3b82f6;
}

.dept-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.dept-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Lists Section */
.lists-section {
    margin-bottom: 2rem;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.list-card .list-header {
    background: #fafbfc;
}

.list-header.increments .header-title i { color: #22c55e; }
.list-header.promotions .header-title i { color: #f59e0b; }
.list-header.penalties .header-title i { color: #ef4444; }

.count-badge {
    min-width: 32px;
    height: 32px;
    padding: 0 0.75rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    background: #3b82f6;
    color: #fff;
}

.list-header.increments .count-badge { background: #22c55e; }
.list-header.promotions .count-badge { background: #f59e0b; }
.count-badge.danger { background: #ef4444; }

.list-body {
    padding: 0 !important;
}

.employee-list {
    max-height: 350px;
    overflow-y: auto;
}

.employee-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-item:hover {
    background: #f8fafc;
}

.employee-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-left: 1rem;
    flex-shrink: 0;
}

.employee-avatar.increments { background: linear-gradient(135deg, #22c55e, #4ade80); }
.employee-avatar.promotions { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.employee-avatar.penalties { background: linear-gradient(135deg, #ef4444, #f87171); }

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-info strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-info small {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-date {
    text-align: left;
    flex-shrink: 0;
}

.employee-date .date {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.days-remaining {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
}

.days-remaining.success { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.days-remaining.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.days-remaining.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.list-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-top: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.list-footer-link:hover {
    background: #f8fafc;
    color: #2563eb;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

.empty-state.success i { color: #22c55e; }

.empty-state-mini {
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
}

.empty-state-mini i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.empty-state-mini p {
    margin: 0;
    font-size: 0.85rem;
}

/* Activity Section */
.activity-section {
    margin-bottom: 2rem;
}

.activity-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.activity-timeline {
    position: relative;
    padding-right: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    right: -2rem;
    top: 0.25rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #3b82f6;
    transform: translateX(50%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.timeline-marker.success { border-color: #22c55e; box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3); }
.timeline-marker.warning { border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }
.timeline-marker.danger { border-color: #ef4444; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
.timeline-marker.info { border-color: #06b6d4; box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3); }
.timeline-marker.purple { border-color: #8b5cf6; box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3); }

.timeline-content {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    background: #f1f5f9;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.timeline-header strong {
    font-size: 0.95rem;
    color: #1e293b;
}

.event-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
}

.event-badge.success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.event-badge.warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.event-badge.danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.event-badge.info { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.event-badge.purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.event-badge.secondary { background: rgba(100, 116, 139, 0.15); color: #64748b; }

.timeline-description {
    font-size: 0.875rem;
    color: #475569;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.timeline-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Summary Card */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.summary-icon.employees { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; }
.summary-icon.departments { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; }
.summary-icon.grades { background: linear-gradient(135deg, #22c55e, #4ade80); color: #fff; }
.summary-icon.events { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; }

.summary-content {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.summary-label {
    font-size: 0.8rem;
    color: #64748b;
}

.system-status {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.75rem;
}

.status-header > span:first-child {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-indicator.online {
    color: #22c55e;
}

.status-indicator i {
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.status-row span:first-child {
    color: #64748b;
}

.status-row span:last-child {
    color: #1e293b;
    font-weight: 500;
}

/* Responsive Dashboard */
@media (max-width: 1399.98px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lists-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1199.98px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991.98px) {
    .dashboard-page {
        padding: 1rem;
    }

    .dashboard-header {
        padding: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lists-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .dashboard-page {
        padding: 0.75rem;
    }

    .dashboard-header {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .header-info h1 {
        font-size: 1.35rem;
    }

    .header-date {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .alert-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
    }

    .stat-icon-wrapper {
        margin-bottom: 0;
    }

    .stat-trend {
        position: relative;
        top: auto;
        left: auto;
        margin-right: auto;
    }

    .chart-container {
        height: 250px;
    }

    .action-btn {
        padding: 1rem;
    }

    .action-btn i {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .action-btn span {
        font-size: 0.75rem;
    }
}

/* RTL Specific Fixes */
[dir="rtl"] .header-title,
html[dir="rtl"] .header-title,
.header-title {
    text-align: right;
}

.me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

.me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

/* Prevent horizontal scroll */
.main-content {
    overflow-x: hidden;
}

/* Fix for RTL fixed elements - ensure they respect sidebar */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure fixed elements don't overflow on the left */
.main-wrapper [style*="position: fixed"],
.main-wrapper [style*="position:fixed"] {
    max-width: calc(100vw - 260px);
}

@media (max-width: 991.98px) {
    .main-wrapper [style*="position: fixed"],
    .main-wrapper [style*="position:fixed"] {
        max-width: 100vw;
    }
}
