:root {
    --pp-navy: #0d2f55;
    --pp-blue: #146aa5;
    --pp-teal: #11a9aa;
    --pp-bg: #f4f7fa;
    --pp-border: #e6ebf0;
}

body {
    background: var(--pp-bg);
    color: #1e2b37;
}

.login-page {
    background:
        radial-gradient(circle at top left, rgba(17,169,170,.13), transparent 35%),
        radial-gradient(circle at bottom right, rgba(20,106,165,.14), transparent 35%),
        #f5f8fb;
}

.login-logo {
    width: min(300px, 80%);
    max-height: 150px;
    object-fit: contain;
}

.login-card { border-radius: 20px; }

.sidebar {
    width: 265px;
    background: linear-gradient(180deg, #0b2c50 0%, #0d4069 100%);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 18px 16px;
    background: rgba(255,255,255,.97);
    margin: 16px;
    border-radius: 16px;
}

.brand-logo {
    width: 195px;
    height: 95px;
    object-fit: contain;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.78);
    border-radius: 10px;
    padding: .75rem .9rem;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.sidebar-footer { color: rgba(255,255,255,.9); }
.app-main { min-width: 0; }

.card { border-radius: 16px; }

.metric-card {
    border: 0;
    box-shadow: 0 6px 22px rgba(15, 45, 75, .06);
}

.metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(17,169,170,.12);
    color: var(--pp-teal);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.btn-primary {
    --bs-btn-bg: var(--pp-blue);
    --bs-btn-border-color: var(--pp-blue);
    --bs-btn-hover-bg: #105d91;
    --bs-btn-hover-border-color: #105d91;
}

.info-label {
    color: #6c7b88;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .045em;
    margin-bottom: .25rem;
}

.notes-box {
    white-space: pre-wrap;
    padding: 1rem;
    border-radius: 12px;
    background: #f7f9fb;
    border: 1px solid var(--pp-border);
}

.status-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.enabled {
    background: #18a66a;
    box-shadow: 0 0 0 4px rgba(24,166,106,.12);
}

.status-dot.disabled {
    background: #9aa7b2;
    box-shadow: 0 0 0 4px rgba(154,167,178,.13);
}

.cost-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--pp-border);
}

.table > :not(caption) > * > * { padding: .9rem 1rem; }

/* Body map */
.body-map-editor,
.body-map-display {
    position: relative;
    width: min(100%, 290px);
    margin: 0 auto;
    background: linear-gradient(180deg, #fbfdff, #f2f7fa);
    border: 1px solid var(--pp-border);
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 240 / 520;
}

.body-map-editor {
    cursor: crosshair;
}

.body-svg {
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px;
}

.body-shape {
    fill: #dfe8ee;
    stroke: #90a7b8;
    stroke-width: 2;
}

.body-map-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #e74c3c;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(231,76,60,.18), 0 2px 8px rgba(0,0,0,.18);
    z-index: 5;
}

a.body-map-marker:hover {
    width: 22px;
    height: 22px;
}

.historical-marker {
    background: #7f8c8d;
    box-shadow: 0 0 0 3px rgba(127,140,141,.18), 0 2px 8px rgba(0,0,0,.14);
}

.legend-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50%;
    margin-right: .35rem;
}

.legend-dot.current { background: #e74c3c; }
.legend-dot.historical { background: #7f8c8d; }

.timeline-item {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 0 0 1.25rem 1.4rem;
    border-left: 2px solid #e3ebf1;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    left: -7px;
    top: 4px;
    border-radius: 50%;
    background: var(--pp-teal);
    box-shadow: 0 0 0 4px #fff;
}

@media (max-width: 991.98px) {
    .app-main { width: 100%; }
}


/* v0.5 clinical plan source text */
.clinical-source-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: .92rem;
    padding: .9rem;
    background: #f7f9fb;
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    color: #34495e;
}
