/* ── Premium Academic Simulators Theme ── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #f9df7b;
    --gold-glow: rgba(249, 223, 123, 0.25);
    --gold-dim: rgba(249, 223, 123, 0.12);
    --teal: #00c2a8;
    --teal-glow: rgba(0, 194, 168, 0.2);
    --card-bg: rgba(17, 22, 37, 0.65);
    --border-soft: rgba(255, 255, 255, 0.07);
    --border-gold: rgba(249, 223, 123, 0.3);
    --bg-dark: #0b0e14;
    --bg-surface: #111625;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-light: #e2e8f0;
}

/* Base Deck Wrapper */
.sim-container {
    max-width: 1200px;
    margin: 90px auto 50px;
    padding: 0 20px;
}

/* Quick Navigator Back Tag Button (Luxury STEM & Gold Glassmorphic Style) */
.sim-quick-back,
.btn-back,
.back-btn,
.back-link,
a.sim-quick-back,
a.btn-back,
a.back-btn,
a.back-link,
a.sim-quick-back:link,
a.sim-quick-back:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 30px !important;
    padding: 8px 20px !important;
    color: #f1f5f9 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-top: 15px !important;
    margin-bottom: 24px !important;
    width: fit-content !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.3px !important;
}

.sim-quick-back i,
.btn-back i,
.back-btn i,
.back-link i {
    font-size: 0.85rem !important;
    color: #f9df7b !important;
    transition: transform 0.25s ease !important;
}

.sim-quick-back:hover,
.btn-back:hover,
.back-btn:hover,
.back-link:hover,
a.sim-quick-back:hover,
a.btn-back:hover,
a.back-btn:hover,
a.back-link:hover,
a.sim-quick-back:focus {
    background: linear-gradient(135deg, rgba(249, 223, 123, 0.18), rgba(15, 23, 42, 0.9)) !important;
    border-color: rgba(249, 223, 123, 0.45) !important;
    color: #f9df7b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(249, 223, 123, 0.25), 0 0 12px rgba(249, 223, 123, 0.15) !important;
    text-decoration: none !important;
}

.sim-quick-back:hover i,
.btn-back:hover i,
.back-btn:hover i,
.back-link:hover i {
    transform: translateX(-4px) !important;
}

.sim-hero {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(20, 24, 40, 0.8) 0%, rgba(10, 12, 22, 0.9) 100%);
    border-radius: 20px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.sim-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--gold-dim) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.sim-hero-icon {
    font-size: 2.8rem;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.sim-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.sim-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Landing Cards Grid */
.sim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.sim-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 35px 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.sim-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(249, 223, 123, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.sim-card:hover {
    border-color: var(--border-gold);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(249, 223, 123, 0.05);
}

.sim-card:hover::before {
    opacity: 1;
}

.sim-card-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.sim-card h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
}

.sim-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.sim-card-btn {
    align-self: flex-start;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--gold) 0%, #f3c24d 100%);
    color: #111;
    font-weight: 700;
    border-radius: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sim-card:hover .sim-card-btn {
    box-shadow: 0 0 15px var(--gold-glow);
}

/* ────────────────────────────────────────────────────────
   PHARMACOKINETICS SIMULATOR STYLES
   ──────────────────────────────────────────────────────── */

.pk-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .pk-layout {
        grid-template-columns: 1fr;
    }
}

.control-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 24px;
    height: fit-content;
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 12px;
}

.preset-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(20, 25, 40, 0.9);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.preset-select:focus {
    border-color: var(--border-gold);
}

.control-group {
    margin-bottom: 22px;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.control-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-light);
}

.control-val-badge {
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--gold-dim);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(249, 223, 123, 0.2);
}

/* Slider styling override */
input[type="range"].sim-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

input[type="range"].sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
    transition: transform 0.1s;
}

input[type="range"].sim-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.compartment-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.comp-btn {
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.comp-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
}

.comp-btn.active {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 10px rgba(249, 223, 123, 0.05);
}

/* Visualization Panel */
.viz-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.canvas-container {
    position: relative;
    width: 100%;
    background: rgba(8, 10, 18, 0.95);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 15px;
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.8);
}

#pkCanvas {
    width: 100%;
    height: 350px;
    display: block;
}

.clinical-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.metric-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.metric-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-light);
}

.metric-card.alert-success .metric-val {
    color: #10b981;
}

.metric-card.alert-danger .metric-val {
    color: #ef4444;
}

.metric-card.alert-warning .metric-val {
    color: var(--gold);
}

/* ────────────────────────────────────────────────────────
   PHARMACEUTICS R&D LAB SIMULATOR STYLES
   ──────────────────────────────────────────────────────── */

.lab-wizard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 24px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    opacity: 0.6;
    transition: all 0.2s;
}

.wizard-step.active {
    color: var(--gold);
    opacity: 1;
    text-shadow: 0 0 10px var(--gold-glow);
}

.wizard-step.completed {
    color: var(--teal);
    opacity: 0.9;
}

.wizard-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.wizard-step.active .wizard-num {
    background: var(--gold);
    color: #111;
}

.wizard-step.completed .wizard-num {
    background: var(--teal);
    color: #111;
}

.lab-content {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 30px;
    min-height: 480px;
    position: relative;
}

/* API Selection Grid */
.api-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.api-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.api-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.api-card.selected {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.api-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 6px;
}

.api-card-prop {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Ingredients Grid */
.category-block {
    margin-bottom: 25px;
}

.category-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.excipient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.excipient-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.excipient-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.excipient-btn.selected {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.excipient-btn h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.excipient-btn p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* SVG Compression Press */
.press-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    padding: 40px 0;
}

.tablet-press-svg {
    width: 200px;
    height: 320px;
}

.compress-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--gold) 0%, #f3c24d 100%);
    color: #111;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px var(--gold-glow);
    transition: all 0.2s;
}

.compress-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--gold-glow);
}

.compress-btn:active {
    transform: translateY(0);
}

/* QC Lab Panel */
.qc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.qc-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.qc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qc-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-light);
}

.qc-action-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qc-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.qc-action-btn.running {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
    cursor: not-allowed;
}

.qc-visualizer {
    height: 150px;
    background: rgba(8, 10, 18, 0.95);
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    position: relative;
}

/* Hardness Test Animations */
.hardness-plunger {
    width: 25px;
    height: 40px;
    background: linear-gradient(90deg, #64748b, #475569);
    position: absolute;
    top: 55px;
    left: 10px;
    border-radius: 4px;
    transition: transform 0s;
}

.hardness-tablet {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #f9df7b 0%, #d8ae2c 100%);
    border-radius: 50%;
    position: absolute;
    top: 65px;
    right: 40px;
    box-shadow: 0 0 10px rgba(249, 223, 123, 0.3);
}

.hardness-tablet.shattered {
    background: transparent;
    box-shadow: none;
}

.particle {
    width: 4px;
    height: 4px;
    background: #f9df7b;
    border-radius: 50%;
    position: absolute;
}

/* Friability Drum Animation */
.friability-drum {
    width: 80px;
    height: 80px;
    border: 4px solid #475569;
    border-radius: 50%;
    position: absolute;
    top: 35px;
    left: 50%;
    margin-left: -40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friability-drum.spinning {
    animation: spinDrum 2s linear infinite;
}

.friability-tablet {
    width: 12px;
    height: 12px;
    background: #f9df7b;
    border-radius: 50%;
    position: absolute;
    top: 10px;
}

@keyframes spinDrum {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Dissolution Beaker Animations */
.dissolution-fluid {
    width: 100%;
    height: 100px;
    background: rgba(0, 194, 168, 0.15);
    position: absolute;
    bottom: 0;
    left: 0;
}

.dissolution-paddle {
    width: 4px;
    height: 80px;
    background: #64748b;
    position: absolute;
    top: 10px;
    left: 50%;
    margin-left: -2px;
}

.dissolution-paddle::after {
    content: '';
    width: 24px;
    height: 8px;
    background: #475569;
    position: absolute;
    bottom: 0;
    left: -10px;
}

.dissolution-paddle.spinning {
    animation: spinPaddle 0.4s linear infinite;
}

@keyframes spinPaddle {
    0% {
        transform: scaleX(1);
    }

    50% {
        transform: scaleX(-1);
    }

    100% {
        transform: scaleX(1);
    }
}

.dissolution-tablet {
    width: 16px;
    height: 16px;
    background: #f9df7b;
    border-radius: 50%;
    position: absolute;
    bottom: 12px;
    left: 50%;
    margin-left: -8px;
    transition: transform 1.5s, opacity 1.5s;
}

/* General Layout helpers */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px solid var(--border-soft);
    padding-top: 20px;
}

.wizard-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-light);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.wizard-btn-next {
    background: var(--gold);
    color: #111;
    border: none;
}

.wizard-btn-next:hover {
    background: #e2c866;
    box-shadow: 0 0 10px var(--gold-glow);
}

/* Premium Animations */
@keyframes pressShake {
    0%, 100% { transform: translate(0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-3px, 2px) rotate(0.5deg); }
    20%, 40%, 60%, 80% { transform: translate(3px, -2px) rotate(-0.5deg); }
}
.press-shake {
    animation: pressShake 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shockwave {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.8); opacity: 0; }
}
.shockwave-ring {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    pointer-events: none;
    animation: shockwave 0.5s ease-out forwards;
    top: 60px;
    right: 35px;
}

@keyframes floatBubble {
    0% { transform: translateY(100px) scale(0.8); opacity: 0; }
    30% { opacity: 0.6; }
    100% { transform: translateY(10px) scale(1.3); opacity: 0; }
}
.bubble {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    pointer-events: none;
    animation: floatBubble 1.4s ease-out infinite;
}

/* --- Live diagnostics panel & cards --- */
.diagnostics-panel {
    background: rgba(17, 22, 37, 0.8) !important;
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
}
.diagnostic-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px;
    transition: border-color 0.3s;
}
.diagnostic-card:hover {
    border-color: rgba(249, 223, 123, 0.2);
}

/* --- Step 2 Granulation Overlay & Sub-animations --- */
.granulation-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 14, 20, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 20px;
    padding: 20px;
}
.granulation-card {
    background: #111625;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.gran-step-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.25;
    transition: all 0.4s ease;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}
.gran-step-box.active {
    opacity: 1;
    color: var(--gold);
}
.gran-step-box.completed {
    opacity: 0.6;
    color: var(--teal);
}

/* Progress bar */
.gran-progress-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 15px;
}
.gran-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* Shear Mixer Animation */
.shear-mixer {
    position: relative;
    width: 44px;
    height: 44px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: #1a202c;
    overflow: hidden;
}
.mixer-blade {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 4px;
    background: #cbd5e1;
    margin-top: -2px;
    margin-left: -12px;
    border-radius: 2px;
}
.gran-step-box.active .mixer-blade {
    animation: rotateMixer 0.4s linear infinite;
}
@keyframes rotateMixer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.binder-drop {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--teal);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 44%;
    margin-left: -2px;
    opacity: 0;
}
.gran-step-box.active .binder-drop {
    animation: fallDrop 0.8s ease-in infinite;
}
@keyframes fallDrop {
    0% { top: -5px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 32px; opacity: 0; }
}

/* Bed Dryer Animation */
.bed-dryer {
    position: relative;
    width: 44px;
    height: 44px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: #1a202c;
    overflow: hidden;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding-bottom: 5px;
}
.heat-wave {
    width: 2px;
    height: 15px;
    background: linear-gradient(to top, rgba(239, 68, 68, 0.6), transparent);
    border-radius: 1px;
    opacity: 0;
}
.gran-step-box.active .heat-wave {
    animation: riseHeat 0.8s ease-out infinite;
}
@keyframes riseHeat {
    0% { transform: translateY(0); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-20px); opacity: 0; }
}
.dry-particles {
    position: absolute;
    inset: 0;
}
.p-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    bottom: 4px;
}
.p-dot:nth-child(1) { left: 8px; }
.p-dot:nth-child(2) { left: 20px; }
.p-dot:nth-child(3) { left: 32px; }
.gran-step-box.active .p-dot:nth-child(1) { animation: bounceDot 0.6s ease-in-out infinite alternate; }
.gran-step-box.active .p-dot:nth-child(2) { animation: bounceDot 0.8s ease-in-out infinite alternate 0.2s; }
.gran-step-box.active .p-dot:nth-child(3) { animation: bounceDot 0.5s ease-in-out infinite alternate 0.1s; }
@keyframes bounceDot {
    0% { transform: translateY(0); }
    100% { transform: translateY(-22px); }
}

/* Oscillating Granulator / Miller */
.gran-miller {
    position: relative;
    width: 44px;
    height: 44px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: #1a202c;
    overflow: hidden;
}
.mill-rollers {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}
.roller-gear {
    width: 14px;
    height: 14px;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
}
.gran-step-box.active .roller-gear {
    animation: spinGear 1s linear infinite;
}
.gran-step-box.active .roller-gear.secondary {
    animation: spinGearRev 1s linear infinite;
}
@keyframes spinGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes spinGearRev {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}
.mill-mesh {
    width: 32px;
    height: 2px;
    background: #718096;
    margin: 4px auto 0;
}
.granule-falls {
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 2px;
    height: 12px;
    background: dotted var(--gold);
    margin-left: -1px;
    opacity: 0;
}
.gran-step-box.active .granule-falls {
    opacity: 0.8;
    animation: fallGranules 0.3s linear infinite;
}
@keyframes fallGranules {
    0% { transform: translateY(-3px); }
    100% { transform: translateY(3px); }
}

/* Roller Compactor */
.roller-compactor {
    position: relative;
    width: 44px;
    height: 44px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: #1a202c;
    overflow: hidden;
}
.compactor-roll {
    position: absolute;
    top: 8px;
    width: 16px;
    height: 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    box-sizing: border-box;
}
.compactor-roll.left-roll { left: 4px; }
.compactor-roll.right-roll { right: 4px; }
.gran-step-box.active .compactor-roll.left-roll { animation: spinGear 0.6s linear infinite; }
.gran-step-box.active .compactor-roll.right-roll { animation: spinGearRev 0.6s linear infinite; }
.ribbon-feed {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 4px;
    height: 20px;
    background: #94a3b8;
    opacity: 0;
}
.gran-step-box.active .ribbon-feed {
    opacity: 1;
    animation: feedRibbon 0.4s linear infinite;
}
@keyframes feedRibbon {
    0% { transform: scaleY(0.7); }
    100% { transform: scaleY(1); }
}

/* Dry Blender */
.dry-blender {
    position: relative;
    width: 44px;
    height: 44px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: #1a202c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blender-drum {
    width: 24px;
    height: 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 4px;
    position: relative;
}
.gran-step-box.active .blender-drum {
    animation: rotateMixer 1s linear infinite;
}

/* --- QC Test Shatter Shards & Screen Shake --- */
@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-4px, 3px); }
    20%, 40%, 60%, 80% { transform: translate(4px, -3px); }
}
.screen-shake {
    animation: screenShake 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

/* Shatter fragments */
.hardness-fragment {
    position: absolute;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #f9df7b 0%, #d8ae2c 100%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s;
    pointer-events: none;
    z-index: 5;
}
.hardness-fragment.frag-1 {
    clip-path: polygon(0 0, 100% 0, 0 100%);
    top: 65px;
    right: 43px;
}
.hardness-fragment.frag-2 {
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    top: 71px;
    right: 37px;
}
.hardness-fragment.frag-3 {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    top: 60px;
    right: 48px;
}
.hardness-fragment.frag-4 {
    clip-path: polygon(0 50%, 100% 0, 50% 100%);
    top: 75px;
    right: 48px;
}

/* --- Friability Bouncing Drum Physics --- */
.friability-powder-bed {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0px;
    background: rgba(249, 223, 123, 0.4);
    transition: height 2s ease;
    box-shadow: 0 0 10px rgba(249, 223, 123, 0.2);
    pointer-events: none;
}

@keyframes tabletBouncing {
    0% { transform: translate(0, -28px); }
    30% { transform: translate(14px, -18px); } /* rises on internal shelf */
    35% { transform: translate(20px, -5px); } /* reaches top/falls off */
    45% { transform: translate(5px, 22px); } /* falls straight down to bottom */
    50% { transform: translate(-3px, 14px); } /* bounces up */
    58% { transform: translate(-1px, 22px); } /* lands again */
    64% { transform: translate(-8px, 18px); } /* secondary bounce */
    70% { transform: translate(-5px, 22px); } /* settles */
    100% { transform: translate(0, -28px); } /* rises back to top */
}
.friability-drum.spinning #friabilityTablet {
    animation: tabletBouncing 1.0s cubic-bezier(0.25, 0.1, 0.25, 1.0) infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -6px;
    margin-left: -6px;
}

/* --- Dissolution Swirling and Molecular Clouds --- */
.dissolution-particles-container, .dissolution-bubbles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.dissolving-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(249, 223, 123, 0.85);
    border-radius: 50%;
    pointer-events: none;
    animation: swirlOut 2s ease-out forwards;
}
@keyframes swirlOut {
    0% { transform: translate(0, 0) scale(1.2); opacity: 1; }
    50% { transform: translate(var(--dx), var(--dy)) scale(0.8); opacity: 0.8; }
    100% { transform: translate(var(--ex), var(--ey)) scale(0.3); opacity: 0; }
}

#apiSearch:focus, #apiCategory:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 8px var(--gold-glow);
}
.close-modal-btn:hover {
    color: var(--gold) !important;
}
.custom-modal-content input:focus, .custom-modal-content select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 8px var(--gold-glow);
}
.api-card.custom-api-card {
    border: 1px dashed var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 140px;
}
.api-card.custom-api-card:hover {
    background: var(--gold-dim);
    border-style: solid;
}

/* --- Custom Elegant Alert Dialog Popup (Questo Alerts) --- */
.questo-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 10, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.questo-alert-overlay.active {
    opacity: 1;
}
.questo-alert-modal {
    background: linear-gradient(135deg, rgba(22, 28, 45, 0.98) 0%, rgba(14, 18, 30, 0.98) 100%);
    border: 1px solid rgba(249, 223, 123, 0.3);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(249, 223, 123, 0.15);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    text-align: center;
}
.questo-alert-overlay.active .questo-alert-modal {
    transform: scale(1);
    opacity: 1;
}
.questo-alert-icon {
    font-size: 2.5rem;
    color: #f9df7b;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(249, 223, 123, 0.4);
}
.questo-alert-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f9df7b;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.questo-alert-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 25px;
}
.questo-alert-btn {
    background: #f9df7b;
    color: #0b0e14;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(249, 223, 123, 0.2);
}
.questo-alert-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 223, 123, 0.4);
}
.questo-alert-btn:active {
    transform: translateY(0);
}

/* Ensure select inputs and option dropdowns are fully readable, non-faded, with dark backgrounds and light text */
select {
    color: var(--text-light) !important;
}
select option {
    background-color: #141928 !important; /* Solid dark theme background */
    color: #e2e8f0 !important; /* Visible light gray text */
    font-size: 0.95rem;
    padding: 10px;
}

/* ==========================================
   SHARED MODAL & QUIZ PANEL STYLING
   ========================================== */
.mode-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}
.mode-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 15px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mode-tab-btn.active {
    background: var(--gold);
    color: #0b0e14;
    box-shadow: 0 4px 12px var(--gold-glow);
}

.quiz-card {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(12px);
    height: fit-content;
}
.quiz-card.active {
    display: block;
}
.quiz-case-description {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 20px;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.quiz-option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-light);
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.quiz-option-btn:hover:not(:disabled) {
    border-color: var(--gold);
    background: rgba(249, 223, 123, 0.05);
}
.quiz-option-btn.correct {
    border-color: #00c2a8 !important;
    background: rgba(0, 194, 168, 0.1) !important;
    color: #00c2a8 !important;
}
.quiz-option-btn.incorrect {
    border-color: #ff5252 !important;
    background: rgba(255, 82, 82, 0.1) !important;
    color: #ff5252 !important;
}
.feedback-box {
    display: none;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.feedback-box.correct-fb {
    display: block;
    background: rgba(0, 194, 168, 0.08);
    border: 1px solid rgba(0, 194, 168, 0.2);
    color: #00c2a8;
}
.feedback-box.incorrect-fb {
    display: block;
    background: rgba(255, 82, 82, 0.08);
    border: 1px solid rgba(255, 82, 82, 0.2);
    color: #ff5252;
}

/* ================================================================
   RESPONSIVE DESIGN – ALL SIMULATOR PAGES
   ================================================================ */

/* --- Enhanced Card Hover Shine Effect --- */
.sim-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 223, 123, 0.04), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.sim-card:hover::after {
    left: 120%;
}

.sim-card:hover .sim-card-icon {
    transform: scale(1.1) translateY(-3px);
}

/* --- Large Desktops (1400px+) --- */
@media (min-width: 1400px) {
    .sim-container {
        max-width: 1300px;
    }
    .sim-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    .sim-hero h1 {
        font-size: 2.5rem;
    }
}

/* --- Medium Desktops (1200px - 1399px) --- */
@media (max-width: 1399px) {
    .sim-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 24px;
    }
}

/* --- Tablets Landscape / Small Desktops (992px - 1199px) --- */
@media (max-width: 1199px) {
    .sim-container {
        padding: 0 16px;
    }
    .sim-hero {
        padding: 25px 16px;
    }
    .sim-hero h1 {
        font-size: 1.9rem;
    }
    .sim-hero p {
        font-size: 0.95rem;
    }
    .sim-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    .sim-card {
        padding: 28px 24px;
    }
    .sim-card h2 {
        font-size: 1.3rem;
    }

    /* PK / Simulator 2-col layouts */
    .pk-layout {
        grid-template-columns: 340px 1fr;
        gap: 24px;
    }

    /* Wizard steps */
    .lab-wizard {
        padding: 10px 16px;
        gap: 8px;
    }
    .wizard-step {
        font-size: 0.82rem;
        gap: 6px;
    }

    /* QC Grid */
    .qc-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }

    /* Clinical dashboard */
    .clinical-dashboard {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }
}

/* --- Tablets Portrait (768px - 991px) --- */
@media (max-width: 991px) {
    .sim-container {
        margin: 80px auto 40px;
        padding: 0 14px;
    }
    .sim-hero {
        padding: 24px 16px;
        margin-bottom: 30px;
        border-radius: 16px;
    }
    .sim-hero-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    .sim-hero h1 {
        font-size: 1.65rem;
    }
    .sim-hero p {
        font-size: 0.9rem;
    }
    .sim-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
    }
    .sim-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    .sim-card-icon {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    .sim-card h2 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    .sim-card p {
        font-size: 0.88rem;
        margin-bottom: 20px;
        line-height: 1.55;
    }
    .sim-card-btn {
        padding: 9px 18px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    /* PK / all 2-column layouts → single column */
    .pk-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .control-panel {
        border-radius: 16px;
        padding: 20px;
    }
    .viz-panel {
        border-radius: 16px;
        padding: 20px;
    }

    /* Wizard → scroll horizontally or wrap */
    .lab-wizard {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 6px;
        justify-content: center;
        border-radius: 12px;
    }
    .wizard-step {
        font-size: 0.78rem;
        gap: 5px;
    }
    .wizard-num {
        width: 22px;
        height: 22px;
        font-size: 0.72rem;
    }

    /* Lab content panel */
    .lab-content {
        padding: 22px;
        border-radius: 16px;
        min-height: auto;
    }

    /* API Cards */
    .api-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
    }
    .api-card {
        padding: 16px;
        border-radius: 12px;
    }
    .api-card h3 {
        font-size: 1rem;
    }

    /* Excipient grid */
    .excipient-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .excipient-btn {
        padding: 12px;
        border-radius: 10px;
    }

    /* Metric cards */
    .metric-card {
        padding: 14px;
        border-radius: 12px;
    }
    .metric-val {
        font-size: 1.15rem;
    }

    /* QC Grid */
    .qc-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .qc-card {
        padding: 16px;
        border-radius: 14px;
    }

    /* Mode tabs */
    .mode-tabs {
        border-radius: 10px;
        padding: 3px;
    }
    .mode-tab-btn {
        padding: 8px 12px;
        font-size: 0.88rem;
        border-radius: 7px;
    }

    /* Quiz card */
    .quiz-card {
        padding: 20px;
        border-radius: 16px;
    }

    /* Canvas */
    #pkCanvas {
        height: 280px;
    }

    /* Canvas container */
    .canvas-container {
        border-radius: 14px;
        padding: 12px;
    }

    /* Wizard footer */
    .wizard-footer {
        margin-top: 28px;
        padding-top: 16px;
        gap: 12px;
    }
    .wizard-btn {
        padding: 9px 18px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    /* Press / Compress button */
    .press-container {
        padding: 30px 0;
    }
    .tablet-press-svg {
        width: 160px;
        height: 260px;
    }

    /* Diagnostics panel */
    .diagnostics-panel {
        border-radius: 16px;
    }
    .diagnostic-card {
        border-radius: 10px;
        padding: 12px;
    }

    /* Compartment selector */
    .compartment-selector {
        gap: 6px;
    }
    .comp-btn {
        padding: 8px 4px;
        font-size: 0.72rem;
        border-radius: 8px;
    }

    /* Custom alert modals */
    .questo-alert-modal {
        padding: 24px;
        max-width: 400px;
        border-radius: 14px;
    }
    .premium-modal-content {
        padding: 28px;
        border-radius: 20px;
    }
}

/* --- Mobile Landscape (576px - 767px) --- */
@media (max-width: 767px) {
    .sim-container {
        margin: 74px auto 30px;
        padding: 0 12px;
    }
    .sim-hero {
        padding: 20px 14px;
        margin-bottom: 24px;
        border-radius: 14px;
    }
    .sim-hero-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    .sim-hero h1 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    .sim-hero p {
        font-size: 0.85rem;
        line-height: 1.55;
    }
    .sim-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .sim-card {
        padding: 22px 18px;
        border-radius: 14px;
    }
    .sim-card-icon {
        font-size: 1.8rem;
        margin-bottom: 14px;
    }
    .sim-card h2 {
        font-size: 1.15rem;
    }
    .sim-card p {
        font-size: 0.85rem;
        margin-bottom: 18px;
    }
    .sim-card-btn {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    /* Control panel */
    .control-panel {
        padding: 16px;
        border-radius: 14px;
    }
    .panel-title {
        font-size: 1rem;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    /* Slider */
    .control-group {
        margin-bottom: 18px;
    }
    .control-label {
        font-size: 0.82rem;
    }
    .control-val-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    input[type="range"].sim-slider {
        height: 8px;
    }
    input[type="range"].sim-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }

    /* Viz panel */
    .viz-panel {
        padding: 16px;
        border-radius: 14px;
        gap: 16px;
    }

    /* Canvas */
    .canvas-container {
        padding: 10px;
        border-radius: 12px;
    }
    #pkCanvas {
        height: 240px;
    }

    /* Clinical dashboard */
    .clinical-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .metric-card {
        padding: 12px 10px;
        border-radius: 10px;
    }
    .metric-title {
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }
    .metric-val {
        font-size: 1.05rem;
    }

    /* Wizard steps → scroll or compact */
    .lab-wizard {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 8px 10px;
        gap: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .lab-wizard::-webkit-scrollbar {
        display: none;
    }
    .wizard-step {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 0.75rem;
    }

    /* Lab content */
    .lab-content {
        padding: 18px;
        border-radius: 14px;
    }

    /* API cards → 2-col */
    .api-cards {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: 12px;
    }
    .api-card {
        padding: 14px;
        border-radius: 10px;
    }
    .api-card h3 {
        font-size: 0.92rem;
    }
    .api-card-prop {
        font-size: 0.72rem;
    }

    /* Excipient grid */
    .excipient-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .excipient-btn {
        padding: 10px;
        border-radius: 8px;
    }
    .excipient-btn h4 {
        font-size: 0.82rem;
    }
    .excipient-btn p {
        font-size: 0.68rem;
    }

    /* QC Grid */
    .qc-card {
        padding: 14px;
        border-radius: 12px;
    }
    .qc-visualizer {
        height: 120px;
        border-radius: 8px;
    }

    /* Mode tabs */
    .mode-tabs {
        gap: 4px;
        padding: 3px;
    }
    .mode-tab-btn {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    /* Quiz */
    .quiz-card {
        padding: 16px;
        border-radius: 14px;
    }
    .quiz-case-description {
        padding: 12px;
        font-size: 0.88rem;
        border-radius: 8px;
    }
    .quiz-option-btn {
        padding: 10px 14px;
        font-size: 0.88rem;
        border-radius: 7px;
    }
    .feedback-box {
        padding: 12px;
        font-size: 0.85rem;
    }

    /* Compartment selector */
    .compartment-selector {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .comp-btn {
        padding: 7px 4px;
        font-size: 0.7rem;
    }

    /* Wizard footer */
    .wizard-footer {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 24px;
    }
    .wizard-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    /* Press */
    .press-container {
        padding: 24px 0;
    }
    .tablet-press-svg {
        width: 140px;
        height: 220px;
    }
    .compress-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    /* Premium modal */
    .premium-modal-content {
        padding: 24px 20px;
        border-radius: 18px;
    }
    .questo-alert-modal {
        padding: 22px;
        border-radius: 14px;
    }

    /* Category title */
    .category-title {
        font-size: 0.85rem;
    }
}

/* --- Mobile Portrait (480px - 575px) --- */
@media (max-width: 575px) {
    .sim-container {
        margin: 70px auto 24px;
        padding: 0 10px;
    }
    .sim-hero {
        padding: 18px 12px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    .sim-hero-icon {
        font-size: 1.8rem;
    }
    .sim-hero h1 {
        font-size: 1.25rem;
    }
    .sim-hero p {
        font-size: 0.82rem;
    }
    .sim-grid {
        gap: 14px;
    }
    .sim-card {
        padding: 20px 16px;
        border-radius: 12px;
    }
    .sim-card-icon {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    .sim-card h2 {
        font-size: 1.08rem;
        margin-bottom: 8px;
    }
    .sim-card p {
        font-size: 0.82rem;
        margin-bottom: 16px;
    }
    .sim-card-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
        border-radius: 8px;
        width: 100%;
        justify-content: center;
    }

    /* Control panel */
    .control-panel {
        padding: 14px;
    }
    .panel-title {
        font-size: 0.95rem;
        gap: 6px;
    }

    /* Viz panel */
    .viz-panel {
        padding: 14px;
        gap: 14px;
    }

    /* Canvas */
    .canvas-container {
        padding: 8px;
    }
    #pkCanvas {
        height: 200px;
    }

    /* Dashboard → full-width stacked */
    .clinical-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .metric-card {
        padding: 10px 8px;
    }
    .metric-title {
        font-size: 0.65rem;
    }
    .metric-val {
        font-size: 0.95rem;
    }

    /* Lab wizard */
    .lab-wizard {
        padding: 6px 8px;
        gap: 10px;
    }
    .wizard-step {
        font-size: 0.7rem;
    }
    .wizard-num {
        width: 20px;
        height: 20px;
        font-size: 0.68rem;
    }

    /* Lab content */
    .lab-content {
        padding: 14px;
    }

    /* API cards → single col */
    .api-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .api-card {
        padding: 14px;
    }

    /* Excipient grid → 2 col */
    .excipient-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Compartment selector */
    .compartment-selector {
        gap: 4px;
    }
    .comp-btn {
        padding: 6px 2px;
        font-size: 0.65rem;
    }

    /* Mode tabs → stacked if 3+ */
    .mode-tabs {
        gap: 3px;
    }
    .mode-tab-btn {
        padding: 7px 8px;
        font-size: 0.78rem;
    }

    /* Quiz */
    .quiz-card {
        padding: 14px;
    }
    .quiz-case-description {
        padding: 10px;
        font-size: 0.82rem;
    }
    .quiz-option-btn {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .quiz-options {
        gap: 8px;
    }

    /* Press */
    .tablet-press-svg {
        width: 120px;
        height: 190px;
    }
    .compress-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    /* Wizard footer */
    .wizard-footer {
        flex-direction: column;
        gap: 8px;
    }
    .wizard-btn {
        width: 100%;
        justify-content: center;
    }

    /* Slider touch targets */
    input[type="range"].sim-slider {
        height: 10px;
    }
    input[type="range"].sim-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    /* Alerts */
    .questo-alert-modal {
        padding: 20px 16px;
        border-radius: 12px;
    }
    .questo-alert-title {
        font-size: 1.1rem;
    }
    .questo-alert-message {
        font-size: 0.88rem;
    }
    .questo-alert-btn {
        padding: 9px 20px;
        font-size: 0.88rem;
    }

    /* Premium modal */
    .premium-modal-content {
        padding: 22px 16px;
        border-radius: 16px;
    }
}

/* --- Ultra-small phones (below 400px) --- */
@media (max-width: 399px) {
    .sim-container {
        padding: 0 8px;
        margin: 68px auto 20px;
    }
    .sim-hero {
        padding: 14px 10px;
        border-radius: 10px;
    }
    .sim-hero h1 {
        font-size: 1.1rem;
    }
    .sim-hero p {
        font-size: 0.78rem;
    }
    .sim-grid {
        gap: 12px;
    }
    .sim-card {
        padding: 16px 14px;
        border-radius: 10px;
    }
    .sim-card-icon {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    .sim-card h2 {
        font-size: 1rem;
    }
    .sim-card p {
        font-size: 0.78rem;
        line-height: 1.5;
    }

    /* Control / Viz panels */
    .control-panel,
    .viz-panel,
    .lab-content {
        padding: 12px;
        border-radius: 10px;
    }

    /* Canvas */
    #pkCanvas {
        height: 180px;
    }

    /* Clinical dashboard → single col */
    .clinical-dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    /* Excipient → single col */
    .excipient-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    /* Mode tabs vertically */
    .mode-tabs {
        flex-direction: column;
        gap: 4px;
    }
    .mode-tab-btn {
        width: 100%;
        text-align: center;
    }

    /* Press */
    .tablet-press-svg {
        width: 100px;
        height: 160px;
    }

    /* Preset select */
    .preset-select {
        font-size: 0.82rem;
        padding: 8px 10px;
    }

    /* QC */
    .qc-visualizer {
        height: 100px;
    }

    /* Premium modal */
    .premium-modal {
        padding: 12px;
    }
    .premium-modal-content {
        padding: 18px 14px;
        border-radius: 14px;
    }
}

/* --- Touch-Friendly Enhancements for All Mobile --- */
@media (max-width: 1024px) {
    /* Ensure all interactive elements have 44px min touch targets */
    .sim-card-btn,
    .comp-btn,
    .wizard-btn,
    .wizard-btn-next,
    .compress-btn,
    .qc-action-btn,
    .mode-tab-btn,
    .quiz-option-btn,
    .questo-alert-btn,
    .excipient-btn {
        min-height: 44px;
    }

    /* Better slider thumb touch area */
    input[type="range"].sim-slider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }

    /* Smooth overscroll on mobile panels */
    .control-panel,
    .viz-panel,
    .lab-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Premium Locked Card Badge Responsive --- */
@media (max-width: 575px) {
    .sim-card.sim-card-locked > div:first-child {
        font-size: 0.68rem !important;
        padding: 3px 8px !important;
        top: 12px !important;
        right: 12px !important;
    }
}

/* --- Scrollbar Styling for Simulator Panels --- */
.control-panel::-webkit-scrollbar,
.viz-panel::-webkit-scrollbar,
.lab-content::-webkit-scrollbar {
    width: 4px;
}
.control-panel::-webkit-scrollbar-track,
.viz-panel::-webkit-scrollbar-track,
.lab-content::-webkit-scrollbar-track {
    background: transparent;
}
.control-panel::-webkit-scrollbar-thumb,
.viz-panel::-webkit-scrollbar-thumb,
.lab-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
.control-panel::-webkit-scrollbar-thumb:hover,
.viz-panel::-webkit-scrollbar-thumb:hover,
.lab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ── Unique layout styles for Interaction Checker ── */
.interactions-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .interactions-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .map-card {
        min-height: 380px;
    }
}

@media (max-width: 576px) {
    .glass-card {
        padding: 18px 16px;
        border-radius: 14px;
    }
    .glass-card::before {
        height: 14px;
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
        clip-path: inset(0 0 11px 0 round 14px 14px 0 0);
        -webkit-clip-path: inset(0 0 11px 0 round 14px 14px 0 0);
    }
    .report-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .export-report-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    .report-summary-counts {
        width: 100%;
        gap: 8px;
    }
    .summary-pill {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    .search-field {
        font-size: 16px;
    }
}

.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.glass-card.search-card {
    overflow: visible;
    z-index: 10;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, var(--gold) 0%, rgba(249, 223, 123, 0.2) 60%, transparent 100%);
    opacity: 0.85;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    clip-path: inset(0 0 13px 0 round 16px 16px 0 0);
    -webkit-clip-path: inset(0 0 13px 0 round 16px 16px 0 0);
    pointer-events: none;
}

.search-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-wrapper {
    position: relative;
}

.search-input-group {
    position: relative;
    width: 100%;
}

.search-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.95rem;
}

.search-field {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: rgba(8, 10, 18, 0.6);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s ease;
}

.search-field:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

.autocomplete-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: rgba(14, 18, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(249, 223, 123, 0.08);
}

.autocomplete-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
}

.autocomplete-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.autocomplete-synonyms {
    color: var(--gold);
    font-style: italic;
}

.bucket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bucket-count-badge {
    background: rgba(249, 223, 123, 0.15);
    color: var(--gold);
    border: 1px solid var(--border-gold);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.clear-btn:hover {
    color: #ff5252;
}

.bucket-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 5px;
}

.bucket-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
}

.bucket-chip:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.chip-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chip-name {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
}

.chip-class {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.chip-remove {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chip-remove:hover {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
}

.bucket-empty-state {
    text-align: center;
    padding: 40px 10px;
    color: var(--text-dim);
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bucket-empty-state i {
    font-size: 2rem;
    opacity: 0.3;
}

.map-card {
    padding: 0;
    height: 100%;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(14, 18, 30, 0.3);
}

.map-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-toolbar {
    display: flex;
    gap: 10px;
}

.map-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.map-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.canvas-container {
    flex: 1;
    position: relative;
    background: #080a12;
    overflow: hidden;
}

#interactionsCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#interactionsCanvas:active {
    cursor: grabbing;
}

.map-legend {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(8, 10, 18, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
    z-index: 10;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-contra { background: #ff5252; box-shadow: 0 0 6px #ff5252; }
.dot-major { background: #ff9100; box-shadow: 0 0 6px #ff9100; }
.dot-mod { background: #ffd600; box-shadow: 0 0 6px #ffd600; }
.dot-safe { background: #00c2a8; box-shadow: 0 0 6px #00c2a8; }

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    background: #0f1322;
    border-left: 1px solid var(--border-soft);
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 480px) {
    .drawer {
        width: 100%;
        right: -100%;
    }
}

.drawer.active {
    right: 0;
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.drawer-close:hover {
    color: #fff;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.manual-section {
    margin-bottom: 25px;
}

.manual-section h4 {
    color: var(--gold);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.manual-section p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.report-section {
    margin-top: 20px;
}

.report-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 18px;
}

.report-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.report-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(249, 223, 123, 0.12);
    border: 1px solid rgba(249, 223, 123, 0.3);
    color: var(--gold);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: none !important;
}

.export-report-btn:hover {
    background: rgba(249, 223, 123, 0.22);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.report-summary-counts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-pill {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.pill-contra {
    background: rgba(255, 82, 82, 0.15);
    color: #ff5252;
    border: 1px solid rgba(255, 82, 82, 0.25);
}

.pill-major {
    background: rgba(255, 145, 0, 0.15);
    color: #ff9100;
    border: 1px solid rgba(255, 145, 0, 0.25);
}

.pill-mod {
    background: rgba(255, 214, 0, 0.1);
    color: #ffd600;
    border: 1px solid rgba(255, 214, 0, 0.2);
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.25s ease;
}

.report-card.border-contra, .report-card.border-contraindicated { 
    border-left: 4px solid #ff5252;
    background: rgba(255, 82, 82, 0.08);
    border-color: rgba(255, 82, 82, 0.3);
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.05);
}

.report-card.border-major { 
    border-left: 4px solid #ff9100;
    background: rgba(255, 145, 0, 0.08);
    border-color: rgba(255, 145, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 145, 0, 0.05);
}

.report-card.border-mod, .report-card.border-moderate { 
    border-left: 4px solid #ffd600;
    background: rgba(255, 214, 0, 0.05);
    border-color: rgba(255, 214, 0, 0.25);
    box-shadow: 0 0 15px rgba(255, 214, 0, 0.03);
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-pair {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.severity-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-contra, .badge-contraindicated { background: #ff5252; color: #fff; }
.badge-major { background: #ff9100; color: #fff; }
.badge-mod, .badge-moderate { background: #ffd600; color: #000; }

.card-mechanism {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.card-recommendation {
    font-size: 0.82rem;
    color: var(--gold);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.card-recommendation i {
    margin-top: 2px;
    font-size: 0.88rem;
}

.report-empty-state {
    grid-column: 1 / -1;
    background: rgba(17, 22, 37, 0.3);
    border: 1px dashed var(--border-soft);
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    color: var(--text-dim);
}

.report-empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.35;
}

.report-safe-state {
    grid-column: 1 / -1;
    background: rgba(0, 194, 168, 0.03);
    border: 1px solid rgba(0, 194, 168, 0.15);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: var(--teal);
}

.report-safe-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    text-shadow: 0 0 15px var(--teal-glow);
}

.report-safe-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.report-safe-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 500px;
    margin: 0 auto;
}