/* =====================================================
   AKAR WEB — Navy & Grey theme (ألوان اللوغو)
   Sidebar shell (pinned right, RTL), Bootstrap 5 restyle,
   landing components, calendar, login.
   Loaded after Bootstrap RTL. No build step.
===================================================== */

:root {
    --primary-color: #0e3f63;   /* كحلي اللوغو */
    --primary-dark: #082c47;
    --primary-light: #2f7fc1;   /* أزرق فولاذي للتدرجات */
    --secondary-color: #2b3a48;
    --secondary-light: #808080;  /* رمادي اللوغو */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --text-dark: #2c2c2c;
    --text-muted: #6c757d;
    --page-bg: #f3f6fa;
    --sidebar-bg: #0b2a40;
    --border-radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-rest: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(14, 63, 99, 0.25);
    --accent-gradient: linear-gradient(135deg, #0e3f63, #2f7fc1);
    --button-gradient: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --dark-gradient: linear-gradient(135deg, #123f66 0%, #081f33 100%);
    --accent-gold: #e0a83a;
    --accent-gold-dark: #c48d22;
    --sidebar-width: 240px;

    /* Re-point Bootstrap primary at the logo navy */
    --bs-primary: #0e3f63;
    --bs-primary-rgb: 14, 63, 99;
    --bs-link-color: #0e3f63;
    --bs-link-color-rgb: 14, 63, 99;
    --bs-link-hover-color: #2f7fc1;
    --bs-link-hover-color-rgb: 47, 127, 193;
    --bs-body-font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    --bs-body-color: #2c2c2c;
    --bs-body-bg: #f3f6fa;
    --bs-border-radius: 8px;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: var(--page-bg);
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
}

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

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 1040;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-header:hover {
    color: #fff;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-header .brand-text strong {
    font-size: 0.95rem;
    font-weight: 700;
}

.sidebar-header .brand-text small {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
}

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

.nav-section {
    padding: 14px 18px 6px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    border-right: 3px solid transparent;
}

.sidebar-nav .nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav .nav-item.active {
    border-right-color: var(--accent-gold);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 0.12));
}

.sidebar-nav .nav-item:hover i,
.sidebar-nav .nav-item.active i {
    color: var(--accent-gold);
}

.nav-section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 18px;
}

.sidebar-nav .nav-item.logout {
    color: #ff6b6b;
}

.sidebar-nav .nav-item.logout i {
    color: #ff6b6b;
}

.sidebar-nav .nav-item.logout:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff8787;
}

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.sidebar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-user strong {
    color: #fff;
    font-size: 0.85rem;
    display: block;
    line-height: 1.2;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    margin-right: auto;
    font-size: 1.1rem;
    cursor: pointer;
}

.app-main {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--white);
    padding: 14px 28px;
    box-shadow: var(--shadow-rest);
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header h1 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--secondary-color);
}

.app-header .header-spacer {
    flex: 1;
}

.header-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 25px;
    background: rgba(14, 63, 99, 0.1);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.header-chip.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #b98900;
}

.header-chip.danger {
    background: rgba(220, 53, 69, 0.12);
    color: #c82333;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--secondary-color);
    font-size: 1.25rem;
    cursor: pointer;
}

.mobile-menu-btn:hover {
    background: var(--light-gray);
}

.app-content {
    padding: 24px 28px 40px;
    flex: 1;
}

.app-content > .container,
.app-content > .container-fluid {
    max-width: 100%;
}

.app-footer {
    padding: 16px 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--medium-gray);
    background: var(--white);
}

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

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

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 210px;
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        width: 270px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-right: 0;
    }

    .mobile-menu-btn,
    .sidebar-close-btn {
        display: inline-flex;
    }

    .app-header {
        padding: 12px 16px;
    }

    .app-header h1 {
        font-size: 1.05rem;
    }

    .app-content {
        padding: 16px 16px 32px;
    }

    .header-chip {
        display: none;
    }
}

/* ==================== BOOTSTRAP RESTYLE ==================== */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
}

.btn-sm {
    padding: 0.3rem 0.85rem;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 0.7rem 1.75rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-group-vertical > .btn,
.btn-group > .btn,
.input-group > .btn {
    transform: none !important;
}

.btn-primary {
    --bs-btn-bg: #0e3f63;
    --bs-btn-border-color: #0e3f63;
    --bs-btn-hover-bg: #082c47;
    --bs-btn-hover-border-color: #082c47;
    --bs-btn-active-bg: #082c47;
    --bs-btn-active-border-color: #082c47;
    --bs-btn-disabled-bg: #0e3f63;
    --bs-btn-disabled-border-color: #0e3f63;
    --bs-btn-focus-shadow-rgb: 14, 63, 99;
    background-image: var(--button-gradient);
    border: none;
    box-shadow: 0 4px 12px rgba(14, 63, 99, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    box-shadow: var(--shadow-hover);
    background-image: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-outline-primary {
    --bs-btn-color: #0e3f63;
    --bs-btn-border-color: #0e3f63;
    --bs-btn-hover-bg: #0e3f63;
    --bs-btn-hover-border-color: #0e3f63;
    --bs-btn-active-bg: #082c47;
    --bs-btn-active-border-color: #082c47;
    --bs-btn-focus-shadow-rgb: 14, 63, 99;
}

.btn-secondary {
    --bs-btn-bg: #5a5a5c;
    --bs-btn-border-color: #5a5a5c;
    --bs-btn-hover-bg: #2b3a48;
    --bs-btn-hover-border-color: #2b3a48;
}

.btn-info {
    --bs-btn-bg: #1a9bb5;
    --bs-btn-border-color: #1a9bb5;
    --bs-btn-hover-bg: #15809a;
    --bs-btn-hover-border-color: #15809a;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}

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

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

.border-primary {
    border-color: var(--primary-color) !important;
}

.bg-info {
    background-color: #1a9bb5 !important;
}

.text-info {
    color: #1a9bb5 !important;
}

.badge {
    border-radius: 20px;
    padding: 0.35em 0.75em;
    font-weight: 600;
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-rest);
    overflow: hidden;
}

.card-header {
    font-weight: 600;
    border-bottom: 1px solid var(--medium-gray);
    background: var(--light-gray);
}

.card-header.bg-primary {
    background: var(--accent-gradient) !important;
    color: #fff;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745, #34ce57) !important;
}

.card-footer {
    background: var(--light-gray);
    border-top: 1px solid var(--medium-gray);
}

.form-control,
.form-select {
    background: var(--light-gray);
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.9rem;
    transition: var(--transition);
}

.form-control-sm,
.form-select-sm {
    padding: 0.35rem 0.65rem;
}

.form-control:focus,
.form-select:focus {
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 63, 99, 0.1);
}

.form-control[readonly] {
    background: var(--medium-gray);
}

.form-label,
label {
    font-weight: 500;
    color: var(--secondary-color);
}

.input-group-text {
    border-radius: var(--radius-sm);
    border: 2px solid var(--medium-gray);
    background: var(--light-gray);
}

.table {
    --bs-table-striped-bg: rgba(14, 63, 99, 0.03);
    --bs-table-hover-bg: rgba(14, 63, 99, 0.07);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.7rem 0.75rem;
    vertical-align: middle;
}

.table thead th,
.table-primary,
.table > thead.table-primary > tr > th {
    --bs-table-bg: #f0f2f5;
    --bs-table-color: #2b3a48;
    background: #f0f2f5 !important;
    color: var(--secondary-color) !important;
    font-weight: 700;
    font-size: 0.88rem;
    border-bottom: 2px solid rgba(14, 63, 99, 0.35);
}

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

.table tbody tr:hover {
    background: rgba(14, 63, 99, 0.07);
}

.table-bordered > :not(caption) > * > * {
    border-color: var(--medium-gray);
}

.table-responsive {
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    background: var(--white);
    box-shadow: var(--shadow-rest);
}

.alert {
    border-radius: var(--border-radius);
    border-width: 1px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.12), rgba(40, 167, 69, 0.05));
    border-color: rgba(40, 167, 69, 0.4);
    color: #1e7e34;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12), rgba(220, 53, 69, 0.05));
    border-color: rgba(220, 53, 69, 0.4);
    color: #b02a37;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.18), rgba(255, 193, 7, 0.06));
    border-color: rgba(255, 193, 7, 0.5);
    color: #8a6d00;
}

.alert-info {
    background: linear-gradient(135deg, rgba(0, 131, 176, 0.12), rgba(0, 131, 176, 0.05));
    border-color: rgba(0, 131, 176, 0.4);
    color: #005f80;
}

.pagination {
    gap: 4px;
}

.pagination .page-link {
    border-radius: 20px !important;
    border: 1px solid var(--medium-gray);
    color: var(--secondary-color);
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: rgba(14, 63, 99, 0.1);
    color: var(--primary-dark);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--button-gradient);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #b0b3b8;
}

.pagedList a,
.pagedList span {
    border-radius: 20px;
    color: var(--primary-color);
}

.pagedList .active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.pagedList a:hover {
    background: var(--primary-dark);
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.modal-header {
    background: var(--light-gray);
    border-bottom: 1px solid var(--medium-gray);
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 8px;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.dropdown-item:hover {
    background: rgba(14, 63, 99, 0.1);
    color: var(--primary-dark);
}

.nav-pills .nav-link.active {
    background: var(--button-gradient);
}

/* Page titles used across the existing views */
.app-content h2.display-6 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-color) !important;
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 24px !important;
}

.app-content h2.display-6::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
}

/* ==================== SECTION TITLE (landing) ==================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    display: inline-block;
    position: relative;
    padding-bottom: 16px;
    margin-bottom: 12px;
}

.section-title h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.section-padding {
    padding: 70px 0;
}

.section-light {
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

/* ==================== HERO ==================== */
.hero-section {
    position: relative;
    background: var(--dark-gradient);
    border-radius: var(--border-radius);
    color: #fff;
    padding: 70px 40px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-section::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 127, 193, 0.45), transparent 65%);
    top: -160px;
    left: -120px;
    pointer-events: none;
}

.hero-section::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 168, 58, 0.22), transparent 65%);
    bottom: -120px;
    right: 10%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.9s ease both;
}

.hero-content h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 18px;
}

.hero-content h1 span {
    color: var(--accent-gold);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    max-width: 560px;
    margin-bottom: 28px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-art {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease both;
}

.hero-art img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-badge i {
    color: var(--accent-gold);
}

.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 50px;
    background: var(--button-gradient);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(14, 63, 99, 0.3);
    transition: var(--transition);
    border: none;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: #fff;
}

.btn-secondary-custom {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 50px;
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary-custom:hover {
    background: #fff;
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ==================== FEATURE CARDS ==================== */
.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 36px 26px;
    text-align: center;
    height: 100%;
    box-shadow: var(--shadow-rest);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: rgba(14, 63, 99, 0.35);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 8px 20px rgba(14, 63, 99, 0.3);
    transition: transform 0.6s ease;
}

.feature-card:hover .feature-icon {
    transform: rotateY(180deg);
}

.feature-card h4 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0;
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-rest);
    transition: var(--transition);
}

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

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f7b733, #fc4a1a);
}

.stat-icon.success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.stat-icon.info {
    background: linear-gradient(135deg, #2f7fc1, #5aa9e6);
}

.stat-icon.dark {
    background: linear-gradient(135deg, #808080, #4f4f4f);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
}

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

/* ==================== PRICING ==================== */
.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 34px 26px;
    text-align: center;
    height: 100%;
    box-shadow: var(--shadow-rest);
    position: relative;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.pricing-card.popular {
    border-color: var(--primary-color);
}

.pricing-ribbon {
    position: absolute;
    top: 16px;
    left: -30px;
    transform: rotate(-35deg);
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 40px;
}

.pricing-card h4 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
}

.pricing-period {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.pricing-card p.desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-height: 48px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 18px 0 24px;
    text-align: right;
    flex: 1;
}

.pricing-features li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--medium-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li i {
    color: var(--primary-color);
}

/* ==================== LOGIN ==================== */
.auth-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.auth-card-header {
    background: var(--dark-gradient);
    color: #fff;
    padding: 30px 26px;
    text-align: center;
    position: relative;
}

.auth-card-header .auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 14px;
    box-shadow: 0 8px 20px rgba(14, 63, 99, 0.35);
}

.auth-card-header h3 {
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
}

.auth-card-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.auth-card-body {
    padding: 30px 26px;
}

/* ==================== VIDEOS / DEVELOPER ==================== */
.video-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-rest);
    padding: 18px;
    height: 100%;
}

.video-card h5 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.video-frame {
    position: relative;
    padding-top: 56.25%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--secondary-color);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.dev-card {
    background: var(--dark-gradient);
    color: #fff;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.dev-card h4,
.dev-card h5 {
    color: #fff;
}

.dev-card p {
    color: rgba(255, 255, 255, 0.75);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.social-link {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-4px);
    color: #fff;
    box-shadow: var(--shadow-hover);
}

.cta-block {
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(14, 63, 99, 0.3);
    border-bottom: 5px solid var(--accent-gold);
}

.cta-block h2 {
    color: #fff;
    font-size: 1.7rem;
}

.cta-block p {
    color: rgba(255, 255, 255, 0.9);
}

.cta-block .btn-secondary-custom:hover {
    color: var(--primary-dark);
}

/* ==================== CALENDAR ==================== */
.calendar-toolbar {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-rest);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.calendar-toolbar .month-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 8px;
    min-width: 170px;
    text-align: center;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--medium-gray);
    background: var(--white);
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    border-color: var(--primary-color);
    background: rgba(14, 63, 99, 0.1);
    color: var(--primary-dark);
}

.calendar-toolbar .month-picker {
    max-width: 180px;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-inline-start: auto;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--light-gray);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.calendar-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.summary-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-rest);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-inline-start: 4px solid var(--primary-color);
}

.summary-card .count {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.1;
}

.summary-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--secondary-color);
    padding: 10px 4px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-rest);
}

.calendar-weekday.weekend {
    color: var(--primary-dark);
    background: rgba(14, 63, 99, 0.08);
}

.day-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-rest);
    min-height: 118px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.day-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(14, 63, 99, 0.3);
}

.day-card.other-month {
    background: transparent;
    box-shadow: none;
    border: 1px dashed var(--medium-gray);
    opacity: 0.6;
}

.day-card.other-month:hover {
    transform: none;
}

.day-card.today {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 63, 99, 0.15);
}

.day-card.weekend:not(.other-month) {
    background: #fbfdfd;
}

.day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.day-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.day-card.today .day-number {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 10px rgba(14, 63, 99, 0.35);
}

.day-weekday {
    display: none;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.day-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--light-gray);
    border-radius: 10px;
    padding: 1px 7px;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-dark);
    background: var(--light-gray);
    border-inline-start: 3px solid var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

.event-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-chip i {
    font-size: 0.72rem;
    flex-shrink: 0;
}

.event-chip:hover {
    transform: translateX(-2px);
    color: var(--text-dark);
    box-shadow: var(--shadow-rest);
}

.event-chip.contract-start {
    background: rgba(14, 63, 99, 0.12);
    border-inline-start-color: var(--primary-color);
}

.event-chip.contract-start i {
    color: var(--primary-dark);
}

.event-chip.contract-end {
    background: rgba(255, 193, 7, 0.16);
    border-inline-start-color: #ffc107;
}

.event-chip.contract-end i {
    color: #b98900;
}

.event-chip.payment {
    background: rgba(40, 167, 69, 0.12);
    border-inline-start-color: #28a745;
}

.event-chip.payment i {
    color: #1e7e34;
}

.event-chip.expense {
    background: rgba(220, 53, 69, 0.1);
    border-inline-start-color: #dc3545;
}

.event-chip.expense i {
    color: #c82333;
}

.event-chip.subscription {
    background: rgba(0, 131, 176, 0.12);
    border-inline-start-color: #1a9bb5;
}

.event-chip.subscription i {
    color: #1a9bb5;
}

.event-more {
    font-size: 0.7rem;
    color: var(--primary-dark);
    font-weight: 600;
    text-align: center;
}

.legend-dot.contract-start { background: var(--primary-color); }
.legend-dot.contract-end { background: #ffc107; }
.legend-dot.payment { background: #28a745; }
.legend-dot.expense { background: #dc3545; }
.legend-dot.subscription { background: #6f42c1; }

@media (max-width: 991px) {
    .calendar-grid {
        gap: 5px;
    }

    .day-card {
        min-height: 96px;
        padding: 6px;
    }

    .event-chip span {
        display: none;
    }

    .event-chip {
        justify-content: center;
        padding: 3px;
    }
}

@media (max-width: 767px) {
    .calendar-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .calendar-weekday {
        display: none;
    }

    .day-card.other-month,
    .day-card.empty-day {
        display: none;
    }

    .day-card {
        min-height: auto;
    }

    .day-weekday {
        display: inline;
    }

    .event-chip span {
        display: inline;
    }

    .event-chip {
        justify-content: flex-start;
        padding: 5px 10px;
        white-space: normal;
    }

    .calendar-legend {
        margin-inline-start: 0;
    }

    .hero-section {
        padding: 44px 22px;
    }

    .hero-content h1 {
        font-size: 1.9rem;
    }

    .hero-content p {
        font-size: 0.98rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .section-padding {
        padding: 44px 0;
    }
}

/* ==================== MISC ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.4rem;
    color: rgba(14, 63, 99, 0.5);
    margin-bottom: 12px;
}

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

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

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== NAVY + GOLD PAIRING ==================== */
/* الزر الرئيسي فوق الخلفيات الكحلية يكون ذهبياً ليبرز */
.hero-section .btn-primary-custom,
.cta-block .btn-primary-custom {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #14202b;
    box-shadow: 0 4px 15px rgba(224, 168, 58, 0.35);
}

.hero-section .btn-primary-custom:hover,
.cta-block .btn-primary-custom:hover {
    color: #14202b;
    box-shadow: 0 8px 25px rgba(224, 168, 58, 0.45);
}

.hero-art img {
    border-color: rgba(224, 168, 58, 0.45);
}

.auth-card-header .auth-icon {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    box-shadow: 0 8px 20px rgba(224, 168, 58, 0.35);
}

.day-card.today .day-number {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    box-shadow: 0 4px 10px rgba(224, 168, 58, 0.4);
}

/* ==================== COLLAPSIBLE FILTER CARDS ==================== */
.filter-toggle {
    cursor: pointer;
    user-select: none;
}

.filter-toggle h6 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-toggle .filter-chevron {
    margin-inline-start: auto;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.filter-toggle:not(.collapsed) .filter-chevron {
    transform: rotate(180deg);
}

/* ==================== TEXT ON DARK SURFACES ==================== */
/* قاعدة لون العناوين العامة كانت تتغلب على text-white داخل الترويسات الداكنة */
:where(.bg-primary, .bg-success, .bg-info, .bg-secondary, .bg-dark, .bg-danger, .text-white, .text-bg-primary, .text-bg-dark, .text-bg-danger, .text-bg-success)
    :is(h1, h2, h3, h4, h5, h6, p, small, label, .form-label, .text-muted, .card-title, .card-text) {
    color: #fff !important;
}

.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-info,
.card-header.bg-dark,
.card-header.bg-secondary,
.card-header.bg-danger {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-header.bg-primary .btn-light,
.card-header.bg-primary .btn-light i {
    color: var(--secondary-color) !important;
    text-shadow: none;
}

/* ==================== EMPTY VALIDATION SUMMARY ==================== */
/* ملخص التحقق يُرسم كصندوق فارغ عندما لا توجد أخطاء — نخفيه حتى تظهر أخطاء فعلية */
.validation-summary-valid,
.alert:empty {
    display: none;
}

.validation-summary-errors ul {
    margin: 0;
    padding-inline-start: 1.2rem;
}

/* ==================== WHATSAPP SUPPORT BUTTON ==================== */
/* نفس شكل زر تسجيل الدخول (btn-primary) مع لون واتساب وأيقونته */
.btn-whatsapp {
    --bs-btn-color: #fff;
    --bs-btn-bg: #25d366;
    --bs-btn-border-color: #25d366;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1fb855;
    --bs-btn-hover-border-color: #1fb855;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1aa64c;
    --bs-btn-active-border-color: #1aa64c;
    --bs-btn-focus-shadow-rgb: 37, 211, 102;
    background-image: linear-gradient(135deg, #25d366, #1aa64c);
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
    background-image: linear-gradient(135deg, #1aa64c, #25d366);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

@media print {
    .btn-whatsapp {
        display: none !important;
    }
}

/* ==================== COMPACT HEADER ON MOBILE ==================== */
.app-header h1 {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-actions .btn .btn-label {
    margin-inline-start: 6px;
}

@media (max-width: 767px) {
    .app-header {
        flex-wrap: nowrap;
        padding: 8px 12px;
        gap: 10px;
        min-height: 56px;
    }

    .app-header h1 {
        flex: 1;
        font-size: 1rem;
    }

    .app-header .header-spacer {
        display: none;
    }

    .header-actions {
        gap: 6px;
    }

    /* الأزرار تصبح أيقونات دائرية فقط حتى لا يلتف الشريط على سطرين */
    .header-actions .btn {
        width: 38px;
        height: 38px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1rem;
    }

    .header-actions .btn .btn-label {
        display: none;
    }

    .mobile-menu-btn {
        padding: 4px 8px;
    }
}
