:root {
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-surface: rgba(15, 23, 42, 0.72);
    --glass-shadow: 0 20px 50px rgba(0,0,0,0.5);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --brand-cyan: #38bdf8;
    --brand-teal: #2dd4bf;
    --brand-ink: #0f172a;
    --brand-primary: #6366f1;
    --brand-secondary: #10b981;
    --brand-accent: #f59e0b;
    --brand-danger: #ef4444;
    --brand-info: #0ea5e9;
    --line-soft: rgba(255, 255, 255, 0.1);
    --void-bg: #0f172a;

    /* Premium HSL Tokens */
    --p-primary: 224.3 76.3% 48%;
    --p-secondary: 215 20.2% 65.1%;
    --p-accent: 262.1 83.3% 57.8%;
    --p-background: 222.2 84% 4.9%;
    --p-card: 0 0% 100%;
    --p-card-foreground: 222.2 84% 4.9%;
    --p-border: 214.3 31.8% 91.4%;
    --p-ring: 224.3 76.3% 48%;
}

.anti-gravity-void {
    background: var(--void-bg);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.particle-drift {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: radial-gradient(circle at center, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: drift 120s linear infinite;
    z-index: -1;
    opacity: 0.4;
}

@keyframes drift {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(100px, 100px) rotate(5deg); }
}

.floating-dock {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 10px 20px;
    display: flex;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

.dock-item {
    padding: 14px;
    border-radius: 20px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.dock-item:hover {
    color: white;
    background: rgba(255,255,255,0.08);
    transform: translateY(-10px) scale(1.15);
}

.dock-item.active {
    color: white;
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
    transform: translateY(-12px) scale(1.2);
}

.dock-item i {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

/* Consultation Layout */
.consultation-workspace {
    display: grid;
    grid-template-columns: 320px 1fr 0;
    gap: 32px;
    height: calc(100vh - 140px);
    position: relative;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: 80px;
}

.consultation-workspace.drawer-open {
    grid-template-columns: 320px 1fr 400px;
}

.canvas-glass {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--glass-shadow);
}

.floating-input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 1.2rem !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
    width: 100%;
}

.floating-input::placeholder {
    color: rgba(255,255,255,0.2) !important;
}

.holographic-list {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 16px;
    margin-bottom: 8px;
    z-index: 10;
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.15);
}

body {
    box-sizing: border-box;
    position: relative;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(1200px 700px at -10% -20%, rgba(14, 165, 233, 0.14), transparent 65%),
        radial-gradient(900px 520px at 110% -10%, rgba(20, 184, 166, 0.12), transparent 70%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    color: #ffffff;
    min-height: 100vh;
    letter-spacing: 0.01em;
}

html,
body {
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glass Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

.dark .glass-panel {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.68));
    backdrop-filter: blur(14px);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glass-shadow);
}

.dark .glass-card {
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.45), rgba(15, 23, 42, 0.7));
    border: 1px solid var(--line-soft);
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 36px 56px -30px rgba(2, 6, 23, 0.95);
    border-color: rgba(56, 189, 248, 0.45);
}

.stat-card-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, transparent 72%);
    top: -75px;
    right: -75px;
    pointer-events: none;
    transition: all 0.5s ease;
}

.glass-card:hover .stat-card-glow {
    transform: scale(1.5) translate(-20px, 20px);
    opacity: 0.5;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Critical triage alert pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50%       { opacity: 0.85; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Journey button shimmer on hover */
@keyframes journeyShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Tab slide-in for patient profile tabs */
@keyframes tabSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tab-content-enter {
    animation: tabSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.glow-text {
    background: linear-gradient(to right, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg) translateX(-150%);
    transition: transform 0.5s;
}

.btn-shimmer:hover::after {
    transform: skewX(-20deg) translateX(150%);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
}

.nav-overlay {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .desktop-nav {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
        width: 280px;
        z-index: 1000;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .desktop-nav.open {
        left: 0;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
        z-index: 999;
    }

    .nav-overlay.open {
        display: block;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 28px;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 14px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: rgba(16, 185, 129, 0.15);
    border-left: 4px solid #10b981;
    color: #34d399;
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    border-left: 4px solid #ef4444;
    color: #f87171;
}

.toast.info {
    background: rgba(14, 165, 233, 0.15);
    border-left: 4px solid #0ea5e9;
    color: #7dd3fc;
}

.toast.warning {
    background: rgba(245, 158, 11, 0.15);
    border-left: 4px solid #f59e0b;
    color: #fbbf24;
}

button {
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.65);
    outline-offset: 2px;
}

input,
select,
textarea {
    border-radius: 12px !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

select {
    background-color: #000 !important;
    color: #fff !important;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
}

td,
th {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.55);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #14b8a6);
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.55);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8, #2dd4bf);
}

* {
    scrollbar-width: thin;
    scrollbar-color: #14b8a6 rgba(15, 23, 42, 0.55);
}

.app-main,
.desktop-nav,
.modal-content,
[style*="overflow-y: auto"],
[style*="overflow-x: auto"] {
    scrollbar-gutter: stable both-edges;
}

@keyframes slideInLeft {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.8));
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(150deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 24px;
    max-width: 650px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 40px 70px -35px rgba(2, 6, 23, 1);
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@view-transition {
    navigation: auto;
}

/* Responsive Layout Overrides */
.app-main {
    padding: 40px;
    width: 100%;
}

@media (max-width: 768px) {
    .app-main {
        padding: 24px 16px;
    }

    /* Modal Mobile Adjustments */
    .modal-content {
        padding: 24px;
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }

    /* Font Size Adjustments */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }
}

/* Hero Revamp */
.hero-shell {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    padding: 0 5vw;
    align-items: center;
    min-height: 100vh;
    color: #e2e8f0;
}

.hero-copy h1 {
    font-size: clamp(42px, 4vw, 58px);
    line-height: 1.05;
    margin: 0 0 18px;
    font-weight: 800;
}

.hero-copy p {
    max-width: 540px;
    color: #cbd5e1;
    margin-bottom: 32px;
    font-size: 18px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: #a5b4fc;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary {
    background: #fff;
    color: var(--primary, #6366f1);
    border: none;
    border-radius: 12px;
    padding: 14px 26px;
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.35);
    transition: transform 0.18s, box-shadow 0.18s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.45);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
}

.btn-green {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid #10b981;
    color: #bbf7d0;
    border-radius: 12px;
    padding: 12px 18px;
}

.btn-muted {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    border-radius: 12px;
    padding: 12px 18px;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    font-size: 13px;
    color: #a5b4fc;
}

.hero-metrics span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.hero-visual {
    position: relative;
    height: min(78vh, 820px);
}

.hero-gradient {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(120% 90% at 20% 20%, #6366f14d, transparent),
        radial-gradient(90% 80% at 80% 0%, #ec48994d, transparent),
        radial-gradient(120% 120% at 50% 90%, #22d3ee40, transparent);
    filter: blur(40px);
    opacity: 0.9;
    animation: mesh 18s ease-in-out infinite alternate;
}

.hero-ring {
    position: absolute;
    inset: 12%;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-frame {
    position: absolute;
    inset: 8%;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.hero-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    filter: saturate(1.05) contrast(1.05);
}

.hero-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: translateY(26px) scale(0.94) rotate(-1deg);
    opacity: 0;
    transition: opacity 1s ease, transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    mix-blend-mode: screen;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card.is-active {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    z-index: 3;
}

.hero-chip {
    position: absolute;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 12px;
    backdrop-filter: blur(12px);
    animation: float 6s ease-in-out infinite;
}

.hero-chip--tl {
    top: 10%;
    left: -6%;
}

.hero-chip--br {
    bottom: 10%;
    right: -4%;
    animation-delay: 2s;
}

@keyframes mesh {
    0% {
        transform: translate3d(-10px, 0, 0);
    }

    50% {
        transform: translate3d(10px, -6px, 0) scale(1.02);
    }

    100% {
        transform: translate3d(-6px, 8px, 0);
    }
}

@media (max-width: 1024px) {
    .hero-shell {
        grid-template-columns: 1fr;
        padding: 32px 24px 64px;
        gap: 32px;
    }

    .hero-visual {
        height: 420px;
    }
}

@media (max-width: 640px) {
    .hero-copy h1 {
        font-size: 34px;
    }

    .hero-metrics {
        gap: 10px;
    }
}
\n
/* ── Specialty Dashboard UI Animations ── */
@keyframes drawEcg {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes drawEcgOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.ecg-line {
    fill: none;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawEcg 4s linear infinite;
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.icu-critical {
    animation: pulseRed 2s infinite;
}
.holographic-list {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.15);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.holographic-item {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.holographic-item:hover {
    background: rgba(56, 189, 248, 0.1);
    padding-left: 20px !important;
}

.pulse-red {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.consultation-workspace textarea:focus {
    border-color: rgba(56, 189, 248, 0.5) !important;
    background: rgba(0,0,0,0.3) !important;
}
