/* Qarar admin shell: sidebar, top bar, footer, dashboard and sign-in.
   Loaded after material-dashboard.css so it wins on shared classes. */

:root {
    --qa-navy: #001D4F;
    --qa-navy-2: #0B2D6B;
    --qa-navy-3: #13387F;
    --qa-brown: #877257;
    --qa-gold: #C9AE86;
    --qa-bg: #F3F5F9;
    --qa-card: #FFFFFF;
    --qa-line: #E6E9F0;
    --qa-text: #1B2333;
    --qa-muted: #6B7385;
    --qa-green: #1F9D6B;
    --qa-red: #D9534F;
    --qa-amber: #E0A100;
    --qa-blue: #2F6FED;
    --qa-radius: 16px;
    --qa-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
    --qa-side-w: 272px;
    --qa-font: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html, body { background: var(--qa-bg) !important; }
body.qa-body {
    font-family: var(--qa-font);
    color: var(--qa-text);
    margin: 0;
    overflow-x: hidden;
}
.qa-body h1, .qa-body h2, .qa-body h3, .qa-body h4, .qa-body h5, .qa-body h6,
.qa-body p, .qa-body a, .qa-body span, .qa-body label, .qa-body button,
.qa-body input, .qa-body select, .qa-body textarea, .qa-body table, .qa-body .btn,
.qa-body .dropdown-item, .qa-body small, .qa-body li, .qa-body td, .qa-body th {
    font-family: var(--qa-font);
}

/* ---------- Shell ---------- */
.qa-shell { min-height: 100vh; }
/* The content keeps the old pages' direction, so the side is set per language. */
.qa-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin .25s ease;
}
body.qa-rtl .qa-main { margin-right: var(--qa-side-w); }
body.qa-ltr .qa-main { margin-left: var(--qa-side-w); }
.qa-content.new-padd.container-fluid {
    width: auto !important;
    float: none !important;
    max-width: none !important;
    padding: 24px 28px 8px !important;
    margin: 0 !important;
    flex: 1 0 auto;
}

/* ---------- Sidebar ---------- */
.qa-side {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--qa-side-w);
    background: linear-gradient(180deg, var(--qa-navy) 0%, #00163D 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0, 20, 60, .18);
}
.qa-side__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    text-decoration: none !important;
}
.qa-side__logo {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: #fff;
    display: grid; place-items: center;
    flex-shrink: 0;
    overflow: hidden;
}
.qa-side__logo img { width: 44px; height: 44px; object-fit: contain; }
.qa-side__name { color: #fff; font-weight: 700; font-size: 16px; line-height: 1.3; }
.qa-side__sub { color: rgba(255, 255, 255, .55); font-size: 12px; }
.qa-side__search { padding: 4px 16px 10px; position: relative; }
.qa-side__search input {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .07);
    color: #fff;
    padding-inline: 38px 12px !important;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: background .15s, border-color .15s;
}
.qa-side__search input::placeholder { color: rgba(255, 255, 255, .45); }
.qa-side__search input:focus { background: rgba(255, 255, 255, .12); border-color: var(--qa-gold); }
.qa-side__search i {
    position: absolute; inset-inline-start: 30px; top: 50%;
    transform: translateY(calc(-50% - 3px));
    color: rgba(255, 255, 255, .5); font-size: 13px;
}
.qa-side__nav {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.qa-side__nav::-webkit-scrollbar { width: 6px; }
.qa-side__nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 6px; }
.qa-side ul { list-style: none; margin: 0; padding: 0; }
.qa-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 12px;
    color: rgba(255, 255, 255, .78) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    position: relative;
    transition: background .15s, color .15s;
}
.qa-link i { width: 20px; text-align: center; font-size: 15px; color: rgba(255, 255, 255, .55); transition: color .15s; }
.qa-link:hover { background: rgba(255, 255, 255, .07); color: #fff !important; }
.qa-link:hover i { color: var(--qa-gold); }
.qa-link.is-active {
    background: linear-gradient(90deg, rgba(201, 174, 134, .22), rgba(201, 174, 134, .10));
    color: #fff !important;
    font-weight: 600;
}
.qa-link.is-active i { color: var(--qa-gold); }
.qa-link.is-active::before {
    content: '';
    position: absolute;
    inset-inline-start: -12px;
    top: 8px; bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--qa-gold);
}
[dir="rtl"] .qa-link.is-active::before { border-radius: 4px 0 0 4px; }
.qa-link__badge {
    margin-inline-start: auto;
    background: var(--qa-gold);
    color: var(--qa-navy);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 8px;
    min-width: 22px;
    text-align: center;
}
.qa-group { margin-top: 6px; }
.qa-group__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: 0;
    padding: 10px 12px 6px;
    color: rgba(255, 255, 255, .42);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
}
.qa-group__head:hover { color: rgba(255, 255, 255, .7); }
.qa-group__head i { font-size: 10px; transition: transform .2s; }
.qa-group.is-collapsed .qa-group__head i { transform: rotate(90deg); }
[dir="rtl"] .qa-group.is-collapsed .qa-group__head i { transform: rotate(-90deg); }
.qa-group.is-collapsed .qa-group__items { display: none; }
.qa-side.is-searching .qa-group__items { display: block !important; }
.qa-side.is-searching .qa-group__head i { visibility: hidden; }
.qa-side__empty { display: none; color: rgba(255, 255, 255, .5); font-size: 13px; padding: 12px; text-align: center; }
.qa-side__foot {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.qa-side__foot a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .85) !important;
    font-size: 13px; text-decoration: none !important;
}
.qa-side__foot a:hover { background: rgba(255, 255, 255, .12); color: #fff !important; }
.qa-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 12, 35, .45);
    z-index: 1035;
}

/* ---------- Top bar ---------- */
.qa-top {
    position: sticky;
    top: 0;
    z-index: 1020;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    /* Solid on purpose: a backdrop-filter here breaks the painting of the menus inside it in Chrome. */
    background: var(--qa-bg);
    border-bottom: 1px solid var(--qa-line);
}
.qa-top__toggle {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--qa-line);
    background: #fff;
    color: var(--qa-navy);
    display: grid; place-items: center;
    cursor: pointer;
}
.qa-top__title { display: flex; flex-direction: column; min-width: 0; }
.qa-top__title strong { font-size: 17px; color: var(--qa-navy); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-top__title span { font-size: 12px; color: var(--qa-muted); }
.qa-top__spacer { flex: 1; }
.qa-top__actions { display: flex; align-items: center; gap: 8px; }
.qa-icon-btn {
    position: relative;
    height: 40px;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--qa-line);
    background: #fff;
    color: var(--qa-navy) !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 13px; font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.qa-icon-btn:hover { border-color: #CBD2E0; box-shadow: var(--qa-shadow); }
.qa-icon-btn .qa-dot {
    position: absolute; top: -5px; inset-inline-end: -5px;
    background: var(--qa-red); color: #fff;
    font-size: 10.5px; font-weight: 700;
    min-width: 19px; height: 19px; border-radius: 999px;
    display: grid; place-items: center; padding: 0 5px;
    border: 2px solid var(--qa-bg);
}
.qa-user {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 6px 4px 12px;
    border-radius: 14px;
    border: 1px solid var(--qa-line);
    background: #fff;
    cursor: pointer;
}
[dir="rtl"] .qa-user { padding: 4px 12px 4px 6px; }
.qa-avatar {
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(135deg, var(--qa-navy-2), var(--qa-navy));
    color: #fff; font-weight: 700; font-size: 14px;
    display: grid; place-items: center;
}
.qa-user__name { font-size: 13px; font-weight: 600; color: var(--qa-text); line-height: 1.2; }
.qa-user__role { font-size: 11px; color: var(--qa-muted); }
.qa-menu.dropdown-menu {
    border: 1px solid var(--qa-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .14) !important;
    padding: 8px !important;
    min-width: 260px;
    margin-top: 8px !important;
    top: 100% !important;
    transform: none !important;
}
.qa-menu.dropdown-menu::before { display: none !important; }
.qa-menu .dropdown-item {
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13.5px;
    color: var(--qa-text);
    display: flex; align-items: center; gap: 10px;
    white-space: normal;
}
.qa-menu .dropdown-item i { width: 18px; text-align: center; color: var(--qa-muted); }
.qa-menu .dropdown-item:hover { background: var(--qa-bg); }
.qa-menu .dropdown-item.is-danger, .qa-menu .dropdown-item.is-danger i { color: var(--qa-red); }
.qa-menu__head { padding: 8px 12px 10px; border-bottom: 1px solid var(--qa-line); margin-bottom: 6px; }
.qa-menu__head strong { display: block; font-size: 14px; color: var(--qa-text); }
.qa-menu__head span { font-size: 12px; color: var(--qa-muted); }
.qa-notif__count {
    margin-inline-start: auto;
    background: #FDECEC; color: var(--qa-red);
    border-radius: 999px; font-size: 11.5px; font-weight: 700;
    padding: 1px 9px;
}
.qa-notif__empty { padding: 18px 12px; text-align: center; color: var(--qa-muted); font-size: 13px; }

/* ---------- Footer ---------- */
.qa-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 16px 28px 20px;
    color: var(--qa-muted);
    font-size: 12.5px;
    border-top: 1px solid var(--qa-line);
    margin-top: 24px;
}
.qa-foot a { color: var(--qa-muted) !important; text-decoration: none !important; }
.qa-foot a:hover { color: var(--qa-navy) !important; }
.qa-foot__links { display: flex; gap: 16px; flex-wrap: wrap; }
.qa-foot strong { color: var(--qa-navy); }

/* Old per-page footers are replaced by the shell footer. */
.qa-content footer.footer { display: none !important; }

/* ---------- Shared look for the old inner pages ---------- */
.qa-body .bg-gradient-primary { background-image: linear-gradient(135deg, var(--qa-navy-2) 0%, var(--qa-navy) 100%) !important; }
.qa-body .shadow-primary { box-shadow: 0 6px 18px rgba(0, 29, 79, .22) !important; }
.qa-body .card { border-radius: var(--qa-radius); box-shadow: var(--qa-shadow); border: 1px solid var(--qa-line); }
.qa-body .btn-primary, .qa-body .bg-gradient-dark.btn { background-image: none; background-color: var(--qa-navy) !important; border-color: var(--qa-navy) !important; }
.qa-body .table thead th { color: var(--qa-muted); font-weight: 600; font-size: 12.5px; }
.qa-body .alert { border-radius: 12px; }

/* ---------- Dashboard ---------- */
.qa-dash { display: flex; flex-direction: column; gap: 22px; }
.qa-hello {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 26px 28px;
    color: #fff;
    background:
        radial-gradient(600px 220px at 85% -20%, rgba(201, 174, 134, .35), transparent 60%),
        linear-gradient(135deg, var(--qa-navy-3) 0%, var(--qa-navy) 70%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.qa-hello h2 { color: #fff; font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.qa-hello p { color: rgba(255, 255, 255, .72); margin: 0; font-size: 14px; }
.qa-hello__chips { display: flex; gap: 10px; flex-wrap: wrap; }
.qa-hello__chip {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    padding: 10px 14px;
    min-width: 120px;
}
.qa-hello__chip span { display: block; font-size: 12px; color: rgba(255, 255, 255, .65); }
.qa-hello__chip b { font-size: 20px; color: #fff; }
.qa-hello__chip small { color: var(--qa-gold); font-size: 12px; margin-inline-start: 4px; }

.qa-sec-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.qa-sec-title h3 { font-size: 16px; font-weight: 700; color: var(--qa-navy); margin: 0; display: flex; align-items: center; gap: 8px; }
.qa-sec-title h3 i { color: var(--qa-brown); font-size: 15px; }
.qa-sec-title span { color: var(--qa-muted); font-size: 12.5px; }

.qa-grid { display: grid; gap: 16px; }
.qa-grid--kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qa-grid--2 { grid-template-columns: 2fr 1fr; }
.qa-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qa-grid--tiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

.qa-card {
    background: var(--qa-card);
    border: 1px solid var(--qa-line);
    border-radius: var(--qa-radius);
    box-shadow: var(--qa-shadow);
    padding: 18px;
    min-width: 0;
}
.qa-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.qa-card__head h4 { font-size: 15px; font-weight: 700; color: var(--qa-text); margin: 0; }
.qa-card__head a { font-size: 12.5px; color: var(--qa-blue) !important; text-decoration: none !important; white-space: nowrap; }

.qa-kpi {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none !important;
    transition: transform .15s, box-shadow .15s;
}
a.qa-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16, 24, 40, .10); }
.qa-kpi__icon {
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center;
    font-size: 18px; flex-shrink: 0;
}
.qa-kpi__label { color: var(--qa-muted); font-size: 13px; margin-bottom: 2px; }
.qa-kpi__value { font-size: 24px; font-weight: 700; color: var(--qa-text); line-height: 1.25; }
.qa-kpi__value small { font-size: 13px; color: var(--qa-muted); font-weight: 500; }
.qa-kpi__meta { font-size: 12px; color: var(--qa-muted); margin-top: 4px; }
.qa-up { color: var(--qa-green); font-weight: 600; }
.qa-down { color: var(--qa-red); font-weight: 600; }

.t-navy { background: #E7ECF6; color: var(--qa-navy); }
.t-brown { background: #F4EEE6; color: var(--qa-brown); }
.t-green { background: #E4F5EE; color: var(--qa-green); }
.t-blue { background: #E8F0FE; color: var(--qa-blue); }
.t-amber { background: #FFF5DB; color: #B07F00; }
.t-red { background: #FDECEC; color: var(--qa-red); }
.t-violet { background: #F0EBFC; color: #6A4BC4; }
.t-teal { background: #E2F4F6; color: #138496; }

.qa-chart { position: relative; height: 280px; }
.qa-chart--sm { height: 220px; }
.qa-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--qa-muted); }
.qa-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.qa-seg { display: inline-flex; background: var(--qa-bg); border-radius: 10px; padding: 3px; }
.qa-seg button {
    border: 0; background: none; padding: 5px 12px; border-radius: 8px;
    font-size: 12.5px; color: var(--qa-muted); cursor: pointer;
}
.qa-seg button.is-on { background: #fff; color: var(--qa-navy); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }

.qa-split { display: flex; flex-direction: column; gap: 12px; }
.qa-split__row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.qa-split__row b { margin-inline-start: auto; color: var(--qa-text); }
.qa-bar { height: 8px; border-radius: 99px; background: var(--qa-bg); overflow: hidden; }
.qa-bar > span { display: block; height: 100%; border-radius: 99px; }

.qa-todo { display: flex; flex-direction: column; gap: 8px; }
.qa-todo a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 12px;
    border: 1px solid var(--qa-line);
    text-decoration: none !important; color: var(--qa-text) !important;
    font-size: 13.5px;
    transition: background .15s;
}
.qa-todo a:hover { background: var(--qa-bg); }
.qa-todo a .qa-kpi__icon { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.qa-todo a b { margin-inline-start: auto; font-size: 15px; }
.qa-todo__ok { color: var(--qa-muted); font-size: 13px; text-align: center; padding: 18px 0; }

.qa-list { list-style: none; margin: 0; padding: 0; }
.qa-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--qa-line); }
.qa-list li:last-child { border-bottom: 0; }
.qa-list__main { min-width: 0; flex: 1; }
.qa-list__main a, .qa-list__main strong {
    display: block; font-size: 13.5px; font-weight: 600; color: var(--qa-text) !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important;
}
.qa-list__main span { font-size: 12px; color: var(--qa-muted); }
.qa-list__side { font-size: 12.5px; color: var(--qa-muted); white-space: nowrap; text-align: end; }
.qa-list__side b { display: block; color: var(--qa-text); font-size: 13.5px; }
.qa-pill { display: inline-block; font-size: 11.5px; border-radius: 999px; padding: 2px 9px; font-weight: 600; }

.qa-tile {
    display: flex; flex-direction: column; gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--qa-line);
    text-decoration: none !important;
    color: var(--qa-text) !important;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.qa-tile:hover { border-color: var(--qa-gold); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, .08); }
.qa-tile .qa-kpi__icon { width: 42px; height: 42px; font-size: 16px; }
.qa-tile b { font-size: 14px; font-weight: 600; }
.qa-tile span { font-size: 12px; color: var(--qa-muted); margin-top: -8px; }

/* ---------- Sign-in ---------- */
.qa-auth, .qa-auth *, .qa-auth *::before, .qa-auth *::after { box-sizing: border-box; }
.qa-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #fff;
}
.qa-auth__brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 48px;
    display: flex; flex-direction: column; justify-content: space-between;
    background:
        radial-gradient(700px 360px at 90% 0%, rgba(201, 174, 134, .35), transparent 60%),
        radial-gradient(500px 300px at 0% 100%, rgba(47, 111, 237, .25), transparent 60%),
        linear-gradient(150deg, var(--qa-navy-3) 0%, var(--qa-navy) 65%);
}
.qa-auth__logo { width: 76px; height: 76px; border-radius: 20px; background: #fff; display: grid; place-items: center; position: relative; z-index: 1; }
.qa-auth__logo img { width: 62px; height: 62px; object-fit: contain; }
.qa-auth__pitch { position: relative; z-index: 1; max-width: 460px; }
.qa-auth__pitch h1 { color: #fff; font-size: 34px; font-weight: 700; line-height: 1.35; margin: 0 0 12px; }
.qa-auth__pitch p { color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.8; margin: 0; }
.qa-auth__feats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.qa-auth__feats span {
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px; padding: 7px 14px; font-size: 13px; color: #fff;
}
.qa-auth__feats i { color: var(--qa-gold); margin-inline-end: 6px; }
.qa-auth__copy { position: relative; z-index: 1; color: rgba(255, 255, 255, .5); font-size: 12.5px; }
.qa-auth__panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; background: var(--qa-bg); }
.qa-auth__card {
    width: 100%; max-width: 420px;
    background: #fff;
    border-radius: 22px;
    border: 1px solid var(--qa-line);
    box-shadow: 0 20px 50px rgba(16, 24, 40, .08);
    padding: 34px 30px;
}
.qa-auth__card h2 { font-size: 24px; font-weight: 700; color: var(--qa-navy); margin: 0 0 6px; }
.qa-auth__card > p { color: var(--qa-muted); font-size: 14px; margin: 0 0 24px; }
.qa-field { margin-bottom: 16px; }
.qa-field label { display: block; font-size: 13px; font-weight: 600; color: var(--qa-text); margin-bottom: 7px; }
.qa-field__box { position: relative; }
.qa-field__box > i.fa-solid:first-child {
    position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
    color: var(--qa-muted); font-size: 14px; pointer-events: none;
}
.qa-field input {
    width: 100%; height: 48px;
    border: 1px solid #D5DBE7; border-radius: 12px;
    padding-inline: 42px 44px;
    font-size: 14px; color: var(--qa-text); background: #fff;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.qa-field input:focus { border-color: var(--qa-navy-2); box-shadow: 0 0 0 4px rgba(11, 45, 107, .1); }
.qa-field input.is-invalid { border-color: var(--qa-red); }
.qa-field__eye {
    position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; background: none; color: var(--qa-muted); cursor: pointer; border-radius: 10px;
}
.qa-field__eye:hover { background: var(--qa-bg); }
.qa-field__err { color: var(--qa-red); font-size: 12.5px; margin-top: 6px; }
.qa-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--qa-text); margin: 4px 0 20px; cursor: pointer; }
.qa-check input { width: 17px; height: 17px; accent-color: var(--qa-navy); }
.qa-submit {
    width: 100%; height: 50px; border: 0; border-radius: 12px;
    background: linear-gradient(135deg, var(--qa-navy-2), var(--qa-navy));
    color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 29, 79, .25);
    transition: transform .15s, box-shadow .15s;
}
.qa-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(0, 29, 79, .3); }
.qa-auth__alert { background: #FDECEC; color: var(--qa-red); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.qa-auth__lang { margin-top: 18px; font-size: 13px; color: var(--qa-muted); }
.qa-auth__lang a { color: var(--qa-navy) !important; font-weight: 600; text-decoration: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .qa-grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .qa-grid--2, .qa-grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 1199.98px) {
    .qa-side { transform: translateX(-100%); }
    .qa-side[dir="rtl"] { transform: translateX(100%); }
    body.qa-rtl .qa-main, body.qa-ltr .qa-main { margin: 0; }
    .qa-open .qa-side { transform: none; }
    .qa-open .qa-overlay { display: block; }
}
@media (min-width: 1200px) {
    .qa-collapsed .qa-side { transform: translateX(-100%); }
    .qa-collapsed .qa-side[dir="rtl"] { transform: translateX(100%); }
    body.qa-collapsed .qa-main { margin: 0; }
}
@media (max-width: 900px) {
    .qa-auth { grid-template-columns: 1fr; }
    .qa-auth__brand { padding: 28px 24px; min-height: auto; gap: 22px; }
    .qa-auth__pitch h1 { font-size: 24px; }
    .qa-auth__feats { display: none; }
}
@media (max-width: 640px) {
    .qa-top { padding: 0 16px; gap: 10px; }
    .qa-top__title span, .qa-user__meta, .qa-hide-sm { display: none !important; }
    .qa-content.new-padd.container-fluid { padding: 16px !important; }
    .qa-grid--kpi { grid-template-columns: 1fr; }
    .qa-hello { padding: 20px; }
    .qa-hello__chip { flex: 1 1 40%; min-width: 0; }
    .qa-foot { padding: 14px 16px 18px; justify-content: center; text-align: center; }
}

/* ---------- Bell ---------- */
.qa-menu.qa-notif { width: 360px; max-width: calc(100vw - 24px); padding: 0 !important; overflow: hidden; }
.qa-notif .qa-menu__head { padding: 12px 14px; margin: 0; }
.qa-link-btn { border: 0; background: none; color: var(--qa-blue); font-size: 12.5px; cursor: pointer; padding: 0; }
.qa-notif__list { max-height: 380px; overflow-y: auto; }
.qa-notif__item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 11px 14px; border-bottom: 1px solid var(--qa-line);
    text-decoration: none !important; color: var(--qa-text) !important;
    transition: background .15s;
}
.qa-notif__item:hover { background: var(--qa-bg); }
.qa-notif__item.is-unread { background: #F2F6FF; }
.qa-notif__item .qa-kpi__icon, .qa-toast .qa-kpi__icon { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.qa-notif__text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.qa-notif__text b { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.qa-notif__text span { font-size: 12.5px; color: var(--qa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-notif__text small { font-size: 11.5px; color: var(--qa-muted); }
.qa-notif__sub { padding: 10px 14px 4px; font-size: 11.5px; font-weight: 600; color: var(--qa-muted); border-top: 1px solid var(--qa-line); }
.qa-notif > .dropdown-item { margin: 0 6px; width: auto; }
.qa-notif > .dropdown-item:last-child { margin-bottom: 8px; }
.qa-toast {
    position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 2000;
    display: flex; gap: 12px; align-items: center;
    width: 340px; max-width: calc(100vw - 32px);
    background: #fff; border: 1px solid var(--qa-line); border-radius: 14px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, .18);
    padding: 12px 14px; text-decoration: none !important; color: var(--qa-text) !important;
    opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s;
}
.qa-toast.is-in { opacity: 1; transform: none; }
.qa-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.qa-avatar { overflow: hidden; }

/* ---------- Profile ---------- */
.qa-profile-hero {
    display: flex; align-items: center; gap: 18px;
    padding: 24px 26px; border-radius: 22px; color: #fff;
    background: radial-gradient(600px 220px at 85% -20%, rgba(201, 174, 134, .35), transparent 60%), linear-gradient(135deg, var(--qa-navy-3), var(--qa-navy) 70%);
}
.qa-profile-hero h2 { color: #fff; font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.qa-profile-hero p { color: rgba(255, 255, 255, .75); margin: 0; font-size: 14px; }
.qa-profile-hero__avatar, .qa-avatar-edit__img {
    width: 76px; height: 76px; border-radius: 22px; overflow: hidden; flex-shrink: 0;
    background: rgba(255, 255, 255, .15); border: 3px solid rgba(255, 255, 255, .25);
    display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 700;
}
.qa-profile-hero__avatar img, .qa-avatar-edit__img img { width: 100%; height: 100%; object-fit: cover; }
.qa-avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px dashed var(--qa-line); }
.qa-avatar-edit__img { background: linear-gradient(135deg, var(--qa-navy-2), var(--qa-navy)); border-color: var(--qa-line); }
.qa-btn-soft {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
    border-radius: 12px; border: 1px solid var(--qa-line); background: var(--qa-bg);
    color: var(--qa-navy) !important; font-size: 13.5px; font-weight: 600; cursor: pointer; margin: 0;
}
.qa-btn-soft:hover { border-color: #CBD2E0; background: #fff; }
.qa-btn-soft.is-danger { color: var(--qa-red) !important; background: #FDECEC; border-color: #F8D4D3; }
.qa-card .qa-field input, .qa-card .qa-field select.qa-select { box-sizing: border-box; }
.qa-field select.qa-select {
    width: 100%; height: 48px; border: 1px solid #D5DBE7; border-radius: 12px;
    padding-inline: 42px 14px; font-size: 14px; background: #fff; color: var(--qa-text); outline: none; appearance: auto;
}
.qa-card .qa-submit { max-width: 260px; }

/* The theme fades menus in with a transition that can stall half-way; show ours at once. */
.qa-menu.dropdown-menu { transition: none !important; background: #fff !important; z-index: 1060 !important; }
.qa-menu.dropdown-menu.show { opacity: 1 !important; visibility: visible !important; }

/* ---------- Table filter bar ---------- */
.qa-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin: 8px 16px 14px; padding: 12px; border-radius: 14px;
    background: var(--qa-bg); border: 1px solid var(--qa-line);
}
.qa-filters__search { position: relative; flex: 1 1 260px; min-width: 200px; }
.qa-filters__search i { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--qa-muted); font-size: 13px; }
.qa-filters input[type="search"], .qa-filters__select, .qa-filters__date input {
    height: 40px; border: 1px solid #D5DBE7 !important; border-radius: 10px !important; background: #fff !important;
    font-size: 13px; color: var(--qa-text); outline: none; box-sizing: border-box;
}
.qa-filters input[type="search"] { width: 100%; padding-inline: 36px 12px !important; }
.qa-filters input[type="search"]:focus, .qa-filters__select:focus, .qa-filters__date input:focus { border-color: var(--qa-navy-2) !important; box-shadow: 0 0 0 3px rgba(11, 45, 107, .08); }
.qa-filters__select { padding: 0 10px; min-width: 140px; max-width: 220px; cursor: pointer; }
.qa-filters__date { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--qa-muted); }
.qa-filters__date input { padding: 0 8px; width: 150px; }
.qa-filters__btn {
    height: 40px; padding: 0 16px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--qa-navy); color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.qa-filters__reset { height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 10px; color: var(--qa-red) !important; font-size: 13px; text-decoration: none !important; background: #FDECEC; }
.qa-filters__count { margin-inline-start: auto; font-size: 12.5px; color: var(--qa-muted); white-space: nowrap; }
@media (max-width: 640px) {
    .qa-filters__select, .qa-filters__date, .qa-filters__date input { flex: 1 1 100%; max-width: none; width: 100%; }
}

/* Top-bar menus are placed by CSS (Popper off): they open toward the page in both languages. */
.qa-top .dropdown { position: relative; }
.qa-top .qa-menu.dropdown-menu { position: absolute !important; top: 100% !important; bottom: auto !important; transform: none !important; margin-top: 8px !important; }
/* Theme + en.css pin .dropdown:first-of-type menus with left:-280px/5px (0,4,0); outrank them. */
.qa-top .dropdown > .qa-menu.dropdown-menu.dropdown-menu-start { left: 0 !important; right: auto !important; }
.qa-top .dropdown > .qa-menu.dropdown-menu.dropdown-menu-end { right: 0 !important; left: auto !important; }
.qa-menu .dropdown-divider { margin: 6px 0 !important; height: 1px; background: var(--qa-line); border: 0; opacity: 1; }
.qa-user { user-select: none; }
/* The theme reverses .card-body children in some layouts; keep the filter bar on top of its table. */
.card-body:has(> .qa-filters) { display: block !important; }

/* ---------- Selects: one arrow, inset from the edge, both directions ---------- */
.qa-body select:not([multiple]):not([size]) {
    -webkit-appearance: none !important; appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7385' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-size: 12px 12px !important;
    background-position: right 14px center !important;
    padding-right: 38px !important; padding-left: 14px !important;
}
.qa-body select:not([multiple]):not([size]):dir(rtl) {
    background-position: left 14px center !important;
    padding-left: 38px !important; padding-right: 14px !important;
}

/* ---------- Old page headers (pages not moved to .qa-list yet) ---------- */
.qa-body .card > .card-header.mt-n4 { margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0; }
.qa-body .card > .card-header > .bg-gradient-primary {
    background: #fff !important; box-shadow: none !important; border-radius: var(--qa-radius) var(--qa-radius) 0 0 !important;
    border-bottom: 1px solid var(--qa-line); padding: 16px 20px !important;
}
.qa-body .card > .card-header > .bg-gradient-primary h6 { color: var(--qa-text) !important; font-size: 16px; font-weight: 700; margin: 0; padding: 0 !important; }
.qa-body .card > .card-header > .bg-gradient-primary .text-white { color: var(--qa-muted) !important; }
.qa-body .card > .card-header > .bg-gradient-primary .btn-light {
    background: var(--qa-navy) !important; color: #fff !important; border: 0; border-radius: 10px; box-shadow: none; margin: 0 !important;
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; font-weight: 600; text-transform: none;
}
.qa-body .card > .card-header > .bg-gradient-primary .btn-light i { color: #fff !important; }
.qa-body .card .table > :not(caption) > * > * { padding: 12px 14px; border-bottom-color: var(--qa-line); }
.qa-body .card .table thead th { background: #F7F8FB; white-space: nowrap; }
.qa-body .card .table tbody tr:hover > * { background: #FAFBFD; }
.qa-body .card .table td { font-size: 13.5px; color: var(--qa-text); vertical-align: middle; }

/* ---------- Data list (card + table) ---------- */
.qa-list {
    background: var(--qa-card); border: 1px solid var(--qa-line); border-radius: var(--qa-radius);
    box-shadow: var(--qa-shadow); margin: 6px 0 24px; overflow: hidden;
}
.qa-list__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px 14px; }
.qa-list__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.qa-list__title h5 { margin: 0; font-size: 17px; font-weight: 700; color: var(--qa-text); }
.qa-list__title small { display: block; color: var(--qa-muted); font-size: 12.5px; margin-top: 2px; }
.qa-list__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #EEF2FA; color: var(--qa-navy-2); font-size: 16px; flex: none; }
.qa-list__count { background: var(--qa-bg); border: 1px solid var(--qa-line); color: var(--qa-text); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.qa-list__tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qa-btn {
    height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--qa-line); background: #fff; color: var(--qa-text) !important;
    font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s;
}
.qa-btn:hover { background: var(--qa-bg); border-color: #D5DBE7; }
.qa-btn--primary { background: var(--qa-navy); border-color: var(--qa-navy); color: #fff !important; }
.qa-btn--primary:hover { background: var(--qa-navy-2); border-color: var(--qa-navy-2); }
.qa-btn--green { background: #1D7A46; border-color: #1D7A46; color: #fff !important; }
.qa-btn--green:hover { background: #18663a; border-color: #18663a; }
.qa-btn .qa-btn__n { background: var(--qa-red); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; }

.qa-list__tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 14px; }
.qa-tab {
    display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--qa-line); background: #fff; color: var(--qa-muted) !important; font-size: 13px; font-weight: 600; text-decoration: none !important;
}
.qa-tab:hover { color: var(--qa-text) !important; border-color: #D5DBE7; }
.qa-tab.is-on { background: var(--qa-navy); border-color: var(--qa-navy); color: #fff !important; }
.qa-tab__n { background: var(--qa-bg); color: var(--qa-text); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.qa-tab.is-on .qa-tab__n { background: rgba(255, 255, 255, .18); color: #fff; }
.qa-tab--red .qa-tab__n { background: #FDECEC; color: var(--qa-red); }
.qa-tab--amber .qa-tab__n { background: #FFF5DB; color: #9A6B00; }

.qa-list .qa-filters { margin: 0 20px 16px; }
.qa-table-wrap { overflow-x: auto; border-top: 1px solid var(--qa-line); }
.qa-table { width: 100%; border-collapse: collapse; margin: 0; }
.qa-table thead th {
    background: #F7F8FB; color: var(--qa-muted); font-size: 12px; font-weight: 600; text-align: start;
    padding: 11px 14px; border-bottom: 1px solid var(--qa-line); white-space: nowrap;
}
.qa-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--qa-line); font-size: 13.5px; color: var(--qa-text); vertical-align: middle; text-align: start; }
.qa-table tbody tr:last-child td { border-bottom: 0; }
.qa-table tbody tr:hover td { background: #FAFBFD; }
.qa-table .is-end { text-align: end; }
.qa-table .is-nowrap { white-space: nowrap; }
.qa-id { color: var(--qa-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qa-strong { font-weight: 600; color: var(--qa-text); }
.qa-sub { display: block; color: var(--qa-muted); font-size: 12px; margin-top: 2px; }
.qa-money { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qa-money small { color: var(--qa-muted); font-weight: 500; font-size: 11px; }
.qa-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 12px; direction: ltr; unicode-bidi: embed; }
.qa-dim { color: #A3A9B6; }

.qa-person { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.qa-person__av {
    width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
    font-weight: 700; font-size: 14px; color: #fff; background: var(--qa-navy-2);
}
.qa-person__av img { width: 100%; height: 100%; object-fit: cover; }
.qa-av-0 { background: #0B2D6B; } .qa-av-1 { background: #877257; } .qa-av-2 { background: #1F9D6B; }
.qa-av-3 { background: #2F6FED; } .qa-av-4 { background: #8E5BD8; } .qa-av-5 { background: #D9822B; }
.qa-person__meta { display: flex; flex-direction: column; min-width: 0; }
.qa-person__name { font-weight: 600; color: var(--qa-text) !important; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
a.qa-person__name:hover { color: var(--qa-navy-2) !important; text-decoration: underline !important; }
.qa-person__sub { color: var(--qa-muted); font-size: 12px; white-space: nowrap; }

.qa-tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.qa-tag i { font-size: 10px; }
.qa-tag--green { background: #E7F6EF; color: #157A52; }
.qa-tag--red { background: #FDECEC; color: #B83A36; }
.qa-tag--amber { background: #FFF5DB; color: #8A6000; }
.qa-tag--blue { background: #E9F0FE; color: #2259C7; }
.qa-tag--gray { background: #F0F2F6; color: #5B6374; }
.qa-tag--navy { background: #E6EBF5; color: var(--qa-navy-2); }
.qa-tag--gold { background: #F6EFE4; color: #6E5A40; }
.qa-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.qa-acts { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.qa-acts form { margin: 0; display: inline-flex; }
.qa-act {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--qa-line); background: #fff; padding: 0;
    display: inline-grid; place-items: center; color: var(--qa-muted) !important; font-size: 13px; cursor: pointer;
    text-decoration: none !important; transition: background .15s, color .15s, border-color .15s;
}
.qa-act:hover { color: #fff !important; }
.qa-act--view:hover, .qa-act--edit:hover { background: var(--qa-navy-2); border-color: var(--qa-navy-2); }
.qa-act--delete:hover, .qa-act--reject:hover { background: var(--qa-red); border-color: var(--qa-red); }
.qa-act--approve:hover, .qa-act--complete:hover, .qa-act--verify:hover { background: var(--qa-green); border-color: var(--qa-green); }
.qa-act--login:hover, .qa-act--map:hover, .qa-act--print:hover { background: var(--qa-blue); border-color: var(--qa-blue); }
.qa-act--wallet:hover { background: var(--qa-brown); border-color: var(--qa-brown); }
.qa-act--delete { color: var(--qa-red) !important; }
.qa-act--delete:hover { color: #fff !important; }

.qa-tip {
    position: fixed; z-index: 3000; pointer-events: none; background: #1B2333; color: #fff; font-size: 12px; font-weight: 500;
    padding: 5px 9px; border-radius: 7px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px;
    font-family: var(--qa-font);
}

.qa-empty { text-align: center; padding: 48px 20px; color: var(--qa-muted); }
.qa-empty__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--qa-bg); display: grid; place-items: center; margin: 0 auto 12px; font-size: 20px; color: #A3A9B6; }
.qa-empty strong { display: block; color: var(--qa-text); font-size: 15px; margin-bottom: 4px; }

.qa-list__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--qa-line); font-size: 12.5px; color: var(--qa-muted); }
.qa-pager { display: flex; gap: 4px; flex-wrap: wrap; }
.qa-pager a, .qa-pager span {
    min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; display: inline-grid; place-items: center;
    border: 1px solid var(--qa-line); background: #fff; color: var(--qa-text) !important; font-size: 13px; font-weight: 600; text-decoration: none !important;
}
.qa-pager a:hover { background: var(--qa-bg); }
.qa-pager .is-on { background: var(--qa-navy); border-color: var(--qa-navy); color: #fff !important; }
.qa-pager .is-off { color: #C2C7D0 !important; background: #fff; }
.qa-pager .is-gap { border: 0; background: transparent; min-width: 18px; }
[dir="rtl"] .qa-pager .fa-chevron-left, [dir="rtl"] .qa-pager .fa-chevron-right { transform: scaleX(-1); }

/* Filter bar v2: search row + filter row */
.qa-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
.qa-filters__row + .qa-filters__row { padding-top: 10px; border-top: 1px dashed var(--qa-line); }
.qa-filters__label { font-size: 12.5px; font-weight: 600; color: var(--qa-muted); }
.qa-chip {
    display: inline-flex; align-items: center; gap: 6px; margin: 0; height: 32px; padding: 0 12px; border-radius: 999px;
    border: 1px solid #D5DBE7; background: #fff; color: var(--qa-muted); font-size: 12.5px; font-weight: 600; cursor: pointer; user-select: none;
}
.qa-chip:hover { border-color: var(--qa-navy-2); color: var(--qa-navy-2); }
.qa-chip.is-on { background: var(--qa-navy); border-color: var(--qa-navy); color: #fff; }
.qa-chip input { display: none; }

/* Confirm dialog */
.qa-confirm { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: rgba(15, 23, 42, .45); padding: 16px; }
.qa-confirm__box { background: #fff; border-radius: 18px; width: 100%; max-width: 400px; padding: 24px; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); text-align: center; font-family: var(--qa-font); }
.qa-confirm__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; font-size: 20px; background: #FDECEC; color: var(--qa-red); }
.qa-confirm__box.is-primary .qa-confirm__icon { background: #E9F0FE; color: var(--qa-blue); }
.qa-confirm__box p { margin: 0 0 18px; color: var(--qa-text); font-size: 15px; line-height: 1.7; }
.qa-confirm__btns { display: flex; gap: 8px; justify-content: center; }
.qa-confirm__btns button { flex: 1; height: 42px; border-radius: 11px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid var(--qa-line); background: #fff; color: var(--qa-text); }
.qa-confirm__btns .is-go { background: var(--qa-red); border-color: var(--qa-red); color: #fff; }
.qa-confirm__box.is-primary .is-go { background: var(--qa-navy); border-color: var(--qa-navy); }

/* nucleo-svg.css forces `input { padding: 11px !important }`, which drops the room kept for icons. */
.qa-field input { padding: 0 44px 0 42px !important; padding-inline: 42px 44px !important; }
.qa-filters__date input { padding: 0 8px !important; }
.qa-confirm input, .qa-chip input { padding: 0 !important; }
/* Icon selects in forms keep the icon at the start and the arrow at the end. */
.qa-body .qa-field select.qa-select { padding: 0 38px 0 42px !important; }
.qa-body .qa-field select.qa-select:dir(rtl) { padding: 0 42px 0 38px !important; }

/* In-row on/off switch (posts its own small form). */
.qa-toggle {
    display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer;
    font-size: 12.5px; font-weight: 600; color: var(--qa-muted); white-space: nowrap;
}
.qa-toggle__track { width: 34px; height: 20px; border-radius: 999px; background: #D5DBE7; position: relative; transition: background .15s; flex: none; }
.qa-toggle__track::after {
    content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: inset-inline-start .15s;
}
.qa-toggle.is-on { color: #157A52; }
.qa-toggle.is-on .qa-toggle__track { background: var(--qa-green); }
.qa-toggle.is-on .qa-toggle__track::after { inset-inline-start: 16px; }
.qa-list + .qa-list { margin-top: 0; }

/* Sign-in: one centred card, logo on top, no side panel. */
.qa-auth { grid-template-columns: 1fr !important; }
.qa-auth__panel { min-height: 100vh; gap: 18px; }
.qa-auth__card { text-align: center; }
.qa-auth__card .qa-field, .qa-auth__card .qa-check, .qa-auth__card .qa-auth__alert { text-align: start; }
.qa-auth__card .qa-auth__logo { margin: 0 auto 18px; width: 84px; height: 84px; border: 1px solid var(--qa-line); box-shadow: var(--qa-shadow); }
.qa-auth__card .qa-auth__logo img { width: 68px; height: 68px; }
.qa-auth__panel .qa-auth__copy { color: var(--qa-muted); }
.qa-confirm__pw { display: block; text-align: start; margin: -4px 0 14px; }
.qa-confirm__pw span { display: block; font-size: 13px; font-weight: 600; color: var(--qa-text); margin-bottom: 6px; }
.qa-confirm__pw input {
    width: 100%; height: 44px; border: 1px solid #D5DBE7 !important; border-radius: 11px; padding: 0 12px !important;
    font-size: 14px; outline: none; direction: ltr; box-sizing: border-box; background: #fff;
}
.qa-confirm__pw input:focus { border-color: var(--qa-navy-2) !important; box-shadow: 0 0 0 3px rgba(11, 45, 107, .1); }
.qa-confirm__err { background: #FDECEC; color: var(--qa-red); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: -6px 0 14px; text-align: start; }
.qa-confirm__btns button:disabled { opacity: .6; cursor: wait; }

/* ---------- Readability: larger type and stronger contrast across the dashboard ---------- */
:root { --qa-muted: #4F586A; --qa-text: #111827; }
body.qa-body { font-size: 15px; line-height: 1.6; }
/* Sidebar */
.qa-side__sub { font-size: 13px; color: rgba(255, 255, 255, .7); }
.qa-link { font-size: 15.5px !important; }
.qa-link i { font-size: 16px; color: rgba(255, 255, 255, .7); }
.qa-group__head { font-size: 13px !important; color: rgba(255, 255, 255, .72) !important; }
.qa-side__search input { font-size: 14.5px; }
/* Top bar and menus */
.qa-top__title strong { font-size: 19px; }
.qa-top__title span { font-size: 13.5px; }
.qa-icon-btn { font-size: 14.5px !important; }
.qa-user__name { font-size: 14.5px; }
.qa-user__role { font-size: 12.5px; }
.qa-menu .dropdown-item { font-size: 15px !important; }
.qa-menu__head strong { font-size: 15.5px; }
.qa-menu__head span, .qa-notif__text span, .qa-notif__text small { font-size: 13.5px; }
.qa-notif__text b { font-size: 15px; }
/* Dashboard */
.qa-hello h2 { font-size: 24px; }
.qa-hello p, .qa-hello__chip span { font-size: 15px; }
.qa-sec-title h3 { font-size: 18px; }
.qa-sec-title span, .qa-card__head a, .qa-legend, .qa-list__side { font-size: 14px; }
.qa-card__head h4 { font-size: 17px; }
.qa-kpi__label { font-size: 14.5px; }
.qa-kpi__value { font-size: 27px; }
.qa-kpi__meta, .qa-list__main span, .qa-tile span { font-size: 13.5px; }
.qa-split__row, .qa-todo a, .qa-list__main a, .qa-list__side b, .qa-tile b { font-size: 15px; }
.qa-pill { font-size: 13px; }
/* Lists, tables, filters */
.qa-list__title h5 { font-size: 20px; }
.qa-list__title small { font-size: 14px; }
.qa-list__count { font-size: 14px; }
.qa-table thead th { font-size: 14px; color: #3B4456; }
.qa-table tbody td { font-size: 15.5px; }
.qa-sub, .qa-person__sub { font-size: 13.5px; }
.qa-id { font-size: 14px; }
.qa-person__name { font-size: 15.5px; }
.qa-person__av { width: 40px; height: 40px; font-size: 16px; }
.qa-tag { font-size: 13.5px; padding: 4px 11px; }
.qa-money small { font-size: 12.5px; }
.qa-mono { font-size: 13.5px; }
.qa-act { width: 36px; height: 36px; font-size: 15px; }
.qa-tip { font-size: 14px; padding: 6px 10px; }
.qa-tab, .qa-btn, .qa-filters__btn, .qa-filters__reset { font-size: 14.5px; }
.qa-tab__n { font-size: 12.5px; }
.qa-filters input[type="search"], .qa-filters__select, .qa-filters__date input { font-size: 15px; height: 44px; }
.qa-filters__date, .qa-filters__label, .qa-filters__count { font-size: 14px; }
.qa-chip { font-size: 14px; height: 36px; }
.qa-list__foot { font-size: 14.5px; }
.qa-pager a, .qa-pager span { font-size: 14.5px; min-width: 38px; height: 38px; }
.qa-toggle { font-size: 14px; }
.qa-empty strong { font-size: 17px; }
.qa-confirm__box p { font-size: 16px; }
.qa-confirm__btns button { font-size: 15px; height: 46px; }
/* Pages still on the old theme */
.qa-body .text-xxs { font-size: 12.5px !important; }
.qa-body .text-xs { font-size: 13.5px !important; }
.qa-body .text-sm { font-size: 15px !important; }
.qa-body .card .table td, .qa-body .card .table td p { font-size: 15px !important; color: var(--qa-text); }
.qa-body .card .table thead th { font-size: 14px !important; color: #3B4456; opacity: 1 !important; }
.qa-body .card > .card-header > .bg-gradient-primary h6 { font-size: 18px; }
.qa-body label, .qa-body .form-label { font-size: 14.5px; color: var(--qa-text); }
.qa-body .form-control, .qa-body .form-select, .qa-body textarea { font-size: 15px !important; }
.qa-body .btn { font-size: 14px; }
.qa-body .text-secondary, .qa-body .text-muted { color: var(--qa-muted) !important; }
.qa-body .badge { font-size: 12.5px; }
.qa-field label { font-size: 14.5px; }
.qa-field input, .qa-field select.qa-select { font-size: 15.5px; }

/* Home activity lists share the .qa-list name with the table card: keep them flat. */
ul.qa-list { background: none; border: 0; border-radius: 0; box-shadow: none; margin: 0; overflow: visible; }
