/* ═══════════════════════════════════════════════════════
   invest.corvair.ai — Design tokens and component styles
   Extracted from mockup.html
   ═══════════════════════════════════════════════════════ */

:root {
    --invest-navy: #0A2540;
    --invest-navy-light: #0F3558;
    --invest-teal: #009688;
    --invest-teal-deep: #004D44;
    --invest-gold: #C9973B;
    --invest-warm-ivory: #F5F0E8;
    --invest-bg: #f8f9fa;
    --invest-border: #e9ecef;
    --invest-sidebar-width: 260px;
    --bs-body-font-family: 'Plus Jakarta Sans', sans-serif;
    --bs-heading-font-family: 'Instrument Serif', serif;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: inherit;
    vertical-align: middle;
    line-height: 1;
}

body {
    font-family: var(--bs-body-font-family);
    margin: 0;
    background: var(--invest-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bs-heading-font-family);
    font-weight: 700;
    color: var(--invest-navy);
}

/* ── Admin sidebar ───────────────────────────────── */
.invest-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--invest-sidebar-width);
    height: 100vh;
    background: var(--invest-navy);
    color: #fff;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.invest-sidebar .sidebar-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.invest-sidebar .sidebar-user {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.invest-sidebar .role-badge {
    display: inline-block;
    font-size: 0.675rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 50px;
    background: rgba(0,150,136,0.25);
    color: #5dded3;
    margin-top: 4px;
}
.invest-sidebar .nav { flex: 1; padding: 0; }
.invest-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}
.invest-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(0,150,136,0.15);
    border-left-color: rgba(0,150,136,0.4);
}
.invest-sidebar .nav-link.active {
    color: #fff;
    background: rgba(0,150,136,0.2);
    border-left-color: var(--invest-teal);
}
.invest-sidebar .nav-link .material-symbols-rounded { width: 20px; text-align: center; }
.invest-sidebar .nav-link.disabled {
    color: rgba(255,255,255,0.3);
    pointer-events: none;
}
.invest-sidebar .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

/* ── Mobile sidebar toggle ──────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--invest-navy);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.4);
}
.sidebar-overlay.active { display: block; }

@media (max-width: 991.98px) {
    .sidebar-toggle { display: flex; }
    .invest-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
    }
    .invest-sidebar.open { transform: translateX(0); }
    .invest-main { margin-left: 0; padding: 16px; padding-top: 60px; }
}

/* ── Admin main ──────────────────────────────────── */
.invest-main {
    margin-left: var(--invest-sidebar-width);
    padding: 24px;
    min-height: 100vh;
    background: var(--invest-bg);
}
.invest-main .page-title {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--invest-navy);
}

/* ── Metric cards ────────────────────────────────── */
.metric-card {
    background: #fff;
    border: 1px solid var(--invest-border);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.metric-number {
    font-family: var(--bs-heading-font-family);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--invest-teal);
    line-height: 1.1;
}
.metric-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-top: 4px;
}

/* ── Metric card icon ─────────────────────────────── */
.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 12px;
}
.metric-icon-rooms { background: rgba(0,150,136,0.1); color: var(--invest-teal); }
.metric-icon-investors { background: rgba(10,37,64,0.08); color: var(--invest-navy); }
.metric-icon-views { background: rgba(201,151,59,0.1); color: var(--invest-gold); }
.metric-icon-assets { background: rgba(111,66,193,0.1); color: #6f42c1; }

/* ── Data table ──────────────────────────────────── */
.data-table {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--invest-border);
}
.data-table thead th {
    background: var(--invest-navy);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border: none;
    white-space: nowrap;
}
.data-table tbody tr {
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.15s ease;
}
.data-table tbody tr:nth-child(even) { background: #fafbfc; }
.data-table tbody tr:hover { background: rgba(0,150,136,0.04); cursor: pointer; }
.data-table td {
    padding: 10px 16px;
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ── Status badges ───────────────────────────────── */
.status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
}
.status-active { background: #d4edda; color: #155724; }
.status-draft { background: #fff; color: var(--invest-gold); border: 1px solid var(--invest-gold); }
.status-expired { background: #f8d7da; color: #721c24; }
.status-archived { background: #e9ecef; color: #495057; }

/* ── Engagement badges ──────────────────────────── */
.engagement-badge {
    display: inline-block;
    font-size: 0.675rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.engagement-high { background: rgba(0,150,136,0.15); color: var(--invest-teal-deep); }
.engagement-medium { background: rgba(201,151,59,0.15); color: #8a6a28; }
.engagement-low { background: #e9ecef; color: #6c757d; }

/* ── Mono text ───────────────────────────────────── */
.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #495057; }

/* ── Activity feed ───────────────────────────────── */
.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #f1f3f5;
}
.activity-item.activity-view { border-left-color: var(--invest-teal); }
.activity-item.activity-download { border-left-color: var(--invest-gold); }
.activity-item .activity-body { flex: 1; min-width: 0; }
.activity-item .activity-timestamp {
    font-size: 0.75rem;
    color: #adb5bd;
    white-space: nowrap;
    margin-left: 12px;
}

/* ── Activity event icon ─────────────────────────── */
.activity-event-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-right: 12px;
}
.event-view { background: rgba(0,150,136,0.1); color: var(--invest-teal); }
.event-download { background: rgba(201,151,59,0.1); color: var(--invest-gold); }
.event-nda { background: rgba(111,66,193,0.1); color: #6f42c1; }
.event-qa { background: rgba(13,110,253,0.1); color: #0d6efd; }
.event-upload { background: rgba(212,133,106,0.1); color: #D4856A; }
.event-meeting { background: rgba(0,150,136,0.1); color: var(--invest-teal-deep); }

/* ── Engagement indicator ─────────────────────────── */
.engagement-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.engagement-dots {
    display: flex;
    gap: 3px;
}
.engagement-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e9ecef;
}
.engagement-dot.filled-high { background: var(--invest-teal); }
.engagement-dot.filled-med { background: var(--invest-gold); }
.engagement-dot.filled-low { background: #adb5bd; }

/* ── Investor avatar ─────────────────────────────── */
.investor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ── Room status icon ────────────────────────────── */
.room-status-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.room-status-icon.active { background: #28a745; }
.room-status-icon.draft { background: var(--invest-gold); }
.room-status-icon.expired { background: #dc3545; }
.room-status-icon.template { background: #6c757d; }

/* ── Search bar ──────────────────────────────────── */
.invest-search-bar { position: relative; }
.invest-search-bar .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}
.invest-search-bar input {
    padding-left: 36px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: 0.875rem;
}
.invest-search-bar input:focus {
    border-color: var(--invest-teal);
    box-shadow: 0 0 0 0.2rem rgba(0,150,136,0.15);
}

/* ── File type icon ──────────────────────────────── */
.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.file-icon-pdf { background: rgba(220,53,69,0.1); color: #dc3545; }
.file-icon-pptx { background: rgba(201,151,59,0.1); color: var(--invest-gold); }
.file-icon-xlsx { background: rgba(0,150,136,0.1); color: var(--invest-teal); }
.file-icon-doc { background: rgba(13,110,253,0.1); color: #0d6efd; }
.file-icon-img { background: rgba(111,66,193,0.1); color: #6f42c1; }
.file-icon-video { background: rgba(212,133,106,0.1); color: #D4856A; }
.file-icon-link { background: rgba(0,150,136,0.08); color: var(--invest-teal); }
.badge-external {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 50px;
    background: rgba(0,150,136,0.1);
    color: var(--invest-teal);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid rgba(0,150,136,0.25);
}

/* ── Investor portal topbar ──────────────────────── */
.investor-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--invest-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 1000;
}

/* ── Content toolbar (investor) ──────────────────── */
.content-toolbar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(10,37,64,0.95);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 4px;
    z-index: 900;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.content-toolbar a {
    color: rgba(255,255,255,0.65);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.content-toolbar a:hover {
    color: #fff;
    background: rgba(0,150,136,0.2);
}
.content-toolbar a .material-symbols-rounded {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-right: 5px;
}
.content-toolbar .toolbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.content-toolbar .toolbar-right a {
    color: var(--invest-teal);
    font-size: 0.7rem;
}
.content-toolbar .toolbar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 6px;
}
.content-toolbar .toolbar-close:hover {
    color: rgba(255,255,255,0.8);
}

.investor-main {
    padding-top: 112px; /* 60px topbar + 36px content toolbar + 16px gap */
    padding-bottom: 48px;
    max-width: 960px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ── Document card (investor view) ───────────────── */
.doc-card {
    background: #fff;
    border: 1px solid var(--invest-border);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.doc-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    color: inherit;
}
.doc-card .doc-info { flex: 1; min-width: 0; }
.doc-card .doc-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--invest-navy);
    margin-bottom: 2px;
}
.doc-card .doc-desc {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}
.doc-card .doc-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #adb5bd;
    white-space: nowrap;
}
.doc-card .badge-new {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 50px;
    border: 1px solid var(--invest-gold);
    color: var(--invest-gold);
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Document viewer ─────────────────────────────── */
.viewer-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--invest-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}
.viewer-topbar .doc-name {
    font-family: var(--bs-body-font-family);
    font-weight: 600;
    font-size: 0.9rem;
}
.viewer-body {
    padding-top: 56px;
    background: #e9ecef;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding-bottom: 48px;
}
.viewer-page {
    background: #fff;
    width: 680px;
    min-height: 880px;
    border-radius: 4px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
    padding: 64px;
}

/* ── NDA gate ────────────────────────────────────── */
.nda-gate {
    min-height: 100vh;
    background: var(--invest-warm-ivory);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nda-card {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ── Q&A panel ───────────────────────────────────── */
.qa-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--invest-border);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
}
.qa-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--invest-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qa-messages { flex: 1; overflow-y: auto; padding: 16px 20px; }
.qa-message {
    margin-bottom: 16px;
}
.qa-message .qa-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--invest-navy);
    margin-bottom: 4px;
}
.qa-message .qa-body {
    font-size: 0.85rem;
    background: var(--invest-bg);
    padding: 10px 14px;
    border-radius: 8px;
    color: #333;
}
.qa-message.qa-admin .qa-body {
    background: rgba(0,150,136,0.08);
}
.qa-message .qa-time {
    font-size: 0.7rem;
    color: #adb5bd;
    margin-top: 4px;
}
.qa-input {
    padding: 12px 20px;
    border-top: 1px solid var(--invest-border);
    display: flex;
    gap: 8px;
}
.qa-input input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-family: var(--bs-body-font-family);
}
.qa-input button {
    background: var(--invest-teal);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ── Meeting scheduling ──────────────────────────── */
.calendly-placeholder {
    border: 1px solid var(--invest-border);
    border-radius: 8px;
    min-height: 750px;
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* ── Login gate ──────────────────────────────────── */
.invest-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0A2540 0%, #0F3558 50%, #0A2540 100%);
    color: #fff;
}
.invest-login .login-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    color: #fff;
}
.invest-login .login-card h2,
.invest-login .login-card h3 {
    color: #fff;
}
.invest-login .login-card p,
.invest-login .login-card .text-muted {
    color: rgba(255,255,255,0.7) !important;
}
.invest-login .login-card .form-control {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.invest-login .login-card .form-control::placeholder {
    color: rgba(255,255,255,0.4);
}
.invest-login .login-card .form-control:focus {
    background: rgba(255,255,255,0.12);
    border-color: var(--invest-teal);
    color: #fff;
}
.invest-login .btn-outline-teal {
    color: var(--invest-teal);
    border-color: var(--invest-teal);
}
.invest-login .btn-outline-teal:hover {
    background: var(--invest-teal);
    color: #fff;
}
.invest-login .divider-text {
    color: rgba(255,255,255,0.4);
}
.invest-login .invest-spinner {
    color: rgba(255,255,255,0.6);
}

/* ── Featured & Pinned assets ────────────────────── */
.featured-section {
    background: linear-gradient(135deg, rgba(201,151,59,0.04), rgba(201,151,59,0.02));
    border: 1px solid rgba(201,151,59,0.25);
    border-left: 4px solid var(--invest-gold);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 32px;
}
.featured-section .featured-header {
    font-family: var(--bs-heading-font-family);
    font-size: 1.15rem;
    color: var(--invest-gold);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.featured-section .doc-card {
    border-left: 3px solid var(--invest-gold);
}
.badge-featured {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    background: var(--invest-gold);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-pinned {
    font-size: 0.55rem;
    color: #6c757d;
}
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.play-overlay .material-symbols-rounded {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.5);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Admin preview banner ────────────────────────── */
.preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    background: rgba(201,151,59,0.95);
    color: #fff;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.preview-banner .btn-exit {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 3px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--bs-body-font-family);
}
.preview-banner .btn-exit:hover {
    background: rgba(255,255,255,0.35);
}

/* ── External rooms ──────────────────────────────── */
.password-mask {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: #6c757d;
}
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(13,110,253,0.08);
    color: #0d6efd;
}
.expiry-warning {
    font-size: 0.7rem;
    color: var(--invest-gold);
    font-weight: 600;
}

/* ── Category header ─────────────────────────────── */
.category-header {
    font-family: var(--bs-heading-font-family);
    font-size: 1.15rem;
    color: var(--invest-navy);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--invest-border);
}

/* ── Section label ───────────────────────────────── */
.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 12px;
}

/* ── Utility ─────────────────────────────────────── */
.btn-teal {
    background: var(--invest-teal);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-teal:hover { background: var(--invest-teal-deep); color: #fff; }

.btn-outline-teal {
    background: transparent;
    color: var(--invest-teal);
    border: 1px solid var(--invest-teal);
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline-teal:hover { background: var(--invest-teal); color: #fff; }

/* ── Spinner ─────────────────────────────────────── */
.invest-spinner {
    display: flex;
    justify-content: center;
    padding: 48px;
}
