/* 
   RE-MIND THERAPIST WORKSPACE - PREMIUM DESIGN SYSTEM 
   Includes: Header, Tabs, Client List, History, Plan, and AI Tools
*/

:root {
    --blue: #005082;
    --teal: #00a884;
    --muted: #64748b;
    --bg-light: #f8fafc;
}

/* 1. WORKSPACE HEADER (Profile Card Style) */
.client-info-bar {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    color: var(--text-main);
    margin: 0 0 16px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ci-side-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.ci-avatar {
    width: 110px;
    height: 110px;
    border-radius: 30px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 900;
    border: 3px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.btn-ci-mini {
    width: 110px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-ci-mini:hover { background: #e2e8f0; color: var(--blue); transform: translateY(-1px); }

.ci-name { font-size: 22px; font-weight: 900; color: var(--blue); margin-bottom: 12px; }

.ci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
}

.ci-item {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.ci-item.clickable:hover {
    background: #fff;
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    cursor: pointer;
}

.ci-label { font-size: 10px; color: #94a3b8; font-weight: 700; display: block; margin-bottom: 2px; }
.ci-value { font-size: 12px; color: #475569; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ci-value i { color: var(--teal); font-size: 11px; }

.ci-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.ci-medical-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.badge-diagnosis { background: #eff6ff; color: #1d4ed8; }
.badge-meds { background: #fff7ed; color: #c2410c; }

.back-btn {
    position: absolute; top: 12px; left: 12px;
    background: #f1f5f9;
    border: none;
    color: #475569; padding: 6px 12px; border-radius: 10px;
    font-size: 11px; font-weight: 700; cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}
.back-btn:hover { background: #e2e8f0; color: var(--blue); }

/* ─── NAVIGATION TABS (Segmented Control Style) ────────────────────────── */
.ws-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 20px;
    margin-bottom: 24px;
    gap: 6px;
    border: 1px solid #e2e8f0;
}

.ws-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    position: relative;
    gap: 4px;
    user-select: none;
}

.ws-tab i {
    font-size: 18px;
    margin-bottom: 2px;
}

.ws-tab span {
    font-size: 11px;
    font-weight: 800;
    font-family: 'Cairo';
}

.ws-tab:hover {
    color: var(--blue);
    background: rgba(255,255,255,0.4);
}

.ws-tab.active {
    background: #fff;
    color: var(--blue);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.1);
}

/* ─── SESSION TEMPLATES (Modern Chips) ─────────────────────────────────── */
.note-section-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tpl-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tpl-btn {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo';
}

.tpl-btn i {
    font-size: 15px;
    color: #94a3b8;
}

.tpl-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: #f8fafc;
    transform: translateY(-1px);
}

.tpl-btn.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 5px 12px rgba(30, 58, 138, 0.15);
}

.tpl-btn.active i {
    color: #fff;
}

/* ─── GEMINI AI ACTIONS ────────────────────────────────────────────────── */
.gemini-actions-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.gemini-btn {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    font-family: 'Cairo';
}

.gemini-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
    filter: brightness(1.1);
}

.gemini-btn:active {
    transform: scale(0.96);
}

.gemini-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.ws-panel { display: none; }
.ws-panel.active { display: block !important; animation: fadeInWs .4s ease forwards; }

@keyframes fadeInWs {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 3. CLIENT SELECT LIST (Matching Schedule Style) */
.client-select-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    box-shadow: none;
}

.client-select-card:hover {
    transform: translateY(-2px);
    border-color: var(--teal);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.ci-avatar-mini {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; flex-shrink: 0;
    box-shadow: none;
}

/* 4. HISTORY CARDS */
/* 4. HISTORY CARDS (Enhanced Design) */
.history-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1.5px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: relative;
    transition: all 0.3s ease;
}

.history-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border-color: #e2e8f0;
}



.h-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f1f5f9;
}

.h-date {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.h-type-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.h-content {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.8;
    max-height: 150px;
    overflow-y: auto;
    padding-left: 10px;
}

/* Scrollbar for h-content */
.h-content::-webkit-scrollbar { width: 4px; }
.h-content::-webkit-scrollbar-track { background: transparent; }
.h-content::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

.h-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #f8fafc;
}

.h-edit-btn {
    background: #f1f5f9;
    color: var(--blue);
    border: none;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.h-edit-btn:hover {
    background: var(--blue);
    color: #fff;
    transform: scale(1.05);
}

/* ── TREATMENT PLAN SECTIONS (simple, matches session-note style) ── */

.plan-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 15px;
}

/* Header row — same pattern as .note-section-title */
.plan-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
}

/* Title — same font/size as .note-section-title */
.plan-card__title-group { flex: 1; }
.plan-card__label { display: none; }          /* hidden – no sub-labels */
.plan-card__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--blue);
    display: flex;
    align-items: center;
    gap: 10px;
}
.plan-card__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: inherit;
    width: auto;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    background: none;
}
/* Per-section icon colour — subtle, not filled blocks */
.plan-card--diagnosis .plan-card__icon-wrap { color: #e53e3e; }
.plan-card--goals     .plan-card__icon-wrap { color: #00a884; }
.plan-card--meds      .plan-card__icon-wrap { color: #7c3aed; }

/* No border stripes */
.plan-card--diagnosis,
.plan-card--goals,
.plan-card--meds { border-right: none; }

/* Card body */
.plan-card__body { padding: 0; }

/* Empty state */
.plan-empty-state {
    text-align: center;
    padding: 22px;
    color: #a0aec0;
    border: 1.5px dashed #e2e8f0;
    border-radius: 16px;
}
.plan-empty-state i { font-size: 28px; display: block; margin-bottom: 8px; opacity: 0.35; }
.plan-empty-state p  { font-size: 12px; margin: 0; font-weight: 600; }

/* ── Edit Button — same look as .h-edit-btn ── */
.plan-edit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    font-family: 'Cairo';
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.plan-edit-btn i { font-size: 11px; }
.plan-edit-btn:hover {
    background: var(--blue);
    color: #fff;
    transform: scale(1.05);
}
.plan-edit-btn:active { transform: scale(0.97); }
.plan-edit-btn.active {
    background: var(--teal);
    color: #fff;
}

/* ── Add Goal Button ── */
.plan-add-goal-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 1.5px dashed #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Cairo';
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.plan-add-goal-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: #fff;
}

/* ── AI Generate Button (keep gradient, it's a CTA) ── */
.plan-ai-generate-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    font-family: 'Cairo';
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(2,132,199,0.28);
    transition: all 0.3s;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}
.plan-ai-generate-btn .plan-ai-glow {
    position: absolute; width: 200%; height: 100%;
    top: 0; left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: aiGlowSlide 2.5s infinite;
}
@keyframes aiGlowSlide { 0% { left: -100%; } 100% { left: 100%; } }
.plan-ai-generate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(2,132,199,0.38); }
.plan-ai-generate-btn:active { transform: scale(0.98); }

/* ── AI Loading ── */
.plan-gen-loading {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; padding: 20px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 16px; margin-bottom: 14px;
    color: var(--blue); font-size: 13px; font-weight: 700;
}
.plan-gen-spinner {
    width: 44px; height: 44px; background: #fff;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 20px; color: var(--blue);
    box-shadow: 0 2px 10px rgba(0,80,130,0.12);
}
.plan-gen-loading p { margin: 0; }

/* ── AI Result Boxes ── */
.plan-ai-result {
    border-radius: 14px; padding: 14px;
    margin-bottom: 10px; border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.plan-ai-result__header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; font-size: 13px; font-weight: 800;
    color: var(--blue);
}
.plan-ai-result__body { font-size: 13px; line-height: 1.8; color: #475569; }

.plan-ai-apply-btn {
    border: none; border-radius: 8px; padding: 5px 12px;
    font-family: 'Cairo'; font-size: 11px; font-weight: 800;
    cursor: pointer; background: var(--blue); color: #fff;
    transition: all 0.2s; display: flex; align-items: center; gap: 5px;
}
.plan-ai-apply-btn:hover { filter: brightness(1.1); transform: scale(1.04); }
.plan-ai-apply-btn--green,
.plan-ai-apply-btn--amber,
.plan-ai-apply-btn--purple { background: var(--blue); color: #fff; }

/* ─── Goal Cards (inner) ─────────────────────────────────── */
.goal-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.2s;
}
.goal-card:hover { border-color: #00a884; background: #fff; box-shadow: 0 4px 16px rgba(0,168,132,0.08); }

.goal-title-input {
    font-weight: 800;
    font-size: 14px;
    color: var(--blue);
    display: block;
    width: 100%;
    border: none;
    background: transparent;
}

.progress-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00a884, #2dd4bf);
    border-radius: 10px;
    transition: width 0.6s ease;
}

.objectives-list { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.obj-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    font-size: 12px;
    color: #475569;
    transition: border-color 0.2s;
}
.obj-item:hover { border-color: #e2e8f0; }

.objective-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; cursor: pointer;
    transition: all 0.2s; flex-shrink: 0;
}
.objective-check.done { background: #00a884; border-color: #00a884; color: #fff; }

/* ─── Intervention Pills ─────────────────────────────────── */
.iv-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: #f1f5f9; color: #475569;
    padding: 7px 14px; border-radius: 50px;
    font-size: 12px; font-weight: 700; margin: 3px;
    border: 1.5px solid #e2e8f0; transition: all 0.2s;
}
.iv-pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Legacy plan-section kept for safety */
.plan-section {
    background: #fff; border-radius: 24px;
    padding: 24px; margin-bottom: 18px;
    border: 1.5px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.plan-section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px; padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0; direction: rtl;
}
.plan-section-title {
    font-size: 15px; font-weight: 900; color: var(--blue);
    display: flex; align-items: center; gap: 10px;
}
.btn-edit-sm {
    font-size: 10px !important; padding: 4px 10px !important;
    height: 26px !important; font-weight: 700 !important;
    border-radius: 8px !important; display: flex;
    align-items: center; gap: 5px;
}


/* ─── AI ASSISTANT TOOLS ───────────────────────────────────────────────── */
.ai-tools-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns works better for horizontal layout */
    gap: 8px;
    margin-bottom: 20px;
}

.ai-tool-btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: row; /* Horizontal */
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Cairo';
    height: 44px; /* Lower height */
}

.ai-tool-btn i {
    font-size: 16px;
}

.ai-tool-btn span {
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.ai-tool-btn:hover {
    transform: translateY(-2px);
    filter: brightness(0.95); /* Darken on hover */
}

.ai-tool-btn:active {
    transform: scale(0.97);
}

/* Color variations - Light backgrounds that darken on hover */
.ai-tool-blue { background: #e0f2fe; color: #0369a1; }
.ai-tool-purple { background: #f3e8ff; color: #7e22ce; }
.ai-tool-emerald { background: #dcfce7; color: #15803d; }
.ai-tool-amber { background: #fef3c7; color: #b45309; }
.ai-tool-rose { background: #ffe4e6; color: #be123c; }
.ai-tool-teal { background: #ccfbf1; color: #0f766e; }

.ai-tool-blue:hover { background: #bae6fd; }
.ai-tool-purple:hover { background: #e9d5ff; }
.ai-tool-emerald:hover { background: #bbf7d0; }
.ai-tool-amber:hover { background: #fde68a; }
.ai-tool-rose:hover { background: #fecdd3; }
.ai-tool-teal:hover { background: #99f6e4; }

/* ─── SYMPTOM CHIPS ────────────────────────────────────────────────────── */
.symptoms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.symptom-chip {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    font-family: 'Cairo';
}

.symptom-chip:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: #f0fdfa;
}

.symptom-chip.active {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
    box-shadow: 0 4px 10px rgba(45, 212, 191, 0.2);
}

.symptom-chip.active::before {
    content: '✓ ';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* 7. INPUTS & CARDS */
.glass-card {
    background: #fff; border: 1px solid #f1f5f9;
    border-radius: 24px; padding: 22px; margin-bottom: 15px;
}

.glass-input {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 14px;
    padding: 12px 16px; font-family: 'Cairo'; outline: none;
    transition: all 0.2s; background: #fff; font-size: 13px;
    box-shadow: none;
}

.glass-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.05); }

.modal.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10001 !important;
}

/* ─── DIAGNOSIS DISPLAY CARD ──────────────────────────────────── */
#diag-display {
    font-size: 13px;
    color: #334155;
    line-height: 1.7;
}

.diag-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 12px;
}

.diag-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    font-family: monospace;
}

.diag-code-dsm { background: #dbeafe; color: #1d4ed8; }
.diag-code-icd { background: #f1f5f9; color: #475569; }

.diag-symptoms-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: 14px;
    padding: 14px;
    margin: 12px 0;
}

.diag-symptoms-box .symptoms-title {
    font-size: 11px;
    font-weight: 900;
    color: #15803d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.diag-symptoms-box .symptoms-body {
    font-size: 12.5px;
    color: #166534;
    line-height: 1.8;
}

/* ─── PLAN SECTION IMPROVED ────────────────────────────────────── */
.plan-section {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 18px;
    border: 1.5px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s;
}

.plan-section:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

/* Diagnosis section accent */
.plan-section:first-child {
    border-top: 4px solid #e53e3e;
}

/* Goals section accent */
.plan-section:nth-child(2) {
    border-top: 4px solid #00a884;
}

/* Medications section accent */
.plan-section:nth-child(3) {
    border-top: 4px solid #7c3aed;
}

/* ─── AI GENERATE BUTTON ENHANCED ──────────────────────────────── */
#btn-gen-plan {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    font-family: 'Cairo';
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 24px rgba(2,132,199,0.3);
    transition: all 0.3s;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

#btn-gen-plan::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

#btn-gen-plan:hover::before { left: 100%; }
#btn-gen-plan:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2,132,199,0.4); }

/* ─── MODAL SELECT ENHANCED ────────────────────────────────────── */
#modal-diag-name {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    appearance: none;
    -webkit-appearance: none;
    padding-left: 38px;
}

#modal-diag-name optgroup {
    font-weight: 800;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
}

#modal-diag-name option {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    padding: 4px;
}

/* ─── MERGED DIAGNOSIS + MEDICATION SECTION ────────────────── */

/* Diagnosis code badges */
.diag-code {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 11px;
    font-family: monospace;
}
.diag-code--icd {
    background: #f1f5f9;
    color: #475569;
}

/* Symptoms box */
.diag-symptoms-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}
.diag-symptoms-title {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.diag-symptoms-body {
    font-size: 12px;
    color: #64748b;
    line-height: 1.8;
}

/* Medication rows inside the merged card */
.med-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px 14px;
}
.med-icon {
    width: 32px;
    height: 32px;
    background: #ede9fe;
    color: #7c3aed;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.med-info { flex: 1; }
.med-name {
    font-weight: 800;
    font-size: 13px;
    color: #1e293b;
}
.med-dose {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* CBCL Report Styles inside Workspace */
.report-header {
  background: linear-gradient(135deg, #005082, #00a884);
  color: white;
  padding: 30px 20px;
  border-radius: 20px;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 80, 130, 0.1);
}
.report-header h2 {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 950;
  color: white;
}
.report-header p {
  margin: 0;
  opacity: 0.95;
  font-weight: 600;
  font-size: 13px;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}
@media (max-width: 600px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}
.report-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
  text-align: right;
}
.report-section h3 {
  color: #005082;
  font-size: 14px;
  font-weight: 900;
  margin-top: 0;
  margin-bottom: 12px;
  border-bottom: 2px solid #00a884;
  padding-bottom: 6px;
}
.report-section p {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.5;
}
.scale-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
  border: 1px solid #e2e8f0;
  border-right: 5px solid #00a884;
  transition: all 0.3s;
  text-align: right;
}
.scale-card:hover {
  border-right-color: #005082;
  transform: translateY(-1px);
}
.scale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.scale-name {
  font-weight: 850;
  color: #005082;
  font-size: 13.5px;
}
.scale-score {
  background: rgba(0, 168, 132, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 800;
  color: #00a884;
  font-size: 12px;
  border: 1px solid rgba(0, 168, 132, 0.15);
}
.t-score-bar {
  height: 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 6px;
}
.t-score-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.t-score-fill.status-normal-bg {
  background: #10b981;
}
.t-score-fill.status-borderline-bg {
  background: #ea580c;
}
.t-score-fill.status-clinical-bg {
  background: #dc2626;
}
.status-normal {
  color: #10b981;
  font-weight: 800;
}
.status-borderline {
  color: #ea580c;
  font-weight: 800;
}
.status-clinical {
  color: #dc2626;
  font-weight: 900;
}
.legend-box {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 15px 0;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.comp-table {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 20px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.comp-table th {
  background: rgba(0, 80, 130, 0.05);
  padding: 10px;
  font-size: 12px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 800;
  color: #005082;
}
.comp-table td {
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  font-weight: 700;
  font-size: 12px;
}
.comp-table tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}
.section-title {
  font-size: 14px;
  font-weight: 800;
  color: #005082;
  margin: 20px 0 10px;
  border-right: 4px solid #00a884;
  padding: 6px 10px;
  background: rgba(0, 80, 130, 0.03);
  border-radius: 0 6px 6px 0;
  text-align: right;
}
.chart-container {
  position: relative;
  height: 280px;
  margin: 20px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 15px;
}
.disclaimer {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-right: 5px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 15px;
  margin-top: 15px;
}
.disclaimer p {
  font-size: 12px;
  color: #92400e;
  font-weight: 700;
  margin: 0;
  line-height: 1.6;
}
.report-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}

/* Lighten and refine the Bold weight of numbers and headings in all cards */
.stat-value,
.stat-value-simple,
.team-stat-value,
.summary-value,
.info-val,
.ci-value,
.collage-card strong,
.card-details strong {
  font-weight: 600 !important; /* Clean semi-bold (instead of thick bold) */
}

/* Enforce bold weight for primary card headings as requested by the user */
.card h3,
.card-title,
.note-section-title,
.plan-card__title,
.plan-section-title {
  font-weight: 800 !important; /* Premium thick bold for main titles */
}

.stat-label,
.summary-label,
.stat-label-simple,
.stat-tag-simple,
.info-label,
.collage-card span,
.card-details span,
.ci-label,
.ci-name,
.goal-title-input {
  font-weight: 500 !important; /* Elegant medium weight (instead of semi-bold/heavy bold) */
}

.stat-subtitle {
  font-weight: 400 !important; /* Soft regular weight (instead of medium) */
}

/* ============================================================
   FLUID TYPOGRAPHY & PREVENT TEXT WRAPPING ON SMALL SCREENS
   ============================================================ */
.ws-tab span,
.ai-tool-btn span,
.tpl-btn,
.btn-fb,
.profile-meta span,
.ci-value,
.ci-label,
.nav-item {
  white-space: nowrap !important;
}

@media (max-width: 1200px) {
  .ci-name { font-size: 20px !important; }
  .ws-tab span { font-size: 10px !important; }
  .ws-tab i { font-size: 16px !important; }
  .tpl-btn { font-size: 12px !important; }
  .ai-tool-btn span { font-size: 10px !important; }
}

@media (max-width: 992px) {
  .ci-name { font-size: 18px !important; }
  .ws-tab span { font-size: 9.5px !important; }
  .ws-tab i { font-size: 15px !important; }
  .tpl-btn { font-size: 11px !important; }
  .ai-tool-btn span { font-size: 9.5px !important; }
  .profile-name-row h2 { font-size: 19px !important; }
  .btn-fb { font-size: 11px !important; }
}

@media (max-width: 768px) {
  .ci-name { font-size: 16px !important; }
  .ws-tabs { gap: 4px !important; padding: 4px !important; }
  .ws-tab { padding: 10px 4px !important; gap: 2px !important; }
  .ws-tab span { font-size: 9px !important; }
  .ws-tab i { font-size: 14px !important; }
  .tpl-btn { font-size: 10.5px !important; padding: 8px 12px !important; }
  .ai-tool-btn { padding: 8px 10px !important; height: 38px !important; }
  .ai-tool-btn span { font-size: 9px !important; }
  .profile-name-row h2 { font-size: 17px !important; }
  .profile-bio { font-size: 12px !important; padding: 10px 12px !important; }
  .btn-fb { font-size: 10px !important; padding: 6px 10px !important; }
  .profile-avatar { width: 120px !important; height: 120px !important; }
  .profile-meta { font-size: 10px !important; gap: 8px !important; }
  .nav-item { font-size: 9px !important; }
}

@media (max-width: 480px) {
  .ci-name { font-size: 14px !important; }
  .ws-tab span { font-size: 8px !important; }
  .ws-tab i { font-size: 12px !important; }
  .tpl-btn { font-size: 10px !important; padding: 6px 10px !important; }
  .ai-tool-btn span { font-size: 8.5px !important; }
  .profile-avatar { width: 100px !important; height: 100px !important; }
  .profile-name-row h2 { font-size: 15px !important; }
  .btn-fb { font-size: 9px !important; }
  .profile-meta { font-size: 9px !important; gap: 6px !important; }
  .nav-item { font-size: 8px !important; }
}

