:root {
    --cmc-navy: #002757;
    --cmc-navy-2: #003b72;
    --cmc-blue: #008fd5;
    --cmc-blue-dark: #006eaa;
    --cmc-cyan: #00dedf;
    --ink: #0b2b4d;
    --muted: #536b7e;
    --subtle: #5d7487;
    --canvas: #f3f8fb;
    --surface: #ffffff;
    --surface-soft: #edf5f8;
    --line: #d8e5ec;
    --line-strong: #bfd3de;
    --success: #14725b;
    --success-bg: #e6f5ef;
    --warning: #805f08;
    --warning-bg: #fff6d8;
    --danger: #a53f4d;
    --danger-bg: #fdecef;
    --info-bg: #e2f4fb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 14px 34px rgba(0, 57, 98, .08);
    --shadow-lg: 0 24px 64px rgba(0, 45, 82, .14);
    --ease: cubic-bezier(.16, 1, .3, 1);
    --sidebar: 244px;
    --topbar: 72px;
}

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Segoe UI Variable", Aptos, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; text-underline-offset: .2em; }
h1, h2, h3, h4, p { text-wrap: pretty; }
h1, h2, h3, h4 { margin-top: 0; color: var(--cmc-navy); font-weight: 750; letter-spacing: -.025em; }
::selection { color: #fff; background: var(--cmc-blue-dark); }
* { scrollbar-width: thin; scrollbar-color: #9fb8c6 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #9fb8c6; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
:focus-visible { outline: 3px solid #006eaa; outline-offset: 3px; }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem .95rem; border-radius: var(--radius-sm); font-weight: 700; line-height: 1; transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s var(--ease); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-brand { color: #fff; background: var(--cmc-blue-dark); border: 1px solid var(--cmc-blue-dark); box-shadow: 0 8px 18px rgba(0, 110, 170, .18); }
.btn-brand:hover { color: #fff; background: var(--cmc-navy); border-color: var(--cmc-navy); box-shadow: 0 12px 24px rgba(0, 39, 87, .2); transform: translateY(-1px); }
.btn-outline-brand { color: var(--cmc-blue-dark); background: #fff; border: 1px solid #96c9df; }
.btn-outline-brand:hover, .btn-card:hover { color: #fff; background: var(--cmc-navy); border-color: var(--cmc-navy); }
.btn-light, .btn-card { color: var(--cmc-navy); background: #fff; border: 1px solid var(--line); }
.btn-ghost { color: var(--ink); background: transparent; border: 1px solid transparent; }
.btn-lg { min-height: 48px; padding: .8rem 1.1rem; }
.icon-btn { width: 40px; height: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 0; color: var(--cmc-navy); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.icon-btn:hover { color: #fff; background: var(--cmc-navy); border-color: var(--cmc-navy); }
.form-control, .form-select { min-height: 46px; padding: .65rem .8rem; color: var(--ink); background-color: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: none; }
.form-control::placeholder { color: #536b7e; opacity: 1; }
.form-control:focus, .form-select:focus { color: var(--ink); background: #fff; border-color: var(--cmc-blue); box-shadow: 0 0 0 4px rgba(0, 143, 213, .12); }
.form-label { margin-bottom: .45rem; color: #284862; font-weight: 700; }
.badge, .status-label, .tier-badge, .policy-status { display: inline-flex; align-items: center; gap: .35rem; width: fit-content; padding: .32rem .5rem; border-radius: 6px; font-size: .72rem; font-weight: 700; line-height: 1.2; }
.status-success, .text-bg-success-subtle { color: var(--success) !important; background: var(--success-bg) !important; }
.status-warning, .text-bg-warning-subtle { color: var(--warning) !important; background: var(--warning-bg) !important; }
.status-danger, .text-bg-danger-subtle { color: var(--danger) !important; background: var(--danger-bg) !important; }
.status-info, .text-bg-primary-subtle { color: #006a9d !important; background: var(--info-bg) !important; }
.status-neutral, .text-bg-secondary-subtle { color: #526b7d !important; background: #eaf0f3 !important; }
.eyebrow, .section-kicker, .soft-label { display: none; }
.text-link, .panel-head > a, .rail-link { color: var(--cmc-blue-dark); font-weight: 700; }
.text-link:hover, .panel-head > a:hover, .rail-link:hover { color: var(--cmc-navy); }
.avatar { width: 44px; height: 44px; flex: 0 0 auto; display: inline-grid; place-items: center; color: #fff; background: var(--cmc-navy); border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-sm); font-weight: 800; font-variant-numeric: tabular-nums; }
.avatar-xs { width: 32px; height: 32px; font-size: .68rem; }
.avatar-sm { width: 38px; height: 38px; font-size: .75rem; }
.avatar-xl { width: 88px; height: 88px; font-size: 1.35rem; }
.empty-state { padding: 4rem 1.5rem; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state.compact { padding: 1.5rem; }
.empty-state > i { color: var(--cmc-blue); font-size: 2rem; }
.empty-state h1, .empty-state h2, .empty-state h3 { margin: .75rem 0 .35rem; }

/* Public shell */
.public-layout { background: #fff; }
.public-nav { min-height: 72px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--cmc-navy); font-weight: 750; }
.brand img { display: block; max-width: 100%; }
.cmc-brand img { width: 168px; }
.brand-product { padding-left: .75rem; border-left: 1px solid var(--line-strong); color: var(--cmc-navy); font-size: .75rem; }
.eambassador-wordmark { color: var(--cmc-navy); font-family: "Syne", "Trebuchet MS", sans-serif; font-weight: 700; letter-spacing: -.04em; text-transform: none; }
.eambassador-wordmark > span { color: var(--cmc-blue); }
.sidebar-brand .eambassador-wordmark, .footer-brand .eambassador-wordmark { color: #fff; }
.sidebar-brand .eambassador-wordmark > span, .footer-brand .eambassador-wordmark > span { color: var(--cmc-cyan); }
.public-nav .nav-link { color: #48657a; font-weight: 650; }
.public-nav .nav-link:hover { color: var(--cmc-blue-dark); }
.public-footer { padding: 3.5rem 0; color: #c8d8e4; background: var(--cmc-navy); }
.footer-brand { color: #fff; }
.footer-brand img { width: 176px; filter: brightness(0) invert(1); }

/* Public home */
.cmc-hero { position: relative; overflow: hidden; padding: 72px 0 82px; color: #fff; background: var(--cmc-navy); }
.cmc-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--cmc-cyan); }
.cmc-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.cmc-hero-copy h1 { max-width: 760px; margin: 1rem 0; color: #fff; font-size: clamp(2.7rem, 5vw, 5rem); line-height: 1.01; letter-spacing: -.04em; }
.cmc-hero-copy h1 span { color: var(--cmc-cyan); }
.hero-kicker { display: inline-flex; align-items: center; gap: .5rem; color: var(--cmc-cyan); font-weight: 700; }
.hero-lead { max-width: 58ch; color: #d5e4ed; font-size: 1.05rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.cmc-hero-art { position: relative; min-height: 500px; margin: 0; overflow: hidden; border-radius: var(--radius); }
.cmc-hero-art img { width: 100%; height: 100%; min-height: 500px; object-fit: cover; }
.cmc-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 56%, rgba(0,39,87,.8)); }
.cmc-proof { color: #fff; background: var(--cmc-blue-dark); }
.cmc-proof-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); }
.proof-statement, .cmc-proof-grid > div { padding: 1.5rem; border-right: 1px solid rgba(255,255,255,.16); }
.cmc-proof-grid strong, .cmc-proof-grid span { display: block; }
.cmc-proof-grid strong { font-size: 1.8rem; }
.cmc-proof-grid span { color: #d8edf5; }
.section-space { padding: 88px 0; }
.section-heading { max-width: 760px; margin-bottom: 2rem; }
.section-heading h2, .cmc-heading-split h2 { font-size: clamp(2rem, 3.5vw, 3.3rem); }
.cmc-capability-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); }
.cmc-capability-grid article { display: flex; gap: 1rem; padding: 2rem; background: #fff; }
.cmc-capability-grid article:first-child { grid-row: span 2; align-items: center; }
.feature-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: var(--cmc-blue-dark); background: var(--surface-soft); border-radius: var(--radius-sm); font-size: 1.2rem; }
.cmc-story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.story-image { overflow: hidden; border-radius: var(--radius); }
.story-image img { width: 100%; height: 100%; object-fit: cover; }
.ambassadors-preview { background: var(--canvas); }
.ambassador-card { height: 100%; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease; }
.ambassador-card:hover { border-color: #9bc9dc; box-shadow: var(--shadow); transform: translateY(-2px); }
.ambassador-cover { position: relative; height: 180px; display: grid; place-items: center; background: var(--surface-soft); }
.cover-2 { background: #e6f2f8; } .cover-3 { background: #e6f7f6; }
.ambassador-cover .avatar { width: 96px; height: 96px; font-size: 1.4rem; border-radius: var(--radius); }
.online-badge, .offline-badge { position: absolute; top: .8rem; right: .8rem; padding: .35rem .55rem; color: var(--success); background: #fff; border-radius: 6px; font-size: .7rem; font-weight: 700; }
.offline-badge { color: var(--muted); }
.ambassador-body { padding: 1.25rem; }
.verified { color: var(--cmc-blue-dark); font-size: .72rem; font-weight: 700; }
.ambassador-body h3 { margin: .45rem 0; }
.ambassador-body > p { color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag-row span { padding: .3rem .45rem; color: #506c80; background: var(--surface-soft); border-radius: 5px; font-size: .7rem; }
.cmc-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.15); }
.how-section { color: #fff; background: var(--cmc-navy); }
.how-section h2, .how-section h3 { color: #fff; }
.cmc-steps article { padding: 2rem; background: var(--cmc-navy); }
.cmc-steps article > span { color: var(--cmc-cyan); font-weight: 800; }
.cmc-steps article > i { display: block; margin: 1rem 0; color: var(--cmc-cyan); font-size: 1.7rem; }
.cmc-steps p { color: #c6d8e4; }
.cta-section { padding: 70px 0; }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.5rem; color: #fff; background: var(--cmc-blue-dark); border-radius: var(--radius); }
.cta-card h2 { color: #fff; }

/* Directory and public chat */
.directory-hero { padding: 66px 0 88px; color: #fff; background: var(--cmc-navy); }
.directory-hero h1 { max-width: 760px; margin: 1rem 0 .6rem; color: #fff; font-size: clamp(2.4rem, 4vw, 4rem); }
.directory-hero p { max-width: 65ch; color: #c8dbe6; }
.directory-section { padding-bottom: 88px; margin-top: -28px; }
.filter-bar { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: .6rem; padding: .85rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-search { position: relative; }
.filter-search i { position: absolute; left: .85rem; top: 50%; z-index: 1; color: var(--muted); transform: translateY(-50%); }
.filter-search input { width: 100%; height: 46px; padding: 0 .8rem 0 2.4rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.directory-meta { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 1rem; color: var(--muted); }
.chat-panel { position: fixed; z-index: 1060; inset: 0 0 0 auto; width: min(430px, 100%); display: flex; flex-direction: column; background: #fff; box-shadow: -18px 0 48px rgba(0,39,87,.2); transform: translateX(105%); transition: transform .24s var(--ease); }
.chat-panel.open { transform: translateX(0); }
.chat-overlay, .sidebar-overlay { display: none; }
.chat-overlay.open { position: fixed; z-index: 1055; inset: 0; display: block; background: rgba(0,39,87,.5); }
.chat-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; color: #fff; background: var(--cmc-navy); }
.chat-welcome { padding: 1.5rem; overflow: auto; }
.chat-shield { width: 48px; height: 48px; display: grid; place-items: center; color: var(--cmc-blue-dark); background: var(--surface-soft); border-radius: var(--radius-sm); font-size: 1.2rem; }
.chat-room { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.message-list { flex: 1; overflow-y: auto; padding: 1rem; background: var(--canvas); }
.message { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: .9rem; }
.message.mine { align-items: flex-end; }
.message b, .message time { margin: 0 .3rem .2rem; color: var(--muted); font-size: .68rem; }
.message p { max-width: 82%; margin: 0; padding: .7rem .85rem; background: #fff; border: 1px solid var(--line); border-radius: 10px 10px 10px 3px; }
.message.mine p { color: #fff; background: var(--cmc-navy); border-color: var(--cmc-navy); border-radius: 10px 10px 3px 10px; }
.chat-composer { display: flex; align-items: end; gap: .5rem; padding: .8rem; background: #fff; border-top: 1px solid var(--line); }
.chat-composer textarea { min-height: 42px; max-height: 110px; flex: 1; resize: none; padding: .6rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.chat-composer button { width: 42px; height: 42px; color: #fff; background: var(--cmc-blue-dark); border: 0; border-radius: var(--radius-sm); }
.chat-safety { padding: .2rem .8rem .8rem; text-align: center; color: var(--muted); }

/* Login */
.login-layout { min-height: 100dvh; background: #dff4fb; }
.internal-login { min-height: 100dvh; display: grid; place-items: center; padding: clamp(1rem, 3vw, 2rem); }
.internal-login-panel { width: min(1160px, 100%); min-height: min(720px, calc(100dvh - 2rem)); display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; background: #fff; border-radius: var(--radius); box-shadow: 0 28px 70px rgba(0, 110, 170, .18); }
.internal-login-visual { position: relative; min-height: 620px; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #f8fdff 0%, #c9effa 16%, #82d5ee 48%, #35b0df 100%); contain: paint; }
.internal-login-visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(0,92,151,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(0,92,151,.09) 1px, transparent 1px); background-size: 20px 20px; pointer-events: none; }
.internal-login-visual::after { content: ""; position: absolute; right: 8%; bottom: 12%; width: 46%; aspect-ratio: 1; background: rgba(255,255,255,.11); border-radius: 50%; filter: blur(48px); pointer-events: none; }
.internal-login-overlay { position: absolute; z-index: 1; inset: 0; padding: clamp(2rem, 4vw, 3.5rem); }
.login-logo { position: relative; z-index: 2; width: 208px; filter: none; }
.login-eye-scene { position: absolute; z-index: 2; right: 50%; bottom: 0; width: 550px; height: 400px; transform: translateX(50%); }
.eye-character { position: absolute; bottom: 0; overflow: hidden; transform-origin: bottom center; transition: all .7s ease-in-out; }
#purple-character { left: 70px; z-index: 1; width: 180px; height: 400px; background: #6c3ff5; border-radius: 10px 10px 0 0; }
#black-character { left: 240px; z-index: 2; width: 120px; height: 310px; background: #2d2d2d; border-radius: 8px 8px 0 0; }
#orange-character { left: 0; z-index: 3; width: 240px; height: 200px; background: #ff9b6b; border-radius: 120px 120px 0 0; }
#yellow-character { left: 310px; z-index: 4; width: 140px; height: 230px; background: #e8d754; border-radius: 70px 70px 0 0; }
.character-cmc-mark { position: absolute; left: 50%; bottom: 22%; width: 54%; opacity: .14; filter: grayscale(1) brightness(0) invert(1); transform: translateX(-50%); pointer-events: none; user-select: none; }
#purple-character .character-cmc-mark { bottom: 44%; }
#orange-character .character-cmc-mark { bottom: 8%; width: 40%; }
#yellow-character .character-cmc-mark { bottom: 15%; width: 48%; }
.eye-face { position: absolute; z-index: 1; display: flex; }
#purple-eyes, #black-eyes { transition: all .7s ease-in-out; }
#orange-eyes, #yellow-eyes { transition: all .2s ease-out; }
#purple-eyes { left: 45px; top: 40px; gap: 32px; }
#black-eyes { left: 26px; top: 32px; gap: 24px; }
#orange-eyes { left: 82px; top: 90px; gap: 32px; }
#yellow-eyes { left: 52px; top: 40px; gap: 24px; }
.eye-ball { display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border-radius: 999px; transition: all .15s; }
#purple-eye-1, #purple-eye-2 { width: 18px; height: 18px; }
#black-eye-1, #black-eye-2 { width: 16px; height: 16px; }
#purple-pupil-1, #purple-pupil-2 { width: 7px; height: 7px; }
#black-pupil-1, #black-pupil-2 { width: 6px; height: 6px; }
.eye-pupil { display: block; background: #2d2d2d; border-radius: 999px; transition: transform .1s ease-out; }
#orange-pupil-1, #orange-pupil-2, #yellow-pupil-1, #yellow-pupil-2 { width: 12px; height: 12px; }
.eye-mouth { position: absolute; left: 40px; top: 88px; width: 80px; height: 4px; background: #2d2d2d; border-radius: 999px; transition: all .2s ease-out; }
.internal-login-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4.5rem); background: #fff; }
.login-form-head { margin-bottom: 1.5rem; }
.login-form-head h1 { margin: 0; font-size: 2.4rem; }
.login-form { display: grid; gap: 1rem; }
.login-field { position: relative; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; z-index: 1; left: .85rem; top: 50%; color: #426780; transform: translateY(-50%); pointer-events: none; }
.input-icon .form-control { padding-left: 2.55rem; }
#loginPassword { padding-right: 3.3rem; }
.password-toggle { position: absolute; z-index: 2; right: .4rem; top: 50%; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: var(--cmc-blue-dark); background: transparent; border: 0; border-radius: 7px; font-size: 1rem; transform: translateY(-50%); }
.password-toggle:hover { color: var(--cmc-navy); background: rgba(0,143,213,.08); }
.login-submit { margin-top: .25rem; }
.demo-accounts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; padding: .8rem; background: var(--surface-soft); border-radius: var(--radius-sm); }
.demo-accounts strong { width: 100%; }
.demo-accounts a, .demo-accounts button { padding: .35rem .5rem; color: var(--cmc-blue-dark); background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: .72rem; }
.login-mobile-brand { display: none; }
.lead-form-card { padding: 2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Login theme: CMC Particle Logo */
.login-theme-particles .internal-login-visual { background: linear-gradient(145deg, #0864d9 0%, #1387e6 58%, #42a5ec 100%); cursor: default; }
.login-theme-particles .internal-login-visual::before { z-index: 0; inset: 0; background: none; filter: none; opacity: 1; }
.login-theme-particles .internal-login-visual::after { z-index: 3; inset: 0; width: auto; height: auto; aspect-ratio: auto; background: none; border-radius: 0; filter: none; box-shadow: none; }
.login-theme-particles .login-particle-atmosphere { position: absolute; z-index: 0; inset: 0; overflow: hidden; container-type: inline-size; pointer-events: none; }
.login-theme-particles .login-particle-atmosphere span { position: absolute; color: rgba(255,255,255,.09); font-size: clamp(4.5rem, 10vw, 7.25rem); font-size: clamp(4.5rem, 20cqw, 7.25rem); font-weight: 800; letter-spacing: -.04em; line-height: .95; white-space: nowrap; }
.login-theme-particles .login-particle-atmosphere span:first-child { top: 18%; left: -5%; }
.login-theme-particles .login-particle-atmosphere span:last-child { right: 3%; bottom: 5%; }
.login-theme-particles .login-particle-fallback { position: absolute; z-index: 1; inset: 50% auto auto 50%; width: min(74%, 460px); height: auto; visibility: hidden; opacity: 0; filter: brightness(0) invert(1); transform: translate(-50%, -43%); }
.login-theme-particles .internal-login-visual.is-particle-failed .login-particle-fallback { visibility: visible; opacity: .26; }
.login-theme-particles .login-particle-canvas { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
.login-theme-particles .internal-login-overlay { z-index: 2; pointer-events: none; }
.login-theme-particles .login-logo { filter: brightness(0) invert(1); }
.login-theme-particles .login-field-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.login-theme-particles .login-field-head .form-label { margin-bottom: .45rem; }
.login-theme-particles #loginPassword { padding-right: .8rem; }
.login-theme-particles .password-toggle { position: static; z-index: auto; width: auto; height: 36px; min-height: 36px; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .55rem; border-radius: var(--radius-sm); font-size: .78rem; transform: none; }
.login-theme-particles .internal-login-form { position: relative; overflow: hidden; padding: clamp(2.25rem, 5vw, 4.75rem); background: #f8fbfd; }
.login-theme-particles .login-form-content { position: relative; z-index: 1; width: min(100%, 430px); margin-inline: auto; }
.login-theme-particles .login-form-head { margin-bottom: 1.6rem; }
.login-theme-particles .login-product-mark { margin: 0 0 1.8rem; color: var(--cmc-navy); font-family: "Syne", "Trebuchet MS", sans-serif; font-size: clamp(2.2rem, 3vw, 2.75rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; text-align: center; }
.login-theme-particles .login-product-mark span { color: var(--cmc-blue); }
.login-theme-particles .login-form-head h1 { margin-bottom: .55rem; font-size: clamp(1.8rem, 2.4vw, 2.3rem); letter-spacing: -.04em; }
.login-theme-particles .login-form-head > p:last-child { color: #526a7d; font-size: .88rem; }
.login-theme-particles .login-welcome-brand { color: var(--cmc-navy); font-family: "Syne", "Trebuchet MS", sans-serif; font-size: .96em; font-weight: 700; letter-spacing: -.03em; }
.login-theme-particles .login-welcome-brand > span { color: var(--cmc-blue); }
.login-theme-particles .login-form { gap: 1rem; }
.login-theme-particles .login-field { gap: .5rem; }
.login-theme-particles .login-field .form-label { color: var(--cmc-navy); font-size: .76rem; font-weight: 700; }
.login-theme-particles .input-icon > i { left: 1rem; color: #58738a; font-size: 1rem; }
.login-theme-particles .input-icon .form-control { height: 56px; padding-left: 3rem; color: var(--cmc-ink); background: #fff; border: 1px solid #c5d8e5; border-radius: 12px; font-size: .92rem; box-shadow: 0 3px 12px rgba(0,39,87,.035); transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.login-theme-particles .input-icon .form-control:hover { border-color: #9dbdce; }
.login-theme-particles .input-icon .form-control:focus { background: #fff; border-color: var(--cmc-blue); box-shadow: 0 0 0 4px rgba(0,143,213,.12); }
.login-theme-particles .login-remember { width: fit-content; display: inline-flex; align-items: center; gap: .55rem; color: #526a7d; font-size: .76rem; font-weight: 650; cursor: pointer; user-select: none; }
.login-theme-particles .login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--cmc-blue-dark); cursor: pointer; }
.login-theme-particles .login-submit { min-height: 56px; display: flex; align-items: center; justify-content: space-between; margin-top: .35rem; padding-inline: 1.25rem; background: #1387e6 linear-gradient(145deg, #0864d9 0%, #1387e6 58%, #42a5ec 100%); background-size: 150% 150%; border-color: #1387e6; border-radius: 12px; box-shadow: 0 12px 24px rgba(8,100,217,.22); font-size: .9rem; transition: background-position .24s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.login-theme-particles .login-submit:hover { background-position: 100% 50%; border-color: #0864d9; box-shadow: 0 14px 26px rgba(8,100,217,.28); }
.login-theme-particles .login-submit i { transition: transform .18s ease; }
.login-theme-particles .login-submit:hover i { transform: translateX(3px); }
.login-theme-particles .login-divider { position: relative; display: flex; align-items: center; gap: .85rem; margin: 1.1rem 0; color: #71879a; font-size: .7rem; text-transform: lowercase; }
.login-theme-particles .login-divider::before, .login-theme-particles .login-divider::after { content: ""; height: 1px; flex: 1; background: #d8e4eb; }
.login-theme-particles .microsoft-login { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .8rem 1rem; color: var(--cmc-navy); background: #fff; border: 1px solid #bfd1dd; border-radius: 12px; font-size: .84rem; font-weight: 700; box-shadow: 0 3px 12px rgba(0,39,87,.035); transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.login-theme-particles .microsoft-login:hover { color: var(--cmc-blue-dark); background: #f3f9fc; border-color: #8eb9cf; box-shadow: 0 8px 18px rgba(0,39,87,.08); transform: translateY(-1px); }
.login-theme-particles .microsoft-login:active { transform: translateY(0); }
.login-theme-particles .microsoft-login svg { flex: 0 0 auto; }
.login-theme-particles .internal-login-form .demo-accounts { margin-top: 1.35rem; padding: .85rem 0 0; background: transparent; border: 0; border-top: 1px solid #d8e4eb; border-radius: 0; }
.login-theme-particles .internal-login-form .demo-accounts > strong { color: var(--danger); text-align: center; }
.login-theme-particles .internal-login-form .demo-accounts > div { width: min(100%, 300px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .65rem auto 0; }
.login-theme-particles .internal-login-form .demo-accounts a { justify-content: center; border-radius: 7px; }

@media (min-width: 992px) and (max-height: 760px) {
    .login-theme-particles .internal-login-form { padding-block: 2rem; }
    .login-theme-particles .login-product-mark { margin-bottom: 1.15rem; font-size: 2.2rem; }
    .login-theme-particles .login-form-head { margin-bottom: 1.15rem; }
    .login-theme-particles .login-form-head h1 { font-size: 1.85rem; }
    .login-theme-particles .login-form { gap: .8rem; }
    .login-theme-particles .input-icon .form-control, .login-theme-particles .login-submit { height: 52px; min-height: 52px; }
    .login-theme-particles .login-divider { margin-block: .75rem; }
    .login-theme-particles .microsoft-login { min-height: 50px; }
    .login-theme-particles .internal-login-form .demo-accounts { margin-top: .9rem; padding-top: .7rem; }
}

@media (max-width: 991.98px) {
    .login-theme-particles .internal-login-form { padding: clamp(1.5rem, 6vw, 2.75rem); }
    .login-theme-particles .login-product-mark { margin-bottom: 1.35rem; }
}

/* Hidden admin: login theme selector */
.login-theme-admin { max-width: 980px; margin: 0 auto; overflow: hidden; }
.login-theme-head, .login-theme-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; }
.login-theme-head { border-bottom: 1px solid var(--line); }
.login-theme-head h2, .login-theme-head p { margin: 0; }
.login-theme-head p { margin-top: .3rem; color: var(--muted); }
.login-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.25rem; }
.login-theme-option { position: relative; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s var(--ease); }
.login-theme-option:hover { border-color: var(--cmc-blue); box-shadow: var(--shadow); transform: translateY(-1px); }
.login-theme-option > input { position: absolute; opacity: 0; pointer-events: none; }
.login-theme-option:focus-within { border-color: var(--cmc-blue-dark); box-shadow: 0 0 0 3px rgba(0,143,213,.2); }
.login-theme-option:has(input:checked) { border-color: var(--cmc-blue); box-shadow: 0 0 0 3px rgba(0,143,213,.12); }
.login-theme-preview { position: relative; height: 190px; display: block; overflow: hidden; background: linear-gradient(180deg, #f8fdff, #82d5ee 48%, #35b0df); }
.theme-preview-eyes i { position: absolute; bottom: 0; display: block; }
.theme-preview-eyes i:nth-child(1) { left: 18%; width: 28%; height: 72%; background: #6c3ff5; }
.theme-preview-eyes i:nth-child(2) { left: 45%; width: 18%; height: 56%; background: #2d2d2d; }
.theme-preview-eyes i:nth-child(3) { left: 5%; width: 38%; height: 34%; background: #ff9b6b; border-radius: 999px 999px 0 0; }
.theme-preview-eyes i:nth-child(4) { left: 58%; width: 23%; height: 42%; background: #e8d754; border-radius: 999px 999px 0 0; }
.theme-preview-particles { background: linear-gradient(145deg, #0864d9, #1387e6 58%, #42a5ec); }
.theme-preview-particles::before { content: "AI  CMCU  SÁNG TẠO  AI NATIVE  CÔNG NGHỆ  CMCU  TRI THỨC"; position: absolute; z-index: 1; left: 50%; top: 50%; width: 72%; color: rgba(255,255,255,.76); font-size: .72rem; font-weight: 800; line-height: 1.5; text-align: center; transform: translate(-50%, -45%) rotate(-6deg); }
.theme-preview-particles::after { content: ""; position: absolute; inset: 22% 18%; z-index: 2; background: url('../img/cmc-university.svg') center / contain no-repeat; opacity: .18; filter: brightness(0) invert(1); }
.theme-preview-particles i { display: none; }
.theme-preview-empty { display: grid; place-items: center; color: #8ba4b4; background: var(--surface-soft); font-size: 2rem; }
.login-theme-copy { display: grid; gap: .25rem; padding: 1rem; }
.login-theme-copy strong { color: var(--cmc-navy); }
.login-theme-copy small { color: var(--muted); }
.login-theme-check { position: absolute; right: .75rem; top: .75rem; width: 28px; height: 28px; display: none; place-items: center; color: #fff; background: var(--cmc-blue-dark); border-radius: 50%; }
.login-theme-option:has(input:checked) .login-theme-check { display: grid; }
.login-theme-option.is-placeholder { cursor: default; opacity: .72; }
.login-theme-option.is-placeholder:hover { border-color: var(--line-strong); box-shadow: none; transform: none; }
.login-theme-actions { border-top: 1px solid var(--line); }

/* App shell */
.app-layout { min-height: 100dvh; background: var(--canvas); }
.app-sidebar { position: fixed; z-index: 1040; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; color: #c7d8e5; background: var(--cmc-navy); border-right: 1px solid rgba(255,255,255,.08); }
.sidebar-head { min-height: var(--topbar); display: flex; align-items: center; padding: 0 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand { color: #fff; }
.sidebar-brand img { width: 34px; height: 34px; filter: brightness(0) invert(1); }
.sidebar-brand span { font-size: .8rem; }
.sidebar-context { display: flex; align-items: center; gap: .7rem; margin: 1rem .8rem .8rem; padding: .75rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); }
.context-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--cmc-cyan); background: rgba(0,222,223,.1); border-radius: 6px; }
.sidebar-context small, .sidebar-context strong { display: block; }
.sidebar-context small { color: #8fabbe; font-size: .67rem; }
.sidebar-context strong { color: #fff; font-size: .78rem; }
.sidebar-nav { min-height: 0; flex: 1; overflow-y: auto; padding: .45rem .65rem; }
.sidebar-label { margin: .65rem .65rem; color: #9bb0c0; font-size: .68rem; font-weight: 750; }
.sidebar-link { min-height: 44px; display: flex; align-items: center; gap: .75rem; margin: .18rem 0; padding: .65rem .75rem; color: #b1c5d4; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 620; transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s var(--ease); }
.sidebar-link > i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.sidebar-link.active { color: #fff; background: #07518a; border-color: rgba(0,222,223,.25); }
.sidebar-link.active > i { color: var(--cmc-cyan); }
.sidebar-link em { margin-left: auto; min-width: 22px; padding: .16rem .35rem; text-align: center; color: var(--cmc-navy); background: var(--cmc-cyan); border-radius: 999px; font-size: .65rem; font-style: normal; font-weight: 800; }
.sidebar-footer { padding: .65rem; border-top: 1px solid rgba(255,255,255,.1); }
.app-main { min-height: 100dvh; margin-left: var(--sidebar); }
.app-topbar { position: sticky; top: 0; z-index: 1020; min-height: var(--topbar); display: flex; align-items: center; gap: 1rem; padding: .65rem 1.5rem; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.topbar-heading { flex: 0 1 auto; }
.topbar-context { color: var(--muted); font-size: .68rem; font-weight: 700; }
.topbar-title { margin: 0; font-size: 1.28rem; }
.topbar-route { min-width: 0; align-items: center; gap: .5rem; margin-left: 1rem; color: var(--muted); font-size: .72rem; }
.topbar-route strong { max-width: 240px; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.topbar-route > i:first-child { color: var(--cmc-blue); }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; background: var(--cmc-cyan); border: 2px solid #fff; border-radius: 50%; }
.user-chip { min-height: 44px; display: flex; align-items: center; gap: .55rem; padding: .25rem .6rem .25rem .25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { color: var(--cmc-navy); font-size: .75rem; }
.user-chip small { color: var(--muted); font-size: .66rem; }
.app-content { width: min(100%, 1660px); margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }

/* Approved route dashboards */
.route-dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 1rem; align-items: start; }
.journey-board, .rail-section, .panel-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.journey-board { min-width: 0; overflow: hidden; }
.route-board-head { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line); }
.route-board-head h2 { margin: 0; font-size: 1.35rem; }
.route-board-head p { margin: .18rem 0 0; color: var(--muted); }
.route-progress { display: flex; align-items: center; gap: .8rem; padding: .75rem 1.25rem; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.route-progress > span, .rail-progress { position: relative; height: 6px; overflow: hidden; background: #d5e5ec; border-radius: 999px; }
.route-progress > span { width: min(360px, 38%); }
.route-progress > span::after, .rail-progress > span { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--progress); background: var(--cmc-blue); border-radius: inherit; }
.route-progress p { margin: 0; color: var(--muted); font-size: .75rem; }
.route-progress strong { color: var(--cmc-navy); }
.route-track { position: relative; padding: 1rem 1.25rem 1.2rem; }
.route-track::before { content: ""; position: absolute; top: 2rem; bottom: 2.2rem; left: 43px; width: 2px; background: #cfe1e9; }
.route-stop { position: relative; min-height: 74px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: .8rem 0; }
.route-stop + .route-stop { border-top: 1px solid #edf2f5; }
.route-stop.is-active { margin: .25rem 0; padding: 1rem .9rem 1rem 0; background: #f8fcfe; border: 1px solid #8dd6e7; border-radius: var(--radius-sm); box-shadow: 0 10px 24px rgba(0, 110, 170, .08); }
.route-stop.is-active + .route-stop { border-top: 0; }
.route-marker { position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; margin-left: 1px; color: var(--cmc-blue-dark); background: #fff; border: 2px solid #a8c8d7; border-radius: 50%; }
.is-complete .route-marker { color: #fff; background: var(--cmc-blue); border-color: var(--cmc-blue); }
.is-active .route-marker { color: var(--cmc-navy); background: var(--cmc-cyan); border: 5px solid #d9ffff; box-shadow: 0 0 0 1px var(--cmc-cyan); }
.is-active .route-marker::after { content: ""; position: absolute; inset: -7px; border: 1px solid var(--cmc-cyan); border-radius: inherit; animation: route-signal 2.6s var(--ease) infinite; }
.is-locked .route-marker { color: #7f94a5; background: #edf3f6; border-color: #d7e3e9; }
.route-stop-copy { min-width: 0; }
.route-stop-copy small { color: var(--cmc-blue-dark); font-size: .68rem; font-weight: 750; }
.route-stop-copy h3 { margin: .12rem 0; font-size: .96rem; }
.route-stop-copy p { max-width: 72ch; margin: 0; overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.route-meta { display: block; margin-top: .4rem; color: #496b80; font-size: .7rem; }
.route-table-block { border-top: 1px solid var(--line); }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; }
.section-title-row h2, .section-title-row h3 { margin: 0; font-size: 1.05rem; }
.section-title-row p { margin: .15rem 0 0; color: var(--muted); font-size: .75rem; }
.section-title-row > a { color: var(--cmc-blue-dark); font-weight: 700; }
.route-table { border-top: 1px solid var(--line); }
.route-table-row { display: grid; grid-template-columns: 40px minmax(180px, 1.4fr) minmax(130px, .9fr) minmax(120px, .8fr) minmax(100px, .7fr) 20px; gap: .75rem; align-items: center; padding: .75rem 1.25rem; border-bottom: 1px solid #edf2f5; transition: background-color .18s ease; }
.route-table-row:hover { background: #f3f9fc; }
.route-table-row:last-child { border-bottom: 0; }
.route-table-row > span:not(.route-item-icon) { min-width: 0; }
.route-table-row small, .route-table-row strong { display: block; }
.route-table-row small { margin-bottom: .12rem; color: var(--subtle); font-size: .64rem; }
.route-table-row strong { overflow: hidden; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.route-item-icon, .metric-icon, .campaign-icon, .link-icon, .transaction-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; color: var(--cmc-blue-dark); background: var(--surface-soft); border-radius: var(--radius-sm); }
.status-rail { display: grid; gap: 1rem; }
.rail-section { overflow: hidden; }
.rail-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.rail-heading h2 { margin: 0; font-size: .92rem; }
.rail-heading > span:not(.status-label) { color: var(--cmc-blue-dark); font-size: 1rem; font-weight: 800; }
.rail-heading a { color: var(--cmc-blue-dark); font-size: .7rem; font-weight: 700; }
.rail-progress { height: 6px; margin: 1rem 1rem 0; }
.rail-stats { display: grid; grid-template-columns: 1fr 1fr; margin: .8rem 0 0; }
.rail-stats div { padding: .85rem 1rem; border-top: 1px solid var(--line); }
.rail-stats div:nth-child(odd) { border-right: 1px solid var(--line); }
.rail-stats dt { color: var(--muted); font-size: .68rem; font-weight: 600; }
.rail-stats dd { margin: .15rem 0 0; color: var(--cmc-navy); font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rail-key-number, .priority-number { padding: 1rem; }
.rail-key-number strong, .rail-key-number span, .priority-number strong, .priority-number span { display: block; }
.rail-key-number strong, .priority-number strong { color: var(--cmc-blue-dark); font-size: 2rem; font-variant-numeric: tabular-nums; }
.rail-key-number span, .priority-number span { color: var(--muted); }
.rail-list { padding: 0 1rem; }
.rail-list p { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: .65rem 0; border-top: 1px solid var(--line); color: var(--muted); }
.rail-list strong { color: var(--cmc-navy); font-variant-numeric: tabular-nums; }
.rail-link { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-top: 1px solid var(--line); }
.rail-section > .btn { margin: .9rem 1rem 1rem; width: calc(100% - 2rem) !important; }
.rail-transactions { padding: 0 .9rem .5rem; }
.rail-transactions > div { display: flex; align-items: center; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.rail-transactions p { min-width: 0; flex: 1; margin: 0; }
.rail-transactions strong, .rail-transactions small { display: block; }
.rail-transactions strong { overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.rail-transactions small { color: var(--muted); }
.positive { color: var(--success) !important; } .negative { color: var(--danger) !important; }

@keyframes route-signal {
    0%, 100% { opacity: .55; transform: scale(.86); }
    55% { opacity: 0; transform: scale(1.32); }
}
.section-block { margin-top: 1rem; }
.panel-card { padding: 1.1rem; }
.panel-card .section-title-row { padding: 0 0 1rem; }
.leaderboard-list { border-top: 1px solid var(--line); }
.leaderboard-row { display: flex; align-items: center; gap: .7rem; padding: .75rem .25rem; border-bottom: 1px solid var(--line); }
.leaderboard-row:last-child { border-bottom: 0; }
.leaderboard-row.is-me { background: #f0f9fc; }
.rank-number { width: 28px; text-align: center; color: var(--cmc-blue-dark); font-weight: 800; }
.leaderboard-row p { min-width: 0; flex: 1; margin: 0; }
.leaderboard-row strong, .leaderboard-row small { display: block; }
.leaderboard-row small { color: var(--muted); }
.leaderboard-row > b { font-variant-numeric: tabular-nums; }

/* Admin operations map */
.operations-summary { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.operations-summary > div { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-right: 1px solid var(--line); }
.operations-summary > div:last-child { border-right: 0; }
.operations-summary p { margin: 0; }
.operations-summary small, .operations-summary strong { display: block; }
.operations-summary small { color: var(--muted); font-size: .68rem; }
.operations-summary strong { color: var(--cmc-navy); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.ops-map { padding: .75rem 1rem 1rem; }
.ops-route-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 30px; gap: .75rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ops-route-row:last-child { border-bottom: 0; }
.ops-route-row > header { display: flex; align-items: center; gap: .6rem; }
.ops-route-row > header strong, .ops-route-row > header small { display: block; }
.ops-route-row > header small { color: var(--muted); font-size: .66rem; }
.ops-route-flow { display: grid; grid-template-columns: minmax(110px, 1fr) 20px minmax(110px, 1fr) 20px minmax(110px, 1fr); gap: .35rem; align-items: center; }
.ops-route-flow > i { color: #91abba; text-align: center; }
.ops-node { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .65rem; color: #49687c; background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; font-size: .7rem; }
.ops-node b { color: var(--cmc-navy); font-variant-numeric: tabular-nums; }
.ops-node.is-complete { background: #f1f7f9; }
.ops-node.is-active { color: var(--cmc-navy); background: #eaf9fc; border-color: #7fd4e5; }
.operations-table { margin: 0; }
.table-action { width: 32px; height: 32px; display: grid; place-items: center; color: var(--cmc-blue-dark); border: 1px solid var(--line); border-radius: 6px; }

/* Shared legacy product surfaces */
.page-intro, .page-actions, .panel-head, .campaign-top, .campaign-meta, .campaign-stats, .link-card-head, .wallet-card-top, .wallet-card-bottom, .summary-pills, .copilot-actions, .copilot-result-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-intro { margin-bottom: 1rem; }
.page-intro h2, .page-intro h1 { margin: 0; }
.page-intro p { margin: .2rem 0 0; color: var(--muted); }
.panel-head { margin-bottom: 1rem; }
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-chip { padding: .3rem .5rem; color: #006d73; background: #e5fafa; border-radius: 6px; font-size: .7rem; }
.metric-grid { margin-bottom: 1rem; }
.metric-card, .campaign-card, .mission-card, .link-card, .submission-card, .wallet-summary article, .conversation-list, .inbox-shell, .moderation-shell, .copilot-workspace, .copilot-intro, .reward-overview { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.metric-card { min-height: 108px; display: flex; align-items: center; gap: .8rem; padding: 1rem; }
.metric-card p, .metric-card h3, .metric-card small { margin: 0; }
.metric-card h3 { font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--muted); }
.metric-icon.coral, .metric-icon.violet, .metric-icon.blue, .metric-icon.green { color: var(--cmc-blue-dark); background: var(--surface-soft); }
.campaign-card, .link-card { height: 100%; padding: 1.1rem; }
.campaign-top { align-items: flex-start; }
.campaign-card h3 { margin: .8rem 0 .4rem; font-size: 1rem; }
.campaign-card > p { color: var(--muted); }
.campaign-meta, .campaign-stats { padding-top: .8rem; border-top: 1px solid var(--line); }
.campaign-meta span, .campaign-stats span { color: var(--muted); }
.brief-box, .conversion-box, .copy-field, .profile-fact, .helper-note, .feedback-box { padding: .75rem; background: var(--surface-soft); border-radius: var(--radius-sm); }
.segmented { display: flex; width: fit-content; gap: .25rem; padding: .25rem; overflow-x: auto; background: #e6eef2; border-radius: var(--radius-sm); }
.segmented a { padding: .45rem .65rem; white-space: nowrap; border-radius: 6px; }
.segmented a.active { color: #fff; background: var(--cmc-navy); }
.mission-layout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.mission-card { height: 100%; overflow: hidden; }
.mission-visual { min-height: 130px; display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: var(--surface-soft); }
.mission-visual > span { width: 48px; height: 48px; display: grid; place-items: center; color: var(--cmc-blue-dark); background: #fff; border-radius: var(--radius-sm); font-size: 1.2rem; }
.mission-visual em { color: var(--muted); font-size: .7rem; font-style: normal; }
.mission-body { padding: 1rem; }
.deadline { color: var(--cmc-blue-dark); font-size: .7rem; }
.mission-body h3 { margin: .5rem 0; font-size: 1rem; }
.mission-body > p { color: var(--muted); }
.mission-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.mission-footer strong { color: var(--cmc-blue-dark); }
.clean-table { margin: 0; color: var(--ink); }
.clean-table th { padding: .7rem; color: var(--muted); background: #f4f8fa; border-bottom-color: var(--line-strong); font-size: .68rem; white-space: nowrap; }
.clean-table td { padding: .75rem .7rem; vertical-align: middle; border-bottom-color: var(--line); }
.person-cell { display: flex; align-items: center; gap: .55rem; white-space: nowrap; }
.ranking-list { display: grid; }
.ranking-item { display: flex; align-items: center; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ranking-item:last-child { border-bottom: 0; }
.ranking-item > b { width: 22px; color: var(--cmc-blue-dark); }
.ranking-item > div { min-width: 0; flex: 1; }
.ranking-item strong, .ranking-item small { display: block; }
.ranking-item small { color: var(--muted); font-size: .67rem; }
.ranking-item p { margin: 0; text-align: right; }
.compact-ranking { padding: 0 .9rem .4rem; }
.transaction-list > div, .reward-list > div, .available-links form { display: flex; align-items: center; gap: .7rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.transaction-list p, .reward-list p { min-width: 0; flex: 1; margin: 0; }
.transaction-list strong, .transaction-list small, .reward-list strong, .reward-list small { display: block; }
.transaction-list small, .reward-list small { color: var(--muted); }
.submission-card { height: 100%; display: grid; grid-template-columns: 140px 1fr; overflow: hidden; }
.submission-thumb { min-height: 220px; display: grid; place-content: center; gap: .5rem; text-align: center; color: #fff; background: var(--cmc-navy); }
.submission-content { padding: 1rem; }
.submission-meta { display: flex; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.blog-submission-note { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; color: var(--cmc-blue-dark); background: var(--surface-soft); border-radius: var(--radius-sm); font-size: .72rem; font-weight: 700; }
.blog-submission-note i { color: var(--cmc-blue); font-size: .9rem; }
.review-blog-body { max-height: 260px; overflow-y: auto; white-space: pre-line; }
.wallet-grid { display: grid; grid-template-columns: minmax(320px, 1.2fr) 1fr; gap: 1rem; }
.wallet-card { min-height: 210px; padding: 1.5rem; color: #fff; background: var(--cmc-navy); border-radius: var(--radius); }
.wallet-card h2 { margin: 1.4rem 0; color: #fff; font-size: 2.4rem; }
.wallet-summary { display: grid; gap: 1rem; }
.wallet-summary article { display: flex; align-items: center; gap: .8rem; padding: 1rem; }
.copy-field { display: flex; gap: .5rem; }
.copy-field input { min-width: 0; flex: 1; background: transparent; border: 0; }
.copy-field button { color: #fff; background: var(--cmc-navy); border: 0; border-radius: 6px; }
.link-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.link-stats div { padding: .7rem; text-align: center; border-right: 1px solid var(--line); }
.link-stats div:last-child { border-right: 0; }
.link-stats span, .link-stats strong { display: block; }
.link-stats span { color: var(--muted); font-size: .68rem; }

/* Inbox and moderation */
.inbox-shell { min-height: 620px; display: grid; grid-template-columns: 270px minmax(360px, 1fr) 230px; overflow: hidden; }
.inbox-list, .conversation-list { overflow-y: auto; border-right: 1px solid var(--line); }
.inbox-list-head, .conversation-list-head { padding: 1rem; border-bottom: 1px solid var(--line); }
.inbox-search { position: relative; margin: .75rem; }
.inbox-search i { position: absolute; left: .7rem; top: 50%; color: var(--muted); transform: translateY(-50%); }
.inbox-search input { width: 100%; height: 40px; padding-left: 2.1rem; background: var(--surface-soft); border: 0; border-radius: var(--radius-sm); }
.inbox-row, .conversation-row { display: flex; align-items: center; gap: .6rem; padding: .75rem; border-bottom: 1px solid var(--line); }
.inbox-row:hover, .inbox-row.active, .conversation-row:hover, .conversation-row.active { background: #eef8fc; }
.inbox-row > div, .conversation-row > div { min-width: 0; flex: 1; }
.inbox-row strong, .inbox-row small, .conversation-row strong, .conversation-row small { display: block; }
.inbox-row small, .conversation-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.inbox-room { min-width: 0; display: flex; flex-direction: column; }
.inbox-room-head { min-height: 64px; display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.inbox-room-head > div { min-width: 0; flex: 1; }
.inbox-profile { padding: 1.25rem; text-align: center; border-left: 1px solid var(--line); }
.profile-fact { display: flex; align-items: center; gap: .6rem; margin: 1rem 0; text-align: left; }
.conversation-tips { padding-top: 1rem; text-align: left; border-top: 1px solid var(--line); }
.moderation-shell { min-height: 620px; display: grid; grid-template-columns: 250px minmax(0, 1fr); overflow: hidden; }
.moderation-chat { display: flex; flex-direction: column; min-width: 0; }
.moderation-messages { flex: 1; overflow-y: auto; padding: 1rem; background: var(--canvas); }
.moderation-message { max-width: 76%; margin-bottom: .8rem; padding: .7rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* Copilot and rewards */
.copilot-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; }
.copilot-intro { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem; color: #fff; background: var(--cmc-navy); }
.copilot-intro h2 { color: #fff; }
.copilot-mark { width: 46px; height: 46px; display: grid; place-items: center; color: var(--cmc-cyan); background: rgba(0,222,223,.1); border-radius: var(--radius-sm); }
.copilot-workspace { overflow: hidden; }
.copilot-form, .copilot-result { display: grid; gap: 1rem; padding: 1.25rem; }
.copilot-form { border-bottom: 1px solid var(--line); }
.copilot-result.empty { min-height: 260px; place-content: center; text-align: center; color: var(--muted); }
.direction-list { display: grid; gap: .75rem; }
.direction-card { display: grid; grid-template-columns: 46px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.direction-index { display: grid; place-items: start center; padding-top: 1rem; color: var(--cmc-blue-dark); background: var(--surface-soft); font-weight: 800; }
.direction-content { padding: 1rem; }
.direction-content blockquote { margin: .7rem 0; padding: .75rem; background: var(--surface-soft); border-radius: 6px; }
.copilot-side { display: grid; gap: 1rem; align-content: start; }
.copilot-side .panel-card { padding: 1rem; }
.copilot-checklist p { display: grid; grid-template-columns: 20px 1fr; gap: .5rem; }
.copilot-loading { min-height: 180px; display: grid; gap: .5rem; align-content: center; }
.copilot-loading span { height: 8px; background: #dce9ee; border-radius: 4px; }
.reward-overview { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: 1.5rem; color: #fff; background: var(--cmc-navy); }
.reward-overview h2 { color: #fff; }
.reward-formula { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.reward-formula span, .reward-formula strong { padding: .5rem .65rem; background: rgba(255,255,255,.1); border-radius: 6px; }

.toast-container { z-index: 1090; }
.toast { border-radius: var(--radius-sm); }

@media (max-width: 1279.98px) {
    .route-dashboard { grid-template-columns: minmax(0, 1fr) 272px; }
    .route-table-row { grid-template-columns: 40px minmax(170px, 1.4fr) minmax(120px, .9fr) minmax(110px, .8fr) 20px; }
    .route-table-row > span:nth-child(5) { display: none; }
    .inbox-shell { grid-template-columns: 250px minmax(340px, 1fr); }
    .inbox-profile { display: none; }
}

@media (max-width: 1199.98px) {
    .app-sidebar { visibility: hidden; transform: translateX(-102%); transition: transform .22s var(--ease), visibility 0s linear .22s; }
    .app-sidebar.open { visibility: visible; transform: translateX(0); transition-delay: 0s; }
    .sidebar-overlay.open { position: fixed; z-index: 1035; inset: 0; display: block; background: rgba(0,39,87,.52); }
    .app-main { margin-left: 0; }
}

@media (max-width: 991.98px) {
    :root { --sidebar: 244px; }
    .route-dashboard { grid-template-columns: 1fr; }
    .status-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .route-dashboard-admin .status-rail { grid-template-columns: 1fr 1fr; }
    .route-dashboard-admin .status-rail > :first-child { grid-column: 1 / -1; }
    .cmc-hero-grid { grid-template-columns: 1fr; }
    .cmc-hero-art { min-height: 420px; }
    .cmc-hero-art img { min-height: 420px; }
    .cmc-proof-grid { grid-template-columns: 1fr 1fr; }
    .cmc-capability-grid { grid-template-columns: 1fr; }
    .cmc-capability-grid article:first-child { grid-row: auto; }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .filter-search { grid-column: 1 / -1; }
    .internal-login-panel { grid-template-columns: 1fr; }
    .internal-login-visual { display: none; }
    .login-theme-particles .login-mobile-brand { display: block; margin-bottom: 2.5rem; }
    .login-theme-particles .login-mobile-brand img { width: 176px; }
    .mission-layout { grid-template-columns: 1fr 1fr; }
    .wallet-grid { grid-template-columns: 1fr; }
    .moderation-shell { grid-template-columns: 220px 1fr; }
    .copilot-layout { grid-template-columns: 1fr; }
    .copilot-side { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767.98px) {
    body { font-size: 13px; }
    .app-topbar { min-height: 68px; padding: .55rem .85rem; }
    .topbar-title { max-width: 220px; overflow: hidden; font-size: 1.08rem; text-overflow: ellipsis; white-space: nowrap; }
    .app-content { padding: .85rem .75rem 2rem; }
    .route-board-head { align-items: flex-start; padding: 1rem; }
    .route-board-head .btn { min-width: 42px; padding: .65rem; }
    .route-board-head .btn { font-size: 0; }
    .route-board-head .btn i { font-size: 1rem; }
    .route-progress { align-items: flex-start; flex-direction: column; padding: .75rem 1rem; }
    .route-progress > span { width: 100%; }
    .route-track { padding: .75rem 1rem 1rem; }
    .route-track::before { left: 31px; }
    .route-stop { grid-template-columns: 34px minmax(0, 1fr); gap: .6rem; }
    .route-stop > :last-child:not(.route-stop-copy) { grid-column: 2; justify-self: start; }
    .route-stop.is-active { padding: .85rem .75rem .85rem 0; }
    .route-stop-copy p { white-space: normal; }
    .section-title-row { align-items: flex-start; padding: .85rem 1rem; }
    .route-table-row { grid-template-columns: 34px minmax(0, 1fr) 16px; padding: .75rem 1rem; }
    .route-table-row > span:nth-child(n+3) { display: none; }
    .status-rail, .route-dashboard-admin .status-rail { grid-template-columns: 1fr; }
    .route-dashboard-admin .status-rail > :first-child { grid-column: auto; }
    .operations-summary { grid-template-columns: 1fr 1fr; }
    .operations-summary > div:nth-child(2) { border-right: 0; }
    .operations-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .ops-route-row { grid-template-columns: 1fr 28px; }
    .ops-route-row > header { grid-column: 1; }
    .ops-route-flow { grid-column: 1 / -1; grid-template-columns: 1fr; padding-left: 44px; }
    .ops-route-flow > i { transform: rotate(90deg); }
    .ops-route-row > a { grid-column: 2; grid-row: 1; }
    .operations-table th:nth-child(2), .operations-table td:nth-child(2), .operations-table th:nth-child(4), .operations-table td:nth-child(4) { display: none; }
    .leaderboard-row > b { font-size: .72rem; }
    .cmc-hero { padding: 54px 0 64px; }
    .cmc-hero-copy h1 { font-size: 2.75rem; }
    .cmc-hero-art { min-height: 340px; }
    .cmc-hero-art img { min-height: 340px; }
    .cmc-proof-grid, .cmc-story-grid, .cmc-steps { grid-template-columns: 1fr; }
    .proof-statement, .cmc-proof-grid > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
    .section-space { padding: 64px 0; }
    .cta-card { align-items: flex-start; flex-direction: column; padding: 1.5rem; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-search { grid-column: auto; }
    .directory-section { margin-top: -18px; }
    .internal-login-form { padding: 1.5rem; }
    .login-mobile-brand { display: block; margin-bottom: 2.5rem; }
    .login-mobile-brand img { width: 176px; }
    .mission-layout { grid-template-columns: 1fr; }
    .submission-card { grid-template-columns: 1fr; }
    .submission-thumb { min-height: 120px; }
    .inbox-shell { min-height: 700px; grid-template-columns: 1fr; }
    .inbox-list { max-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
    .inbox-room { min-height: 430px; }
    .moderation-shell { grid-template-columns: 1fr; }
    .conversation-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
    .copilot-side { grid-template-columns: 1fr; }
    .reward-overview { align-items: flex-start; flex-direction: column; }
    .reward-formula { justify-content: flex-start; }
    .page-actions, .page-intro { align-items: flex-start; flex-direction: column; }
    .login-theme-head, .login-theme-actions { align-items: flex-start; flex-direction: column; }
    .login-theme-grid { grid-template-columns: 1fr; }
}

@media (max-width: 479.98px) {
    .topbar-actions .icon-btn { display: none; }
    .user-chip { padding-right: .25rem; }
    .user-chip > span:last-child { display: none; }
    .rail-stats { grid-template-columns: 1fr 1fr; }
    .operations-summary { grid-template-columns: 1fr; }
    .operations-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .operations-summary > div:last-child { border-bottom: 0; }
    .cmc-hero-copy h1 { font-size: 2.35rem; }
    .cmc-hero-art { display: none; }
    .hero-actions .btn { width: 100%; }
    .public-nav .navbar-collapse { padding: .75rem 0 1rem; }
    .wallet-card h2 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .internal-login-visual { cursor: default; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
