@charset "UTF-8";

:root {
    font-family: "Almarai", "Segoe UI", Tahoma, Arial, sans-serif;
    color: #111735;
    background: #f3f7fc;
    font-synthesis: none;
    --navy-950: #0b103d;
    --navy-900: #111754;
    --blue-800: #1d35a4;
    --blue-700: #2747c7;
    --blue-600: #3666e8;
    --cyan-500: #11b9e8;
    --ink: #111735;
    --muted: #68738f;
    --surface: #ffffff;
    --surface-soft: #f7f9fd;
    --border: #dfe7f2;
    --border-strong: #cbd7e8;
    --success: #087a4a;
    --success-bg: #e6f8ef;
    --warning: #9b5b00;
    --warning-bg: #fff5e5;
    --danger: #b32335;
    --danger-bg: #ffecef;
    --info: #225cb8;
    --info-bg: #edf5ff;
    --shadow-sm: 0 8px 24px rgba(19, 33, 79, .06);
    --shadow-md: 0 18px 45px rgba(23, 38, 92, .10);
    --shadow-lg: 0 28px 70px rgba(10, 23, 77, .16);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: #f3f7fc; color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }
code { font-family: "Cascadia Code", Consolas, monospace; font-size: .9em; }
:focus-visible { outline: 3px solid rgba(17, 185, 232, .48); outline-offset: 3px; }

.skip-link {
    position: fixed;
    inset-inline-start: 20px;
    top: -100px;
    z-index: 1000;
    background: #fff;
    color: var(--navy-950);
    padding: 12px 18px;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 0; }

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 28px 22px 24px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(52, 102, 232, .33), transparent 32%),
        linear-gradient(180deg, #111754 0%, #0b103d 100%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 18px 0 50px rgba(5, 15, 59, .08);
    z-index: 60;
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand strong { display: block; font-size: 17px; letter-spacing: -.2px; }
.brand small { display: block; margin-top: 5px; color: rgba(255,255,255,.58); }

.brand-mark {
    width: 45px;
    height: 45px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    align-items: end;
    padding: 9px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.brand-mark span {
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(180deg, #fff, #72d8ff);
}
.brand-mark span:nth-child(1) { height: 42%; }
.brand-mark span:nth-child(2) { height: 72%; }
.brand-mark span:nth-child(3) { height: 100%; }

.environment-badge {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    font-size: 12px;
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;
}
.status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 999px;
    background: #36d58a;
    box-shadow: 0 0 0 5px rgba(54, 213, 138, .12);
}

.side-nav { display: grid; gap: 7px; }
.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 13px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 13px;
    transition: .2s ease;
}
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.side-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(64,102,234,.75), rgba(31,190,232,.28));
    border-color: rgba(255,255,255,.14);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}
.nav-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    font-weight: 800;
}
.sidebar-divider { height: 1px; background: rgba(255,255,255,.1); }
.return-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.68);
    text-decoration: none;
    font-size: 13px;
}
.return-link:hover { color: #fff; }

.user-card {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border-radius: 16px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
}
.user-card strong { display: block; font-size: 13px; }
.user-card small { display: block; margin-top: 4px; color: rgba(255,255,255,.54); }
.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: linear-gradient(145deg, #3473ec, #16bce5);
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(21, 159, 225, .24);
}

.workspace { min-width: 0; }
.topbar {
    height: 78px;
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 34px;
    background: rgba(247,250,254,.88);
    border-bottom: 1px solid rgba(210,220,236,.75);
    backdrop-filter: blur(16px);
}
.topbar strong { display: block; margin-top: 2px; font-size: 14px; }
.eyebrow, .section-kicker, .hero-kicker {
    color: var(--blue-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
}
.topbar-status {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
}
.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--navy-900);
    cursor: pointer;
}

.main-content {
    width: 100%;
    max-width: 1640px;
    margin: 0 auto;
    padding: 34px 36px 24px;
}

.page-hero, .result-hero, .exam-session-header {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 38px 42px;
    margin-bottom: 22px;
    color: #fff;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 12% 0%, rgba(24, 203, 237, .38), transparent 32%),
        radial-gradient(circle at 90% 100%, rgba(67, 85, 244, .38), transparent 38%),
        linear-gradient(135deg, #111754 0%, #2139ae 54%, #0cbce7 130%);
    box-shadow: var(--shadow-lg);
}
.page-hero::after, .exam-session-header::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    inset-inline-end: -80px;
    top: -120px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    box-shadow:
        0 0 0 35px rgba(255,255,255,.035),
        0 0 0 70px rgba(255,255,255,.025);
}
.hero-content { position: relative; z-index: 1; max-width: 980px; }
.page-hero h1, .result-hero h1, .exam-session-header h1 {
    margin: 9px 0 12px;
    color: #fff;
    font-size: clamp(27px, 3.2vw, 43px);
    line-height: 1.3;
    letter-spacing: -.8px;
}
.page-hero p, .result-hero p, .exam-session-header p {
    margin: 0;
    max-width: 900px;
    color: rgba(255,255,255,.82);
    line-height: 1.9;
}
.hero-kicker { color: #9eeeff; }
.hero-actions { display: flex; gap: 10px; margin-top: 23px; flex-wrap: wrap; }
.hero-actions.vertical { position: relative; z-index: 2; flex-direction: column; margin-top: 0; min-width: 180px; }

.hero-seal {
    position: relative;
    z-index: 2;
    width: 148px;
    height: 148px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.09);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
.hero-seal span { display: block; font-size: 42px; font-weight: 900; line-height: 1; }
.hero-seal small { color: rgba(255,255,255,.66); line-height: 1.45; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 7px 2px;
}
.page-header h1 { margin: 7px 0 8px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.5px; }
.page-header p { margin: 0; color: var(--muted); line-height: 1.8; }
.header-actions, .button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.flash, .status-banner {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border: 1px solid;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.flash.success, .status-banner.success {
    color: #075e39;
    background: var(--success-bg);
    border-color: #a9e3c5;
}
.flash.error, .status-banner.danger {
    color: #8e1f2c;
    background: var(--danger-bg);
    border-color: #f1b9c1;
}
.status-banner.warning { color: #7b4900; background: var(--warning-bg); border-color: #f1d19b; }
.status-banner.info { color: #1e529a; background: var(--info-bg); border-color: #bfd8fa; }
.status-banner.compact { margin: 18px 0 0; padding: 13px 15px; box-shadow: none; }
.status-banner strong { display: block; }
.status-banner p { margin: 5px 0 0; line-height: 1.7; }
.banner-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,.68);
    font-weight: 900;
}

.metric-grid { display: grid; gap: 14px; margin: 20px 0; }
.metric-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 126px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, #fff 0%, #fbfcff 100%);
    box-shadow: var(--shadow-sm);
}
.metric-card::after {
    content: "";
    position: absolute;
    width: 74px;
    height: 74px;
    inset-inline-end: -30px;
    bottom: -34px;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(51,102,232,.11), rgba(16,188,229,.07));
}
.metric-label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-card strong {
    position: relative;
    z-index: 1;
    display: block;
    margin: 13px 0 5px;
    font-size: clamp(25px, 2.6vw, 36px);
    color: var(--navy-900);
    line-height: 1;
}
.metric-card strong.small-value { font-size: 20px; line-height: 1.3; }
.metric-card small { color: #8992a8; font-size: 11px; }
.compact-metrics .metric-card { min-height: 112px; }

.content-grid { display: grid; gap: 18px; margin: 20px 0; }
.content-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid.two-thirds { grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); }

.panel, .premium-panel, .form-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.premium-panel { box-shadow: var(--shadow-md); }
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}
.panel-heading h2, .form-section h2 { margin: 5px 0 0; font-size: 21px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); }

.badge, .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.badge.premium {
    color: #243bb0;
    background: linear-gradient(145deg, #edf1ff, #e6fbff);
    border: 1px solid #c9d6ff;
}
.badge.neutral, .status-pill.neutral { color: #536078; background: #f0f3f8; border: 1px solid #dde4ef; }
.status-pill.good { color: var(--success); background: var(--success-bg); border: 1px solid #b7e8cf; }
.status-pill.danger { color: var(--danger); background: var(--danger-bg); border: 1px solid #f2bdc4; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
    box-shadow: 0 11px 25px rgba(42, 72, 197, .22);
}
.button.light { color: var(--navy-900); background: #fff; border-color: rgba(255,255,255,.8); }
.button.glass { color: #fff; background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.2); }
.button.subtle { color: #2d426e; background: #f4f7fc; border-color: var(--border); box-shadow: none; }
.button.small { min-height: 37px; padding: 8px 13px; font-size: 12px; }
.button.large { min-height: 50px; padding: 13px 20px; }
.text-link { color: var(--blue-700); text-decoration: none; font-weight: 800; font-size: 13px; }
.text-link:hover { text-decoration: underline; }

.progress-list { display: grid; gap: 15px; }
.progress-item { display: grid; grid-template-columns: 45px 1fr; gap: 13px; align-items: start; }
.progress-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, var(--blue-800), var(--cyan-500));
    box-shadow: 0 10px 24px rgba(43, 78, 207, .2);
    font-size: 12px;
    font-weight: 900;
}
.progress-item strong { display: block; margin: 2px 0 5px; }
.progress-item p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 13px; }

.status-list { display: grid; margin: 0; }
.status-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid #edf1f6;
}
.status-list > div:last-child { border-bottom: 0; }
.status-list dt { font-weight: 700; color: #47526d; }
.status-list dd { margin: 0; font-weight: 800; text-align: left; }

.course-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mini-course {
    min-height: 135px;
    padding: 17px;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(160deg, #fbfdff, #f4f7fc);
    transition: .2s ease;
}
.mini-course:hover { transform: translateY(-2px); border-color: #bdcae4; box-shadow: var(--shadow-sm); }
.mini-course strong { display: block; margin: 12px 0 8px; line-height: 1.55; font-size: 13px; }
.mini-course small { color: var(--muted); }
.mini-code, .course-code {
    display: inline-flex;
    padding: 6px 9px;
    color: var(--blue-700);
    background: #edf2ff;
    border: 1px solid #d5dfff;
    border-radius: 999px;
    font-family: Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
}

/* Academy */
.filter-panel { padding: 18px 20px; }
.filter-form { display: flex; align-items: end; gap: 11px; }
.field { display: grid; gap: 7px; min-width: 190px; }
.field.grow { flex: 1; }
.field.full { grid-column: 1 / -1; }
.field > span { color: #536078; font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    transition: .18s ease;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: #7595ef;
    box-shadow: 0 0 0 4px rgba(54,102,232,.1);
    outline: 0;
}

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.course-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 23px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.course-card:hover { transform: translateY(-3px); border-color: #bdcae2; box-shadow: var(--shadow-md); }
.course-card-top, .course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 17px;
    background: #f8faff;
}
.course-card-body { padding: 20px 19px 16px; flex: 1; }
.course-section { color: var(--blue-600); font-size: 11px; font-weight: 800; }
.course-card h2 { margin: 8px 0 10px; font-size: 18px; line-height: 1.55; }
.course-card p { margin: 0; color: var(--muted); line-height: 1.8; font-size: 13px; }
.course-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    border-top: 1px solid #edf1f6;
    border-bottom: 1px solid #edf1f6;
}
.course-card-meta span { padding: 12px 8px; text-align: center; color: var(--muted); font-size: 11px; }
.course-card-meta span + span { border-inline-start: 1px solid #edf1f6; }
.course-card-meta strong { color: var(--navy-900); font-size: 15px; }
.exam-indicator { color: #7b8498; font-size: 11px; font-weight: 700; }
.exam-indicator.ready { color: var(--success); }

.exam-command-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(240px, .36fr);
    gap: 22px;
    align-items: center;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #cfdaf1;
    border-radius: 25px;
    background: linear-gradient(145deg, #fff, #f4f7ff);
    box-shadow: var(--shadow-md);
}
.exam-command-card.available { border-color: #8ed8bd; background: linear-gradient(145deg, #fff, #effbf5); }
.exam-command-main { display: grid; grid-template-columns: 62px 1fr; gap: 17px; align-items: start; }
.exam-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 19px;
    background: linear-gradient(145deg, var(--blue-800), var(--cyan-500));
    box-shadow: 0 13px 28px rgba(43,82,210,.22);
    font-size: 25px;
    font-weight: 900;
}
.exam-command-card h2 { margin: 5px 0 8px; font-size: 22px; }
.exam-command-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.exam-facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.exam-facts span {
    padding: 7px 10px;
    color: #52617c;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 11px;
}
.exam-command-actions { display: grid; justify-items: start; gap: 12px; }
.exam-time-note { font-size: 12px; }
.admin-links { display: flex; gap: 11px; flex-wrap: wrap; }
.admin-links a { color: var(--blue-700); font-size: 11px; font-weight: 800; }

.course-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.lesson-navigation {
    position: sticky;
    top: 98px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.lesson-navigation nav { display: grid; gap: 8px; }
.lesson-navigation nav a {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 12px;
}
.lesson-navigation nav a:hover { background: #f5f8fd; border-color: var(--border); }
.lesson-navigation nav span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--blue-700);
    background: #edf2ff;
    font-size: 11px;
    font-weight: 900;
}
.lesson-navigation nav strong { font-size: 12px; line-height: 1.5; }
.course-side-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 7px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.course-side-stats div { text-align: center; }
.course-side-stats strong { display: block; }
.course-side-stats span { color: var(--muted); font-size: 10px; }

.lesson-content-column { min-width: 0; }
.lesson-panel {
    scroll-margin-top: 100px;
    padding: 28px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.lesson-header {
    display: grid;
    grid-template-columns: 55px 1fr auto;
    gap: 15px;
    align-items: start;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.lesson-number {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(145deg, var(--navy-900), var(--blue-700));
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 11px 24px rgba(26,54,164,.19);
}
.lesson-header h2 { margin: 5px 0 7px; font-size: 23px; }
.lesson-header p { margin: 0; color: var(--muted); line-height: 1.7; }
.duration-badge { padding: 7px 10px; color: #536078; background: #f3f6fb; border-radius: 10px; font-size: 11px; }

.course-content { color: #222a46; line-height: 2; }
.course-content h1, .course-content h2, .course-content h3 { color: var(--navy-900); line-height: 1.5; }
.course-content h1 { font-size: 28px; margin: 30px 0 16px; }
.course-content h2 { font-size: 22px; margin: 28px 0 13px; }
.course-content h3 { font-size: 18px; margin: 24px 0 11px; }
.course-content p { margin: 0 0 15px; }
.course-content li { margin: 5px 0; }
.course-content blockquote {
    margin: 18px 0;
    padding: 16px 18px;
    color: #334162;
    background: #f5f8ff;
    border-inline-start: 4px solid var(--blue-600);
    border-radius: 12px;
}
.course-content table { width: 100%; margin: 20px 0; border-collapse: collapse; }
.course-content th, .course-content td { padding: 12px; border: 1px solid var(--border); text-align: right; }
.course-content th { background: #f2f6fc; }

/* Forms and standards */
.preset-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
    margin-bottom: 20px;
    color: #fff;
    border-radius: 23px;
    background: linear-gradient(135deg, #151c68, #2549cb 62%, #13b9e1);
    box-shadow: var(--shadow-md);
}
.preset-card h2 { margin: 6px 0 7px; }
.preset-card p { margin: 0; max-width: 800px; color: rgba(255,255,255,.78); line-height: 1.7; }

.professional-form { display: grid; gap: 26px; }
.form-section { padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; }
.form-section-heading { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; margin-bottom: 17px; }
.form-section-heading > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--blue-700);
    background: #edf2ff;
    border-radius: 13px;
    font-weight: 900;
}
.form-section-heading h2 { margin: 2px 0 4px; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.toggle-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.toggle-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafcff;
    cursor: pointer;
}
.toggle-card input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: #cbd4e2; transition: .2s ease; }
.toggle-switch::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 3px;
    inset-inline-start: 3px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    transition: .2s ease;
}
.toggle-card input:checked + .toggle-switch { background: linear-gradient(135deg, var(--blue-700), var(--cyan-500)); }
.toggle-card input:checked + .toggle-switch::after { transform: translateX(-18px); }
.toggle-card strong { font-size: 12px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.standard-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 23px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.standard-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    inset-inline-end: -60px;
    bottom: -70px;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(52,102,232,.09), rgba(17,185,232,.05));
}
.standard-number { color: var(--blue-600); font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.standard-card h2 { margin: 18px 0 10px; font-size: 20px; }
.standard-card p { margin: 0; color: var(--muted); line-height: 1.8; }
.quality-gates { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.quality-gates div { display: flex; align-items: center; gap: 9px; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: #f9fbfe; font-size: 12px; font-weight: 800; }
.quality-gates span { color: var(--success); }

/* Exam */
.distribution-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.distribution-grid div { padding: 14px; text-align: center; border: 1px solid var(--border); border-radius: 14px; background: #f8faff; }
.distribution-grid span { display: block; color: var(--muted); font-size: 11px; }
.distribution-grid strong { display: block; margin-top: 6px; color: var(--blue-700); }

.sample-question-list { display: grid; gap: 13px; }
.sample-question { display: grid; grid-template-columns: 40px 1fr; gap: 13px; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: #fbfcff; }
.question-index, .question-number {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: var(--navy-900);
    font-weight: 900;
}
.sample-question h3 { margin: 4px 0 12px; font-size: 15px; line-height: 1.6; }
.sample-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.sample-options span { padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 11px; }
.sample-options span.correct { color: var(--success); border-color: #aee1c7; background: var(--success-bg); }
.sample-options b { margin-inline-end: 5px; }

.exam-session-header { padding: 27px 32px; border-radius: 25px; }
.exam-session-header h1 { font-size: clamp(24px,3vw,36px); }
.exam-timer-card {
    position: relative;
    z-index: 2;
    min-width: 160px;
    padding: 16px 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 18px;
    background: rgba(255,255,255,.11);
}
.exam-timer-card span { display: block; color: rgba(255,255,255,.7); font-size: 11px; }
.exam-timer-card strong { display: block; margin-top: 6px; font-family: Consolas,monospace; font-size: 30px; }

.exam-progress-bar { height: 9px; overflow: hidden; margin: 22px 0 9px; border-radius: 999px; background: #e2e8f2; }
.exam-progress-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--blue-700),var(--cyan-500)); transition: width .2s ease; }
.exam-progress-text { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; color: var(--muted); font-size: 12px; }

.question-list { display: grid; gap: 16px; }
.question-card { padding: 24px; border: 1px solid var(--border); border-radius: 21px; background: #fff; box-shadow: var(--shadow-sm); }
.question-heading { display: grid; grid-template-columns: 45px 1fr; gap: 14px; align-items: start; margin-bottom: 17px; }
.question-heading h2 { margin: 3px 0 0; font-size: 17px; line-height: 1.7; }
.question-number { width: 45px; height: 45px; background: linear-gradient(145deg,var(--navy-900),var(--blue-700)); }
.answer-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.answer-option {
    display: grid;
    grid-template-columns: auto 32px 1fr;
    gap: 9px;
    align-items: center;
    min-height: 55px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafcff;
    cursor: pointer;
    transition: .18s ease;
}
.answer-option:hover { border-color: #afc0e2; background: #f4f7ff; }
.answer-option:has(input:checked) { border-color: #7899ef; background: #edf2ff; box-shadow: 0 0 0 3px rgba(54,102,232,.08); }
.answer-option input { accent-color: var(--blue-700); }
.answer-key { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #e8edf7; color: #334267; font-weight: 900; font-size: 11px; }
.answer-option:has(input:checked) .answer-key { color: #fff; background: var(--blue-700); }

.exam-submit-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 24px;
    border: 1px solid #c9d6ed;
    border-radius: 22px;
    background: linear-gradient(145deg,#fff,#f2f6fd);
}
.exam-submit-panel h2 { margin: 5px 0 6px; }
.exam-submit-panel p { margin: 0; color: var(--muted); }

.result-hero { justify-content: flex-start; }
.result-hero.passed { background: linear-gradient(135deg,#07553c,#099764 60%,#1ac69a); }
.result-hero.not-passed { background: linear-gradient(135deg,#54192d,#a52841 65%,#db5d61); }
.result-emblem {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 23px;
    background: rgba(255,255,255,.12);
    font-size: 32px;
    font-weight: 900;
}

/* Tables and empty states */
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 11px 12px;
    color: #64708b;
    background: #f7f9fc;
    border-bottom: 1px solid var(--border);
    text-align: right;
    font-size: 11px;
    white-space: nowrap;
}
.data-table td { padding: 12px; border-bottom: 1px solid #edf1f6; vertical-align: top; font-size: 12px; }
.data-table td strong { display: block; }
.data-table td small { display: block; margin-top: 4px; color: var(--muted); }
.table-empty { padding: 30px; text-align: center; color: var(--muted); }

.empty-state {
    display: grid;
    place-items: center;
    min-height: 300px;
    padding: 40px;
    text-align: center;
    border: 1px dashed #cbd7e8;
    border-radius: 24px;
    background: rgba(255,255,255,.65);
}
.empty-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px; color: var(--blue-700); background: #edf2ff; font-size: 30px; }
.empty-state h2 { margin: 16px 0 7px; }
.empty-state p { margin: 0 0 17px; color: var(--muted); }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.check-list li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; background: #f8faff; }
.check-list span { color: var(--success); font-weight: 900; }

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 34px;
    padding: 18px 4px 4px;
    color: #8a94a8;
    border-top: 1px solid var(--border);
    font-size: 10px;
}
.sidebar-backdrop { display: none; }

/* Responsive */
@media (max-width: 1250px) {
    .metric-grid.six { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .metric-grid.five { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .course-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .quality-gates { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1020px) {
    .app-shell { display: block; }
    .sidebar {
        position: fixed;
        inset-inline-end: 0;
        width: 280px;
        transform: translateX(110%);
        transition: transform .22s ease;
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 50;
        background: rgba(8,13,47,.48);
        backdrop-filter: blur(2px);
    }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .menu-toggle { display: grid; place-items: center; }
    .topbar { padding: 0 20px; }
    .main-content { padding: 24px 20px; }
    .course-layout { grid-template-columns: 1fr; }
    .lesson-navigation { position: static; }
    .lesson-navigation nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .content-grid.two-thirds { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .page-hero, .result-hero, .exam-session-header { padding: 27px 23px; border-radius: 24px; align-items: flex-start; flex-direction: column; }
    .hero-seal { display: none; }
    .hero-actions.vertical { flex-direction: row; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .metric-grid.six, .metric-grid.five, .metric-grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .content-grid.two, .content-grid.three { grid-template-columns: 1fr; }
    .course-grid { grid-template-columns: 1fr; }
    .course-strip { grid-template-columns: 1fr; }
    .filter-form { align-items: stretch; flex-direction: column; }
    .field { min-width: 0; }
    .exam-command-card { grid-template-columns: 1fr; }
    .exam-command-main { grid-template-columns: 48px 1fr; }
    .exam-icon { width: 48px; height: 48px; border-radius: 14px; }
    .lesson-header { grid-template-columns: 45px 1fr; }
    .lesson-number { width: 45px; height: 45px; border-radius: 13px; }
    .duration-badge { grid-column: 2; justify-self: start; }
    .lesson-navigation nav { grid-template-columns: 1fr; }
    .form-grid.two, .form-grid.three, .toggle-grid { grid-template-columns: 1fr; }
    .preset-card { align-items: flex-start; flex-direction: column; }
    .distribution-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sample-options, .answer-options { grid-template-columns: 1fr; }
    .exam-submit-panel { align-items: flex-start; flex-direction: column; }
    .app-footer { flex-direction: column; }
}

/* NWS3 Clean Base 4.0.0 executive search, attachment and requirement governance */
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.sidebar-collapse { position:absolute; inset-inline-start:10px; top:10px; display:grid; place-items:center; width:32px; height:32px; color:#fff; border:1px solid rgba(255,255,255,.13); border-radius:10px; background:rgba(255,255,255,.08); cursor:pointer; }
.nav-badge { min-width:24px; padding:3px 7px; margin-inline-start:auto; border-radius:999px; color:#fff; background:#d64562; text-align:center; font-size:11px; font-weight:800; }
.topbar-search { width:min(430px,34vw); min-width:230px; height:44px; display:flex; align-items:center; gap:9px; padding:0 13px; border:1px solid var(--border); border-radius:13px; background:#fff; box-shadow:0 5px 18px rgba(13,30,85,.04); }
.topbar-search input { min-width:0; flex:1; border:0; outline:0; color:var(--ink); background:transparent; }
.topbar-search kbd { direction:ltr; padding:3px 6px; color:var(--muted); border:1px solid var(--border); border-radius:6px; background:#f6f8fc; font-size:10px; }
.compact-hero { padding-block:28px; }
.global-search-page { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; }
.global-search-page input { min-height:52px; padding:12px 16px; border:1px solid var(--border-strong); border-radius:13px; }
.search-results { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.search-result-card { display:grid; gap:8px; min-height:160px; padding:20px; color:var(--ink); text-decoration:none; border:1px solid var(--border); border-radius:18px; background:#fff; box-shadow:var(--shadow-sm); transition:.2s ease; }
.search-result-card:hover { transform:translateY(-2px); border-color:#92aaf2; box-shadow:var(--shadow-md); }
.search-result-card p { margin:0; color:var(--muted); line-height:1.7; }
.search-result-card small { margin-top:auto; color:var(--blue-600); font-weight:800; }
.search-result-type { width:max-content; padding:4px 8px; color:#2344b7; border-radius:999px; background:#eef3ff; font-size:10px; font-weight:800; }
.filter-grid { display:grid; grid-template-columns:2fr repeat(3,minmax(150px,1fr)) auto auto; align-items:end; gap:10px; }
.filter-grid label { display:grid; gap:6px; color:#526078; font-size:12px; font-weight:800; }
.filter-grid input,.filter-grid select { width:100%; min-height:43px; padding:8px 10px; border:1px solid var(--border-strong); border-radius:11px; background:#fff; }
.attachment-grid,.requirement-review-list { display:grid; gap:16px; }
.attachment-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.attachment-card.is-archived { opacity:.72; border-style:dashed; }
.attachment-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.attachment-head h2 { margin:9px 0 0; font-size:18px; overflow-wrap:anywhere; }
.compact-details { grid-template-columns:repeat(4,minmax(0,1fr)); margin-block:16px; }
.compact-details small { display:block; margin-top:4px; color:var(--muted); overflow-wrap:anywhere; }
.attachment-actions { display:flex; gap:8px; flex-wrap:wrap; }
.attachment-governance-form { display:grid; grid-template-columns:160px minmax(0,1fr) auto; gap:8px; margin-top:16px; padding-top:16px; border-top:1px solid var(--border); }
.attachment-governance-form input,.attachment-governance-form select { min-height:40px; padding:8px 10px; border:1px solid var(--border-strong); border-radius:10px; }
.requirement-filters { grid-template-columns:2fr 1fr auto auto auto; }
.requirement-review-card.is-focused { border-color:#5f7eea; box-shadow:0 0 0 4px rgba(68,98,228,.12),var(--shadow-md); }
.requirement-files { margin-block:18px; padding:16px; border:1px solid var(--border); border-radius:15px; background:#f8faff; }
.requirement-files h3 { margin:0 0 12px; }
.requirement-file-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.requirement-file-row:last-child { border-bottom:0; }
.requirement-file-row small { display:block; margin-top:4px; color:var(--muted); }
.requirement-governance-form { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:16px; border-radius:15px; background:#f5f8ff; }
.requirement-governance-form label { display:grid; gap:6px; color:#4f5e78; font-size:12px; font-weight:800; }
.requirement-governance-form input,.requirement-governance-form select { min-height:43px; padding:8px 10px; border:1px solid var(--border-strong); border-radius:10px; background:#fff; }
.requirement-governance-form .full,.requirement-governance-form button { grid-column:1/-1; }
.status-archived,.status-rejected,.status-cancelled { color:#a82743; background:#fff0f3; }
.status-approved,.status-completed { color:#08734b; background:#e9fff5; }
.status-extended,.status-returned { color:#8a5600; background:#fff6df; }
body.sidebar-compact .app-shell { grid-template-columns:92px minmax(0,1fr); }
body.sidebar-compact .sidebar { padding-inline:12px; gap:15px; }
body.sidebar-compact .brand-logo-white,body.sidebar-compact .brand-product-name,body.sidebar-compact .brand small,body.sidebar-compact .nav-label,body.sidebar-compact .nav-badge,body.sidebar-compact .user-card>div:not(.user-avatar),body.sidebar-compact .logout-form { display:none; }
body.sidebar-compact .brand { min-height:58px; }
body.sidebar-compact .brand::after { content:'N'; display:grid; place-items:center; width:48px; height:48px; margin:auto; border:1px solid rgba(255,255,255,.18); border-radius:15px; background:linear-gradient(145deg,#3473ec,#16bce5); font-weight:900; }
body.sidebar-compact .environment-badge { justify-content:center; padding:10px 0; font-size:0; }
body.sidebar-compact .side-nav a { justify-content:center; padding-inline:8px; }
body.sidebar-compact .nav-icon { width:34px; height:34px; }
body.sidebar-compact .user-card { justify-content:center; padding:8px; }

@media (max-width:1200px) {
    .search-results { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .filter-grid button,.filter-grid .button { width:100%; }
    .attachment-grid { grid-template-columns:1fr; }
}
@media (max-width:1020px) {
    .sidebar-collapse { display:none; }
    .topbar-search { width:auto; flex:1; min-width:0; }
    .topbar-search kbd { display:none; }
}
@media (max-width:700px) {
    .topbar-title,.topbar-status { display:none; }
    .topbar-search { height:40px; }
    .search-results,.filter-grid { grid-template-columns:1fr; }
    .global-search-page { grid-template-columns:1fr; }
    .compact-details { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .attachment-governance-form,.requirement-governance-form { grid-template-columns:1fr; }
    .attachment-governance-form>* ,.requirement-governance-form>* { grid-column:1!important; }
    .requirement-file-row { align-items:flex-start; flex-direction:column; }
}

.form-grid .visibility-check input[type="checkbox"],
.professional-form .visibility-check input[type="checkbox"] {
    width:18px;
    height:18px;
    min-height:18px;
    padding:0;
    margin-top:4px;
    flex:0 0 18px;
    box-shadow:none;
}
.opportunity-value-card { border-color:#a6b9f4!important; background:linear-gradient(135deg,#f1f5ff,#eefcff)!important; }
.opportunity-value-card strong { color:#153aac; font-size:16px; }
.stage-action-card .professional-form .form-grid { align-items:start; }
.stage-action-card .visibility-check { min-height:auto; }
.table-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:7px; }
.meeting-status-form { margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
.official-message-panel { border-inline-start:5px solid var(--blue-600); }
.official-message-panel .message-body { min-height:120px; padding:18px; border-radius:14px; background:#f8faff; white-space:normal; line-height:1.9; overflow-wrap:anywhere; }

@media (max-width: 480px) {
    .main-content { padding: 18px 13px; }
    .topbar { height: 68px; padding: 0 13px; }
    .topbar-status { display: none; }
    .metric-grid.six, .metric-grid.five, .metric-grid.four { grid-template-columns: 1fr; }
    .panel, .premium-panel, .form-panel, .lesson-panel, .question-card { padding: 18px; border-radius: 18px; }
    .course-card-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .course-card-meta span:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid #edf1f6; }
}

/* NWS2 Build 02 R1 — Official Nashir Brand Assets */
.brand-official {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 7px;
}

.brand-logo-white {
    display: block;
    width: min(196px, 100%);
    height: 74px;
    object-fit: contain;
    object-position: right center;
}

.brand-product-name {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .15px;
}

.brand-official small {
    margin-top: -2px;
    color: rgba(255,255,255,.55);
    font-size: 10px;
}

.brand-mark {
    display: none !important;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 118px;
    height: 54px;
    padding: 4px 2px;
    text-decoration: none;
    border-radius: 12px;
}

.topbar-brand:hover {
    background: rgba(35, 70, 175, .045);
}

.brand-logo-blue {
    display: block;
    width: 108px;
    height: 48px;
    object-fit: contain;
    object-position: right center;
}

.topbar-title {
    min-width: 0;
}

@media (max-width: 760px) {
    .topbar-brand {
        width: 82px;
        height: 46px;
    }

    .brand-logo-blue {
        width: 78px;
        height: 40px;
    }

    .topbar-title .eyebrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .topbar-brand {
        width: 66px;
    }

    .brand-logo-blue {
        width: 64px;
        height: 36px;
    }

    .topbar-title strong {
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}


/* NWS2 Build 03 — Academy Management and Safe Importer */
.table-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}
.table-actions a,
.link-button {
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}
.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.danger-text { color: var(--danger) !important; }
.danger-button {
    margin-top: 15px;
    color: #fff;
    background: linear-gradient(135deg, #a72238, #dc4d5d);
    box-shadow: 0 11px 24px rgba(179, 35, 53, .18);
}
.management-table td:first-child { min-width: 280px; }
.management-table td:first-child .mini-code { margin-bottom: 7px; }
.code-editor {
    direction: rtl;
    min-height: 420px;
    font-family: "Cascadia Code", Consolas, "Segoe UI", monospace;
    font-size: 13px;
    line-height: 1.8;
    tab-size: 4;
}
.field small { color: var(--muted); font-size: 10px; line-height: 1.7; }
.lesson-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
}
.dropzone {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 210px;
    padding: 30px;
    text-align: center;
    border: 2px dashed #aebfe2;
    border-radius: 22px;
    background: linear-gradient(145deg, #fbfdff, #f1f5fd);
    cursor: pointer;
    transition: .2s ease;
}
.dropzone:hover {
    border-color: var(--blue-600);
    background: #f3f7ff;
}
.dropzone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.dropzone-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 13px;
    color: #fff;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--blue-800), var(--cyan-500));
    box-shadow: 0 13px 28px rgba(43, 82, 210, .2);
    font-size: 24px;
}
.dropzone strong { display: block; font-size: 17px; }
.dropzone small { display: block; margin-top: 7px; color: var(--muted); }
.radio-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
}
.radio-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 11px;
    align-items: start;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fafcff;
    cursor: pointer;
}
.radio-card:has(input:checked) {
    border-color: #7899ef;
    background: #edf2ff;
    box-shadow: 0 0 0 3px rgba(54,102,232,.07);
}
.radio-card input { margin-top: 4px; accent-color: var(--blue-700); }
.radio-card strong { display: block; }
.radio-card small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.6; }
.execution-confirmation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 25px;
    margin-top: 20px;
    color: #fff;
    border-radius: 23px;
    background: linear-gradient(135deg, #111754, #2547c6 65%, #12b7df);
    box-shadow: var(--shadow-md);
}
.execution-confirmation h2 { margin: 5px 0 6px; }
.execution-confirmation p { margin: 0; color: rgba(255,255,255,.76); }
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #4d5b76;
    font-size: 11px;
    font-weight: 800;
}
.pagination a.active {
    color: #fff;
    border-color: var(--blue-700);
    background: var(--blue-700);
}
.importer-checks { margin-top: 5px; }
.importer-hero { background: radial-gradient(circle at 12% 0%, rgba(24,203,237,.38), transparent 32%), linear-gradient(135deg,#0c164d,#213dae 58%,#0db9df 125%); }

@media (max-width: 760px) {
    .radio-card-grid { grid-template-columns: 1fr; }
    .execution-confirmation { align-items: flex-start; flex-direction: column; }
    .management-table { min-width: 900px; }
    .lesson-actions { grid-column: 2; justify-items: start; }
}

/* NWS2 Build 03 R1 — Import report localization and overflow handling */
.hash-row {
    align-items: flex-start !important;
}

.hash-row dt {
    flex: 0 0 72px;
}

.hash-row dd {
    min-width: 0;
    max-width: calc(100% - 88px);
}

.hash-value {
    display: block;
    max-width: 100%;
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
    overflow-wrap: anywhere;
    word-break: break-all;
    color: #253354;
    font-size: 11px;
    line-height: 1.65;
}

.hash-short {
    direction: ltr;
    unicode-bidi: plaintext;
    white-space: nowrap;
}

.rollback-complete {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 118px;
    padding: 18px;
    color: #075e39;
    border: 1px solid #a9e3c5;
    border-radius: 17px;
    background: linear-gradient(145deg, #f4fff9, #e6f8ef);
}

.rollback-complete-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    border-radius: 15px;
    background: linear-gradient(145deg, #087a4a, #20b779);
    box-shadow: 0 10px 22px rgba(8, 122, 74, .18);
    font-size: 22px;
    font-weight: 900;
}

.rollback-complete strong {
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
}

.rollback-complete p {
    margin: 0;
    line-height: 1.7;
}

/* NWS2 Build 04 — Enrollment, access and learning progress governance */
.governance-hero {
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 218, 180, .32), transparent 33%),
        radial-gradient(circle at 92% 100%, rgba(62, 101, 241, .34), transparent 38%),
        linear-gradient(135deg, #0c174c 0%, #183994 55%, #0a9f91 130%);
}

.batch-list { display: grid; gap: 9px; }
.batch-list > a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 11px;
    padding: 12px;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafcff;
}
.batch-list > a:hover { border-color: #b9c8e2; background: #f3f7fd; }
.batch-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--blue-700);
    border-radius: 12px;
    background: #edf2ff;
    font-size: 11px;
    font-weight: 900;
}
.batch-list strong, .batch-list small { display: block; }
.batch-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.mini-progress {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4eaf3;
}
.mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue-700), var(--cyan-500));
}
.progress-cell { display: grid; grid-template-columns: minmax(80px, 1fr) auto; align-items: center; gap: 8px; min-width: 135px; }
.progress-cell strong { color: var(--blue-700); font-size: 11px; }
.course-card-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px; padding: 10px 17px; background: #fbfcff; }
.course-card-progress small { color: var(--muted); font-size: 10px; }

.learner-progress-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    padding: 23px 26px;
    margin: 20px 0;
    border: 1px solid #cbd8ed;
    border-radius: 24px;
    background: linear-gradient(145deg, #fff, #f3f7ff);
    box-shadow: var(--shadow-md);
}
.learner-progress-card.completed { border-color: #9cdec0; background: linear-gradient(145deg, #fff, #edfaf4); }
.progress-ring {
    --progress: 0;
    width: 100px;
    height: 100px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: conic-gradient(var(--blue-600) calc(var(--progress) * 1%), #e3eaf4 0);
    position: relative;
}
.progress-ring::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: inherit;
    background: #fff;
}
.progress-ring span { position: relative; z-index: 1; color: var(--navy-900); font-size: 22px; font-weight: 900; }
.learner-progress-main h2 { margin: 5px 0 7px; }
.learner-progress-main p { margin: 0; color: var(--muted); }
.requirements-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.requirements-row span { padding: 7px 10px; color: #707b91; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 10px; font-weight: 800; }
.requirements-row span.met { color: var(--success); border-color: #afe2c8; background: var(--success-bg); }

.lesson-outline-list { display: grid; gap: 8px; }
.lesson-outline-form { margin: 0; }
.lesson-outline-button {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    text-align: right;
    color: inherit;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}
.lesson-outline-button:hover, .lesson-outline-button.active { border-color: var(--border); background: #f4f7fd; }
.lesson-outline-button > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--blue-700);
    border-radius: 10px;
    background: #edf2ff;
    font-size: 11px;
    font-weight: 900;
}
.lesson-outline-button strong { min-width: 0; line-height: 1.45; font-size: 12px; }
.lesson-outline-button small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.learner-lesson-panel { min-height: 480px; }
.lesson-completion-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}
.lesson-completion-footer h3 { margin: 5px 0 5px; }
.lesson-completion-footer p { margin: 0; color: var(--muted); }
.lesson-start-state { min-height: 480px; }

.inline-revoke-form { display: grid; gap: 6px; min-width: 170px; }
.inline-revoke-form input {
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 10px;
}
.learner-table { min-width: 1180px; }
.policy-grid { margin-top: 15px; max-width: 560px; }

[data-scope-value-wrap][hidden], [data-selected-users][hidden] { display: none !important; }

@media (max-width: 760px) {
    .learner-progress-card { grid-template-columns: 1fr; justify-items: start; }
    .progress-ring { width: 86px; height: 86px; }
    .lesson-completion-footer { align-items: flex-start; flex-direction: column; }
    .lesson-outline-button { grid-template-columns: 32px 1fr; }
    .lesson-outline-button small { grid-column: 2; }
}
.achievement-hero { background: radial-gradient(circle at 12% 0%, rgba(255,214,92,.32), transparent 34%), linear-gradient(135deg,#111754,#283fb0 62%,#0e9f9b); }
.achievement-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.achievement-card { position: relative; overflow: hidden; padding: 23px; border: 1px solid var(--border); border-radius: 23px; background: linear-gradient(155deg,#fff,#f5f8fd); box-shadow: var(--shadow-sm); }
.achievement-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.achievement-emblem { width: 60px; height: 60px; display: grid; place-items: center; margin: 24px 0 18px; color: #fff; border-radius: 19px; background: linear-gradient(145deg,#087a4a,#22bd82); box-shadow: 0 12px 26px rgba(8,122,74,.2); font-size: 26px; font-weight: 900; }
.achievement-card h2 { min-height: 58px; margin: 7px 0 16px; font-size: 18px; line-height: 1.6; }
.achievement-facts { display: grid; margin: 0 0 18px; }
.achievement-facts div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f6; }
.achievement-facts dt { color: var(--muted); font-size: 11px; }
.achievement-facts dd { margin: 0; font-size: 11px; font-weight: 800; }
@media(max-width:1020px){.achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.achievement-grid{grid-template-columns:1fr;}}


/* Nashir Workspace 3 — Clean Base 4.0.0 */
.production-environment {
    color: #d9ffed;
    background: rgba(27, 188, 112, .11);
    border-color: rgba(72, 224, 150, .22);
}

.production-hero {
    background:
        radial-gradient(circle at 12% 0%, rgba(14, 224, 210, .25), transparent 32%),
        radial-gradient(circle at 90% 100%, rgba(82, 102, 255, .32), transparent 38%),
        linear-gradient(135deg, #0b164c 0%, #1838a5 55%, #087fbd 130%);
}

.workspace-app-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.workspace-app-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 116px;
    padding: 18px;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: .2s ease;
}

.workspace-app-card:hover {
    transform: translateY(-2px);
    border-color: #b9c9e5;
    box-shadow: var(--shadow-md);
}

.workspace-app-card.primary-app {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #151c68, #2751d3 65%, #13afd8);
}

.workspace-app-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.workspace-app-card.primary-app p {
    color: rgba(255,255,255,.72);
}

.workspace-app-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--blue-700);
    background: #edf2ff;
    font-size: 22px;
    font-weight: 900;
}

.primary-app .workspace-app-icon {
    color: #fff;
    background: rgba(255,255,255,.14);
}

.dashboard-opportunity-list,
.dashboard-course-list {
    display: grid;
    gap: 9px;
}

.dashboard-opportunity-list > a,
.dashboard-course-list > a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafcff;
}

.dashboard-course-list > a {
    grid-template-columns: auto minmax(0, 1fr);
}

.dashboard-opportunity-list strong,
.dashboard-course-list strong {
    display: block;
    font-size: 12px;
    line-height: 1.55;
}

.dashboard-opportunity-list small,
.dashboard-course-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.dashboard-opportunity-list b {
    color: var(--navy-900);
    font-size: 11px;
}

.production-governance-card {
    margin-top: 20px;
}

/* Opportunities */
.opportunity-hero,
.opportunity-detail-hero {
    background:
        radial-gradient(circle at 8% 0%, rgba(38, 226, 205, .29), transparent 30%),
        radial-gradient(circle at 90% 100%, rgba(84, 101, 255, .34), transparent 36%),
        linear-gradient(135deg, #111752 0%, #243ab2 58%, #0b9fc8 125%);
}

.opportunity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.opportunity-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: .2s ease;
}

.opportunity-card:hover {
    transform: translateY(-3px);
    border-color: #b9c8e2;
    box-shadow: var(--shadow-md);
}

.opportunity-card.overdue {
    border-color: #efbbc2;
    box-shadow: 0 14px 34px rgba(179, 35, 53, .08);
}

.opportunity-card-head,
.opportunity-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: #f8faff;
}

.opportunity-card-head > div {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.opportunity-card-body {
    flex: 1;
    padding: 20px 18px 16px;
}

.opportunity-card-body h2 {
    margin: 7px 0 7px;
    font-size: 18px;
    line-height: 1.55;
}

.opportunity-card-body p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.opportunity-client {
    color: var(--navy-900) !important;
    font-weight: 800;
}

.priority-chip {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.priority-chip.low {
    color: #49617c;
    background: #edf2f8;
}

.priority-chip.medium {
    color: #765310;
    background: #fff4d8;
}

.priority-chip.high {
    color: #9a4318;
    background: #fff0e7;
}

.priority-chip.urgent {
    color: var(--danger);
    background: var(--danger-bg);
}

.opportunity-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #edf1f6;
    border-bottom: 1px solid #edf1f6;
}

.opportunity-facts div {
    padding: 11px 8px;
    text-align: center;
}

.opportunity-facts div + div {
    border-inline-start: 1px solid #edf1f6;
}

.opportunity-facts span,
.opportunity-card-footer small {
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.opportunity-facts strong,
.opportunity-card-footer strong {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.5;
}

.opportunity-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.opportunity-summary-grid > div {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafcff;
}

.opportunity-summary-grid span,
.opportunity-copy-block > span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.opportunity-summary-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.55;
}

.opportunity-copy-block {
    padding: 16px;
    margin-top: 11px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfcff;
}

.opportunity-copy-block p {
    margin: 8px 0 0;
    line-height: 1.85;
}

.inline-note-form {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f8faff;
}

.timeline-list {
    display: grid;
    gap: 0;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
    padding-bottom: 18px;
}

.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 0;
    inset-inline-start: 7px;
    width: 2px;
    background: #dbe4f2;
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    border: 4px solid #dfe8ff;
    border-radius: 999px;
    background: var(--blue-700);
}

.timeline-content {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.timeline-head time {
    color: var(--muted);
    font-size: 9px;
}

.timeline-content small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.timeline-content p {
    margin: 8px 0 0;
    line-height: 1.7;
    font-size: 12px;
}

.timeline-stage {
    color: var(--blue-700);
    font-family: Consolas, monospace;
}

.opportunity-side-card {
    margin-bottom: 17px;
}

.compact-upload {
    display: grid;
    gap: 9px;
}

.compact-upload input[type="file"] {
    max-width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #f8faff;
    font-size: 10px;
}

.attachment-list {
    display: grid;
    gap: 8px;
    margin-top: 13px;
}

.attachment-list a {
    display: block;
    padding: 11px;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fafcff;
}

.attachment-list strong,
.attachment-list small {
    display: block;
}

.attachment-list strong {
    font-size: 11px;
    overflow-wrap: anywhere;
}

.attachment-list small,
.muted-copy {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.stage-action-card form {
    display: grid;
    gap: 12px;
}

.full-width-card {
    grid-column: 1 / -1;
}

@media (max-width: 1260px) {
    .workspace-app-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .opportunity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .workspace-app-grid,
    .opportunity-grid {
        grid-template-columns: 1fr;
    }

    .opportunity-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inline-note-form {
        align-items: stretch;
        flex-direction: column;
    }

    .timeline-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .opportunity-summary-grid,
    .opportunity-facts {
        grid-template-columns: 1fr;
    }

    .opportunity-facts div + div {
        border-inline-start: 0;
        border-top: 1px solid #edf1f6;
    }
}


/* NWS3 Production 3.0 — Build 3.0.1
   Single dynamic topbar title: the product name is not repeated here. */
.topbar-title {
    display: flex;
    align-items: center;
    min-width: 0;
}

.topbar-title strong {
    margin-top: 0;
    color: var(--navy-900);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .topbar-title strong {
        font-size: 14px;
    }
}


/* NWS3 Clean Base 4.0.0
   Mobile Navigation & Responsive Layout Gate */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.08);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 1020px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(320px, calc(100vw - 40px));
        max-width: calc(100vw - 40px);
        height: 100vh;
        height: 100dvh;
        padding-top: 68px;
        transform: translate3d(105%, 0, 0);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        transition:
            transform .24s ease,
            opacity .18s ease,
            visibility 0s linear .24s;
    }

    body.sidebar-open .sidebar {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition-delay: 0s;
    }

    .sidebar-close {
        display: grid;
    }

    .sidebar-backdrop {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .18s ease, visibility 0s linear .18s;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    .workspace,
    .topbar,
    .main-content {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .topbar {
        gap: 8px;
    }

    .menu-toggle {
        flex: 0 0 42px;
    }

    .topbar-brand {
        flex: 0 0 auto;
    }

    .topbar-title {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .topbar-title strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-hero,
    .result-hero,
    .exam-session-header,
    .hero-content,
    .status-banner {
        width: 100%;
        min-width: 0;
    }

    .page-hero h1,
    .result-hero h1,
    .exam-session-header h1 {
        font-size: clamp(24px, 7.2vw, 34px);
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .page-hero p,
    .result-hero p,
    .exam-session-header p,
    .status-banner p {
        font-size: 14px;
        line-height: 1.9;
        overflow-wrap: anywhere;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .button {
        flex: 1 1 145px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: min(320px, 88vw);
        max-width: 88vw;
        padding-inline: 18px;
    }

    .page-hero,
    .result-hero,
    .exam-session-header {
        padding: 24px 18px;
    }

    .hero-actions .button {
        flex-basis: 100%;
        width: 100%;
    }

    .status-banner {
        padding: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-backdrop {
        transition: none !important;
    }
}

/* NWS3 Opportunity Operations Center — Release 3.1 */
.privacy-banner {
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid #c7d7ff;
    border-radius: 14px;
    background: #f3f7ff;
    color: #17305f;
    font-weight: 700;
    line-height: 1.8;
}

.privacy-banner.owner {
    border-color: #cbe8dd;
    background: #f3fbf7;
    color: #245c49;
}

.internal-block {
    border-inline-start: 4px solid #7c3aed;
    background: #faf8ff;
}

.visibility-control,
.visibility-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px 16px;
    border: 1px solid #d9e5f2;
    border-radius: 13px;
    background: #f8fbff;
}

.visibility-control label,
.visibility-check {
    cursor: pointer;
}

.visibility-control label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    width: 100%;
}

.visibility-control input,
.visibility-check input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    flex: 0 0 auto;
}

.visibility-control span,
.visibility-check span {
    display: grid;
    gap: 3px;
}

.visibility-control small,
.visibility-check small {
    color: #64748b;
    line-height: 1.6;
}

.visibility-check.compact {
    padding: 10px 12px;
}

.instruction-center {
    overflow: hidden;
}

.instruction-create-form {
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid #dce7f6;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff, #f6f9ff);
}

.instruction-list,
.instruction-board {
    display: grid;
    gap: 16px;
}

.instruction-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.instruction-card {
    padding: 18px;
    border: 1px solid #dbe5f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 36, 77, .06);
}

.instruction-card.overdue {
    border-color: #efb3ba;
    box-shadow: 0 10px 28px rgba(160, 28, 45, .08);
}

.instruction-card.standalone {
    min-width: 0;
}

.instruction-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.instruction-head > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.instruction-head time {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}

.instruction-text {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.95;
    color: #182640;
    overflow-wrap: anywhere;
}

.instruction-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 18px;
    padding-top: 12px;
    border-top: 1px solid #edf2f7;
    color: #64748b;
    font-size: 13px;
}

.instruction-result {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #edf9f3;
    color: #235d48;
    line-height: 1.8;
}

.instruction-updates {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.instruction-updates > div {
    padding: 11px 13px;
    border-radius: 11px;
    background: #f7f9fc;
    border: 1px solid #e8eef5;
}

.instruction-updates strong,
.instruction-updates small {
    display: block;
}

.instruction-updates small {
    color: #708098;
    margin-top: 2px;
}

.instruction-updates p {
    margin: 7px 0 0;
    line-height: 1.75;
}

.instruction-update-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #cedae8;
}

.visibility-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.visibility-badge.internal {
    background: #f4edff;
    color: #6d28d9;
}

.visibility-badge.shared {
    background: #eaf8f1;
    color: #247052;
}

.compact-metrics {
    margin-bottom: 18px;
}

.compact-metrics .metric-card {
    padding: 14px;
    min-height: 100px;
}

.governance-user-list {
    display: grid;
    gap: 12px;
}

.governance-user-row {
    display: grid;
    grid-template-columns: minmax(210px, 1.4fr) repeat(5, minmax(125px, .85fr)) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e1e9f2;
    border-radius: 14px;
    background: #fff;
}

.governance-user {
    min-width: 0;
}

.governance-user strong,
.governance-user small {
    display: block;
    overflow-wrap: anywhere;
}

.governance-user small {
    color: #64748b;
    margin-top: 3px;
}

.governance-user-row > label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    line-height: 1.5;
}

.governance-user-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.data-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e8eef5;
    text-align: right;
    vertical-align: top;
}

.data-table th {
    color: #52637c;
    background: #f7f9fc;
    font-size: 13px;
}

.data-table td small {
    display: block;
    margin-top: 4px;
    color: #718096;
    max-width: 300px;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .governance-user-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .governance-user-row .governance-user {
        grid-column: 1 / -1;
    }
}

@media (max-width: 880px) {
    .instruction-board {
        grid-template-columns: 1fr;
    }

    .instruction-head,
    .instruction-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .instruction-head time {
        white-space: normal;
    }

    .governance-user-row {
        grid-template-columns: 1fr;
    }

    .governance-user-row .governance-user {
        grid-column: auto;
    }

    .governance-user-row .button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .instruction-card,
    .instruction-create-form {
        padding: 14px;
    }

    .visibility-control,
    .visibility-check {
        padding: 12px;
    }
}


/* NWS3 3.1 privacy boundaries */
.internal-section,.internal-field{position:relative}
.internal-section{border:1px solid rgba(38,0,206,.16);border-radius:18px;padding:20px;background:linear-gradient(180deg,#fbfaff,#f6f8ff)}
.internal-section::before{content:"داخلي";position:absolute;top:12px;left:14px;font-size:11px;font-weight:800;color:#5b4acb;background:#eeeaff;border-radius:999px;padding:4px 9px}

/* NWS3 3.2 unified operations */
.hero-stat {
    position: relative;
    z-index: 2;
    min-width: 150px;
    padding: 18px 22px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    background: rgba(255,255,255,.1);
}
.hero-stat strong { display: block; color: #fff; font-size: 31px; }
.hero-stat span { display: block; margin-top: 5px; color: rgba(255,255,255,.72); font-size: 11px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 5px 0; }
.section-heading p, .muted { color: var(--muted); }

.stack-form { display: grid; gap: 14px; }
.stack-form label, .form-row label, .inline-form label {
    display: grid;
    gap: 7px;
    color: #46536e;
    font-size: 12px;
    font-weight: 800;
}
.stack-form input, .stack-form select, .stack-form textarea,
.form-row input, .form-row select, .form-row textarea,
.inline-form input, .inline-form select, .inline-form textarea,
.form-grid input, .form-grid select, .form-grid textarea {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
}
.stack-form textarea, .form-row textarea, .inline-form textarea { resize: vertical; line-height: 1.7; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus,
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.inline-form input:focus, .inline-form select:focus, .inline-form textarea:focus {
    border-color: #7595ef;
    box-shadow: 0 0 0 4px rgba(54,102,232,.1);
    outline: 0;
}
.form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid .full, .content-grid .full { grid-column: 1 / -1; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; min-width: 120px; }
.check-line { display: flex !important; align-items: center; gap: 8px; font-weight: 700 !important; }
.check-line input { width: 18px !important; min-height: 18px !important; flex: 0 0 auto; accent-color: var(--blue-700); }

.button-small, .button-secondary {
    display: inline-flex;
    min-height: 35px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: #29416f;
    background: #f4f7fc;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 9px;
    color: #30497d;
    background: #edf2fb;
    border: 1px solid #d8e2f1;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}
.status-completed, .status-approved, .status-paid { color: var(--success); background: var(--success-bg); border-color: #b7e8cf; }
.status-blocked, .status-rejected, .status-overdue, .status-locked { color: var(--danger); background: var(--danger-bg); border-color: #f2bdc4; }

.table-wrap > table:not(.data-table), .line-table, .totals-table { width: 100%; border-collapse: collapse; }
.table-wrap > table:not(.data-table) th, .line-table th, .totals-table th {
    padding: 11px 12px;
    color: #64708b;
    background: #f7f9fc;
    border-bottom: 1px solid var(--border);
    text-align: right;
    font-size: 11px;
    white-space: nowrap;
}
.table-wrap > table:not(.data-table) td, .line-table td, .totals-table td {
    padding: 12px;
    border-bottom: 1px solid #edf1f6;
    vertical-align: top;
    font-size: 12px;
}
.compact-list { display: grid; gap: 9px; }
.compact-list > a, .compact-list > div, .compact-list > form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: inherit;
    background: #fafcff;
    text-decoration: none;
}
.compact-list span { color: var(--muted); font-size: 11px; }
.timeline-list { display: grid; gap: 15px; }
.timeline-item { padding: 17px 18px; border-inline-start: 4px solid var(--blue-600); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.detail-grid > div { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fafcff; }
.detail-grid dt { color: var(--muted); font-size: 11px; }
.detail-grid dd { margin: 6px 0 0; font-weight: 800; }
.message-body, .rich-copy { color: #29334e; line-height: 2; overflow-wrap: anywhere; }

.invoice-sheet { padding: 34px; }
.invoice-head, .invoice-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.invoice-head { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.invoice-footer { padding-top: 20px; border-top: 1px solid var(--border); }
.totals-table { max-width: 480px; margin-inline-start: auto; }
.qr-code svg { display: block; max-width: 170px; height: auto; }

.auth-body { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 0%,#e8f7ff,transparent 38%),#f3f7fc; }
.auth-card {
    width: min(460px,100%);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.auth-card-wide { width: min(620px,100%); }
.auth-card h1 { margin: 8px 0; }
.auth-card > img { display: block; margin-bottom: 18px; }

.category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.category-card { display: grid; gap: 15px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: #fafcff; }
.category-card h3 { margin: 0 0 4px; }
.permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.meeting-card h3 { margin: 18px 0 6px; font-size: 14px; }
.logout-form { margin-inline-start: auto; }
.logout-form button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    color: #fff;
    background: rgba(255,255,255,.08);
    cursor: pointer;
}

@media (max-width: 760px) {
    .form-row, .form-grid, .detail-grid, .category-grid, .permission-grid { grid-template-columns: 1fr; }
    .section-heading, .invoice-head, .invoice-footer { flex-direction: column; }
    .hero-stat { min-width: 0; width: 100%; }
    .compact-list > a, .compact-list > div, .compact-list > form { align-items: stretch; flex-direction: column; }
}
