﻿/* START FONTS */

@font-face {
    font-family: 'KUF';
    src: url('../fonts/KUF.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* END FONTS */


/* START BRAND VARIABLES */

:root {
    --brand: #36A0E3;
    --brand-deep: #1E78B4;
    --brand-green: #3B6B58;
    --brand-gray: #555B5C;
    --white: #FFFFFF;
    --page-bg: #F3F7FB; /* icy page background, cards stay white on top of it */
    --text-dark: #2b3032;
    --text-muted: #5b6468;
    --field-border: #dbe3ea;
    --field-bg: #f7f9fa;
    --danger: #c0392b;
    --success: #3B6B58;
    --warning: #c98a12;
}

/* END BRAND VARIABLES */


/* START BASE */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'IBM Plex Sans Arabic', Tahoma, sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-dark);
    background-color: var(--page-bg);
    direction: rtl;
}

h1, h2, h3 {
    font-family: 'KUF', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
    font-weight: normal;
    margin: 0;
}

strong, b, label {
    font-weight: 700;
}

input, button, select, textarea {
    font-family: inherit;
}

/* END BASE */


/* START SPINNER */

.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1080;
    background-color: rgba(20, 50, 80, 0.5);
    align-items: center;
    justify-content: center;
}

    .spinner-overlay.active {
        display: flex;
    }

.spinner-box {
    background-color: var(--white);
    border-radius: 14px;
    padding: 26px 36px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(20, 50, 80, 0.25);
}

.spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px auto;
    border: 4px solid #dcebf6;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
/* logo stays still in the center, the ring turns around it */
.spinner-logo {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 14px auto;
}

    .spinner-logo img {
        position: absolute;
        top: 18px;
        right: 18px;
        bottom: 18px;
        left: 18px;
        width: calc(100% - 36px);
        height: calc(100% - 36px);
        object-fit: contain;
    }

    .spinner-logo .spinner {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        margin: 0;
    }
.spinner-box p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* END SPINNER */


/* START MODAL */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1090;
    background-color: rgba(20, 50, 80, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .modal-overlay.active {
        display: flex;
    }

.modal-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--white);
    border-radius: 16px;
    padding: 30px 26px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(20, 50, 80, 0.28);
}

.modal-icon i {
    font-size: 52px;
    color: var(--danger);
}

.modal-icon.is-success i {
    color: var(--success);
}

.modal-icon.is-warning i {
    color: var(--warning);
}

.modal-icon.is-info i {
    color: var(--brand);
}

.modal-title {
    font-size: 20px;
    color: var(--text-dark);
    margin: 16px 0 8px 0;
}

.modal-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0 0 22px 0;
}

.modal-btn {
    min-width: 120px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    background-color: var(--brand-deep);
    cursor: pointer;
}

    .modal-btn:hover {
        background-color: #175e8f;
    }

/* END MODAL */
/* START NAV GROUPS */

.nav-parent .nav-arrow {
    margin-right: auto;
    font-size: 11px;
    transition: transform 0.25s;
}

.nav-children {
    display: none;
    margin: 2px 22px 8px 0;
    padding-right: 10px;
    border-right: 1px solid var(--sb-line);
}

.nav-group.open .nav-children {
    display: block;
}

.nav-group.open .nav-arrow {
    transform: rotate(180deg);
}

.nav-child {
    display: block;
    margin-bottom: 2px;
    padding: 9px 14px;
    font-size: 14px;
    color: var(--sb-text);
    text-decoration: none;
    border-right: 4px solid transparent;
    border-radius: 12px;
    transition: background-color 0.2s;
}

    .nav-child:hover {
        background-color: var(--sb-hover);
    }

    .nav-child.active {
        background-color: var(--sb-active-bg);
        border-right-color: var(--sb-accent);
        font-weight: 700;
    }

/* END NAV GROUPS */
/* START TOP HEADER */

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: -28px -32px 24px -32px;
    padding: 0 32px;
    min-height: 68px;
    background-color: var(--white);
    border-bottom: 1px solid var(--field-border);
    box-shadow: 0 2px 12px rgba(30, 120, 180, 0.06);
    position: sticky;
    top: 0;
    z-index: 800;
}

.top-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--brand-deep);
    background-color: #e6f2fb;
    border-radius: 12px;
}

.top-header h1 {
    font-size: 19px;
    color: var(--text-dark);
}

.top-header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-header-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.4;
    direction: ltr;
}

.top-header-date {
    font-size: 12.5px;
    color: var(--text-muted);
}

.top-header-clock {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.top-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 14px;
    color: var(--brand-deep);
    background-color: #e6f2fb;
    border-radius: 999px;
}

@media (max-width: 900px) {
    .top-header {
        margin: 0 -16px 18px -16px;
        padding: 10px 16px;
        top: var(--mobile-bar-h);
    }

    .top-header-time {
        display: none;
    }
}

/* END TOP HEADER */