/* ==============================
   LOGIN / REGISTER
============================== */

.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 26px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.06);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 26px;
    font-size: 26px;
}

.login-box input {
    margin-bottom: 12px;
}

.switch {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #6e6e73;
}

.switch a {
    color: #0071e3;
    text-decoration: none;
}

.switch a:hover {
    text-decoration: underline;
}

/* ==============================
   DASHBOARD
============================== */

.dashboard-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 66px 28px 84px;
}

.dashboard-pro {
    position: relative;
}

.dashboard-pro::before {
    content: "";
    position: fixed;
    inset: 70px auto auto 50%;
    width: min(760px, 80vw);
    height: min(760px, 80vw);
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 30%, rgba(91, 111, 207, 0.17), transparent 42%),
        radial-gradient(circle at 70% 55%, rgba(0, 113, 227, 0.12), transparent 44%);
    pointer-events: none;
    z-index: -1;
    filter: blur(4px);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.96fr);
    gap: 46px;
    align-items: center;
}

.dashboard-hero-copy {
    max-width: 680px;
}

.dashboard-hero-copy .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(91, 111, 207, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #4253ad;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-hero-copy .eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #5b6fcf;
    box-shadow: 0 0 0 5px rgba(91, 111, 207, 0.12);
}

.dashboard-hero h1 {
    max-width: 720px;
    margin: 0 0 24px 0;
    color: #111113;
    font-size: clamp(42px, 6vw, 70px);
    line-height: 0.96;
    letter-spacing: -2.8px;
    font-weight: 650;
}

.hero-description {
    max-width: 650px;
    margin: 0;
    color: #5f6067;
    font-size: 18px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 34px;
}

.hero-actions .primary-link,
.hero-actions .secondary-link {
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 650;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.10);
}

.hero-actions .secondary-link {
    box-shadow: none;
}

.hero-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-trust-row span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #e5e5e7;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #5f6067;
    font-size: 13px;
    font-weight: 500;
}

.clinical-console {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(210, 210, 215, 0.85);
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 247, 0.88)),
        radial-gradient(circle at 85% 0%, rgba(91, 111, 207, 0.18), transparent 34%);
    box-shadow: 0 28px 90px rgba(24, 32, 75, 0.12);
    cursor: default;
}

.clinical-console::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: rgba(91, 111, 207, 0.10);
}

.console-topbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 22px;
    border-bottom: 1px solid #e5e5e7;
    color: #6e6e73;
    font-size: 13px;
}

.console-topbar strong {
    margin-left: 8px;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 600;
}

.console-context {
    margin-left: auto;
    padding: 5px 9px;
    border: 1px solid #e5e5e7;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #8a8a8e;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.console-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #d2d2d7;
}

.console-dot:first-child {
    background: #5b6fcf;
}

.console-patient-card {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin: 24px 24px 18px;
    padding: 26px;
    border: 1px solid #e5e5e7;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.05);
}

.panel-label {
    display: block;
    margin-bottom: 10px;
    color: #6e6e73;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.console-patient-card h2 {
    max-width: 350px;
    margin: 0;
    color: #1d1d1f;
    font-size: 28px;
    line-height: 1.14;
    letter-spacing: -0.8px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #edf0ff;
    color: #4253ad;
    font-size: 12px;
    font-weight: 700;
}

.workflow-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0;
    padding: 0 30px 28px;
}

.workflow-step {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-top: 1px solid rgba(229, 229, 231, 0.9);
    background: transparent;
}

.workflow-step::before {
    content: "";
    position: absolute;
    top: 48px;
    left: 18px;
    bottom: -16px;
    width: 1px;
    background: #e5e5e7;
}

.workflow-step:last-child::before {
    display: none;
}

.workflow-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f5f5f7;
    color: #6e6e73;
    font-size: 13px;
    font-weight: 700;
}

.workflow-step.is-current span {
    background: #1d1d1f;
    color: #ffffff;
}

.workflow-step strong {
    display: block;
    margin-bottom: 3px;
    color: #1d1d1f;
    font-size: 15px;
}

.workflow-step p {
    margin: 0;
    color: #6e6e73;
    font-size: 13px;
    line-height: 1.45;
}

.dashboard-actions {
    margin-top: 42px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 16px;
}

.section-kicker {
    display: block;
    margin-bottom: 7px;
    color: #4253ad;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    color: #1d1d1f;
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.6px;
}

.section-heading p {
    max-width: 470px;
    margin: 0;
    color: #6e6e73;
    font-size: 14px;
    line-height: 1.5;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.action-card,
.quality-note {
    position: relative;
    min-height: 164px;
    border-radius: 24px;
    padding: 22px;
}

.action-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 15px;
    row-gap: 6px;
    align-items: center;
    border: 1px solid rgba(91, 111, 207, 0.26);
    background:
        linear-gradient(145deg, #ffffff, #f7f8ff);
    color: #1d1d1f;
    text-decoration: none;
    box-shadow: 0 16px 44px rgba(24, 32, 75, 0.08);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.action-card:hover {
    transform: translateY(-3px);
    border-color: rgba(91, 111, 207, 0.46);
    background:
        linear-gradient(145deg, #ffffff, #f1f3ff);
    box-shadow: 0 24px 60px rgba(24, 32, 75, 0.14);
}

.action-card:focus-visible {
    outline: none;
    border-color: #5b6fcf;
    box-shadow: 0 0 0 4px rgba(91, 111, 207, 0.18), 0 24px 60px rgba(24, 32, 75, 0.14);
}

.action-tag,
.info-tag {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.action-tag {
    background: #1d1d1f;
    color: #ffffff;
}

.info-tag {
    background: #f5f5f7;
    color: #8a8a8e;
}

.quick-icon,
.info-icon {
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 17px;
    font-size: 21px;
    font-weight: 650;
}

.quick-icon {
    background: #1d1d1f;
    color: #ffffff;
}

.info-icon {
    background: #f5f5f7;
    color: #6e6e73;
}

.action-card strong,
.quality-note strong {
    align-self: end;
    color: #1d1d1f;
    font-size: 16px;
    letter-spacing: -0.2px;
}

.action-card small,
.quality-note small {
    align-self: start;
    color: #6e6e73;
    font-size: 13px;
    line-height: 1.45;
}

.action-card small {
    grid-column: 2;
}

.action-cta {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    color: #4253ad;
    font-size: 13px;
    font-weight: 750;
}

.quality-note {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 15px;
    row-gap: 6px;
    align-items: center;
    border: 1px solid #e5e5e7;
    background: rgba(255, 255, 255, 0.72);
    color: #1d1d1f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    cursor: default;
}

.quality-note small {
    grid-column: 2;
}

.pro-features {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 22px;
    margin-top: 34px;
}

.feature {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #e5e5e7;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.035);
    cursor: default;
}

.feature-large {
    background:
        linear-gradient(145deg, #ffffff, #f7f8ff);
    border-color: rgba(91, 111, 207, 0.18);
}

.feature-kicker {
    display: block;
    margin-bottom: 14px;
    color: #4253ad;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.feature h3 {
    margin: 0 0 12px 0;
    color: #1d1d1f;
    font-size: 20px;
    line-height: 1.22;
    font-weight: 650;
    letter-spacing: -0.35px;
}

.feature p {
    margin: 0;
    color: #6e6e73;
    line-height: 1.62;
}

@media (max-width: 980px) {
    .dashboard-hero,
    .action-grid,
    .pro-features {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        gap: 28px;
    }

    .clinical-console {
        max-width: 620px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .dashboard-page {
        padding: 36px 18px 56px;
    }

    .dashboard-hero h1 {
        font-size: 40px;
        letter-spacing: -1.7px;
    }

    .clinical-console {
        border-radius: 24px;
    }

    .console-topbar {
        flex-wrap: wrap;
        padding: 12px 18px;
    }

    .console-context {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }

    .console-patient-card {
        flex-direction: column;
        margin: 16px;
        padding: 20px;
    }

    .workflow-list {
        padding: 0 20px 20px;
    }

    .action-card,
    .quality-note {
        grid-template-columns: 1fr;
    }

    .action-card small,
    .action-cta,
    .quality-note small {
        grid-column: auto;
    }

    .quick-icon,
    .info-icon {
        grid-row: auto;
    }
}


/* ==============================
   REPORT IA
============================== */

.report-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}

.report-subtitle {
    margin-top: 14px;
    color: #6e6e73;
    font-size: 15px;
}

.report-card {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 26px;
    padding: 30px;
}

.helper-text {
    color: #6e6e73;
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 18px;
}

.report-editor,
.report-editor-rich {
    width: 100%;
    min-height: 680px;
    padding: 26px;
    border-radius: 20px;
    border: 1px solid #d2d2d7;
    background: #fbfbfd;
    font-size: 15px;
    line-height: 1.7;
    resize: vertical;
}

.report-editor-rich {
    overflow: auto;
    color: #1d1d1f;
    outline: none;
}

.report-editor-rich:focus {
    background: #ffffff;
    border-color: #86868b;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.report-editor-rich p {
    margin: 0 0 14px 0;
    text-align: justify;
}

.report-editor-rich .generated-report-heading {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 10px 0;
    padding-bottom: 7px;
    border-bottom: 1px solid #222;
}

.report-editor-rich .generated-report-heading:first-child {
    margin-top: 0;
}

.report-editor-rich .generated-report-list {
    margin: 4px 0 16px 28px;
    padding: 0;
}

.report-editor-rich .generated-report-list li {
    margin: 0 0 6px 0;
    text-align: justify;
}

.report-editor-rich .generated-report-table {
    border-collapse: collapse;
    width: min(620px, 100%);
    margin: 10px 0 22px 0;
    font-size: 15px;
    line-height: 1.45;
    background: #ffffff;
}

.report-editor-rich .generated-report-table td,
.report-editor-rich .generated-report-table th {
    border: 1px solid #222;
    padding: 7px 10px;
    vertical-align: top;
}

.report-editor-rich .generated-report-table th {
    font-weight: 700;
    background: #f8fafc;
}

.report-editor-rich .generated-report-table .score-cell {
    width: 96px;
    text-align: left;
    white-space: nowrap;
}

.error-box {
    background: #fff4f4;
    border: 1px solid #ffd0d0;
    color: #8a1f1f;
    border-radius: 20px;
    padding: 24px;
}

.error-box p {
    margin-bottom: 0;
}


/* ==============================
   AI GENERATOR PANEL
============================== */

.ai-generator-panel {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 28px;
    align-items: start;
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 26px;
    padding: 30px;
    margin: 30px 0 38px 0;
    scroll-margin-top: 96px;
}

.ai-generator-copy h2 {
    margin-bottom: 12px;
}

.ai-generator-copy p:last-child {
    margin-bottom: 0;
    color: #6e6e73;
    font-size: 14px;
}

.ai-generator-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ai-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ai-generator-form label {
    margin-top: 0;
}

.ai-generator-form textarea {
    min-height: 150px;
}

.ai-generator-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ai-generator-actions span {
    color: #6e6e73;
    font-size: 13px;
}

@media (max-width: 900px) {
    .ai-generator-panel,
    .ai-form-row {
        grid-template-columns: 1fr;
    }
}

.ai-auto-detection-note {
    background: #f5f5f7;
    border: 1px solid #e5e5e7;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #424245;
}

.ai-auto-detection-note strong {
    color: #1d1d1f;
}

.ai-advanced-options {
    border: 1px solid #e5e5e7;
    border-radius: 18px;
    padding: 14px 16px;
    background: #ffffff;
}

.ai-advanced-options summary {
    cursor: pointer;
    font-weight: 600;
    color: #1d1d1f;
}

.ai-advanced-options .ai-form-row {
    margin-top: 16px;
}

/* ==============================
   BOTTOM AI GENERATOR CTA
============================== */

.ai-bottom-generator {
    max-width: 760px;
    margin: 42px auto 0;
    padding: 30px;
    text-align: center;
    border: 1px solid #e5e5e7;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.05);
}

.ai-bottom-generator h2 {
    margin: 0 0 10px 0;
}

.ai-bottom-generator p:not(.eyebrow) {
    max-width: 560px;
    margin: 0 auto 20px;
    color: #6e6e73;
    font-size: 14px;
    line-height: 1.6;
}

.ai-bottom-generator-form {
    display: flex;
    justify-content: center;
}

.ai-bottom-generator-form button {
    min-width: 210px;
}

@media (max-width: 680px) {
    .ai-bottom-generator {
        padding: 24px;
        border-radius: 24px;
    }

    .ai-bottom-generator-form button {
        width: 100%;
    }
}
