/* ══════════════════════════════════════════════════════════════
   Health Screening Chatbot Styles
   ══════════════════════════════════════════════════════════════ */

/* ── Flow Switcher Tabs ── */
.flow-switcher {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    background: #f7fafc;
}

.flow-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.flow-tab:hover {
    background: rgba(102, 126, 234, 0.06);
    color: #4a5568;
}

.flow-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.flow-tab.active i {
    color: #fff;
}

.flow-tab i {
    font-size: 1.1rem;
}

.flow-tab .tab-badge {
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* ── Chatbot Container ── */
.screening-chatbot-container {
    display: none;
}

.screening-chatbot-container.active {
    display: block;
}

.chatbot-wrapper {
    background: #f0f2f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* ── Chat Header ── */
.chatbot-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.chatbot-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.chatbot-header-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    border: none;
    padding: 0;
    color: #fff;
}

.chatbot-header-info p {
    font-size: 0.78rem;
    opacity: 0.85;
    margin: 0;
    color: rgba(255,255,255,0.85);
}

.chatbot-header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.chatbot-restart-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-restart-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ── Progress Bar ── */
.chatbot-progress {
    background: #e2e8f0;
    height: 4px;
    position: relative;
}

.chatbot-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #48bb78);
    transition: width 0.5s ease;
    border-radius: 0 2px 2px 0;
}

.chatbot-progress-text {
    position: absolute;
    right: 12px;
    top: 8px;
    font-size: 0.7rem;
    color: #a0aec0;
    font-weight: 600;
}

/* ── Chat Messages Area ── */
.chatbot-messages {
    height: 480px;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

/* ── Chat Bubbles ── */
.chat-bubble {
    max-width: 82%;
    margin-bottom: 14px;
    animation: bubbleIn 0.3s ease;
}

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

.chat-bubble.bot {
    margin-right: auto;
}

.chat-bubble.user {
    margin-left: auto;
}

.chat-bubble-content {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.55;
    position: relative;
}

.chat-bubble.bot .chat-bubble-content {
    background: #fff;
    color: #2d3748;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.chat-bubble.user .chat-bubble-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.chat-bubble-label {
    font-size: 0.7rem;
    color: #a0aec0;
    margin-bottom: 4px;
    font-weight: 600;
    padding-left: 4px;
}

.chat-bubble.user .chat-bubble-label {
    text-align: right;
    padding-right: 4px;
    padding-left: 0;
}

/* ── BMI Result Card ── */
.bmi-result-card {
    background: linear-gradient(135deg, #ebf8ff, #e6fffa);
    border: 1px solid #bee3f8;
    border-radius: 14px;
    padding: 16px 20px;
    margin: 8px 0;
}

.bmi-result-card .bmi-value {
    font-size: 2rem;
    font-weight: 800;
    color: #2b6cb0;
    line-height: 1;
}

.bmi-result-card .bmi-category {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    display: inline-block;
}

.bmi-category.underweight { background: #fefcbf; color: #744210; }
.bmi-category.normal { background: #c6f6d5; color: #22543d; }
.bmi-category.overweight { background: #fed7aa; color: #7b341e; }
.bmi-category.obese { background: #fed7d7; color: #742a2a; }

.bmi-result-card .bmi-detail {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 6px;
}

/* ── BMI Ideal Range ── */
.bmi-ideal-range {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #bee3f8;
}

.bmi-ideal-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
}

.bmi-ideal-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b6cb0;
    flex-wrap: wrap;
}

.bmi-ideal-sep {
    color: #a0aec0;
    font-size: 0.75rem;
}

.bmi-ideal-note {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.bmi-ideal-note.good {
    background: #c6f6d5;
    color: #22543d;
}

.bmi-ideal-note.warn {
    background: #fefcbf;
    color: #744210;
}

/* ── Input Widget Area ── */
.chatbot-input-area {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.chatbot-input-widget {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Number input row */
.chatbot-number-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-number-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    background: #f7fafc;
}

.chatbot-number-input input:focus {
    border-color: #667eea;
    background: #fff;
}

.chatbot-number-input .unit {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 600;
    white-space: nowrap;
}

.chatbot-send-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Y/N Buttons */
.chatbot-yn-buttons {
    display: flex;
    gap: 10px;
}

.chatbot-yn-btn {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chatbot-yn-btn:hover {
    border-color: #667eea;
    background: #ebf4ff;
}

.chatbot-yn-btn.yes:hover {
    border-color: #48bb78;
    background: #f0fff4;
}

.chatbot-yn-btn.no:hover {
    border-color: #f56565;
    background: #fff5f5;
}

.chatbot-yn-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* Select dropdown */
.chatbot-select {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-select select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    background: #f7fafc;
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    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='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.chatbot-select select:focus {
    border-color: #667eea;
    background-color: #fff;
}

/* Multi-select checklist */
.chatbot-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.chatbot-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.chatbot-checklist-item:hover {
    border-color: #667eea;
    background: #ebf4ff;
}

.chatbot-checklist-item.checked {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.06));
}

.chatbot-checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    flex-shrink: 0;
}

.chatbot-checklist-confirm {
    margin-top: 8px;
}

.chatbot-confirm-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Triple option (Y/N/唔知) */
.chatbot-triple-buttons {
    display: flex;
    gap: 8px;
}

.chatbot-triple-btn {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.chatbot-triple-btn:hover {
    border-color: #667eea;
    background: #ebf4ff;
}

/* Location cascade in chatbot */
.chatbot-location-cascade {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatbot-location-cascade select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    background: #f7fafc;
    cursor: pointer;
    transition: border-color 0.2s;
}

.chatbot-location-cascade select:focus {
    border-color: #667eea;
}

/* ── Typing Indicator ── */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #a0aec0;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Screening Results ── */
.screening-results-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.screening-risk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.screening-risk-item {
    text-align: center;
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.screening-risk-item .risk-label {
    font-size: 0.78rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.screening-risk-item .risk-level {
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 4px;
}

.risk-level.low { color: #38a169; }
.risk-level.medium { color: #d69e2e; }
.risk-level.high { color: #e53e3e; }

.screening-risk-item.risk-low { background: #f0fff4; border-color: #c6f6d5; }
.screening-risk-item.risk-medium { background: #fffff0; border-color: #fefcbf; }
.screening-risk-item.risk-high { background: #fff5f5; border-color: #fed7d7; }

/* ── View Report Button (in chat) ── */
.screening-view-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

.screening-view-report-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ══════════════════════════════════════════════════════════
   Screening Report Modal
   ══════════════════════════════════════════════════════════ */

.sr-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sr-modal-overlay.sr-modal-active {
    opacity: 1;
    visibility: visible;
}

.sr-modal {
    background: #fff;
    border-radius: 18px;
    width: 94%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s ease;
}

.sr-modal-active .sr-modal {
    transform: translateY(0) scale(1);
}

/* ── Modal Header ── */
.sr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 18px 18px 0 0;
    color: #fff;
}

.sr-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sr-modal-header-left i {
    font-size: 1.4rem;
}

.sr-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.sr-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 1rem;
}

.sr-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

/* ── Modal Body ── */
.sr-modal-body {
    overflow-y: auto;
    padding: 20px 24px;
    flex: 1;
    max-height: calc(90vh - 140px);
}

/* ── Section ── */
.sr-section {
    margin-bottom: 22px;
}

.sr-section:last-child {
    margin-bottom: 0;
}

.sr-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.sr-section-title i {
    color: #667eea;
    font-size: 1rem;
}

/* ── Risk Cards Grid ── */
.sr-risk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sr-risk-card {
    padding: 16px 12px;
    border-radius: 14px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.sr-risk-card:hover {
    transform: translateY(-2px);
}

.sr-risk-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.sr-risk-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.sr-risk-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}

.sr-risk-score {
    font-size: 0.72rem;
    color: #a0aec0;
    margin-top: 4px;
}

/* Risk card variants */
.sr-risk-low {
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
    border-color: #c6f6d5;
}
.sr-risk-low .sr-risk-icon { color: #38a169; }
.sr-badge-low { background: #c6f6d5; color: #22543d; }

.sr-risk-medium {
    background: linear-gradient(135deg, #fffff0, #fefce8);
    border-color: #fefcbf;
}
.sr-risk-medium .sr-risk-icon { color: #d69e2e; }
.sr-badge-medium { background: #fefcbf; color: #744210; }

.sr-risk-high {
    background: linear-gradient(135deg, #fff5f5, #fff1f1);
    border-color: #fed7d7;
}
.sr-risk-high .sr-risk-icon { color: #e53e3e; }
.sr-badge-high { background: #fed7d7; color: #742a2a; }

/* ── AI Summary ── */
.sr-summary-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #2d3748;
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
}

/* ── Recommendations ── */
.sr-rec-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sr-rec-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.sr-rec-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.sr-rec-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #2d3748;
}

/* ── User Profile Grid ── */
.sr-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sr-profile-item {
    background: #f7fafc;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.sr-profile-item.sr-pf-wide {
    grid-column: span 2;
}

.sr-pf-label {
    display: block;
    font-size: 0.7rem;
    color: #a0aec0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.sr-pf-value {
    display: block;
    font-size: 0.85rem;
    color: #2d3748;
    font-weight: 600;
}

/* ── Citations ── */
.sr-cite-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sr-cite-item {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: #faf5ff;
    border-radius: 10px;
    border: 1px solid #e9d8fd;
}

.sr-cite-num {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b46c1;
    margin-top: 2px;
}

.sr-cite-body {
    flex: 1;
    min-width: 0;
}

.sr-cite-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #553c9a;
    text-decoration: none;
    display: block;
    word-break: break-word;
}

.sr-cite-title:hover {
    text-decoration: underline;
    color: #6b46c1;
}

.sr-cite-meta {
    font-size: 0.72rem;
    color: #9f7aea;
    margin-top: 2px;
}

.sr-cite-summary {
    font-size: 0.78rem;
    color: #4a5568;
    margin-top: 4px;
    line-height: 1.45;
}

/* ── Disclaimer ── */
.sr-disclaimer {
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.sr-disclaimer p {
    margin: 0;
    font-size: 0.78rem;
    color: #718096;
    line-height: 1.5;
}

.sr-disclaimer i {
    color: #a0aec0;
    margin-right: 4px;
}

/* ── Modal Footer ── */
.sr-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 18px 18px;
    background: #f7fafc;
}

.sr-btn-primary,
.sr-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sr-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.sr-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.sr-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.sr-btn-secondary:hover {
    background: #cbd5e0;
}

/* ── Detailed Analysis Cards ── */
.sr-detail-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sr-detail-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    border-left: 4px solid #a0aec0;
    transition: box-shadow 0.2s ease;
}

.sr-detail-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.sr-detail-low {
    border-left-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 40%);
}

.sr-detail-medium {
    border-left-color: #ed8936;
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 40%);
}

.sr-detail-high {
    border-left-color: #f56565;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 40%);
}

.sr-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sr-detail-header i {
    font-size: 1.1rem;
    color: #667eea;
    width: 22px;
    text-align: center;
}

.sr-detail-low .sr-detail-header i { color: #38a169; }
.sr-detail-medium .sr-detail-header i { color: #dd6b20; }
.sr-detail-high .sr-detail-header i { color: #e53e3e; }

.sr-detail-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2d3748;
    flex: 1;
}

.sr-detail-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.sr-detail-badge.sr-badge-low {
    background: #c6f6d5;
    color: #276749;
}

.sr-detail-badge.sr-badge-medium {
    background: #feebc8;
    color: #9c4221;
}

.sr-detail-badge.sr-badge-high {
    background: #fed7d7;
    color: #9b2c2c;
}

.sr-detail-body {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #4a5568;
}

/* ── Disclaimer in chatbot ── */
.chatbot-disclaimer {
    font-size: 0.72rem;
    color: #a0aec0;
    text-align: center;
    padding: 8px 16px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .flow-switcher {
        flex-direction: column;
        border-radius: 12px;
    }

    .flow-tab {
        padding: 12px 16px;
        font-size: 0.88rem;
    }

    .chatbot-messages {
        height: 400px;
        padding: 14px;
    }

    .chat-bubble {
        max-width: 90%;
    }

    .chatbot-yn-buttons,
    .chatbot-triple-buttons {
        flex-direction: column;
    }

    .screening-risk-grid {
        grid-template-columns: 1fr;
    }

    .chatbot-header {
        padding: 14px 16px;
    }

    /* Modal responsive */
    .sr-modal {
        width: 98%;
        max-height: 95vh;
        border-radius: 14px;
    }

    .sr-modal-header {
        padding: 14px 18px;
        border-radius: 14px 14px 0 0;
    }

    .sr-modal-body {
        padding: 16px 18px;
    }

    .sr-risk-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sr-risk-card {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 12px 14px;
    }

    .sr-risk-icon {
        margin-bottom: 0;
        font-size: 1.3rem;
    }

    .sr-profile-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sr-profile-item.sr-pf-wide {
        grid-column: span 2;
    }

    .sr-modal-footer {
        border-radius: 0 0 14px 14px;
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    .chatbot-messages {
        height: 350px;
        padding: 10px;
    }

    .chat-bubble-content {
        padding: 10px 14px;
        font-size: 0.88rem;
    }

    .chatbot-input-area {
        padding: 12px 14px;
    }
}
