@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}
*, *::before, *::after {
    box-sizing: border-box;
}


/* Fade-in for the entire Tools Hub page. 
    Add this near the top of app.css (after your resets) */

.tools-hub-container {
    animation: fadePage 0.5s ease-out;
}

@keyframes fadePage {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.header, footer {
    height: 10vh; /* This sets the header and footer height */
}

.page-container {
    padding-top: 10vh; /* This adds space at the top equal to the header height */
    padding-bottom: 1vh; /* This adds space at the top equal to the header height */
    display: flex;
    flex-direction: column;
    min-height: 55vh; /* This should be 100vh to cover the full height of the viewport */
}


a, .btn-link {
    color: #006bb7;
}


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    min-height: calc(100vh - [header height] - [footer height]);
    padding-top: 1.1rem;
    position: relative;
    z-index: 2; /* Ensures content is above the semi-transparent overlay */
}


html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.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;
}

.profile-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 400px;
    margin-top: 20px;
}

.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 16px;
    border: 2px solid #e0e0e0;
}

.profile-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
}

.profile-email {
    font-size: 0.95rem;
    color: #666;
}

.triage-landing {
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.card {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .card:hover {
        transform: scale(1.03);
        box-shadow: 0px 8px 18px rgba(0,0,0,0.2);
    }

.disclaimer-box {
    background-color: #fff8e1;
    border-left: 5px solid #f0ad4e;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    border-radius: 8px;
}

    .disclaimer-box h5 {
        font-weight: 700;
        color: #a86a00;
    }

.triage-landing {
    max-width: 1000px;
    margin: auto;
}

.tier-card {
    border-radius: 12px;
    transition: transform 0.25s, box-shadow 0.25s;
}

    .tier-card:hover {
        transform: scale(1.03);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }



/* === NursingTriage Form Styling === */
.form-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

.patient-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

    .patient-info label {
        width: 100px;
        font-weight: 600;
        margin-right: 0.5rem;
    }

    .patient-info input {
        flex: 1;
        min-width: 100px;
    }

.form-group {
    margin-bottom: 1.2rem;
}

    .form-group label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.3rem;
    }

textarea, input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.95rem;
}

    textarea:focus, input:focus {
        outline: none;
        border-color: #66afe9;
        box-shadow: 0 0 5px rgba(102,175,233,0.5);
    }

button.submit-button, .btn-success {
    display: inline-block;
    width: 100%;
    background-color: #198754;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

    button.submit-button:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

    button.submit-button:hover:enabled {
        background-color: #157347;
    }

.submit-container {
    text-align: center;
    margin-top: 1.5rem;
}

/* === Disclaimer Box === */
.disclaimer-box {
    background-color: #fff8e1;
    border-left: 6px solid #f0ad4e;
    padding: 1.2rem 1.6rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

    .disclaimer-box h5 {
        font-weight: 700;
        color: #a86a00;
    }


/* === End of NursingTriage Form Styling === */

/* Sidebar gradient background */
.sidebar-body {
    background: linear-gradient(180deg, #0a0f1f 0%, #17173a 40%, #2b174a 100%);
    min-height: 100vh;
}

/* Header */
.sidebar-header {
    background: rgba(15, 15, 40, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Base link style */
.nav-link {
    color: lightgray;
    font-weight: 500;
    transition: all 0.25s ease-in-out;
    border-radius: 8px;
}

    /* Hover glow */
    .nav-link:hover {
        color: white !important;
        text-shadow: 0 0 6px rgba(255,255,255,0.8);
        background: rgba(255,255,255,0.1);
        transform: translateX(4px);
    }

    /* Main feature links */
    .nav-link.mainlink {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }

    /* Sub-links */
    .nav-link.sublink {
        font-size: 1rem;
        margin-left: 10px;
    }

/* Gradient divider */
.divider {
    border: 0;
    height: 1px;
    margin: 10px 0;
    background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.3), rgba(255,255,255,0.1));
}

/* Icon hover animation */
.nav-link span.bi {
    transition: transform 0.3s ease;
}

.nav-link:hover span.bi {
    transform: scale(1.25) rotate(5deg);
}

/* Accent colors */
.text-golden {
    color: lightgoldenrodyellow !important;
}

.text-red {
    color: orangered !important;
}

.text-green {
    color: lightgreen !important;
}

.text-cyan {
    color: lightcyan !important;
}

.text-pink {
    color: hotpink !important;
}

.sidebar-body {
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.nav-link.mainlink:hover {
    box-shadow: 0 0 12px rgba(255,255,255,0.2);
}

/* === Footer Section === */
.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.15);
    background: linear-gradient(to bottom, rgba(15,15,40,0.7), rgba(25,20,60,0.9));
    padding: 10px 15px;
}

.footer-toggle {
    color: lightgray;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-weight: 600;
    transition: 0.3s;
}

    .footer-toggle:hover {
        color: white;
        text-shadow: 0 0 8px rgba(255,255,255,0.8);
        transform: translateX(4px);
    }

.footer-content {
    margin-top: 6px;
    padding-left: 8px;
    animation: slideDown 0.4s ease;
}

.footer-link {
    display: block;
    color: lightgray !important;
    text-decoration: none;
    padding: 4px 0;
    transition: 0.3s;
}

    .footer-link:hover {
        color: white !important;
        text-shadow: 0 0 6px rgba(255,255,255,0.6);
    }

/* Expand/collapse animation */
.collapse {
    display: none;
}

.expand {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Fix: Keep top bar fixed and prevent overlap === */
.top-row {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px; /* adjust if your bar is taller */
    background: linear-gradient(90deg, #0d1b2a, #1b263b);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 1000; /* ensures it's always above scrolling content */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}


/* The main content also starts below it */


body.light-mode .content {
    background: #ffffff;
    color: #222;
}

body.dark-mode .content {
    background: linear-gradient(180deg, #101828, #181a34);
    color: #e0e0e0;
}

/* Optional: subtle shadow under header for clarity */
.top-row {
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.page {
    display: flex;
    flex-direction: row;
    height: 100vh;
    overflow: hidden;
}

main {
    flex: 1;
    overflow-y: auto;
}


/* Ensure top bar and sidebar colors blend */
.top-row {
    background: linear-gradient(90deg, #0a0f1f, #17173a 70%, #1b263b);
}


/* === Active link glow === */
.nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.5), 0 0 20px rgba(0, 200, 255, 0.3), inset 0 0 8px rgba(0, 200, 255, 0.2);
    transform: scale(1.02);
    transition: all 0.25s ease;
}

    /* Optional — brighter hover for active link */
    .nav-link.active:hover {
        box-shadow: 0 0 14px rgba(0, 220, 255, 0.7), 0 0 28px rgba(0, 220, 255, 0.5), inset 0 0 10px rgba(0, 220, 255, 0.3);
        background: rgba(255,255,255,0.12);
    }

/* Smooth transition for all nav links */
.nav-link {
    transition: all 0.25s ease, box-shadow 0.3s ease;
}


    .nav-link.active {
        animation: glowPulse 0.6s ease-out;
    }

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 0 rgba(0,200,255,0);
    }

    100% {
        box-shadow: 0 0 10px rgba(0,200,255,0.5), 0 0 20px rgba(0,200,255,0.3);
    }
}


.navbar-brand {
    color: #fff !important;
    transition: 0.3s;
}

    .navbar-brand:hover {
        color: #00c8ff !important;
        text-shadow: 0 0 8px rgba(0,200,255,0.6);
    }

.dropdown-menu-dark {
    background-color: #1b1f3b;
    border: 1px solid rgba(255,255,255,0.1);
}

    .dropdown-menu-dark .dropdown-item:hover {
        background-color: rgba(255,255,255,0.1);
    }

.dropdown-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

    .dropdown-item.disabled:hover {
        background: none;
        color: #aaa;
    }

.dropdown-item.active {
    background: rgba(0,200,255,0.15);
    color: #00c8ff !important;
    box-shadow: inset 0 0 10px rgba(0,200,255,0.3);
}


/* === Tools Hub Styling === */
.tools-hub-container {
    margin-top: 2rem;
    text-align: center;
    color: #e0e0e0;
}

.tools-hub-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00c8ff;
    margin-bottom: 0.5rem;
}

.tools-hub-subtitle {
    font-size: 1rem;
    color: #bbb;
    margin-bottom: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem;
}

.tool-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

    .tool-card:hover {
        transform: translateY(-4px);
        background: rgba(0,200,255,0.08);
        box-shadow: 0 0 12px rgba(0,200,255,0.4);
        border-color: rgba(0,200,255,0.3);
    }

.tool-icon {
    font-size: 2.2rem;
    color: #00c8ff;
    margin-bottom: 0.6rem;
}

.tool-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.tool-desc {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.3rem;
}

.tool-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: dashed;
}

    .tool-card.disabled:hover {
        transform: none;
        background: rgba(255,255,255,0.05);
        box-shadow: none;
    }

body.light-mode .tools-hub-container {
    color: #222;
}

body.light-mode .tool-card {
    background: #ffffff;
    color: #333;
    border-color: rgba(0,0,0,0.1);
}

    body.light-mode .tool-card:hover {
        background: #f1f9ff;
        box-shadow: 0 0 10px rgba(0,123,255,0.2);
    }


/* === Tools Hub Card Animation === */

/* Keyframes for the fade-in and rise-up motion */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply to all tool cards */
.tool-card {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}

    /* Stagger animation delays for a cascading effect */
    .tool-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .tool-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .tool-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .tool-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .tool-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .tool-card:nth-child(6) {
        animation-delay: 0.6s;
    }

    .tool-card:nth-child(7) {
        animation-delay: 0.7s;
    }

    .tool-card:nth-child(8) {
        animation-delay: 0.8s;
    }

    /* Optional: subtle hover glow to match animation style */
    .tool-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 14px rgba(0,200,255,0.45);
        background: rgba(0,200,255,0.08);
    }

/* === Fix: prevent dropdown clipping on short pages === */

/* Allow overflow above the content area */
main,
.content {
    overflow: visible !important;
}

/* Keep top-row on top visually */
.top-row {
    z-index: 2000 !important;
    position: relative;
}



/* === Final alignment: keep top bar fixed, sidebar/content below, dropdowns visible === */

/* Keep the top bar visible and above everything */
.top-row {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: linear-gradient(90deg, #0a0f1f, #17173a 70%, #1b263b);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 2000;
}

/* Sidebar should start below the fixed top bar */
.sidebar {
    margin-top: 0; /* same as top-row height */
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Content also sits below the header and can scroll independently */
/* Only main handles vertical offset */
main {
    margin-top: 0.01px; /* keeps content below fixed header */
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

/* Content inherits normal spacing within main */
.content {
    margin-top: 0; /* remove extra offset */
    padding-top: 1.5rem; /* just internal padding */
    overflow: visible;
    position: relative;
    z-index: 1;
}

/* Dropdowns should appear above everything */
.dropdown-menu {
    z-index: 2100 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Optional: make transition between top bar and sidebar visually seamless */
.top-row {
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}


/* === Fix: eliminate top gap above main content === */

/* remove any default margin that the body or first heading might add */
body {
    margin: 0 !important;
    padding: 0 !important;
}

main {
    margin-top: 0.01px !important; /* align below top bar */
}

.content {
    margin-top: 0 !important;
    padding-top: 1rem !important;
}

    /* prevent top headings from pushing content down */
    .content > h1:first-child,
    .content > h2:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

/* === SIDEBAR COLOR & GLOW SYSTEM === */

/* ---- COLOR PALETTE ---- */

/* CORE MODULES (Top Section) */
.text-golden {
    color: #FFD166 !important;
}
/* SOLID Care */
.text-red {
    color: #EF476F !important;
}
/* OnCall+ */
.text-green {
    color: #06D6A0 !important;
}
/* SickCallPro */
.text-cyan {
    color: #118AB2 !important;
}
/* ScribesPro */

/* CLINICAL TOOLS (Middle Section) */
.text-pink {
    color: #F78DA7 !important;
}
/* Review Meds */
.text-info {
    color: #00B4D8 !important;
}
/* Review Labs */
.text-warning {
    color: #FFD166 !important;
}
/* Review Imaging */
.text-success {
    color: #06D6A0 !important;
}
/* HPI Generator */
.text-primary {
    color: #8E7CC3 !important;
}
/* Assessment Plan */

/* SYSTEM LINKS (Bottom Section, optional) */
.text-gray {
    color: #B0BEC5 !important;
}

.text-lightgray {
    color: #CFD8DC !important;
}

/* Divider line between link groups */
.divider {
    border: 0;
    height: 1px;
    margin: 12px 0;
    background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.4), rgba(255,255,255,0.1));
}

/* ---- INTERACTIVITY & GLOW ---- */

/* Smooth transitions for hover and active state */
.nav-link {
    transition: color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

    /* Hover pulse: slight motion and soft glow */
    .nav-link:hover {
        transform: translateX(4px);
        box-shadow: 0 0 8px currentColor, inset 0 0 4px rgba(255,255,255,0.05);
    }

    /* Active link: bright, color-matched glow */
    .nav-link.active {
        color: #fff !important;
        background: rgba(255,255,255,0.08);
        border-radius: 8px;
        box-shadow: 0 0 12px currentColor, inset 0 0 8px rgba(255,255,255,0.1);
        transform: scale(1.02);
        animation: breathe 3s ease-in-out infinite alternate;
    }

        /* Active link hover: stronger glow pulse */
        .nav-link.active:hover {
            animation: pulseGlow 0.4s ease-in-out;
        }

    /* Hover glow for icons */
    .nav-link:hover span.bi {
        filter: drop-shadow(0 0 6px currentColor);
    }

/* ---- ANIMATIONS ---- */

/* Quick pulse on hover */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 12px currentColor, inset 0 0 8px rgba(255,255,255,0.1);
    }

    50% {
        box-shadow: 0 0 20px currentColor, inset 0 0 10px rgba(255,255,255,0.2);
    }

    100% {
        box-shadow: 0 0 12px currentColor, inset 0 0 8px rgba(255,255,255,0.1);
    }
}

/* Subtle continuous breathing glow for active link */
@keyframes breathe {
    0% {
        box-shadow: 0 0 10px currentColor, inset 0 0 6px rgba(255,255,255,0.05);
    }

    100% {
        box-shadow: 0 0 18px currentColor, inset 0 0 8px rgba(255,255,255,0.1);
    }
}

/* Dimmed (background focus) version */
@keyframes breatheDim {
    0% {
        box-shadow: 0 0 6px currentColor, inset 0 0 4px rgba(255,255,255,0.03);
    }

    100% {
        box-shadow: 0 0 10px currentColor, inset 0 0 5px rgba(255,255,255,0.05);
    }
}

/* ---- CONTEXT-AWARE DIMMING ---- */

/* Sidebar automatically dims when focus moves away */
.sidebar.dimmed .nav-link.active {
    animation: breatheDim 4s ease-in-out infinite alternate;
    opacity: 0.8;
    filter: brightness(0.8);
}

/* Smooth transition for dimming */
.sidebar {
    transition: filter 0.4s ease, opacity 0.4s ease;
}

    /* Optional: darken background slightly when dimmed */
    .sidebar.dimmed {
        filter: brightness(0.9);
    }

/* Sidebar color priority: link inherits its color class */
.nav-link.text-primary,
.nav-link.text-success,
.nav-link.text-warning,
.nav-link.text-info,
.nav-link.text-pink,
.nav-link.text-cyan,
.nav-link.text-green,
.nav-link.text-red,
.nav-link.text-golden {
    color: inherit !important;
}

/* Force the link to actually use its class color (not gray) */
.nav-link.text-primary {
    color: #8E7CC3 !important;
}

.nav-link.text-success {
    color: #06D6A0 !important;
}

.nav-link.text-warning {
    color: #FFD166 !important;
}

.nav-link.text-info {
    color: #00B4D8 !important;
}

.nav-link.text-pink {
    color: #F78DA7 !important;
}

.nav-link.text-cyan {
    color: #118AB2 !important;
}

.nav-link.text-green {
    color: #06D6A0 !important;
}

.nav-link.text-red {
    color: #EF476F !important;
}

.nav-link.text-golden {
    color: #FFD166 !important;
}


/* --------------------------------------------------------
   BEAUTIFUL GRADIENT LOADING BAR FOR GPT/OCR/A&P STATUS
   -------------------------------------------------------- */

.loading-banner {
    position: relative;
    width: 100%;
    margin: 0.5rem 0 1rem 0;
    padding: 0.75rem 0.5rem;
    background: rgba(10, 14, 28, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    text-align: center;
}

.loading-text {
    position: relative;
    z-index: 2;
    color: #E0F7FF;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* The moving gradient bar */
.loading-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #00c8ff, #6a5acd, #ff6ec7, #00c8ff);
    background-size: 300% 100%;
    border-radius: 10px 10px 0 0;
    animation: loadingBarMove 2.2s linear infinite;
}

/* Moves the bar from left to right smoothly */
@keyframes loadingBarMove {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 150% 0%;
    }

    100% {
        background-position: 300% 0%;
    }
}
/* Allow long HPI output to scroll */
.content {
    overflow-y: auto;
    max-height: calc(100vh - 70px); /* Adjust for header height */
    padding-bottom: 2rem;
}
main {
    overflow-y: auto !important;
}
body, html {
    overflow-y: auto !important;
}


.nav-logo-container {
    display: flex;
    justify-content: center; /*  horizontal center */
    align-items: center; /*  vertical center */
    height: 80px; /* gives breathing space */
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* optional divider */
}

.nav-logo {
    height: 42px;
    width: 42px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(46,196,182,0.4);
}

.nav-title {
    font-size: 24px;
    font-weight: bolder;
    color: #9fb3c8;
    margin-top: 4px;
}

.headline-highlight {
    background: linear-gradient(90deg, #0F6CBD, #2EC4B6, #F4A261, #0F6CBD);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: headlineShimmer 7s ease-in-out infinite;
}
@keyframes headlineShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.nav-logo-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
    cursor: pointer;
}

.navbar-brand {
    text-decoration: none;
}
/* Mobile shell hardening: keep the app usable even when older global layout rules are still cached. */
@media (max-width: 767.98px) {
    html,
    body {
        overflow-y: auto !important;
    }

    .page {
        display: block !important;
        min-height: 100dvh !important;
        height: auto !important;
        overflow: visible !important;
    }

    main {
        width: 100% !important;
        min-height: 100dvh !important;
        margin-top: 0 !important;
        padding-top: 64px !important;
        overflow: visible !important;
    }

    .content {
        max-height: none !important;
        margin-top: 0 !important;
        padding: 14px !important;
        overflow: visible !important;
    }

    .desktop-sidebar,
    .sidebar.desktop-sidebar {
        display: none !important;
    }

    .mobile-app-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 2400 !important;
        height: 64px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 14px !important;
        background: linear-gradient(90deg, #0a0f1f, #17223d 68%, #233457) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28) !important;
    }

    .mobile-brand {
        min-width: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 10px !important;
        color: #fff !important;
        text-decoration: none !important;
        font-size: 1.08rem !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }

    .mobile-brand-logo,
    .mobile-app-header img {
        width: 38px !important;
        height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        min-width: 38px !important;
        object-fit: contain !important;
        flex: 0 0 38px !important;
        border-radius: 12px !important;
    }

    .mobile-menu-button {
        width: 46px !important;
        height: 46px !important;
        flex: 0 0 46px !important;
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    .mobile-menu-line {
        width: 20px !important;
        height: 2px !important;
        display: block !important;
        border-radius: 999px !important;
        background: #fff !important;
    }

    .mobile-nav-backdrop {
        position: fixed !important;
        inset: 64px 0 0 0 !important;
        z-index: 2380 !important;
    }

    .mobile-nav-drawer {
        position: fixed !important;
        top: 64px !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 2390 !important;
        width: min(86vw, 326px) !important;
        overflow-y: auto !important;
    }

    .mobile-nav-drawer .nav-logo-icon {
        width: 38px !important;
        height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        object-fit: contain !important;
    }

    .home-hero {
        min-height: calc(100dvh - 64px) !important;
        justify-content: flex-start !important;
        padding: 24px 14px 20px !important;
    }

    .hero-logo {
        width: min(72vw, 260px) !important;
        max-width: 260px !important;
        max-height: 24vh !important;
        height: auto !important;
        object-fit: contain !important;
        animation: none !important;
    }

    .hero-title {
        font-size: 22px !important;
        margin-bottom: 12px !important;
    }
}