body {
    background-color: ghostwhite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px grey;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: gray;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: lightblue;
}

/* Overlay button on the 404 page */
.overlay .btn {
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* make scroll horizontal in tables */
.table-responsive {
    overflow-x: auto;
    white-space: nowrap;
}

/* Admin shell: sidebar (static >=992px, offcanvas drawer below) + main column */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0; /* lets wide tables/canvas scroll inside instead of widening the page */
    display: flex;
    flex-direction: column;
}

.admin-sidebar {
    --bs-offcanvas-width: 260px;
}

@media (min-width: 992px) {
    /* offcanvas-lg goes static here and force-clears its background — restore the dark fill */
    .admin-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        flex: 0 0 260px;
        width: 260px;
        overflow-y: auto;
        background-color: var(--bs-dark) !important;
    }
}

.admin-sidebar .sidebar-heading {
    font-size: .72rem;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .55);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, .75);
}

.admin-sidebar .nav-link:hover {
    color: #fff;
}

.admin-sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, .12);
    color: #fff;
}

/* ── Arabic (RTL) typography ───────────────────────────────────────────────
   Self-hosted Cairo (woff2 under public/vendor/fonts/cairo), consistent with
   the offline-first vendoring of bootstrap — no CDN dependency. Applies only
   when the panel is in RTL (Arabic selected); LTR/English is untouched. The
   system Arabic stack is the fallback if a woff2 fails to load. */
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../vendor/fonts/cairo/cairo-arabic-400-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../vendor/fonts/cairo/cairo-arabic-700-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../vendor/fonts/cairo/cairo-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../vendor/fonts/cairo/cairo-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
}
