/* Main Dashboard Layout & Interactions Stylesheet */

/* Layout Structure */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: var(--bg-primary);
    overflow: hidden;
    position: relative;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 10;
    transition: width var(--transition-normal);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.sidebar-logo svg {
    color: var(--color-brand);
    filter: drop-shadow(var(--glow-brand));
}

.sidebar-logo span {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--color-brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.menu-item.active a, .menu-item a:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.menu-item.active a {
    border-left: 4px solid var(--color-brand);
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.15), transparent);
}

.menu-item svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.menu-item a:hover svg {
    transform: scale(1.1);
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nurse-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-brand), var(--color-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.nurse-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
}

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

/* Widescreen Split Panel Workspace */
.split-workspace {
    flex-grow: 1;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Main Content Panel */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border-right: 1px solid var(--border-glass);
}

/* Header Area */
.header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    flex-shrink: 0;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
}

.search-box input {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: var(--radius-md);
    outline: none;
    width: 200px;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    width: 280px;
    border-color: var(--color-brand);
    box-shadow: var(--glow-brand);
}

.search-box svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.header-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.header-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.mobile-signoff-btn {
    display: none !important;
}

.badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--color-red);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

/* Dashboard Workspace Scrolling Area */
.dashboard-workspace {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* KPI Banner Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-height: 110px;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: var(--bg-tertiary);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon.brand { background-color: rgba(14, 165, 233, 0.15); color: var(--color-brand); }
.kpi-icon.red { background-color: rgba(239, 68, 68, 0.15); color: var(--color-red); }
.kpi-icon.yellow { background-color: rgba(245, 158, 11, 0.15); color: var(--color-yellow); }
.kpi-icon.green { background-color: rgba(16, 185, 129, 0.15); color: var(--color-green); }
.kpi-icon.purple { background-color: rgba(139, 92, 246, 0.15); color: var(--color-purple); }

.kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-top: 0.5rem;
}

.kpi-trend {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-trend.up { color: var(--color-green); }
.kpi-trend.down { color: var(--color-red); }
.kpi-trend.neutral { color: var(--text-secondary); }

/* Triage Panel & Board */
.triage-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: border-color var(--transition-normal);
}

.triage-section-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.triage-filters {
    display: flex;
    gap: 0.4rem;
}

.filter-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.filter-btn.active[data-filter="all"] { border-color: var(--color-brand); background-color: rgba(14, 165, 233, 0.1); }
.filter-btn.active[data-filter="red"] { border-color: var(--color-red); background-color: rgba(239, 68, 68, 0.1); }
.filter-btn.active[data-filter="yellow"] { border-color: var(--color-yellow); background-color: rgba(245, 158, 11, 0.1); }
.filter-btn.active[data-filter="green"] { border-color: var(--color-green); background-color: rgba(16, 185, 129, 0.1); }

/* Triage Table styles */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.triage-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.triage-table th {
    background-color: rgba(19, 27, 46, 0.4);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.triage-table td {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.85rem;
    vertical-align: middle;
}

/* Glowing/Blinking Red Priority Row Animation */
@keyframes pulse-red-row {
    0% { background-color: rgba(239, 68, 68, 0.0); }
    50% { background-color: rgba(239, 68, 68, 0.06); }
    100% { background-color: rgba(239, 68, 68, 0.0); }
}

.triage-row {
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.triage-row:hover {
    background-color: var(--bg-tertiary);
}

.triage-row.priority-red {
    border-left: 4px solid var(--color-red);
    animation: pulse-red-row 2.5s infinite;
}

.triage-row.priority-yellow {
    border-left: 4px solid var(--color-yellow);
}

.triage-row.priority-green {
    border-left: 4px solid var(--color-green);
}

.triage-row.resolved-alert {
    opacity: 0.65;
    border-left: 4px solid var(--text-muted);
}

.patient-cell {
    display: flex;
    flex-direction: column;
}

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

.patient-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* Badges styling */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-red { background-color: rgba(239, 68, 68, 0.12); color: var(--color-red); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-yellow { background-color: rgba(245, 158, 11, 0.12); color: var(--color-yellow); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-green { background-color: rgba(16, 185, 129, 0.12); color: var(--color-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-purple { background-color: rgba(139, 92, 246, 0.12); color: var(--color-purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-secondary { background-color: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-glass); }

/* Symptom list in table */
.symptom-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-width: 280px;
}

.symptom-tag {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.symptom-tag.danger {
    color: var(--color-red);
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
}

.symptom-tag.warning {
    color: var(--color-yellow);
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.15);
}

/* Flashing dot */
.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
}

.priority-red .pulse-dot {
    animation: pulse-dot-red 1.2s infinite;
}

@keyframes pulse-dot-red {
    0% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 6px var(--color-red); }
    100% { transform: scale(0.8); opacity: 0.4; }
}

/* Row Action Buttons */
.row-actions {
    display: flex;
    gap: 0.4rem;
}

.action-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border-color: var(--color-brand);
}

.action-btn.call-btn:hover {
    color: var(--color-brand);
    box-shadow: var(--glow-brand);
}

/* Sliding Patient Detail Drawer */
.detail-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-glass);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.detail-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.close-drawer-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.close-drawer-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Demographics Panel */
.demographics-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.patient-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.demographics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    background-color: rgba(19, 27, 46, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.demo-item {
    display: flex;
    flex-direction: column;
}

.demo-item label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.demo-item span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Symptom Grid in Drawer */
.symptom-triage-details {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.symptom-triage-card {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    background-color: rgba(19, 27, 46, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.symptom-triage-card.red { border-left: 4px solid var(--color-red); }
.symptom-triage-card.yellow { border-left: 4px solid var(--color-yellow); }
.symptom-triage-card.green { border-left: 4px solid var(--color-green); }

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

.symptom-card-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
}

.symptom-card-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Patient Notes Text */
.patient-notes-box {
    background-color: rgba(245, 158, 11, 0.05);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.patient-notes-box.danger {
    background-color: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.25);
}

.notes-box-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-yellow);
    margin-bottom: 0.3rem;
}

.patient-notes-box.danger .notes-box-header {
    color: var(--color-red);
}

.notes-box-text {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-primary);
}

/* Visual photo check section */
.photo-verification-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.photo-container {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    position: relative;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-tag-overlay {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 2;
}

/* Mini CSS Sparkline Charts */
.longitudinal-charts {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sparkline-card {
    background-color: rgba(19, 27, 46, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.sparkline-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.chart-canvas {
    height: 50px;
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    padding-top: 10px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 4px;
}

.chart-bar-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    transition: height var(--transition-slow);
    background-color: var(--color-brand);
}

.chart-bar.red { background-color: var(--color-red); }
.chart-bar.yellow { background-color: var(--color-yellow); }
.chart-bar.green { background-color: var(--color-green); }

.chart-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
}

/* Nurse Note Panel & Logs */
.nurse-logs-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.logged-notes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.logged-note-item {
    background-color: rgba(19, 27, 46, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    font-size: 0.75rem;
}

.note-item-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.note-item-text {
    color: var(--text-secondary);
}

.nurse-note-input {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nurse-note-input textarea {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.6rem;
    resize: none;
    height: 70px;
    outline: none;
    font-size: 0.8rem;
}

.nurse-note-input textarea:focus {
    border-color: var(--color-brand);
}

.btn-row {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

/* Buttons System */
.btn {
    border-radius: var(--radius-md);
    padding: 0.45rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--color-brand);
    color: white;
}

.btn-primary:hover {
    background-color: #0284c7;
    box-shadow: var(--glow-brand);
}

.btn-danger {
    background-color: var(--color-red);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: var(--glow-red);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

/* Drawer overlay backdrop */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

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

/* ==========================================================================
   SECTION: DYNAMIC DUAL-SCREEN SMARTPHONE EMULATOR STYLING
   ========================================================================== */
.emulator-panel {
    width: 380px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
    flex-shrink: 0;
    gap: 1.25rem;
    z-index: 5;
}

.emulator-controls-box {
    background-color: rgba(19, 27, 46, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.emulator-controls-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--color-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.15rem;
}

/* Phone physical bezel container */
.phone-frame {
    width: 330px;
    height: 640px;
    background-color: #1e1e1e;
    border: 12px solid #0b0f19;
    border-radius: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), inset 0 0 3px #555;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Notch & home indicators */
.phone-speaker {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #333;
    border-radius: 10px;
    z-index: 10;
}

.phone-home-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 4px;
    background-color: #888;
    border-radius: 10px;
    z-index: 10;
}

/* Active smartphone screen contents */
.phone-screen {
    flex-grow: 1;
    background-color: #0b0f19; /* Pure dark mobile canvas */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding-bottom: 12px;
}

/* Status Bar */
.phone-status-bar {
    height: 24px;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background-color: #0b0f19;
    z-index: 9;
}

.phone-status-icons {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

/* LIFF Header */
.phone-liff-header {
    height: 38px;
    background-color: #1c273c;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.85rem;
    color: #e5e7eb;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.liff-close-cross {
    font-size: 1.1rem;
    cursor: pointer;
    color: #9ca3af;
}

.liff-options-dots {
    font-size: 0.9rem;
    cursor: pointer;
    color: #9ca3af;
}

.phone-liff-subheader {
    height: 28px;
    background-color: #141c2c;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.85rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    flex-shrink: 0;
}

/* Content Canvas */
.phone-liff-content {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    color: #f3f4f6;
}

/* ==========================================================================
   SIMULATOR LAYOUT TYPOLOGIES
   ========================================================================== */

/* OPTION A: GUIDED WIZARD */
.wizard-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

.wizard-progress {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.progress-step {
    flex-grow: 1;
    height: 4px;
    background-color: var(--bg-tertiary);
    border-radius: 10px;
    transition: background-color var(--transition-fast);
}

.progress-step.active {
    background-color: var(--color-brand);
    box-shadow: var(--glow-brand);
}

.wizard-screen {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    animation: fade-in-screen 0.3s ease-out;
}

.wizard-screen.active {
    display: flex;
}

@keyframes fade-in-screen {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-screen h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
}

.wizard-screen p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* Giant touch targets */
.touch-option-btn {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.touch-option-btn:hover {
    border-color: var(--text-muted);
}

.touch-option-btn.selected {
    border-color: var(--color-brand);
    background-color: rgba(14, 165, 233, 0.08);
    box-shadow: var(--glow-brand);
    color: #fff;
}

.touch-option-btn svg {
    color: var(--text-muted);
}

.touch-option-btn.selected svg {
    color: var(--color-brand);
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

/* OPTION B: QUICK TRIAGE SINGLE-PAGE SCROLLER */
.scroller-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scroller-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-purple);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.2rem;
    margin-top: 0.25rem;
}

.scroller-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.scroller-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.scroller-field select,
.scroller-field input[type="number"],
.scroller-field input[type="text"] {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 0.4rem 0.55rem;
    outline: none;
    font-size: 0.8rem;
}

.scroller-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* OPTION C: INTERACTIVE VISUAL BODY MAP */
.bodymap-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    height: 100%;
}

.bodymap-canvas {
    width: 100%;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
    background-color: rgba(19, 27, 46, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

/* Neon outline glowing body map paths */
.body-outline-svg {
    height: 90%;
    stroke: #38bdf8;
    stroke-width: 1.5;
    fill: rgba(14, 165, 233, 0.05);
    filter: drop-shadow(0 0 2px rgba(14, 165, 233, 0.3));
}

.body-zone-hitbox {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(14, 165, 233, 0.2);
    border: 2px solid var(--color-brand);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.body-zone-hitbox:hover, .body-zone-hitbox.selected {
    background-color: rgba(139, 92, 246, 0.3);
    border-color: var(--color-purple);
    transform: scale(1.15);
    box-shadow: 0 0 10px var(--color-purple);
    animation: none;
}

/* Hitbox coordinate zones */
.hitbox-head { top: 38px; left: 153px; width: 24px; height: 24px; }
.hitbox-chest { top: 90px; left: 153px; width: 24px; height: 24px; }
.hitbox-stomach { top: 125px; left: 153px; width: 26px; height: 26px; }
.hitbox-hands { top: 130px; left: 95px; width: 20px; height: 20px; }
.hitbox-hands-right { top: 130px; left: 215px; width: 20px; height: 20px; }
.hitbox-feet { bottom: 20px; left: 135px; width: 22px; height: 22px; }
.hitbox-feet-right { bottom: 20px; left: 173px; width: 22px; height: 22px; }

.bodymap-overlay-inputs {
    width: 100%;
    background-color: rgba(19, 27, 46, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    animation: fade-in-screen 0.25s ease-out;
}

/* Small smartphone camera box */
.sim-camera-box {
    background-color: var(--bg-secondary);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.sim-camera-box:hover, .sim-camera-box.has-photo {
    border-color: var(--color-brand);
    color: var(--text-primary);
    background-color: rgba(14, 165, 233, 0.05);
}

.simulator-toggle-btn {
    display: none; /* Hidden by default on widescreen, toggles on responsive */
}

/* Responsive clinical console collapse rules */
@media (max-width: 1200px) {
    .emulator-panel {
        display: none; /* Collapse panel on tablet/small screen */
    }
    
    .emulator-panel.floating-active {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: 380px;
        height: 100vh;
        z-index: 99;
        box-shadow: var(--shadow-lg);
    }
    
    .simulator-toggle-btn {
        display: inline-flex;
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        box-shadow: var(--shadow-lg);
        z-index: 80;
        background-color: var(--color-purple);
    }
    
    .simulator-toggle-btn:hover {
        background-color: #7c3aed;
        box-shadow: var(--glow-purple);
    }
}

/* ==========================================================================
   SECTION 6: BRAINSTORM SPECIFICATIONS ENRICHMENTS
   ========================================================================== */

/* 1. Modal Dialogs (QR Handshake & Verify Removal) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 1.5rem;
    animation: fade-in-screen 0.25s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    animation: slide-up-card 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up-card {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.modal-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal-x {
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}

.close-modal-x:hover {
    color: var(--text-primary);
}

/* 2. Onboarding Training Sandbox */
.training-banner {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    padding: 0.35rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: blink-training 3s infinite alternate;
}

@keyframes blink-training {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.storybook-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    padding: 1rem;
    text-align: center;
}

.storybook-slide {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    animation: fade-in-screen 0.3s ease-out;
}

.storybook-slide svg {
    color: var(--color-brand);
    filter: drop-shadow(var(--glow-brand));
}

.storybook-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.storybook-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.storybook-dot.active {
    background-color: var(--color-brand);
    transform: scale(1.2);
}

/* 3. Inline Color Tap Emojis */
.emoji-tap-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
}

.emoji-tap-card {
    flex: 1;
    background-color: rgba(19, 27, 46, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.emoji-tap-card .emoji-face {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
    transition: transform var(--transition-fast);
}

.emoji-tap-card .emoji-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
}

.emoji-tap-card .emoji-subtitle {
    font-size: 0.55rem;
    color: var(--text-muted);
    line-height: 1.1;
    margin-top: 0.1rem;
}

.emoji-tap-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
}

.emoji-tap-card:hover .emoji-face {
    transform: scale(1.15);
}

/* Emojis selection styling with custom glows */
.emoji-tap-card.selected[data-grade="0"] {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: var(--color-green);
    box-shadow: var(--glow-green);
}
.emoji-tap-card.selected[data-grade="1"] {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: var(--color-yellow);
    box-shadow: var(--glow-yellow);
}
.emoji-tap-card.selected[data-grade="2"] {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: var(--color-red);
    box-shadow: var(--glow-red);
}

/* 4. Sliding Conditional PRN Questions */
.prn-conditional-box {
    background-color: rgba(19, 27, 46, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    margin-top: 0.4rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    animation: slide-down-box 0.25s ease-out;
}

.prn-conditional-box.active {
    display: flex;
}

@keyframes slide-down-box {
    0% { opacity: 0; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}

.prn-toggle-buttons {
    display: flex;
    gap: 0.4rem;
}

.prn-toggle-btn {
    flex: 1;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    text-align: center;
}

.prn-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.prn-toggle-btn.selected {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    color: white;
    box-shadow: var(--glow-brand);
}

.prn-toggle-btn.selected.yes {
    background-color: var(--color-green);
    border-color: var(--color-green);
    box-shadow: var(--glow-green);
}

.prn-toggle-btn.selected.no {
    background-color: var(--color-red);
    border-color: var(--color-red);
    box-shadow: var(--glow-red);
}

/* 5. Sticky Phone Emergency Red Footer */
.phone-liff-footer-sticky {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: 0.4rem 0.6rem;
    z-index: 10;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
}

.emergency-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, var(--color-red), #b91c1c);
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    text-align: center;
    box-shadow: var(--glow-red);
    transition: transform var(--transition-fast);
}

.emergency-btn:hover {
    transform: scale(1.02);
}

/* 6. Rules of the RoadFAQ Accordion */
.rules-road-faq {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    overflow-y: auto;
    height: 100%;
}

.faq-item {
    background-color: rgba(19, 27, 46, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-header {
    padding: 0.6rem;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(19, 27, 46, 0.5);
    transition: background-color var(--transition-fast);
}

.faq-header:hover {
    background-color: var(--bg-tertiary);
}

.faq-content {
    padding: 0.6rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-glass);
    display: none;
    line-height: 1.35;
}

.faq-item.active .faq-content {
    display: block;
}

/* 7. WebRTC Camera Simulated Overlay */
.camera-stream-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-glass);
}

.camera-stream-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.camera-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.camera-svg-overlay rect.outline-rect,
.camera-svg-overlay path.outline-path {
    stroke: var(--color-brand);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 6 3;
    animation: flash-outline 2s infinite;
}

@keyframes flash-outline {
    0%, 100% { stroke-opacity: 0.5; }
    50% { stroke-opacity: 1; filter: drop-shadow(0 0 4px var(--color-brand)); }
}

/* 8. Glowing Emerald "Verify & Discharge" highlights */
.verify-discharge-highlight {
    border-color: var(--color-green) !important;
    box-shadow: var(--glow-green) !important;
    animation: glow-border-emerald 3s infinite alternate;
}

@keyframes glow-border-emerald {
    0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.15); }
    100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
}

.verify-discharge-banner-tag {
    background-color: var(--color-green);
    color: #000;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: var(--glow-green);
}

/* 9. Oncologist shadow graph elements */
.svg-shadow-graph {
    width: 100%;
    height: 180px;
    background-color: rgba(19, 27, 46, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.graph-axis-line {
    stroke: var(--text-muted);
    stroke-width: 1;
}

.graph-grid-line {
    stroke: var(--border-glass);
    stroke-width: 0.75;
    stroke-dasharray: 4 4;
}

.graph-line-current {
    stroke: var(--color-brand);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
}

.graph-line-shadow {
    stroke: var(--color-purple);
    stroke-width: 2.5;
    stroke-opacity: 0.3;
    fill: none;
    stroke-dasharray: 3 1;
    stroke-linecap: round;
}

.graph-sync-line {
    stroke: var(--color-yellow);
    stroke-width: 1.5;
    stroke-dasharray: 2 2;
    pointer-events: none;
}

.graph-point-current {
    fill: var(--color-brand);
    stroke: var(--bg-secondary);
    stroke-width: 2;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.graph-point-current:hover {
    transform: scale(1.3);
    fill: var(--text-primary);
}

.graph-point-shadow {
    fill: var(--color-purple);
    fill-opacity: 0.4;
    stroke: var(--bg-secondary);
    stroke-width: 1.5;
    cursor: pointer;
}

.pill-marker-icon {
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.pill-marker-icon:hover {
    transform: scale(1.3) translateY(-1px);
}

.graph-tooltip-box {
    position: absolute;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    pointer-events: none;
    z-index: 150;
    box-shadow: var(--shadow-md);
    font-size: 0.7rem;
    display: none;
}

/* 3D Flip Card Styles */
.flip-card-container {
    perspective: 1000px;
    width: 100%;
    height: 210px;
    position: relative;
}
.flip-card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    position: relative;
}
.flip-card-container.flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    overflow: hidden;
}
.flip-card-back {
    transform: rotateY(180deg);
    background-color: var(--bg-tertiary);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.05);
}
.layout-toggle-btn {
    transition: all var(--transition-fast);
}
.layout-toggle-btn.active {
    background-color: var(--color-purple) !important;
    color: #fff !important;
    box-shadow: var(--glow-purple) !important;
}

/* SVG Circular Progress Ring */
.progress-ring-circle {
    transition: stroke-dashoffset 0.6s ease-out;
    transform: rotate(-90deg);
    transform-origin: 18px 18px;
}

/* Status Lamp Pills */
.status-pill {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    text-align: center;
    border: 1px solid transparent;
}
.status-pill.untriggered {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.05);
}
.status-pill.mild {
    background-color: var(--color-yellow);
    color: #000;
    font-weight: 800;
    border-color: rgba(245, 158, 11, 0.2);
}
.status-pill.severe {
    background-color: var(--color-red);
    color: #fff;
    font-weight: 800;
    border-color: rgba(239, 68, 68, 0.2);
    animation: status-pulse-red 1.2s infinite;
}
@keyframes status-pulse-red {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}

/* Morning Brief checklist */
.brief-item-row {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: background 0.2s, border-color 0.2s;
}
.brief-item-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(139, 92, 246, 0.2);
}

/* Academic Vault audit selectable tag styles */
.vault-selectable-tag {
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.vault-selectable-tag.selected {
    background-color: var(--color-purple) !important;
    border-color: var(--color-purple) !important;
    color: #fff !important;
    box-shadow: var(--glow-purple);
}

/* =============================================
   CLINICAL ANALYTICS CHARTS
   ============================================= */
.analytics-chart-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-brand);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* SVG Chart Base */
.analytics-svg-chart {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.analytics-svg-chart text {
    font-family: 'Inter', sans-serif;
    fill: var(--text-muted);
    font-size: 10px;
}

/* Temperature chart patient lines */
.temp-line {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
    transition: opacity 0.2s ease, stroke-width 0.2s ease;
}
.temp-line:hover, .temp-line.highlighted {
    opacity: 1;
    stroke-width: 3;
}
.temp-dot {
    r: 3.5;
    stroke-width: 2;
    transition: r 0.2s ease;
    cursor: pointer;
}
.temp-dot:hover {
    r: 6;
}
.threshold-line {
    stroke-dasharray: 6 4;
    stroke-width: 1.5;
    opacity: 0.5;
}
.chart-legend-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-right: 0.6rem;
}
.chart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Donut Chart */
.donut-segment {
    transition: opacity 0.2s ease;
    cursor: pointer;
}
.donut-segment:hover {
    opacity: 0.85;
    filter: brightness(1.2);
}
@keyframes donutDraw {
    from { stroke-dashoffset: var(--circumference); }
    to { stroke-dashoffset: var(--final-offset); }
}
.donut-center-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

/* CTCAE Stacked Bars */
.ctcae-bar-segment {
    transition: opacity 0.2s ease;
    cursor: pointer;
    rx: 2;
    ry: 2;
}
.ctcae-bar-segment:hover {
    opacity: 0.8;
    filter: brightness(1.15);
}
.ctcae-bar-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    fill: var(--text-secondary);
    font-weight: 600;
}

/* Compliance Area Chart */
.compliance-area {
    opacity: 0.3;
}
.compliance-line {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.compliance-dot {
    r: 4;
    stroke-width: 2;
    cursor: pointer;
    transition: r 0.2s ease;
}
.compliance-dot:hover {
    r: 7;
}

/* SVG draw-in animation */
@keyframes svgDashDraw {
    from { stroke-dashoffset: var(--line-length); }
    to { stroke-dashoffset: 0; }
}
.animate-line-draw {
    animation: svgDashDraw 1.2s ease-out forwards;
}

@keyframes wipeRight {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}
.animate-wipe-right {
    animation: wipeRight 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Chart tooltip */
.chart-tooltip {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.15s ease;
}
.chart-tooltip.visible {
    opacity: 1;
}

/* =============================================
   GHOST PROTOCOL ESCALATION
   ============================================= */
.ghost-patient-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}
.ghost-patient-row.ghost-nudge {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.06);
}
.ghost-patient-row.ghost-escalated {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
    animation: ghostPulse 2s ease-in-out infinite;
}
@keyframes ghostPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    50% { box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.25); }
}
.ghost-status-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.ghost-badge-ok {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.ghost-badge-nudge {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-yellow);
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.ghost-badge-escalated {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.ghost-timer {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* =============================================
   TOAST NOTIFICATION SYSTEM
   ============================================= */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 380px;
}
.toast-notification {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-notification.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}
.toast-notification .toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.toast-notification .toast-body {
    flex: 1;
    min-width: 0;
}
.toast-notification .toast-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.toast-notification .toast-message {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.toast-notification .toast-time {
    font-size: 0.55rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 0.2rem;
}
@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* =============================================
   ONCOLOGIST PORTAL WORKSPACE GRAPH TABS & EXTRA
   ============================================= */
.doc-symptom-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.doc-symptom-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}
.doc-symptom-tab.active {
    color: #fff;
    background: var(--color-purple);
    border-color: var(--color-purple);
    box-shadow: var(--glow-purple);
}
/* Doctor Workspace Responsive Layout Classes */
.doc-workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}
.doc-workspace-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
}
.doc-sparklines-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.doc-adherence-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.doc-credential-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 0.75rem;
}

/* =============================================
   LIGHT THEME ACCESSIBILITY POLISH
   ============================================= */
[data-theme="light"] .sparkline-card,
[data-theme="light"] .kpi-card,
[data-theme="light"] #shift-time-controls,
[data-theme="light"] .ghost-patient-row {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .triage-table th {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

[data-theme="light"] .triage-table td {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

[data-theme="light"] .ghost-patient-row.ghost-nudge {
    background: rgba(245, 158, 11, 0.05) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

[data-theme="light"] .ghost-patient-row.ghost-escalated {
    background: rgba(239, 68, 68, 0.05) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-theme="light"] .toast-notification {
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
}

/* =============================================
   RESPONSIVE DESIGN SYSTEM MEDIA QUERIES
   ============================================= */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100vw;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        padding: 0.75rem 1.25rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .sidebar-logo {
        margin-bottom: 0;
        padding-left: 0;
    }
    
    .sidebar-menu {
        flex-direction: row;
        gap: 0.35rem;
        margin-bottom: 0;
        flex-grow: 0;
    }
    
    .menu-item a {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .sidebar-footer {
        display: none; /* Hide footer avatar on tablets/mobiles to save room */
    }
    
    .dashboard-workspace {
        height: calc(100vh - 120px) !important;
        overflow-y: auto !important;
        padding: 1.25rem !important;
    }
    
    /* Responsive Split Widescreen views */
    .dashboard-workspace[id="doctor-view"] > div {
        grid-template-columns: 1fr !important; /* Stack cohort and workspace details */
    }
    
    /* Academic Vault split view */
    #clinical-vault-view > div {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sidebar-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        white-space: nowrap;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .layout-toggle-btn {
        display: none; /* Table only on tiny mobile screens */
    }
    
    #shift-time-controls {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* ==========================================================================
   MILESTONE 1: 3D GATEKEEPER & CLINICAL PORTAL BADGE STYLES
   ========================================================================== */
#auth-gatekeeper-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0b0f19;
    z-index: 999999;
    perspective: 1000px;
    font-family: 'Inter', sans-serif;
}
#auth-gatekeeper-scene .badge-card {
    width: 320px;
    height: 380px; 
    position: relative;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
#auth-gatekeeper-scene .badge-card.is-flipped {
    transform: rotateY(180deg);
}
#auth-gatekeeper-scene .badge-card.is-registering {
    height: 520px; /* Elastic vertical stretch */
}
#auth-gatekeeper-scene .card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
#auth-gatekeeper-scene .card-front {
    background: #ffffff;
    color: #0f172a;
}
#auth-gatekeeper-scene .card-back {
    background: #131b2e;
    color: #f3f4f6;
    transform: rotateY(180deg);
    border: 1px solid rgba(245, 158, 11, 0.3); /* Admin Amber highlight */
}
#auth-gatekeeper-scene .badge-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}
#auth-gatekeeper-scene .badge-header.dark-mode { 
    border-bottom: 1px solid #1e2942; 
}
#auth-gatekeeper-scene .badge-header h2 { 
    margin: 0; 
    font-size: 1.4rem; 
    color: #0ea5e9; 
    font-family: 'Outfit', sans-serif; 
    font-weight: 700;
}
#auth-gatekeeper-scene .card-back .badge-header h2 { 
    color: #f59e0b; 
}
#auth-gatekeeper-scene .badge-header p { 
    margin: 5px 0 0; 
    font-size: 0.8rem; 
    color: #64748b; 
    font-weight: 500; 
}
#auth-gatekeeper-scene .form-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#auth-gatekeeper-scene .form-section.hidden {
    display: none;
}
#auth-gatekeeper-scene input, #auth-gatekeeper-scene select {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}
#auth-gatekeeper-scene .card-front input, #auth-gatekeeper-scene .card-front select {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}
#auth-gatekeeper-scene .card-back input {
    background: #0b0f19;
    border: 1px solid #2d313a;
    color: #ffffff;
}
#auth-gatekeeper-scene button {
    background: #0ea5e9;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 100%;
}
#auth-gatekeeper-scene button:hover { 
    background: #0284c7; 
}
#auth-gatekeeper-scene button.btn-danger { 
    background: #f59e0b; 
    color: #000000;
    font-weight: 700;
}
#auth-gatekeeper-scene button.btn-danger:hover { 
    background: #d97706; 
}
#auth-gatekeeper-scene .link-text { 
    text-align: center; 
    font-size: 0.8rem; 
    color: #64748b; 
    text-decoration: none; 
    font-weight: 500; 
    margin-top: 5px;
}
#auth-gatekeeper-scene .link-text:hover { 
    color: #0ea5e9; 
}
#auth-gatekeeper-scene .card-back .link-text { 
    color: #94a3b8; 
}
#auth-gatekeeper-scene .card-back .link-text:hover { 
    color: #f59e0b; 
}
#auth-gatekeeper-scene .admin-trigger { 
    position: absolute; 
    bottom: 15px; 
    right: 15px; 
    cursor: pointer; 
    opacity: 0.15; 
    transition: opacity 0.2s; 
    font-size: 1.1rem;
}
#auth-gatekeeper-scene .admin-trigger:hover { 
    opacity: 1; 
}

/* ==========================================================================
   MILESTONE 2 & 3: TACTICAL ADMIN DASHBOARD & DUAL-PANE COMMAND CENTER
   ========================================================================== */
.admin-dashboard { 
    display: flex; 
    width: 100vw; 
    height: 100vh; 
    background-color: #0f1115; 
    color: #e2e8f0; 
    font-family: 'Inter', sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
}
.admin-sidebar { 
    width: 260px; 
    background-color: #1a1d24; 
    border-right: 1px solid #2d313a; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0; 
}
.admin-sidebar .brand { 
    padding: 24px; 
    border-bottom: 1px solid #2d313a; 
}
.admin-sidebar .brand h3 { 
    margin: 0; 
    color: #ffffff; 
    letter-spacing: 1px; 
    font-family: 'Outfit', sans-serif; 
}
.admin-sidebar .brand span { 
    color: #f59e0b; 
}
.admin-sidebar .nav-links { 
    list-style: none; 
    padding: 0; 
    margin: 20px 0; 
}
.admin-sidebar .nav-links li { 
    padding: 16px 24px; 
    cursor: pointer; 
    color: #94a3b8; 
    font-weight: 600; 
    transition: all 0.2s; 
    font-size: 0.9rem;
}
.admin-sidebar .nav-links li:hover, .admin-sidebar .nav-links li.active { 
    background-color: rgba(245, 158, 11, 0.08); 
    color: #f59e0b; 
    border-right: 4px solid #f59e0b; 
}
.admin-sidebar .logout-btn { 
    margin: auto auto 24px auto; 
    background: transparent; 
    color: #ef4444; 
    border: 1px solid #ef4444; 
    padding: 10px 24px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: all 0.2s;
    width: 80%;
}
.admin-sidebar .logout-btn:hover { 
    background: rgba(239, 68, 68, 0.1); 
}
.admin-workspace { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    padding: 30px; 
    overflow: hidden; 
}
.admin-subview-panel { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    width: 100%; 
    overflow: hidden; 
}
.workspace-header h2 { 
    margin: 0 0 6px 0; 
    color: #ffffff; 
    font-family: 'Outfit', sans-serif; 
    font-size: 1.6rem; 
}
.workspace-header p { 
    margin: 0 0 24px 0; 
    color: #94a3b8; 
    font-size: 0.9rem; 
}
.dossier-layout { 
    display: flex; 
    gap: 20px; 
    flex-grow: 1; 
    min-height: 0; 
}
.roster-pane { 
    flex: 1; 
    background-color: #1a1d24; 
    border: 1px solid #2d313a; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}
.dossier-pane { 
    flex: 2; 
    background-color: #1a1d24; 
    border: 1px solid #2d313a; 
    border-radius: 8px; 
    padding: 24px; 
    overflow-y: auto; 
}
.pane-header { 
    padding: 16px; 
    border-bottom: 1px solid #2d313a; 
    font-weight: 700; 
    color: #f59e0b; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    background: #222630;
}
.user-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    overflow-y: auto; 
}
.user-item { 
    padding: 16px; 
    border-bottom: 1px solid #2d313a; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: background 0.15s; 
}
.user-item:hover { 
    background-color: #242936; 
}
.user-item.selected { 
    background-color: rgba(245, 158, 11, 0.08); 
    border-left: 4px solid #f59e0b; 
}
.badge-role { 
    background: #2d313a; 
    padding: 4px 10px; 
    border-radius: 4px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: #e2e8f0; 
    letter-spacing: 0.5px;
}
.empty-state { 
    color: #64748b; 
    text-align: center; 
    margin-top: 100px; 
    font-style: italic; 
    font-size: 0.95rem; 
}
.dossier-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-top: 20px; 
}
.dossier-card { 
    background: #0f1115; 
    padding: 16px; 
    border-radius: 8px; 
    border: 1px solid #2d313a; 
}
.dossier-card label { 
    display: block; 
    color: #94a3b8; 
    font-size: 0.75rem; 
    margin-bottom: 6px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}
.dossier-card .value { 
    font-size: 1.1rem; 
    color: #ffffff; 
    font-weight: 600; 
}
.action-bar { 
    margin-top: 30px; 
    display: flex; 
    gap: 16px; 
}
.btn-approve { 
    background: #10b981; 
    color: #ffffff; 
    border: none; 
    padding: 14px 28px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 700; 
    font-size: 0.9rem; 
    letter-spacing: 0.5px; 
}
.btn-approve:hover { 
    background: #059669; 
}
.btn-reject { 
    background: transparent; 
    color: #ef4444; 
    border: 1px solid #ef4444; 
    padding: 14px 28px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 700; 
    font-size: 0.9rem; 
    transition: background 0.2s;
}
.btn-reject:hover { 
    background: rgba(239, 68, 68, 0.1); 
}

/* Regimen Builder special elements */
.regimen-builder {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow-y: auto;
}
.builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2d313a;
    padding-bottom: 15px;
    margin-bottom: 10px;
}
.title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.master-accordion {
    background: #1a1d24;
    border: 1px solid #2d313a;
    border-radius: 8px;
    overflow: hidden;
}
.master-accordion summary {
    padding: 16px 20px;
    font-weight: 700;
    cursor: pointer;
    background: #222630;
    border-bottom: 1px solid #2d313a;
    outline: none;
    user-select: none;
    color: #fff;
}
.master-accordion .accordion-content {
    padding: 20px;
    background: #1a1d24;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-group.full-width {
    grid-column: span 2;
}
.input-group label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.input-group input {
    background: #0f1115;
    border: 1px solid #2d313a;
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}
.triage-matrix {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.triage-matrix th {
    text-align: left;
    padding: 12px 16px;
    background: #0f1115;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid #2d313a;
}
.triage-matrix td {
    padding: 12px 16px;
    border-bottom: 1px solid #2d313a;
}
.triage-matrix select {
    cursor: pointer;
}
.day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}
.day-toggle {
    background: #0f1115;
    border: 1px solid #2d313a;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    color: #94a3b8;
}
.day-toggle:hover {
    background: #242936;
    color: #fff;
}
.day-toggle.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

/* ==========================================================================
   MILESTONE 4: LEXICON GOVERNANCE dictionary controls
   ========================================================================== */
.lexicon-wrangler {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow: hidden;
}
.wrangler-toolbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #1a1d24; 
    padding: 16px 20px; 
    border-radius: 6px; 
    border: 1px solid #2d313a; 
    margin-bottom: 15px;
}
.wrangler-toolbar .toolbar-actions {
    display: flex;
    gap: 10px;
}
.lexicon-wrangler .table-container { 
    background: #1a1d24; 
    border: 1px solid #2d313a; 
    border-radius: 6px; 
    overflow-y: auto; 
    flex-grow: 1; 
}
.wrangler-matrix { 
    width: 100%; 
    border-collapse: collapse; 
}
.wrangler-matrix th { 
    background: #222630; 
    padding: 12px 16px; 
    color: #94a3b8; 
    font-size: 0.8rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    position: sticky; 
    top: 0; 
    z-index: 5; 
    border-bottom: 2px solid #2d313a;
    text-align: left;
}
.wrangler-matrix td { 
    padding: 12px 16px; 
    border-bottom: 1px solid #2d313a; 
    font-size: 0.85rem;
}
.wrangler-matrix tr:hover { 
    background: #1f232e; 
}
.rogue-tag { 
    font-family: monospace; 
    color: #ef4444; 
    background: rgba(239, 68, 68, 0.08); 
    padding: 4px 8px; 
    border-radius: 4px; 
    border: 1px solid rgba(239, 68, 68, 0.15); 
    font-weight: 600;
}
.master-select { 
    width: 100%; 
    padding: 8px; 
    background: #0f1115; 
    border: 1px solid #2d313a; 
    color: #10b981; 
    font-family: monospace; 
    font-weight: 700; 
    border-radius: 4px; 
    outline: none;
    cursor: pointer;
}
.confidence-wrapper { 
    width: 100%; 
    background: #0f1115; 
    border-radius: 10px; 
    height: 6px; 
    overflow: hidden; 
    margin-top: 6px; 
    border: 1px solid #2d313a;
}
.confidence-fill { 
    height: 100%; 
    border-radius: 10px; 
}
.score-high { 
    background: #10b981; 
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); 
}
.score-med { 
    background: #f59e0b; 
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); 
}
.score-low { 
    background: #ef4444; 
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); 
}
.score-text { 
    font-size: 0.75rem; 
    font-weight: 700; 
}
.btn-quick-merge { 
    background: transparent; 
    color: #f59e0b; 
    border: 1px solid #f59e0b; 
    padding: 6px 12px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 0.75rem; 
    font-weight: 600; 
    transition: all 0.15s;
}
.btn-quick-merge:hover { 
    background: #f59e0b; 
    color: #000000; 
    font-weight: 700; 
}

/* ==========================================================================
   MILESTONE 5: STAFF ALLOCATION KANBAN BOARD
   ========================================================================== */
.kanban-layout {
    width: 100%;
}
.kanban-board {
    width: 100%;
}
.kanban-column { 
    flex: 1; 
    min-width: 240px; 
    background: #131b2e; 
    border: 1px solid var(--border-glass); 
    border-radius: 14px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    transition: all var(--transition-fast);
}
.kanban-column.drag-over { 
    background: #1e2942; 
    border-color: var(--color-brand); 
    box-shadow: var(--glow-brand); 
}
.kanban-column .col-header {
    padding: 12px 15px;
    background: rgba(255,255,255,0.02);
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    border-bottom: 1px solid var(--border-glass);
    border-top: 3px solid var(--color-brand);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kanban-column .col-body { 
    padding: 15px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    min-height: 120px; 
}
.staff-token { 
    background: #0b0f19; 
    border: 1px solid var(--border-glass); 
    padding: 12px; 
    border-radius: var(--radius-md); 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    cursor: grab; 
    user-select: none; 
    transition: transform var(--transition-fast);
}
.staff-token:active { 
    cursor: grabbing; 
    border-color: var(--color-purple); 
    box-shadow: var(--glow-purple); 
}
.staff-token .avatar { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    font-size: 0.75rem; 
    color: #ffffff; 
    flex-shrink: 0; 
}
.staff-token .info { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--text-primary); 
}
.audit-terminal {
    height: 100%;
}
.audit-terminal .terminal-body div {
    margin-bottom: 4px;
    font-family: monospace;
}

/* ==========================================================================
   MILESTONE 6: SHIFT DEBRIEF RED FLAGS LIST
   ========================================================================== */
.flag-list .flag-item {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.35;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--color-brand);
}
.flag-list .flag-item.danger-log {
    border-left-color: var(--color-red);
    background: rgba(239, 68, 68, 0.05);
}
.flag-list .flag-item.warning-log {
    border-left-color: var(--color-yellow);
    background: rgba(245, 158, 11, 0.05);
}

/* Standby / Unassigned Staff Kanban Override */
#col-unassigned {
    border: 1px dashed rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.01) !important;
}
#col-unassigned .col-header {
    border-top-color: #64748b !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15) !important;
}
#col-unassigned.drag-over {
    border-color: var(--color-brand) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ==========================================================================
   MILESTONE 8: PREMIUM RESPONSIVE MOBILE VIEW INTEGRATIONS (GRILL-ME)
   ========================================================================== */

/* Glassmorphic Bottom Navigation Bar styling */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 56px;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding: 0 10px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
    gap: 3px;
    flex: 1;
    height: 100%;
    transition: all var(--transition-fast);
    position: relative;
    padding: 0;
}

.mobile-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: all var(--transition-fast);
}

.mobile-nav-btn.active {
    color: var(--color-brand);
}

.mobile-nav-btn.active svg {
    stroke: var(--color-brand);
    filter: drop-shadow(0 0 5px var(--color-brand));
    transform: translateY(-2px);
}

/* Pulse indicator dot for active mobile navigation tab */
.mobile-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--color-brand);
    box-shadow: var(--glow-brand);
}

/* Sync with Oncologist / Doctor workspace slide-in details wrapper */
.mobile-back-btn {
    align-self: flex-start;
    margin-bottom: 12px;
    display: none;
}

/* Responsive Media Queries under 768px */
@media (max-width: 768px) {
    /* Reveal Bottom Nav and adjust main screen spacing */
    .mobile-bottom-nav {
        display: flex;
    }
    
    .sidebar {
        display: none !important; /* Hide standard sidebar logo and header on true mobile screen */
    }
    
    .main-content {
        padding-bottom: 56px !important;
    }
    
    .dashboard-workspace {
        height: calc(100vh - 120px) !important;
        padding: 1rem !important;
        /* Scrutinize Finding 2: Safe bottom padding so contents don't get hidden under bottom nav bar */
        padding-bottom: 80px !important;
        overflow-y: auto !important;
    }
    
    #simulator-sandbox-view {
        height: calc(100vh - 56px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 !important;
        padding-bottom: 0 !important;
    }
    #simulator-sandbox-view iframe {
        height: 100% !important;
        width: 100% !important;
        border: none !important;
        overflow: auto !important;
    }
    
    .header {
        height: auto !important;
        min-height: 56px !important;
        padding: 0.5rem 0.75rem !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .header-title h1 {
        font-size: 0.95rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px !important;
    }

    .header-actions {
        gap: 0.4rem !important;
    }

    .header-actions .search-box {
        display: none !important;
    }

    .mobile-signoff-btn {
        display: flex !important;
    }

    .triage-section-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }

    .triage-section-header > div {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .triage-filters {
        display: flex !important;
        gap: 0.4rem !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        width: 100% !important;
        padding: 0.15rem 0.25rem !important;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .triage-filters::-webkit-scrollbar {
        display: none !important;
    }

    .filter-btn {
        flex-shrink: 0 !important;
    }

    /* Roster Table to Cards layout transformation */
    .triage-table, .triage-table thead, .triage-table tbody, .triage-table tr, .triage-table td {
        display: block !important;
        width: 100% !important;
    }
    
    .triage-table thead {
        display: none !important; /* Hide native columns headers */
    }
    
    .triage-table tbody {
        padding: 0 !important;
    }
    
    .triage-table tr {
        background: rgba(19, 27, 46, 0.45) !important;
        border: 1px solid var(--border-glass) !important;
        border-radius: var(--radius-md) !important;
        margin-bottom: 1rem !important;
        padding: 0.85rem !important;
        transition: border-color 0.25s, box-shadow 0.25s !important;
    }
    
    .triage-table tr.verify-discharge-highlight {
        border-color: var(--color-green) !important;
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.15) !important;
    }
    
    .triage-table td {
        border: none !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.04) !important;
        padding: 0.5rem 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: right !important;
    }
    
    .triage-table td:last-child {
        border-bottom: none !important;
        padding-top: 0.75rem !important;
    }
    
    /* Inject row labels using data-label properties */
    .triage-table td::before {
        content: attr(data-label);
        font-family: var(--font-heading);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
        margin-right: 15px;
    }
    
    .patient-cell {
        align-items: flex-end !important;
    }
    
    .symptom-tag-list {
        justify-content: flex-end;
    }
    
    .row-actions {
        justify-content: flex-end;
    }

    /* Shift Kanban Board Mobile Stacking */
    .kanban-layout {
        flex-direction: column !important;
        overflow-y: auto !important;
    }
    
    .kanban-board {
        flex-direction: column !important;
        overflow-y: visible !important;
    }
    
    .kanban-column {
        width: 100% !important;
        min-width: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .audit-terminal {
        margin-top: 15px;
        height: 220px !important;
        min-height: 220px !important;
        flex-shrink: 0;
    }

    /* Scrutinize Finding 1: Enforce full viewport width drawer sizes on mobile screens */
    .detail-drawer {
        width: 100vw !important;
        z-index: 10000 !important;
    }

    /* Doctor Workspace Slide-In View overlay structure */
    #doc-clinical-workspace {
        position: fixed !important;
        top: 0 !important;
        left: 100% !important;
        width: 100vw !important;
        height: calc(100vh - 56px) !important;
        z-index: 999 !important;
        background: var(--bg-primary) !important;
        transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        padding: 1.25rem !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        border: none !important;
    }
    
    #doc-clinical-workspace.workspace-open {
        left: 0 !important;
    }
    
    .mobile-back-btn {
        display: inline-flex !important;
        margin-top: 0.5rem;
    }

    /* Hide the floating sandbox simulator launcher bezel, integrated into Sandbox tab */
    .simulator-toggle-btn {
        display: none !important;
    }
    
    #phone-emulator-panel {
        display: none !important; /* Force hide sidebar simulator */
    }

    /* Doctor Workspace Mobile Stacking */
    .doc-workspace-header {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: stretch !important;
    }
    .doc-workspace-header > div:last-child {
        text-align: left !important;
        margin-top: 0.25rem;
    }
    .doc-workspace-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    .doc-sparklines-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    .doc-adherence-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    .doc-credential-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* Spotlight Overlay Backdrop */
#hcmt-tour-spotlight {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    border-radius: 8px;
    border: 2px solid var(--color-brand);
    box-shadow: 0 0 0 9999px rgba(11, 15, 25, 0.75), var(--glow-brand);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: tour-spotlight-pulse 2s infinite alternate;
}

@keyframes tour-spotlight-pulse {
    0% { border-color: var(--color-brand); box-shadow: 0 0 0 9999px rgba(11, 15, 25, 0.75), 0 0 8px var(--color-brand); }
    100% { border-color: #0284c7; box-shadow: 0 0 0 9999px rgba(11, 15, 25, 0.75), 0 0 16px #0284c7; }
}

/* Glassmorphic Tooltip Box */
#hcmt-tour-tooltip {
    position: fixed;
    z-index: 10001;
    width: 300px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem;
    color: #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), var(--glow-purple);
    font-family: 'Sarabun', 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.95);
}

#hcmt-tour-tooltip.active {
    opacity: 1;
    transform: scale(1);
}

.tour-tooltip-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1;
}

.tour-tooltip-close:hover {
    color: var(--color-red);
}

.tour-tooltip-progress {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-brand);
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.tour-tooltip-title {
    font-family: 'Outfit', 'Sarabun', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.tour-tooltip-text {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tour-tooltip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.tour-btn {
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.05);
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.tour-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.tour-btn-primary {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    box-shadow: var(--glow-brand);
}

.tour-btn-primary:hover {
    background-color: #0c8377;
    border-color: #0c8377;
}

.tour-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================================================
   SECTION: PREMIUM GLASSMORPHIC KPI EXPORT DROPDOWN STYLING
   ========================================================================== */
.kpi-export-dropdown {
    position: relative;
    display: inline-block;
}

.kpi-export-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(19, 27, 46, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), var(--glow-brand-dim);
    display: flex;
    flex-direction: column;
    padding: 0.4rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.kpi-export-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.kpi-export-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.kpi-export-item:hover {
        gap: 0.75rem !important;
        align-items: stretch !important;
    }
    .doc-workspace-header > div:last-child {
        text-align: left !important;
        margin-top: 0.25rem;
    }
    .doc-workspace-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    .doc-sparklines-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    .doc-adherence-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    .doc-credential-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* Spotlight Overlay Backdrop */
#hcmt-tour-spotlight {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    border-radius: 8px;
    border: 2px solid var(--color-brand);
    box-shadow: 0 0 0 9999px rgba(11, 15, 25, 0.75), var(--glow-brand);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: tour-spotlight-pulse 2s infinite alternate;
}

@keyframes tour-spotlight-pulse {
    0% { border-color: var(--color-brand); box-shadow: 0 0 0 9999px rgba(11, 15, 25, 0.75), 0 0 8px var(--color-brand); }
    100% { border-color: #0284c7; box-shadow: 0 0 0 9999px rgba(11, 15, 25, 0.75), 0 0 16px #0284c7; }
}

/* Glassmorphic Tooltip Box */
#hcmt-tour-tooltip {
    position: fixed;
    z-index: 10001;
    width: 300px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem;
    color: #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), var(--glow-purple);
    font-family: 'Sarabun', 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.95);
}

#hcmt-tour-tooltip.active {
    opacity: 1;
    transform: scale(1);
}

.tour-tooltip-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1;
}

.tour-tooltip-close:hover {
    color: var(--color-red);
}

.tour-tooltip-progress {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-brand);
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.tour-tooltip-title {
    font-family: 'Outfit', 'Sarabun', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.tour-tooltip-text {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tour-tooltip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.tour-btn {
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.05);
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.tour-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.tour-btn-primary {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    box-shadow: var(--glow-brand);
}

.tour-btn-primary:hover {
    background-color: #0c8377;
    border-color: #0c8377;
}

.tour-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================================================
   SECTION: PREMIUM GLASSMORPHIC KPI EXPORT DROPDOWN STYLING
   ========================================================================== */
.kpi-export-dropdown {
    position: relative;
    display: inline-block;
}

.kpi-export-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(19, 27, 46, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), var(--glow-brand-dim);
    display: flex;
    flex-direction: column;
    padding: 0.4rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.kpi-export-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.kpi-export-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.kpi-export-item:hover {
    background: rgba(14, 165, 233, 0.12);
    color: var(--text-primary);
    box-shadow: inset 0 0 6px rgba(14, 165, 233, 0.15);
}

.kpi-export-item span {
    font-size: 0.9rem;
}

/* ==========================================================================
   SECTION: PREMIUM GLASSMORPHIC DATE RANGE SELECTOR STYLING
   ========================================================================== */
.analytics-filter-bar {
    background: rgba(19, 27, 46, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.65rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-presets {
    display: flex;
    background: rgba(19, 27, 46, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 0.15rem;
}

.preset-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.preset-btn:hover {
    color: var(--text-primary);
}

.preset-btn.active {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: var(--color-brand);
    box-shadow: var(--glow-brand-dim);
}

/* Date inputs styling */
.date-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.date-input-wrapper label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.date-input {
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    color: #fff;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    outline: none;
    color-scheme: dark;
}

.date-input:focus {
    border-color: var(--color-brand);
}

/* Accent active glow for filtered charts */
.sparkline-card.filtered-active {
    border-color: rgba(245, 158, 11, 0.3) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1) !important;
}

/* Empty state within filtered charts */
.chart-empty-state {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem;
    gap: 0.5rem;
    animation: fade-in-screen 0.25s ease-out;
}

.chart-empty-state-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--color-yellow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-empty-state-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
}
