/*
 * Modern admin shell (November 2026).
 *
 * The brand of the React site (teal #056b5f, yellow #ffe471, IBM Plex Sans Arabic) over the
 * Onest admin. Loaded after style.css by backend/master and backend/auth/master. Everything is
 * scoped to body.wa, and the old --ot-* theme variables are pointed at the brand so the admin
 * pages that still use the old components follow along. Light is body.default-theme, dark is
 * body.dark-theme (theme.js, saved in localStorage "theme_mode").
 */

/* ---------- fonts (vendored from @fontsource, OFL) ---------- */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-arabic-400-normal.woff2) format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-arabic-500-normal.woff2) format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-arabic-600-normal.woff2) format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 700;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-arabic-700-normal.woff2) format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-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: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-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: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-latin-500-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: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-latin-600-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: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-display: swap;
    font-weight: 700;
    src: url(../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-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;
}
@font-face {
    font-family: 'Anton';
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url(../fonts/anton-latin-400-normal.woff2) format('woff2');
}

/* ---------- tokens ---------- */
body.wa {
    --wa-font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --wa-primary: #056b5f;
    --wa-primary-hover: #045449;
    --wa-primary-text: #056b5f;
    --wa-primary-soft: #e6f2ef;
    --wa-primary-ring: rgba(5, 107, 95, 0.18);
    --wa-accent: #ffe471;
    --wa-accent-soft: #fff6cf;
    --wa-accent-ink: #7a5d00;

    --wa-page: #f4f6f5;
    --wa-surface: #ffffff;
    --wa-surface-2: #f7f9f8;
    --wa-surface-3: #eef2f1;
    --wa-border: #e3e9e7;
    --wa-heading: #141414;
    --wa-text: #3c4744;
    --wa-muted: #6a7672;

    --wa-success: #15803d;
    --wa-success-soft: #e7f6ec;
    --wa-danger: #b42318;
    --wa-danger-soft: #fdecea;

    --wa-shadow: 0 1px 2px rgba(16, 32, 29, 0.04), 0 2px 10px -4px rgba(16, 32, 29, 0.08);
    --wa-shadow-lg: 0 18px 40px -16px rgba(16, 32, 29, 0.28);
    --wa-radius: 16px;
    --wa-radius-sm: 10px;

    --wa-sidebar: 272px;
    --wa-sidebar-mini: 88px;
    --wa-header: 72px;
    --wa-gutter: 28px;

    /* the Onest variables the old components read */
    --font-Inter: var(--wa-font);
    --ot-primary: var(--wa-primary);
    --bodybg: var(--wa-page);
    --theme-bg: var(--wa-page);
    --header-bg: var(--wa-surface);
    --ot-bg-primary: var(--wa-page);
    --ot-bg-secondary: var(--wa-surface);
    --ot-bg-secondary-opacity: var(--wa-surface);
    --ot-text-title: var(--wa-heading);
    --ot-text-subtitle: var(--wa-text);
    --ot-text-primary: var(--wa-muted);
    --ot-border-primary: var(--wa-border);
    --ot-bg-table-thead: var(--wa-surface-2);
    --ot-bg-table-tbody: var(--wa-surface-2);
    --ot-border-table: var(--wa-border);
    --ot-border-table-thead: var(--wa-border);
    --ot-border-table-card-header: var(--wa-border);
    --ot-bg-badge-light-primary: var(--wa-primary-soft);
    --ot-text-badge-light-primary: var(--wa-primary-text);
    --theme-shadow: var(--wa-shadow);
    --white: var(--wa-surface);

    font-family: var(--wa-font);
    color: var(--wa-text);
    background: var(--wa-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.wa.dark-theme {
    --wa-primary: #0d7f70;
    --wa-primary-hover: #109483;
    --wa-primary-text: #6fd1bf;
    --wa-primary-soft: #1c3934;
    --wa-primary-ring: rgba(111, 209, 191, 0.22);
    --wa-accent-soft: #3a3418;
    --wa-accent-ink: #ffe471;

    --wa-page: #0b100f;
    --wa-surface: #141d1b;
    --wa-surface-2: #1a2523;
    --wa-surface-3: #22302d;
    --wa-border: #26332f;
    --wa-heading: #eef3f1;
    --wa-text: #c6d3cf;
    --wa-muted: #8ea29c;

    --wa-success: #5ad38a;
    --wa-success-soft: #173326;
    --wa-danger: #ff8a7a;
    --wa-danger-soft: #3a1d1a;

    --wa-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --wa-shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.6);

    --ot-bg-tertiary: var(--wa-surface-2);
    --ot-bg-table-card: var(--wa-surface);
    --ot-bg-table-card-header: var(--wa-surface);
    --ot-bg-table-toolbar-per-page: var(--wa-surface-2);
    --ot-border-table-toolbar-per-page: var(--wa-border);
    --ot-bg-table-toolbar-search: var(--wa-surface-2);
    --ot-border-table-toolbar-search: var(--wa-border);
    --ot-bg-table-pagination: var(--wa-surface);
    --ot-border-table-pagination: var(--wa-border);
    --body_bg: var(--wa-page);
    --card_bg: var(--wa-surface);
    --dropdown_bg: var(--wa-surface-2);
    --input_bg: var(--wa-surface-2);
    --input_bg_focus: var(--wa-surface-3);
    --border_1: var(--wa-border);
    --border_2: var(--wa-border);
    --border_3: var(--wa-surface-3);
    --title_text: var(--wa-heading);
    --body_text: var(--wa-muted);
    --section_title: var(--wa-heading);

    color-scheme: dark;
}

body.wa h1,
body.wa h2,
body.wa h3,
body.wa h4,
body.wa h5,
body.wa h6,
body.wa strong {
    font-family: var(--wa-font);
}

body.wa a {
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

body.wa :focus-visible {
    outline: 2px solid var(--wa-primary-text);
    outline-offset: 2px;
}

/* ---------- top bar ---------- */
body.wa #layout-wrapper .header {
    height: var(--wa-header);
    inset-inline-start: var(--wa-sidebar);
    inset-inline-end: 0;
    gap: 16px;
    padding: 0 var(--wa-gutter) !important;
    border-bottom: 1px solid var(--wa-border);
    background: color-mix(in srgb, var(--wa-surface) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    transition: inset-inline-start 0.3s;
    z-index: 25;
}

body.wa #layout-wrapper .header.on-scroll {
    box-shadow: 0 6px 24px -18px rgba(16, 32, 29, 0.45);
}

body.wa #layout-wrapper.half-expand .header {
    inset-inline-start: var(--wa-sidebar-mini);
}

.wa-topbar-start,
.wa-topbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wa-topbar-end {
    flex-shrink: 0;
}

.wa-topbar-title {
    min-width: 0;
    line-height: 1.25;
}

.wa-topbar-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--wa-muted);
}

body.wa .wa-topbar-heading {
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    font-weight: 600;
    color: var(--wa-heading);
    white-space: nowrap;
    text-overflow: ellipsis;
}

body.wa .header .wa-icon-btn,
body.wa .wa-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    background: var(--wa-surface);
    color: var(--wa-text);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

body.wa .header .wa-icon-btn:hover,
body.wa .wa-icon-btn:hover,
body.wa .header .show > .wa-icon-btn {
    border-color: transparent;
    background: var(--wa-primary-soft);
    color: var(--wa-primary-text);
}

body.wa .header .wa-icon-btn i {
    color: inherit;
    font-size: inherit;
}

/* the old toggles are styled by style.css as arrows; ours are plain buttons */
body.wa .header .close-toggle {
    transform: none;
}

body.wa .header .half-expand-toggle.wa-icon-btn {
    display: none;
}

@media (min-width: 992px) {
    body.wa .header .half-expand-toggle.wa-icon-btn {
        display: inline-flex;
    }

    body.wa .header .close-toggle.wa-icon-btn {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    body.wa .header .close-toggle.wa-icon-btn {
        display: inline-flex !important;
    }
}

body.wa .header .header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.wa .header .header-control-item {
    margin: 0;
}

body.wa .header .theme_dropdown .dropdown-menu,
body.wa .wa-account-menu {
    min-width: 200px;
    margin-top: 8px !important;
    padding: 6px;
    border: 1px solid var(--wa-border);
    border-radius: 14px;
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow-lg);
}

body.wa .header .theme_dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--wa-text);
    cursor: pointer;
}

body.wa .header .theme_dropdown .dropdown-item:hover {
    background: var(--wa-surface-2);
}

body.wa .header .theme_dropdown .dropdown-item.active {
    background: var(--wa-primary-soft);
    color: var(--wa-primary-text);
}

/* account button */
body.wa .header .wa-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 3px;
    padding-inline-end: 12px;
    border: 1px solid var(--wa-border);
    border-radius: 999px;
    background: var(--wa-surface);
    color: var(--wa-text);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

body.wa .header .wa-account-btn:hover,
body.wa .header .wa-account-btn[aria-expanded='true'] {
    border-color: var(--wa-primary-soft);
    background: var(--wa-primary-soft);
}

.wa-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--wa-primary-soft);
    color: var(--wa-primary-text);
    font-size: 15px;
    font-weight: 600;
}

.wa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wa-account-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 160px;
    line-height: 1.2;
    text-align: start;
}

.wa-account-name {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    color: var(--wa-heading);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wa-account-role {
    font-size: 12px;
    color: var(--wa-muted);
}

body.wa .header .wa-account-btn .la-angle-down {
    font-size: 13px;
    color: var(--wa-muted);
}

body.wa .wa-account-menu {
    min-width: 240px;
}

.wa-account-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--wa-border);
}

.wa-account-head .wa-account-text {
    max-width: 170px;
}

.wa-account-email {
    overflow: hidden;
    font-size: 12px;
    color: var(--wa-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: end;
}

body.wa .wa-account-menu .wa-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    font-size: 14px;
    color: var(--wa-text);
    text-align: start;
}

body.wa .wa-account-menu .wa-menu-item i {
    font-size: 18px;
    color: var(--wa-muted);
}

body.wa .wa-account-menu .wa-menu-item:hover,
body.wa .wa-account-menu .wa-menu-item.mm-active {
    background: var(--wa-surface-2);
    color: var(--wa-heading);
}

body.wa .wa-account-menu .wa-menu-item.is-danger,
body.wa .wa-account-menu .wa-menu-item.is-danger i {
    color: var(--wa-danger);
}

body.wa .wa-account-menu .wa-menu-item.is-danger:hover {
    background: var(--wa-danger-soft);
}

@media (max-width: 767.98px) {
    body.wa #layout-wrapper .header {
        padding: 0 16px !important;
    }

    .wa-account-text,
    body.wa .header .wa-account-btn .la-angle-down,
    .wa-topbar-eyebrow,
    body.wa .header .md-none {
        display: none !important;
    }

    body.wa .header .wa-account-btn {
        padding: 3px;
    }

    body.wa .wa-account-menu .wa-account-text {
        display: flex !important;
    }
}

/* ---------- sidebar ---------- */
body.wa #layout-wrapper .sidebar {
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: var(--wa-sidebar);
    border-inline-end: 1px solid var(--wa-border);
    background: var(--wa-surface);
    transition: width 0.3s, inset-inline-start 0.3s;
}

body.wa #layout-wrapper .sidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: var(--wa-header);
    min-height: var(--wa-header);
    padding: 0 20px !important;
    border-bottom: 1px solid var(--wa-border);
    background: var(--wa-surface);
}

body.wa .sidebar .sidebar-header .close-toggle {
    display: none;
}

.wa-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.wa-brand-mark {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.wa-brand-mark img {
    position: absolute;
}

.wa-brand-mark .wa-brand-base {
    inset: 0 0 6.37% 0;
    width: 100%;
    height: 93.63%;
}

.wa-brand-mark .wa-brand-accent {
    inset: 5.57% 1.21% 0 1.08%;
    width: 97.71%;
    height: 94.43%;
}

.wa-brand .wa-on-dark,
body.wa.dark-theme .wa-brand .wa-on-light {
    display: none;
}

body.wa.dark-theme .wa-brand .wa-on-dark {
    display: block;
}

.wa-brand-word {
    font-family: 'Anton', 'Impact', sans-serif;
    color: var(--wa-primary-text);
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.wa-brand-word span {
    display: block;
}

.wa-brand-word span:first-child {
    font-size: 15px;
    line-height: 16px;
}

.wa-brand-word span:last-child {
    font-size: 17.3px;
    line-height: 19px;
}

body.wa #layout-wrapper .sidebar .sidebar-menu {
    height: calc(100vh - var(--wa-header));
    padding: 14px 0 24px;
}

body.wa .wa-menu-label {
    display: block;
    padding: 4px 26px 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--wa-muted);
}

/* first-level items */
body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > a {
    gap: 12px;
    margin: 2px 12px;
    padding: 10px 14px !important;
    border: 0 !important;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--wa-text);
}

/* style.css marks the active item with a bar on its edge; the pill is enough */
body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > a::before {
    content: none !important;
}

/* style.css paints labels inside active items in the brand colour; they follow the link instead */
body.wa #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-item a span {
    color: inherit !important;
    -webkit-text-fill-color: currentColor;
    background: none;
}

body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > a i {
    width: 22px;
    font-size: 21px;
    color: var(--wa-muted);
    text-align: center;
    transition: color 0.15s;
}

body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > a:hover {
    background: var(--wa-surface-2);
    color: var(--wa-heading);
}

body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > a:hover i {
    color: var(--wa-primary-text);
}

body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item.mm-active > a {
    background: var(--wa-primary-soft);
    color: var(--wa-primary-text);
    font-weight: 600;
}

body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item.mm-active > a i {
    color: var(--wa-primary-text);
}

/* a page link (not a group) gets the solid pill */
body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item.mm-active > a:not(.has-arrow) {
    background: var(--wa-primary);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(5, 107, 95, 0.7);
}

body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item.mm-active > a:not(.has-arrow),
body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item.mm-active > a:not(.has-arrow) i,
body.wa #layout-wrapper .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item.mm-active > a:not(.has-arrow) span {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

/* the group chevron: points along the reading direction when closed, down when open */
body.wa #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-item a.has-arrow::after {
    top: 50%;
    inset-inline-end: 18px;
    inset-inline-start: auto;
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-width: 1.5px 0 0 1.5px;
    border-color: var(--wa-muted);
    transform-origin: center;
    transform: rotate(135deg);
    transition: transform 0.2s;
}

body.wa.rtl #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-item a.has-arrow::after {
    transform: rotate(-45deg);
}

body.wa #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-item.mm-active > a.has-arrow::after,
body.wa.rtl #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-item.mm-active > a.has-arrow::after,
body.wa #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-item a.has-arrow[aria-expanded='true']::after,
body.wa.rtl #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-item a.has-arrow[aria-expanded='true']::after {
    margin-top: -6px;
    border-color: var(--wa-primary-text);
    transform: rotate(225deg);
}

/* second level */
body.wa #layout-wrapper .sidebar .sidebar-menu .sidebar-menu-section .mm-active ul,
body.wa #layout-wrapper .sidebar .child-menu-list {
    background: transparent;
}

body.wa #layout-wrapper .sidebar .child-menu-list {
    margin: 2px 0 6px;
    padding: 0;
}

body.wa #layout-wrapper .sidebar .sidebar-menu .child-menu-list > li > a {
    gap: 12px;
    margin: 1px 12px;
    padding: 8px 14px !important;
    padding-inline-start: 50px !important;
    border: 0 !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 400;
    color: var(--wa-muted);
}

body.wa #layout-wrapper .sidebar .sidebar-menu .child-menu-list > li > a::before {
    width: 5px;
    height: 5px;
    background: currentColor;
    opacity: 0.55;
}

body.wa #layout-wrapper .sidebar .sidebar-menu .child-menu-list > li > a:hover {
    background: var(--wa-surface-2);
    color: var(--wa-heading);
}

body.wa #layout-wrapper .sidebar .sidebar-menu .child-menu-list > li.mm-active > a {
    color: var(--wa-primary-text);
    font-weight: 600;
}

body.wa #layout-wrapper .sidebar .sidebar-menu .child-menu-list > li.mm-active > a::before {
    background: var(--wa-primary-text);
    opacity: 1;
    box-shadow: 0 0 0 3px var(--wa-primary-soft);
}

/* third level */
body.wa #layout-wrapper .sidebar .sidebar-menu .child-menu-list .child-menu-list > li > a {
    padding-inline-start: 66px !important;
}

/* scrollbar */
body.wa .sidebar .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
    width: 4px;
    background: var(--wa-border) !important;
}

body.wa .sidebar .mCSB_scrollTools .mCSB_draggerRail {
    background: transparent;
}

/* collapsed (desktop "half expand") */
body.wa #layout-wrapper.half-expand .sidebar {
    width: var(--wa-sidebar-mini);
}

body.wa #layout-wrapper.half-expand .sidebar .sidebar-header {
    justify-content: center;
    padding: 0;
    background: var(--wa-surface);
}

body.wa #layout-wrapper.half-expand .wa-brand-word,
body.wa #layout-wrapper.half-expand .wa-menu-label {
    display: none;
}

body.wa #layout-wrapper.half-expand .sidebar .sidebar-menu {
    position: relative;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    padding-top: 14px;
}

body.wa #layout-wrapper.half-expand .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > a {
    justify-content: center;
    margin: 3px 14px;
    padding: 11px 0 !important;
}

/* the flyout of a group, beside the narrow bar (style.css pins it with !important) */
body.wa #layout-wrapper.half-expand .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > ul {
    top: 0;
    left: calc(100% - 6px) !important;
    right: auto !important;
    width: 240px;
    padding: 6px 0;
    border: 1px solid var(--wa-border) !important;
    border-radius: 14px;
    background: var(--wa-surface) !important;
    box-shadow: var(--wa-shadow-lg);
}

body.wa.rtl #layout-wrapper.half-expand .sidebar .sidebar-menu .parent-menu-list > .sidebar-menu-item > ul {
    right: calc(100% - 6px) !important;
    left: auto !important;
}

body.wa #layout-wrapper.half-expand .sidebar .sidebar-menu .child-menu-list > li > a {
    margin: 1px 6px;
    padding-inline-start: 14px !important;
}

/* mobile drawer */
@media (max-width: 991.98px) {
    body.wa #layout-wrapper .sidebar {
        inset-inline-start: -100%;
        width: min(300px, 86vw);
        z-index: 300;
        box-shadow: none;
    }

    body.wa #layout-wrapper.sidebar-expand .sidebar {
        inset-inline-start: 0;
        box-shadow: var(--wa-shadow-lg);
    }

    body.wa #layout-wrapper.sidebar-expand::after {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(10, 20, 18, 0.45);
    }

    body.wa .sidebar .sidebar-header .close-toggle.wa-icon-btn {
        display: inline-flex !important;
    }

    body.wa #layout-wrapper .header,
    body.wa #layout-wrapper.half-expand .header {
        inset-inline-start: 0;
    }
}

/* ---------- content ---------- */
body.wa #layout-wrapper .main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-inline-start: var(--wa-sidebar);
    margin-inline-end: 0;
    padding-top: calc(var(--wa-header) + 28px) !important;
    padding-inline: var(--wa-gutter) !important;
    transition: margin-inline-start 0.3s;
}

body.wa #layout-wrapper.half-expand .main-content {
    margin-inline-start: var(--wa-sidebar-mini);
}

body.wa #layout-wrapper .main-content > .page-content {
    flex: 1 0 auto;
}

@media (max-width: 991.98px) {
    body.wa #layout-wrapper .main-content,
    body.wa #layout-wrapper.half-expand .main-content {
        width: 100%;
        margin-inline-start: 0;
        padding-inline: 16px !important;
        padding-top: calc(var(--wa-header) + 20px) !important;
    }
}

/* footer */
body.wa .main-content > .footer {
    margin-top: 32px;
    padding: 18px 0 22px;
    border-top: 1px solid var(--wa-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

body.wa .main-content > .footer p {
    margin: 0;
    padding: 0 !important;
    font-size: 13px;
    color: var(--wa-muted);
}

/* ---------- shared components on the other admin pages ---------- */
body.wa .ot-card,
body.wa .card {
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    background-color: var(--wa-surface);
    box-shadow: var(--wa-shadow);
}

body.wa .card .card {
    box-shadow: none;
}

body.wa .ot-btn-primary,
body.wa .btn-primary-fill {
    border-radius: var(--wa-radius-sm);
    background: var(--wa-primary);
    font-weight: 600;
    box-shadow: 0 6px 16px -10px rgba(5, 107, 95, 0.8);
}

body.wa .ot-btn-primary:hover,
body.wa .ot-btn-primary:focus,
body.wa .btn-primary-fill:hover {
    background: var(--wa-primary-hover);
}

body.wa .btn-primary {
    --bs-btn-bg: var(--wa-primary);
    --bs-btn-border-color: var(--wa-primary);
    --bs-btn-hover-bg: var(--wa-primary-hover);
    --bs-btn-hover-border-color: var(--wa-primary-hover);
    --bs-btn-active-bg: var(--wa-primary-hover);
    --bs-btn-active-border-color: var(--wa-primary-hover);
    --bs-btn-disabled-bg: var(--wa-primary);
    --bs-btn-disabled-border-color: var(--wa-primary);
}

body.wa .ot-input:focus,
body.wa .form-control:focus,
body.wa .form-select:focus {
    border-color: var(--wa-primary-text) !important;
    box-shadow: 0 0 0 3px var(--wa-primary-ring) !important;
}

body.wa .form-check-input:checked {
    border-color: var(--wa-primary);
    background-color: var(--wa-primary);
}

body.wa .dropdown-menu {
    border-color: var(--wa-border);
    border-radius: 12px;
    box-shadow: var(--wa-shadow-lg);
}

body.wa .page-item.active .page-link,
body.wa .pagination .active > .page-link {
    border-color: var(--wa-primary) !important;
    background: var(--wa-primary) !important;
    color: #fff !important;
}

body.wa .page-link:focus {
    box-shadow: 0 0 0 3px var(--wa-primary-ring);
}

body.wa .breadcrumb-item a {
    color: var(--wa-primary-text);
}

/* ---------- admin sign-in (backend/auth/master) ---------- */
body.wa .wa-auth {
    display: grid;
    grid-template-columns: minmax(360px, 5fr) 7fr;
    min-height: 100vh;
    background: var(--wa-page);
}

.wa-auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 48px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(255, 228, 113, 0.18) 0%, rgba(255, 228, 113, 0) 55%),
        linear-gradient(160deg, #067a6c 0%, #056b5f 45%, #03463e 100%);
    color: #fff;
}

.wa-auth-brand::after {
    content: '';
    position: absolute;
    inset-inline-end: -120px;
    bottom: -140px;
    width: 460px;
    height: 460px;
    background: url(../images/brand/logo-mark-white.svg) center / contain no-repeat;
    opacity: 0.07;
    pointer-events: none;
}

.wa-auth-brand .wa-brand-word {
    color: #fff;
}

.wa-auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

body.wa .wa-auth-brand-copy h2 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

body.wa .wa-auth-brand-copy p {
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
}

body.wa .wa-auth-back {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    font-size: 14px;
    color: #fff;
}

[dir='ltr'] .wa-auth-back i {
    transform: scaleX(-1);
}

body.wa .wa-auth-back:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.wa-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.wa-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border: 1px solid var(--wa-border);
    border-radius: 24px;
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow-lg);
}

.wa-auth-card .wa-auth-mobile-brand {
    display: none;
    margin-bottom: 28px;
}

body.wa .wa-auth-card .form-heading {
    margin-bottom: 28px !important;
    text-align: start;
}

body.wa .wa-auth-card .form-heading .title {
    margin-bottom: 6px !important;
    font-size: 26px;
    font-weight: 700;
    color: var(--wa-heading);
}

body.wa .wa-auth-card .form-heading .subtitle {
    font-size: 15px;
    color: var(--wa-muted);
}

body.wa .wa-auth-card .auth-form {
    width: 100% !important; /* style.css narrows it to 280px on phones */
    max-width: none;
}

body.wa .wa-auth-card .remember-me {
    margin: 0 !important;
}

body.wa .wa-auth-card .form-check {
    gap: 10px;
    margin: 0;
    padding: 0 !important;
}

body.wa .wa-auth-card .input-field-group {
    width: 100%;
    margin-bottom: 18px !important;
}

body.wa .wa-auth-card .input-field-group > br {
    display: none;
}

body.wa .wa-auth-card .input-field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wa-heading);
}

body.wa .wa-auth-card .fillable {
    color: var(--wa-danger);
}

body.wa .wa-auth-card .custom-input-field {
    position: relative;
}

body.wa .wa-auth-card .custom-input-field .ot-input,
body.wa .wa-auth-card .ot-input {
    width: 100%;
    height: 50px !important;
    padding: 0 16px !important;
    padding-inline-start: 46px !important;
    border: 1px solid var(--wa-border);
    border-radius: 12px !important;
    line-height: normal !important;
    background: var(--wa-surface-2);
    font-size: 15px;
    color: var(--wa-heading);
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

body.wa .wa-auth-card .custom-input-field.password-input .ot-input {
    padding-inline-end: 46px !important;
}

body.wa .wa-auth-card .ot-input::placeholder {
    color: var(--wa-muted);
    opacity: 0.8;
}

body.wa .wa-auth-card .ot-input:focus {
    background: var(--wa-surface);
    outline: 0;
}

body.wa .wa-auth-card .ot-input.is-invalid {
    border-color: var(--wa-danger) !important;
}

body.wa .wa-auth-card .custom-input-field > img {
    position: absolute;
    top: 25px; /* half the input: an error message can follow the input inside this box */
    inset-inline-start: 16px;
    right: auto;
    left: auto;
    width: 18px;
    transform: translateY(-50%);
    opacity: 0.6;
}

body.wa.rtl .wa-auth-card .custom-input-field > img {
    right: 16px;
    left: auto;
}

body.wa .wa-auth-card .custom-input-field > i {
    position: absolute;
    top: 25px;
    inset-inline-end: 14px;
    right: auto;
    left: auto;
    font-size: 20px;
    color: var(--wa-muted);
    transform: translateY(-50%);
    cursor: pointer;
}

body.wa.rtl .wa-auth-card .custom-input-field > i {
    left: 14px;
    right: auto;
}

body.wa.dark-theme .wa-auth-card .custom-input-field > img {
    filter: invert(1);
}

body.wa .wa-auth-card .invalid-feedback,
body.wa .wa-auth-card .input-error {
    display: block;
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--wa-danger);
}

body.wa .wa-auth-card .form-check-input[type='checkbox'] {
    float: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0 !important;
    border: 1.5px solid var(--wa-border);
    border-radius: 5px;
    background-color: var(--wa-surface);
    cursor: pointer;
}

body.wa .wa-auth-card .remember-me label,
body.wa .wa-auth-card .form-check label {
    margin: 0;
    font-size: 14px;
    color: var(--wa-text);
}

body.wa .wa-auth-card .fogotPassword,
body.wa .wa-auth-card a {
    font-size: 14px;
    font-weight: 500;
    color: var(--wa-primary-text);
}

body.wa .wa-auth-card .fogotPassword:hover,
body.wa .wa-auth-card a:hover {
    text-decoration: underline;
}

body.wa .wa-auth-card .submit-btn,
body.wa .wa-auth-card .submit-button {
    width: 100%;
    height: 52px;
    margin-top: 24px !important;
    padding: 0 !important;
    border: 0;
    border-radius: 12px;
    background: var(--wa-primary);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(5, 107, 95, 0.85);
    transition: background-color 0.15s, transform 0.15s;
}

body.wa .wa-auth-card .submit-btn:hover,
body.wa .wa-auth-card .submit-button:hover {
    background: var(--wa-primary-hover);
}

body.wa .wa-auth-card .submit-btn:active {
    transform: translateY(1px);
}

body.wa .wa-auth-card .submit-button-only-border {
    border: 1px solid var(--wa-border);
    background: transparent;
    color: var(--wa-primary-text);
    box-shadow: none;
}

body.wa .wa-auth-card .submit-button-only-border:hover {
    background: var(--wa-primary-soft);
}

body.wa .wa-auth-theme {
    position: fixed;
    top: 16px;
    inset-inline-end: 16px;
    z-index: 5;
}

@media (max-width: 991.98px) {
    body.wa .wa-auth {
        grid-template-columns: 1fr;
    }

    .wa-auth-brand {
        display: none;
    }

    .wa-auth-card .wa-auth-mobile-brand {
        display: inline-flex;
    }

    .wa-auth-panel {
        padding: 32px 16px;
    }

    .wa-auth-card {
        padding: 28px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.wa *,
    body.wa *::before,
    body.wa *::after {
        transition: none !important;
    }
}
