@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --navy: #0F1C35;
    --teal: #0F766E;
    --teal-dark: #0D6560;
    --blue: #1E3A5F;
    --bg: #F7F8FB;
    --white: #ffffff;
    --slate-500: #64748b;
    --slate-600: #475569;
    --border: rgba(15, 28, 53, 0.1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--navy);
}

.app-shell {
    min-height: 100vh;
}

/* Welcome Page — matches cohere-resolve-experience.vercel.app landing */
.welcome-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 1rem;
}

@media (min-width: 640px) {
    .welcome-page {
        padding: 2rem;
    }
}

.welcome-container {
    max-width: 56rem;
    width: 100%;
}

.welcome-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 2.5rem;
}

.welcome-logo {
    height: 4rem;
    width: auto;
    object-fit: contain;
}

.logo-mark {
    width: 48px;
    height: 48px;
    background: var(--teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--slate-500);
    letter-spacing: 0.025em;
}

.welcome-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.welcome-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .welcome-header h1 {
        font-size: 2.25rem;
    }
}

.welcome-header p {
    color: var(--slate-600);
    margin: 0;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .welcome-header p {
        font-size: 1rem;
    }
}

.welcome-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .welcome-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.welcome-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-family: inherit;
    appearance: none;
}

.welcome-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.card-report:hover {
    border-color: var(--teal);
}

.card-login:hover {
    border-color: var(--blue);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.welcome-card:hover .card-icon {
    transform: scale(1.1);
}

.card-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: white;
}

.icon-blue {
    background: linear-gradient(to bottom right, #3b82f6, #1d4ed8);
}

.icon-teal {
    background: var(--teal);
}

.icon-navy {
    background: linear-gradient(to bottom right, #1E3A5F, #0F1C35);
}

.welcome-card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.25rem;
}

.welcome-card p {
    font-size: 0.75rem;
    color: var(--slate-500);
    margin: 0;
}

.welcome-footer {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

.welcome-footer p {
    font-size: inherit;
    color: inherit;
    margin: 0;
}

/* Login Page */
.login-page {
    display: flex;
    min-height: 100vh;
}

.login-left {
    display: none;
    width: 52%;
    background: var(--navy);
    color: white;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .login-left {
        display: flex;
    }
}

.login-left-content {
    padding: 3rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo {
    background: white;
    color: var(--navy);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 3rem;
    width: fit-content;
}

.login-tag {
    font-size: 0.7rem;
    color: var(--teal);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.login-left h1 {
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1.25rem;
}

.login-left>.login-left-content>p {
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    max-width: 20rem;
}

.login-features {
    list-style: none;
    padding: 0;
    margin: 2.5rem 0 0;
}

.login-features li {
    margin-bottom: 1rem;
}

.login-features strong {
    display: block;
    font-size: 0.875rem;
}

.login-features span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.login-form-wrap {
    max-width: 400px;
    margin: auto;
    width: 100%;
}

.login-form-wrap h2 {
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
}

.login-sub {
    color: var(--slate-500);
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
}

.back-link {
    background: none;
    border: none;
    color: var(--slate-500);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--navy);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    font-family: inherit;
    font-size: 0.875rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn-primary {
    background: var(--teal);
    color: white;
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--teal-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--navy);
    border: 1px solid #e2e8f0;
    padding: 0.7rem 1.25rem;
    border-radius: 0.6rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.demo-accounts {
    margin-top: 2rem;
}

.demo-title {
    font-size: 0.75rem;
    color: var(--slate-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.demo-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.demo-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.demo-btn:hover,
.demo-btn.active {
    border-color: var(--teal);
    background: #f0fdfa;
}

.demo-initials {
    width: 32px;
    height: 32px;
    background: var(--navy);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.demo-info {
    display: flex;
    flex-direction: column;
}

.demo-info strong {
    font-size: 0.8rem;
}

.demo-info small {
    font-size: 0.7rem;
    color: var(--slate-500);
}

/* ============================================================
   Portal / Intake — matched to reference design
   ============================================================ */

/* Page shell */
.portal-page {
    min-height: 100vh;
    background: #f0f1f4;
    color: #13263f;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ---- Top bar ---- */
.portal-header-wrapper {
    background: linear-gradient(180deg, #1d3558 0%, #0e2240 100%);
    color: #fff;
    padding: 2rem 0 3.5rem;
    box-shadow: inset 0 -1px rgba(255, 255, 255, 0.06);
}

.portal-header-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-header-content {
    text-align: left;
}

.portal-header-title {
    margin: 0 0 0.6rem 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.portal-header-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    white-space: nowrap;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #18856e;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.portal-exit {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    white-space: nowrap;
}

.portal-exit:hover {
    color: #fff;
}

/* ---- Main content area ---- */
.portal-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.portal-content h1 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #0f1e35;
}

.portal-subtitle {
    margin: 0 0 0;
    color: rgba(15, 30, 53, 0.65);
    font-size: 0.875rem;
    line-height: 1.55;
    max-width: 600px;
}

/* ---- Alert banner ---- */
.portal-alert {
    margin: 1.8rem 0 0;
    background: #fdf6e3;
    border: 1px solid #e8d9a5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    text-align: left;
}

.alert-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #b45309;
}

.alert-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: #1a2d4d;
}

.alert-title {
    font-size: 0.82rem;
}

.alert-copy small {
    font-size: 0.75rem;
    color: rgba(19, 38, 63, 0.65);
    line-height: 1.4;
}

.alert-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.alert-radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #1a2d4d;
    cursor: pointer;
    white-space: nowrap;
}

.alert-radio-label input[type="radio"] {
    accent-color: #1a2d4d;
    width: 14px;
    height: 14px;
}

.resume-btn {
    background: #1a7f73;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 0.42rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.resume-btn:hover {
    background: #15696e;
}

/* Legacy button aliases */
.primary-btn {
    background: #1a7f73;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.secondary-btn {
    background: transparent;
    color: #1a2d4d;
    border: 1px solid rgba(19, 38, 63, 0.2);
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* ---- Section title ---- */
.portal-section-title {
    margin: 2.4rem 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f1e35;
}

/* ---- Choice cards grid ---- */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.choice-card {
    background: #fff;
    border: 1px solid rgba(15, 30, 53, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.1rem;
    cursor: pointer;
    text-align: left;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
    min-height: 90px;
}

.choice-card:hover {
    box-shadow: 0 6px 20px rgba(15, 30, 53, 0.09);
    border-color: rgba(22, 126, 118, 0.4);
}

.choice-card-left {
    flex-shrink: 0;
}

.choice-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-person {
    background: rgba(21, 101, 192, 0.09);
    color: #1e5aa8;
}

.icon-file {
    background: rgba(90, 76, 154, 0.09);
    color: #4c3a9e;
}

.icon-briefcase {
    background: rgba(160, 98, 51, 0.09);
    color: #7c4a20;
}

.icon-help {
    background: rgba(217, 119, 6, 0.1);
    color: #a16207;
}

.choice-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 0;
}

.choice-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f1e35;
}

.choice-description {
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(15, 30, 53, 0.6);
}

.choice-card-arrow {
    flex-shrink: 0;
    color: rgba(15, 30, 53, 0.35);
    display: flex;
    align-items: center;
}

/* ---- Portal footer ---- */
.portal-footer {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(15, 30, 53, 0.1);
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    align-items: center;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: rgba(15, 30, 53, 0.65);
}

.footer-note {
    margin: 0.5rem 0 0;
    font-size: 0.72rem;
    line-height: 1.55;
    color: rgba(15, 30, 53, 0.5);
    max-width: 520px;
}

.footer-right {
    text-align: right;
    flex-shrink: 0;
    max-width: 280px;
}

.footer-powered {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(15, 30, 53, 0.75);
}

.footer-tagline {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.45;
    color: rgba(15, 30, 53, 0.5);
}

/* ---- Report choice page (step 1) ---- */
.report-choice-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

.report-choice-inner {
    max-width: 720px;
    margin: 0 auto;
}

.mini-back {
    background: transparent;
    border: none;
    color: #1a2d4d;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.2rem;
}

.report-choice-inner h2 {
    margin: 0 0 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1a2d4d;
}

.report-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.report-choice-card {
    background: #fff;
    border: 1px solid rgba(15, 30, 53, 0.14);
    border-radius: 10px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: 1.4rem 1.2rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.report-choice-card:hover {
    border-color: rgba(22, 126, 118, 0.45);
    box-shadow: 0 6px 18px rgba(15, 30, 53, 0.07);
}

.report-choice-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a2d4d;
    margin-bottom: 0.4rem;
    display: block;
}

.report-choice-sub {
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(15, 30, 53, 0.65);
    display: block;
}

/* ---- Wizard (step 2) ---- */
.wizard-page {
    min-height: 100vh;
    background: #f0f1f4;
}

.wizard-topbar {
    background: #182d4d;
    color: white;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    font-size: 0.88rem;
}

.wizard-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.wizard-dot {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 0.65rem;
}

.wizard-subtitle {
    font-weight: 500;
    opacity: 0.85;
}

.wizard-exit {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 1rem;
}

.wizard-progress-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid rgba(15, 30, 53, 0.1);
}

.progress-rail {
    overflow-x: auto;
    flex: 1;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 780px;
}

.progress-step {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e4e7eb;
    color: #5b6572;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.progress-step.active {
    background: #1b2d4d;
    color: white;
}

.progress-label {
    font-size: 0.7rem;
    color: #5c6675;
    white-space: nowrap;
}

.progress-label.active {
    color: #1b2d4d;
    font-weight: 700;
}

.progress-divider {
    height: 1px;
    width: 14px;
    background: rgba(15, 30, 53, 0.14);
    flex-shrink: 0;
}

.clear-data-btn {
    border: 1px solid rgba(15, 30, 53, 0.18);
    background: transparent;
    color: #1a2d4d;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    font-size: 0.75rem;
    white-space: nowrap;
}

.wizard-content {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 1.25rem 3rem;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.92fr);
    gap: 1.75rem;
}

.wizard-card {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(15, 30, 53, 0.12);
    border-radius: 14px;
    min-height: 460px;
    display: flex;
}

.wizard-card-body {
    width: 100%;
    padding: 2rem 2.2rem 1.5rem;
}

.wizard-step-label {
    margin: 0 0 0.8rem;
    color: #5d6c7c;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.wizard-card-body h3 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #1a2d4d;
}

.safe-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.safe-option {
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid rgba(15, 30, 53, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1a2d4d;
}

.safe-option input {
    width: 16px;
    height: 16px;
    margin: 0 0.75rem 0 0;
    accent-color: #1d536f;
}

.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
}

.save-exit-link {
    background: transparent;
    border: none;
    color: #1a2d4d;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

.continue-btn {
    background: #b1d3c8;
    border: none;
    color: #1a2d4d;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.wizard-side-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.side-card {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(15, 30, 53, 0.12);
    border-radius: 12px;
    padding: 1rem;
}

.side-card h4,
.side-card h5 {
    margin: 0 0 0.5rem;
    color: #1a2d4d;
}

.side-card p {
    margin: 0;
    color: rgba(15, 30, 53, 0.65);
    font-size: 0.85rem;
}

.quick-tutorials h5,
.faq-card h5 {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.tutorial-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(15, 30, 53, 0.07);
}

.tutorial-item:last-child {
    border-bottom: none;
}

.tutorial-play {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1a2d4d;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.tutorial-item strong {
    display: block;
    font-size: 0.82rem;
    color: #1a2d4d;
}

.tutorial-item small {
    font-size: 0.7rem;
    color: rgba(15, 30, 53, 0.55);
}

.faq-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(15, 30, 53, 0.07);
    color: #1a2d4d;
    font-size: 0.82rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.support-box {
    background: #1b2d4d;
    border-radius: 12px;
    color: white;
    padding: 1.1rem;
}

.support-box h4 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.support-box p {
    margin: 0 0 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
}

.support-box button {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    margin-top: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
}

@media (max-width: 700px) {
    .portal-header-inner {
        padding: 0 1rem;
    }

    .portal-content {
        padding: 1.5rem 1rem 3rem;
    }

    .portal-alert {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-actions {
        width: 100%;
    }

    .choice-grid,
    .report-choice-grid,
    .wizard-content {
        grid-template-columns: 1fr;
    }

    .portal-section-title {
        font-size: 1rem;
    }

    .progress-row {
        min-width: 700px;
    }

    .wizard-card-body {
        padding: 1.2rem;
    }

    .portal-footer {
        flex-direction: column;
        gap: 1.25rem;
    }

    .footer-right {
        text-align: left;
        max-width: 100%;
    }
}

/* Intake form styling remains below */
.intake-form {
    max-width: 40rem;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.intake-form h3 {
    margin: 0 0 1.5rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    width: auto;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.intake-success {
    max-width: 28rem;
    margin: 3rem auto;
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 56px;
    height: 56px;
    background: #d1fae5;
    color: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.ref-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.ref-box small {
    display: block;
    font-size: 0.7rem;
    color: var(--slate-500);
}

.ref-box strong {
    font-size: 1rem;
}

.success-note {
    font-size: 0.8rem;
    color: var(--slate-500);
}

/* Dashboard */
.dashboard-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    background: var(--navy);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.2s;
    position: relative;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    background: var(--teal);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: left;
    margin-bottom: 0.15rem;
    transition: all 0.15s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.nav-item.active {
    background: rgba(15, 118, 110, 0.3);
    color: white;
}

.nav-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-user {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--teal);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info strong {
    display: block;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info small {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
}

.collapse-btn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 0.65rem;
    z-index: 10;
}

.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-topbar {
    padding: 1.25rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-topbar h1 {
    font-size: 1.1rem;
    margin: 0;
}

.topbar-date {
    font-size: 0.75rem;
    color: var(--slate-500);
}

.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--slate-500);
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-open {
    color: #2563eb;
}

.stat-investigation {
    color: #d97706;
}

.stat-closed {
    color: var(--teal);
}

.stat-overdue {
    color: #dc2626;
}

/* Table */
.complaints-table {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.table-header,
.table-row {
    display: grid;
    grid-template-columns: 110px 1fr 100px 90px 110px;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    align-items: center;
    font-size: 0.8rem;
}

.complaints-table.full .table-header,
.complaints-table.full .table-row {
    grid-template-columns: 110px 1.5fr 100px 90px 90px 80px 100px 100px;
}

.table-header {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e2e8f0;
}

.table-row {
    border-bottom: 1px solid #f1f5f9;
}

.table-row:last-child {
    border-bottom: none;
}

.ref {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--teal);
    font-weight: 600;
}

.title-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge,
.priority-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
}

.status-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-investigation {
    background: #fef3c7;
    color: #b45309;
}

.status-closed {
    background: #d1fae5;
    color: #047857;
}

.status-underreview {
    background: #e0e7ff;
    color: #4338ca;
}

.priority-high {
    background: #fee2e2;
    color: #b91c1c;
}

.priority-medium {
    background: #fef3c7;
    color: #b45309;
}

.priority-low {
    background: #f1f5f9;
    color: #64748b;
}

.recent-section h3 {
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.empty-state {
    color: var(--slate-500);
    font-size: 0.875rem;
    padding: 2rem;
    text-align: center;
}

/* Audit */
.audit-entry {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
}

.audit-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.audit-meta strong {
    font-size: 0.85rem;
}

.audit-meta span {
    font-size: 0.7rem;
    color: var(--slate-500);
}

.audit-detail {
    font-size: 0.75rem;
    color: var(--slate-600);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Coming soon */
.coming-soon {
    text-align: center;
    padding: 4rem 2rem;
}

.coming-icon {
    width: 48px;
    height: 48px;
    background: #edf2f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
}

.coming-soon h2 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.coming-soon p {
    font-size: 0.85rem;
    color: var(--slate-500);
    max-width: 24rem;
    margin: 0 auto 0.5rem;
}

.coming-soon small {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Portal */
.portal-page {
    min-height: 100vh;
}

.portal-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-brand {
    font-weight: 600;
    font-size: 0.9rem;
}

.portal-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

.portal-user button {
    background: none;
    border: none;
    color: var(--slate-500);
    cursor: pointer;
    font-size: 0.8rem;
}

.portal-content {
    max-width: 48rem;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.portal-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.portal-empty h2 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.portal-empty p {
    color: var(--slate-500);
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
}

.portal-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.portal-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.portal-card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.portal-card p {
    font-size: 0.8rem;
    color: var(--slate-600);
    margin: 0 0 0.75rem;
}

.portal-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--slate-500);
}

.track-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 32rem;
}

.track-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fdfa;
    border-radius: 0.5rem;
}

#blazor-error-ui {
    display: none;
}