:root {
    --brand-primary: #0b3a53;
    --brand-secondary: #0e6e6c;
    --brand-accent: #e07a2d;
    --bg-soft: #edf4f7;
    --text-main: #19252f;
    --surface: rgba(255, 255, 255, .96);
    --surface-strong: #ffffff;
    --line-soft: #d7e4ec;
    --shadow-soft: 0 14px 34px rgba(8, 42, 61, .10);
    --shadow-card: 0 10px 24px rgba(15, 34, 46, .08);
}

body {
    color: var(--text-main);
    font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        linear-gradient(to bottom, rgba(237, 244, 247, 0.95), rgba(237, 244, 247, 0.97)),
        url("https://images.unsplash.com/photo-1518773553398-650c184e0bb3?auto=format&fit=crop&w=2200&q=80") center/cover fixed;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 0%, rgba(14, 110, 108, .12), transparent 30%),
        radial-gradient(circle at 90% 12%, rgba(224, 122, 45, .10), transparent 26%),
        linear-gradient(90deg, rgba(255,255,255,.20), transparent 24%, transparent 76%, rgba(255,255,255,.20));
    z-index: -1;
}

main.container-fluid {
    max-width: 1680px;
    margin: 0 auto;
    padding-left: clamp(16px, 2.2vw, 34px);
    padding-right: clamp(16px, 2.2vw, 34px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -.015em;
}

a {
    color: var(--brand-secondary);
}

a:hover {
    color: var(--brand-primary);
}

.immersive-session .alert-info {
    border: 1px solid #9fd3ea;
    background: linear-gradient(95deg, #d9f3ff 0%, #c7ecff 50%, #dff6ff 100%);
    box-shadow: 0 8px 20px rgba(20, 76, 108, 0.12);
}

.navbar {
    background:
        linear-gradient(110deg, rgba(11, 58, 83, .98) 0%, rgba(14, 110, 108, .96) 100%) !important;
}

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    letter-spacing: -.02em;
}

.navbar .nav-link {
    border-radius: 999px;
    padding: .42rem .72rem;
    margin: 0 .08rem;
    color: rgba(255,255,255,.72);
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.navbar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.10);
    transform: translateY(-1px);
}

.navbar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.site-logo {
    width: auto;
    height: 32px;
    max-width: 150px;
    object-fit: contain;
    border-radius: 4px;
}

.bg-primary,
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn {
    border-radius: 8px;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(8, 42, 61, .12);
}

.btn-outline-primary {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline-primary:hover {
    background: var(--brand-primary);
    color: #fff;
}

.card {
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    animation: fadeRise 0.45s ease both;
    background: var(--surface);
    backdrop-filter: blur(4px);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-soft);
}

.card-header {
    background: linear-gradient(135deg, #f8fbfd, #eef6f9);
    border-bottom-color: #d7e4ec;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #cfdae3;
    background-color: rgba(255,255,255,.96);
    min-height: 42px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 .2rem rgba(14, 110, 108, .14);
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    color: #355363;
    font-size: .8rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    background: #f4f8fb;
    border-bottom: 1px solid #d7e4ec;
}

.table tbody tr {
    transition: background .16s ease;
}

.table tbody tr:hover {
    background: rgba(14, 110, 108, .045);
}

.table-responsive,
.card-body:has(> .table) {
    border-radius: 10px;
}

.badge {
    border-radius: 999px;
    letter-spacing: .01em;
}

.alert {
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(8, 42, 61, .08);
    border: 0;
}

.intro-card {
    max-width: 980px;
    margin: 0 auto 1rem auto;
    border: 1px solid #b8d7ea;
    background:
        radial-gradient(circle at 85% -10%, rgba(93, 178, 224, 0.22), rgba(255, 255, 255, 0) 40%),
        radial-gradient(circle at 10% 120%, rgba(224, 122, 45, 0.12), rgba(255, 255, 255, 0) 40%),
        linear-gradient(180deg, #ffffff, #f6fbff);
}

.intro-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #0b3a53;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.metric {
    background:
        radial-gradient(circle at 100% 0%, rgba(14,110,108,.10), transparent 34%),
        #fff;
    border-left: 4px solid var(--brand-accent);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(8, 24, 34, 0.08);
    min-height: 96px;
}

.metric .h3,
.metric .h4,
.metric .h5 {
    color: var(--brand-primary);
    font-weight: 800;
}

.timer-box {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: rgba(8, 28, 42, 0.88);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 10px 24px rgba(8, 28, 42, .22);
}

.control-room-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.control-room-grid .metric {
    border-left: 0;
    position: relative;
    overflow: hidden;
}

.control-room-grid .metric::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--brand-secondary), var(--brand-accent));
}

#eventLog,
#evaluatorNotes,
#teamSummary,
#checklistExpected,
#checklistReview,
#decisionReview {
    scrollbar-width: thin;
    scrollbar-color: rgba(11,58,83,.34) transparent;
}

#eventLog > div,
#teamSummary > div,
#checklistReview > div,
#decisionReview > div,
#evaluatorNotes > div {
    border-radius: 10px !important;
    background: rgba(255,255,255,.76);
}

#scenarioPreview,
#complicationPreview {
    border-radius: 12px;
    overflow: hidden;
}

#scenarioPreview img,
#complicationPreview img,
#introScenarioBox img,
#activity2ScenarioBox img,
#complicationFocusBody img {
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(8,42,61,.12);
}

#stageInfo {
    border-radius: 14px;
    padding: 16px 18px;
    font-weight: 500;
}

#stageInfo strong {
    color: var(--brand-primary);
}

#decisionForm .border,
#presentationCard .border,
#debriefCard .border {
    border-color: #d8e5ee !important;
    border-radius: 14px !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,251,253,.92));
}

#decisionForm [data-section] {
    position: relative;
    padding-top: 18px !important;
}

#decisionForm [data-section] h3,
#decisionForm [data-section] h4,
#decisionForm [data-section] .h6 {
    color: var(--brand-primary);
}

#immediateActionsContainer,
#commTargetsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px 12px;
}

#immediateActionsContainer label,
#commTargetsContainer label {
    border: 1px solid #d8e5ee;
    border-radius: 10px;
    padding: 9px 10px;
    background: #fff;
    cursor: pointer;
    transition: border .16s ease, background .16s ease, transform .16s ease;
}

#immediateActionsContainer label:hover,
#commTargetsContainer label:hover {
    border-color: var(--brand-secondary);
    background: #f2faf9;
    transform: translateY(-1px);
}

#immediateActionsContainer input,
#commTargetsContainer input {
    margin-right: 6px;
    accent-color: var(--brand-secondary);
}

.drag-list {
    list-style: none;
    padding: 0;
}

.drag-item {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    margin-bottom: 8px;
    padding: 12px;
    cursor: move;
    transition: transform .2s ease, box-shadow .2s ease;
}

.drag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 14px rgba(16, 44, 60, 0.12);
}

.checklist-enhanced .checklist-item {
    display: grid;
    grid-template-columns: 22px 30px 1fr;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    border-color: #cfe0ec;
    position: relative;
    overflow: hidden;
}

.checklist-enhanced .checklist-item span:last-child {
    font-weight: 500;
}

.checklist-enhanced .checklist-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--brand-secondary), var(--brand-accent));
    opacity: .5;
}

.checklist-enhanced .drag-handle {
    font-weight: 700;
    color: #7d96a9;
    letter-spacing: -1px;
    user-select: none;
}

.checklist-enhanced .checklist-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #0b3a53;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(11, 58, 83, 0.25);
}

.checklist-enhanced .drag-item.dragging {
    transform: scale(1.01);
    box-shadow: 0 12px 24px rgba(16, 44, 60, 0.18);
    border-color: #84aecd;
}

.checklist-enhanced .drag-item {
    animation: checklistFade .3s ease both;
}

@keyframes checklistFade {
    from { opacity: .7; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.report-print {
    background: #fff;
    padding: clamp(24px, 3vw, 42px);
    border-radius: 14px;
    max-width: 1180px;
    margin: 0 auto;
    color: #172634;
    line-height: 1.55;
}

.report-deliverable section {
    margin: 0 0 34px 0 !important;
    padding: 24px;
    border: 1px solid #dce8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(8, 42, 61, .06);
    break-inside: avoid;
}

.report-deliverable h2.h5 {
    color: #0b3a53;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4eef4;
}

.report-deliverable h3.h6,
.report-deliverable h4.h6 {
    color: #203746;
    font-weight: 800;
}

.report-deliverable p {
    margin-bottom: .75rem;
}

.report-deliverable .report-cover {
    background: linear-gradient(120deg, #0b3a53, #0e6e6c);
    color: #fff;
    border-radius: 10px;
    padding: 18px 20px;
}

.report-cover-hero {
    position: relative;
    background:
        linear-gradient(120deg, rgba(11, 58, 83, .86), rgba(14, 110, 108, .78)),
        var(--cover-image) center/cover !important;
    min-height: 150px;
    overflow: hidden;
}

.report-cover-overlay {
    max-width: 760px;
}

.report-chip {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,.3);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    margin-bottom: 8px;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.report-metric {
    border: 1px solid #c8dce9;
    border-radius: 8px;
    background: #f7fbfd;
    padding: 10px 12px;
}

.report-metric span {
    display: block;
    font-size: .78rem;
    color: #4d6676;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.report-metric strong {
    display: block;
    font-size: 1.2rem;
    color: #0b3a53;
}

.report-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e8f0f5;
    overflow: hidden;
}

.report-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0e6e6c, #0b3a53);
}

.scenario-panel-compact {
    border: 1px solid #d1e1ea;
    border-radius: 14px;
    display: grid;
    grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
    gap: 22px;
    background: linear-gradient(135deg, #ffffff, #f7fbfd);
    padding: 18px;
    box-shadow: 0 8px 22px rgba(8, 42, 61, .08);
    align-items: start;
}

.report-media-frame {
    min-width: 0;
}

.scenario-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #d8e5ee;
    display: block;
    background: #eef4f7;
}

.complication-thumb {
    height: 190px;
}

.scenario-content {
    padding: 2px 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.scenario-content .small {
    font-size: .95rem;
    color: #2c3f4c;
}

.report-media-note {
    margin-top: 6px;
    padding: 6px 8px;
    border-left: 3px solid #0e6e6c;
    background: #eef8f7;
    color: #365363;
    font-size: .78rem;
    border-radius: 4px;
}

.report-legacy-block {
    border: 1px dashed #c8dce9;
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
}

.report-deliverable .border.rounded {
    border-color: #d9e6ee !important;
    border-radius: 12px !important;
}

.report-deliverable table {
    font-size: .92rem;
    width: 100%;
}

.report-deliverable .table-sm > :not(caption) > * > * {
    padding: .55rem .65rem;
}

.report-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.report-timeline-table {
    table-layout: fixed;
    min-width: 760px;
}

.report-timeline-table th:nth-child(1),
.report-timeline-table td:nth-child(1) {
    width: 140px;
}

.report-timeline-table th:nth-child(2),
.report-timeline-table td:nth-child(2) {
    width: 210px;
}

.report-timeline-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: normal;
}

.report-event-pill {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f2f6;
    color: #0b3a53;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
}

.report-note-list {
    display: grid;
    gap: 8px;
}

.report-note-item {
    border: 1px solid #d8e5ee;
    border-radius: 8px;
    background: #fbfdff;
    padding: 10px;
    break-inside: avoid;
}

.report-note-meta {
    color: #5b7080;
    font-size: .78rem;
    margin-bottom: 4px;
}

.evaluator-capture-card {
    position: sticky;
    top: 84px;
}

.evaluator-note-stream {
    max-height: 680px;
    overflow: auto;
    padding-right: 4px;
}

.evaluator-note-item {
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,251,253,.94));
    box-shadow: 0 6px 18px rgba(8, 42, 61, .06);
}

.evaluator-note-item:target {
    outline: 3px solid rgba(224, 122, 45, .24);
}

.complication-alert-title {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #8b1e2d;
    color: #fff;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
}

#complicationFocusCard .card-body {
    background: linear-gradient(135deg, #fff6f6, #ffe7e7);
    border-radius: 8px;
}

.page-hero {
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 1.35rem;
    min-height: 190px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(224,122,45,.26), transparent 22%),
        linear-gradient(100deg, rgba(9, 32, 48, 0.90), rgba(17, 51, 66, 0.66)),
        var(--hero-image) center/cover;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 22px 48px rgba(8, 42, 61, .16);
    position: relative;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 0 48%, rgba(255,255,255,.10) 48% 49%, transparent 49%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.16), transparent 28%);
    pointer-events: none;
}

.page-hero .hero-inner {
    width: 100%;
    padding: clamp(22px, 4vw, 38px);
    position: relative;
    z-index: 1;
}

.page-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.4vw, 2.25rem);
    font-weight: 850;
    max-width: 980px;
}

.page-hero p {
    margin: 4px 0 0 0;
    opacity: 0.9;
    max-width: 860px;
    font-size: 1rem;
}

.login-experience {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    min-height: 520px;
    background:
        linear-gradient(120deg, rgba(9, 32, 48, .88), rgba(14, 110, 108, .72)),
        var(--login-image) center/cover;
    box-shadow: 0 18px 45px rgba(6, 24, 35, .22);
}

.login-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .38;
}

.login-overlay {
    position: relative;
    z-index: 1;
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
}

.login-story {
    color: #fff;
    padding: clamp(28px, 5vw, 58px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.login-story h1 {
    max-width: 700px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.login-story p {
    max-width: 620px;
    color: rgba(255, 255, 255, .86);
}

.login-card-wrap {
    display: flex;
    align-items: center;
    padding: clamp(20px, 4vw, 42px);
}

.login-card {
    width: 100%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
    .login-overlay {
        grid-template-columns: 1fr;
    }

    .login-story {
        padding-bottom: 12px;
    }

    .evaluator-capture-card {
        position: static;
    }

    .evaluator-note-stream {
        max-height: none;
    }

    .scenario-panel-compact {
        grid-template-columns: 1fr;
    }

    .scenario-thumb,
    .complication-thumb {
        height: 220px;
    }
}

.pulse-highlight {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0% { transform: scale(1); color: var(--text-main); }
    50% { transform: scale(1.03); color: var(--brand-secondary); }
    100% { transform: scale(1); color: var(--text-main); }
}

@keyframes fadeRise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media print {
    nav,
    .page-hero,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .report-print {
        border: 0;
        padding: 0;
        max-width: none;
    }

    .report-deliverable section {
        box-shadow: none;
        padding: 14px 0;
        border: 0;
        border-top: 1px solid #dce8ef;
        border-radius: 0;
    }

    .scenario-panel-compact {
        grid-template-columns: 180px 1fr;
        box-shadow: none;
        break-inside: avoid;
    }

    .scenario-thumb,
    .complication-thumb {
        height: 130px;
    }
}
