@charset "UTF-8";

@font-face {
    font-family: 'UTM Avo';
    src: url('../fonts/utm_avo/UTMAvo.woff2') format('woff2'), url('../fonts/utm_avo/UTMAvo.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'UTM Avo';
    src: url('../fonts/utm_avo/UTMAvoBold.woff2') format('woff2'), url('../fonts/utm_avo/UTMAvoBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

:root {
    --fmit-red: #960000;
    --fmit-red-dark: #7a0000;
    --fmit-red-soft: #f9f5f5;
    --fmit-red-tint: #fdf8f8;
    --fmit-red-line: #e8d4d4;
    --fmit-text: #2d2d2d;
    --fmit-heading: #1a365d;
    --fmit-muted: #64748b;
    --fmit-border: #e5e7eb;
    --fmit-green: #2e7d32;
    --fmit-blue: #1a365d;
    --fmit-warning: #b8860b;
    --fmit-bg: #f3f4f6;
    --fmit-card-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --fmit-radius: 12px;
    --nexus-header-h: 64px;
    --nexus-bottom-nav-h: 58px;
    --nexus-safe-bottom: env(safe-area-inset-bottom, 0px);
    --nexus-ios-viewport-gap: 0px;
    --nexus-bottom-nav-total: calc(var(--nexus-bottom-nav-h) + var(--nexus-safe-bottom) + var(--nexus-ios-viewport-gap, 0px));
}

body.nexus-app {
    font-family: 'UTM Avo', Arial, sans-serif;
    background: var(--fmit-bg);
    color: var(--fmit-text);
    padding-bottom: 0;
}
body.nexus-app.has-bottom-nav {
    padding-bottom: 0;
}

a { color: var(--fmit-red); }
a:hover, a:focus { color: var(--fmit-red-dark); }

/* ── Top bar ── */
.nexus-topbar {
    background: #fff;
    border-bottom: 1px solid var(--fmit-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nexus-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--nexus-header-h);
    gap: 12px;
}
.nexus-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    flex-shrink: 0;
}
.nexus-brand img:not(.nexus-brand-logo--desktop) {
    height: 40px;
    width: auto;
    max-width: 140px;
}
.nexus-brand-logo--desktop {
    height: 48px;
    width: 48px;
    max-width: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 4px rgba(150, 0, 0, .15);
}
.nexus-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.nexus-brand-text strong {
    color: var(--fmit-red);
    font-size: 15px;
    letter-spacing: .02em;
}
.nexus-brand-text small {
    color: var(--fmit-muted);
    font-size: 11px;
    font-weight: normal;
}
.nexus-nav-main {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nexus-nav-main a {
    display: block;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--fmit-text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.nexus-nav-main a:hover,
.nexus-nav-main a.is-active {
    background: var(--fmit-red-soft);
    color: var(--fmit-red-dark);
}
.nexus-nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.nexus-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fmit-red);
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nexus-user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--fmit-border);
    border-radius: 999px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    max-width: 200px;
}
.nexus-user-toggle span.name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: var(--fmit-text);
}
.nexus-user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--fmit-border);
    border-radius: var(--fmit-radius);
    box-shadow: var(--fmit-card-shadow);
    padding: 6px 0;
    z-index: 1100;
}
.nexus-user-menu.is-open { display: block; }
.nexus-user-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--fmit-text);
    text-decoration: none;
    font-size: 14px;
}
.nexus-user-menu a:hover { background: var(--fmit-red-soft); color: var(--fmit-red); }
.nexus-user-menu hr { margin: 6px 0; border-color: #eee; }
.nexus-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--fmit-border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--fmit-red);
}

/* Welcome strip */
.nexus-welcome {
    background: #fff;
    border-bottom: 1px solid var(--fmit-border);
    padding: 10px 0;
    margin-bottom: 20px;
}
.nexus-welcome-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}
.nexus-welcome-inner strong { color: var(--fmit-heading); }
.nexus-welcome-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nexus-pill {
    background: #fff;
    border: 1px solid var(--fmit-border);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--fmit-muted);
}
.nexus-pill strong { color: var(--fmit-text); }
.nexus-welcome--compact {
    padding: 6px 0;
    margin-bottom: 12px;
}
.nexus-welcome-inner--compact {
    justify-content: center;
    gap: 6px;
}
.nexus-pathway-card--archived {
    opacity: .88;
    border: 1px dashed var(--fmit-border);
}
.nexus-bottom-nav-continue.is-active .ico { color: var(--fmit-red); }

/* ── Cards & layout ── */
.nexus-main { padding-top: 4px; }
.nexus-card {
    background: #fff;
    border-radius: var(--fmit-radius);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--fmit-border);
    box-shadow: var(--fmit-card-shadow);
}
.nexus-card h2, .nexus-card h3, .nexus-card h4 {
    margin-top: 0;
    color: var(--fmit-heading);
    font-weight: bold;
}
.nexus-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}
.nexus-card-head h2, .nexus-card-head h3 { margin: 0; color: var(--fmit-heading); }
.nexus-card-head-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.nexus-exam-format-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.nexus-format-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    border: 1px solid var(--fmit-border);
    background: #f8fafc;
    color: var(--fmit-muted);
}
.nexus-format-pill--pro { border-color: #f0d9a8; background: #fffbf0; color: #8a6d1a; }
.nexus-format-pill--expert { border-color: #c5d9f5; background: #f0f6ff; color: var(--fmit-blue); }
.nexus-format-pill--mastery { border-color: #e8d4d4; background: var(--fmit-red-tint); color: var(--fmit-red-dark); }

.nexus-profile-mastery-teaser {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--fmit-red-tint);
    border: 1px solid var(--fmit-red-line);
}

.nexus-breadcrumb {
    background: none;
    padding: 0 0 12px;
    margin: 0;
    font-size: 13px;
}
.nexus-breadcrumb a { color: var(--fmit-muted); }
.nexus-breadcrumb .active { color: var(--fmit-text); }

/* Progress */
.nexus-progress {
    height: 10px;
    background: #edf1f5;
    border-radius: 999px;
    overflow: hidden;
}
.nexus-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--fmit-green), #43a047);
    border-radius: 999px;
    transition: width .35s ease;
}
.nexus-progress-lg { height: 14px; }
.nexus-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--fmit-muted);
}
.nexus-progress-label strong { color: var(--fmit-text); }

/* Badges */
.nexus-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.nexus-badge-muted { background: #eee; color: #555; }
.nexus-badge-success { background: #e8f5e9; color: var(--fmit-green); }
.nexus-badge-warning { background: #fff8e1; color: #b8860b; }
.nexus-badge-expert { background: var(--fmit-red-soft); color: var(--fmit-red); }

/* Buttons */
.btn-primary {
    background: var(--fmit-red);
    border-color: var(--fmit-red);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--fmit-red-dark);
    border-color: var(--fmit-red-dark);
}
.btn-outline-fmit {
    color: var(--fmit-red);
    border-color: var(--fmit-red);
    background: #fff;
}
.btn-outline-fmit:hover {
    background: var(--fmit-red-soft);
    color: var(--fmit-red-dark);
}

/* Hero continue — nền sáng, đỏ làm accent (dễ đọc, học thuật) */
.nexus-hero {
    background: linear-gradient(165deg, #ffffff 0%, var(--fmit-red-tint) 55%, var(--fmit-red-soft) 100%);
    color: var(--fmit-text);
    border: 1px solid var(--fmit-border);
    border-left: 4px solid var(--fmit-red);
    position: relative;
    overflow: hidden;
    box-shadow: var(--fmit-card-shadow);
}
.nexus-hero::after {
    content: '';
    position: absolute;
    right: -24px;
    top: -24px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(150, 0, 0, .06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.nexus-hero .row { position: relative; z-index: 1; }
.nexus-hero h2 {
    color: var(--fmit-heading);
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 6px;
}
.nexus-hero h3 { color: var(--fmit-heading); }
.nexus-hero p { color: var(--fmit-muted); margin-bottom: 12px; }
.nexus-hero .nexus-progress { background: #e8ecf0; }
.nexus-hero .nexus-progress > span { background: linear-gradient(90deg, var(--fmit-green), #43a047); }
.nexus-hero .nexus-progress-label { color: var(--fmit-muted) !important; }
.nexus-hero .nexus-progress-label strong { color: var(--fmit-text); }
.nexus-hero .btn-primary {
    background: var(--fmit-red);
    border-color: var(--fmit-red);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(150, 0, 0, .2);
}
.nexus-hero .btn-primary:hover {
    background: var(--fmit-red-dark);
    border-color: var(--fmit-red-dark);
    color: #fff;
}
.nexus-hero .nexus-badge {
    background: #fff !important;
    color: var(--fmit-blue) !important;
    border: 1px solid var(--fmit-border);
}

/* Pathway cards */
.nexus-pathway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.nexus-pathway-card {
    border: 1px solid var(--fmit-border);
    border-radius: var(--fmit-radius);
    padding: 16px;
    background: #fff;
    transition: box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nexus-pathway-card:hover {
    border-color: #d0c8c8;
    box-shadow: var(--fmit-card-shadow);
}
.nexus-pathway-card h4 {
    margin: 0;
    font-size: 16px;
    color: var(--fmit-text);
    line-height: 1.35;
}
.nexus-pathway-card-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.nexus-pathway-card-title-link {
    color: inherit;
    text-decoration: none;
}
.nexus-pathway-card-title-link:hover {
    color: var(--fmit-red);
    text-decoration: underline;
}
.nexus-pathway-card-terms-hint {
    margin: -4px 0 0;
    font-size: 12px;
    line-height: 1.4;
}
.nexus-pathway-card-foot .btn {
    width: auto;
    min-width: 0;
}
.nexus-pathway-card > .btn {
    align-self: flex-end;
    width: auto;
}

/* Sidebar widgets */
.nexus-widget { margin-bottom: 16px; }
.nexus-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.nexus-mastery-ring {
    text-align: center;
    padding: 8px 0;
}
.nexus-mastery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
}
.nexus-mastery-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ddd;
    display: inline-block;
}
.nexus-mastery-dots span.is-on { background: var(--fmit-red); }

.nexus-timeline { list-style: none; padding: 0; margin: 0; }
.nexus-timeline li {
    position: relative;
    padding: 0 0 14px 30px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--fmit-muted);
}
.nexus-timeline li:last-child { padding-bottom: 0; }
.nexus-timeline li strong { color: var(--fmit-text); font-weight: 600; }
.nexus-timeline li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ccc;
    z-index: 1;
}
.nexus-timeline li.is-done::before { background: var(--fmit-green); box-shadow: 0 0 0 1px var(--fmit-green); }
.nexus-timeline li.is-current::before { background: var(--fmit-red); box-shadow: 0 0 0 1px var(--fmit-red); }
.nexus-timeline li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.nexus-mini-search .form-control {
    border-radius: 999px 0 0 999px;
    border-right: 0;
}
.nexus-mini-search .btn {
    border-radius: 0 999px 999px 0;
}

/* Empty state */
.nexus-empty {
    text-align: center;
    padding: 32px 16px;
}
.nexus-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--fmit-red-soft);
    color: var(--fmit-red);
    font-size: 32px;
    line-height: 72px;
}
.nexus-empty h4 { color: var(--fmit-text); margin-bottom: 8px; }
.nexus-empty p { color: var(--fmit-muted); max-width: 360px; margin: 0 auto 16px; }
.nexus-steps {
    text-align: left;
    max-width: 320px;
    margin: 0 auto 20px;
    padding: 0;
    list-style: none;
    counter-reset: nexus-step;
}
.nexus-steps li {
    counter-increment: nexus-step;
    padding: 6px 0 6px 32px;
    position: relative;
    font-size: 14px;
    color: var(--fmit-muted);
}
.nexus-steps li::before {
    content: counter(nexus-step);
    position: absolute;
    left: 0;
    top: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--fmit-red);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 22px;
}

/* Pathway sticky header */
.nexus-pathway-sticky {
    position: sticky;
    top: var(--nexus-header-h);
    z-index: 900;
    background: #fff;
    border: 1px solid var(--fmit-border);
    border-radius: var(--fmit-radius);
    padding: 14px 16px;
    margin: -4px 0 16px;
    box-shadow: var(--fmit-card-shadow);
}
.nexus-pathway-sticky-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nexus-pathway-sticky-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.nexus-pathway-sticky h1 {
    margin: 0;
    font-size: 18px;
    color: var(--fmit-heading);
    font-weight: bold;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}
.nexus-pathway-sticky-actions {
    flex-shrink: 0;
}
.nexus-pathway-sticky-actions form {
    margin: 0;
}
.nexus-pathway-sticky-menu {
    display: block;
    position: relative;
}
.nexus-pathway-sticky-menu summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--fmit-border);
    border-radius: 8px;
    background: #fff;
    color: var(--fmit-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.nexus-pathway-sticky-menu-icon {
    font-size: 16px;
    line-height: 1;
}
.nexus-pathway-sticky-menu summary::-webkit-details-marker { display: none; }
.nexus-pathway-sticky-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 148px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    box-shadow: var(--fmit-card-shadow);
    z-index: 910;
}
.nexus-pathway-sticky-menu-panel form { margin: 0; }
.nexus-pathway-sticky-meta {
    width: 100%;
    min-width: 0;
}
.nexus-pathway-sticky.is-compact {
    padding: 8px 12px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.nexus-pathway-sticky.is-compact .nexus-pathway-sticky-head {
    align-items: center;
}
.nexus-pathway-sticky.is-compact .nexus-pathway-sticky-head h1 {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}
.nexus-pathway-sticky.is-compact .nexus-pathway-sticky-meta .nexus-badge {
    display: none;
}
.nexus-pathway-sticky.is-compact .nexus-progress-label {
    font-size: 12px;
    margin-bottom: 4px;
}
.nexus-pathway-sticky.is-compact .nexus-progress-lg {
    height: 6px;
}
#nexus-pathway-terms,
.nexus-term-card {
    scroll-margin-top: calc(var(--nexus-header-h) + var(--nexus-pathway-sticky-h, 80px) + 12px);
}

/* Term cards */
.nexus-term-list { display: flex; flex-direction: column; gap: 10px; }
.nexus-term-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    background: #fff;
    transition: background .2s;
}
.nexus-term-card.is-done {
    background: #f9fbf9;
    opacity: .85;
}
.nexus-term-card.nexus-term-focus-flash,
.nexus-today-item.nexus-term-focus-flash {
    animation: nexus-term-focus-pulse 2.2s ease;
    box-shadow: 0 0 0 2px rgba(150, 0, 0, 0.35);
    border-radius: 10px;
}
@keyframes nexus-term-focus-pulse {
    0%, 100% { background-color: transparent; }
    15%, 45% { background-color: #fdf3f3; }
}
.nexus-term-body { flex: 1; min-width: 180px; }
.nexus-term-en {
    font-style: italic;
    color: var(--fmit-muted);
    font-size: 13px;
    display: block;
}
.nexus-term-vi {
    font-weight: 600;
    color: var(--fmit-text);
    font-size: 15px;
}
.nexus-term-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Collapse panel */
.nexus-panel-toggle {
    width: 100%;
    text-align: left;
    background: var(--fmit-red-soft);
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: bold;
    color: var(--fmit-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nexus-panel-toggle::after {
    content: '▾';
    font-size: 14px;
    transition: transform .2s;
}
.nexus-panel-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.nexus-panel-body {
    border: 1px solid var(--fmit-border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 16px;
    margin-top: -1px;
}

/* Profile tabs */
.nexus-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid var(--fmit-border);
    margin-bottom: 20px;
}
.nexus-tab {
    padding: 10px 16px;
    border: none;
    background: none;
    font-weight: 600;
    font-size: 14px;
    color: var(--fmit-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
}
.nexus-tab:hover { color: var(--fmit-red); background: var(--fmit-red-soft); }
.nexus-tab.is-active {
    color: var(--fmit-red);
    border-bottom-color: var(--fmit-red);
    background: transparent;
}
.nexus-tab-panel { display: none; }
.nexus-tab-panel.is-active { display: block; }

/* Cert cards */
.nexus-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.nexus-cert-card {
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #fff 0%, var(--fmit-red-soft) 100%);
}
.nexus-cert-card h5 {
    margin: 0 0 6px;
    color: var(--fmit-red);
    font-size: 15px;
}
.nexus-cert-card .meta { font-size: 12px; color: var(--fmit-muted); margin-bottom: 10px; }

/* Search page */
.nexus-search-hero {
    text-align: center;
    padding: 8px 0 20px;
}
.nexus-search-hero h2 { margin-bottom: 6px; }
.nexus-search-box { position: relative; max-width: 640px; margin: 0 auto; }
.nexus-search-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.nexus-search-row .form-control {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 8px 14px;
    font-size: 16px;
    border-radius: 999px 0 0 999px;
    border-right: 0;
}
.nexus-search-row .btn {
    flex-shrink: 0;
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    border-radius: 0 999px 999px 0;
}
.nexus-mini-search-box { position: relative; }
.nexus-search-suggest-panel,
#nexus-search-suggest {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    padding: 10px 14px;
    max-height: 320px;
    overflow: auto;
    box-shadow: var(--fmit-card-shadow);
    border-radius: 0 0 10px 10px;
}
.nexus-search-suggest-panel.is-open,
#nexus-search-suggest.is-open { display: block; }
.nexus-search-suggest-panel .suggest-pick,
#nexus-search-suggest .suggest-pick {
    color: #333;
    font-weight: 600;
    cursor: pointer;
}
.nexus-search-suggest-panel .suggest-pick mark,
#nexus-search-suggest .suggest-pick mark {
    background: #fde68a;
    padding: 0 1px;
    border-radius: 2px;
}
#nexus-search-input.has-suggest,
#nexus-mini-search-input.has-suggest {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.nexus-search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.nexus-search-result-link {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}
.nexus-search-in-pathway {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--fmit-red);
    background: var(--fmit-red-soft);
    border: 1px solid var(--fmit-red-line);
    border-radius: 999px;
    padding: 3px 10px;
    max-width: min(220px, 46vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nexus-search-result-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.nexus-search-pocket.is-saved {
    border-color: #4caf50;
    color: #2e7d32;
    background: #e8f5e9;
}

/* Toast */
#nexus-toast-wrap {
    position: fixed;
    top: calc(var(--nexus-header-h) + 8px);
    right: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100vw - 32px));
}
.nexus-toast {
    background: #fff;
    border-left: 4px solid var(--fmit-red);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    padding: 12px 16px;
    font-size: 14px;
    animation: nexus-toast-in .3s ease;
}
.nexus-toast.is-success { border-left-color: var(--fmit-green); }
.nexus-toast.is-danger { border-left-color: #c62828; }
.nexus-toast.is-warning { border-left-color: #f57c00; }
.nexus-toast.is-info { border-left-color: var(--fmit-blue); }
@keyframes nexus-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Confirm modal */
#nexus-confirm-modal .modal-header { border-bottom-color: var(--fmit-border); }
#nexus-confirm-modal .modal-title { color: var(--fmit-red); font-weight: bold; }

/* Exam focus — ẩn bottom nav, thanh scroll rõ hơn */
body.nexus-exam-active .nexus-bottom-nav { display: none !important; }
body.nexus-exam-active.has-bottom-nav { padding-bottom: 12px; }
body.nexus-exam-active .nexus-welcome { display: none; }
html.nexus-exam-scroll,
body.nexus-exam-active {
    scrollbar-width: auto;
    scrollbar-color: #960000 #e8e0e0;
}
html.nexus-exam-scroll::-webkit-scrollbar,
body.nexus-exam-active::-webkit-scrollbar {
    width: 11px;
}
html.nexus-exam-scroll::-webkit-scrollbar-track,
body.nexus-exam-active::-webkit-scrollbar-track {
    background: #ececec;
}
html.nexus-exam-scroll::-webkit-scrollbar-thumb,
body.nexus-exam-active::-webkit-scrollbar-thumb {
    background: #960000;
    border-radius: 6px;
    border: 2px solid #ececec;
}
html.nexus-exam-scroll::-webkit-scrollbar-thumb:hover,
body.nexus-exam-active::-webkit-scrollbar-thumb:hover {
    background: #7a0000;
}

/* Scroll to top — y hệt #back2top trang từ điển FMIT (style.css + script.js) */
#back2top {
    position: fixed;
    z-index: 1989;
    right: 12px;
    bottom: 35px;
    width: 40px;
    padding: 5px 0;
    text-align: center;
    background: #800000;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: none;
}
#back2top:hover {
    background: #910000;
    -webkit-transition: all .3s ease;
    -moz-transition: all .3s ease;
    transition: all .3s ease;
}
@media (max-width: 991px) {
    body.has-bottom-nav #back2top {
        bottom: calc(var(--nexus-bottom-nav-total) + 14px + var(--nexus-float-extra-bottom, 0px));
        z-index: 1051;
    }
    body.nexus-exam-active #back2top {
        bottom: 18px;
    }
}

/* Bottom nav (mobile) */
.nexus-bottom-nav {
    display: none;
    position: fixed;
    bottom: var(--nexus-ios-viewport-gap, 0px);
    left: 0;
    right: 0;
    height: calc(var(--nexus-bottom-nav-h) + var(--nexus-safe-bottom));
    padding-bottom: var(--nexus-safe-bottom);
    background: #fff;
    border-top: 1px solid var(--fmit-border);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
}
.nexus-bottom-nav-inner {
    display: flex;
    height: 100%;
    align-items: stretch;
    justify-content: space-around;
}
.nexus-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none !important;
    color: var(--fmit-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 6px 4px;
}
.nexus-bottom-nav a .ico { font-size: 20px; line-height: 1; }
.nexus-bottom-nav a.is-active { color: var(--fmit-red); }

/* Loading overlay */
#nexus-page-loading {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(255, 255, 255, .88);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
#nexus-page-loading.is-active { display: flex; }
#nexus-page-loading.is-active p:empty { display: none; }
.nexus-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e8e0e0;
    border-top-color: var(--fmit-red);
    border-radius: 50%;
    animation: nexus-spin .75s linear infinite;
}
@keyframes nexus-spin { to { transform: rotate(360deg); } }

/* Hub picker (create pathway) */
.nexus-hub-picker-wrap { margin-bottom: 18px; }
.nexus-hub-selected {
    padding: 12px 14px;
    border: 1px dashed var(--fmit-border);
    border-radius: 10px;
    background: #fafafa;
    margin-bottom: 12px;
    min-height: 46px;
}
.nexus-hub-selected-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
.nexus-hub-selected-empty { color: var(--fmit-muted); font-size: 13px; }
.nexus-hub-suggest {
    margin-bottom: 12px;
    padding: 10px 14px;
    font-size: 13px;
}
.nexus-hub-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.nexus-hub-tab {
    border: 1px solid var(--fmit-border);
    background: #fff;
    color: var(--fmit-text);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.nexus-hub-tab:hover { border-color: var(--fmit-red); color: var(--fmit-red); }
.nexus-hub-tab.is-active {
    background: var(--fmit-red);
    border-color: var(--fmit-red);
    color: #fff;
}
.nexus-hub-panel { display: none; }
.nexus-hub-panel.is-active { display: block; }
.nexus-hub-panel-desc { font-size: 13px; margin: 0 0 10px; }
.nexus-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.nexus-hub-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.nexus-hub-card:hover {
    border-color: var(--fmit-red);
    background: var(--fmit-red-soft);
    box-shadow: 0 2px 8px rgba(150, 0, 0, .08);
}
.nexus-hub-card.is-selected {
    border-color: var(--fmit-red);
    background: var(--fmit-red-soft);
    box-shadow: inset 0 0 0 1px var(--fmit-red);
}
.nexus-hub-card-title { font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--fmit-text); }
.nexus-hub-card-meta { font-size: 12px; color: var(--fmit-muted); }
.nexus-hub-card-en { font-size: 11px; line-height: 1.2; }
.nexus-hub-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
}
.nexus-hub-badge--full { background: #e8f5e9; color: var(--fmit-green); }
.nexus-hub-badge--mini { background: #fff8e1; color: #b8860b; }
.nexus-hub-badge--small { background: #fce4ec; color: #c62828; }
.nexus-hub-badge--explore { background: #eceff1; color: #546e7a; }
.nexus-pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.nexus-pillar-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.nexus-pillar-card:hover {
    border-color: var(--fmit-blue);
    background: #f0f4f8;
}
.nexus-pillar-card-title { font-weight: 700; font-size: 14px; }
.nexus-pillar-card-count { font-size: 12px; color: var(--fmit-muted); }
.nexus-pillar-card-en { font-size: 11px; }

/* Framework / chứng chỉ — chip bar */
.nexus-fw-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fmit-border);
}
.nexus-fw-chips-empty { margin: 0; font-size: 13px; }
.nexus-fw-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 8px 14px;
    border: 1px solid var(--fmit-border);
    border-radius: 8px;
    background: #fff;
    color: var(--fmit-text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.nexus-fw-chip:hover {
    border-color: var(--fmit-red);
    color: var(--fmit-red);
    box-shadow: 0 1px 4px rgba(150, 0, 0, .08);
}
.nexus-fw-chip.is-active {
    background: var(--fmit-red);
    border-color: var(--fmit-red);
    color: #fff;
    box-shadow: 0 2px 8px rgba(150, 0, 0, .18);
}
.nexus-fw-chip[data-code="PMBOK"].is-active,
.nexus-fw-chip[data-code="Agile"].is-active { background: #1565c0; border-color: #1565c0; }
.nexus-fw-chip[data-code="COSO"].is-active,
.nexus-fw-chip[data-code="IPPF"].is-active { background: #6a1b9a; border-color: #6a1b9a; }
.nexus-fw-chip[data-code="IFRS"].is-active { background: #2e7d32; border-color: #2e7d32; }
.nexus-fw-chip[data-code="SCOR"].is-active,
.nexus-fw-chip[data-code="CPSM"].is-active { background: #ef6c00; border-color: #ef6c00; }
.nexus-fw-chip[data-code="COBIT"].is-active,
.nexus-fw-chip[data-code="ITIL"].is-active { background: #00838f; border-color: #00838f; }
.nexus-fw-chip[data-code="ISO 27001"].is-active { background: #455a64; border-color: #455a64; }

.nexus-fw-body { min-height: 120px; }
.nexus-fw-body-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--fmit-muted);
}
.nexus-fw-body-head { margin-bottom: 12px; }
.nexus-fw-body-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--fmit-text);
}
.nexus-fw-body-meta { margin: 0; font-size: 13px; }

.nexus-pillar-back { padding-left: 0; margin-bottom: 4px; }
.nexus-pillar-current { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.nexus-hub-search-row { margin-bottom: 10px; }
.nexus-hub-small-toggle {
    display: block;
    font-size: 13px;
    font-weight: normal;
    margin-bottom: 10px;
    cursor: pointer;
}
.nexus-hub-empty { font-size: 13px; margin-top: 8px; }

/* ── Engagement (streak, chapters, goals, badges) ── */
.nexus-hero-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fmit-red);
    font-weight: bold;
}
.nexus-hero-hub { font-size: 14px; margin: 0 0 10px; color: var(--fmit-muted) !important; }
.nexus-hero-goals {
    font-size: 13px;
    margin-bottom: 14px;
    color: var(--fmit-muted);
}
.nexus-hero-goals strong { color: var(--fmit-text); }
.nexus-hero-goals .sep { margin: 0 6px; opacity: .5; }
.nexus-hero-goals .is-done { color: var(--fmit-green); font-weight: 600; }

.nexus-streak-panel {
    background: #fff;
    border: 1px solid var(--fmit-border);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    color: var(--fmit-text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.nexus-streak-flame { font-size: 26px; line-height: 1; }
.nexus-streak-num { font-size: 36px; font-weight: bold; line-height: 1.1; margin: 4px 0; color: var(--fmit-red); }
.nexus-streak-label { font-size: 13px; color: var(--fmit-muted); }
.nexus-streak-sub { font-size: 12px; color: var(--fmit-muted); margin-top: 4px; }
.nexus-streak-today {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8f5e9;
    color: var(--fmit-green);
    font-weight: 600;
}
.nexus-streak-today--pending {
    background: #fff8e1;
    color: #9a7b0a;
}
.nexus-streak-inline { font-size: 15px; }
.nexus-streak-flame-sm { margin-right: 4px; }
.nexus-pill-streak {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}
.nexus-pill-streak strong { color: #b45309; }

.nexus-today-card {
    border-left: 3px solid var(--fmit-red-line);
    background: linear-gradient(90deg, var(--fmit-red-tint) 0%, #fff 12%);
}
.nexus-today-desc { font-size: 13px; margin: 0 0 12px; color: var(--fmit-muted); }
.nexus-today-pathway { font-size: 13px; margin: 0 0 4px; color: var(--fmit-text); }
.nexus-today-pathway strong { font-weight: 600; }
.nexus-today-list { list-style: none; margin: 0; padding: 0; }
.nexus-today-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}
.nexus-today-item:last-child { border-bottom: none; }
.nexus-today-item.is-done { opacity: .55; }
.nexus-today-vi { display: block; font-weight: 600; font-size: 14px; color: var(--fmit-text); }
.nexus-today-chapter { display: block; font-size: 11px; font-weight: 600; color: var(--fmit-red); margin-bottom: 2px; }
.nexus-today-en { display: block; font-size: 12px; color: var(--fmit-muted); }
.nexus-today-actions { display: flex; gap: 6px; flex-shrink: 0; }
.nexus-today-actions .btn-default {
    color: var(--fmit-blue);
    border-color: var(--fmit-border);
    background: #fff;
}
.nexus-today-actions .btn-primary {
    background: var(--fmit-blue);
    border-color: var(--fmit-blue);
    font-size: 11px;
}
.nexus-today-actions .btn-primary:hover {
    background: #0f2744;
    border-color: #0f2744;
}

.nexus-pathway-terms-nudge {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--fmit-border);
    background: #f8fafc;
}
.nexus-pathway-terms-nudge-text {
    margin: 0;
    font-size: 14px;
    color: var(--fmit-text);
}
.nexus-pathway-terms-nudge-link {
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    vertical-align: baseline;
}
.nexus-pathway-terms-nudge-sub {
    margin: 6px 0 0;
    font-size: 12px;
}

/* Kiểm tra chương — banner ngay sau danh sách term */
.nexus-chapter-quiz-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 10px;
    border: 2px solid #2e7d32;
    background: linear-gradient(135deg, #f1f8f4 0%, #e8f5e9 100%);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.12);
}
.nexus-chapter-quiz-banner.is-dismissed {
    display: none;
}
.nexus-chapter-quiz-banner.nexus-chapter-quiz-banner-highlight {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.35), 0 4px 16px rgba(46, 125, 50, 0.2);
}
.nexus-chapter-quiz-banner-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}
.nexus-chapter-quiz-banner-body {
    flex: 1;
    min-width: 0;
}
.nexus-chapter-quiz-banner-body strong {
    display: block;
    font-size: 16px;
    color: #1b5e20;
    margin-bottom: 4px;
}
.nexus-chapter-quiz-banner-body p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #455a64;
    line-height: 1.5;
}
.nexus-chapter-quiz-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.nexus-chapter-quiz-dismiss {
    color: #666 !important;
    padding-left: 4px;
    padding-right: 4px;
}
.nexus-chapter-chip.has-quiz-pending .nexus-chapter-quiz-chip-link {
    color: var(--fmit-red);
    font-weight: 700;
    font-size: 11px;
}
.nexus-chapter-chip.has-quiz-pending.is-done {
    border-color: rgba(150, 0, 0, 0.35);
}
.nexus-chapter-quiz-inline-link {
    font-weight: 600;
    color: var(--fmit-red);
    white-space: nowrap;
}
.nexus-chapter-quiz-done-badge {
    display: inline-block;
    font-weight: 600;
    font-size: 11px;
    color: #2e7d32;
    white-space: nowrap;
}
.nexus-chapter-chip.has-quiz-done .nexus-chapter-quiz-done-badge {
    color: #1b5e20;
}

/* Responsive — phone */
@media (max-width: 767px) {
    .nexus-nav-main { display: none; }
    .nexus-nav-main.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--fmit-border);
        padding: 8px;
        box-shadow: var(--fmit-card-shadow);
    }
    .nexus-menu-toggle { display: block; }
    .nexus-topbar-inner { position: relative; flex-wrap: wrap; }
    .nexus-brand-text small { display: none; }
    .nexus-user-toggle span.name { display: none; }
    .nexus-bottom-nav { display: block; }
    body.nexus-app.has-bottom-nav {
        padding-bottom: calc(var(--nexus-bottom-nav-total) + 12px);
    }
    .nexus-search-hero {
        text-align: left;
        padding: 0 0 12px;
    }
    .nexus-search-hero h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .nexus-search-row .form-control {
        height: 38px;
        padding: 6px 12px;
    }
    .nexus-search-row .btn {
        height: 38px;
        padding: 0 14px;
        font-size: 13px;
        min-width: 48px;
    }
    .nexus-pathway-sticky {
        top: var(--nexus-header-h);
        margin-left: -15px;
        margin-right: -15px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    .nexus-pathway-sticky h1 {
        font-size: 15px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .nexus-pathway-sticky-menu-label {
        display: none;
    }
    .nexus-pathway-sticky-menu summary {
        padding: 4px 8px;
        min-width: 32px;
        justify-content: center;
    }
    .nexus-pathway-sticky.is-compact .nexus-pathway-sticky-head {
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 0;
    }
    .nexus-pathway-sticky.is-compact .nexus-pathway-sticky-inner {
        gap: 6px;
    }
    #nexus-pathway-terms,
    .nexus-term-card {
        scroll-margin-top: calc(var(--nexus-header-h) + var(--nexus-pathway-sticky-h, 72px) + 12px);
    }
    .nexus-pathway-grid { grid-template-columns: 1fr; }
    .nexus-term-card { flex-direction: column; align-items: stretch; }
    .nexus-term-actions { justify-content: flex-end; }
    .nexus-hub-grid { grid-template-columns: 1fr; }
    .nexus-fw-chips { gap: 6px; }
    .nexus-fw-chip { min-width: 48px; padding: 7px 12px; font-size: 11px; }
    .nexus-pillar-grid { grid-template-columns: 1fr 1fr; }
    .nexus-dual-goals { grid-template-columns: 1fr; }
    .nexus-hub-badge-grid { grid-template-columns: 1fr; }
    .nexus-today-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .nexus-today-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .nexus-card-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .nexus-card-head-meta {
        justify-content: flex-start;
        width: 100%;
    }
    .nexus-exam-format-legend {
        width: 100%;
    }
    .nexus-table-stack thead { display: none; }
    .nexus-table-stack tbody tr {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--fmit-border);
    }
    .nexus-table-stack tbody td {
        display: block;
        border: none;
        padding: 2px 0;
    }
    .nexus-table-stack tbody td::before {
        content: attr(data-label) ": ";
        font-weight: 700;
        color: var(--fmit-muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .02em;
    }
    .nexus-table-stack tbody td:first-child { padding-top: 0; }
}

/* Responsive — tablet (iPad portrait/landscape) */
@media (min-width: 768px) and (max-width: 991px) {
    .nexus-nav-main { display: flex; }
    .nexus-menu-toggle { display: none; }
    .nexus-bottom-nav { display: none; }
    .nexus-brand-text small { display: block; font-size: 10px; }
    .nexus-user-toggle span.name { display: inline; max-width: 120px; }
    .nexus-nav-main a {
        padding: 8px 10px;
        font-size: 13px;
    }
    .nexus-main.container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
    .nexus-pathway-sticky h1 {
        font-size: 17px;
    }
    .nexus-pathway-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nexus-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nexus-pillar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .nexus-term-card {
        flex-direction: row;
        align-items: center;
    }
    .nexus-term-actions {
        flex-shrink: 0;
        justify-content: flex-end;
    }
    .nexus-dual-goals { grid-template-columns: 1fr 1fr; }
    .nexus-hero h2 { font-size: 22px; }
    .nexus-streak-panel {
        margin-top: 0;
    }
    .nexus-chapter-chip {
        min-width: 140px;
    }
    .nexus-card-head {
        flex-wrap: wrap;
        gap: 8px;
    }
    .nexus-today-item {
        flex-direction: row;
        align-items: center;
    }
    .nexus-today-actions {
        flex-wrap: nowrap;
    }
}

/* Legacy alias — keep grid stacks for narrow tablets in edge cases */
@media (max-width: 991px) {
    .nexus-hub-badge-grid { grid-template-columns: 1fr; }
}

.nexus-dual-goals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.nexus-dual-goal {
    padding: 14px;
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    background: #fafafa;
}
.nexus-dual-goal.is-done { border-color: #c8e6c9; background: #f1f8f4; }
.nexus-dual-goal-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 13px;
}
.nexus-dual-goal-tier {
    font-weight: 700;
    color: var(--fmit-blue);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
}
.nexus-dual-goal-status { font-size: 12px; color: var(--fmit-muted); display: block; margin-top: 8px; }

.nexus-mini-milestones {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.nexus-mini-milestone {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px dashed var(--fmit-border);
    font-size: 11px;
    font-weight: 700;
    color: var(--fmit-muted);
    background: #fff;
    line-height: 1.2;
    text-align: center;
}
.nexus-mini-milestone small {
    display: block;
    font-weight: 500;
    font-size: 9px;
    margin-top: 2px;
    text-transform: none;
}
.nexus-mini-milestone.is-done {
    border-style: solid;
    border-color: var(--fmit-green);
    color: var(--fmit-green);
    background: #e8f5e9;
}

.nexus-chapters-card { overflow: hidden; }
.nexus-chapters-card .nexus-card-head { margin-bottom: 10px; }

.nexus-chapter-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 6px;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, .18) transparent;
}
.nexus-chapter-track::-webkit-scrollbar { height: 5px; }
.nexus-chapter-track::-webkit-scrollbar-track { background: transparent; }
.nexus-chapter-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .18);
    border-radius: 999px;
}
.nexus-chapter-track::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .28); }

.nexus-chapter-chip {
    flex: 0 0 auto;
    min-width: 118px;
    max-width: 136px;
    padding: 10px 12px;
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    background: #fff;
    text-decoration: none !important;
    color: var(--fmit-text) !important;
    transition: border-color .15s, box-shadow .15s;
}
.nexus-chapter-chip:hover { border-color: var(--fmit-red); box-shadow: 0 2px 8px rgba(150, 0, 0, .08); }
.nexus-chapter-chip.is-current { border-color: var(--fmit-red); background: var(--fmit-red-soft); }
.nexus-chapter-chip.is-done { border-color: #c8e6c9; }
.nexus-chapter-chip-title { display: block; font-weight: 700; font-size: 13px; }
.nexus-chapter-chip-meta { display: block; font-size: 11px; color: var(--fmit-muted); margin: 2px 0 6px; }
.nexus-chapter-page-done a { font-weight: 700; margin-left: 6px; }
.nexus-progress-sm { height: 4px; }

.nexus-hub-badge-list { display: flex; flex-direction: column; gap: 8px; }
.nexus-hub-badge-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.nexus-hub-badge-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.nexus-hub-badge--expert { background: #1a365d; color: #fff; }
.nexus-hub-badge--pro { background: #fff3e0; color: #e65100; }
.nexus-hub-badge--pro-done { background: #e8f5e9; color: #2e7d32; }
.nexus-hub-badge--scholar { background: #e3f2fd; color: #1565c0; }
.nexus-hub-badge--explorer { background: #f3e5f5; color: #7b1fa2; }
.nexus-hub-badge--muted { background: #eee; color: #999; }
.nexus-hub-badge-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nexus-hub-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.nexus-hub-badge-card {
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    padding: 14px;
    background: #fafafa;
}
.nexus-hub-badge-card h5 { margin: 8px 0 10px; font-size: 15px; color: var(--fmit-text); }

.nexus-stat-tile {
    text-align: center;
    padding: 14px 8px;
    border: 1px solid var(--fmit-border);
    border-radius: 10px;
    background: #fff;
    margin-bottom: 12px;
}
.nexus-stat-num { font-size: 22px; font-weight: bold; color: var(--fmit-red); }
.nexus-stat-label { font-size: 11px; color: var(--fmit-muted); text-transform: uppercase; letter-spacing: .04em; }

.nexus-timeline-compact li {
    font-size: 12px;
    line-height: 1.45;
    padding: 0 0 10px 30px;
}
.nexus-timeline-compact li:last-child { padding-bottom: 0; }


@media (max-width: 480px) {
    .nexus-card { padding: 16px; }
    .nexus-brand-logo--desktop {
        height: 44px;
        width: 44px;
        max-width: 44px;
    }
    .nexus-brand-text strong { font-size: 14px; }
}

.nexus-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.nexus-zalo-share-slot {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    min-width: 72px;
}
.nexus-zalo-share-slot .zalo-share-button {
    display: inline-block;
    line-height: 0;
}
.nexus-btn-zalo {
    background: #0068ff;
    border-color: #0068ff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nexus-btn-zalo:hover,
.nexus-btn-zalo:focus {
    background: #0056d6;
    border-color: #0056d6;
    color: #fff;
}
.nexus-zalo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #fff;
    color: #0068ff;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
}

/* Pathway view tabs — Học | Mốc & thi | Luyện tập */
.nexus-pathway-view-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 14px;
    padding: 4px;
    background: #ebebeb;
    border-radius: 10px;
    border: 1px solid var(--fmit-border);
}
.nexus-pathway-view-tab {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    text-align: center;
    display: block;
    line-height: 1.3;
}
a.nexus-pathway-view-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}
button.nexus-pathway-view-tab:hover,
a.nexus-pathway-view-tab:hover {
    color: var(--fmit-red);
    background: rgba(255,255,255,.6);
}
.nexus-pathway-view-tab.is-active {
    background: #fff;
    color: var(--fmit-red);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.nexus-pathway-view-panel[hidden] { display: none !important; }

.nexus-pathway-card-hub {
    font-size: 12px;
    margin: -4px 0 0;
    line-height: 1.35;
}
.nexus-inline-help-link {
    font-size: 13px;
    white-space: nowrap;
}
.nexus-faq-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--fmit-heading);
    margin: 0 0 12px;
}

/* Onboarding lần đầu — trang lộ trình */
.nexus-onboard-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.nexus-onboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
}
.nexus-onboard-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--fmit-red);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.nexus-onboard-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
    color: var(--fmit-heading);
}
.nexus-onboard-steps {
    margin: 0 0 16px;
    padding-left: 20px;
    line-height: 1.6;
    font-size: 14px;
    color: #444;
}
.nexus-onboard-steps li { margin-bottom: 6px; opacity: .45; }
.nexus-onboard-steps li.is-active { opacity: 1; font-weight: 600; }
.nexus-onboard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Bảng lệ phí thi / cấp CN */
.nexus-cert-fee-box {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #faf8f8;
    border: 1px solid #eee;
    border-radius: 8px;
}
.nexus-cert-fee-table th,
.nexus-cert-fee-table td {
    font-size: 13px;
    vertical-align: middle;
}
.nexus-cert-fee-table th {
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}
.nexus-cert-fee-table td:first-child {
    font-weight: 600;
    color: #333;
}

/* Coach Nexus — góc trái dưới; mobile: bottom sheet */
.nexus-chatbot-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, .35);
}
body.nexus-chatbot-open { overflow: hidden; }
.nexus-chatbot {
    position: fixed;
    left: 14px;
    bottom: 20px;
    z-index: 1002;
    font-family: Arial, Helvetica, sans-serif;
}
.nexus-chatbot-fab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px 0 12px;
    border: none;
    border-radius: 22px;
    background: var(--fmit-red, #960000);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .22);
    cursor: pointer;
}
.nexus-chatbot-fab:active { transform: scale(.96); }
.nexus-chatbot-fab-ico { font-size: 18px; line-height: 1; }
.nexus-chatbot-panel {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: min(360px, calc(100vw - 28px));
    max-height: min(70vh, 520px);
    background: #fff;
    border: 1px solid var(--fmit-border, #e8d4d4);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
    overflow: hidden;
    flex-direction: column;
}
.nexus-chatbot.is-open .nexus-chatbot-panel { display: flex; }
.nexus-chatbot-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #fff 0%, #faf6f6 100%);
    border-bottom: 1px solid #eee;
}
.nexus-chatbot-head strong { display: block; color: var(--fmit-red, #960000); font-size: 15px; }
.nexus-chatbot-sub { display: block; font-size: 11px; color: #777; margin-top: 2px; }
.nexus-chatbot-close {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}
.nexus-chatbot-quota {
    padding: 6px 14px 0;
    font-size: 11px;
    color: #666;
}
.nexus-chatbot-suggestions {
    padding: 8px 14px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.nexus-chatbot-sug-label {
    font-size: 11px;
    color: #888;
    margin-right: 2px;
}
.nexus-chatbot-sug {
    border: 1px solid #e0c8c8;
    background: #fff;
    color: #7a0000;
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    max-width: 100%;
    text-align: left;
}
.nexus-chatbot-sug:hover { background: #faf6f6; }
.nexus-chatbot-messages {
    flex: 1 1 auto;
    min-height: 120px;
    max-height: 280px;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nexus-chatbot-msg {
    max-width: 92%;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    word-wrap: break-word;
}
.nexus-chatbot-msg.is-user {
    align-self: flex-end;
    background: #f0e8e8;
    color: #333;
}
.nexus-chatbot-msg.is-assistant {
    align-self: flex-start;
    background: #f7f7f7;
    border: 1px solid #eee;
    color: #222;
}
.nexus-chatbot-src {
    display: inline-block;
    margin-bottom: 4px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #eee;
    color: #666;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.nexus-chatbot-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 14px;
    border-top: 1px solid #eee;
    background: #fff;
}
.nexus-chatbot-form textarea {
    flex: 1 1 auto;
    resize: vertical;
    min-height: 38px;
    max-height: 96px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 8px 10px;
}
.nexus-chatbot-form .btn { flex-shrink: 0; min-width: 56px; }
.nexus-chatbot-foot {
    margin: 0;
    padding: 0 14px 10px;
    font-size: 11px;
    color: #888;
    text-align: center;
}
.nexus-chatbot-feedback-slot {
    flex-shrink: 0;
    max-height: min(38vh, 280px);
    overflow-y: auto;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.nexus-chatbot-feedback-slot:not([hidden]) {
    display: block;
}
.nexus-chatbot-feedback-slot .nexus-chatbot-feedback-wrap {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.nexus-chatbot-feedback-wrap {
    max-width: 100%;
    padding: 10px 12px;
}
.nexus-chatbot-feedback-lead {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #444;
}
.nexus-chatbot-feedback-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}
.nexus-chatbot-feedback-label {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: #666;
}
.nexus-chatbot-feedback-form .form-control {
    font-size: 12px;
    border-radius: 6px;
}
.nexus-chatbot-feedback-send {
    align-self: flex-start;
    margin-top: 4px;
}
.nexus-chatbot-feedback-cancel {
    align-self: flex-start;
    margin-top: 4px;
}
.nexus-chatbot-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.nexus-chatbot-feedback-error {
    margin: 0 0 8px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #a94442;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}
.nexus-chatbot-feedback-image-hint {
    margin: 4px 0 8px;
    font-size: 11px;
    line-height: 1.35;
}
.nexus-chatbot-feedback-image-preview {
    margin-bottom: 8px;
}
button.is-loading,
.btn.is-loading {
    cursor: wait;
    opacity: 0.85;
}
@media (max-width: 991px) {
    body.has-bottom-nav .nexus-chatbot {
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
    }
    body.has-bottom-nav .nexus-chatbot-fab {
        pointer-events: auto;
        position: fixed;
        left: 14px;
        bottom: calc(var(--nexus-bottom-nav-total) + 14px + var(--nexus-float-extra-bottom, 0px));
        z-index: 1050;
    }
    body.has-bottom-nav.has-nexus-chatbot #back2top {
        bottom: calc(var(--nexus-bottom-nav-total) + 68px + var(--nexus-float-extra-bottom, 0px));
        z-index: 1051;
    }
    .nexus-chatbot-fab-label { display: none; }
    .nexus-chatbot-fab {
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }
    .nexus-chatbot.is-open .nexus-chatbot-fab { display: none; }
    .nexus-chatbot.is-open .nexus-chatbot-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        max-height: min(78vh, 560px);
        border-radius: 16px 16px 0 0;
        pointer-events: auto;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
    }
    .nexus-chatbot-messages {
        max-height: min(42vh, 320px);
    }
    .nexus-chatbot-form {
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
    }
}
@media (min-width: 992px) {
    body.has-nexus-chatbot #back2top {
        bottom: 20px;
    }
}

/* ── Pocket / Bookmark ─────────────────────────────────────────── */
.nexus-pocket-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nexus-pocket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}
.nexus-pocket-title {
    font-size: 14px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nexus-pocket-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.nexus-pocket-date {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}
@media (max-width: 767px) {
    .nexus-pocket-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .nexus-pocket-title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.45;
    }
    .nexus-pocket-meta {
        width: 100%;
        justify-content: space-between;
    }
}
.btn-pocket-toggle { padding: 1px 5px; line-height: 1.4; opacity: .6; }
.btn-pocket-toggle:hover { opacity: 1; }

/* ── MP Activity Heatmap ─────────────────────────────────────── */
.nexus-heatmap-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 4px;
}
.nexus-heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 13px);
    grid-auto-flow: column;
    gap: 3px;
    width: max-content;
}
.nexus-heatmap-cell {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    display: block;
}
.nexus-heatmap-pad { background: transparent; }
.nexus-heatmap-lv0 { background: #ebedf0; }
.nexus-heatmap-lv1 { background: #ffd6a5; }
.nexus-heatmap-lv2 { background: #ffab40; }
.nexus-heatmap-lv3 { background: #e65100; }
.nexus-heatmap-lv4 { background: #bf360c; }
.nexus-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
}
.nexus-heatmap-legend .nexus-heatmap-cell {
    width: 12px;
    height: 12px;
}

/* Practice mode */
.nexus-practice-stem {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    margin: 0 0 14px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-left: 3px solid var(--fmit-red);
    border-radius: 0 6px 6px 0;
}
.nexus-practice-opt:hover:not(:disabled) {
    border-color: var(--fmit-red) !important;
    background: #fff8f8 !important;
}
#practice-progress {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

/* ── PWA install (mobile app) ─────────────────────────────────── */
.nexus-pwa-install-banner {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(var(--nexus-bottom-nav-total) + 10px);
    z-index: 1040;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 36px 12px 12px;
    background: #fff;
    border: 1px solid var(--fmit-red-line);
    border-radius: var(--fmit-radius);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .14);
}
.nexus-pwa-install-banner-icon {
    flex-shrink: 0;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.nexus-pwa-install-banner-text {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    line-height: 1.45;
}
.nexus-pwa-install-banner-title {
    display: block;
    font-size: 13px;
    color: var(--fmit-heading);
    margin-bottom: 2px;
}
.nexus-pwa-install-banner-desc { display: none; color: var(--fmit-muted); }
.nexus-pwa-install-banner.is-android .nexus-pwa-install-banner-desc--android,
.nexus-pwa-install-banner.is-ios .nexus-pwa-install-banner-desc--ios,
.nexus-pwa-install-banner.is-inapp .nexus-pwa-install-banner-desc--inapp {
    display: block;
}
.nexus-pwa-install-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.nexus-pwa-install-banner-actions .btn { white-space: nowrap; }
.nexus-pwa-install-banner.is-ios .nexus-pwa-install-guide-btn,
.nexus-pwa-install-banner.is-inapp .nexus-pwa-install-guide-btn,
.nexus-pwa-install-banner.is-android .nexus-pwa-install-guide-btn {
    display: none;
}
.nexus-pwa-install-banner-close {
    position: absolute;
    top: 4px;
    right: 6px;
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #94a3b8;
    padding: 4px 6px;
}
.nexus-pwa-install-banner-close:hover { color: #475569; }

body.has-nexus-pwa-banner.has-bottom-nav {
    --nexus-float-extra-bottom: 104px;
}
body.has-nexus-pwa-banner.has-bottom-nav #back2top {
    bottom: calc(var(--nexus-bottom-nav-total) + 14px + var(--nexus-float-extra-bottom, 0px));
    z-index: 1051;
}
body.has-nexus-pwa-banner.has-bottom-nav.has-nexus-chatbot #back2top {
    bottom: calc(var(--nexus-bottom-nav-total) + 68px + var(--nexus-float-extra-bottom, 0px));
}
body.has-nexus-pwa-banner.has-bottom-nav .nexus-chatbot-fab {
    bottom: calc(var(--nexus-bottom-nav-total) + 14px + var(--nexus-float-extra-bottom, 0px));
}

.nexus-pwa-guide-lead { margin: 0 0 14px; font-size: 14px; line-height: 1.55; }
.nexus-pwa-guide-block {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid var(--fmit-border);
    border-radius: 8px;
}
.nexus-pwa-guide-block h5 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--fmit-heading);
}
.nexus-pwa-guide-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--fmit-red);
    border-radius: 999px;
    vertical-align: middle;
}
.nexus-pwa-guide-badge--warn { background: var(--fmit-warning); color: #1a1a1a; }
.nexus-pwa-guide-steps {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.55;
}
.nexus-pwa-guide-steps li + li { margin-top: 4px; }
.nexus-pwa-guide-note { font-size: 12px; margin: 8px 0 0; }
.nexus-pwa-guide-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--fmit-border);
}
.nexus-pwa-guide-preview-icon { border-radius: 12px; }
.nexus-pwa-guide--compact .nexus-pwa-guide-block--inapp { margin-bottom: 0; }
.nexus-pwa-profile-card .nexus-pwa-guide-block {
    background: #fff;
    margin-bottom: 10px;
}

@media (min-width: 992px) {
    .nexus-pwa-install-root,
    .nexus-pwa-profile-card {
        display: none !important;
    }
}
@media (max-width: 991px) {
    .nexus-pwa-install-banner-actions {
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 108px;
    }
}
@media (max-width: 380px) {
    .nexus-pwa-install-banner {
        flex-wrap: wrap;
        padding-right: 32px;
    }
    .nexus-pwa-install-banner-actions {
        width: 100%;
        max-width: none;
        flex-direction: row;
    }
}
