:root {
  --jp-primary: #375d75;
  --jp-primary-dark: #284658;
  --jp-soft: #eef4f7;
  --jp-border: #dfe6ea;
  --jp-bg: #f5f7f9;
}
body { background: var(--jp-bg); color: #26343d; }
.nav-logo { width: 42px; height: 42px; object-fit: contain; }
.login-logo { max-width: 150px; max-height: 85px; object-fit: contain; }
.navbar-brand { color: #26343d; }
.btn-primary { --bs-btn-bg: var(--jp-primary); --bs-btn-border-color: var(--jp-primary); --bs-btn-hover-bg: var(--jp-primary-dark); --bs-btn-hover-border-color: var(--jp-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--jp-primary); --bs-btn-border-color: var(--jp-primary); --bs-btn-hover-bg: var(--jp-primary); --bs-btn-hover-border-color: var(--jp-primary); }
.card { border-color: var(--jp-border); box-shadow: 0 1px 3px rgba(22, 40, 52, .04); }
.metric-card { transition: transform .15s ease, box-shadow .15s ease; }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 .4rem 1rem rgba(22,40,52,.08); }
.table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7780; background: #fafbfc; white-space: nowrap; }
.badge.status-submitted { background: #f0ad4e; color: #2d2519; }
.badge.status-under_review { background: #5b8fb9; color: white; }
.badge.status-reviewed { background: #4b946f; color: white; }
.badge.status-active { background: #356e9b; color: white; }
.badge.status-closed { background: #6c757d; color: white; }
.badge.status-consent_pending { background: #f0ad4e; color: #2d2519; }
.consent-text { white-space: normal; line-height: 1.7; max-height: 55vh; overflow-y: auto; }
.review-card { top: 88px !important; }
.chat-review { max-height: calc(100vh - 210px); overflow-y: auto; background: #fafcfd; }
.review-msg { display: flex; flex-direction: column; margin-bottom: 1rem; }
.review-msg.client-msg { align-items: flex-end; }
.review-msg.assistant-msg { align-items: flex-start; }
.msg-label { font-size: .7rem; font-weight: 700; letter-spacing: .05em; color: #6d7981; margin: 0 .45rem .25rem; }
.msg-label span { font-weight: 400; text-transform: lowercase; }
.review-bubble { max-width: 84%; padding: .8rem 1rem; border-radius: 1rem; line-height: 1.5; }
.client-msg .review-bubble { background: #dfeef6; border-bottom-right-radius: .25rem; }
.assistant-msg .review-bubble { background: white; border: 1px solid var(--jp-border); border-bottom-left-radius: .25rem; }
.msg-footer { max-width: 84%; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; justify-content: flex-end; color: #7b858c; font-size: .7rem; margin-top: .3rem; }
.msg-footer audio { height: 32px; max-width: 250px; }
.chat-shell { max-width: 1100px; margin: 0 auto; }
.chat-card { min-height: 70vh; overflow: hidden; }
.chat-messages { height: 58vh; overflow-y: auto; padding: 1.25rem; background: #f9fbfc; }
.chat-system-note { font-size: .78rem; text-align: center; color: #6e7a82; background: white; border: 1px solid var(--jp-border); border-radius: 999px; padding: .45rem .8rem; margin: 0 auto 1.2rem; max-width: 760px; }
.chat-row { display: flex; margin-bottom: 1rem; }
.chat-user { justify-content: flex-end; }
.chat-ai { justify-content: flex-start; }
.chat-bubble { max-width: min(82%, 760px); padding: .75rem .95rem; border-radius: 1rem; background: white; border: 1px solid var(--jp-border); }
.chat-user .chat-bubble { background: #dfeef6; border-color: #cce0eb; border-bottom-right-radius: .25rem; }
.chat-ai .chat-bubble { border-bottom-left-radius: .25rem; }
.chat-role { font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #69767f; margin-bottom: .25rem; }
.chat-text { white-space: pre-wrap; line-height: 1.5; }
.chat-meta { font-size: .66rem; color: #7e888e; margin-top: .45rem; }
.chat-bubble audio { display: block; width: min(100%, 320px); height: 34px; margin-top: .55rem; }
.chat-input { padding: 1rem; background: white; }
#chat-input { resize: none; max-height: 140px; }
#mic-btn.recording { background: #b44242; border-color: #b44242; color: white; animation: pulse 1.2s infinite; }
.typing-dots { display: flex; gap: 5px; padding: .35rem .1rem; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: #82919a; animation: bounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(180,66,66,.35); } 50% { box-shadow: 0 0 0 8px rgba(180,66,66,0); } }
@media (max-width: 767px) { .chat-bubble,.review-bubble,.msg-footer { max-width: 94%; } .chat-messages { height: 54vh; padding: .8rem; } .navbar-brand span { font-size: .95rem; } }
