/* ===== App shell ===== */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--topbar-h) 1fr var(--statusbar-h); height: calc(100vh - var(--notice-h)); transition: grid-template-columns var(--dur-base) var(--ease-out); }
.shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

.sidebar { grid-row: 1 / 3; background: var(--bg-surface); border-right: 1px solid var(--border-subtle); display: flex; flex-direction: column; overflow: hidden; }
.brand { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 4px 16px 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--border-subtle); flex: none; }
.brand:hover, .brand:focus { text-decoration: none; }
.brand .name { font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; min-width: 0; }
/* FE-003: the logo is the V+R mark (assets/vre-mark.png) followed by the product name as text */
.brand-lockup { display: flex; align-items: center; gap: 0.42em; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; color: #fff; }
.brand-lockup img { display: block; height: 1.12em; width: auto; flex: none; }
.brand-lockup .edge { color: var(--accent); }
.brand .name small { margin-top: 4px; line-height: 12px; }
.brand .brand-mark { display: none; width: 30px; height: 30px; object-fit: contain; flex: none; }
.shell.collapsed .brand .brand-mark { display: block; }
.brand .name small { display: block; font-size: 10px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.shell.collapsed .brand .name { display: none; }
.shell.collapsed .brand { justify-content: center; padding: 0; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav .group { margin: 10px 8px 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-disabled); white-space: nowrap; }
.shell.collapsed .nav .group { height: 1px; background: var(--border-subtle); margin: 8px 6px; font-size: 0; }
.nav a { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; position: relative; transition: background var(--dur-fast), color var(--dur-fast); text-decoration: none; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.nav a.on { background: var(--primary-soft); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a .badge { margin-left: auto; }
.shell.collapsed .nav a { justify-content: center; padding: 0; }
.shell.collapsed .nav a span { display: none; }
.shell.collapsed .nav a .badge { position: absolute; top: 4px; right: 4px; margin: 0; }
.nav .dyn { position: relative; }
.nav .dyn::after { content: "◇"; margin-left: auto; font-size: 9px; color: var(--accent); opacity: 0.7; }
.shell.collapsed .nav .dyn::after { display: none; }

.sidebar-foot { padding: 10px; border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 6px; }
.partner { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: var(--bg-app); border: 1px dashed var(--border-default); font-size: 10px; color: var(--text-disabled); white-space: nowrap; }
.partner .plogo { width: 22px; height: 22px; object-fit: contain; flex: none; }
.shell.collapsed .partner span { display: none; }
.shell.collapsed .partner { justify-content: center; padding: 8px 0; }
.shell { position: relative; }
.sb-toggle { position: absolute; z-index: 30; top: calc(var(--topbar-h) / 2 - 12px); left: calc(var(--sidebar-w) - 12px); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: var(--shadow-sm); transition: left var(--dur-base) var(--ease-out), color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast); }
.sb-toggle:hover { color: var(--text-primary); border-color: var(--primary); background: var(--primary-soft); }
.sb-toggle svg.ic { width: 14px; height: 14px; transition: transform var(--dur-base); }
.shell.collapsed .sb-toggle { left: calc(var(--sidebar-w-collapsed) - 12px); }
.shell.collapsed .sb-toggle svg.ic { transform: rotate(180deg); }
.pw-rules { display: flex; flex-direction: column; gap: 4px; }
.pw-rule { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.pw-rule svg.ic { width: 13px; height: 13px; }
.pw-rule.ok { color: var(--success); }
.hint.success { color: var(--success); } .hint.danger { color: var(--danger); }

.topbar { grid-column: 2; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-app); }
.topbar .search { flex: 1; max-width: 560px; }
.topbar .search .input-wrap .input { background: var(--bg-surface); height: 36px; }
.topbar .search .kbd { position: absolute; right: 10px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-menu { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; position: relative; }
.user-menu:hover { background: var(--bg-hover); }
.user-menu > div:not(.dropdown) { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.user-menu .n { font-size: var(--fs-xs); font-weight: 700; line-height: 1.15; }
.user-menu .r { font-size: 10px; color: var(--text-muted); }
.topbar .btn.icon { position: relative; }
.topbar .btn.icon .badge { position: absolute; top: -4px; right: -4px; }

.content { grid-column: 2; overflow: auto; padding: 24px 28px 32px; position: relative; min-width: 0; }
.content > .page { max-width: var(--content-max); margin: 0 auto; animation: fadeUp var(--dur-slow) var(--ease-out) both; }

.statusbar { grid-column: 1 / 3; display: flex; align-items: center; gap: 18px; padding: 0 16px; background: var(--bg-surface); border-top: 1px solid var(--border-subtle); font-size: 11px; color: var(--text-muted); font-weight: 600; }
.statusbar .item { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.statusbar .item b { color: var(--text-secondary); font-weight: 700; }
.statusbar .item.clickable { cursor: pointer; }
.statusbar .item.clickable:hover { color: var(--text-primary); }
.statusbar .spacer { flex: 1; }
.statusbar .item.danger, .statusbar .item.danger b { color: var(--danger); }
.statusbar .item.warning, .statusbar .item.warning b { color: var(--warning); }
.statusbar .item svg { width: 12px; height: 12px; }

/* ===== Command palette ===== */
.palette-overlay { position: fixed; inset: 0; z-index: 120; background: var(--bg-overlay); backdrop-filter: blur(4px); display: flex; justify-content: center; padding-top: 12vh; animation: fadeIn var(--dur-fast) both; }
.palette { width: min(680px, 92vw); max-height: 60vh; background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: scaleIn var(--dur-base) var(--ease-out) both; align-self: flex-start; }
.palette .in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); }
.palette .in svg { width: 20px; height: 20px; color: var(--accent); }
.palette .in input { flex: 1; background: transparent; border: none; outline: none; font-size: var(--fs-lg); color: var(--text-primary); }
.palette .list { overflow: auto; padding: 8px; }
.palette .grp { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-disabled); font-weight: 800; padding: 8px 10px 4px; }
.palette .it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: var(--fs-sm); }
.palette .it svg { width: 16px; height: 16px; color: var(--text-muted); }
.palette .it .lb { min-width: 0; overflow-wrap: anywhere; }
.palette .it .pill { margin-left: auto; flex: none; }
.palette .pal-none { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 24px 12px; font-size: var(--fs-sm); color: var(--text-muted); }
.palette .pal-none b { color: var(--text-primary); }
.palette .foot .kbd { font-size: 10px; }
.sc-keys dt { display: flex; gap: 4px; align-items: center; }
.palette .it.on, .palette .it:hover { background: var(--primary-soft); }
.palette .foot { display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--border-subtle); font-size: 11px; color: var(--text-disabled); }

/* ===== Alert drawer ===== */
.alert-group { margin-bottom: 10px; }
.alert-group-h { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); margin: 6px 0 6px; }
.alert-group-h.sev-critical { color: #FCA5A5; } .alert-group-h.sev-warning { color: #FCD34D; } .alert-group-h.sev-info { color: #67E8F9; }
.alert-item { color: var(--text-primary); text-decoration: none; cursor: pointer; align-items: center; display: flex; gap: 10px; padding: 10px 8px 10px 14px; border-radius: var(--r-md); border: 1px solid var(--border-subtle); background: var(--bg-surface); margin-bottom: 6px; position: relative; transition: background var(--dur-fast), border-color var(--dur-fast), opacity var(--dur-fast); }
.alert-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--border-strong); }
.alert-item.sev-critical::before { background: var(--danger); } .alert-item.sev-warning::before { background: var(--warning); } .alert-item.sev-info::before { background: var(--accent); }
.alert-item:hover { background: var(--bg-elevated); border-color: var(--border-default); }
.alert-item .aicon { display: flex; flex: none; align-self: flex-start; padding-top: 1px; }
.alert-item .grow { min-width: 0; }
.alert-item .t { overflow-wrap: anywhere; }
.alert-item .go { display: flex; flex: none; color: var(--text-disabled); }
.alert-item .go svg.ic { width: 14px; height: 14px; }
.alert-item:hover .go { color: var(--text-primary); }
.alert-item .aicon svg, .alert-item .aicon svg.ic { width: 15px; height: 15px; }
.alert-item.sev-critical .aicon { color: #F87171; }
.alert-item.sev-warning .aicon { color: #FBBF24; }
.alert-item.sev-info .aicon { color: #22D3EE; }
.alert-item .t { font-weight: 600; font-size: 13px; line-height: 1.3; }
.alert-item .meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; flex-wrap: wrap; display: flex; gap: 8px; align-items: center; }
.alert-item .meta .tag { background: var(--bg-elevated); color: var(--text-muted); border-radius: 999px; padding: 1px 7px; }
.alert-item.st-acked, .alert-item.st-snoozed { opacity: 0.6; }
.alert-item.st-acked:hover, .alert-item.st-snoozed:hover { opacity: 1; }

/* ===== Auth layout ===== */
.auth { min-height: calc(100vh - var(--notice-h)); display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 20% 10%, rgba(2,116,254,0.25), transparent 60%), radial-gradient(900px 500px at 80% 90%, rgba(43,211,224,0.18), transparent 60%), var(--bg-app); display: flex; flex-direction: column; justify-content: space-between; padding: 48px; }
.auth-art .brandline { display: flex; align-items: center; gap: 14px; }
.auth-art .brandline .brand-lockup { font-size: 30px; }
.ic-box .vre-mark { width: 62%; height: 62%; object-fit: contain; }
.auth-art h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; max-width: 520px; }
.auth-art h1 span { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p.lead { color: var(--text-muted); font-size: var(--fs-lg); max-width: 480px; margin-top: 14px; }
.auth-art .flowwrap { height: 200px; margin: 24px 0 8px; }
.auth-art .flow { width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.auth-art .flow path { fill: none; stroke-width: 1.5; stroke-dasharray: 6 10; animation: flowDash 1.6s linear infinite; }
.auth-art .flow .n { fill: var(--bg-elevated); stroke: var(--border-strong); }
.auth-art .flow text { font-family: var(--font-mono); font-size: 11px; fill: var(--text-muted); }
.auth-art .partner-row { display: flex; align-items: center; gap: 14px; color: var(--text-disabled); font-size: var(--fs-xs); }
.auth-art .partner-row .plogo { width: 40px; height: 40px; object-fit: contain; flex: none; padding: 6px; border-radius: 10px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.auth-art .partner-row b { color: var(--text-muted); font-weight: 600; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg-surface); border-left: 1px solid var(--border-subtle); }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; animation: fadeUp var(--dur-slow) var(--ease-out) both; }
.auth-card h2 { font-size: 26px; }
.auth-card .sub { color: var(--text-muted); }
.remember { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); cursor: pointer; }
.auth-foot { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-disabled); display: flex; justify-content: space-between; }
.core-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: var(--bg-app); border: 1px solid var(--border-subtle); font-size: var(--fs-xs); color: var(--text-muted); font-family: var(--font-mono); }

/* ===== Wizard layout ===== */
.wizard { height: calc(100vh - var(--notice-h)); display: grid; grid-template-columns: 300px 1fr; background: var(--bg-app); }
.wizard-side { background: var(--bg-surface); border-right: 1px solid var(--border-subtle); padding: 28px 22px; display: flex; flex-direction: column; gap: 24px; }
.wizard-main { display: flex; flex-direction: column; overflow: hidden; }
.wizard-body { flex: 1; overflow: auto; padding: 44px 56px; }
.wizard-body .inner { max-width: 820px; margin: 0 auto; animation: fadeUp var(--dur-slow) var(--ease-out) both; }
.wizard-body h1 { font-size: 28px; }
.wizard-body .lead { color: var(--text-muted); margin: 8px 0 28px; font-size: var(--fs-lg); }
.wizard-foot { padding: 16px 56px; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; background: var(--bg-surface); }
.wizard-foot .progress { width: 220px; }

/* ===== Scenario guide ===== */
.scenario { position: fixed; right: 20px; bottom: 44px; width: 360px; background: var(--bg-elevated); border: 1px solid rgba(43,211,224,0.4); border-radius: var(--r-xl); box-shadow: var(--shadow-lg), var(--glow-accent); z-index: 150; display: flex; flex-direction: column; animation: fadeUp var(--dur-base) var(--ease-out) both; overflow: hidden; }
.scenario.min { width: auto; max-width: 360px; } .scenario.min .hd { padding: 10px 14px; }
.scenario .hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(90deg, rgba(2,116,254,0.2), rgba(43,211,224,0.12)); border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
.scenario .hd .t { font-weight: 800; font-size: var(--fs-sm); }
.scenario .hd .p { font-size: 11px; color: var(--text-muted); }
.scenario .bd { padding: 14px; max-height: 50vh; overflow: auto; }
.scenario .st { display: flex; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: var(--fs-sm); color: var(--text-muted); align-items: flex-start; }
.scenario .st .n { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.scenario .st.done .n { background: var(--success); border-color: var(--success); color: #052e16; }
.scenario .st.on { background: var(--primary-soft); color: var(--text-primary); }
.scenario .st.on .n { background: var(--primary); border-color: var(--primary); color: #fff; }
.scenario .st .d { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.scenario .ft { padding: 10px 14px; border-top: 1px solid var(--border-subtle); display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.scenario-launch { position: fixed; right: 20px; bottom: 44px; z-index: 80; }

/* ===== Dev toolbar (mock only) ===== */
/* One Mock button: in the status bar (signed in) or in the bottom-left corner of the sign-in pages. Covers no content. */
.devbar-btn { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px dashed var(--border-strong); background: transparent; color: var(--text-muted); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.devbar-btn svg.ic { width: 11px; height: 11px; }
.devbar-btn:hover, .devbar-btn[aria-expanded="true"] { color: var(--text-primary); border-color: var(--primary); background: var(--primary-soft); }
.devbar-btn.floating { position: fixed; left: 12px; bottom: 12px; z-index: 85; height: 24px; background: var(--bg-surface); }

/* License read-only: visible but passive (D5). */
.ro-off { opacity: 0.45; cursor: not-allowed !important; }
.ro-off:hover { filter: none; }

/* The setup guide floats over the page and keeps its full width (38. tur: it used to take 408px on the right). The
   page gets room at the bottom so whatever sits under the card can be scrolled into view. */
.shell.has-scenario .content { padding-bottom: 300px; }
.shell.has-scenario:has(.scn-list) .content { padding-bottom: 580px; }
.scenario { width: 340px; }
.scenario .scn-prog { height: 3px; background: var(--bg-hover); }
.scenario .scn-prog > div { height: 100%; background: var(--accent); }
.scenario .bd { max-height: none; overflow: visible; }
.scn-cur { display: flex; gap: 10px; align-items: flex-start; }
.scn-cur .n { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.scn-cur.done .n { background: var(--success); color: #052e16; }
.scn-cur .n svg, .scenario .st .n svg { width: 12px; height: 12px; }
.scn-cur .t { font-weight: 700; font-size: var(--fs-sm); }
.scn-cur .d { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }
.scn-list { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border-subtle); max-height: 34vh; overflow: auto; }
.scn-list .st { cursor: pointer; align-items: center; }
.scn-list .st:hover { background: var(--bg-hover); }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text-disabled); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

/* Review notice for the deployed mock (owner, 30.11.2026): always visible above every screen. */
:root { --notice-h: 40px; }
.mock-notice { height: var(--notice-h); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 var(--sp-4); background: linear-gradient(90deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.12)); border-bottom: 1px solid rgba(245, 158, 11, 0.55); color: var(--text-primary); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; }
.mock-notice strong { color: var(--warning); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; font-size: var(--fs-xs); padding: 3px 8px; border: 1px solid rgba(245, 158, 11, 0.6); border-radius: 999px; }
.mock-notice span { overflow: hidden; text-overflow: ellipsis; }
.mock-notice-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--warning); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
