/*
 * V4 Portal CSS (TODO-003, ASmiOS Org-Portal)
 *
 * Single source-of-truth for all Org-Portal page mocks + future Sub-PR-1..5.
 * Companion: docs/design-tokens.md
 *
 * Loads BEFORE any per-component v4-*.css. Uses CSS variables (--pv-*)
 * which is the OPPOSITE of the 2026-07-01 Revert-Lock — the Revert-Lock
 * was about utility-class tokens.css / patterns.css, NOT design tokens.
 * Design tokens MUST stay in CSS variables (semantic values, not styles).
 *
 * Pattern parity with v4-views.css / v4-billing.css / v4-hero.css —
 * per-component CSS file that scopes selectors with a stable namespace.
 */

/* ============================================================
 * 1. Tokens (:root — single source-of-truth)
 * ============================================================ */
:root {
    /* Surfaces */
    --pv-bg: #0a1929;
    --pv-bg-tile: #0d1b2a;
    --pv-surface: #102a43;
    --pv-surface-2: #1a3556;
    --pv-surface-hover: #21456b;

    /* Borders */
    --pv-border: #1f3a5f;
    --pv-border-strong: #2d4f7a;
    --pv-border-cyan: #4ecdc4;

    /* Text */
    --pv-text: #f8fafc;
    --pv-text-muted: #94a3b8;
    --pv-text-subtle: #64748b;
    --pv-text-accent: #4ecdc4;

    /* Brand accents */
    --pv-accent: #4ecdc4;
    --pv-accent-deep: #2d8b83;
    --pv-accent-glow: rgba(78, 205, 196, 0.35);
    --pv-tech-blue: #5ba4c9;
    --pv-saffron: #f59e0b;

    /* Status (semantic) */
    --pv-success: #10b981;
    --pv-success-soft: rgba(16, 185, 129, 0.15);
    --pv-warning: #f59e0b;
    --pv-warning-soft: rgba(245, 158, 11, 0.15);
    --pv-danger: #f87171;
    --pv-danger-soft: rgba(248, 113, 113, 0.15);
    --pv-info: #60a5fa;
    --pv-info-soft: rgba(96, 165, 250, 0.15);

    /* Gradients */
    --pv-gradient-primary: linear-gradient(90deg, #4ecdc4 0%, #5ba4c9 100%);
    --pv-gradient-sidebar-active: linear-gradient(90deg, rgba(78, 205, 196, 0.18) 0%, transparent 100%);
    --pv-gradient-hex-glow: radial-gradient(circle, rgba(78, 205, 196, 0.45) 0%, transparent 70%);

    /* Typography */
    --pv-font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --pv-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
    --pv-fs-display: clamp(2.25rem, 5vw, 4rem);
    --pv-fs-h1: 1.5rem;
    --pv-fs-h2: 1.125rem;
    --pv-fs-body: 0.9375rem;
    --pv-fs-small: 0.8125rem;
    --pv-fs-tiny: 0.6875rem;
    --pv-lh-tight: 1.15;
    --pv-lh-normal: 1.5;

    /* Spacing */
    --pv-s-1: 4px;
    --pv-s-2: 8px;
    --pv-s-3: 12px;
    --pv-s-4: 16px;
    --pv-s-5: 20px;
    --pv-s-6: 24px;
    --pv-s-8: 32px;

    /* Radius */
    --pv-radius-sm: 8px;
    --pv-radius: 12px;
    --pv-radius-md: 14px;
    --pv-radius-lg: 16px;
    --pv-radius-xl: 20px;

    /* Shadows */
    --pv-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
    --pv-shadow-md: 0 6px 16px rgba(0, 0, 0, 0.25);
    --pv-shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.35);
}

/* ============================================================
 * 2. Reset + base
 * ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: var(--pv-font-sans);
    background-color: var(--pv-bg);
    color: var(--pv-text);
    font-size: var(--pv-fs-body);
    line-height: var(--pv-lh-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Hex-constellation background (subtle on all pages; airy=denser pattern) */
body.pv-bg-airy {
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27120%27%20height%3D%27104%27%20viewBox%3D%270%200%20120%20104%27%3E%3Cpolygon%20points%3D%2760%2C2%20118%2C38%20118%2C66%2060%2C102%202%2C66%202%2C38%27%20fill%3D%27none%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.6%27%20stroke-opacity%3D%270.40%27%2F%3E%3Cline%20x1%3D%2760%27%20y1%3D%272%27%20x2%3D%2760%27%20y2%3D%27-30%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.6%27%20stroke-opacity%3D%270.08%27%2F%3E%3Cline%20x1%3D%27118%27%20y1%3D%2738%27%20x2%3D%27140%27%20y2%3D%2760%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.6%27%20stroke-opacity%3D%270.08%27%2F%3E%3Cline%20x1%3D%27118%27%20y1%3D%2766%27%20x2%3D%27140%27%20y2%3D%2760%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.6%27%20stroke-opacity%3D%270.08%27%2F%3E%3Cline%20x1%3D%2760%27%20y1%3D%27102%27%20x2%3D%2760%27%20y2%3D%27134%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.6%27%20stroke-opacity%3D%270.08%27%2F%3E%3Cline%20x1%3D%272%27%20y1%3D%2766%27%20x2%3D%27-20%27%20y2%3D%2760%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.6%27%20stroke-opacity%3D%270.08%27%2F%3E%3Cline%20x1%3D%272%27%20y1%3D%2738%27%20x2%3D%27-20%27%20y2%3D%2760%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.6%27%20stroke-opacity%3D%270.08%27%2F%3E%3Ccircle%20cx%3D%2760%27%20cy%3D%2752%27%20r%3D%271%27%20fill%3D%27%234ecdc4%27%20fill-opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%272%27%20cy%3D%2738%27%20r%3D%270.5%27%20fill%3D%27%235ba4c9%27%20fill-opacity%3D%270.85%27%2F%3E%3Ccircle%20cx%3D%27118%27%20cy%3D%2766%27%20r%3D%270.5%27%20fill%3D%27%235ba4c9%27%20fill-opacity%3D%270.85%27%2F%3E%3C%2Fsvg%3E");
    background-attachment: fixed;
    background-repeat: repeat;
}

/* Even denser (very faint, product tables/forms) */
body.pv-bg-dense {
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27120%27%20height%3D%27104%27%20viewBox%3D%270%200%20120%20104%27%3E%3Cpolygon%20points%3D%2760%2C2%20118%2C38%20118%2C66%2060%2C102%202%2C66%202%2C38%27%20fill%3D%27none%27%20stroke%3D%27%235ba4c9%27%20stroke-width%3D%270.5%27%20stroke-opacity%3D%270.20%27%2F%3E%3C%2Fsvg%3E");
    background-attachment: fixed;
    background-repeat: repeat;
}

/* Marketing pages (landing, login) — bg-hex-grid.png as full-page bg.
 * The url is relative to the CSS file's URL location: v4-portal.css
 * is served at /css/v4-portal.css, so `../images/...` resolves to
 * `/images/...` (one directory up from /css/ = root, then into images).
 * The earlier `../../public/images/...` was wrong — it resolved to
 * `/public/images/...` (double-public), and the static server doesn't
 * serve from a `/public` URL prefix (express.static is mounted at root
 * with `dir.public` = `<project>/public/`, so the URL prefix is
 * implicit). Pierre hit this in browser-test 2026-07-12 21:14: the
 * login page rendered without the hero background because the
 * background-image was 404. */
body.pv-bg-marketing {
    background-color: var(--pv-bg);
    background-image: url('../images/v4-hero/bg-hex-grid.png');
    background-attachment: fixed;
    background-size: min(1400px, 100vw) auto;
    background-repeat: repeat;
    background-position: top center;
}

/* Layered particle overlay — extra cyan dots on top of marketing bg, additive accent */
body.pv-bg-marketing::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 22%, rgba(78, 205, 196, 0.45) 0, transparent 1.8px),
        radial-gradient(circle at 28% 14%, rgba(78, 205, 196, 0.30) 0, transparent 1.4px),
        radial-gradient(circle at 48% 28%, rgba(91, 164, 201, 0.35) 0, transparent 1.6px),
        radial-gradient(circle at 65% 12%, rgba(78, 205, 196, 0.40) 0, transparent 1.5px),
        radial-gradient(circle at 82% 24%, rgba(91, 164, 201, 0.30) 0, transparent 1.4px),
        radial-gradient(circle at 8% 48%, rgba(78, 205, 196, 0.35) 0, transparent 1.5px),
        radial-gradient(circle at 24% 56%, rgba(91, 164, 201, 0.28) 0, transparent 1.3px),
        radial-gradient(circle at 44% 42%, rgba(78, 205, 196, 0.32) 0, transparent 1.4px),
        radial-gradient(circle at 62% 52%, rgba(91, 164, 201, 0.25) 0, transparent 1.2px),
        radial-gradient(circle at 78% 44%, rgba(78, 205, 196, 0.30) 0, transparent 1.3px),
        radial-gradient(circle at 92% 58%, rgba(91, 164, 201, 0.28) 0, transparent 1.3px),
        radial-gradient(circle at 14% 76%, rgba(78, 205, 196, 0.30) 0, transparent 1.4px),
        radial-gradient(circle at 32% 84%, rgba(91, 164, 201, 0.25) 0, transparent 1.2px),
        radial-gradient(circle at 54% 72%, rgba(78, 205, 196, 0.35) 0, transparent 1.5px),
        radial-gradient(circle at 72% 88%, rgba(91, 164, 201, 0.30) 0, transparent 1.4px),
        radial-gradient(circle at 88% 78%, rgba(78, 205, 196, 0.28) 0, transparent 1.3px);
    background-size: 100% 100%;
    z-index: 0;
}


a {
    color: var(--pv-text-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

/* ============================================================
 * 3. Top-bar (shared)
 * ============================================================ */
.pv-topbar {
    background: var(--pv-bg-tile);
    border-bottom: 1px solid var(--pv-border);
    height: 56px;
    padding: 0 var(--pv-s-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.pv-topbar-brand {
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
}

.pv-topbar-brand .pv-topbar-logo {
    width: 32px;
    height: 32px;
    display: block;
}

.pv-topbar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.pv-topbar-brand-text .primary {
    font-size: var(--pv-fs-body);
    font-weight: 700;
    color: var(--pv-text);
    letter-spacing: 0.02em;
}

.pv-topbar-brand-text .secondary {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--pv-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.pv-topbar-right {
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
}

.pv-user-menu {
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
    padding: var(--pv-s-2) var(--pv-s-3);
    background: var(--pv-surface-2);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    color: var(--pv-text);
}

.pv-user-menu .pv-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--pv-gradient-primary);
    color: var(--pv-bg);
    font-size: 0.6875rem;
    font-weight: 700;
}

.pv-user-menu-name {
    font-size: var(--pv-fs-small);
    font-weight: 500;
}

.pv-topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--pv-s-2);
    padding: var(--pv-s-2) var(--pv-s-4);
    background: var(--pv-gradient-primary);
    color: var(--pv-bg);
    border-radius: var(--pv-radius);
    font-size: var(--pv-fs-small);
    font-weight: 700;
}

/* ============================================================
 * 4. Sidebar (Portal pages only)
 * ============================================================ */
.pv-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 56px);
}

.pv-sidebar {
    background: var(--pv-bg-tile);
    border-right: 1px solid var(--pv-border);
    padding: var(--pv-s-5) var(--pv-s-3);
    display: flex;
    flex-direction: column;
    gap: var(--pv-s-1);
}

.pv-sidebar-tab {
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
    padding: var(--pv-s-3) var(--pv-s-3);
    color: var(--pv-text-muted);
    border-radius: var(--pv-radius);
    font-size: var(--pv-fs-body);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
    border-left: 3px solid transparent;
    margin-left: -3px;
}

.pv-sidebar-tab:hover {
    background: var(--pv-surface-2);
    color: var(--pv-text);
}

.pv-sidebar-tab.is-active {
    background: var(--pv-gradient-sidebar-active);
    color: var(--pv-accent);
    border-left-color: var(--pv-accent);
    font-weight: 600;
}

.pv-sidebar-tab i {
    width: 18px;
    text-align: center;
}

.pv-sidebar-badge {
    margin-left: auto;
    background: var(--pv-surface-2);
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-tiny);
    font-weight: 700;
    padding: 2px var(--pv-s-2);
    border-radius: var(--pv-radius-sm);
}

.pv-sidebar-tab.is-active .pv-sidebar-badge {
    background: var(--pv-accent);
    color: var(--pv-bg);
}

/* ============================================================
 * 5. Main content
 * ============================================================ */
.pv-main {
    padding: var(--pv-s-8) var(--pv-s-8);
    max-width: 1280px;
}

.pv-page-header {
    margin-bottom: var(--pv-s-6);
}

.pv-page-header h1 {
    font-size: var(--pv-fs-h1);
    font-weight: 700;
    color: var(--pv-text);
    margin-bottom: var(--pv-s-2);
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
}

.pv-page-header p {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-body);
    max-width: 720px;
}

/* Quick-action-bar */
.pv-quick-bar {
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
    margin-bottom: var(--pv-s-5);
    flex-wrap: wrap;
}

/* ============================================================
 * 6. Card base + corner-brackets
 * ============================================================ */
.pv-card {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-lg);
    padding: var(--pv-s-6);
    position: relative;
    box-shadow: var(--pv-shadow-sm);
}

.pv-card.is-airy {
    background: var(--pv-bg-tile);
    padding: var(--pv-s-8);
}

/* Corner-brackets — drawn via positioned spans / pseudo-elements */
.pv-card .pv-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.pv-card .pv-corner-tl {
    top: 6px;
    left: 6px;
    border-top: 1.5px solid var(--pv-accent);
    border-left: 1.5px solid var(--pv-accent);
}

.pv-card .pv-corner-tr {
    top: 6px;
    right: 6px;
    border-top: 1.5px solid var(--pv-accent);
    border-right: 1.5px solid var(--pv-accent);
}

.pv-card .pv-corner-bl {
    bottom: 6px;
    left: 6px;
    border-bottom: 1.5px solid var(--pv-accent);
    border-left: 1.5px solid var(--pv-accent);
}

.pv-card .pv-corner-br {
    bottom: 6px;
    right: 6px;
    border-bottom: 1.5px solid var(--pv-accent);
    border-right: 1.5px solid var(--pv-accent);
}

/* data-corner attribute to scope which corners to show */
.pv-card[data-corner="2-tlbr"] .pv-corner-tr,
.pv-card[data-corner="2-tlbr"] .pv-corner-bl {
    display: none;
}

/* ============================================================
 * 7. Buttons
 * ============================================================ */
.pv-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--pv-s-2);
    padding: 0.5625rem 0.875rem;
    font-size: var(--pv-fs-small);
    font-weight: 600;
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    background: var(--pv-surface);
    color: var(--pv-text);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.pv-btn:hover {
    border-color: var(--pv-border-cyan);
}

.pv-btn-primary {
    background: var(--pv-gradient-primary);
    color: var(--pv-bg);
    border-color: transparent;
    font-weight: 700;
}

.pv-btn-primary:hover {
    box-shadow: 0 0 0 4px var(--pv-accent-glow);
}

.pv-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--pv-text-muted);
}

.pv-btn-ghost:hover {
    background: var(--pv-surface-2);
    color: var(--pv-text);
    border-color: transparent;
}

.pv-btn-danger {
    background: var(--pv-danger);
    color: #fff;
    border-color: transparent;
}

.pv-btn-danger:hover {
    background: #ef4444;
    box-shadow: 0 0 0 4px var(--pv-danger-soft);
}

.pv-btn-sm {
    padding: 0.3125rem 0.625rem;
    font-size: 0.75rem;
}

/* ============================================================
 * 8. Form fields
 * ============================================================ */
.pv-field {
    display: flex;
    flex-direction: column;
    gap: var(--pv-s-2);
    margin-bottom: var(--pv-s-4);
}

.pv-field label {
    font-size: var(--pv-fs-small);
    font-weight: 600;
    color: var(--pv-text);
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
}

.pv-field .pv-hint {
    font-size: var(--pv-fs-tiny);
    font-weight: 400;
    color: var(--pv-text-muted);
}

.pv-input,
.pv-select,
.pv-textarea {
    font: inherit;
    padding: var(--pv-s-3);
    border: 1px solid var(--pv-border-strong);
    border-radius: var(--pv-radius-sm);
    background: var(--pv-surface);
    color: var(--pv-text);
    font-size: var(--pv-fs-body);
    width: 100%;
}

.pv-input:focus,
.pv-select:focus,
.pv-textarea:focus {
    outline: none;
    border-color: var(--pv-accent);
    box-shadow: 0 0 0 3px var(--pv-accent-glow);
}

.pv-input::placeholder,
.pv-textarea::placeholder {
    color: var(--pv-text-subtle);
}

.pv-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* ============================================================
 * 9. Badges
 * ============================================================ */
.pv-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--pv-s-1);
    font-size: var(--pv-fs-tiny);
    font-weight: 700;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--pv-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pv-badge-success {
    background: var(--pv-success-soft);
    color: var(--pv-success);
}
.pv-badge-warning {
    background: var(--pv-warning-soft);
    color: var(--pv-warning);
}
.pv-badge-danger {
    background: var(--pv-danger-soft);
    color: var(--pv-danger);
}
.pv-badge-info {
    background: var(--pv-info-soft);
    color: var(--pv-info);
}
.pv-badge-neutral {
    background: var(--pv-surface-2);
    color: var(--pv-text-muted);
}
.pv-badge-cyan {
    background: rgba(78, 205, 196, 0.18);
    color: var(--pv-accent);
}

/* ============================================================
 * 10. Tables (Members / Billing)
 * ============================================================ */
.pv-table-card {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-lg);
    overflow: hidden;
    box-shadow: var(--pv-shadow-sm);
}

.pv-table {
    width: 100%;
    border-collapse: collapse;
}

.pv-table thead th {
    text-align: left;
    font-size: var(--pv-fs-tiny);
    font-weight: 700;
    color: var(--pv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: var(--pv-s-3) var(--pv-s-4);
    background: var(--pv-surface-2);
    border-bottom: 1px solid var(--pv-border);
}

.pv-table tbody tr {
    border-bottom: 1px solid var(--pv-border);
    transition: background 0.12s;
}
.pv-table tbody tr:last-child {
    border-bottom: none;
}
.pv-table tbody tr:hover {
    background: var(--pv-surface-hover);
}

.pv-table td {
    padding: var(--pv-s-3) var(--pv-s-4);
    font-size: var(--pv-fs-body);
    color: var(--pv-text);
    vertical-align: middle;
}

/* ============================================================
 * 11. Modals + wizard
 * ============================================================ */
.pv-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    z-index: 100;
    padding: var(--pv-s-5);
}

.pv-modal {
    background: var(--pv-bg-tile);
    border: 1px solid var(--pv-border-cyan);
    border-radius: var(--pv-radius-xl);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--pv-shadow-lg);
    overflow: hidden;
    position: relative;
}

.pv-modal.pv-modal-wide {
    max-width: 640px;
}

.pv-modal-header {
    padding: var(--pv-s-6) var(--pv-s-6) var(--pv-s-3);
}

.pv-modal-header h2 {
    font-size: var(--pv-fs-h2);
    font-weight: 700;
    color: var(--pv-text);
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
}

.pv-modal-header h2 i {
    color: var(--pv-accent);
}

.pv-modal-header p {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    margin-top: var(--pv-s-1);
}

.pv-modal-body {
    padding: var(--pv-s-3) var(--pv-s-6) var(--pv-s-5);
}

.pv-modal-footer {
    padding: var(--pv-s-4) var(--pv-s-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--pv-border);
    background: var(--pv-surface);
}

.pv-modal-footer-right {
    display: flex;
    gap: var(--pv-s-2);
}

/* Wizard step indicator */
.pv-wizard-steps {
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
    padding: var(--pv-s-5) var(--pv-s-6) 0;
}

.pv-wizard-step {
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
    font-size: var(--pv-fs-tiny);
    color: var(--pv-text-subtle);
}

.pv-wizard-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    border: 1.5px solid var(--pv-border-strong);
    background: var(--pv-bg-tile);
}

.pv-wizard-step.is-active {
    color: var(--pv-text);
    font-weight: 600;
}

.pv-wizard-step.is-active .pv-wizard-step-num {
    background: var(--pv-accent);
    color: var(--pv-bg);
    border-color: var(--pv-accent);
}

.pv-wizard-step.is-done .pv-wizard-step-num {
    background: var(--pv-success);
    color: var(--pv-bg);
    border-color: var(--pv-success);
}

.pv-wizard-step-divider {
    flex: 1;
    height: 1.5px;
    background: var(--pv-border);
    min-width: 24px;
}

/* ------------------------------------------------------------
 * Sub-PR-2.7 — Modal close-pattern foundation (X-button +
 * scroll-lock body-class + is-open state class). Shared by
 * Sub-PR-3.6 rooms wizard + Sub-PR-2.5 members remove-confirm,
 * and consumed by Sub-PR-2.6 invite-wizard when it lands.
 * ------------------------------------------------------------ */

/* X-button — positioned in the modal header's top-right corner.
   Auto-injected by public/js/portal-modal.js if a header element
   is present and no .pv-modal-close already exists. */
.pv-modal-close {
    position: absolute;
    top: var(--pv-s-3);
    right: var(--pv-s-3);
    background: transparent;
    border: 1px solid transparent;
    color: var(--pv-text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--pv-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.12s ease,
        color 0.12s ease,
        border-color 0.12s ease;
}

.pv-modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--pv-text);
    border-color: var(--pv-border);
}

.pv-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: var(--pv-text);
    border-color: var(--pv-accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--pv-accent);
}

/* Scroll-lock — applied to <body> while ANY PortalModal is open
   (counter-based, so nested modals release only after all close). */
body.pv-modal-open {
    overflow: hidden;
}

/* is-open class — programmatic intent signal + future transition hook
   (Sub-PR-2.6 polish). Modern browsers already honor [hidden] with
   display:none; the class is a parallel signal JS can read. */
.pv-modal-backdrop.is-open {
    display: grid;
}

/* ------------------------------------------------------------
 * Hidden attribute always wins over the unconditional
 * `.pv-modal-backdrop { display: grid }` rule above. Without this,
 * the [hidden] attribute is overridden by the author stylesheet
 * (same specificity, later source order) so the modal stays
 * permanently visible — discovered 2026-07-10 during Sub-PR-2.7
 * browser-test when Cancel/X clicks "did nothing" because close()
 * correctly toggled hidden=true but the CSS never honored it.
 * ------------------------------------------------------------ */
.pv-modal-backdrop[hidden] {
    display: none;
}

/* ============================================================
 * 12. Empty states
 * ============================================================ */
.pv-empty {
    padding: var(--pv-s-8) var(--pv-s-6);
    text-align: center;
    color: var(--pv-text-muted);
    background: var(--pv-surface);
    border: 1px dashed var(--pv-border-strong);
    border-radius: var(--pv-radius-lg);
}

.pv-empty i {
    font-size: 2.5rem;
    color: var(--pv-text-subtle);
    margin-bottom: var(--pv-s-3);
    display: block;
}

.pv-empty h3 {
    font-size: var(--pv-fs-h2);
    font-weight: 600;
    color: var(--pv-text);
    margin-bottom: var(--pv-s-2);
}

.pv-empty p {
    font-size: var(--pv-fs-body);
    margin-bottom: var(--pv-s-4);
}

/* ============================================================
 * 13. ASmiOS logo (Landing/Login centerpiece)
 *
 * Uses the real CI logo at public/images/logo.svg (deep-blue shield
 * with cyan "AS" badge + signal-wave accents). NEVER invent a new
 * logo — Corporate Identity is a single-source-of-truth asset.
 * ============================================================ */
.pv-logo-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    display: grid;
    place-items: center;
}

.pv-logo-wrap::before {
    content: '';
    position: absolute;
    inset: -25%;
    background: var(--pv-gradient-hex-glow);
    border-radius: 50%;
    z-index: -1;
    animation: pv-logo-pulse 6s ease-in-out infinite;
}

@keyframes pv-logo-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

.pv-hero-logo {
    width: 220px;
    height: 220px;
    display: block;
    /* filter: drop-shadow honors the actual alpha-channel of the SVG
       (cyan signal-waves + teal core glow through alpha-mask). */
    filter: drop-shadow(0 0 30px rgba(78, 205, 196, 0.55)) drop-shadow(0 0 60px rgba(78, 205, 196, 0.25));
}

/* ============================================================
 * 14. Marketing hero typography (Landing, Login)
 * ============================================================ */
.pv-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--pv-s-8);
    min-height: calc(100vh - 56px);
    padding: 0 var(--pv-s-8);
    max-width: 1400px;
    margin: 0 auto;
}

.pv-hero-text h1 {
    font-size: var(--pv-fs-display);
    font-weight: 700;
    line-height: var(--pv-lh-tight);
    color: var(--pv-text);
    margin-bottom: var(--pv-s-2);
    letter-spacing: -0.03em;
}

.pv-hero-text .tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pv-text);
    margin-bottom: var(--pv-s-5);
    line-height: 1.4;
}

.pv-hero-text p {
    color: var(--pv-text-muted);
    font-size: 0.9375rem;
    max-width: 520px;
    margin-bottom: var(--pv-s-6);
    line-height: 1.6;
}

.pv-hero-visual {
    display: grid;
    place-items: center;
}

/* ============================================================
 * 15. Forms specific: Login (compact, hero-adjacent)
 * ============================================================ */
.pv-login-card {
    background: var(--pv-bg-tile);
    border: 1px solid var(--pv-border-cyan);
    border-radius: var(--pv-radius-lg);
    padding: var(--pv-s-8) var(--pv-s-6);
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: var(--pv-shadow-md);
}

.pv-login-card .corner {
    position: absolute;
    width: 22px;
    height: 22px;
}

.pv-login-card .corner-tl {
    top: 8px;
    left: 8px;
    border-top: 2px solid var(--pv-accent);
    border-left: 2px solid var(--pv-accent);
}

.pv-login-card .corner-tr {
    top: 8px;
    right: 8px;
    border-top: 2px solid var(--pv-accent);
    border-right: 2px solid var(--pv-accent);
}

.pv-login-card .corner-bl {
    bottom: 8px;
    left: 8px;
    border-bottom: 2px solid var(--pv-accent);
    border-left: 2px solid var(--pv-accent);
}

.pv-login-card .corner-br {
    bottom: 8px;
    right: 8px;
    border-bottom: 2px solid var(--pv-accent);
    border-right: 2px solid var(--pv-accent);
}

.pv-login-card h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pv-text);
    margin-bottom: var(--pv-s-2);
}

.pv-login-card p {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-body);
    margin-bottom: var(--pv-s-5);
}

.pv-login-card .pv-input {
    margin-bottom: var(--pv-s-4);
}

/* ============================================================
 * 16. Toggle (boolean fields) — REMOVED 2026-07-10 (PR-#367 / Sub-PR-2.7)
 *
 * The legacy single-class pattern (.pv-toggle as 40x22 pill, .pv-toggle::after
 * as the slider knob, .pv-toggle-row as the row wrapper) was superseded by
 * the compound-label pattern in Sub-PR-3.6 (PR-#365). The compound version
 * lives in public/css/portal.css (lines ~335-402) and uses:
 *   - <label class="pv-toggle"> as full-width flex container
 *   - <span class="pv-toggle-track"> as the 40x22 pill
 *   - <span class="pv-toggle-track">::after as the 18x18 slider
 *   - <span class="pv-toggle-content"> wrapping title + hint
 *
 * PR-#365 introduced the new pattern in portal.css but did NOT delete the
 * old pattern from this file. Because portal.css @imports v4-portal.css,
 * the two patterns collided: the <label class="pv-toggle"> rendered as the
 * old 40x22 pill (background: --pv-border-strong, height: 22px) AND the
 * inner <span class="pv-toggle-track"> rendered as another 40x22 pill.
 * Result: the wizard toggles appeared as giant overlapping pills instead
 * of compact 40x22px switches.
 *
 * Grep confirms zero remaining usages of .pv-toggle-row and zero usages
 * of .pv-toggle as a single-class track in public/views and public/js.
 * Safe to remove the entire section.
 * ============================================================ */

/* ============================================================
 * 17. Status pill (Active/Cancelled etc.)
 * ============================================================ */
.pv-status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--pv-s-1);
    font-size: var(--pv-fs-tiny);
    font-weight: 700;
    padding: 0.25rem var(--pv-s-3);
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pv-status-pill.is-live {
    background: var(--pv-success);
    color: var(--pv-bg);
}

.pv-status-pill.is-idle {
    background: var(--pv-surface-2);
    color: var(--pv-text-muted);
}

/* ============================================================
 * 18. Responsive (mobile)
 * ============================================================ */
@media (max-width: 1100px) {
    .pv-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--pv-s-8) var(--pv-s-4);
    }
    .pv-hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    .pv-hero-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .pv-layout {
        grid-template-columns: 1fr;
    }
    .pv-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding: var(--pv-s-3);
        gap: var(--pv-s-1);
    }
    .pv-sidebar-tab {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        margin-left: 0;
    }
    .pv-sidebar-tab.is-active {
        border-bottom-color: var(--pv-accent);
        border-left-color: transparent;
    }
    .pv-main {
        padding: var(--pv-s-5) var(--pv-s-4);
    }
    .pv-table thead {
        display: none;
    }
    .pv-table tbody tr {
        display: block;
        padding: var(--pv-s-3);
    }
    .pv-table td {
        display: block;
        padding: var(--pv-s-1) 0;
        border: none;
    }
}

/* ============================================================
 * 18b. Reduced-motion (A11y, WCAG 2.3.3)
 * Honours the user's OS-level "reduce motion" preference.
 * Applies to ALL animations / transitions in the V4 portal —
 * the most visible one being the mobile-nav drawer slide-in.
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
 * 20. Polish utilities (added by TODO-003 V4 polish pass)
 *
 * Per web-coder skill checklist: semantic class names, ARIA support,
 * focus-management, mobile-first clarity. No inline styles in mocks.
 * ============================================================ */

/* Skip-to-content link — visually hidden until focused */
.pv-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--pv-accent);
    color: var(--pv-bg);
    padding: var(--pv-s-3) var(--pv-s-4);
    font-weight: 700;
    font-size: var(--pv-fs-small);
    border-radius: 0 0 var(--pv-radius) 0;
    z-index: 1000;
    transition: top 0.18s;
}

.pv-skip-link:focus,
.pv-skip-link:focus-visible {
    top: 0;
}

/* Screen-reader only (visually hidden but accessible) */
.pv-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus ring — explicit :focus-visible (per WCAG 2.4.7) */
.pv-btn:focus-visible,
.pv-input:focus-visible,
.pv-select:focus-visible,
.pv-textarea:focus-visible,
.pv-link:focus-visible {
    outline: 2px solid var(--pv-accent);
    outline-offset: 2px;
}

/* Large CTA (hero / landing primary actions) */
.pv-cta-large {
    padding: 0.75rem 1.5rem;
    font-size: var(--pv-fs-body);
}

/* Block CTA (full-width card button) */
.pv-cta-block {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: var(--pv-s-3);
    font-size: var(--pv-fs-body);
}

.pv-cta-block + .pv-cta-block {
    margin-top: var(--pv-s-2);
}

/* Cyan-outline ghost button (secondary marketing action) */
.pv-btn-ghost-cyan {
    background: transparent;
    border: 1px solid var(--pv-border-cyan);
    color: var(--pv-accent);
}

.pv-btn-ghost-cyan:hover {
    background: rgba(78, 205, 196, 0.08);
    border-color: var(--pv-accent);
    color: var(--pv-text);
}

/* Icon-only button (square, equal sides) */
.pv-btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

/*
 * TODO-025 / PR-#568b: input + button side-by-side layout for the
 * "Initial password" row in the invite-wizard. Mirrors the
 * `.password-input-row` pattern from staff-shell.css (PR-#562) but
 * uses portal-prefixed class + portal tokens. The input grows to fill
 * available space (`flex: 1 1 auto`) while the button stays at its
 * intrinsic width (`flex: 0 0 auto`) with `white-space: nowrap` so
 * the "Generate" label never wraps. On narrow viewports (< 480px) the
 * row stacks vertically to match the responsive behavior of the
 * staff-shell pattern.
 */
.pv-password-input-row {
    display: flex;
    gap: var(--pv-s-2, 0.5rem);
    align-items: stretch;
}

.pv-password-input-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.pv-password-input-row button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .pv-password-input-row {
        flex-direction: column;
    }
}

/* Hero elements (Landing page) */
.pv-hero-tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pv-text);
    margin-bottom: var(--pv-s-5);
    line-height: 1.4;
}

.pv-hero-desc {
    color: var(--pv-text-muted);
    font-size: 0.9375rem;
    max-width: 520px;
    margin-bottom: var(--pv-s-6);
    line-height: 1.6;
}

.pv-hero-ctas {
    display: flex;
    gap: var(--pv-s-3);
    flex-wrap: wrap;
}

/* Room-name card (Landing quick-action) */
.pv-roomname-form {
    display: flex;
    gap: var(--pv-s-2);
    margin-bottom: var(--pv-s-4);
}

.pv-mono {
    font-family: var(--pv-font-mono);
}

.pv-card-section {
    text-align: center;
    margin-bottom: var(--pv-s-3);
}

.pv-card-heading {
    font-size: var(--pv-fs-h2);
    font-weight: 600;
    color: var(--pv-text);
    margin-bottom: var(--pv-s-1);
}

.pv-card-sub {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    margin: 0;
}

/* Room-name card (Landing quick-action) — centered narrow article */
.pv-roomname-card {
    position: relative;
    max-width: 560px;
    margin: -80px auto var(--pv-s-8);
    padding: var(--pv-s-6) var(--pv-s-5);
}

.pv-card-recent {
    margin-top: var(--pv-s-4);
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    text-align: center;
}

/* === 1:1 mirror of production ASmiOS landing.html (Stage A polish) ===
 * Per Pierre 2026-07-09 19:51: landing.html mock must match production
 * 1:1 (logo-wordmark.svg + bg-hex-grid.png + bold-large-white tagline).
 */

/* Topbar with logo-wordmark (round AS badge + miOS / COMMUNICATIONS) */
.pv-header-wordmark {
    height: auto;
    width: 220px;
    max-width: 60vw;
    display: block;
    filter: drop-shadow(0 0 6px rgba(78, 205, 196, 0.3));
}

.pv-topbar {
    /* Override: production topbar has no topbar background — bg-image
       shows through. Keep transparent. */
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Hero title (production's `.v4-hero-title`) — large white bold */
.pv-hero-title {
    color: #ffffff;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: left;
    margin: 0 0 16px;
}

/* Hero tagline — bold large white (3-line statement) */
.pv-hero-tagline {
    color: #ffffff;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 0 0 24px;
    max-width: 540px;
}

/* Hero description — gray small (under the tagline) */
.pv-hero-desc {
    color: rgba(255, 255, 255, 0.72);
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 0 32px;
}

/* Hero right-side logo (the round AS badge with signal-waves glow) */
.pv-hero-logo {
    width: 320px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 36px rgba(78, 205, 196, 0.75));
}

/* Gradient JOIN ROOM CTA — teal-to-cyan (matches production's `.v4-btn-cta`) */
.pv-cta-cta-gradient {
    background: linear-gradient(65deg, #2D8B83 0%, #4ECDC4 50%, #5BA4C9 100%);
    border: 1px solid rgba(78, 205, 196, 0.3);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffffff;
    text-transform: uppercase;
}

.pv-cta-cta-gradient:hover {
    background: linear-gradient(65deg, #1F6E68 0%, #3DBAB1 50%, #4A8FB4 100%);
    box-shadow: 0 0 24px rgba(78, 205, 196, 0.4);
}

/* === Login page (2-col hero + login-card) === */
.pv-login-section {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 56px);
    padding: var(--pv-s-8);
}

.pv-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pv-s-8);
    max-width: 1100px;
    width: 100%;
    align-items: center;
}

.pv-login-text {
    padding-right: var(--pv-s-4);
}

.pv-login-tagline {
    color: var(--pv-text);
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 var(--pv-s-5);
    line-height: 1.5;
}

.pv-login-desc {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-body);
    line-height: 1.6;
    max-width: 420px;
    margin: 0;
}

.pv-login-card-sub {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-body);
    margin: 0 0 var(--pv-s-5);
}

/* Divider with "or" text — used between primary CTA + alternative flow */
.pv-divider {
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
    margin: var(--pv-s-4) 0;
    color: var(--pv-text-subtle);
    font-size: var(--pv-fs-tiny);
}

.pv-divider-line {
    flex: 1;
    height: 1px;
    background: var(--pv-border);
}

.pv-divider-text {
    flex-shrink: 0;
}

/* Login dev fallback (X-Staff-Token details/summary) */
.pv-login-dev {
    margin-top: var(--pv-s-2);
}

.pv-login-dev-summary {
    cursor: pointer;
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    font-weight: 500;
    user-select: none;
}

.pv-login-dev-summary:hover {
    color: var(--pv-text);
}

.pv-login-dev-field {
    margin-top: var(--pv-s-3);
}

/* Login footer (sign-up nudge) */
.pv-login-footer {
    margin-top: var(--pv-s-5);
    padding-top: var(--pv-s-3);
    border-top: 1px solid var(--pv-border);
    font-size: var(--pv-fs-tiny);
    color: var(--pv-text-subtle);
    text-align: center;
    margin-bottom: 0;
}

.pv-login-footer .pv-link {
    color: var(--pv-accent);
    margin-left: var(--pv-s-1);
}

/* Tighter CTA (used for secondary actions inside modals/details) */
.pv-cta-tight {
    padding: var(--pv-s-2);
    font-size: var(--pv-fs-small);
}

/* Generic link (used inside muted text blocks) */
.pv-link {
    color: var(--pv-accent);
    text-decoration: none;
}

.pv-link:hover {
    text-decoration: underline;
}

/* === Dashboard (4-card airy overview) === */
.pv-card-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--pv-s-5);
}

.pv-card-label {
    font-size: var(--pv-fs-tiny);
    font-weight: 700;
    color: var(--pv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--pv-s-3);
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
}

.pv-card-label .fa-solid {
    color: var(--pv-accent);
}

.pv-card-stat {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pv-text);
}

.pv-card-stat-suffix {
    font-size: var(--pv-fs-body);
    color: var(--pv-text-muted);
    font-weight: 500;
}

.pv-card-meta {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    margin: var(--pv-s-1) 0 var(--pv-s-3);
}

.pv-card-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--pv-text);
    margin-bottom: var(--pv-s-2);
}

.pv-card-amount-suffix {
    font-size: var(--pv-fs-small);
    font-weight: 500;
    color: var(--pv-text-muted);
}

.pv-card-row {
    font-size: var(--pv-fs-body);
    color: var(--pv-text-muted);
    margin-bottom: var(--pv-s-4);
}

.pv-card-row strong {
    color: var(--pv-text);
}

.pv-card-actions {
    display: flex;
    justify-content: flex-end;
}

/* Avatar stack (overlapping initials avatars) */
.pv-avatar-stack {
    display: flex;
    margin: var(--pv-s-2) 0 var(--pv-s-3);
}

.pv-avatar-stack .pv-avatar {
    margin-left: 0;
}

.pv-avatar-stack .pv-avatar + .pv-avatar {
    margin-left: -8px;
}

/* Top-3 list (Rooms card) */
.pv-top-list {
    list-style: none;
    margin-bottom: var(--pv-s-4);
    padding: 0;
    font-size: var(--pv-fs-small);
}

.pv-top-list li {
    display: flex;
    justify-content: space-between;
    padding: var(--pv-s-2) 0;
    color: var(--pv-text-muted);
}

.pv-top-list li + li {
    border-top: 1px solid var(--pv-border);
}

.pv-top-list strong {
    color: var(--pv-text);
}

.pv-top-list li:last-child {
    border-bottom: none;
}

/* Invoice summary row (Latest Invoice card) */
.pv-invoice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pv-s-3) 0;
    border-bottom: 1px solid var(--pv-border);
    margin-bottom: var(--pv-s-3);
}

.pv-invoice-row .pv-invoice-name {
    color: var(--pv-text);
    font-weight: 600;
}

.pv-invoice-row .pv-invoice-date {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-tiny);
}

.pv-invoice-row .pv-invoice-amount {
    text-align: right;
}

.pv-invoice-row .pv-invoice-amount-amount {
    color: var(--pv-text);
    font-weight: 700;
    font-size: var(--pv-fs-h2);
}

.pv-invoice-row .pv-invoice-amount-badge {
    margin-top: var(--pv-s-1);
}

/* Page header (h1 + subtitle inside content area) */
.pv-page-header {
    margin-bottom: var(--pv-s-6);
}

.pv-page-header h1 {
    font-size: var(--pv-fs-h1);
    font-weight: 700;
    color: var(--pv-text);
    margin: 0 0 var(--pv-s-2);
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
    flex-wrap: wrap;
}

.pv-page-header p {
    color: var(--pv-text-muted);
    margin: 0;
}

/* Portal-pages topbar — workspace context (wordmark + org + user) */
.pv-topbar-workspace {
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
}

.pv-topbar-org {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pv-topbar-org .primary {
    color: var(--pv-text);
    font-weight: 600;
    font-size: var(--pv-fs-small);
}

.pv-topbar-org .secondary {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-tiny);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Topbar wordmark for portal-pages (smaller than Landing hero wordmark) */
.pv-topbar-wordmark {
    height: auto;
    width: 140px;
    display: block;
    filter: drop-shadow(0 0 4px rgba(78, 205, 196, 0.25));
}

/* === Members table — user cell, role dropdown, banner === */
.pv-user-cell {
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
}

.pv-user-cell-sub {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-tiny);
    margin-top: 2px;
}

.pv-text-muted {
    color: var(--pv-text-muted);
}

/* ------------------------------------------------------------
 * Sub-PR-2.6 — Invite-member wizard review + success styles.
 * Lives next to the existing .pv-wizard-* / .pv-modal-* rules
 * (Sections 11 + 13). Reuses --pv-bg-tile, --pv-border,
 * --pv-text, --pv-text-muted, --pv-accent, --pv-success tokens
 * for visual parity with the Create-room wizard review panel
 * (Sub-PR-3.6) and the remove-confirm modal (Sub-PR-2.5).
 * ------------------------------------------------------------ */
.pv-required {
    color: var(--pv-accent);
    margin-left: 2px;
}

.pv-invite-review {
    display: flex;
    flex-direction: column;
    gap: var(--pv-s-3);
    background: var(--pv-bg-tile);
    border: 1px solid var(--pv-border);
    border-radius: 8px;
    padding: var(--pv-s-4);
}

.pv-invite-review-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--pv-s-3);
}

.pv-invite-review-label {
    font-size: var(--pv-fs-tiny);
    color: var(--pv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.pv-invite-review-value {
    font-size: var(--pv-fs-body);
    color: var(--pv-text);
    text-align: right;
    word-break: break-all;
}

.pv-invite-review-hint {
    margin-top: var(--pv-s-3);
}

.pv-invite-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--pv-s-3);
    padding: var(--pv-s-4) 0;
}

.pv-invite-success-icon {
    font-size: 48px;
    color: var(--pv-success);
    line-height: 1;
}

.pv-invite-success-title {
    font-size: var(--pv-fs-body);
    color: var(--pv-text);
    margin: 0;
    font-weight: 600;
}

.pv-invite-success-body {
    font-size: var(--pv-fs-small);
    color: var(--pv-text-muted);
    margin: 0;
    line-height: 1.5;
}

.pv-invite-success-body strong {
    color: var(--pv-text);
    word-break: break-all;
}

.pv-invite-success-actions {
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
    width: 100%;
    margin-top: var(--pv-s-3);
    flex-wrap: wrap;
}

.pv-invite-success-actions input {
    flex: 1 1 200px;
    min-width: 0;
    padding: var(--pv-s-2) var(--pv-s-3);
    background: var(--pv-bg-tile);
    border: 1px solid var(--pv-border);
    color: var(--pv-text);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--pv-fs-tiny);
}

.pv-invite-success-actions .pv-btn {
    flex-shrink: 0;
}

.pv-actions-row {
    display: flex;
    gap: var(--pv-s-3);
    margin-bottom: var(--pv-s-4);
}

.pv-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pv-s-4);
    background: var(--pv-surface-2);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    padding: var(--pv-s-4) var(--pv-s-5);
    margin-top: var(--pv-s-5);
}

.pv-banner p {
    margin: 0;
    color: var(--pv-text-muted);
}

/* Field with info-icon hint (used in wizard modals) */
.pv-field-info {
    display: flex;
    align-items: flex-start;
    gap: var(--pv-s-2);
    padding: var(--pv-s-3);
    background: rgba(78, 205, 196, 0.05);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: var(--pv-radius);
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    line-height: 1.5;
}

.pv-field-info i {
    color: var(--pv-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Input with prefix text (e.g., asmios.app/<slug>) */
.pv-input-prefix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    background: var(--pv-surface);
    overflow: hidden;
}

.pv-input-prefix-text {
    display: flex;
    align-items: center;
    padding: 0 var(--pv-s-3);
    background: var(--pv-surface-2);
    color: var(--pv-text-muted);
    font-family: var(--pv-font-mono);
    font-size: var(--pv-fs-small);
    border-right: 1px solid var(--pv-border);
}

.pv-input-prefix .pv-input {
    border: none;
    border-radius: 0;
    flex: 1;
}

/* === Rooms — tabs + 3-col card grid === */
.pv-page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--pv-s-4);
}

.pv-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--pv-s-5);
    border-bottom: 1px solid var(--pv-border);
}

.pv-tab {
    background: transparent;
    border: none;
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    font-weight: 600;
    padding: var(--pv-s-3) var(--pv-s-4);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.12s, border-color 0.12s;
    display: inline-flex;
    align-items: center;
    gap: var(--pv-s-2);
}

.pv-tab:hover {
    color: var(--pv-text);
}

.pv-tab.is-active {
    color: var(--pv-accent);
    border-bottom-color: var(--pv-accent);
}

.pv-tab-count {
    background: var(--pv-surface-2);
    color: var(--pv-text-muted);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: var(--pv-fs-tiny);
    font-weight: 700;
}

.pv-tab.is-active .pv-tab-count {
    background: rgba(78, 205, 196, 0.15);
    color: var(--pv-accent);
}

.pv-room-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--pv-s-4);
}

.pv-room-card {
    background: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius-lg);
    padding: var(--pv-s-5);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--pv-s-3);
    transition: border-color 0.12s, transform 0.12s;
}

.pv-room-card:hover {
    border-color: var(--pv-border-cyan);
    transform: translateY(-2px);
}

.pv-room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pv-room-card h3 {
    font-size: var(--pv-fs-h3);
    font-weight: 600;
    color: var(--pv-text);
    margin: 0;
}

.pv-room-card-meta {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    margin: 0;
}

.pv-room-card-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--pv-s-2);
    font-size: var(--pv-fs-small);
    color: var(--pv-text-muted);
}

.pv-room-card-stats li {
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
}

.pv-room-card-stats i {
    color: var(--pv-accent);
    width: 14px;
}

.pv-room-card-empty {
    border-style: dashed;
    border-color: var(--pv-border);
    align-items: center;
    text-align: center;
    justify-content: center;
    color: var(--pv-text-muted);
    background: transparent;
}

.pv-room-card-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pv-surface-2);
    display: grid;
    place-items: center;
    color: var(--pv-accent);
    font-size: 1.25rem;
}

/* === Billing — section header, payment-method, timeline, card-no-corner === */
.pv-section {
    margin-top: var(--pv-s-6);
}

.pv-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--pv-s-4);
    margin-bottom: var(--pv-s-4);
}

.pv-section-header h2 {
    font-size: var(--pv-fs-h2);
    font-weight: 700;
    color: var(--pv-text);
    margin: 0 0 var(--pv-s-1);
}

.pv-section-header p {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    margin: 0;
}

.pv-card-no-corner {
    border: 1px solid var(--pv-border);
}

.pv-card-header {
    margin-bottom: var(--pv-s-3);
}

.pv-card-header h2 {
    font-size: var(--pv-fs-h3);
    font-weight: 600;
    color: var(--pv-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
}

.pv-card-header h2 i {
    color: var(--pv-accent);
}

.pv-billing-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--pv-s-5);
    margin-bottom: var(--pv-s-6);
}

.pv-payment-method {
    display: flex;
    align-items: center;
    gap: var(--pv-s-3);
    padding: var(--pv-s-3) 0;
}

.pv-payment-method-icon {
    width: 48px;
    height: 32px;
    border-radius: var(--pv-radius);
    background: var(--pv-surface-2);
    border: 1px solid var(--pv-border);
    display: grid;
    place-items: center;
    color: var(--pv-accent);
    font-size: 1.5rem;
}

.pv-payment-method-info {
    flex: 1;
}

.pv-payment-method-name {
    color: var(--pv-text);
    font-weight: 600;
}

.pv-payment-method-meta {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-tiny);
    margin-top: 2px;
}

.pv-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--pv-border);
    padding-left: var(--pv-s-5);
    display: flex;
    flex-direction: column;
    gap: var(--pv-s-4);
}

.pv-timeline li {
    position: relative;
}

.pv-timeline-dot {
    position: absolute;
    left: calc(-1 * var(--pv-s-5) - 5px);
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pv-surface-2);
    border: 2px solid var(--pv-border);
}

.pv-timeline-dot.is-active {
    background: var(--pv-accent);
    border-color: var(--pv-accent);
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.5);
}

.pv-timeline-title {
    color: var(--pv-text);
    font-weight: 500;
}

.pv-timeline-meta {
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-tiny);
    margin-top: 2px;
}

/* === Settings — sections, deferred badges, danger zone === */
.pv-settings-section {
    margin-bottom: var(--pv-s-6);
}

.pv-deferred-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--pv-s-2);
    padding: var(--pv-s-2) var(--pv-s-3);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--pv-radius);
    color: #fbbf24;
    font-size: var(--pv-fs-small);
    font-weight: 600;
    margin-bottom: var(--pv-s-3);
}

.pv-deferred-badge i {
    color: #f59e0b;
}

.pv-card-deferred {
    background: var(--pv-surface);
    border: 1px dashed var(--pv-border);
}

.pv-card-list {
    list-style: none;
    padding: 0;
    margin: var(--pv-s-3) 0 0;
    color: var(--pv-text-muted);
    font-size: var(--pv-fs-small);
    display: flex;
    flex-direction: column;
    gap: var(--pv-s-2);
}

.pv-card-list li {
    display: flex;
    align-items: center;
    gap: var(--pv-s-2);
}

.pv-card-list i {
    color: var(--pv-text-subtle);
}

.pv-divider-hr {
    border: none;
    border-top: 1px solid var(--pv-border);
    margin: var(--pv-s-4) 0;
}

.pv-card-danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.pv-danger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--pv-s-4);
    padding: var(--pv-s-3) 0;
}

.pv-danger-title {
    color: var(--pv-text);
    font-weight: 600;
    margin-bottom: var(--pv-s-1);
}

.pv-btn-danger {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
}

.pv-btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #dc2626;
    color: #fca5a5;
}

/* Status pill variants — added for Rooms (scheduled, past) */
.pv-status-pill.is-scheduled {
    background: rgba(91, 164, 201, 0.15);
    color: #5ba4c9;
    border: 1px solid rgba(91, 164, 201, 0.3);
}

.pv-status-pill.is-past {
    background: var(--pv-surface-2);
    color: var(--pv-text-muted);
    border: 1px solid var(--pv-border);
}