html { 
    background-color: var(--mc-bg, #f8fafc); 
}


/* Dashboard header / hero */

/* Clean mobile top bar */
.dash-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--mc-surface, #ffffff);
    border-bottom: 1px solid var(--mc-border, #e2e8f0);
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media (min-width: 768px) {
    .dash-top-bar {
        display: none !important;
    }
}

.dash-top-bar .logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-top-bar .logo-icon {
    width: auto;
    height: auto;
    background: none !important;
    box-shadow: none !important;
    color: var(--mc-primary, #0F766E) !important;
    font-size: 1.5rem;
    margin-right: 2px;
}

.dash-top-bar .logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--mc-text-primary, #0f172a) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.dash-top-bar .top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-top-bar .top-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--mc-radius-sm, 6px);
    border: 1px solid var(--mc-border, #e2e8f0);
    background: var(--mc-surface, #ffffff);
    color: var(--mc-text-secondary, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.dash-top-bar .top-action-btn:hover {
    background: var(--mc-surface-muted, #f1f5f9);
    color: var(--mc-text-primary, #0f172a);
}

/* Dashboard Hero Section */
.dashboard-hero {
    background: var(--mc-primary-dark, #0f766e);
    border-radius: var(--mc-radius-lg, 14px);
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--mc-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

.hero-greeting {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-greeting .date-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.hero-greeting h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 6px;
    line-height: 1.25;
}

.hero-greeting .hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    max-width: 420px;
    margin: 0 auto;
}

.dashboard-view-tabs-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding: 0 6px;
}

.dashboard-role-label {
    margin: 12px auto 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--mc-radius-full, 9999px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.2);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dashboard-view-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: min(100%, 380px);
    padding: 4px;
    border-radius: var(--mc-radius-md, 10px);
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow-x: auto;
    scrollbar-width: none;
}

.dashboard-view-tabs::-webkit-scrollbar {
    display: none;
}

.dashboard-view-tab {
    flex: 1 1 0;
    min-width: 100px;
    border: 0;
    border-radius: var(--mc-radius-sm, 6px);
    padding: 8px 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-view-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.dashboard-view-tab.is-active {
    background: #ffffff;
    color: var(--mc-primary-dark, #0f766e);
    box-shadow: var(--mc-shadow-xs, 0 1px 2px rgba(0,0,0,0.04));
}

.dashboard-views-root {
    width: 100%;
}

.dashboard-view[hidden] {
    display: none !important;
}

.dashboard-top-widgets {
    display: grid;
    gap: 18px;
}

#recoverySobrietyHost:not(:empty) + #recoveryDashboardTopWidgets {
    margin-top: 16px;
}

@media (min-width: 768px) {
    #recoverySobrietyHost:not(:empty) + #recoveryDashboardTopWidgets {
        margin-top: 20px;
    }
}

.recovery-dashboard-grid {
    gap: 18px;
}

.recovery-focus-card {
    padding: 20px;
    border-radius: var(--mc-radius-md, 10px);
    background: var(--mc-surface, #ffffff);
    border: 1px solid var(--mc-border, #e2e8f0);
    box-shadow: var(--mc-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

.recovery-focus-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.recovery-focus-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--mc-radius-full, 9999px);
    background: var(--mc-primary-light, #f0fdfa);
    color: var(--mc-primary-dark, #0f766e);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.recovery-focus-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--mc-radius-full, 9999px);
    background: var(--mc-primary-light, #f0fdfa);
    color: var(--mc-primary-dark, #0f766e);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.recovery-focus-actions {
    border-radius: var(--mc-radius-sm, 6px);
    overflow: hidden;
    border: 1px solid var(--mc-border, #e2e8f0);
    background: var(--mc-surface, #ffffff);
}

/* Streak & Stats Row */
.hero-stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    position: relative;
    z-index: 1;
    padding: 0 8px;
    width: 100%;
}

.hero-stat-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--mc-radius-full, 9999px);
    padding: 6px 14px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.15s ease;
    cursor: default;
    white-space: nowrap;
    min-height: 32px;
}

.hero-stat-chip:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-stat-chip .stat-icon {
    display: none;
}

.hero-stat-chip .stat-value {
    font-weight: 700;
    font-size: inherit;
    color: inherit;
}

@media (max-width: 767px) {
    .dashboard-view-tabs-wrap {
        justify-content: stretch;
        padding: 0;
    }

    .dashboard-view-tabs {
        width: 100%;
    }

    .recovery-focus-card {
        padding: 16px;
    }

    .recovery-focus-head {
        flex-direction: column;
    }
}

/* Check-In Card */
.checkin-card-premium {
    background: var(--mc-surface, #ffffff);
    border-radius: var(--mc-radius-md, 10px);
    padding: 24px 20px;
    border: 1px solid var(--mc-border, #e2e8f0);
    text-align: center;
    box-shadow: var(--mc-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
    position: relative;
}

.checkin-smiley-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.checkin-smiley {
    width: 72px;
    height: 72px;
    background: var(--mc-primary, #0F766E);
    color: #ffffff;
    border-radius: 50%;
    box-shadow: var(--mc-shadow-xs, 0 1px 2px rgba(0,0,0,0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.checkin-smiley:hover {
    background: var(--mc-primary-dark, #0f766e);
    transform: scale(1.03);
}

.ig-sun-icon {
    width: 32px;
    height: 32px;
    background: var(--mc-warning-light, #fffbeb);
    color: var(--mc-warning, #d97706);
    border: 1px solid var(--mc-warning-border, #fde68a);
    font-size: 1.1rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 6px;
    border-radius: 50%;
}

.checkin-card-premium h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mc-text-primary, #0f172a);
    margin-bottom: 16px;
}

/* Sunnie Bookings Card */
.sunnie-bookings-card {
    background: var(--mc-surface, #ffffff);
    border: 1px solid var(--mc-border, #e2e8f0);
    border-radius: var(--mc-radius-md, 10px);
    padding: 18px;
    box-shadow: var(--mc-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

.sunnie-bookings-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.sunnie-bookings-title {
    margin: 0;
    color: var(--mc-text-primary, #0f172a);
    font-size: 0.95rem;
    font-weight: 700;
}

.sunnie-bookings-subtitle {
    margin: 4px 0 0;
    color: var(--mc-text-secondary, #475569);
    font-size: 0.8rem;
    line-height: 1.4;
}

.sunnie-bookings-badge {
    display: inline-flex;
    align-items: center;
    background: var(--mc-info-light, #eff6ff);
    color: var(--mc-info-dark, #1d4ed8);
    border: 1px solid var(--mc-info-border, #bfdbfe);
    border-radius: var(--mc-radius-full, 9999px);
    padding: 4px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.sunnie-bookings-section + .sunnie-bookings-section {
    margin-top: 10px;
}

.sunnie-bookings-toggle {
    width: 100%;
    border: 1px solid var(--mc-border, #e2e8f0);
    background: var(--mc-surface-muted, #f8fafc);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mc-text-primary, #0f172a);
    cursor: pointer;
}

.sunnie-bookings-toggle-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sunnie-bookings-count {
    min-width: 20px;
    height: 20px;
    border-radius: var(--mc-radius-full, 9999px);
    background: var(--mc-info-light, #eff6ff);
    color: var(--mc-info-dark, #1d4ed8);
    font-size: 0.68rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-weight: 700;
}

.sunnie-bookings-toggle i {
    transition: transform 0.15s ease;
}

.sunnie-bookings-toggle[aria-expanded="false"] i {
    transform: rotate(-90deg);
}

.sunnie-bookings-panel {
    margin-top: 8px;
}

.sunnie-bookings-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid var(--mc-warning-border, #fde68a);
    background: var(--mc-warning-light, #fffbeb);
    color: var(--mc-warning-dark, #b45309);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 8px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.35;
}

.sunnie-bookings-list {
    display: grid;
    gap: 8px;
}

.sunnie-booking-item {
    border: 1px solid var(--mc-border, #e2e8f0);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 12px;
    background: var(--mc-surface, #ffffff);
}

.sunnie-booking-item.missed-card {
    border-color: var(--mc-danger-border, #fecaca);
    background: var(--mc-danger-light, #fef2f2);
}

.sunnie-booking-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.sunnie-booking-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sunnie-booking-name {
    margin: 0;
    color: var(--mc-text-primary, #0f172a);
    font-size: 0.9rem;
    font-weight: 700;
}

.sunnie-booking-time {
    margin: 3px 0 0;
    color: var(--mc-text-secondary, #475569);
    font-size: 0.78rem;
}

.sunnie-booking-countdown {
    margin-top: 8px;
    color: var(--mc-info-dark, #1d4ed8);
    font-size: 0.78rem;
    font-weight: 600;
}

.sunnie-booking-countdown.ready {
    color: var(--mc-success-dark, #15803d);
}

.sunnie-booking-countdown.missed {
    color: var(--mc-danger-dark, #b91c1c);
}

.sunnie-missed-pill {
    border: 1px solid var(--mc-danger-border, #fecaca);
    color: var(--mc-danger-dark, #b91c1c);
    background: var(--mc-danger-light, #fef2f2);
    border-radius: var(--mc-radius-full, 9999px);
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 700;
}

.sunnie-join-btn {
    border: 1px solid transparent;
    border-radius: var(--mc-radius-sm, 6px);
    background: var(--mc-primary, #0F766E);
    color: #ffffff;
    padding: 7px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.sunnie-join-btn:hover {
    background: var(--mc-primary-dark, #0f766e);
}

.sunnie-join-btn.disabled,
.sunnie-join-btn:disabled {
    background: var(--mc-surface-muted, #f1f5f9);
    color: var(--mc-text-muted, #94a3b8);
    border-color: var(--mc-border, #e2e8f0);
    cursor: not-allowed;
}

.sunnie-secondary-btn {
    border: 1px solid var(--mc-border, #e2e8f0);
    background: var(--mc-surface, #ffffff);
    color: var(--mc-text-secondary, #475569);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.sunnie-secondary-btn:hover {
    background: var(--mc-surface-muted, #f1f5f9);
    color: var(--mc-text-primary, #0f172a);
}

.sunnie-secondary-btn.danger {
    border-color: var(--mc-danger-border, #fecaca);
    color: var(--mc-danger-dark, #b91c1c);
    background: var(--mc-danger-light, #fef2f2);
}

.sunnie-booking-empty {
    font-size: 0.82rem;
    color: var(--mc-text-muted, #64748b);
    border: 1px dashed var(--mc-border, #e2e8f0);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 14px;
    text-align: center;
    background: var(--mc-surface-muted, #f8fafc);
}

/* Therapist Update Card */
.therapist-update-card {
    background: var(--mc-surface, #ffffff);
    border: 1px solid var(--mc-border, #e2e8f0);
    border-radius: var(--mc-radius-md, 10px);
    padding: 16px;
}

.therapist-update-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.therapist-update-status {
    border-radius: var(--mc-radius-full, 9999px);
    border: 1px solid var(--mc-border, #e2e8f0);
    background: var(--mc-surface-muted, #f8fafc);
    color: var(--mc-text-secondary, #475569);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.therapist-update-status.approved {
    border-color: var(--mc-success-border, #bbf7d0);
    background: var(--mc-success-light, #f0fdf4);
    color: var(--mc-success-dark, #15803d);
}

.therapist-update-status.declined {
    border-color: var(--mc-danger-border, #fecaca);
    background: var(--mc-danger-light, #fef2f2);
    color: var(--mc-danger-dark, #b91c1c);
}

.therapist-update-status.suggested_time,
.therapist-update-status.suggested {
    border-color: var(--mc-warning-border, #fde68a);
    background: var(--mc-warning-light, #fffbeb);
    color: var(--mc-warning-dark, #b45309);
}

.therapist-update-status.pending {
    border-color: var(--mc-info-border, #bfdbfe);
    background: var(--mc-info-light, #eff6ff);
    color: var(--mc-info-dark, #1d4ed8);
}

.therapist-update-suggestion {
    margin: 8px 0 0;
    border: 1px solid var(--mc-warning-border, #fde68a);
    background: var(--mc-warning-light, #fffbeb);
    color: var(--mc-warning-dark, #b45309);
    border-radius: var(--mc-radius-sm, 6px);
    padding: 8px 10px;
    font-size: 0.74rem;
    font-weight: 600;
}

.therapist-update-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sunnie-secondary-btn.accept {
    border-color: var(--mc-success-border, #bbf7d0);
    color: var(--mc-success-dark, #15803d);
    background: var(--mc-success-light, #f0fdf4);
}

/* Therapy Journey Dashboard Card */
.tp-dash-card {
    background: var(--mc-surface, #ffffff);
    border: 1px solid var(--mc-border, #e2e8f0);
    border-radius: var(--mc-radius-md, 10px);
    padding: 18px;
    box-shadow: var(--mc-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

.tp-dash-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-dash-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--mc-radius-sm, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mc-primary-dark, #0f766e);
    background: var(--mc-primary-light, #f0fdfa);
    font-size: 1.1rem;
}

.tp-dash-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mc-text-primary, #0f172a);
}

.tp-dash-card-badge {
    display: inline-flex;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: var(--mc-radius-full, 9999px);
    background: var(--mc-primary-light, #f0fdfa);
    color: var(--mc-primary-dark, #0f766e);
    font-size: 0.72rem;
    font-weight: 600;
}

.tp-dash-card-subtitle {
    margin: 10px 0 6px;
    color: var(--mc-text-secondary, #475569);
    font-weight: 600;
    font-size: 0.85rem;
}

.tp-dash-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tp-dash-progress-text {
    font-size: 0.82rem;
    color: var(--mc-text-secondary, #475569);
    font-weight: 600;
}

.tp-dash-progress-track {
    width: 100%;
    height: 8px;
    border-radius: var(--mc-radius-full, 9999px);
    overflow: hidden;
    background: var(--mc-border, #e2e8f0);
}

.tp-dash-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--mc-primary, #0F766E);
    transition: width 0.3s ease;
}

.tp-dash-btn {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border-radius: var(--mc-radius-sm, 6px);
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--mc-primary, #0F766E);
    transition: background 0.15s ease;
}

.tp-dash-btn:hover {
    background: var(--mc-primary-dark, #0f766e);
}
