@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   PSICONEXUS COMPREHENSIBLE SEMANTIC COLOR SYSTEM (WCAG AAA/AA)
   ========================================================================== */

:root, body.light-theme, [data-theme="light"] {
    /* Base & Backgrounds */
    --bg-base: #F4F6F9;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F0F4F8;
    --bg-hover: #E2E8F0;
    --bg-active: #E0F2FE;

    /* Text & Readability (Ultra High Contrast) */
    --text-primary: #0F172A;     /* Deep Slate 900 - 14:1 contrast on white */
    --text-secondary: #334155;   /* Slate 700 - 9:1 contrast on white */
    --text-muted: #64748B;       /* Slate 500 - 4.8:1 contrast on white */
    --text-inverse: #FFFFFF;

    /* Borders & Separation */
    --border-subtle: #E2E8F0;
    --border-control: #94A3B8;
    --border-focus: #0284C7;

    /* Primary Clinical Action */
    --action-primary: #0284C7;
    --action-primary-hover: #0369A1;
    --text-on-primary: #FFFFFF;

    /* Secondary Action / Buttons */
    --btn-secondary-bg: #FFFFFF;
    --btn-secondary-text: #0F172A;
    --btn-secondary-border: #CBD5E1;
    --btn-secondary-hover-bg: #F1F5F9;

    /* Semantic Badges & Feedback */
    --badge-blue-bg: #E0F2FE;
    --badge-blue-text: #0369A1;
    --badge-blue-border: #BAE6FD;

    --badge-green-bg: #DCFCE7;
    --badge-green-text: #15803D;
    --badge-green-border: #86EFAC;

    --badge-amber-bg: #FEF3C7;
    --badge-amber-text: #92400E;
    --badge-amber-border: #FDE68A;

    --badge-purple-bg: #F3E8FF;
    --badge-purple-text: #6B21A8;
    --badge-purple-border: #DDD6FE;

    --badge-rose-bg: #FFE4E6;
    --badge-rose-text: #9F1239;
    --badge-rose-border: #FECDD3;

    /* Counter-evidence & Attention Box */
    --counter-box-bg: #FEF3C7;
    --counter-box-border: #D97706;
    --counter-box-text: #78350F;
    --counter-box-strong: #92400E;

    /* Open Loops / Pending */
    --open-loop-bg: #FFFFFF;
    --open-loop-border: #CBD5E1;
    --open-loop-accent: #D97706;

    /* Sidebar Navigation */
    --sidebar-bg: #FFFFFF;
    --sidebar-border: #E2E8F0;
    --sidebar-text: #334155;
    --sidebar-text-active: #0284C7;
    --sidebar-bg-active: #E0F2FE;
    --sidebar-user-bg: #F8FAFC;
    --sidebar-user-border: #E2E8F0;

    /* Elevation & Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

body.dark-theme, [data-theme="dark"] {
    /* Base & Backgrounds */
    --bg-base: #0B0F17;
    --bg-surface: #131B26;
    --bg-subtle: #1A2433;
    --bg-hover: #243042;
    --bg-active: rgba(56, 189, 248, 0.15);

    /* Text & Readability */
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-inverse: #0B0F17;

    /* Borders & Separation */
    --border-subtle: #263447;
    --border-control: #475569;
    --border-focus: #38BDF8;

    /* Primary Clinical Action */
    --action-primary: #38BDF8;
    --action-primary-hover: #7DD3FC;
    --text-on-primary: #0B0F17;

    /* Secondary Action / Buttons */
    --btn-secondary-bg: #1A2433;
    --btn-secondary-text: #F8FAFC;
    --btn-secondary-border: #354052;
    --btn-secondary-hover-bg: #263447;

    /* Semantic Badges & Feedback */
    --badge-blue-bg: rgba(56, 189, 248, 0.15);
    --badge-blue-text: #7DD3FC;
    --badge-blue-border: rgba(56, 189, 248, 0.3);

    --badge-green-bg: rgba(52, 211, 153, 0.15);
    --badge-green-text: #6EE7B7;
    --badge-green-border: rgba(52, 211, 153, 0.3);

    --badge-amber-bg: rgba(245, 158, 11, 0.15);
    --badge-amber-text: #FDE68A;
    --badge-amber-border: rgba(245, 158, 11, 0.3);

    --badge-purple-bg: rgba(168, 85, 247, 0.15);
    --badge-purple-text: #D8B4FE;
    --badge-purple-border: rgba(168, 85, 247, 0.3);

    --badge-rose-bg: rgba(244, 63, 94, 0.15);
    --badge-rose-text: #FDA4AF;
    --badge-rose-border: rgba(244, 63, 94, 0.3);

    /* Counter-evidence & Attention Box */
    --counter-box-bg: rgba(245, 158, 11, 0.12);
    --counter-box-border: #F59E0B;
    --counter-box-text: #FEF08A;
    --counter-box-strong: #FDE68A;

    /* Open Loops / Pending */
    --open-loop-bg: #131B26;
    --open-loop-border: #263447;
    --open-loop-accent: #F59E0B;

    /* Sidebar Navigation */
    --sidebar-bg: #131B26;
    --sidebar-border: #263447;
    --sidebar-text: #CBD5E1;
    --sidebar-text-active: #38BDF8;
    --sidebar-bg-active: rgba(56, 189, 248, 0.12);
    --sidebar-user-bg: #1A2433;
    --sidebar-user-border: #263447;

    /* Elevation & Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}


body {
    overflow-x: hidden;
    max-width: 100vw;
}

body.dark-theme {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.55;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2.page-header-title, .clinical-serif-title {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Subtle background illumination (non-intrusive) */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(160px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.18;
    max-width: 100vw;
    overflow: hidden;
}
.glow-1 { top: -150px; left: -100px; width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%); }
.glow-2 { bottom: -100px; right: 0; width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-sky) 0%, transparent 70%); }

/* Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    max-width: 100vw;
}


/* Sidebar */
.sidebar {
    width: 270px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    flex-shrink: 0;
    overflow-y: auto;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.brand-badge {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
    user-select: none;
}

body.light-theme .brand-badge {
    background: linear-gradient(135deg, #0284c7, #1d4ed8);
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}


.brand-text h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.sub-brand {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-sky);
    letter-spacing: 0.8px;
    font-family: var(--font-mono);
}

.active-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
}

.user-role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-emerald);
}

.user-info-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-role-label {
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

/* Nav Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin: 18px 0 6px 12px;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-align: left;
    text-decoration: none;
    box-sizing: border-box;
}

.nav-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--selection-subtle);
    color: var(--action-primary);
    border-color: var(--border-subtle);
    font-weight: 600;
}

.nav-item svg, .nav-item .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
}

/* Accessible Focus Ring */
:focus-visible {
    outline: 2px solid var(--border-focus) !important;
    outline-offset: 2px !important;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 32px 36px;
    overflow-y: auto;
    height: 100vh;
    background: var(--bg-base);
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}

.header-title-block h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    min-height: 40px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    border: 1px solid transparent;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--action-primary);
    color: var(--text-on-primary);
    border: 1px solid var(--action-primary);
}
.btn-primary:hover {
    background: var(--action-primary-hover);
    border-color: var(--action-primary-hover);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-subtle-hover);
}

.btn-sm {
    padding: 6px 12px;
    min-height: 32px;
    font-size: 12.5px;
}

.btn-lg {
    padding: 12px 22px;
    min-height: 46px;
    font-size: 15px;
    width: 100%;
}

.btn-outline-amber {
    background: var(--status-warning-bg);
    color: var(--status-warning);
    border: 1px solid var(--status-warning);
}
.btn-outline-amber:hover {
    opacity: 0.9;
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid transparent;
}
.badge-success { background: var(--status-success-bg); color: var(--status-success); border-color: var(--status-success); }
.badge-info { background: var(--status-info-bg); color: var(--status-info); border-color: var(--status-info); }
.badge-purple { background: var(--status-info-bg); color: var(--status-info); border-color: var(--status-info); }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning); border-color: var(--status-warning); }
.badge-danger { background: var(--status-error-bg); color: var(--status-error); border-color: var(--status-error); }

/* AI Presence Badge (NHS / Carbon Style) */
.ai-presence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}
.ai-presence-badge svg {
    width: 14px;
    height: 14px;
    color: var(--action-primary);
}

/* Cards & Containers */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.portal-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

/* ==============================================================================
   CLINICAL BRIEFING & 5-SECOND RULE COMPONENTS
   ============================================================================== */
.patient-briefing-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.patient-header-main h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.patient-header-meta {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    gap: 12px;
}

.briefing-summary-banner {
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--accent-indigo);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.briefing-summary-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-indigo);
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.briefing-summary-text {
    font-size: 13.5px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* 2-Column Clinical Grid */
.clinical-indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.indicator-box {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
}

.indicator-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.indicator-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.indicator-list li strong {
    color: #fff;
}

/* Explained Pattern Box */
.pattern-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.pattern-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.pattern-box-title {
    font-size: 13px;
    font-weight: 700;
    color: #34d399;
}

.pattern-box-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.pattern-evidence-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Suggestion Checklist */
.suggestion-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-text {
    font-size: 13px;
    color: var(--text-primary);
}

.suggestion-actions {
    display: flex;
    gap: 6px;
}

/* ==============================================================================
   TIMELINE FILTER & NARRATIVE
   ============================================================================== */
.timeline-range-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}

.timeline-range-btn {
    padding: 6px 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timeline-range-btn:hover {
    background: var(--bg-surface-hover);
    color: #fff;
}

.timeline-range-btn.active {
    background: var(--accent-indigo);
    color: #fff;
    border-color: var(--accent-indigo);
}

.narrative-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-event-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.timeline-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.timeline-event-date {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-control);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: border 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--border-focus);
}

.marketplace-clean-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.market-pro-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-height: 290px;
}

.market-pro-card:hover {
    border-color: var(--accent-indigo);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.pro-card-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.pro-avatar-wrapper {
    position: relative;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}

.pro-avatar-img {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-subtle);
    background: var(--bg-surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pro-online-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-emerald);
    border: 2px solid var(--bg-surface);
}

.pro-header-info {
    flex: 1;
    min-width: 0;
}

.pro-name-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 4px;
}

.pro-crp-tag {
    font-size: 11.5px;
    color: var(--accent-sky);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pro-approach-chip {
    display: inline-block;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
    margin: 2px 4px 4px 0;
}

.market-pro-footer {
    margin-top: 14px;
}



/* Panes */
.portal-pane {
    display: none;
    animation: fadeIn 0.2s ease;
}
.portal-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   UNIVERSAL MODALS & DIALOGS
   ============================================================================== */
.modal-backdrop, .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 14, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-backdrop.active, .modal-backdrop.open, .modal-overlay.active, .modal-overlay.open {
    display: flex !important;
}


.modal-card, .modal-container, .modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}
.modal-close:hover {
    color: #fff;
    background: var(--bg-surface-hover);
}

.modal-body {
    padding: 22px 24px;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==============================================================================
   TOAST NOTIFICATIONS (DESIGN SYSTEM)
   ============================================================================== */
.toast-container {

    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.toast {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-enter {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
}

.toast-leave {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
}

.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast-error { border-left: 4px solid var(--accent-rose); }
.toast-warning { border-left: 4px solid var(--accent-amber); }
.toast-info { border-left: 4px solid var(--accent-sky); }

.toast-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    transition: color 0.15s ease;
}

.toast-close:hover {
    color: #fff;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-indigo);
    width: 100%;
    animation: toastProgress linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==============================================================================
   EMPTY STATES & SKELETON LOADERS
   ============================================================================== */
.empty-state-box {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    margin: 12px 0;
}

.empty-state-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.empty-state-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.empty-state-text {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 16px auto;
}

.skeleton-box {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-subtle);
    border-radius: var(--radius-sm);
}

.skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.5s infinite;
    content: '';
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ==============================================================================
   CLINICAL BRIEFING 2.0 & THERAPIST WORKSPACE (MISSION-004)
   ============================================================================== */

/* Baseline & Change Tags */
.tag-worsened {
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
}

.tag-improved {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
}

.tag-stable {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 500;
}

.tag-changed {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
}

.tag-neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
}

/* Briefing 2.0 Sections */
.briefing-card-v2 {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

.briefing-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.briefing-dimension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

.dimension-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dimension-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.dimension-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
}

.dimension-summary {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.dimension-baseline-note {
    font-size: 11.5px;
    color: var(--text-muted);
    font-style: italic;
}

/* Open Loops */
.open-loop-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-amber);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.open-loop-content strong {
    color: #fff;
    font-size: 13.5px;
    display: block;
    margin-bottom: 4px;
}

.open-loop-content p {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 0;
}

.open-loop-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Patterns & Counter-Evidence */
.pattern-card-v2 {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.pattern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pattern-statement {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    line-height: 1.45;
    margin-bottom: 10px;
}

.pattern-counter-box {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--accent-amber);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #fde68a;
    margin-bottom: 10px;
}

.pattern-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Why Am I Seeing This Drawer */
.evidence-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.evidence-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.evidence-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    z-index: 1001;
    display: none;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.evidence-drawer.open {
    display: flex;
}




.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.drawer-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.drawer-section {
    margin-bottom: 22px;
}

.drawer-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.evidence-item-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.evidence-item-card strong {
    color: #fff;
    display: block;
    margin-bottom: 2px;
}

/* Session Workspace Mode */
.session-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.prep-mode-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autosave-badge {
    font-size: 11.5px;
    color: var(--accent-emerald);
    display: flex;
    align-items: center;
    gap: 6px;
}

.autosave-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
}

/* ==============================================================================
   PX-UX-BASELINE-v0.1: EPISTEMIC INDICATORS & ADVANCED CLINICAL COMPONENTS
   ============================================================================== */

/* Epistemic Badges */
.epistemic-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-family: var(--font-mono);
    line-height: 1.2;
}

.epistemic-symbol {
    font-size: 11px;
    font-weight: 700;
}

.epistemic-patient {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.epistemic-observation {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.epistemic-interpretation {
    background: rgba(167, 139, 250, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.35);
}

.epistemic-uncertain {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.epistemic-conflict {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Medication Comparison & Discrepancy Component */
.med-comparison-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.med-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.med-comparison-header h4 {
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.med-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.med-prescribed-box {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
}

.med-taken-box {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
}

.med-box-label {
    font-size: 11px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.med-prescribed-box .med-box-label { color: #a78bfa; }
.med-taken-box .med-box-label { color: #38bdf8; }

.med-dose-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.med-meta-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.med-discrepancy-banner {
    background: rgba(244, 63, 94, 0.10);
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.med-discrepancy-banner .warning-icon {
    font-size: 16px;
    color: #f43f5e;
    flex-shrink: 0;
    margin-top: 1px;
}

.med-discrepancy-banner .warning-text {
    font-size: 13px;
    color: #fecdd3;
    line-height: 1.45;
}

.causal-restraint-notice {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
}

/* Privacy & Zone Isolation */
.zone-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.zone-b-badge {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.zone-c-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.privacy-isolation-callout {
    background: rgba(15, 23, 42, 0.85);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Clinical Briefing Information Hierarchy ("What Changed") */
.briefing-patient-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.briefing-patient-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.briefing-last-contact {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.what-changed-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.what-changed-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    margin-bottom: 14px;
}

.delta-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.delta-item-label {
    font-size: 13.5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delta-item-time {
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Accessibility Focus States */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* ==============================================================================
   CALENDAR & WORKSPACE SCHEDULE STYLES
   ============================================================================== */

.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.calendar-metrics-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.calendar-metric-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 170px;
}

.calendar-metric-pill .metric-val {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
}

.calendar-metric-pill .metric-lbl {
    font-size: 12px;
    color: var(--text-secondary);
}

.calendar-week-grid {
    display: grid;
    grid-template-columns: 70px repeat(5, 1fr);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

@media (max-width: 900px) {
    .calendar-week-grid {
        display: flex;
        flex-direction: column;
    }
}

.calendar-day-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-subtle);
    min-height: 520px;
}

.calendar-day-column:last-child {
    border-right: none;
}

.calendar-day-header {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
}

.calendar-day-header.today {
    background: rgba(99, 102, 241, 0.12);
    border-bottom-color: var(--accent-indigo);
}

.calendar-day-header strong {
    display: block;
    font-size: 13.5px;
    color: #fff;
}

.calendar-day-header span {
    font-size: 11.5px;
    color: var(--text-muted);
}

.calendar-day-body {
    flex: 1;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    background: rgba(0, 0, 0, 0.15);
}

.calendar-event-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-indigo);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-indigo);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    background: var(--bg-surface-hover);
}

.calendar-event-card.alert-card {
    border-left-color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.06);
}

.calendar-event-card.shared-card {
    border-left-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.06);
}

.calendar-time-axis {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.25);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.calendar-time-axis .time-axis-header {
    height: 49px;
    border-bottom: 1px solid var(--border-subtle);
}

.calendar-time-axis .time-axis-slot {
    height: 60px;
    padding-top: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

/* ==============================================================================
   DISCOVERY, STORIES CAROUSEL, VIDEO PITCH & CLINICAL FEED DESIGN SYSTEM
   ============================================================================== */

/* Thematic Exploration Hubs */
.theme-hub-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 4px 0 16px;
    margin-bottom: 28px;
}
.theme-pill {
    white-space: nowrap;
    padding: 8px 18px;
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.theme-pill:hover {
    border-color: var(--accent-indigo);
    color: var(--text-primary);
    background: var(--bg-surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.theme-pill.active {
    background: rgba(99, 102, 241, 0.22);
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
}

/* Professional Stories & Highlights Carousel */
.stories-section {
    margin-bottom: 32px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    backdrop-filter: blur(12px);
}
.stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.stories-header h2, .stories-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.stories-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 8px 4px 12px;
    scrollbar-width: thin;
}
.story-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
    width: 104px;
    text-align: center;
}
.story-item:hover {
    transform: translateY(-4px);
}
.story-avatar-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-sky), var(--accent-emerald));
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: box-shadow 0.2s ease;
}
.story-item:hover .story-avatar-ring {
    box-shadow: 0 0 22px rgba(99, 102, 241, 0.6);
}
.story-avatar-ring.video-ring {
    background: linear-gradient(135deg, var(--accent-rose), var(--accent-amber));
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.35);
}
.story-item:hover .story-avatar-ring.video-ring {
    box-shadow: 0 0 22px rgba(244, 63, 94, 0.6);
}
.story-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-base);
    background: var(--bg-surface);
}
.story-badge-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--bg-base);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.story-pro-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.story-pro-tag {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.25;
}

/* Feed 2-Column Grid Layout & Sticky Sidebar */
.feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
    margin-bottom: 36px;
}
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.discovery-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
}
.sidebar-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}
.sidebar-widget h3 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

/* 4-Layer Post Internal Typography */
.layer-card-hook {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.45;
    margin: 14px 0 12px 0;
    letter-spacing: -0.01em;
}
.layer-card-explanation {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 18px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.layer-card-takeaway {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-primary);
    font-size: 13.5px;
    line-height: 1.55;
}
.takeaway-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Fullscreen Story Viewer Modal */
.story-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.story-modal-container {
    width: 100%;
    max-width: 430px;
    height: 85vh;
    max-height: 720px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
}
.story-progress-bar {
    position: absolute;
    top: 12px;
    left: 16px;
    right: 16px;
    height: 3.5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    z-index: 10;
}
.story-progress-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    transition: width 0.05s linear;
}
.story-header-overlay {
    position: absolute;
    top: 24px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}
.story-content-body {
    flex: 1;
    padding: 80px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.96) 100%);
}
.story-quote-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    width: 100%;
}
.story-quote-text {
    font-size: 15.5px;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 500;
}

/* Video Pitch Player Modal */
.video-pitch-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(14px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.video-pitch-container {
    width: 100%;
    max-width: 680px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}
.video-box-simulated {
    width: 100%;
    height: 300px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Feed Cards & Items */
.feed-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 18px;
}
.feed-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.card-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.author-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}
.author-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
}
.author-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.author-info span {
    font-size: 11px;
    color: var(--text-muted);
}
.format-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--accent-sky);
    border: 1px solid var(--border-subtle);
}
.feed-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    cursor: pointer;
}
.feed-card-title:hover {
    color: var(--accent-indigo);
}
.feed-card-summary {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
}
.feed-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}
.actions-left, .actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-video-pitch-trigger {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 10px;
}
.btn-video-pitch-trigger:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-indigo);
    color: #ffffff;
}

/* ==============================================================================
   MURAL DE PERSPECTIVAS PROFISSIONAIS & 4-LAYER POST DESIGN SYSTEM
   ============================================================================== */

.discovery-tab-bar {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
    margin-bottom: 28px;
    overflow-x: auto;
}

.discovery-tab-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.discovery-tab-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--accent-indigo);
}

.discovery-tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.25);
}

/* Mural Question Card */
.mural-question-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 26px;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease;
    position: relative;
}

.mural-question-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
}

.mural-question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.mural-theme-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mural-author-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mural-question-text {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.5;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Perspectives Multi-Column Grid */
.mural-perspectives-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.perspective-item-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent-indigo);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: all 0.2s ease;
}

.perspective-item-card:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.perspective-item-card.tcc-border {
    border-left-color: var(--accent-sky);
}

.perspective-item-card.jung-border {
    border-left-color: var(--accent-purple);
}

.perspective-item-card.psy-border {
    border-left-color: var(--accent-emerald);
}

.perspective-author-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.perspective-tag {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.perspective-tag-tcc {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.perspective-tag-junguiana {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.perspective-tag-psiquiatria {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.perspective-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 14px;
}

.perspective-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-useful-reaction {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-useful-reaction:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
    color: #ffffff;
}

.btn-useful-reaction.reacted {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
}

.btn-perspective-cta {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-perspective-cta:hover {
    background: var(--accent-indigo);
    color: #ffffff;
    border-color: var(--accent-indigo);
}

/* 4-Layer Post Specialized Cards */
.layer-card-hook {
    font-size: 17.5px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.45;
}

.layer-card-explanation {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 14px;
    border-left: 3px solid var(--accent-indigo);
}

.layer-card-takeaway {
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13.5px;
    color: #e0e7ff;
    line-height: 1.55;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.layer-card-takeaway .takeaway-icon {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Crisis Alert Banner */
.mural-crisis-banner {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.4);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.mural-crisis-banner h4 {
    font-size: 15px;
    font-weight: 700;
    color: #fecdd3;
    margin-bottom: 4px;
}

.mural-crisis-banner p {
    font-size: 13px;
    color: #ffe4e6;
    line-height: 1.5;
    margin-bottom: 10px;
}

.mural-crisis-contacts {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.crisis-contact-pill {
    background: rgba(244, 63, 94, 0.25);
    border: 1px solid rgba(244, 63, 94, 0.5);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
}

/* ==============================================================================
   MOBILE & SMARTPHONE OPTIMIZATION (BREAKPOINT: <= 768px)
   Apple iOS & Android Smartphone Viewport Hardening
   ============================================================================== */
@media (max-width: 768px) {
    /* Compact horizontal top nav on mobile */
    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
        padding: 12px 14px 8px !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        background: var(--bg-surface) !important;
    }
    
    .sidebar .brand-container {
        margin-bottom: 10px !important;
    }
    
    .sidebar .active-user-badge,
    .sidebar .nav-section-title {
        display: none !important;
    }
    
    .sidebar .nav-menu {
        flex-direction: row !important;
        overflow-x: auto !important;
        padding-bottom: 4px !important;
        gap: 6px !important;
        scrollbar-width: thin !important;
    }
    
    .sidebar .nav-item {
        white-space: nowrap !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: var(--radius-xl) !important;
        background: var(--bg-subtle) !important;
        flex-shrink: 0 !important;
    }
    
    .sidebar .nav-item.active {
        background: rgba(99, 102, 241, 0.2) !important;
        border-color: var(--accent-indigo) !important;
    }
    
    .app-layout {
        flex-direction: column !important;
        padding-bottom: 74px !important; /* Space for fixed bottom navigation */
        overflow-x: hidden !important;
    }
    
    .main-content {
        padding: 16px 14px 80px !important;
        height: auto !important;
        min-height: 100vh;
        overflow-y: visible !important;
    }
    
    .top-header {
        padding: 14px 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .header-actions {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }
    
    .header-actions .btn {
        flex: 1 !important;
        font-size: 11.5px !important;
        padding: 8px 10px !important;
        text-align: center !important;
    }
    
    .portal-grid {
        grid-template-columns: 1fr !important;
    }
    
    #pat-care-team-grid {
        grid-template-columns: 1fr !important;
    }
    
    .discovery-container {
        padding: 16px 12px 80px !important;
    }
    
    .discovery-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    
    .discovery-hero h1 {
        font-size: 24px !important;
    }
    
    .discovery-hero p {
        font-size: 14px !important;
    }
    
    .feed-layout {
        grid-template-columns: 1fr !important;
    }
    
    .mural-perspectives-grid {
        grid-template-columns: 1fr !important;
    }
    
    .feed-card-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    
    .feed-card-actions .actions-left,
    .feed-card-actions .actions-right {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
    }
    
    .feed-card-actions .actions-right a,
    .feed-card-actions .actions-right button {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Native Smartphone Bottom Navigation Bar */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border-subtle);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        padding: 4px 6px env(safe-area-inset-bottom, 6px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .mobile-nav-btn {
        flex: 1;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 10px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s ease;
        text-decoration: none;
        padding: 6px 0;
        font-family: var(--font-main);
    }
    
    .mobile-nav-btn .nav-icon {
        font-size: 20px;
    }
    
    .mobile-nav-btn.active, .mobile-nav-btn:hover {
        color: var(--accent-indigo);
    }
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* ==============================================================================
   DISCOVERY MURAL 2.0: TEASER CARDS, DRAWERS & COMPARISON DESIGN SYSTEM
   ============================================================================== */

/* Scrollbar removal for clean horizontal hub carousels */
.theme-hub-bar::-webkit-scrollbar,
.discovery-tab-bar::-webkit-scrollbar,
.stories-carousel::-webkit-scrollbar,
.mural-subtabs-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.theme-hub-bar,
.discovery-tab-bar,
.stories-carousel,
.mural-subtabs-bar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    scroll-behavior: smooth;
}

/* Mural Subtabs Bar */
.mural-subtabs-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}
.mural-subtab-btn {
    padding: 8px 18px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mural-subtab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}
.mural-subtab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}
.mural-subtab-badge {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: var(--radius-xl);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-weight: 700;
}
.mural-subtab-btn.active .mural-subtab-badge {
    background: var(--accent-indigo);
    color: #ffffff;
}

/* Search Input in Mural */
.mural-search-box {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}
.mural-search-input {
    width: 100%;
    padding: 14px 20px 14px 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.mural-search-input:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
    background: var(--bg-surface-hover);
}
.mural-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Question Teaser Card (Compact & Intriguing) */
.mural-teaser-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.mural-teaser-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
.teaser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.teaser-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.teaser-theme-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.teaser-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.45;
    margin: 0 0 10px 0;
}
.teaser-snippet {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

/* Approach Badges Row */
.teaser-approaches-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}
.teaser-approaches-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.approach-pill {
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.approach-pill-tcc {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
.approach-pill-analitica {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.approach-pill-psiquiatria {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.approach-pill-psicodinamica {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.teaser-cta-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.teaser-cta-btn:hover {
    background: var(--accent-indigo);
    color: #ffffff;
}

/* Question Waiting Perspectives Card */
.card-waiting-perspectives {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px dashed rgba(139, 92, 246, 0.4);
}
.badge-waiting {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-also-wonder {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-also-wonder:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-indigo);
    color: #ffffff;
}
.btn-also-wonder.followed {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-emerald);
    color: #34d399;
}

/* ==============================================================================
   QUESTION DETAIL DRAWER & PERSPECTIVE COMPARISON
   ============================================================================== */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.drawer-backdrop.active {
    display: block;
    opacity: 1;
}

.question-detail-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 780px;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
    z-index: 3001;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.question-detail-drawer.open {
    right: 0;
}

.drawer-top-bar {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}
.drawer-close-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.drawer-close-btn:hover {
    background: var(--bg-surface-hover);
    color: #ffffff;
    border-color: var(--border-focus);
}

.drawer-inner-content {
    padding: 24px 28px 60px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.drawer-question-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.drawer-question-text {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.5;
    margin: 12px 0 8px 0;
}

/* Perspective Comparison Module */
.perspective-comparison-module {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-xl);
    padding: 22px;
}
.comparison-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.comparison-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}
.comparison-intro {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
}
.comparison-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.comparison-lens-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 12.5px;
    line-height: 1.5;
}
.comparison-lens-title {
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Drawer Clinician Answer Cards */
.drawer-answers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.drawer-answers-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.drawer-answer-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent-indigo);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.drawer-answer-card.tcc-border { border-left-color: var(--accent-sky); }
.drawer-answer-card.jung-border { border-left-color: var(--accent-purple); }
.drawer-answer-card.psy-border { border-left-color: var(--accent-emerald); }

.drawer-answer-text {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 14px 0 16px 0;
}
.drawer-answer-text.collapsed {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}
.drawer-answer-text.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-surface) 100%);
}
.btn-read-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-sky);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    display: inline-block;
}

.drawer-answer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}
.btn-feedback-pill {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-feedback-pill:hover, .btn-feedback-pill.reacted {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
}

.btn-know-pro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-know-pro:hover {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.4);
}

/* Request Another Perspective Banner */
.request-perspective-banner {
    background: var(--bg-subtle);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==============================================================================
   ONE-CLICK PROFESSIONAL PROFILE DRAWER
   ============================================================================== */
.pro-profile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 680px;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
    z-index: 3100;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.pro-profile-drawer.open {
    right: 0;
}

.pro-profile-header-card {
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-bottom: 1px solid var(--border-subtle);
    padding: 28px 24px 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.pro-profile-avatar-large {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-indigo);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}
.pro-profile-meta h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
}
.pro-profile-registry {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.pro-profile-badges-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Video Pitch Component in Profile */
.profile-video-pitch-box {
    background: #000000;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    margin: 20px 24px;
    position: relative;
}
.profile-video-screen {
    width: 100%;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1e1b4b 0%, #030712 100%);
    color: #ffffff;
    cursor: pointer;
    position: relative;
}
.profile-video-screen:hover .play-btn-pulse {
    transform: scale(1.1);
}
.play-btn-pulse {
    font-size: 42px;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}
.profile-video-transcript-box {
    padding: 16px 18px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-subtle);
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

/* Profile Structured Sections */
.profile-sections-container {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.profile-section-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}
.profile-section-card h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-section-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Contribution Metrics Row */
.pro-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 24px 20px;
}
.pro-metric-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}
.pro-metric-box strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-mono);
}
.pro-metric-box span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Profile Bottom Fixed Actions */
.pro-profile-bottom-actions {
    position: sticky;
    bottom: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

@media (max-width: 768px) {
    .question-detail-drawer,
    .pro-profile-drawer {
        max-width: 100vw;
    }
    .drawer-inner-content {
        padding: 16px 16px 80px;
    }
    .pro-metrics-grid {
        grid-template-columns: 1fr;
        margin: 0 16px 16px;
    }
    .profile-sections-container {
        padding: 0 16px 16px;
    }
    .profile-video-pitch-box {
        margin: 16px;
    }
}

/* ==============================================================================
   DISCOVERY-AFFINITY-001: PROGRESSIVE TRUST & CLINICIAN AFFINITY ENGINE
   ============================================================================== */

/* Thematic Ribbon: Clinicians who reflect on this theme */
.theme-pros-ribbon {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.45) 0%, rgba(15, 23, 42, 0.75) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    backdrop-filter: blur(10px);
}
.theme-pros-avatars {
    display: flex;
    align-items: center;
    gap: 12px;
}
.theme-pro-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
}
.theme-pro-chip:hover {
    border-color: var(--accent-indigo);
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
}
.theme-pro-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.theme-pro-chip span {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Discovery Segmented Pill Bar */
.discovery-tab-bar-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 24px;
}
.discovery-tab-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 9999px !important;
    padding: 6px !important;
    margin: 0 auto 24px auto !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    max-width: 100% !important;
}
.discovery-tab-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.discovery-tab-btn {
    white-space: nowrap !important;
    padding: 9px 18px !important;
    border-radius: 9999px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-secondary, #94a3b8) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    user-select: none !important;
}
.discovery-tab-btn:hover {
    color: var(--text-primary, #ffffff) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-1px) !important;
}
.discovery-tab-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(13, 148, 136, 0.35)) !important;
    border-color: rgba(99, 102, 241, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    font-weight: 700 !important;
}

/* VIEW 4: Catalog & Affinity Filter Styles */
.pro-affinity-filters {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.affinity-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.affinity-filter-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 110px;
}
.affinity-pill {
    padding: 5px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.affinity-pill:hover {
    color: #ffffff;
    border-color: var(--accent-indigo);
}
.affinity-pill.active {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
}

/* Professional Cards Grid */
.pro-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}
.pro-catalog-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.pro-catalog-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.pro-catalog-card.selected-for-compare {
    border-color: var(--accent-indigo);
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.2) 0%, var(--bg-surface) 100%);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}
.pro-card-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.pro-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-subtle);
    flex-shrink: 0;
}
.pro-card-meta {
    flex: 1;
    min-width: 0;
}
.pro-card-name {
    font-size: 16.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
}
.pro-card-reg {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.pro-card-approach-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.pro-card-style-box {
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.pro-style-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}
.pro-style-row:last-child {
    margin-bottom: 0;
}
.pro-style-key {
    color: var(--text-muted);
}
.pro-style-val {
    color: var(--text-secondary);
    font-weight: 500;
}

.pro-slot-preview-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--accent-emerald);
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
}

.pro-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

/* Sticky Floating Comparison Selection Bar */
.comparison-selection-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--accent-indigo);
    border-radius: var(--radius-xl);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.35);
    backdrop-filter: blur(16px);
    z-index: 2500;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90vw;
}
.comparison-selection-bar.active {
    transform: translateX(-50%) translateY(0);
}
.comparison-bar-thumbs {
    display: flex;
    align-items: center;
    gap: -8px;
}
.comparison-bar-thumbs img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #0f172a;
    object-fit: cover;
    margin-left: -6px;
}
.comparison-bar-thumbs img:first-child {
    margin-left: 0;
}

/* Comparison Matrix Modal */
.comparator-modal-container {
    width: 96vw;
    max-width: 1180px;
    max-height: 90vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}
.comparator-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.4) 0%, transparent 100%);
}
.comparator-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.comparison-table th,
.comparison-table td {
    padding: 16px 18px;
    border: 1px solid var(--border-subtle);
    text-align: left;
    vertical-align: top;
}
.comparison-table th {
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-weight: 700;
}
.comparison-table .row-label-cell {
    width: 22%;
    background: rgba(15, 23, 42, 0.4);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.comparison-table .pro-col-cell {
    width: 39%;
}

/* Reflection Module: Essa forma de trabalhar combina comigo? */
.reflection-guide-box {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.reflection-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.reflection-guide-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

/* VIEW 5: Minhas Conexões Dashboard */
.connections-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}
.connection-pro-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    position: relative;
}
.connection-status-pill {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.3);
    align-self: flex-start;
}

/* History Timeline Items */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 2px solid var(--border-subtle);
    padding-left: 18px;
    margin-left: 8px;
    margin-bottom: 32px;
}
.history-item {
    position: relative;
    font-size: 13px;
    color: var(--text-secondary);
}
.history-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-indigo);
    box-shadow: 0 0 8px var(--accent-indigo);
}

/* Progressive Mini-Card Interactive Section Tabs */
.progressive-card-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 18px;
}
.prog-tab-btn {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.prog-tab-btn:hover {
    color: #ffffff;
    border-color: var(--accent-indigo);
}
.prog-tab-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
}

/* Structured Practice FAQ Accordion */
.practice-faq-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 10px;
}
.practice-faq-q {
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.practice-faq-q:hover {
    background: rgba(255, 255, 255, 0.03);
}
.practice-faq-a {
    padding: 12px 16px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.3);
}

/* Progressive Interest Intent Chips */
.intent-chip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
}
.intent-chip {
    padding: 12px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.intent-chip:hover {
    border-color: var(--accent-indigo);
    color: #ffffff;
}
.intent-chip.selected {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

@media (max-width: 900px) {
    .pro-catalog-grid {
        grid-template-columns: 1fr;
    }
    .intent-chip-grid {
        grid-template-columns: 1fr;
    }
    .comparison-table .row-label-cell {
        width: 30%;
    }
    .comparison-table .pro-col-cell {
        width: 70%;
    }
}

/* ==============================================================================
   GROWTH FUNNEL & CLINICIAN ACQUISITION ENGINE (GROWTH-FUNNEL-001)
   ============================================================================== */

.growth-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.growth-hero-cockpit {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.8) 50%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.growth-hero-cockpit::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 6px; height: 100%;
    background: linear-gradient(180deg, #10b981 0%, #6366f1 50%, #8b5cf6 100%);
}

.growth-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.growth-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    transition: all 0.2s ease;
}

.growth-kpi-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.growth-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.growth-kpi-val {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-mono, monospace);
    letter-spacing: -0.02em;
}

.growth-kpi-trend {
    font-size: 11.5px;
    color: var(--accent-emerald, #10b981);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Funnel Stage Visualization */
.growth-funnel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.funnel-steps-flow {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 20px;
    position: relative;
}

.funnel-step-column {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.funnel-step-column:hover {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.08);
}

.funnel-step-column.conversion-goal {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.08);
}

.funnel-step-badge {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-sky);
    margin-bottom: 6px;
    display: block;
}

.funnel-step-count {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-mono, monospace);
    margin-bottom: 4px;
}

.funnel-step-label {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-bottom: 12px;
}

.funnel-step-metrics-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 8px 6px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.funnel-step-conv {
    color: var(--accent-emerald, #10b981);
    font-weight: 700;
}

.funnel-step-dropoff {
    color: var(--text-muted);
    font-size: 10px;
}

.funnel-step-benchmark {
    color: var(--accent-amber, #f59e0b);
    font-size: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 3px;
    margin-top: 2px;
}

/* 2-Column Section Layout */
.growth-split-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

/* Multi-Touch Channel Attribution */
.attribution-table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 22px;
}

.growth-custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 13px;
}

.growth-custom-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-subtle);
}

.growth-custom-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.growth-custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Patient Journey Audit Trails */
.journey-trail-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 22px;
}

.journey-item-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.journey-item-box:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.journey-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.journey-steps-trail {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.journey-step-pill {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #e0e7ff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.journey-arrow {
    color: var(--text-muted);
    font-size: 10px;
}

/* Market Opportunity Radar */
.opportunity-radar-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 22px;
}

.opp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.opp-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    border-left: 4px solid var(--accent-indigo);
}

.opp-card.urgent {
    border-left-color: var(--accent-rose, #f43f5e);
}

/* Ethical Lead CRM Pipeline */
.crm-pipeline-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 22px;
}

.crm-columns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.crm-column {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 260px;
}

.crm-column-header {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.crm-lead-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.crm-lead-card:hover {
    border-color: var(--accent-indigo);
    transform: translateY(-2px);
}

.crm-lead-intent-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--accent-sky);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* Commercial ROI & Monetization Tier Box */
.commercial-roi-box {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 1080px) {
    .funnel-steps-flow {
        grid-template-columns: repeat(3, 1fr);
    }
    .growth-split-grid {
        grid-template-columns: 1fr;
    }
    .crm-columns-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .funnel-steps-flow {
        grid-template-columns: 1fr;
    }
    .crm-columns-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================================================
   NEXUS COMMONS — BIBLIOTECA VIVA DE CONHECIMENTO (NEXUS-COMMONS-001)
============================================================================== */

.commons-header-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.commons-format-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 24px;
}

.commons-format-pill {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.commons-format-pill:hover,
.commons-format-pill.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.45);
    color: #c4b5fd;
}

.commons-feed-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.commons-post-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
}

.commons-post-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.commons-post-card.canonical {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, var(--bg-surface) 100%);
}

.commons-author-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.commons-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.commons-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.tripartite-badges-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

.tripartite-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-role-guardian {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-role-curator {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-role-contrib {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-role-part {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-knowledge-score {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-pro-verified {
    background: rgba(236, 72, 153, 0.12);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.commons-content-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.commons-content-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
    white-space: pre-line;
}

.commons-content-body.quote-style {
    font-family: var(--font-serif, Georgia, serif);
    font-style: italic;
    font-size: 17px;
    color: #e2e8f0;
    border-left: 3px solid #8b5cf6;
    padding-left: 16px;
}

.commons-source-citation {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid #6366f1;
    padding: 8px 12px;
    font-size: 13px;
    color: #a5b4fc;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 16px;
}

/* AI Contextual Enrichment Box */
.ai-contextual-box {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.5) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.ai-contextual-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6366f1, #a855f7);
}

.ai-contextual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ai-contextual-label {
    font-size: 12px;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-contextual-school {
    font-size: 12px;
    font-weight: 600;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.ai-contextual-text {
    font-size: 13px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.ai-conceptual-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.conceptual-chip {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* Epistemic Reactions Bar */
.epistemic-reactions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.epistemic-chips-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.epistemic-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.epistemic-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.epistemic-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #c4b5fd;
}

.epistemic-btn .rx-count {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11px;
    color: #a5b4fc;
}

.bridge-diary-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.25));
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-full);
    color: #6ee7b7;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-normal);
}

.bridge-diary-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
    color: #a7f3d0;
    transform: translateY(-1px);
}

/* 4-Segment Feed Mode Navigation */
.commons-feed-mode-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}

.commons-feed-mode-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.commons-feed-mode-btn:hover {
    color: #f1f5f9;
}

.commons-feed-mode-btn.active {
    color: #c4b5fd;
    border-bottom-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Introspective Relevance Box */
.commons-relevance-box {
    background: rgba(139, 92, 246, 0.06);
    border: 1px dashed rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 14px;
    margin-bottom: 16px;
}

.commons-relevance-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.commons-relevance-text {
    font-size: 13.5px;
    color: #e2e8f0;
    line-height: 1.55;
    margin: 0;
    font-style: normal;
}

/* Share Button and Share Modal */
.commons-share-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.commons-share-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.share-url-box {
    display: flex;
    gap: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 16px;
}

.share-url-input {
    background: transparent;
    border: none;
    color: #93c5fd;
    font-family: var(--font-mono);
    font-size: 12.5px;
    flex: 1;
    outline: none;
}

/* Portal Panes Structure */
.portal-pane {
    display: none;
}
.portal-pane.active {
    display: block;
}

/* ==============================================================================
   ZERO-FRICTION HUMAN EXPERIENCE ENHANCEMENTS (PX-UX-001)
   WCAG 2.1 AA Accessible Focus, 44px Touch Targets, Toast Undo & Calming Motion
   ============================================================================== */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible, 
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-indigo, #6366f1) !important;
    outline-offset: 2px !important;
}

@media (pointer: coarse) {
    .btn, 
    .mobile-nav-btn, 
    .nav-item, 
    .icon-btn,
    .quick-chip {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Toast Undo Floating Banner */
.toast-undo-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-undo-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    border-radius: var(--radius-lg, 14px);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-size: 13.5px;
    pointer-events: auto;
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-undo-btn {
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.6);
    color: #a5b4fc;
    font-weight: 700;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.toast-undo-btn:hover {
    background: rgba(99, 102, 241, 0.45);
    color: #fff;
}

/* ==============================================================================
   FIRST ACCESS GUIDED ONBOARDING & CONTEXTUAL LEARNING (PX-UX-ONB-001)
   ============================================================================== */

/* Spotlight Overlay */
.onboarding-spotlight-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 22, 0.72);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    transition: opacity 0.3s ease;
}

/* Highlighted Target Element */
.onboarding-highlighted-element {
    position: relative !important;
    z-index: 9999 !important;
    outline: 2.5px solid var(--accent-indigo, #6366f1) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.5) !important;
    border-radius: var(--radius-md, 10px) !important;
    transition: all 0.25s ease !important;
}

/* Floating Guided Tooltip Card */
.onboarding-floating-card {
    position: fixed;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-lg, 14px);
    padding: 16px 18px;
    display: none;
    animation: onbCardFadeIn 0.25s ease-out;
}

@keyframes onbCardFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.onb-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #64748b);
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.onb-close-btn:hover {
    color: #fff;
}

/* Welcome & Milestone Modal Backdrops */
.onboarding-welcome-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.onboarding-welcome-card {
    background: var(--bg-surface, #0f172a);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-xl, 18px);
    padding: 24px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    animation: onbCardFadeIn 0.3s ease-out;
}

.onb-wel-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.18);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 14px;
}

/* Progressive Contextual Hint Card */
.onboarding-contextual-hint-card {
    position: fixed;
    z-index: 9990;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(99, 102, 241, 0.45);
    border-radius: var(--radius-lg, 12px);
    padding: 12px 16px;
    max-width: 320px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    display: none;
    animation: onbCardFadeIn 0.25s ease-out;
}

/* Help Center Drawer */
.help-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: none;
    justify-content: flex-end;
}

.help-drawer-content {
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-surface, #0f172a);
    border-left: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
    animation: drawerSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.help-drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-drawer-body {
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.help-topic-item {
    background: var(--bg-subtle, #1e293b);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: var(--radius-md, 10px);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.help-topic-item:hover {
    background: var(--bg-surface-hover, #172033);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(2px);
}

.help-topic-item strong {
    font-size: 13px;
    color: #fff;
    display: block;
}

.help-topic-item small {
    font-size: 11.5px;
    color: var(--text-secondary, #94a3b8);
    display: block;
    line-height: 1.35;
    margin-top: 2px;
}

/* ==============================================================================
   THEMATIC FILTER HUB ENHANCEMENTS
   ============================================================================== */
.theme-hub-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    width: 100%;
}
.theme-hub-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #94a3b8);
}
.theme-hub-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 4px 0 !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.theme-hub-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.theme-pill {
    white-space: nowrap !important;
    padding: 7px 15px !important;
    border-radius: 9999px !important;
    background: rgba(30, 41, 59, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary, #cbd5e1) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    user-select: none !important;
}
.theme-pill:hover {
    border-color: rgba(99, 102, 241, 0.5) !important;
    color: #ffffff !important;
    background: rgba(99, 102, 241, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}
.theme-pill.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(139, 92, 246, 0.28)) !important;
    border-color: rgba(99, 102, 241, 0.7) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ==============================================================================
   INTERACTIVE TUTORIAL GUIDED TOUR SYSTEM
   ============================================================================== */
.tutorial-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInTutorial 0.25s ease-out forwards;
}
@keyframes fadeInTutorial {
    from { opacity: 0; }
    to { opacity: 1; }
}
.tutorial-card {
    background: linear-gradient(165deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 40px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 680px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: scaleUpTutorial 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes scaleUpTutorial {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tutorial-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tutorial-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #94a3b8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}
.tutorial-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}
.tutorial-body {
    padding: 24px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}
.tutorial-step-container {
    flex: 1;
    display: none;
    flex-direction: column;
}
.tutorial-step-container.active {
    display: flex;
    animation: fadeInStep 0.25s ease-out;
}
@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.tutorial-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}
.tutorial-subtitle {
    font-size: 14.5px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
    margin-bottom: 20px;
}
.tutorial-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: auto;
}
.tutorial-feature-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s;
}
.tutorial-feature-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}
.tutorial-feature-icon {
    font-size: 26px;
    margin-bottom: 4px;
}
.tutorial-feature-card strong {
    font-size: 13.5px;
    color: #ffffff;
    font-weight: 600;
}
.tutorial-feature-card p {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
    line-height: 1.45;
}
.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 12px;
}
.tutorial-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tutorial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s;
}
.tutorial-dot.active {
    width: 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #0d9488);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}
.tutorial-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==============================================================================
   PWA 1-CLICK MOBILE INSTALLATION BANNER & GUIDANCE
   ============================================================================== */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 540px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 16px 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.light-theme .pwa-install-banner {
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 28px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.pwa-install-banner.hidden {
    display: none !important;
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--action-primary), #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.35;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-pwa-install-action {
    background: var(--action-primary);
    color: var(--text-on-primary);
    border: none;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-pwa-install-action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-pwa-dismiss {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
}

.btn-pwa-dismiss:hover {
    color: var(--text-primary);
    border-color: var(--border-subtle-hover);
    background: var(--bg-surface-hover);
}

@media (max-width: 600px) {
    .pwa-install-banner {
        bottom: 84px;
        left: 12px;
        right: 12px;
        width: calc(100% - 24px);
        max-width: none;
        transform: none;
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        animation: pwaSlideUpMobile 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .pwa-banner-actions {
        width: 100%;
        display: flex;
    }
    .btn-pwa-install-action {
        flex: 1;
        justify-content: center;
        padding: 11px 16px;
    }
}

@keyframes pwaSlideUpMobile {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* iOS Safari Modal / Tooltip */
.pwa-ios-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    animation: pwaFadeIn 0.25s ease;
}

@keyframes pwaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pwa-ios-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: pwaSlideUpIOS 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaSlideUpIOS {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
    text-align: left;
}

.pwa-ios-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    border-radius: var(--radius-md);
}

.pwa-ios-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--action-primary);
    color: var(--text-on-primary);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


/* ==============================================================================
   PATIENT RESPONSIVE DASHBOARD & BALANCED 2-COLUMN LAYOUT
   ============================================================================== */
.patient-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    max-width: 1120px;
    margin: 0 auto;
    align-items: start;
}

@media (max-width: 980px) {
    .patient-dashboard-grid {
        grid-template-columns: 1fr;
        max-width: 720px;
    }
}

.patient-main-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.patient-side-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Capture Action Grid */
.capture-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 24px 22px;
    box-shadow: var(--shadow-card);
}

.capture-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.capture-card-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.capture-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.capture-action-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.capture-action-btn:hover {
    border-color: var(--border-focus);
    background: var(--bg-surface-hover);
    transform: translateY(-2px);
}

.capture-action-btn.active {
    border-color: var(--action-primary);
    background: var(--selection-subtle);
}

.capture-action-btn .btn-icon {
    font-size: 24px;
    line-height: 1;
}

.capture-action-btn .btn-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Dual Care Directory Cards */
.dual-care-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-card);
}

.dual-care-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Fix Market Pro Cards in Light Theme */
body.light-theme .market-pro-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
}

/* Fix PWA install banner dock */
@media (min-width: 768px) {
    .pwa-install-banner {
        left: auto;
        right: 24px;
        bottom: 24px;
        transform: none;
        width: 380px;
        max-width: 380px;
    }
}


/* ==============================================================================
   COHERENT THEME RULES FOR BADGES, PROVENANCE, AND MULTI-SOURCE WIDGETS
   ============================================================================== */
.multi-source-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-top: 12px;
}

body.dark-theme .multi-source-box {
    background: rgba(15, 23, 42, 0.6);
}

body.light-theme .multi-source-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
}

/* Provenance & Epistemic Badges */
.badge-source {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

body.dark-theme .badge-patient { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
body.dark-theme .badge-psychology { background: rgba(52, 211, 153, 0.2); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.4); }
body.dark-theme .badge-psychiatry { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.4); }
body.dark-theme .badge-system { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }

body.light-theme .badge-patient { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
body.light-theme .badge-psychology { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
body.light-theme .badge-psychiatry { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
body.light-theme .badge-system { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Filter Buttons */
.provenance-filter-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

body.light-theme .provenance-filter-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-control);
}

body.light-theme .provenance-filter-btn.active {
    background: var(--action-primary);
    color: var(--text-on-primary);
    border-color: var(--action-primary);
}

/* Epistemic Badges */
body.light-theme .epistemic-badge {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

/* Telehealth & Media Status Badges */
body.light-theme .badge-info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

body.light-theme .badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

body.light-theme .badge-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

body.light-theme .badge-sky {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

body.light-theme .badge-purple {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}



/* ==========================================================================
   COMPREHENSIBLE COMPONENT OVERRIDES & CLINICAL CARDS
   ========================================================================== */

/* Briefing Dimension Cards */
.dimension-item {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px 16px !important;
    box-shadow: var(--shadow-sm) !important;
}

.dimension-title {
    color: var(--text-primary) !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
}

.dimension-summary {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
}

.dimension-baseline-note {
    color: var(--text-muted) !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    font-style: normal !important;
}

/* Open Loops (Pendências) */
.open-loop-item {
    background: var(--open-loop-bg) !important;
    border: 1px solid var(--open-loop-border) !important;
    border-left: 4px solid var(--open-loop-accent) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px 16px !important;
    margin-bottom: 12px !important;
    box-shadow: var(--shadow-sm) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.open-loop-content strong {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.open-loop-content p {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    margin: 0 !important;
}

.open-loop-meta {
    color: var(--text-muted) !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    margin-top: 6px !important;
}

/* Pattern Cards & Counter-Evidence */
.pattern-card-v2 {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    padding: 16px 18px !important;
    margin-bottom: 14px !important;
    box-shadow: var(--shadow-sm) !important;
}

.pattern-statement {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
}

.pattern-counter-box {
    background: var(--counter-box-bg) !important;
    border-left: 4px solid var(--counter-box-border) !important;
    border-radius: 4px !important;
    padding: 10px 14px !important;
    color: var(--counter-box-text) !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    margin: 10px 0 !important;
}

.pattern-counter-box strong {
    color: var(--counter-box-strong) !important;
    font-weight: 700 !important;
}

/* Secondary Button (ex: Marcar Resolvido, Entender por quê) */
.btn-secondary, .btn-outline {
    background: var(--btn-secondary-bg) !important;
    color: var(--btn-secondary-text) !important;
    border: 1px solid var(--btn-secondary-border) !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.15s ease !important;
}

.btn-secondary:hover, .btn-outline:hover {
    background: var(--btn-secondary-hover-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-control) !important;
}

/* Badges */
.badge-info, .badge-blue {
    background: var(--badge-blue-bg) !important;
    color: var(--badge-blue-text) !important;
    border: 1px solid var(--badge-blue-border) !important;
    font-weight: 700 !important;
}

.badge-success, .badge-green {
    background: var(--badge-green-bg) !important;
    color: var(--badge-green-text) !important;
    border: 1px solid var(--badge-green-border) !important;
    font-weight: 700 !important;
}

.badge-warning, .badge-amber {
    background: var(--badge-amber-bg) !important;
    color: var(--badge-amber-text) !important;
    border: 1px solid var(--badge-amber-border) !important;
    font-weight: 700 !important;
}

.badge-purple, .badge-psychiatry {
    background: var(--badge-purple-bg) !important;
    color: var(--badge-purple-text) !important;
    border: 1px solid var(--badge-purple-border) !important;
    font-weight: 700 !important;
}

.badge-danger, .badge-rose {
    background: var(--badge-rose-bg) !important;
    color: var(--badge-rose-text) !important;
    border: 1px solid var(--badge-rose-border) !important;
    font-weight: 700 !important;
}

/* Sidebar & User Info Box */
.app-sidebar, .sidebar {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border) !important;
}

.user-info-box, .pro-profile-summary, .doctor-card-sidebar {
    background: var(--sidebar-user-bg) !important;
    border: 1px solid var(--sidebar-user-border) !important;
    border-radius: var(--radius-md) !important;
}

.user-info-text strong, .doctor-name, .pro-name-title {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

.user-info-text span, .doctor-crp, .pro-specialty {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

.sidebar-nav-item {
    color: var(--sidebar-text) !important;
    font-weight: 500 !important;
}

.sidebar-nav-item:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

.sidebar-nav-item.active {
    background: var(--sidebar-bg-active) !important;
    color: var(--sidebar-text-active) !important;
    font-weight: 700 !important;
}

/* Drawer & Modals */
.drawer-header h3, .modal-title {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

.evidence-item-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

.evidence-item-card strong {
    color: var(--text-primary) !important;
}

/* General Typography & Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p, span, label {
    color: inherit;
}



/* ==========================================================================
   BRIEFING V2 & CLINICAL PATTERNS - ULTRA COMPREHENSIBLE PALETTE
   ========================================================================== */

.briefing-card-v2 {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 20px 24px !important;
    margin-bottom: 20px !important;
    box-shadow: var(--shadow-sm) !important;
}

.briefing-section-title {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.briefing-section-title span {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

.briefing-dimension-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 14px !important;
    margin-bottom: 8px !important;
}

.dimension-item {
    background: var(--bg-subtle) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md, 8px) !important;
    padding: 14px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: none !important;
}

.dimension-item-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
}

.dimension-title {
    color: var(--text-primary) !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
}

.dimension-summary {
    color: var(--text-secondary) !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    margin-bottom: 8px !important;
}

.dimension-baseline-note {
    color: var(--text-muted) !important;
    font-size: 11.5px !important;
    font-style: normal !important;
    font-weight: 500 !important;
}

/* Open Loops (Pendências) */
.open-loop-item {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-left: 4px solid var(--open-loop-accent, #D97706) !important;
    border-radius: var(--radius-md, 8px) !important;
    padding: 14px 18px !important;
    margin-bottom: 12px !important;
    box-shadow: var(--shadow-sm) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;
}

.open-loop-content {
    flex: 1 !important;
}

.open-loop-content strong {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.open-loop-content p {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

.open-loop-meta {
    color: var(--text-muted) !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    margin-top: 6px !important;
}

/* Pattern Cards & Counter-Evidence */
.pattern-card-v2 {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md, 8px) !important;
    padding: 16px 20px !important;
    margin-bottom: 14px !important;
    box-shadow: var(--shadow-sm) !important;
}

.pattern-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}

.pattern-statement {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
}

.pattern-counter-box {
    background: var(--counter-box-bg) !important;
    border: 1px solid var(--badge-amber-border, #FDE68A) !important;
    border-left: 4px solid var(--counter-box-border, #D97706) !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    color: var(--counter-box-text) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
}

.pattern-counter-box strong {
    color: var(--counter-box-strong) !important;
    font-weight: 700 !important;
}

.pattern-footer-actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--border-subtle) !important;
}

.pattern-footer-actions span {
    color: var(--text-muted) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}
