/* Dashboard and operations UI core. */
/* ========================================================================== 
   Phase 6.1.0 — Responsive dashboard sidebar
   ========================================================================== */
.dashboard-shell {
    grid-template-columns: 286px minmax(0, 1fr);
    transition: grid-template-columns .24s cubic-bezier(.2,.8,.2,1);
}
.dashboard-shell.sidebar-collapsed { grid-template-columns: 88px minmax(0, 1fr); }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    padding: 16px 14px 14px;
    background:
        radial-gradient(circle at 20% 0%, rgba(218,158,18,.12), transparent 30%),
        linear-gradient(180deg, #073320 0%, #052719 52%, #041f15 100%);
    color: #dce9e0;
    display: flex;
    flex-direction: column;
    border-inline-end: 1px solid rgba(255,255,255,.06);
    box-shadow: 10px 0 30px rgba(3,31,20,.06);
    z-index: 50;
    overflow: visible;
    transition: padding .24s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}
html[dir="rtl"] .sidebar { box-shadow: -10px 0 30px rgba(3,31,20,.06); }

.sidebar-head {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 14px;
    border-bottom: 1px solid rgba(255,255,255,.09);
    flex: 0 0 auto;
}
.sidebar-brand {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
}
.sidebar-brand-full {
    width: 208px;
    height: 56px;
    object-fit: contain;
    object-position: center;
    transition: opacity .16s ease, transform .22s ease;
}
.sidebar-brand-compact {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--gold-500), #f0bc3f);
    color: #062719;
    box-shadow: 0 8px 24px rgba(218,158,18,.18);
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
}
.sidebar-collapse,
.sidebar-mobile-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #dce9e0;
    display: grid;
    place-items: center;
    font-size: 12px;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.sidebar-collapse:hover,
.sidebar-mobile-close:hover {
    background: rgba(218,158,18,.15);
    color: #fff4d6;
    border-color: rgba(218,158,18,.28);
}
.sidebar-mobile-close { display: none; }

.sidebar-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
    padding: 14px 2px 12px;
}
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 99px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); }

.sidebar-nav { display: grid; gap: 7px; }
.sidebar-nav-group { display: grid; gap: 5px; }
.sidebar-nav-group + .sidebar-nav-group { margin-top: 3px; }
.sidebar-group-toggle {
    width: 100%;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 10px;
    border: 0;
    background: transparent;
    color: rgba(220,233,224,.58);
    font-size: 10.5px;
    font-weight: 800;
    text-align: start;
    text-transform: none;
    letter-spacing: .025em;
}
html[dir="rtl"] .sidebar-group-toggle { letter-spacing: 0; }
.sidebar-group-toggle > i {
    font-size: 9px;
    transition: transform .2s ease;
}
.sidebar-nav-group.is-collapsed .sidebar-group-toggle > i { transform: rotate(-90deg); }
html[dir="rtl"] .sidebar-nav-group.is-collapsed .sidebar-group-toggle > i { transform: rotate(90deg); }
.sidebar-nav-group.has-active > .sidebar-group-toggle { color: rgba(255,244,214,.78); }
.sidebar-group-items {
    display: grid;
    gap: 5px;
    max-height: 860px;
    opacity: 1;
    overflow: hidden;
    transition: max-height .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
}
.sidebar-nav-group.is-collapsed .sidebar-group-items {
    max-height: 0;
    opacity: 0;
}

.sidebar-nav .sidebar-link,
.sidebar-footer a,
.sidebar-footer button {
    position: relative;
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 5px 10px;
    background: transparent;
    color: #bdd1c4;
    font-size: 13px;
    font-weight: 700;
    text-align: start;
    transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.sidebar-nav .sidebar-link > span,
.sidebar-footer a > span,
.sidebar-footer button > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-nav .sidebar-link > .fa-icon,
.sidebar-footer a > .fa-icon,
.sidebar-footer button > .fa-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    color: #c9dccf;
    font-size: 13px;
    opacity: 1;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.sidebar-nav .sidebar-link:hover,
.sidebar-footer a:hover,
.sidebar-footer button:hover {
    background: rgba(255,255,255,.065);
    color: #fff;
    border-color: rgba(255,255,255,.04);
}
.sidebar-nav .sidebar-link:hover > .fa-icon,
.sidebar-footer a:hover > .fa-icon,
.sidebar-footer button:hover > .fa-icon {
    background: rgba(255,255,255,.085);
    color: #fff;
}
.sidebar-nav .sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(218,158,18,.18), rgba(255,255,255,.06));
    border-color: rgba(218,158,18,.16);
    box-shadow: none;
}
html[dir="rtl"] .sidebar-nav .sidebar-link.active {
    background: linear-gradient(-90deg, rgba(218,158,18,.18), rgba(255,255,255,.06));
    box-shadow: none;
}
.sidebar-nav .sidebar-link.active::before {
    content: "";
    position: absolute;
    inset-block: 10px;
    inset-inline-start: -1px;
    width: 3px;
    border-radius: 99px;
    background: var(--gold-500);
    box-shadow: 0 0 12px rgba(218,158,18,.35);
}
.sidebar-nav .sidebar-link.active > .fa-icon {
    background: linear-gradient(145deg, var(--gold-500), #efbd48);
    color: #052719;
    box-shadow: 0 7px 18px rgba(218,158,18,.16);
}

.sidebar-user {
    flex: 0 0 auto;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 2px 10px;
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.06);
    overflow: hidden;
}
.sidebar-user-avatar {
    width: 36px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(218,158,18,.16);
    border: 1px solid rgba(218,158,18,.16);
    color: #ffe5a4;
    font-weight: 900;
}
.sidebar-user-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}
.sidebar-user-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f2f8f4;
    font-size: 12.5px;
}
.sidebar-user-copy small {
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(220,233,224,.58);
    font-size: 10px;
}
.sidebar-footer {
    flex: 0 0 auto;
    margin-top: 0;
    display: grid;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 10px 2px 0;
}
.sidebar-footer form { margin: 0; }
.sidebar-footer button { cursor: pointer; }

/* Compact desktop state */
.dashboard-shell.sidebar-collapsed .sidebar { padding-inline: 10px; }
.dashboard-shell.sidebar-collapsed .sidebar-head { justify-content: center; padding-inline: 0; }
.dashboard-shell.sidebar-collapsed .sidebar-brand { flex: 0 0 44px; justify-content: center; }
.dashboard-shell.sidebar-collapsed .sidebar-brand-full { display: none; }
.dashboard-shell.sidebar-collapsed .sidebar-brand-compact { display: grid; }
.dashboard-shell.sidebar-collapsed .sidebar-collapse { position: absolute; inset-inline-end: -26px; top: 18px; background: #073320; box-shadow: 0 5px 18px rgba(0,0,0,.14); }
.dashboard-shell.sidebar-collapsed .sidebar-nav-group { padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); }
.dashboard-shell.sidebar-collapsed .sidebar-group-toggle { display: none; }
.dashboard-shell.sidebar-collapsed .sidebar-group-items,
.dashboard-shell.sidebar-collapsed .sidebar-nav-group.is-collapsed .sidebar-group-items {
    max-height: none;
    opacity: 1;
    overflow: visible;
}
.dashboard-shell.sidebar-collapsed .sidebar-nav .sidebar-link,
.dashboard-shell.sidebar-collapsed .sidebar-footer a,
.dashboard-shell.sidebar-collapsed .sidebar-footer button {
    min-height: 46px;
    justify-content: center;
    gap: 0;
    padding-inline: 6px;
}
.dashboard-shell.sidebar-collapsed .sidebar-nav .sidebar-link > span,
.dashboard-shell.sidebar-collapsed .sidebar-footer a > span,
.dashboard-shell.sidebar-collapsed .sidebar-footer button > span,
.dashboard-shell.sidebar-collapsed .sidebar-user-copy { display: none; }
.dashboard-shell.sidebar-collapsed .sidebar-nav .sidebar-link > .fa-icon,
.dashboard-shell.sidebar-collapsed .sidebar-footer a > .fa-icon,
.dashboard-shell.sidebar-collapsed .sidebar-footer button > .fa-icon { margin: 0; }
.dashboard-shell.sidebar-collapsed .sidebar-user { justify-content: center; padding-inline: 5px; }
.dashboard-shell.sidebar-collapsed .sidebar-user-avatar { margin: 0; }

.sidebar-backdrop { display: none; }

/* Topbar refinement to match the new navigation */
.topbar {
    min-height: 74px;
    padding-inline: 26px;
    gap: 13px;
    box-shadow: 0 1px 0 rgba(3,75,40,.02);
}
.topbar-heading { min-width: 0; display: flex; flex-direction: column; }
.topbar-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-timezone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfb;
    color: var(--ink-500);
    font-size: 11px;
    font-weight: 700;
}
.topbar-timezone i { color: var(--green-800); }
.sidebar-toggle { display: none; }

@media (max-width: 1180px) and (min-width: 821px) {
    .dashboard-shell:not(.sidebar-collapsed) { grid-template-columns: 258px minmax(0, 1fr); }
    .dashboard-shell:not(.sidebar-collapsed) .sidebar-brand-full { width: 188px; }
    .dashboard-content { padding-inline: 24px; }
}

@media (max-width: 820px) {
    .dashboard-shell,
    .dashboard-shell.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
    .sidebar,
    .dashboard-shell.sidebar-collapsed .sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: min(88vw, 320px);
        height: 100vh;
        height: 100dvh;
        padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
        transform: translateX(-105%);
        border-inline-end: 1px solid rgba(255,255,255,.09);
        box-shadow: 18px 0 50px rgba(0,0,0,.24);
        z-index: 100;
    }
    html[dir="rtl"] .sidebar,
    html[dir="rtl"] .dashboard-shell.sidebar-collapsed .sidebar { transform: translateX(105%); box-shadow: -18px 0 50px rgba(0,0,0,.24); }
    .sidebar.is-open,
    html[dir="rtl"] .sidebar.is-open { transform: translateX(0); }
    .sidebar-head,
    .dashboard-shell.sidebar-collapsed .sidebar-head { justify-content: flex-start; padding-inline: 4px; }
    .sidebar-brand,
    .dashboard-shell.sidebar-collapsed .sidebar-brand { flex: 1 1 auto; justify-content: flex-start; }
    .sidebar-brand-full,
    .dashboard-shell.sidebar-collapsed .sidebar-brand-full { display: block; width: 205px; }
    .sidebar-brand-compact,
    .dashboard-shell.sidebar-collapsed .sidebar-brand-compact { display: none; }
    .sidebar-collapse,
    .dashboard-shell.sidebar-collapsed .sidebar-collapse { display: none; }
    .sidebar-mobile-close { display: grid; }
    .dashboard-shell.sidebar-collapsed .sidebar-nav-group { padding-top: 0; border-top: 0; }
    .dashboard-shell.sidebar-collapsed .sidebar-group-toggle { display: flex; }
    .dashboard-shell.sidebar-collapsed .sidebar-nav-group.is-collapsed .sidebar-group-items { max-height: 0; opacity: 0; overflow: hidden; }
    .dashboard-shell.sidebar-collapsed .sidebar-nav .sidebar-link,
    .dashboard-shell.sidebar-collapsed .sidebar-footer a,
    .dashboard-shell.sidebar-collapsed .sidebar-footer button {
        justify-content: flex-start;
        gap: 10px;
        padding-inline: 10px;
    }
    .dashboard-shell.sidebar-collapsed .sidebar-nav .sidebar-link > span,
    .dashboard-shell.sidebar-collapsed .sidebar-footer a > span,
    .dashboard-shell.sidebar-collapsed .sidebar-footer button > span,
    .dashboard-shell.sidebar-collapsed .sidebar-user-copy { display: flex; }
    .dashboard-shell.sidebar-collapsed .sidebar-user { justify-content: flex-start; padding-inline: 10px; }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 90;
        border: 0;
        background: rgba(8,22,14,.48);
        opacity: 0;
        pointer-events: none;
        backdrop-filter: blur(2px);
        transition: opacity .2s ease;
    }
    .sidebar-backdrop.is-visible { opacity: 1; pointer-events: auto; }
    body.sidebar-mobile-open { overflow: hidden; touch-action: none; }

    .sidebar-toggle { display: grid; place-items: center; flex: 0 0 40px; }
    .topbar { padding-inline: 14px; }
    .topbar-actions { gap: 8px; }
    .dashboard-content { padding: 20px 16px; }
}

@media (max-width: 600px) {
    .topbar { min-height: 68px; }
    .topbar-sub { display: none; }
    .topbar-timezone { display: none; }
    .topbar-actions { gap: 6px; }
    .avatar { width: 36px; height: 36px; border-radius: 10px; }
    .lang-switch { min-width: 36px; }
}

@media (max-width: 420px) {
    .sidebar,
    .dashboard-shell.sidebar-collapsed .sidebar { width: min(92vw, 310px); }
    .sidebar-brand-full,
    .dashboard-shell.sidebar-collapsed .sidebar-brand-full { width: 185px; }
    .topbar-heading strong { max-width: 125px; }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-shell,
    .sidebar,
    .sidebar-group-items,
    .sidebar-group-toggle > i,
    .sidebar-backdrop { transition: none !important; }
}

/* Brand contrast refinement for the dark navigation surface. */
.sidebar-brand {
    min-height: 52px;
    padding: 3px 7px;
    border-radius: 13px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 22px rgba(0,0,0,.08);
}
.sidebar-brand-full { width: 188px; height: 48px; }
.dashboard-shell.sidebar-collapsed .sidebar-brand {
    min-height: 44px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}
@media (max-width: 820px) {
    .sidebar-brand,
    .dashboard-shell.sidebar-collapsed .sidebar-brand {
        min-height: 52px;
        padding: 3px 7px;
        background: rgba(255,255,255,.96);
        box-shadow: 0 8px 22px rgba(0,0,0,.08);
    }
    .sidebar-brand-full,
    .dashboard-shell.sidebar-collapsed .sidebar-brand-full { width: 188px; height: 48px; }
}

/* =========================================================
   Phase 6.2.0 — Dashboard workspace, topbar and data UI
   ========================================================= */
:root {
    --dashboard-bg: #f5f8f6;
    --dashboard-card: #ffffff;
    --dashboard-soft: #f8faf9;
    --dashboard-border: #e1e9e4;
    --dashboard-shadow: 0 10px 30px rgba(3, 75, 40, .055);
    --dashboard-shadow-hover: 0 18px 44px rgba(3, 75, 40, .09);
}
.dashboard-body { background: var(--dashboard-bg); }
.dashboard-main { background: var(--dashboard-bg); min-height: 100vh; }
.dashboard-content {
    width: min(100%, 1500px);
    margin-inline: auto;
    padding: 30px 30px 48px;
}
.flash { width: min(calc(100% - 60px), 1440px); margin: 18px auto 0; box-shadow: 0 8px 24px rgba(3,75,40,.035); }

/* Topbar */
.topbar {
    min-height: 78px;
    padding-inline: 24px;
    background: rgba(255,255,255,.92);
    border-bottom-color: rgba(215,226,219,.88);
    box-shadow: 0 5px 24px rgba(3,75,40,.035);
    backdrop-filter: blur(18px) saturate(1.15);
}
.topbar-leading { min-width: 0; display: flex; align-items: center; gap: 12px; }
.topbar-heading { min-width: 0; gap: 2px; }
.topbar-heading > strong { color: var(--ink-950); font-size: 17px; font-weight: 900; line-height: 1.35; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-500); font-size: 10.5px; font-weight: 700; line-height: 1.3; }
.topbar-breadcrumb a { transition: color .15s ease; }
.topbar-breadcrumb a:hover { color: var(--green-800); }
.topbar-breadcrumb i { font-size: 7px; opacity: .55; }
.topbar-breadcrumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { gap: 8px; }
.topbar-menu { position: relative; }
.topbar-icon-button,
.topbar-action-button,
.topbar-user-button {
    border: 1px solid var(--dashboard-border);
    background: #fff;
    color: var(--ink-700);
    box-shadow: 0 3px 10px rgba(3,75,40,.025);
    transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.topbar-icon-button:hover,
.topbar-action-button:hover,
.topbar-user-button:hover,
.topbar-menu.is-open > .topbar-icon-button,
.topbar-menu.is-open > .topbar-action-button,
.topbar-menu.is-open > .topbar-user-button {
    color: var(--green-900);
    border-color: #cadbd0;
    background: var(--green-50);
    box-shadow: 0 8px 22px rgba(3,75,40,.075);
}
.topbar-icon-button { position: relative; width: 42px; height: 42px; padding: 0; border-radius: 12px; display: grid; place-items: center; font-size: 14px; }
.topbar-action-button { min-height: 42px; padding: 0 13px; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.topbar-action-button > i:first-child { color: var(--gold-600); }
.dropdown-chevron { font-size: 8px; opacity: .6; transition: transform .16s ease; }
.topbar-menu.is-open .dropdown-chevron { transform: rotate(180deg); }
.topbar-user-button { min-height: 48px; padding: 4px 8px 4px 5px; border-radius: 14px; display: flex; align-items: center; gap: 8px; text-align: start; }
html[dir="rtl"] .topbar-user-button { padding: 4px 5px 4px 8px; }
.topbar-user-copy { max-width: 145px; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.topbar-user-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--ink-950); }
.topbar-user-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-500); font-size: 9.5px; }
.avatar { flex: 0 0 auto; background: linear-gradient(145deg, var(--green-900), var(--green-700)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.avatar-lg { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; }
.topbar-timezone { min-height: 36px; border-radius: 11px; background: #fff; }
.notification-bell b { top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border-radius: 99px; border: 2px solid #fff; background: #d92d20; color: #fff; font-size: 8px; line-height: 1; }

.topbar-dropdown {
    position: absolute;
    inset-block-start: calc(100% + 10px);
    inset-inline-end: 0;
    width: 330px;
    padding: 9px;
    border: 1px solid var(--dashboard-border);
    border-radius: 16px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 24px 65px rgba(3,43,25,.16);
    z-index: 140;
    transform-origin: top right;
    animation: nafDropdownIn .14s ease-out;
}
html[dir="rtl"] .topbar-dropdown { transform-origin: top left; }
.topbar-dropdown[hidden] { display: none !important; }
@keyframes nafDropdownIn { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dropdown-head { min-height: 54px; padding: 7px 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.dropdown-head > div { display: flex; flex-direction: column; line-height: 1.35; }
.dropdown-head small { color: var(--ink-500); font-size: 9px; font-weight: 800; }
.dropdown-head strong { font-size: 13px; }
.dropdown-count { min-width: 26px; height: 26px; padding-inline: 6px; display: grid; place-items: center; border-radius: 9px; background: var(--gold-100); color: #75520a; font-size: 10px; font-weight: 900; }
.quick-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 8px; }
.quick-menu-grid a { min-height: 82px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; border-radius: 12px; background: var(--dashboard-soft); border: 1px solid transparent; color: var(--ink-700); font-size: 11px; font-weight: 800; transition: .15s ease; }
.quick-menu-grid a i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--green-100); color: var(--green-900); }
.quick-menu-grid a:hover { background: var(--green-50); border-color: #d8e5dc; color: var(--green-900); transform: translateY(-1px); }
.notification-dropdown { width: min(390px, calc(100vw - 24px)); }
.notification-preview-list { display: grid; padding-block: 5px; }
.notification-preview-item { min-height: 62px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 8px; border-radius: 11px; }
.notification-preview-item:hover { background: #f8faf9; }
.notification-preview-item.is-unread { background: #f4faf6; }
.notification-preview-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--green-100); color: var(--green-900); font-size: 11px; }
.notification-preview-item > div { min-width: 0; display: grid; gap: 3px; }
.notification-preview-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.notification-preview-item small { color: var(--ink-500); font-size: 9px; }
.notification-preview-item form { margin: 0; }
.notification-preview-item form button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink-500); font-size: 9px; }
.notification-preview-item form button:hover { background: #fff; color: var(--green-900); }
.dropdown-empty { min-height: 125px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--ink-500); font-size: 11px; }
.dropdown-empty i { font-size: 22px; color: #9bb0a3; }
.dropdown-footer-link { min-height: 42px; padding: 0 10px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--green-900); font-size: 10.5px; font-weight: 900; }
.user-dropdown { width: 290px; }
.user-dropdown-profile { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; padding: 9px; border-bottom: 1px solid var(--line); }
.user-dropdown-profile > div { min-width: 0; display: grid; line-height: 1.4; }
.user-dropdown-profile strong,.user-dropdown-profile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-profile strong { font-size: 12px; }
.user-dropdown-profile span { color: var(--ink-500); font-size: 9.5px; direction: ltr; text-align: start; }
.user-dropdown-profile small { color: var(--gold-600); font-size: 9px; font-weight: 800; }
.user-dropdown-links { display: grid; gap: 2px; padding-block: 7px; }
.user-dropdown-links a,.user-dropdown-logout button { width: 100%; min-height: 42px; padding: 0 9px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; gap: 10px; color: var(--ink-700); text-align: start; font-size: 10.5px; font-weight: 800; }
.user-dropdown-links a i,.user-dropdown-logout button i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #f3f6f4; color: var(--green-800); }
.user-dropdown-links a:hover,.user-dropdown-logout button:hover { background: #f7faf8; color: var(--green-900); }
.user-dropdown-logout { margin: 0; padding-top: 7px; border-top: 1px solid var(--line); }
.user-dropdown-logout button { color: var(--danger); cursor: pointer; }
.user-dropdown-logout button i { background: var(--danger-bg); color: var(--danger); }

/* Dashboard landing sections */
.dashboard-welcome {
    position: relative;
    overflow: hidden;
    min-height: 155px;
    margin-bottom: 22px;
    padding: 26px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(3,75,40,.12);
    border-radius: 22px;
    background: radial-gradient(circle at 86% 20%, rgba(218,158,18,.18), transparent 25%), linear-gradient(135deg, #07371f, #075b33);
    color: #fff;
    box-shadow: 0 18px 45px rgba(3,75,40,.13);
}
html[dir="rtl"] .dashboard-welcome { background: radial-gradient(circle at 14% 20%, rgba(218,158,18,.18), transparent 25%), linear-gradient(-135deg, #07371f, #075b33); }
.dashboard-welcome::after { content: ""; position: absolute; inset-inline-end: -70px; bottom: -120px; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.10); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018); }
.dashboard-welcome > * { position: relative; z-index: 1; }
.dashboard-welcome h1 { margin: 6px 0 7px; color: #fff; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.3; }
.dashboard-welcome p { margin: 0; color: #cfe1d6; font-size: 13px; }
.dashboard-kicker { display: inline-flex; align-items: center; gap: 7px; color: #f6d987; font-size: 10px; font-weight: 900; }
.dashboard-health { min-width: 170px; min-height: 66px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.health-dot { width: 10px; height: 10px; border-radius: 50%; background: #47d17f; box-shadow: 0 0 0 5px rgba(71,209,127,.13); }
.dashboard-health.has-attention .health-dot { background: #efbd48; box-shadow: 0 0 0 5px rgba(239,189,72,.13); }
.dashboard-health > div { display: grid; line-height: 1.45; }
.dashboard-health small { color: #bdd1c4; font-size: 9.5px; }
.dashboard-health strong { color: #fff; font-size: 12px; }
.welcome-timezone { min-height: 40px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.08); color: #e5eee8; font-size: 10.5px; font-weight: 800; }

.stats-grid.dashboard-stats { gap: 14px; margin-bottom: 26px; }
.dashboard-stats .stat-card { position: relative; overflow: hidden; min-height: 160px; padding: 18px; border-color: var(--dashboard-border); border-radius: 18px; box-shadow: var(--dashboard-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.dashboard-stats .stat-card::after { content: ""; position: absolute; inset-inline-end: -34px; bottom: -46px; width: 105px; height: 105px; border-radius: 50%; background: var(--green-50); opacity: .8; }
.dashboard-stats .stat-card:hover { transform: translateY(-3px); border-color: #ccddd2; box-shadow: var(--dashboard-shadow-hover); }
.stat-card-top { min-height: 38px; margin-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--green-100); color: var(--green-900); font-size: 13px; }
.stat-link-icon { color: #a4b3aa; font-size: 9px; }
.dashboard-stats .stat-card > span:not(.stat-icon) { position: relative; z-index: 1; font-size: 11px; }
.dashboard-stats .stat-card > strong { position: relative; z-index: 1; margin: 5px 0 1px; font-size: 31px; }
.dashboard-stats .stat-card > small { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; font-size: 9.5px; }
.dashboard-stats .stat-status { font-size: clamp(15px, 1.5vw, 20px) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-stats .stat-card-warning { border-color: #f0dca1; background: #fffdf7; }
.dashboard-stats .stat-card-warning .stat-icon { background: var(--gold-100); color: #845d0b; }

.dashboard-section-block { margin-bottom: 24px; }
.dashboard-section-title { margin-bottom: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.dashboard-section-title h2 { margin: 4px 0 0; font-size: 19px; }
.attention-grid-modern { gap: 12px; }
.attention-grid-modern .attention-card { min-height: 92px; grid-template-columns: auto 1fr auto; padding: 14px; border-radius: 16px; box-shadow: 0 6px 20px rgba(3,75,40,.025); transition: .16s ease; }
.attention-grid-modern .attention-card:hover { transform: translateY(-2px); box-shadow: var(--dashboard-shadow); }
.attention-grid-modern .attention-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #f2f6f3; color: var(--green-800); }
.attention-grid-modern .attention-card.needs-action .attention-icon { background: var(--gold-100); color: #875f0c; }
.attention-grid-modern .attention-card div strong { font-size: 22px; }
.attention-arrow { color: #9ba9a1; font-size: 9px; }

.panel-elevated { border-color: var(--dashboard-border); box-shadow: var(--dashboard-shadow); }
.dashboard-primary-grid { grid-template-columns: minmax(0,1.65fr) minmax(280px,.75fr); align-items: start; }
.panel-head { margin-bottom: 16px; }
.panel-head h2 { font-size: 17px; }
.session-list-modern { display: grid; gap: 6px; }
.session-row-link { min-height: 66px; padding: 8px 9px; display: grid; grid-template-columns: 82px minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 13px; transition: .15s ease; }
.session-row-link:hover { background: #f8faf9; border-color: #e4ebe6; }
.session-time { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 6px; color: var(--green-900); }
.session-time i { grid-row: 1 / 3; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--green-100); font-size: 10px; }
.session-time strong { font-size: 12px; }
.session-time small { color: var(--ink-500); font-size: 8.5px; }
.session-main { min-width: 0; display: grid; gap: 3px; }
.session-main b,.session-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-main b { font-size: 11px; }
.session-main small { color: var(--ink-500); font-size: 9.5px; }
.session-chevron { color: #a7b6ad; font-size: 8px; }
.quick-actions-modern { display: grid; gap: 7px; }
.quick-actions-modern a { min-height: 66px; padding: 8px 9px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: .15s ease; }
.quick-actions-modern a:hover { border-color: #cfddd4; background: var(--green-50); transform: translateX(-2px); }
html[dir="ltr"] .quick-actions-modern a:hover { transform: translateX(2px); }
.quick-actions-modern a > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--green-100); color: var(--green-900); }
.quick-actions-modern a > div { min-width: 0; display: grid; line-height: 1.45; }
.quick-actions-modern a strong { font-size: 10.5px; }
.quick-actions-modern a small { color: var(--ink-500); font-size: 8.5px; }
.quick-actions-modern a > i { color: #9daf9f; font-size: 8px; }
.dashboard-table-panel { margin-top: 16px; }
.dashboard-data-table th { padding-block: 11px; }
.dashboard-data-table td { padding-block: 14px; }
.dashboard-data-table tbody tr { transition: background .14s ease; }
.dashboard-data-table tbody tr:hover { background: #fbfdfb; }
.table-id { display: inline-flex; min-width: 38px; color: var(--ink-500); font-size: 9.5px; font-weight: 800; }
.table-date { color: var(--ink-500); font-size: 10px; direction: ltr; }

/* Teacher dashboard */
.agenda-list { display: grid; gap: 7px; }
.agenda-item { min-height: 76px; padding: 10px 12px; display: grid; grid-template-columns: 74px auto minmax(0,1fr) auto auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .15s ease; }
.agenda-item:hover { border-color: #cfddd4; background: #fafcfb; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(3,75,40,.04); }
.agenda-time { display: grid; line-height: 1.35; }
.agenda-time strong { color: var(--green-900); font-size: 15px; }
.agenda-time small { color: var(--ink-500); font-size: 8.5px; }
.agenda-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--green-100); color: var(--green-900); font-size: 11px; }
.agenda-copy { min-width: 0; display: grid; gap: 2px; }
.agenda-copy strong,.agenda-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-copy strong { font-size: 11px; }
.agenda-copy small { color: var(--ink-500); font-size: 9.5px; }
.agenda-arrow { color: #a6b3ab; font-size: 8px; }

/* Student dashboard */
.student-dashboard-grid { grid-template-columns: minmax(0,1.3fr) minmax(280px,.7fr); align-items: stretch; }
.next-class-panel { background: linear-gradient(180deg, #fff, #fbfdfb); }
.next-session-modern { margin: 6px 0 18px; padding: 14px; border: 1px solid #e3eae5; border-radius: 16px; background: #fff; }
.next-session-modern .program-icon { background: linear-gradient(145deg, var(--green-900), var(--green-700)); color: #fff; box-shadow: 0 10px 22px rgba(3,75,40,.14); }
.next-session-modern p { display: flex; align-items: center; gap: 6px; }
.next-session-actions { display: grid; gap: 5px; }
.next-session-actions .join-note { display: flex; align-items: center; justify-content: center; gap: 6px; }
.subscription-summary-card { display: grid; grid-template-columns: 150px 1fr; grid-template-rows: auto 1fr; align-items: center; gap: 10px 18px; }
.subscription-summary-card .panel-head { grid-column: 1 / -1; width: 100%; }
.subscription-ring { --progress: 0%; width: 132px; height: 132px; margin-inline: auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green-700) 0 var(--progress), #e8efea var(--progress) 100%); position: relative; }
.subscription-ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.subscription-ring > div { position: relative; z-index: 1; display: grid; place-items: center; line-height: 1.25; }
.subscription-ring strong { font-size: 30px; color: var(--green-950); }
.subscription-ring small { color: var(--ink-500); font-size: 9px; }
.subscription-copy { min-width: 0; }
.subscription-copy h3 { margin: 0 0 3px; font-size: 15px; }
.subscription-copy p { margin: 0 0 14px; color: var(--ink-500); font-size: 10.5px; }
.subscription-copy > small { color: var(--ink-500); font-size: 9px; }
.student-insight-grid { align-items: start; }
.dashboard-report-card,.dashboard-progress-card { padding-block: 13px; }
.dashboard-report-card header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; }
.dashboard-report-card header > div { min-width: 0; display: grid; }
.dashboard-report-card header > div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-report-card header > div small { color: var(--ink-500); font-size: 9px; }
.report-icon,.progress-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--green-100); color: var(--green-900); font-size: 10px; }
.dashboard-progress-card header > div { min-width: 0; display: grid; gap: 2px; }

/* Consistent panels, filters and tables across dashboard modules */
:where(.dashboard-body) .panel { border-color: var(--dashboard-border); box-shadow: 0 5px 20px rgba(3,75,40,.025); }
:where(.dashboard-body) .panel:hover { border-color: #dce5df; }
.dashboard-body .filter-bar { border: 1px solid var(--dashboard-border); border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(3,75,40,.025); }
.dashboard-body .data-table th { position: relative; background: #f8faf9; color: #5c6e64; font-size: 10px; letter-spacing: .01em; }
html[dir="rtl"] .dashboard-body .data-table th { letter-spacing: 0; }
.dashboard-body .data-table td { font-size: 11.5px; }
.dashboard-body .table-wrap { border-radius: 12px; scrollbar-width: thin; scrollbar-color: #cbd8cf transparent; }
.dashboard-body .btn-ghost { border-color: var(--line); background: #fff; }
.dashboard-body .btn-ghost:hover { border-color: #ccddd2; background: var(--green-50); color: var(--green-900); }
.dashboard-body .empty-icon { display: grid; place-items: center; font-size: 20px; color: var(--green-700); }
.empty-state.compact { min-height: 150px; }

@media (max-width: 1180px) {
    .topbar-user-copy { display: none; }
    .topbar-user-button { width: 48px; padding: 4px; justify-content: center; }
    .topbar-user-button > .dropdown-chevron { display: none; }
    .dashboard-primary-grid { grid-template-columns: minmax(0,1.35fr) minmax(260px,.75fr); }
    .student-dashboard-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
    .topbar-quick-button span,.topbar-quick-button .dropdown-chevron { display: none; }
    .topbar-quick-button { width: 42px; padding: 0; justify-content: center; }
    .dashboard-primary-grid,.student-dashboard-grid { grid-template-columns: 1fr; }
    .subscription-summary-card { min-height: 245px; }
}
@media (max-width: 820px) {
    .dashboard-content { padding: 20px 16px 38px; }
    .flash { width: calc(100% - 32px); }
    .topbar { min-height: 70px; padding-inline: 12px; }
    .topbar-leading { gap: 8px; }
    .topbar-heading > strong { font-size: 14px; }
    .topbar-breadcrumb { display: none; }
    .topbar-timezone { display: none; }
    .topbar-actions { gap: 5px; }
    .topbar-icon-button,.topbar-action-button { width: 38px; height: 38px; min-height: 38px; border-radius: 11px; }
    .topbar-user-button { width: 40px; min-height: 40px; border-radius: 11px; }
    .topbar-user-button .avatar { width: 32px; height: 32px; border-radius: 9px; }
    .dashboard-welcome { min-height: 140px; padding: 22px; border-radius: 18px; }
    .dashboard-welcome h1 { font-size: 25px; }
    .dashboard-health { min-width: 145px; }
    .stats-grid.dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-stats .stat-card { min-height: 145px; }
    .attention-grid-modern { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .agenda-item { grid-template-columns: 65px auto minmax(0,1fr) auto; }
    .agenda-item .status-badge { display: none; }
    .subscription-summary-card { grid-template-columns: 125px 1fr; }
    .subscription-ring { width: 112px; height: 112px; }
}
@media (max-width: 600px) {
    .topbar-heading > strong { max-width: 135px; }
    .topbar-quick-button { display: none; }
    .topbar-dropdown { position: fixed; inset-inline: 12px; inset-block-start: 70px; width: auto; max-height: calc(100vh - 88px); overflow-y: auto; }
    .dashboard-welcome { align-items: flex-start; flex-direction: column; gap: 14px; }
    .dashboard-health,.welcome-timezone { align-self: flex-start; }
    .stats-grid.dashboard-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .dashboard-stats .stat-card { min-height: 132px; padding: 14px; }
    .dashboard-stats .stat-card > strong { font-size: 26px; }
    .stat-icon { width: 34px; height: 34px; }
    .dashboard-section-title { align-items: flex-start; flex-direction: column; }
    .attention-grid-modern { grid-template-columns: 1fr; }
    .attention-grid-modern .attention-card { min-height: 78px; }
    .session-row-link { grid-template-columns: 72px minmax(0,1fr) auto; padding-inline: 3px; }
    .quick-actions-modern a { min-height: 60px; }
    .agenda-item { grid-template-columns: 58px auto minmax(0,1fr) auto; padding-inline: 8px; }
    .agenda-avatar { width: 34px; height: 34px; }
    .subscription-summary-card { grid-template-columns: 1fr; text-align: center; }
    .subscription-summary-card .panel-head { text-align: start; }
    .subscription-copy .progress-bar { max-width: 290px; margin-inline: auto; }
    .dashboard-report-card header { grid-template-columns: auto minmax(0,1fr); }
    .dashboard-report-card header > span:last-child { grid-column: 2; }
}
@media (max-width: 420px) {
    .topbar-heading > strong { max-width: 105px; }
    .topbar-actions { gap: 3px; }
    .topbar-menu:nth-of-type(1) { display: none; }
    .stats-grid.dashboard-stats { grid-template-columns: 1fr; }
    .dashboard-stats .stat-card { min-height: 125px; }
}
@media (prefers-reduced-motion: reduce) {
    .topbar-dropdown { animation: none; }
    .dashboard-stats .stat-card,.attention-grid-modern .attention-card,.agenda-item,.quick-actions-modern a { transition: none !important; }
}

/* =========================================================
   Phase 6.3.0 — Responsive dashboard module UI + topbar fix
   ========================================================= */

/* Critical topbar fix: an older generic selector forced the second
   topbar child into a vertical column. Keep utility actions in one row. */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 76px;
    gap: 16px;
}
.topbar > .topbar-actions {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    margin-inline-start: auto;
}
.topbar-leading {
    flex: 1 1 auto;
    min-width: 0;
}
.topbar-page-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid #dbe8df;
    background: linear-gradient(145deg, #f7fbf8, #edf7f0);
    color: var(--green-900);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
    font-size: 14px;
}
.topbar-heading > strong { font-size: 16px; }
.topbar-breadcrumb { font-size: 10px; }

/* Shared module page header. JavaScript progressively adds the icon so
   older views automatically receive the new system without duplicated PHP. */
.dashboard-heading {
    position: relative;
    min-height: 90px;
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid var(--dashboard-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(3,75,40,.05), transparent 32%),
        #fff;
    box-shadow: var(--dashboard-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
html[dir="rtl"] .dashboard-heading {
    background:
        radial-gradient(circle at 0 0, rgba(3,75,40,.05), transparent 32%),
        #fff;
}
.dashboard-heading > div:first-child {
    min-width: 0;
}
.dashboard-heading h1 {
    margin: 3px 0 0;
    color: var(--ink-950);
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.25;
    font-weight: 900;
}
.dashboard-heading .heading-sub {
    max-width: 820px;
    margin: 6px 0 0;
    color: var(--ink-500);
    font-size: 11.5px;
    line-height: 1.8;
}
.dashboard-heading .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green-800);
    font-size: 9px;
    font-weight: 900;
}
.dashboard-heading.is-ui-enhanced {
    padding-inline-start: 78px;
}
html[dir="rtl"] .dashboard-heading.is-ui-enhanced {
    padding-inline-start: 20px;
    padding-inline-end: 78px;
}
.dashboard-page-title-icon {
    position: absolute;
    inset-inline-start: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--green-900), var(--green-700));
    color: #fff;
    box-shadow: 0 10px 24px rgba(3,75,40,.16);
    font-size: 15px;
}
html[dir="rtl"] .dashboard-page-title-icon {
    inset-inline-start: auto;
    inset-inline-end: 20px;
}
.dashboard-heading > .btn,
.dashboard-heading > div:last-child:not(:first-child) {
    flex: 0 0 auto;
}

/* Panels */
:where(.dashboard-body) .panel {
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--dashboard-shadow);
    overflow: clip;
}
.dashboard-body .panel.form-card {
    padding: 20px;
}
.dashboard-body .panel-head {
    min-height: 44px;
    margin-bottom: 14px;
}
.dashboard-body .panel-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-950);
    font-size: 16px;
    font-weight: 900;
}

/* Buttons and actions */
.dashboard-body .btn {
    min-height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 800;
    white-space: nowrap;
}
.dashboard-body .btn-sm { min-height: 34px; border-radius: 10px; }
.dashboard-body .btn i { font-size: .92em; }
.dashboard-body .btn-primary {
    box-shadow: 0 7px 18px rgba(3,75,40,.13);
}
.dashboard-body .btn-primary:hover { transform: translateY(-1px); }
.dashboard-body .table-actions,
.dashboard-body .inline-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* Filters: clean desktop grid, safe wrapping at medium sizes. */
.dashboard-body .filter-bar {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 12px;
    margin-bottom: 16px;
}
.dashboard-body .filter-bar input,
.dashboard-body .filter-bar select {
    min-height: 42px;
    border-radius: 11px;
    background-color: #fff;
}
.dashboard-body .filter-bar input[type="search"],
.dashboard-body .filter-bar input[name="q"] {
    min-width: min(300px, 100%);
}
.dashboard-body .filter-grid {
    display: grid;
    grid-template-columns: minmax(220px,1.4fr) repeat(3,minmax(140px,.75fr)) auto auto;
    align-items: center;
}
.dashboard-body .filter-grid > * { min-width: 0; width: 100%; }
.dashboard-body .filter-grid .btn { width: auto; }

/* Forms */
.dashboard-body .admin-form {
    gap: 18px;
}
.dashboard-body .field {
    display: grid;
    gap: 7px;
}
.dashboard-body .field > span,
.dashboard-body .field > label {
    color: #344b3d;
    font-size: 10.5px;
    font-weight: 900;
}
.dashboard-body .field input,
.dashboard-body .field select,
.dashboard-body .field textarea {
    width: 100%;
    border-radius: 11px;
    border-color: #d8e3dc;
    background: #fff;
}
.dashboard-body .field input,
.dashboard-body .field select { min-height: 44px; }
.dashboard-body .field textarea { min-height: 110px; resize: vertical; }
.dashboard-body .field-help {
    color: var(--ink-500);
    font-size: 9.5px;
    line-height: 1.7;
}
.dashboard-body .field-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.dashboard-body .field-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.dashboard-body .form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

/* Tables on desktop */
.dashboard-body .table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--dashboard-border);
    background: #fff;
}
.dashboard-body .table-wrap > table,
.dashboard-body table.data-table,
.dashboard-body table.responsive-data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}
.dashboard-body .table-wrap thead th {
    min-height: 44px;
    padding: 12px 13px;
    background: #f7faf8;
    border-bottom: 1px solid var(--dashboard-border);
    color: #607168;
    font-size: 9.7px;
    font-weight: 900;
}
.dashboard-body .table-wrap tbody td {
    padding: 13px;
    border-bottom: 1px solid #edf1ee;
    color: var(--ink-700);
    vertical-align: middle;
}
.dashboard-body .table-wrap tbody tr:last-child td { border-bottom: 0; }
.dashboard-body .table-wrap tbody tr:hover td { background: #fbfdfb; }
.dashboard-body .table-sub { display: block; margin-top: 3px; color: var(--ink-500); }
.dashboard-body .status-badge {
    min-height: 26px;
    gap: 5px;
    padding: 4px 9px;
    font-size: 9.5px;
}
.dashboard-body .status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .72;
}

/* Empty / informational states */
.dashboard-body .empty-state,
.dashboard-body .empty-inline,
.dashboard-body .empty-cell {
    color: var(--ink-500);
}
.dashboard-body .empty-state {
    border: 1px dashed #d7e4dc;
    border-radius: 14px;
    background: #fbfdfb;
}
.dashboard-body .info-callout {
    border-inline-start: 4px solid var(--gold-500);
    background: linear-gradient(90deg, rgba(218,158,18,.05), #fff 26%);
}
html[dir="rtl"] .dashboard-body .info-callout {
    background: linear-gradient(270deg, rgba(218,158,18,.05), #fff 26%);
}

/* Conversion / exports / operational cards */
.dashboard-body .export-grid,
.dashboard-body .conversion-grid,
.dashboard-body .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(230px,1fr));
    gap: 14px;
}
.dashboard-body .export-card {
    min-height: 150px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr auto;
    align-items: start;
    gap: 12px;
}
.dashboard-body .export-card .btn { grid-column: 1 / -1; justify-self: start; }
.dashboard-body .export-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-100);
    color: var(--green-900);
    font-size: 10px;
    font-weight: 900;
}

/* Mobile/tablet */
@media (max-width: 1100px) {
    .topbar-timezone { display: none; }
    .topbar-user-copy { display: none; }
    .topbar-user-button { width: 44px; padding: 3px; justify-content: center; }
    .topbar-user-button > .dropdown-chevron { display: none; }
    .dashboard-body .filter-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 820px) {
    .topbar {
        min-height: 68px;
        padding-inline: 12px;
        gap: 8px;
    }
    .topbar-leading { gap: 7px; }
    .topbar-page-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
    .topbar-heading > strong { max-width: 36vw; font-size: 13.5px; }
    .topbar-actions { gap: 5px !important; }
    .topbar-quick-button span,
    .topbar-quick-button .dropdown-chevron { display: none; }
    .topbar-quick-button { width: 38px; padding: 0; }
    .dashboard-content { padding: 18px 14px 34px; }
    .dashboard-heading {
        min-height: auto;
        padding: 16px;
        align-items: flex-start;
        flex-direction: column;
    }
    .dashboard-heading.is-ui-enhanced,
    html[dir="rtl"] .dashboard-heading.is-ui-enhanced {
        padding-inline: 16px;
        padding-block-start: 70px;
    }
    .dashboard-page-title-icon,
    html[dir="rtl"] .dashboard-page-title-icon {
        inset-inline-start: 16px;
        inset-inline-end: auto;
        top: 15px;
        transform: none;
        width: 40px;
        height: 40px;
    }
    html[dir="rtl"] .dashboard-page-title-icon {
        inset-inline-start: auto;
        inset-inline-end: 16px;
    }
    .dashboard-heading > .btn { width: 100%; }
    .dashboard-body .field-grid.two,
    .dashboard-body .field-grid.three,
    .dashboard-body .filter-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-body .filter-grid .btn,
    .dashboard-body .filter-bar .btn { width: 100%; }
}

/* Card-table transformation is applied by JS only to module tables.
   It preserves semantic table markup while making every admin listing useful
   on phones without maintaining separate mobile templates. */
@media (max-width: 700px) {
    .dashboard-body .table-wrap.is-responsive-stack {
        overflow: visible;
        border: 0;
        background: transparent;
    }
    .dashboard-body .table-wrap.is-responsive-stack > table.responsive-data-table {
        min-width: 0;
        display: block;
        background: transparent;
    }
    .dashboard-body .table-wrap.is-responsive-stack thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .dashboard-body .table-wrap.is-responsive-stack tbody,
    .dashboard-body .table-wrap.is-responsive-stack tr,
    .dashboard-body .table-wrap.is-responsive-stack td {
        display: block;
        width: 100%;
    }
    .dashboard-body .table-wrap.is-responsive-stack tbody {
        display: grid;
        gap: 11px;
    }
    .dashboard-body .table-wrap.is-responsive-stack tr {
        overflow: hidden;
        border: 1px solid var(--dashboard-border);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 18px rgba(3,75,40,.035);
    }
    .dashboard-body .table-wrap.is-responsive-stack td {
        min-height: 46px;
        padding: 10px 12px;
        display: grid;
        grid-template-columns: minmax(95px,.42fr) minmax(0,1fr);
        align-items: center;
        gap: 10px;
        border-bottom: 1px solid #edf1ee;
        white-space: normal;
        text-align: start;
    }
    .dashboard-body .table-wrap.is-responsive-stack td::before {
        content: attr(data-label);
        color: #738279;
        font-size: 9px;
        font-weight: 900;
    }
    .dashboard-body .table-wrap.is-responsive-stack td:last-child { border-bottom: 0; }
    .dashboard-body .table-wrap.is-responsive-stack td[colspan] {
        display: block;
    }
    .dashboard-body .table-wrap.is-responsive-stack td[colspan]::before { display: none; }
    .dashboard-body .table-actions,
    .dashboard-body .inline-actions { justify-content: flex-start; }
}

@media (max-width: 520px) {
    .topbar-page-icon { display: none; }
    .topbar-heading > strong { max-width: 31vw; }
    .topbar-quick-button { display: none; }
    .topbar-icon-button,
    .topbar-user-button { width: 38px; min-height: 38px; height: 38px; }
    .dashboard-content { padding-inline: 11px; }
    .dashboard-heading { border-radius: 15px; }
    :where(.dashboard-body) .panel { border-radius: 15px; }
    .dashboard-body .panel.form-card { padding: 15px; }
    .dashboard-body .table-wrap.is-responsive-stack td {
        grid-template-columns: 88px minmax(0,1fr);
    }
}

/* Legacy CMS form stacks inherit the same modern control system. */
.dashboard-body .form-stack {
    display: grid;
    gap: 14px;
}
.dashboard-body .form-stack > label {
    display: grid;
    gap: 7px;
    color: #344b3d;
    font-size: 10.5px;
    font-weight: 900;
}
.dashboard-body .form-stack input,
.dashboard-body .form-stack select,
.dashboard-body .form-stack textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d8e3dc;
    border-radius: 11px;
    background: #fff;
    padding: 9px 12px;
    color: var(--ink-950);
    font: inherit;
    outline: none;
}
.dashboard-body .form-stack textarea { min-height: 110px; resize: vertical; }
.dashboard-body .form-stack input:focus,
.dashboard-body .form-stack select:focus,
.dashboard-body .form-stack textarea:focus {
    border-color: var(--green-700);
    box-shadow: 0 0 0 4px rgba(3,75,40,.07);
}

@media (max-width: 700px) {
    .dashboard-body .table-wrap.is-responsive-stack td.mobile-actions-cell {
        grid-template-columns: 1fr;
    }
    .dashboard-body .table-wrap.is-responsive-stack td.mobile-actions-cell::before {
        display: none;
    }
    .dashboard-body .table-wrap.is-responsive-stack td.mobile-actions-cell .btn,
    .dashboard-body .table-wrap.is-responsive-stack td.mobile-actions-cell > form,
    .dashboard-body .table-wrap.is-responsive-stack td.mobile-actions-cell > a {
        width: 100%;
    }
}

.dashboard-body .module-panel { margin-bottom: 16px; }
.dashboard-body .conversion-stats {
    grid-template-columns: repeat(4,minmax(0,1fr));
    margin-bottom: 16px;
}
.dashboard-body .operational-stat-card {
    min-height: 118px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--dashboard-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--dashboard-shadow);
}
.dashboard-body .operational-stat-card .stat-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-100);
    color: var(--green-900);
}
.dashboard-body .operational-stat-card > div { display: grid; gap: 2px; }
.dashboard-body .operational-stat-card > div > span { color: var(--ink-500); font-size: 10px; font-weight: 800; }
.dashboard-body .operational-stat-card > div > strong { color: var(--green-950); font-size: 28px; line-height: 1.1; }
.dashboard-body .inline-filter select {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #d8e3dc;
    border-radius: 10px;
    background: #fff;
    color: var(--ink-700);
    font: inherit;
}
.dashboard-body .record-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green-900);
    font-weight: 900;
}
.dashboard-body .record-link i { font-size: 8px; opacity: .65; }
.dashboard-body .info-callout > strong {
    display: flex;
    align-items: center;
    gap: 7px;
}
@media (max-width: 980px) {
    .dashboard-body .conversion-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
    .dashboard-body .conversion-stats { grid-template-columns: 1fr; }
    .dashboard-body .operational-stat-card { min-height: 94px; }
}

/* Logical RTL correction for the module header icon. */
html[dir="rtl"] .dashboard-heading.is-ui-enhanced {
    padding-inline-start: 78px;
    padding-inline-end: 20px;
}
html[dir="rtl"] .dashboard-page-title-icon {
    inset-inline-start: 20px;
    inset-inline-end: auto;
}
@media (max-width: 820px) {
    html[dir="rtl"] .dashboard-heading.is-ui-enhanced {
        padding-inline: 16px;
        padding-block-start: 70px;
    }
    html[dir="rtl"] .dashboard-page-title-icon {
        inset-inline-start: 16px;
        inset-inline-end: auto;
    }
}

/* =========================================================
   Phase 6.4.0 — Entity detail views + professional forms UX
   ========================================================= */

/* Detail-page heading and entity identity */
.entity-page-heading { margin-bottom: 18px; }
.entity-page-heading .eyebrow { display: inline-flex; align-items: center; gap: 7px; }
.entity-page-heading .eyebrow i { color: var(--gold-600); }
.entity-page-heading .heading-actions { align-items: center; }

.entity-hero {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    margin-bottom: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background:
        radial-gradient(circle at 8% 10%, rgba(211,168,62,.10), transparent 28%),
        linear-gradient(140deg, #ffffff 0%, #fbfdfc 60%, #f1f8f3 100%);
    border-color: #dbe7df;
}
html[dir="rtl"] .entity-hero {
    background:
        radial-gradient(circle at 92% 10%, rgba(211,168,62,.10), transparent 28%),
        linear-gradient(220deg, #ffffff 0%, #fbfdfc 60%, #f1f8f3 100%);
}
.entity-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    inset-block-end: -150px;
    inset-inline-end: -80px;
    border-radius: 50%;
    border: 34px solid rgba(3,75,40,.035);
    pointer-events: none;
}
.entity-identity { position: relative; z-index: 1; min-width: 0; display: flex; align-items: center; gap: 18px; }
.entity-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, var(--green-900), var(--green-700));
    box-shadow: 0 14px 28px rgba(3,75,40,.16), inset 0 0 0 1px rgba(255,255,255,.14);
    font-weight: 900;
}
.entity-avatar-lg { width: 70px; height: 70px; font-size: 26px; }
.entity-avatar-lg i { font-size: 24px; }
.entity-identity-copy { min-width: 0; display: grid; gap: 7px; }
.entity-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.entity-title-line h2 { margin: 0; color: var(--green-950); font-size: clamp(21px,2vw,29px); line-height: 1.25; }
.entity-identity-copy > p { margin: 0; color: var(--ink-500); font-size: 12px; font-weight: 650; }
.entity-meta-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.entity-meta-chips > span {
    min-height: 31px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dce8e0;
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: var(--ink-700);
    font-size: 10px;
    font-weight: 750;
}
.entity-meta-chips i { color: var(--green-700); font-size: 9px; }
.entity-hero-aside {
    position: relative;
    z-index: 1;
    flex: 0 0 150px;
    min-height: 105px;
    padding: 14px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    border: 1px solid #dce7e0;
    border-radius: 17px;
    background: rgba(255,255,255,.84);
    text-align: center;
}
.entity-hero-aside small { color: var(--ink-500); font-size: 9px; font-weight: 800; }
.entity-hero-aside strong { color: var(--green-900); font-size: 26px; line-height: 1; }
.entity-hero-aside span { color: var(--ink-700); font-size: 10.5px; font-weight: 850; }
.entity-hero-aside.is-positive { border-color: #c6e3d1; background: #f4fbf6; }
.entity-hero-aside.is-positive strong { color: #067647; }
.entity-hero-aside.is-danger { border-color: #f1c8c3; background: #fff8f7; }
.entity-hero-aside.is-danger strong { color: var(--danger); }

/* Detail metrics */
.detail-kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.detail-kpi-grid-5 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.detail-kpi {
    min-height: 92px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--dashboard-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(3,75,40,.025);
}
.detail-kpi-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--green-100);
    color: var(--green-900);
    font-size: 12px;
}
.detail-kpi > div { min-width: 0; display: grid; gap: 2px; }
.detail-kpi small { color: var(--ink-500); font-size: 9.5px; font-weight: 800; }
.detail-kpi strong { color: var(--green-950); font-size: 25px; line-height: 1.15; }
.detail-kpi strong.detail-kpi-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.detail-kpi em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-500); font-size: 8.5px; font-style: normal; }
.detail-kpi.is-positive .detail-kpi-icon { background: #ecfdf3; color: #067647; }
.detail-kpi.is-warning { border-color: #edd89d; background: #fffdf7; }
.detail-kpi.is-warning .detail-kpi-icon { background: var(--gold-100); color: #8a5c00; }
.detail-money { font-size: 16px !important; }

/* Detail workspaces */
.detail-workspace-grid { display: grid; gap: 16px; margin-bottom: 16px; align-items: start; }
.detail-workspace-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.detail-workspace-grid-aside { grid-template-columns: minmax(0,1.55fr) minmax(290px,.65fr); }
.detail-section { margin-bottom: 16px; }
.detail-workspace-grid > .detail-section { margin-bottom: 0; }
.detail-panel-head { min-height: 56px; display: flex; align-items: center; gap: 10px; }
.detail-panel-head > div:not(.panel-title-icon) { min-width: 0; }
.detail-panel-head h2 { margin: 1px 0 0; font-size: 15px; }
.panel-title-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--green-100);
    color: var(--green-900);
    font-size: 11px;
}
.panel-title-icon.danger { background: var(--danger-bg); color: var(--danger); }
.panel-count {
    margin-inline-start: auto;
    min-width: 28px;
    height: 28px;
    padding-inline: 6px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #f1f5f2;
    color: var(--ink-700);
    font-size: 10px;
    font-weight: 900;
}

.detail-list-modern { gap: 0; }
.detail-list-modern.detail-list-columns { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 22px; }
.detail-list-modern > div {
    min-width: 0;
    min-height: 62px;
    padding: 11px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border-bottom: 1px solid #edf1ee;
}
.detail-list-modern > div:last-child { border-bottom: 0; }
.detail-list-modern > .detail-list-wide { grid-column: 1 / -1; }
.detail-list-modern span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-500); font-size: 9.5px; font-weight: 750; }
.detail-list-modern span i { width: 17px; color: var(--green-700); text-align: center; font-size: 9px; }
.detail-list-modern strong { color: var(--ink-950); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.detail-long-text { font-weight: 650 !important; color: var(--ink-700) !important; white-space: normal; }

.action-panel { position: sticky; top: 94px; }
.action-panel .action-block + .action-block { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.action-panel .btn-block { min-height: 44px; }
.danger-surface { border-color: #f0d1cd !important; background: linear-gradient(180deg,#fff,#fffafa); }
.danger-review-modern { padding: 12px; border: 1px solid #f2d0cb; border-radius: 13px; background: #fffafa; }

/* Lists used by rich profiles */
.activity-list { display: grid; gap: 8px; }
.activity-list-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.activity-row {
    min-height: 68px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    border: 1px solid #e2eae5;
    border-radius: 13px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.activity-row:hover { border-color: #cbded2; box-shadow: 0 8px 24px rgba(3,75,40,.055); transform: translateY(-1px); }
.activity-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--green-100); color: var(--green-900); font-size: 10px; }
.activity-row > div { min-width: 0; display: grid; gap: 3px; }
.activity-row strong,.activity-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row strong { color: var(--ink-950); font-size: 11px; }
.activity-row small { color: var(--ink-500); font-size: 9px; }

.progress-summary-list,.message-stack { display: grid; gap: 9px; }
.progress-summary-item,.message-card {
    padding: 12px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: start;
    gap: 10px;
    border: 1px solid #e4ebe6;
    border-radius: 13px;
    background: #fbfdfc;
}
.progress-summary-icon,.message-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--green-100); color: var(--green-900); font-size: 10px; }
.progress-summary-item > div,.message-card > div { min-width: 0; display: grid; gap: 4px; }
.progress-summary-item strong,.message-card strong { font-size: 11px; }
.progress-summary-item p,.message-card p { margin: 0; color: var(--ink-700); font-size: 10px; line-height: 1.75; }
.progress-summary-item small { color: var(--ink-500); font-size: 8.5px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.entity-tag { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; border-radius: 11px; border: 1px solid #dce8e0; background: #f8fbf9; color: var(--green-900); font-size: 10.5px; font-weight: 850; }
.entity-tag i { color: var(--gold-600); font-size: 9px; }

/* Subscription usage */
.usage-ring {
    --usage: 0%;
    position: relative;
    z-index: 1;
    width: 116px;
    height: 116px;
    flex: 0 0 116px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--green-700) 0 var(--usage), #e3ece6 var(--usage) 100%);
}
.usage-ring::after { content:""; position:absolute; inset:9px; border-radius:50%; background:#fff; box-shadow:inset 0 0 0 1px #e1e9e4; }
.usage-ring > div { position: relative; z-index: 1; display: grid; place-items: center; line-height: 1.25; }
.usage-ring strong { color: var(--green-950); font-size: 24px; }
.usage-ring small { color: var(--ink-500); font-size: 8.5px; font-weight: 800; }
.usage-progress-card { margin-top: 16px; padding: 14px; border-radius: 13px; background: #f8fbf9; border: 1px solid #e0e9e3; }
.usage-progress-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--ink-700); font-size: 10px; }
.usage-progress-card > div:first-child strong { color: var(--green-950); }
.usage-progress-card .progress-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #e3ece6; }
.usage-progress-card .progress-bar span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,var(--green-700),var(--green-900)); }
.usage-progress-card > small { display: block; margin-top: 7px; color: var(--ink-500); font-size: 8.5px; }
.ledger-delta { display: inline-flex; align-items: center; gap: 5px; }
.ledger-delta i { font-size: 8px; }

/* Payment review */
.proof-card { margin-top: 16px; padding: 12px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px dashed #d6e1da; border-radius: 13px; background: #fbfcfb; }
.proof-card.has-proof { border-style: solid; background: #f7fbf8; }
.proof-card-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--green-100); color: var(--green-900); }
.proof-card > div { min-width: 0; display: grid; gap: 2px; }
.proof-card strong { font-size: 11px; }
.proof-card small { color: var(--ink-500); font-size: 9px; }
.review-state { margin-bottom: 14px; padding: 14px; display: grid; justify-items: center; gap: 5px; border-radius: 13px; text-align: center; }
.review-state > i { font-size: 22px; }
.review-state strong { font-size: 11px; }
.review-state span { color: var(--ink-500); font-size: 9px; }
.review-state.is-success { background: #f1faf4; color: #067647; border: 1px solid #cde9d6; }
.review-state.is-danger { background: #fff7f6; color: var(--danger); border: 1px solid #f0d0cb; }
.switch-card { padding: 11px; border: 1px solid #e2e9e4; border-radius: 12px; background: #fafcfb; }
.switch-card span { display: grid; gap: 2px; }
.switch-card strong { color: var(--ink-800); font-size: 10px; }

/* Form system */
.admin-form-modern { gap: 14px; }
.dashboard-body .form-card {
    padding: 0;
    overflow: hidden;
    border-radius: 17px;
    background: #fff;
}
.dashboard-body .form-card > .panel-head { min-height: 65px; padding: 13px 17px; border-bottom: 1px solid #edf1ee; background: linear-gradient(180deg,#fff,#fbfcfb); }
.dashboard-body .form-card > .field-grid,
.dashboard-body .form-card > .callout + .field-grid { padding: 18px; }
.dashboard-body .form-card > .callout { margin: 16px 16px 0; }
.form-section-icon {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--green-100);
    color: var(--green-900);
    font-size: 10px;
}
.form-section-title { display: flex; align-items: center; gap: 10px; }
.field > span { display: inline-flex; align-items: center; gap: 6px; line-height: 1.45; }
.field-label-icon { width: 16px; color: #738b7d; text-align: center; font-size: 8.5px; }
.dashboard-body .field input,
.dashboard-body .field select,
.dashboard-body .field textarea {
    border-color: #dce5df;
    background: #fcfdfc;
    box-shadow: inset 0 1px 0 rgba(3,75,40,.015);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.dashboard-body .field input:hover,
.dashboard-body .field select:hover,
.dashboard-body .field textarea:hover { border-color: #cfdcd3; background: #fff; }
.dashboard-body .field input:focus,
.dashboard-body .field select:focus,
.dashboard-body .field textarea:focus { background: #fff; border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(3,75,40,.065); }
.dashboard-body .field input[type="file"] { padding: 8px; }
.dashboard-body .field input[type="file"]::file-selector-button { margin-inline-end: 9px; min-height: 31px; padding: 0 10px; border: 1px solid #d5e1d9; border-radius: 9px; background: #f3f8f4; color: var(--green-900); font-family: inherit; font-weight: 800; cursor: pointer; }
.form-actions-modern {
    position: sticky;
    bottom: 10px;
    z-index: 8;
    margin: 0;
    padding: 10px;
    width: max-content;
    max-width: 100%;
    border: 1px solid rgba(213,225,217,.92);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 34px rgba(3,75,40,.10);
    backdrop-filter: blur(12px);
}
.form-actions-modern .btn { min-height: 42px; }
.modern-form-stack { display: grid; gap: 12px; }
.alert-error.is-ui-enhanced { position: relative; padding-inline-start: 50px; }
html[dir="rtl"] .alert-error.is-ui-enhanced { padding-inline-start: 16px; padding-inline-end: 50px; }
.alert-ui-icon { position: absolute; inset-inline-start: 16px; top: 16px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #fee4e2; color: var(--danger); font-size: 9px; }
.danger-zone-ui-icon { width:30px; height:30px; flex:0 0 30px; display:grid; place-items:center; border-radius:9px; background:#fee4e2; color:var(--danger); }

/* General dashboard page polish */
.dashboard-body .panel-head > div > p { margin: 3px 0 0; color: var(--ink-500); font-size: 9.5px; line-height: 1.6; }
.dashboard-body .data-table tbody tr { transition: background .12s ease; }
.dashboard-body .data-table tbody tr:hover { background: #fbfdfc; }
.dashboard-body .actions-cell,.dashboard-body .table-actions { gap: 5px; }
.dashboard-body .btn i { font-size: .9em; }
.dashboard-body .empty-state .empty-icon { width: 43px; height: 43px; margin-inline: auto; border-radius: 13px; background: var(--green-100); }

@media (max-width: 1180px) {
    .detail-kpi-grid-5 { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .detail-workspace-grid-aside { grid-template-columns: minmax(0,1.35fr) minmax(270px,.65fr); }
}
@media (max-width: 920px) {
    .detail-kpi-grid,.detail-kpi-grid-5 { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .detail-workspace-grid-2,.detail-workspace-grid-aside { grid-template-columns: 1fr; }
    .action-panel { position: static; }
    .activity-list-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .entity-page-heading { gap: 12px; }
    .entity-page-heading .heading-actions { width: 100%; }
    .entity-page-heading .heading-actions .btn { flex: 1 1 auto; }
    .entity-hero { min-height: 0; padding: 18px; align-items: stretch; flex-direction: column; }
    .entity-hero-aside { flex-basis: auto; min-height: 78px; grid-template-columns: auto auto 1fr; justify-items: start; align-items: center; text-align: start; }
    .entity-hero-aside strong { font-size: 20px; }
    .usage-ring { width: 102px; height: 102px; flex-basis: 102px; align-self: center; }
    .detail-list-modern.detail-list-columns { grid-template-columns: 1fr; }
    .detail-list-modern > .detail-list-wide { grid-column: auto; }
    .form-actions-modern { width: 100%; bottom: 6px; }
}
@media (max-width: 520px) {
    .entity-identity { align-items: flex-start; }
    .entity-avatar-lg { width: 55px; height: 55px; border-radius: 15px; font-size: 20px; }
    .entity-title-line h2 { font-size: 20px; }
    .entity-meta-chips { gap: 5px; }
    .entity-meta-chips > span { min-height: 29px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .detail-kpi-grid,.detail-kpi-grid-5 { grid-template-columns: 1fr 1fr; gap: 9px; }
    .detail-kpi { min-height: 82px; padding: 11px; gap: 9px; }
    .detail-kpi-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .detail-kpi strong { font-size: 21px; }
    .detail-kpi strong.detail-kpi-text { font-size: 11px; }
    .proof-card { grid-template-columns: auto minmax(0,1fr); }
    .proof-card .btn { grid-column: 1 / -1; width: 100%; }
    .activity-row { grid-template-columns: auto minmax(0,1fr); }
    .activity-row > .status-badge { grid-column: 2; width: max-content; }
    .dashboard-body .form-card > .field-grid,
    .dashboard-body .form-card > .callout + .field-grid { padding: 14px; }
    .dashboard-body .form-card > .panel-head { padding: 12px 14px; }
    .form-actions-modern { display: grid; grid-template-columns: 1fr; }
    .form-actions-modern .btn { width: 100%; }
}
@media (max-width: 380px) {
    .detail-kpi-grid,.detail-kpi-grid-5 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .activity-row,.dashboard-body .field input,.dashboard-body .field select,.dashboard-body .field textarea { transition: none !important; }
}

/* ==========================================================================
   Phase 6.5.0 — Advanced admin operations
   Bulk selection, pagination, confirmation dialogs, and toast feedback.
   ========================================================================== */
.toast-stack {
    position: fixed;
    inset-block-start: 18px;
    inset-inline-end: 18px;
    z-index: 1400;
    width: min(390px, calc(100vw - 28px));
    display: grid;
    gap: 10px;
    pointer-events: none;
}
.naf-toast {
    position: relative;
    overflow: hidden;
    min-height: 66px;
    padding: 11px 11px 11px 12px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #dce6df;
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 46px rgba(2,52,27,.16);
    backdrop-filter: blur(14px);
    pointer-events: auto;
    animation: naf-toast-in .22s ease both;
}
html[dir="rtl"] .naf-toast { padding-inline: 12px 11px; }
.naf-toast.is-leaving { animation: naf-toast-out .2s ease both; }
.toast-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f3f7f4;
    color: var(--green-800);
    font-size: 12px;
}
.toast-success .toast-icon { background:#e9f8ef; color:#087a48; }
.toast-warning .toast-icon { background:#fff6d8; color:#9a6a04; }
.toast-error .toast-icon { background:#fff0ee; color:var(--danger); }
.toast-copy { min-width: 0; display: grid; gap: 2px; }
.toast-copy strong { color: var(--ink-900); font-size: 10.5px; line-height: 1.7; }
.naf-toast > button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #819188;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.naf-toast > button:hover { background:#f3f7f4; color:var(--green-900); }
.toast-progress {
    position: absolute;
    inset-inline-start: 0;
    inset-block-end: 0;
    height: 3px;
    width: 100%;
    background: var(--green-700);
    transform-origin: left center;
    animation: naf-toast-progress 6.2s linear forwards;
}
html[dir="rtl"] .toast-progress { transform-origin: right center; }
.toast-warning .toast-progress { background: var(--gold-600); }
.toast-error .toast-progress { background: var(--danger); }
@keyframes naf-toast-in { from { opacity:0; transform:translateY(-8px) scale(.98); } to { opacity:1; transform:none; } }
@keyframes naf-toast-out { to { opacity:0; transform:translateY(-8px) scale(.98); } }
@keyframes naf-toast-progress { from { transform:scaleX(1); } to { transform:scaleX(0); } }

.naf-confirm-dialog {
    width: min(520px, calc(100vw - 26px));
    max-width: 520px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: var(--ink-950);
    box-shadow: 0 26px 80px rgba(0,33,18,.28);
}
.naf-confirm-dialog::backdrop { background: rgba(3,34,20,.55); backdrop-filter: blur(4px); }
.confirm-dialog-shell {
    padding: 22px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 14px 15px;
    border: 1px solid #dbe5de;
    border-radius: 20px;
    background: #fff;
}
.confirm-dialog-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--green-100);
    color: var(--green-900);
    font-size: 16px;
}
.naf-confirm-dialog.is-danger .confirm-dialog-icon { background:#fff0ee; color:var(--danger); }
.confirm-dialog-copy { min-width: 0; }
.confirm-dialog-copy h2 { margin: 4px 0 7px; font-size: 18px; }
.confirm-dialog-copy p { margin: 0; color:var(--ink-600); font-size:10.5px; line-height:1.8; }
.confirm-note-field {
    grid-column: 1 / -1;
    display: grid;
    gap: 7px;
    color: var(--ink-700);
    font-size: 10px;
    font-weight: 850;
}
.confirm-note-field > span { display:flex; align-items:center; gap:7px; }
.confirm-note-field textarea {
    width: 100%;
    min-height: 86px;
    padding: 10px 12px;
    border: 1px solid #d8e3dc;
    border-radius: 11px;
    resize: vertical;
    outline: none;
    font: inherit;
}
.confirm-note-field textarea:focus { border-color:var(--green-700); box-shadow:0 0 0 4px rgba(3,75,40,.07); }
.confirm-note-field small { color:var(--danger); }
.confirm-dialog-actions {
    grid-column: 1 / -1;
    padding-top: 4px;
    display:flex;
    justify-content:flex-end;
    gap:8px;
}
.naf-confirm-dialog.is-danger [data-confirm-accept] { background:var(--danger); border-color:var(--danger); }

.list-operations-panel {
    margin: -2px -2px 14px;
    border: 1px solid #dbe6de;
    border-radius: 15px;
    background: linear-gradient(180deg,#fcfefc,#f8fbf9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.operations-toolbar-main {
    min-height: 72px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: minmax(220px,1fr) auto minmax(300px,auto);
    align-items: center;
    gap: 12px;
}
.operations-title { min-width:0; display:flex; align-items:center; gap:10px; }
.operations-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display:grid;
    place-items:center;
    border-radius:11px;
    background:linear-gradient(135deg,var(--green-100),#f3f8f5);
    color:var(--green-900);
    font-size:12px;
}
.operations-title > div { min-width:0; display:grid; gap:2px; }
.operations-title strong { font-size:11px; color:var(--green-950); }
.operations-title small { max-width:430px; color:var(--ink-500); font-size:8.8px; line-height:1.6; }
.selection-status {
    min-width: 110px;
    min-height: 38px;
    padding: 5px 10px;
    display:flex;
    align-items:center;
    gap:7px;
    border:1px solid #e0e8e2;
    border-radius:11px;
    background:#fff;
    color:var(--ink-500);
    font-size:9px;
    transition:.15s ease;
}
.selection-count {
    min-width:24px;
    height:24px;
    padding-inline:6px;
    display:grid;
    place-items:center;
    border-radius:8px;
    background:#eef4f0;
    color:var(--green-900);
    font-size:10px;
    font-weight:900;
}
.list-operations-panel.has-selection .selection-status { border-color:#bdd8c8; background:#f4fbf6; color:var(--green-900); }
.list-operations-panel.has-selection .selection-count { background:var(--green-800); color:#fff; }
.bulk-action-form { margin:0; display:grid; grid-template-columns:minmax(170px,1fr) auto; gap:7px; }
.bulk-action-form select {
    min-height:39px;
    min-width: 0;
    padding: 0 34px 0 10px;
    border:1px solid #d8e3dc;
    border-radius:10px;
    background:#fff;
    color:var(--ink-800);
    font:inherit;
    font-size:9.5px;
    font-weight:800;
    outline:none;
}
html[dir="rtl"] .bulk-action-form select { padding:0 10px 0 34px; }
.bulk-action-form select:focus { border-color:var(--green-700); box-shadow:0 0 0 3px rgba(3,75,40,.06); }
.bulk-action-form .btn[disabled] { opacity:.46; cursor:not-allowed; box-shadow:none; }
.operations-toolbar-meta {
    min-height:42px;
    padding:7px 12px;
    border-top:1px solid #e8eeea;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.selection-shortcuts { display:flex; align-items:center; flex-wrap:wrap; gap:4px; }
.text-action {
    min-height:30px;
    padding:0 8px;
    border:0;
    border-radius:8px;
    background:transparent;
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:var(--green-800);
    font:inherit;
    font-size:8.7px;
    font-weight:850;
    cursor:pointer;
}
.text-action:hover { background:#edf5f0; }
.text-action.is-muted { color:var(--ink-500); }
.records-summary { display:flex; align-items:center; gap:5px; color:var(--ink-500); font-size:8.8px; white-space:nowrap; }
.records-summary i { color:#8ba093; }
.records-summary strong { color:var(--green-900); font-size:10px; }

.table-selection-head,.table-selection-cell { width:44px !important; min-width:44px; padding-inline:10px !important; text-align:center !important; }
.table-checkbox { width:24px; height:24px; display:grid; place-items:center; cursor:pointer; }
.table-checkbox input { position:absolute; opacity:0; pointer-events:none; }
.table-checkbox span {
    width:17px;
    height:17px;
    display:grid;
    place-items:center;
    border:1.5px solid #bacbc0;
    border-radius:5px;
    background:#fff;
    transition:.12s ease;
}
.table-checkbox input:checked + span { border-color:var(--green-800); background:var(--green-800); box-shadow:0 0 0 3px rgba(3,75,40,.08); }
.table-checkbox input:checked + span::after { content:""; width:7px; height:4px; border-inline-start:2px solid #fff; border-bottom:2px solid #fff; transform:rotate(-45deg) translateY(-1px); }
html[dir="ltr"] .table-checkbox input:checked + span::after { transform:rotate(-45deg) translateY(-1px); }
.table-checkbox input:indeterminate + span { border-color:var(--green-800); background:#e8f4ec; }
.table-checkbox input:indeterminate + span::after { content:""; width:8px; height:2px; border-radius:2px; background:var(--green-800); }
.operations-table tbody tr.is-selected { background:#f3faf5 !important; box-shadow:inset 3px 0 0 var(--green-700); }
html[dir="rtl"] .operations-table tbody tr.is-selected { box-shadow:inset -3px 0 0 var(--green-700); }
.operations-table tbody tr[hidden] { display:none !important; }

.table-pagination {
    min-height:58px;
    margin-top:14px;
    padding:10px 12px;
    border-top:1px solid #e8eeea;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.pagination-summary { display:flex; align-items:center; gap:7px; color:var(--ink-500); font-size:9px; }
.pagination-summary i { color:#8aa092; }
.pagination-controls { display:flex; align-items:center; gap:12px; }
.page-size-control { display:flex; align-items:center; gap:7px; color:var(--ink-500); font-size:8.8px; font-weight:800; }
.page-size-control select { min-height:32px; padding-inline:8px 26px; border:1px solid #dbe4de; border-radius:8px; background:#fff; color:var(--ink-800); font:inherit; font-size:9px; }
.pager-buttons { display:flex; align-items:center; gap:4px; }
.pager-button,.pager-number {
    min-width:32px;
    height:32px;
    padding:0 8px;
    border:1px solid #dce5df;
    border-radius:8px;
    background:#fff;
    color:var(--ink-600);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    font:inherit;
    font-size:8.8px;
    font-weight:800;
    cursor:pointer;
}
.pager-button:hover,.pager-number:hover { border-color:#c8d9ce; background:#f6faf7; color:var(--green-900); }
.pager-button[disabled] { opacity:.38; cursor:not-allowed; }
.pager-number.is-active { border-color:var(--green-800); background:var(--green-800); color:#fff; }
.pager-pages { display:flex; align-items:center; gap:4px; }
.pager-dots { width:22px; text-align:center; color:#9aaba0; }

@media (max-width: 1180px) {
    .operations-toolbar-main { grid-template-columns:minmax(220px,1fr) auto; }
    .bulk-action-form { grid-column:1 / -1; grid-template-columns:minmax(220px,1fr) auto; }
}
@media (max-width: 820px) {
    .operations-toolbar-main { grid-template-columns:1fr; }
    .selection-status { width:max-content; }
    .bulk-action-form { grid-column:auto; width:100%; }
    .table-pagination { align-items:flex-start; flex-direction:column; }
    .pagination-controls { width:100%; justify-content:space-between; }
}
@media (max-width: 700px) {
    .list-operations-panel { margin:0 0 12px; border-radius:13px; }
    .operations-title small { display:none; }
    .operations-toolbar-meta { align-items:flex-start; flex-direction:column; }
    .selection-shortcuts { width:100%; }
    .text-action { flex:1 1 auto; justify-content:center; border:1px solid #e0e9e3; background:#fff; }
    .records-summary { align-self:flex-end; }
    .dashboard-body .table-wrap.is-responsive-stack td.table-selection-cell {
        min-height:40px;
        padding:8px 11px !important;
        display:flex;
        align-items:center;
        justify-content:flex-end;
        border-bottom:1px solid #edf1ee;
        background:#f7faf8;
    }
    .dashboard-body .table-wrap.is-responsive-stack td.table-selection-cell::before { display:none; }
    .operations-table tbody tr.is-selected { box-shadow:inset 0 3px 0 var(--green-700); }
    .pagination-controls { align-items:flex-start; flex-direction:column; }
    .pager-buttons { width:100%; justify-content:space-between; }
    .pager-button span { display:none; }
    .page-size-control { width:100%; justify-content:space-between; }
}
@media (max-width: 520px) {
    .toast-stack { inset-block-start:10px; inset-inline:10px; width:auto; }
    .confirm-dialog-shell { padding:17px; grid-template-columns:1fr; }
    .confirm-dialog-icon { width:40px; height:40px; }
    .confirm-dialog-actions { grid-column:auto; display:grid; grid-template-columns:1fr; }
    .confirm-dialog-actions .btn { width:100%; }
    .confirm-note-field { grid-column:auto; }
    .bulk-action-form { grid-template-columns:1fr; }
    .bulk-action-form .btn { width:100%; }
    .operations-toolbar-main { padding:10px; }
    .operations-toolbar-meta { padding:8px 10px; }
    .selection-shortcuts { display:grid; grid-template-columns:1fr 1fr; }
    .selection-shortcuts .text-action:last-child { grid-column:1 / -1; }
    .pager-pages .pager-number:not(.is-active) { display:none; }
}
@media (prefers-reduced-motion: reduce) {
    .naf-toast,.toast-progress { animation:none !important; }
    .table-checkbox span,.selection-status { transition:none !important; }
}

/* ================================================================
   Phase 6.6.0 — Advanced server-side data management
   ================================================================ */
.advanced-filter-panel { position:relative; padding:0; overflow:visible; }
.advanced-filter-head { min-height:64px; padding:12px 14px; border-bottom:1px solid #e7eee9; display:flex; align-items:center; justify-content:space-between; gap:14px; background:linear-gradient(180deg,#fcfefc,#f9fbfa); }
.advanced-filter-head > div:first-child { display:flex; align-items:center; gap:10px; min-width:0; }
.filter-head-icon { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:11px; background:#eaf5ee; color:var(--green-900); }
.advanced-filter-head strong { display:block; color:var(--green-950); font-size:11px; }
.advanced-filter-head small { display:block; margin-top:2px; color:var(--ink-500); font-size:8.8px; line-height:1.55; }
.data-grid-filter { padding:14px; margin:0; border:0; box-shadow:none; background:#fff; }
.data-grid-filter.filter-grid { grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); align-items:end; }
.filter-field { min-width:0; display:grid; gap:6px; }
.filter-field > span { color:var(--ink-600); font-size:8.7px; font-weight:850; }
.filter-field input,.filter-field select { width:100%; min-height:39px; }
.filter-search { grid-column:span 2; }
.filter-actions { display:flex; align-items:center; gap:7px; align-self:end; min-height:39px; }
.filter-date-shortcuts,.active-filter-chips { padding:0 14px 12px; display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.filter-date-shortcuts:empty,.active-filter-chips:empty { display:none; }
.date-shortcut,.filter-chip { min-height:30px; padding:5px 9px; border:1px solid #dfe9e2; border-radius:999px; background:#fff; color:var(--green-850); display:inline-flex; align-items:center; gap:6px; font:inherit; font-size:8.6px; font-weight:800; cursor:pointer; }
.date-shortcut:hover,.filter-chip:hover { border-color:#bdd3c4; background:#f3faf5; }
.filter-chip { background:#f2f8f4; border-color:#cfdfd4; }
.filter-chip i { color:#7b9183; }
.filter-chip-title { margin-inline-end:2px; display:inline-flex; align-items:center; gap:6px; color:var(--ink-500); font-size:8.5px; font-weight:850; }

.data-grid-panel { position:relative; overflow:visible; }
.grid-result-meta { margin:-2px -2px 10px; min-height:38px; padding:8px 11px; border:1px solid #e2eae5; border-radius:11px; background:#fafcfb; display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--ink-500); font-size:8.7px; font-weight:800; }
.grid-result-meta > span { display:inline-flex; align-items:center; gap:6px; }
.grid-result-meta i { color:#81998a; }
.server-badge { padding:4px 8px; border-radius:999px; background:#eaf5ee; color:var(--green-900) !important; }
.grid-sort-link { display:inline-flex; align-items:center; gap:6px; color:inherit; text-decoration:none; white-space:nowrap; }
.grid-sort-link i { color:#9aa9a0; font-size:8px; }
.grid-sort-link:hover,.grid-sort-link.is-active { color:var(--green-900); }
.grid-sort-link.is-active i { color:var(--gold-600); }

.server-pagination { min-height:62px; margin-top:14px; padding:11px 12px; border-top:1px solid #e8eeea; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.server-pagination-summary { display:flex; align-items:center; gap:7px; color:var(--ink-500); font-size:9px; }
.server-pagination-summary i { color:#8aa092; }
.server-pagination-controls { display:flex; align-items:center; gap:12px; }
.server-page-size { display:flex; align-items:center; gap:7px; color:var(--ink-500); font-size:8.8px; font-weight:800; }
.server-page-size select { min-height:33px; padding-inline:8px 28px; border:1px solid #dbe4de; border-radius:8px; background:#fff; color:var(--ink-800); font:inherit; font-size:9px; }
.server-pager-buttons { display:flex; align-items:center; gap:4px; }
.server-page-button,.server-page-number { min-width:33px; height:33px; padding:0 8px; border:1px solid #dce5df; border-radius:8px; background:#fff; color:var(--ink-600); display:inline-flex; align-items:center; justify-content:center; gap:5px; text-decoration:none; font-size:8.8px; font-weight:850; }
.server-page-button:hover,.server-page-number:hover { border-color:#c7d9ce; background:#f5faf7; color:var(--green-900); }
.server-page-number.is-active { border-color:var(--green-800); background:var(--green-800); color:#fff; }
.server-page-button.is-disabled { opacity:.38; pointer-events:none; }
.server-page-dots { width:20px; text-align:center; color:#96a69d; }

.grid-preset-shell { position:relative; }
.grid-preset-trigger { white-space:nowrap; }
.grid-preset-menu { position:absolute; z-index:45; inset-block-start:calc(100% + 7px); inset-inline-end:0; width:min(330px,calc(100vw - 32px)); padding:10px; border:1px solid #dce7df; border-radius:13px; background:#fff; box-shadow:0 18px 48px rgba(4,49,28,.15); }
.grid-preset-head { min-height:34px; display:flex; align-items:center; justify-content:space-between; gap:8px; border-bottom:1px solid #edf2ee; padding-bottom:7px; }
.grid-preset-head strong { font-size:10px; color:var(--green-950); }
.grid-preset-list { max-height:230px; overflow:auto; display:grid; gap:5px; padding:8px 0; }
.grid-preset-empty { min-height:68px; display:grid; place-items:center; align-content:center; gap:5px; color:var(--ink-400); font-size:8.7px; text-align:center; }
.grid-preset-item { display:grid; grid-template-columns:1fr 34px; gap:5px; }
.grid-preset-apply,.grid-preset-delete { min-height:34px; border:1px solid #e2ebe5; border-radius:9px; background:#fafcfb; color:var(--ink-700); font:inherit; cursor:pointer; }
.grid-preset-apply { padding:0 9px; display:flex; align-items:center; gap:7px; text-align:start; font-size:8.8px; font-weight:800; }
.grid-preset-delete { display:grid; place-items:center; color:#a26060; }
.grid-preset-apply:hover { border-color:#cbded1; background:#f1f8f4; color:var(--green-900); }
.grid-preset-delete:hover { border-color:#e7caca; background:#fff5f5; color:#a33; }
.grid-preset-create { border-top:1px solid #edf2ee; padding-top:9px; display:grid; grid-template-columns:1fr auto; gap:7px; align-items:end; }
.grid-preset-create label { min-width:0; display:grid; gap:5px; color:var(--ink-500); font-size:8.4px; font-weight:800; }
.grid-preset-create input { width:100%; min-height:36px; border:1px solid #dbe5de; border-radius:9px; padding-inline:9px; font:inherit; font-size:9px; outline:none; }
.grid-preset-create input:focus { border-color:var(--green-700); box-shadow:0 0 0 3px rgba(3,75,40,.06); }

.grid-loading-overlay { position:absolute; z-index:35; inset:0; min-height:130px; border-radius:inherit; background:rgba(250,253,251,.82); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; flex-direction:column; gap:9px; color:var(--green-900); }
.grid-loading-overlay strong { font-size:9.5px; }
.grid-spinner { width:28px; height:28px; border:3px solid #d8e8de; border-top-color:var(--green-800); border-radius:50%; animation:gridSpin .7s linear infinite; }
@keyframes gridSpin { to { transform:rotate(360deg); } }
.is-grid-loading .table-wrap,.is-grid-loading .server-pagination { opacity:.55; }

@media (max-width:920px) {
    .data-grid-filter.filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .filter-search { grid-column:span 2; }
    .server-pagination { align-items:flex-start; flex-direction:column; }
    .server-pagination-controls { width:100%; justify-content:space-between; }
}
@media (max-width:700px) {
    .advanced-filter-head { align-items:flex-start; }
    .advanced-filter-head small { display:none; }
    .data-grid-filter.filter-grid { grid-template-columns:1fr; padding:11px; }
    .filter-search { grid-column:auto; }
    .filter-actions { display:grid; grid-template-columns:1fr 1fr; }
    .filter-actions .btn { width:100%; justify-content:center; }
    .filter-date-shortcuts,.active-filter-chips { padding-inline:11px; }
    .server-pagination-controls { align-items:flex-start; flex-direction:column; }
    .server-page-size { width:100%; justify-content:space-between; }
    .server-pager-buttons { width:100%; justify-content:space-between; }
    .server-page-button span { display:none; }
    .grid-preset-menu { position:fixed; inset-inline:12px; inset-block-start:76px; width:auto; max-height:calc(100vh - 100px); overflow:auto; }
}
@media (max-width:520px) {
    .advanced-filter-head { padding:10px 11px; }
    .filter-head-icon { width:34px; height:34px; flex-basis:34px; }
    .server-page-number:not(.is-active) { display:none; }
    .grid-preset-create { grid-template-columns:1fr; }
    .grid-preset-create .btn { width:100%; }
    .date-shortcut { flex:1 1 calc(50% - 6px); justify-content:center; }
}
@media (prefers-reduced-motion:reduce) { .grid-spinner { animation:none; } }

/* ================================================================
   Phase 8.0.0 — Advanced Learning
   ================================================================ */
.learning-dashboard-strip { margin-bottom:14px; }
.certificate-card { position:relative; overflow:hidden; padding:34px; text-align:center; background:linear-gradient(180deg,#fff,#fbfdfb); border:1px solid #dce7df; }
.certificate-card::before,.certificate-card::after { content:""; position:absolute; width:180px; height:180px; border:1px solid rgba(185,131,14,.16); border-radius:50%; pointer-events:none; }
.certificate-card::before { inset-inline-start:-92px; inset-block-start:-98px; }
.certificate-card::after { inset-inline-end:-92px; inset-block-end:-98px; }
.certificate-card.is-revoked { opacity:.74; background:#fafafa; }
.certificate-seal { width:76px; height:76px; margin:0 auto 18px; display:grid; place-items:center; border-radius:50%; background:var(--gold-100); color:var(--gold-600); font-size:30px; box-shadow:inset 0 0 0 7px rgba(218,158,18,.08); }
.certificate-card h2 { margin:6px 0 8px; color:var(--green-950); font-size:clamp(26px,3vw,38px); }
.certificate-card > p { max-width:720px; margin:0 auto 22px; color:var(--ink-500); }
.certificate-meta { position:relative; z-index:1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; max-width:760px; margin:24px auto 0; text-align:start; }
.certificate-meta > div { padding:14px; border:1px solid #e2eae5; border-radius:12px; background:rgba(255,255,255,.86); }
.certificate-meta small { display:block; margin-bottom:3px; color:var(--ink-500); font-size:10px; font-weight:800; }
.certificate-meta strong { display:block; color:var(--ink-950); overflow-wrap:anywhere; }
.verification-card { max-width:760px; margin:0 auto; padding:38px; text-align:center; }
.verification-icon { width:78px; height:78px; margin:0 auto 18px; display:grid; place-items:center; border-radius:50%; font-size:32px; }
.verification-card.is-valid .verification-icon { background:var(--success-bg); color:#067647; }
.verification-card.is-invalid .verification-icon { background:var(--danger-bg); color:var(--danger); }
.verification-card h1 { margin:8px 0 10px; line-height:1.25; }
.verification-card > p { color:var(--ink-500); }
.verification-card .certificate-meta { margin-top:26px; }

@media (max-width:700px) {
    .certificate-card,.verification-card { padding:24px 18px; }
    .certificate-meta { grid-template-columns:1fr; }
}

/* ==========================================================
   Phase 9.0.0 — Quran Learning Module
   ========================================================== */
.quran-hero .entity-avatar{font-size:1.25rem}
.quran-rating-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0;overflow:hidden;margin-bottom:1rem}
.quran-rating-strip>div{padding:1rem 1.15rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem;border-inline-end:1px solid var(--line)}
.quran-rating-strip>div:last-child{border-inline-end:0}.quran-rating-strip span{display:flex;align-items:center;gap:.45rem;color:var(--ink-500);font-size:.85rem}.quran-rating-strip strong{font-size:1.1rem}
.quran-management-grid{align-items:start}.quran-plan-list{display:grid;gap:1rem}.quran-plan-card{border:1px solid var(--line);border-radius:var(--radius-lg);padding:1rem;background:var(--green-50)}
.quran-plan-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.quran-plan-head h3{margin:.15rem 0 .25rem}.quran-plan-head p{margin:0;color:var(--ink-500)}
.quran-inline-control{margin-top:.8rem}.quran-target-list{display:grid;gap:.6rem;margin-top:1rem}.quran-target-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,220px) auto;gap:1rem;align-items:center;padding:.8rem;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--paper)}
.quran-target-row>div:first-child{display:grid;gap:.2rem}.quran-target-row>div:first-child span,.quran-target-row small{color:var(--ink-500);font-size:.82rem}.quran-progress-cell{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem}
.quran-progress-track{height:7px;border-radius:999px;background:var(--line);overflow:hidden;min-width:70px}.quran-progress-track i{display:block;height:100%;border-radius:inherit;background:currentColor;color:var(--green-800);min-width:0}
.quran-target-form{justify-content:flex-end}.quran-target-form input[type=number]{width:78px}.quran-add-target{margin-top:.9rem;border-top:1px dashed var(--line);padding-top:.8rem}.quran-add-target summary{cursor:pointer;font-weight:700;display:flex;align-items:center;gap:.45rem}.quran-add-target form{margin-top:1rem}
.quran-goal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}.quran-goal-card{display:grid;gap:.65rem}.quran-goal-card p{margin:0;color:var(--ink-500)}
.quran-student-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.quran-student-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;text-decoration:none;color:inherit;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.quran-student-card:hover{transform:translateY(-2px);border-color:var(--green-800);box-shadow:var(--shadow)}.quran-student-card h2{margin:.15rem 0}.quran-student-card p{margin:.25rem 0;color:var(--ink-500)}
.quran-program-toggle-list{display:grid;gap:.65rem}.quran-program-toggle{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding:.7rem;border:1px solid var(--line);border-radius:var(--radius-md)}.quran-program-toggle>div{display:grid;gap:.15rem}.quran-program-toggle small{color:var(--ink-500)}
.quran-session-form{display:grid;gap:1.2rem}.quran-segment-entry-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.9rem}.quran-segment-entry,.quran-errors-entry{border:1px solid var(--line);border-radius:var(--radius-lg);padding:1rem;background:var(--green-50)}.quran-segment-entry legend,.quran-errors-entry legend{font-weight:800;padding:0 .35rem}.quran-errors-entry{margin:0}.quran-error-entry-list{display:grid;gap:.7rem}.quran-error-entry{display:grid;grid-template-columns:1.25fr 1.15fr .6fr .55fr .75fr 1.2fr 1.2fr;gap:.55rem;padding:.7rem;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--paper)}
.quran-record-list{display:grid;gap:1rem}.quran-record-card{border:1px solid var(--line);border-radius:var(--radius-lg);padding:1rem;background:var(--paper)}.quran-record-card>header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-bottom:.75rem;border-bottom:1px solid var(--line)}.quran-record-card>header>div:first-child{display:grid;gap:.15rem}.quran-record-card>header small{color:var(--ink-500)}
.quran-record-ratings{display:flex;flex-wrap:wrap;gap:.55rem;margin:.8rem 0}.quran-record-ratings span{padding:.42rem .65rem;border-radius:999px;background:var(--green-50);font-size:.82rem}.quran-record-segments{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}.quran-segment-chip{display:flex;gap:.7rem;align-items:flex-start;padding:.75rem;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--green-50)}.quran-segment-chip>i{margin-top:.15rem}.quran-segment-chip>div{display:grid;gap:.18rem}.quran-segment-chip span,.quran-segment-chip small{font-size:.8rem;color:var(--ink-500)}
.quran-record-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin-top:.8rem}.quran-record-notes p{margin:0;padding:.75rem;border-radius:var(--radius-md);background:var(--green-50);font-size:.88rem}
.quran-error-list{margin-top:.9rem;padding-top:.8rem;border-top:1px dashed var(--line)}.quran-error-list h4{margin:0 0 .6rem}.quran-error-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.65rem 0;border-bottom:1px solid var(--line)}.quran-error-row:last-child{border-bottom:0}.quran-error-row>div:first-child{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem}.quran-error-row small{width:100%;color:var(--ink-500)}.quran-error-row.is-resolved{opacity:.65}
.form-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.field-span-4{grid-column:1/-1}.form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.field-span-3{grid-column:1/-1}
@media(max-width:1180px){.quran-error-entry{grid-template-columns:repeat(4,minmax(0,1fr))}.quran-error-entry .field:nth-last-child(-n+3){grid-column:span 2}.quran-segment-entry-grid{grid-template-columns:1fr}.quran-goal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.quran-rating-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.quran-rating-strip>div:nth-child(2){border-inline-end:0}.quran-student-card-grid,.quran-goal-grid,.quran-record-segments,.quran-record-notes{grid-template-columns:1fr}.quran-target-row{grid-template-columns:1fr}.quran-target-form{justify-content:flex-start}.form-grid-4,.form-grid-3{grid-template-columns:1fr}.field-span-4,.field-span-3{grid-column:auto}.quran-error-entry{grid-template-columns:repeat(2,minmax(0,1fr))}.quran-error-entry .field:nth-last-child(-n+3){grid-column:auto}}
@media(max-width:520px){.quran-rating-strip{grid-template-columns:1fr}.quran-rating-strip>div{border-inline-end:0;border-bottom:1px solid var(--line)}.quran-rating-strip>div:last-child{border-bottom:0}.quran-student-card{grid-template-columns:auto 1fr}.quran-student-card>.directional-icon{display:none}.quran-error-entry{grid-template-columns:1fr}.quran-record-card>header,.quran-error-row{align-items:flex-start;flex-direction:column}}

/* =========================================================
   Phase 10.0.0 — Real Integrations
   ========================================================= */
.integration-kpi .integration-test-form {
    margin-top: 14px;
}
.integration-endpoints-panel {
    margin-top: 22px;
}
.integration-endpoint-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.integration-endpoint-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--green-50);
}
.integration-endpoint-card strong {
    display: block;
    margin-bottom: 7px;
}
.integration-endpoint-card code {
    display: block;
    overflow-wrap: anywhere;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    direction: ltr;
    text-align: left;
    font-size: 12px;
}
.integration-endpoint-card p {
    margin: 8px 0 0;
    color: var(--ink-700);
    font-size: 13px;
}
@media (max-width: 760px) {
    .integration-endpoint-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Phase 11.0.0 — QA / UAT Release Gate
   ========================================================= */
.qa-kpi-grid{margin-bottom:1rem}.qa-start-grid{align-items:start}.qa-guidance-card p{color:var(--ink-500);line-height:1.8}.qa-gate-mini{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin-top:1rem}.qa-gate-mini span{display:flex;align-items:center;gap:.55rem;padding:.75rem;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--green-50);font-weight:700}.qa-gate-mini i{color:var(--green-800)}
.qa-candidate-hero{margin-bottom:1rem}.qa-gate-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.85rem;margin-bottom:1rem}.qa-gate-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.8rem;align-items:center;padding:1rem;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper)}.qa-gate-card>span{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:var(--green-50)}.qa-gate-card>div{display:grid;gap:.18rem}.qa-gate-card small,.qa-gate-card em{color:var(--ink-500);font-style:normal;font-size:.8rem}.qa-gate-card.is-pass{border-color:#b8dcc4}.qa-gate-card.is-pass>span{background:var(--success-bg);color:#067647}.qa-gate-card.is-fail{border-color:#ecd0d0}.qa-gate-card.is-fail>span{background:var(--danger-bg);color:var(--danger)}
.qa-blocker-panel{margin-bottom:1rem}.qa-blocker-list{display:flex;flex-wrap:wrap;gap:.6rem}.qa-blocker-list span{display:inline-flex;align-items:center;gap:.45rem;padding:.55rem .7rem;border-radius:999px;background:var(--danger-bg);color:var(--danger);font-size:.82rem;font-weight:700}.qa-automation-summary{display:grid;gap:.8rem}.qa-automation-summary dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:0}.qa-automation-summary dl>div{padding:.7rem;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--green-50)}.qa-automation-summary dt{color:var(--ink-500);font-size:.78rem}.qa-automation-summary dd{margin:.2rem 0 0;font-weight:800}.qa-cli-box{margin-top:1rem;padding:1rem;border:1px dashed var(--line);border-radius:var(--radius-md);background:var(--green-50);display:grid;gap:.5rem}.qa-cli-box code{display:block;overflow:auto;padding:.65rem;border-radius:var(--radius-sm);background:var(--ink-950);color:#fff;text-align:left}.qa-cli-box p,.qa-cli-box small{margin:0;color:var(--ink-500)}
.qa-signoff-list{display:grid;gap:.75rem}.qa-signoff-card{padding:.8rem;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--green-50)}.qa-signoff-card>div{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}.qa-signoff-card small{color:var(--ink-500)}.qa-signoff-form{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:.55rem;margin-top:.65rem}.qa-signoff-form select,.qa-signoff-form input{min-height:36px}.qa-decision-actions{display:flex;flex-wrap:wrap;gap:.65rem}.qa-severity{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;border-radius:999px;font-size:.75rem;font-weight:800}.qa-severity-critical{background:#fde8e8;color:#b42318}.qa-severity-high{background:#fff0e0;color:#b54708}.qa-severity-medium{background:#fff7d6;color:#8a6100}.qa-severity-low{background:#eaf5ee;color:#17663a}
.qa-run-progress{margin-bottom:1rem}.qa-run-progress-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.qa-run-progress-head h2{margin:.2rem 0}.qa-progress-track{height:10px;border-radius:999px;overflow:hidden;background:var(--line);margin:1rem 0}.qa-progress-track i{display:block;height:100%;background:var(--green-800);border-radius:inherit}.qa-result-chips{display:flex;flex-wrap:wrap;gap:.55rem}.qa-result-chips span{display:inline-flex;align-items:center;gap:.35rem;padding:.4rem .6rem;border-radius:999px;background:var(--green-50);font-size:.8rem}.qa-result-chips .is-pass{background:var(--success-bg);color:#067647}.qa-result-chips .is-fail,.qa-result-chips .is-blocked{background:var(--danger-bg);color:var(--danger)}
.qa-scenario-list{display:grid;gap:.85rem}.qa-scenario-card{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper);padding:1rem}.qa-scenario-card>header{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding-bottom:.75rem;border-bottom:1px solid var(--line)}.qa-scenario-id{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.qa-scenario-id>span:not(.qa-severity){padding:.25rem .5rem;border-radius:999px;background:var(--green-50);color:var(--ink-500);font-size:.75rem}.qa-scenario-copy{display:grid;grid-template-columns:1fr 1.35fr 1.35fr;gap:1rem;padding:.85rem 0}.qa-scenario-copy small{display:block;color:var(--ink-500);font-size:.75rem;font-weight:800;margin-bottom:.25rem}.qa-scenario-copy h3,.qa-scenario-copy p{margin:0;line-height:1.65}.qa-result-form{display:grid;grid-template-columns:155px minmax(170px,1fr) minmax(190px,1fr) auto;align-items:end;gap:.65rem;padding-top:.8rem;border-top:1px dashed var(--line)}.qa-result-form .field{margin:0}.qa-result-readonly{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;padding-top:.7rem;border-top:1px dashed var(--line)}.qa-result-readonly p{margin:0;flex:1}.qa-result-readonly small{color:var(--ink-500)}.qa-result-passed{border-inline-start:4px solid #42a56c}.qa-result-failed,.qa-result-blocked{border-inline-start:4px solid var(--danger)}.qa-result-not_applicable{opacity:.82}
.qa-issue-summary{display:flex;flex-wrap:wrap;gap:.65rem}.qa-issue-summary .qa-severity{padding:.55rem .7rem}.qa-issue-list{display:grid;gap:.85rem}.qa-issue-card{padding:1rem;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper)}.qa-issue-card>header{display:flex;justify-content:space-between;gap:.8rem;align-items:center}.qa-issue-card>header>div{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem}.qa-issue-card h3{margin:.75rem 0 .35rem}.qa-issue-card>p{margin:0 0 .8rem;color:var(--ink-500)}.qa-issue-update{display:grid;grid-template-columns:150px 140px minmax(170px,1fr) minmax(200px,1.4fr) auto;gap:.6rem;align-items:end;padding-top:.8rem;border-top:1px dashed var(--line)}.qa-issue-update .field{margin:0}
@media(max-width:1180px){.qa-gate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.qa-scenario-copy{grid-template-columns:1fr 1fr}.qa-scenario-copy>div:first-child{grid-column:1/-1}.qa-result-form{grid-template-columns:150px 1fr 1fr}.qa-result-form button{grid-column:1/-1;justify-self:start}.qa-issue-update{grid-template-columns:repeat(2,minmax(0,1fr))}.qa-issue-update button{justify-self:start}.qa-issue-resolution{grid-column:1/-1}}
@media(max-width:760px){.qa-gate-grid,.qa-gate-mini,.qa-automation-summary dl,.qa-scenario-copy{grid-template-columns:1fr}.qa-scenario-copy>div:first-child{grid-column:auto}.qa-result-form,.qa-signoff-form,.qa-issue-update{grid-template-columns:1fr}.qa-result-form button,.qa-issue-resolution{grid-column:auto}.qa-run-progress-head,.qa-scenario-card>header,.qa-issue-card>header{align-items:flex-start;flex-direction:column}.qa-cli-box code{font-size:.72rem}}


/* NAF notification bell: retain the entire localized notification body. */
.notification-dropdown { width: min(460px, calc(100vw - 24px)); }
.notification-preview-list { max-height: min(65vh, 570px); overflow-y: auto; overscroll-behavior: contain; }
.notification-preview-item { align-items: start; border-bottom: 1px solid var(--line); padding: 12px 9px; }
.notification-preview-item > .notification-preview-copy { min-width: 0; display: grid; gap: 5px; }
.notification-preview-item .notification-preview-copy strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.notification-preview-body { margin: 0; color: var(--ink-700); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; white-space: normal; }
.notification-preview-item .notification-preview-copy small { font-size: 10px; }
.notification-preview-item form { align-self: start; }
