/* =========================
   RPA Integrator — Modern Bootstrap Theme
   ========================= */

/* Force light mode regardless of OS/browser preference */
:root {
    color-scheme: light only;
}

/* Override Bootstrap dark mode if triggered by system preference */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }
    body {
        background-color: #f7f9fc !important;
        color: #0f172a !important;
    }
}

/* --- Google Fonts: Sora (display) + DM Sans (body) --- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* --- Design tokens (light) --- */
:root {
    --rpai-font: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    --rpai-display-font: 'Sora', ui-sans-serif, system-ui, sans-serif;
    --rpai-bg: #f7f9fc;
    --rpai-surface: #ffffff;
    --rpai-border: #e6e9f2;
    --rpai-text: #0f172a;
    --rpai-muted: #5b6477;

    --rpai-primary: #3b82f6; /* Electric blue */
    --rpai-primary-600: #2563eb;
    --rpai-primary-100: #e0efff;

    --rpai-accent: #f59e0b;  /* Amber — CTAs & highlights */
    --rpai-accent-600: #d97706;

    --rpai-success: #16a34a;
    --rpai-danger: #e11d48;
    --rpai-warning: #f59e0b;

    --rpai-ring: 0 0 0 0.2rem rgba(59, 130, 246, 0.35); /* focus ring */
    --rpai-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
    --rpai-shadow-hover: 0 16px 36px rgba(2, 6, 23, 0.1);
}

/* --- Base typography and layout --- */
html,
body {
    font-family: var(--rpai-font);
    background: var(--rpai-bg);
    color: var(--rpai-text);
}

.content {
    padding-top: 1.1rem;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--rpai-display-font);
    letter-spacing: -0.02em;
    font-weight: 800;
}

.navbar-brand,
.rpai-brand {
    font-family: var(--rpai-display-font);
}

/* Amber accent CTA button */
.btn-accent {
    color: #fff;
    background-color: var(--rpai-accent);
    border-color: var(--rpai-accent);
    font-weight: 700;
}
.btn-accent:hover {
    background-color: var(--rpai-accent-600);
    border-color: var(--rpai-accent-600);
    color: #fff;
}

h1:focus {
    outline: none;
}

/* Subtle muted text */
.text-muted,
.form-text,
small,
.muted {
    color: var(--rpai-muted) !important;
}

/* --- Links --- */
a,
.btn-link {
    color: var(--rpai-primary);
    text-decoration: none;
}
a:hover,
.btn-link:hover {
    color: var(--rpai-primary-600);
    text-decoration: underline;
}

/* --- Buttons --- */
.btn-primary {
    color: #fff;
    background-color: var(--rpai-primary);
    border-color: var(--rpai-primary);
    box-shadow: var(--rpai-shadow);
}
.btn-primary:hover {
    background-color: var(--rpai-primary-600);
    border-color: var(--rpai-primary-600);
    box-shadow: var(--rpai-shadow-hover);
}
.btn-outline-primary {
    color: var(--rpai-primary);
    border-color: var(--rpai-primary);
    background: transparent;
}
.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--rpai-primary);
    border-color: var(--rpai-primary);
}

/* Consistent focus ring across controls */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.page-link:focus {
    box-shadow: var(--rpai-ring) !important;
    outline: none !important;
    border-color: var(--rpai-primary) !important;
}

/* --- Navbar & brand --- */
.navbar {
    box-shadow: var(--rpai-shadow);
}
.navbar-dark,
.navbar-light {
    background: linear-gradient(180deg, #0b1020, #121833) !important;
} /* subtle, confident */
.navbar .navbar-brand {
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* --- Sidebar (Blazor default) --- */
.nav-scrollable {
    background-color: var(--rpai-surface);
    border-right: 1px solid var(--rpai-border);
}
.nav-link {
    color: #324156 !important;
    border-radius: 0.5rem;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}
.nav-link:hover {
    background: #f0f6ff;
    color: var(--rpai-primary) !important;
}
.nav-link.active {
    color: var(--rpai-primary) !important;
    background: var(--rpai-primary-100);
    font-weight: 700;
}

/* --- Cards & surfaces --- */
.card {
    border: 1px solid var(--rpai-border);
    border-radius: 1rem;
    box-shadow: var(--rpai-shadow);
    background: var(--rpai-surface);
}
.card:hover {
    box-shadow: var(--rpai-shadow-hover);
}

/* --- Forms --- */
.form-control,
.form-select {
    border-radius: 0.75rem;
    border-color: var(--rpai-border);
    background: #fff;
}
.form-control::placeholder {
    color: #9aa3b2;
}
.form-check-input {
    border-color: #a7b1c2;
}
.darker-border-checkbox.form-check-input {
    border-color: #929292;
} /* keep your custom class */

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Validation (less harsh than red outlines) */
.valid.modified:not([type="checkbox"]) {
    border-color: var(--rpai-success) !important;
    box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.2);
}
.invalid,
.input-validation-error {
    border-color: var(--rpai-danger) !important;
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.15);
}
.validation-message {
    color: var(--rpai-danger);
}

/* --- Tables --- */
.table {
    border-color: var(--rpai-border);
    background: var(--rpai-surface);
    box-shadow: var(--rpai-shadow);
}
.table thead th {
    border-bottom: 1px solid var(--rpai-border);
}
.table-hover tbody tr:hover {
    background-color: #f6f9ff;
}

/* --- Badges, alerts, pills --- */
.badge {
    font-weight: 600;
}
.alert {
    border-radius: 0.75rem;
    border-color: var(--rpai-border);
    box-shadow: var(--rpai-shadow);
}

/* --- Icons --- */
.bi {
    vertical-align: -0.125em;
}

/* --- Error boundary (professional, less alarming) --- */
.blazor-error-boundary {
    background: #3f1f25;
    padding: 1rem 1rem 1rem 3.2rem;
    color: #fff;
    border-radius: 0.75rem;
    box-shadow: var(--rpai-shadow);
}
.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* --- Utilities --- */
.shadow-soft {
    box-shadow: var(--rpai-shadow) !important;
}
.shadow-soft-hover:hover {
    box-shadow: var(--rpai-shadow-hover) !important;
}
.rounded-2xl {
    border-radius: 1rem !important;
}

/* =========================
   Dark mode (auto)
   ========================= */
@media (prefers-color-scheme: dark) {
    :root {
        --rpai-bg: #0b1020;
        --rpai-surface: #0f162a;
        --rpai-border: rgba(255, 255, 255, 0.08);
        --rpai-text: #e8ecff;
        --rpai-muted: #a7b1d6;

        --rpai-primary: #6ea8fe;
        --rpai-primary-600: #5896fa;
        --rpai-primary-100: rgba(110, 168, 254, 0.15);

        --rpai-ring: 0 0 0 0.2rem rgba(110, 168, 254, 0.35);
        --rpai-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        --rpai-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.5);
    }

    .navbar-dark,
    .navbar-light {
        background: linear-gradient(180deg, #0b1020, #0f162a) !important;
    }

    .nav-link {
        color: #cfd8ff !important;
    }
    .nav-link:hover {
        background: rgba(110, 168, 254, 0.1);
        color: #ffffff !important;
    }
    .nav-link.active {
        background: var(--rpai-primary-100);
        color: #fff !important;
    }

    .card,
    .table,
    .alert {
        background: var(--rpai-surface);
        border-color: var(--rpai-border);
    }

    .table-hover tbody tr:hover {
        background-color: rgba(110, 168, 254, 0.06);
    }

    .form-control,
    .form-select {
        background: #0f162a;
        color: var(--rpai-text);
        border-color: var(--rpai-border);
    }
    .form-control::placeholder {
        color: #8e99bb;
    }

    .blazor-error-boundary {
        background: #4c1d1d;
        color: #fff;
    }
}

/* =========================
   Keep any template-specific quirks
   ========================= */
/* Collapse sidebar by default on all viewports */

/* =============================================
   PHASE 1 EXPANSION — Additional Styles
   ============================================= */

/* --- Utility spacing --- */
.py-6 { padding-top: 4rem; padding-bottom: 4rem; }

/* --- Navbar --- */
.rpai-navbar {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: 64px;
}
.rpai-brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: #fff !important;
}
.brand-icon {
    display: inline-block;
    margin-right: 0.4rem;
    color: var(--rpai-primary);
}
.rpai-nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.rpai-nav-link:hover,
.rpai-nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}
.rpai-cta-btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
}

/* --- Footer --- */
.rpai-footer {
    background: #f1f5f9;
    border-top: 1px solid var(--rpai-border);
}
.footer-link {
    color: var(--rpai-muted);
    text-decoration: none;
    font-size: 0.85rem;
}
.footer-link:hover { color: var(--rpai-primary); }

/* --- Page Wrapper --- */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.main-content {
    flex: 1;
}
/* Remove default Blazor content padding on full-width pages */
.content { padding-top: 0 !important; }

/* --- Hero (Home) --- */
.rpai-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
    padding: 5rem 0;
}
.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(59,130,246,.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(99,179,255,.08) 0%, transparent 50%);
    pointer-events: none;
}
.hero-accent { color: var(--rpai-primary); }
.text-white-75 { color: rgba(255,255,255,.75); }
.text-white-50 { color: rgba(255,255,255,.5); }
.hero-card-cluster { position: relative; height: 300px; }
.hero-stat-card {
    position: absolute;
    min-width: 240px;
    border-radius: 12px;
    animation: floatCard 5s ease-in-out infinite;
}
.hero-stat-card:nth-child(1) { top: 10px; left: 0; }
.hero-card-2 { top: 110px; left: 80px; animation-delay: 1.5s; }
.hero-card-3 { top: 210px; left: 20px; animation-delay: 3s; }
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.hero-stat-icon { width: 44px; height: 44px; display:flex;align-items:center;justify-content:center; }

/* --- Badge Pill --- */
.rpai-badge-pill {
    background: rgba(59,130,246,.18);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,.3);
    border-radius: 50px;
    font-size: 0.8rem;
    padding: .4rem 1rem;
    font-weight: 600;
}

/* --- Trust Bar --- */
.rpai-trust-bar { background: #fff; }

/* --- Section Alternating --- */
.rpai-section-alt { background: #f8fafc; }

/* --- Service Cards --- */
.rpai-service-card {
    border-radius: 12px !important;
    transition: transform .2s, box-shadow .2s;
}
.rpai-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,.1) !important;
}

/* --- Check list --- */
.rpai-check-list li { margin-bottom: .75rem; font-size: 1rem; }
.rpai-feature-list li { margin-bottom: .5rem; font-size: .9rem; }

/* --- Industry Pills --- */
.rpai-industry-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem .75rem;
    border: 1px solid var(--rpai-border);
    border-radius: 12px;
    background: #fff;
    color: var(--rpai-text) !important;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.rpai-industry-pill:hover {
    border-color: var(--rpai-primary);
    box-shadow: 0 4px 16px rgba(59,130,246,.15);
    transform: translateY(-2px);
    color: var(--rpai-primary) !important;
}

/* --- CTA Banner --- */
.rpai-cta-banner {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #1d4ed8 100%);
}

/* --- Page Hero (inner pages) --- */
.rpai-page-hero {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
}

/* --- Stats Bar --- */
.rpai-stats-bar { background: #f0f7ff; border-top: 1px solid #dbeafe; border-bottom: 1px solid #dbeafe; }

/* --- Phase Cards --- */
.rpai-phase-card {
    position: relative;
    border-right: 1px solid var(--rpai-border);
}
.rpai-phase-card:last-child { border-right: none; }
.phase-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--rpai-primary);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* --- Tech Card hover --- */
.rpai-tech-card {
    transition: transform .15s, box-shadow .15s;
    cursor: default;
}
.rpai-tech-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* --- Industry Use Case Chip --- */
.rpai-use-case-chip { font-weight: 500; transition: border-color .15s; }
.rpai-use-case-chip:hover { border-color: var(--rpai-primary) !important; }

/* --- Contact Success Card --- */
.rpai-success-card { background: #f0fdf4; border-color: #bbf7d0 !important; }

/* --- Dashboard --- */
.rpai-dashboard {
    background: #f1f5f9;
    min-height: 100vh;
}
.dashboard-header { background: #fff; }
.dashboard-body {}

.rpai-kpi-card {
    border-radius: 10px !important;
    transition: transform .15s;
}
.rpai-kpi-card:hover { transform: translateY(-2px); }
.kpi-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; }

/* Live indicator dot */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    animation: pulse-dot 1.5s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(.85); }
}

/* Activity dots */
.activity-dot { margin-top: 3px; }

/* Sparkline container */
.rpai-sparkline-container { background: #f8fafc; border-radius: 8px; padding: 0.75rem; }

/* =============================================
   BRAND REFRESH — Typography & SVG Workflow
   ============================================= */

/* Body uses DM Sans */
html, body {
    font-family: var(--rpai-font) !important;
}

/* SVG Workflow Diagram */
.rpai-workflow-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(30, 64, 175, 0.15), 0 4px 12px rgba(0,0,0,.08);
    border: 1px solid #dbeafe;
    background: #f8faff;
}
.rpai-workflow-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Amber accent applied to primary CTA buttons in hero/cta areas */
.rpai-cta-banner .btn-light {
    background: var(--rpai-accent);
    border-color: var(--rpai-accent);
    color: #fff;
    font-weight: 700;
}
.rpai-cta-banner .btn-light:hover {
    background: var(--rpai-accent-600);
    border-color: var(--rpai-accent-600);
    color: #fff;
}

/* Hero accent word uses amber */
.hero-accent { color: var(--rpai-accent) !important; }

/* Sora on display-size text in hero */
.rpai-hero h1,
.rpai-page-hero h1 {
    font-family: var(--rpai-display-font);
    letter-spacing: -0.03em;
}

/* Phase number circles use amber accent */
.phase-number {
    background: var(--rpai-accent) !important;
}

/* =============================================
   SVG Workflow Diagram — extracted from Home.razor
   (Kept here so Razor parser never sees @keyframes)
   ============================================= */
.wf-spoke { fill: none; stroke: #93c5fd; stroke-width: 1.8; stroke-dasharray: 6 5; }
.wf-spoke-anim { animation: wfFlow 2s linear infinite; }
@keyframes wfFlow { to { stroke-dashoffset: -22; } }

.wf-node-rect      { fill: #fff; stroke: #3b82f6; stroke-width: 1.5; }
.wf-node-rect-warn { fill: #fff; stroke: #f59e0b; stroke-width: 1.5; }
.wf-node-rect-ok   { fill: #fff; stroke: #16a34a; stroke-width: 1.5; }

.wf-label    { font-family: 'Sora','DM Sans',sans-serif; font-size: 9.5px; font-weight: 700; fill: #1e293b; text-anchor: middle; dominant-baseline: middle; }
.wf-sublabel { font-family: 'DM Sans',sans-serif; font-size: 7.5px; font-weight: 400; fill: #6b7280; text-anchor: middle; dominant-baseline: middle; }

.wf-hub-poly  { fill: #2563eb; }
.wf-hub-label { font-family: 'Sora',sans-serif; font-size: 11px; font-weight: 800; fill: #fff; text-anchor: middle; dominant-baseline: middle; }

.wf-dot   { fill: #f59e0b; }
.wf-pulse { fill: none; stroke: #3b82f6; stroke-width: 1; opacity: 0; animation: wfPulse 2.4s ease-out infinite; }
@keyframes wfPulse { 0% { r: 42; opacity: .5; } 100% { r: 72; opacity: 0; } }

.wf-badge-rect { fill: #f0f9ff; stroke: #bfdbfe; stroke-width: 1; }
.wf-badge-ok   { fill: #dcfce7; stroke: #86efac; stroke-width: 1; }
.wf-badge-text { font-family: 'DM Sans',sans-serif; font-size: 8px; fill: #374151; dominant-baseline: middle; }

/* =============================================
   PHASE 2A — Auth, Admin & Client Portal Styles
   ============================================= */

/* --- Login page --- */
.rpai-login-icon {
    width: 72px; height: 72px;
    background: #eff6ff;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
}
.rpai-google-btn {
    background: #fff;
    border: 1.5px solid #dadce0;
    color: #3c4043;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    transition: box-shadow .15s, border-color .15s;
}
.rpai-google-btn:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    border-color: #bbb;
    color: #1a1a1a;
}

/* --- NavMenu user chip --- */
.nav-user-chip {
    font-size: .8rem;
    font-weight: 500;
    color: rgba(255,255,255,.75);
    font-family: 'DM Sans', sans-serif;
}

/* ── ADMIN LAYOUT ──────────────────────────────────── */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

/* Sidebar */
.admin-sidebar {
    width: 240px;
    min-width: 240px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
}
.admin-sidebar-brand {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.admin-brand-link {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}
.admin-brand-gear { font-size: 22px; color: #3b82f6; }
.admin-brand-name {
    font-family: 'Sora', sans-serif;
    font-weight: 800; font-size: 14px; color: #fff;
    letter-spacing: -.02em; line-height: 1.2;
}
.admin-brand-sub { font-size: 10px; color: rgba(255,255,255,.4); font-weight: 500; letter-spacing: .06em; }

/* Admin nav */
.admin-nav { padding: 16px 8px; flex: 1; }
.admin-nav-section-label {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: rgba(255,255,255,.3);
    padding: 0 8px; margin-bottom: 4px;
}
.admin-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 8px;
    color: rgba(255,255,255,.65);
    text-decoration: none; font-size: .875rem; font-weight: 500;
    transition: background .15s, color .15s;
    margin-bottom: 2px;
}
.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.admin-nav-link i { font-size: 15px; width: 18px; text-align: center; }
.admin-nav-link span:first-of-type { flex: 1; }
.admin-nav-soon { opacity: .6; cursor: default; pointer-events: none; }
.admin-nav-badge {
    font-size: 9px; font-weight: 700; background: rgba(59,130,246,.25);
    color: #93c5fd; border-radius: 4px; padding: 2px 5px;
}

/* Sidebar footer */
.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.admin-user-chip {
    display: flex; align-items: center;
    color: rgba(255,255,255,.5); font-size: .8rem;
    overflow: hidden;
}

/* Main content */
.admin-main {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.admin-topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 50;
}
.admin-content { flex: 1; }

/* Admin KPI cards */
.admin-kpi-card { border-radius: 10px !important; transition: transform .15s; }
.admin-kpi-card:hover { transform: translateY(-2px); }
.admin-kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; font-weight: 600; }

/* Roadmap dots */
.roadmap-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── CLIENT LAYOUT ─────────────────────────────────── */
.client-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8fafc;
}
.client-topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky; top: 0; z-index: 50;
}
.client-brand {
    font-family: 'Sora', sans-serif;
    font-weight: 800; font-size: 15px;
    color: #0f172a; text-decoration: none;
    letter-spacing: -.02em;
}
.client-portal-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: #3b82f6;
    background: #eff6ff; border-radius: 4px; padding: 2px 8px;
}
.client-nav-link {
    display: flex; align-items: center;
    padding: 6px 10px; border-radius: 6px;
    color: #4b5563; text-decoration: none;
    font-size: .85rem; font-weight: 500;
    transition: background .15s, color .15s;
}
.client-nav-link:hover, .client-nav-link.active {
    background: #f1f5f9; color: #0f172a;
}
.client-nav-soon { opacity: .5; cursor: default; pointer-events: none; }
.client-user-pill {
    font-size: .8rem; font-weight: 500; color: #4b5563;
    background: #f1f5f9; border-radius: 20px; padding: 4px 10px;
}
.client-content { flex: 1; }

/* Client feature cards */
.client-feature-card { border-radius: 12px !important; transition: transform .15s, box-shadow .15s; }
.client-feature-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.08) !important; }
.client-feature-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }

/* Responsive: hide admin sidebar on mobile */
@media (max-width: 767px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
}

/* =============================================
   PHASE 2B — Client Portal Pages
   ============================================= */

/* Portal KPI cards */
.portal-kpi-card { border-radius: 10px !important; transition: transform .15s; }
.portal-kpi-card:hover { transform: translateY(-2px); }
.portal-kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; font-weight: 600; }

/* Bot cards on automation board */
.portal-bot-card { border-radius: 12px !important; transition: transform .15s, box-shadow .15s; }
.portal-bot-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.08) !important; }

/* Document vault cards */
.doc-vault-card { border-radius: 12px !important; transition: transform .15s, box-shadow .15s; }
.doc-vault-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.08) !important; }
.doc-vault-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }

/* =============================================
   VIDEO LIBRARY — Public & Admin
   ============================================= */

/* Video card */
.video-card { border-radius: 12px !important; transition: transform .2s, box-shadow .2s; overflow: hidden; }
.video-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.1) !important; }
.video-title:hover { color: var(--rpai-primary); }

/* Thumbnail */
.video-thumb-wrap { overflow: hidden; aspect-ratio: 16/9; background: #0f172a; }
.video-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.video-card:hover .video-thumb { transform: scale(1.04); }

/* Play overlay */
.video-play-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.3);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s;
}
.video-thumb-wrap:hover .video-play-overlay { opacity: 1; }
.video-play-btn {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,.92);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--rpai-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

/* Video modal */
.video-modal-backdrop {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.88);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.video-modal-inner {
    width: 100%; max-width: 860px;
}
.video-embed-wrap {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: 12px; background: #000;
}
.video-embed-frame {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: none;
}

/* Dashboard sales banner */
.dashboard-sales-banner {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.dashboard-preview-badge {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; background: rgba(255,255,255,.15);
    color: #fff; border-radius: 20px; padding: 4px 10px;
    white-space: nowrap; flex-shrink: 0;
}

/* =============================================
   ERROR PAGES — Crashed & Lost Robot
   ============================================= */
.error-robot-wrap {
    max-width: 380px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.08));
}
.error-robot-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   ADMIN CLIENT VIEW BANNER
   ============================================= */
.client-view-admin-banner {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-bottom: 1px solid rgba(255,255,255,.1);
    position: sticky;
    top: 56px;
    z-index: 40;
}

/* =============================================
   SERVICES PAGE — Engagement Journey
   ============================================= */
.engagement-phase-number {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: #e2e8f0;
    font-family: 'Sora', sans-serif;
    margin-bottom: .25rem;
    letter-spacing: -.05em;
}
.engagement-phase-label {
    letter-spacing: .1em;
}
.engagement-phase-card {
    transition: transform .2s;
}
.engagement-phase-card:hover {
    transform: translateY(-4px);
}
.selective-fit-item {
    display: flex;
    align-items: center;
}
.letter-space {
    letter-spacing: .08em;
}
.mb-6 {
    margin-bottom: 4rem !important;
}
.py-6 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}
