:root {
  --ink: #102528;
  --ink-soft: #365256;
  --teal: #3e7e72;
  --teal-dark: #1b4e51;
  --aqua: #35d0ee;
  --mint: #e8f2e6;
  --mint-deep: #cfe5c0;
  --gold: #dfcd90;
  --cream: #fcfbf8;
  --mist: #f3f5f4;
  --line: #dfe8e5;
  --white: #fff;
  --danger: #a84d43;
  --shadow: 0 24px 70px rgba(24, 66, 67, .12);
  font-family: 'Poppins', Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.site-shell { overflow: hidden; }
.landing-header { width: min(1180px, calc(100% - 48px)); height: 82px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; position: relative; z-index: 5; }
.brand-link { display: inline-flex; }
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand-logo { width: 146px; height: auto; display: block; }
.landing-nav { display: flex; gap: 30px; margin-left: auto; color: var(--ink-soft); font-size: 13px; }
.landing-nav a { transition: color .2s ease; }
.landing-nav a:hover { color: var(--teal-dark); }
.header-actions { display: flex; align-items: center; gap: 21px; }
.text-button, .link-button { border: 0; background: transparent; color: var(--teal-dark); font-size: 13px; font-weight: 700; padding: 8px 0; }
.text-button:hover, .link-button:hover { color: var(--teal); }
.mobile-header-actions { display: none; }
.button { min-height: 46px; border: 0; border-radius: 4px; padding: 0 21px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; color: var(--white); background: var(--teal-dark); font-size: 13px; font-weight: 700; box-shadow: 0 9px 20px rgba(27, 78, 81, .18); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 13px 25px rgba(27, 78, 81, .25); background: #123d40; }
.button:disabled { cursor: wait; opacity: .6; }
.button-primary { background: var(--teal-dark); }
.button-gold { color: var(--ink); background: var(--gold); box-shadow: none; }
.button-gold:hover:not(:disabled) { background: #e9dba9; }
.hero-section { min-height: 650px; width: min(1180px, calc(100% - 48px)); margin: 0 auto; display: grid; grid-template-columns: .93fr 1.07fr; align-items: center; gap: 50px; position: relative; }
.hero-section::before { content: ''; position: absolute; z-index: -1; width: 46vw; height: 46vw; max-width: 610px; max-height: 610px; right: -90px; top: 15px; background: radial-gradient(circle, rgba(53,208,238,.17), rgba(53,208,238,0) 66%); }
.hero-copy { padding: 50px 0 75px; position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 15px; color: var(--teal); text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .19em; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); display: inline-block; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; letter-spacing: -.045em; }
h1 { max-width: 600px; margin-bottom: 23px; font-size: clamp(45px, 5.2vw, 73px); line-height: 1.02; }
h1 em, h2 em { color: var(--teal); font-style: italic; }
.hero-text { max-width: 455px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 25px; }
.play-link { padding: 8px 0; border: 0; background: none; display: inline-flex; align-items: center; gap: 9px; color: var(--teal-dark); font-size: 12px; font-weight: 700; }
.play-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--teal); border-radius: 50%; font-family: Georgia, serif; font-size: 21px; line-height: 1; }
.hero-trust { display: flex; align-items: center; gap: 12px; margin-top: 58px; }
.avatar-stack { display: flex; padding-left: 9px; }
.avatar-stack span { width: 28px; height: 28px; margin-left: -9px; border: 2px solid var(--cream); border-radius: 50%; display: grid; place-items: center; color: var(--white); background: var(--teal); font-size: 8px; font-weight: 700; }
.avatar-stack span:nth-child(2) { background: #c78e73; }.avatar-stack span:nth-child(3) { background: #6d8f97; }
.hero-trust p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }.hero-trust strong { color: var(--ink); font-size: 11px; }
.hero-visual { min-height: 560px; position: relative; display: grid; place-items: center; }
.visual-orbit { position: absolute; border: 1px solid rgba(62,126,114,.25); border-radius: 50%; transform: rotate(-19deg); }.orbit-one { width: 500px; height: 420px; }.orbit-two { width: 590px; height: 485px; border-color: rgba(223,205,144,.36); transform: rotate(25deg); }
.hero-image-card { width: min(82%, 480px); padding: 20px; border-radius: 48% 48% 42% 42%; background: linear-gradient(135deg, rgba(220,239,226,.85), rgba(242,248,239,.45)); box-shadow: 0 26px 65px rgba(58, 100, 89, .15); transform: rotate(4deg); position: relative; z-index: 1; }
.hero-image-card::before { content: ''; position: absolute; inset: 15px; border: 1px solid rgba(62,126,114,.23); border-radius: inherit; }.hero-image-card img { display: block; width: 100%; border-radius: 40% 40% 34% 34%; position: relative; mix-blend-mode: multiply; }
.hero-note { position: absolute; z-index: 2; min-width: 213px; display: flex; align-items: center; gap: 11px; padding: 13px 16px; border: 1px solid rgba(62,126,114,.12); border-radius: 9px; background: rgba(255,255,255,.84); box-shadow: 0 16px 30px rgba(24,66,67,.12); backdrop-filter: blur(8px); }.hero-note strong, .hero-note small { display: block; }.hero-note strong { color: var(--ink); font-size: 11px; }.hero-note small { margin-top: 4px; color: var(--ink-soft); font-size: 9px; }.note-top { top: 94px; right: -6px; }.note-bottom { bottom: 90px; left: 12px; }.note-icon, .note-check { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-dark); background: #e1f3e9; }.note-check { color: var(--white); background: var(--teal); }
.logo-strip { width: min(100%, 1280px); min-height: 85px; margin: 0 auto; padding: 0 35px; display: flex; align-items: center; justify-content: space-around; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #78908d; font-family: Georgia, serif; font-size: 17px; font-style: italic; }
.content-section { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 120px 0; }.section-heading { max-width: 650px; }.section-heading h2, .split-heading h2 { margin-bottom: 19px; font-size: clamp(39px, 4vw, 58px); line-height: 1.06; }.section-heading > p:last-child, .split-heading > p { max-width: 545px; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.feature-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }.feature-card { min-height: 292px; padding: 28px; border: 1px solid var(--line); background: var(--white); position: relative; transition: transform .2s ease, box-shadow .2s ease; }.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }.feature-top { display: flex; align-items: center; justify-content: space-between; color: #9eb3ae; font-size: 11px; font-weight: 700; }.feature-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--teal); background: var(--mint); }.feature-card h3 { margin: 36px 0 11px; font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 500; }.feature-card p { max-width: 265px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }.feature-arrow, .service-arrow { position: absolute; bottom: 27px; right: 28px; color: var(--teal); }
.services-section { padding-top: 76px; }.split-heading { max-width: 100%; display: grid; grid-template-columns: 1fr .8fr; gap: 80px; align-items: end; }.split-heading > p { margin: 0 0 5px; }.service-list { margin-top: 52px; border-top: 1px solid var(--line); }.service-row { min-height: 105px; display: grid; grid-template-columns: 75px 1fr 1.5fr 80px; align-items: center; gap: 26px; border-bottom: 1px solid var(--line); position: relative; }.service-number { color: var(--teal); font-size: 11px; font-weight: 700; }.service-row h3 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 500; }.service-row p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }.service-arrow { position: static; justify-self: end; }
.portal-cta { width: min(1280px, calc(100% - 48px)); margin-bottom: 96px; padding: 60px 75px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: var(--white); background: linear-gradient(110deg, var(--teal-dark), var(--teal)); border-radius: 4px; }.portal-cta h2 { max-width: 560px; margin-bottom: 12px; font-size: 43px; }.portal-cta p:last-child { max-width: 570px; margin: 0; color: rgba(255,255,255,.77); font-size: 14px; line-height: 1.7; }.eyebrow-dark { color: var(--gold); }
.site-footer { min-height: 140px; padding: 35px max(24px, calc((100% - 1180px) / 2)); display: flex; align-items: center; gap: 42px; color: rgba(255,255,255,.7); background: var(--ink); font-size: 11px; }.site-footer p { margin: 0; flex: 1; }.site-footer > span { color: rgba(255,255,255,.45); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(350px, .8fr) minmax(530px, 1.2fr); background: var(--cream); }.auth-visual { padding: 60px clamp(30px, 7vw, 110px); color: var(--white); background: linear-gradient(148deg, #153537 0%, #255e5b 58%, #709775 100%); position: relative; overflow: hidden; }.auth-visual::after { content: ''; position: absolute; right: -150px; bottom: -180px; width: 520px; height: 520px; border: 1px solid rgba(223,205,144,.35); border-radius: 50%; box-shadow: 0 0 0 40px rgba(223,205,144,.07), 0 0 0 80px rgba(223,205,144,.04); }.auth-visual-inner { max-width: 410px; position: relative; z-index: 1; }.auth-visual .brand { margin-bottom: 145px; }.auth-visual h1 { max-width: 390px; margin-bottom: 22px; font-size: clamp(45px, 4.5vw, 66px); }.auth-visual h1 em { color: var(--gold); }.auth-visual-inner > p:not(.eyebrow) { max-width: 350px; color: rgba(255,255,255,.75); font-size: 14px; line-height: 1.75; }.auth-quote { max-width: 320px; margin-top: 78px; padding: 18px 0 0 26px; border-left: 1px solid var(--gold); position: relative; }.auth-quote > span { position: absolute; top: -18px; left: 12px; color: var(--gold); font-family: Georgia, serif; font-size: 50px; }.auth-quote p { margin-bottom: 12px; color: rgba(255,255,255,.88); font-family: Georgia, serif; font-size: 17px; line-height: 1.55; }.auth-quote small { color: rgba(255,255,255,.55); font-size: 10px; }.auth-content { padding: 35px clamp(26px, 6vw, 105px); display: flex; flex-direction: column; justify-content: center; }.back-link { align-self: flex-start; padding: 9px 0; margin-bottom: 52px; border: 0; background: none; color: var(--teal-dark); font-size: 12px; font-weight: 700; }.auth-card { width: min(100%, 600px); margin: 0 auto; }.auth-card-heading { margin-bottom: 30px; }.auth-card-heading h2 { margin-bottom: 9px; font-size: 42px; line-height: 1.05; }.auth-card-heading > p:last-child { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }.portal-form { display: flex; flex-direction: column; gap: 16px; }.form-grid { display: grid; gap: 14px; }.two-columns { grid-template-columns: 1fr 1fr; }.field-label { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }.required { margin-left: 3px; color: var(--teal); }.optional { margin-left: 6px; color: #8aa09c; font-size: 10px; font-weight: 400; }.field-label input, .field-label select, .field-label textarea { width: 100%; border: 1px solid var(--line); border-radius: 3px; outline: none; color: var(--ink); background: var(--white); font-size: 13px; font-weight: 400; transition: border .2s, box-shadow .2s; }.field-label input, .field-label select { height: 44px; padding: 0 13px; }.field-label textarea { min-height: 78px; padding: 12px 13px; resize: vertical; line-height: 1.5; }.field-label input::placeholder, .field-label textarea::placeholder { color: #9cacaa; }.field-label input:focus, .field-label select:focus, .field-label textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(62,126,114,.09); }.select-label { position: relative; }.select-label select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--teal) 50%), linear-gradient(135deg, var(--teal) 50%, transparent 50%); background-position: calc(100% - 16px) 19px, calc(100% - 12px) 19px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }.has-error input, .has-error select { border-color: #d58c83; }.field-error { color: var(--danger); font-size: 10px; font-weight: 500; }.alert { padding: 12px 14px; display: flex; align-items: center; gap: 9px; border-radius: 3px; color: var(--danger); background: #fcebe8; font-size: 11px; line-height: 1.4; }.consent-row, .remember-row { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 400; line-height: 1.5; }.consent-row input, .remember-row input { margin: 1px 0 0; accent-color: var(--teal); }.full-button { width: 100%; margin-top: 3px; }.form-switch { margin: 3px 0 0; text-align: center; color: var(--ink-soft); font-size: 11px; }.form-switch button { padding: 0; border: 0; background: transparent; color: var(--teal-dark); font-weight: 700; text-decoration: underline; }.login-form { max-width: 430px; }.login-form .field-label { margin-bottom: 3px; }.login-help { display: flex; justify-content: space-between; align-items: center; }.login-help .link-button { font-size: 10px; font-weight: 500; text-decoration: underline; }.loading-screen { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--ink-soft); font-size: 13px; background: var(--cream); }.loading-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50% 50% 50% 8px; color: var(--ink); background: var(--gold); font-family: Georgia, serif; font-size: 30px; font-style: italic; }
.dashboard-shell { min-height: 100vh; display: flex; color: var(--ink); background: #f6f8f7; }.dashboard-sidebar { width: 246px; flex: 0 0 246px; padding: 30px 18px 20px; display: flex; flex-direction: column; color: rgba(255,255,255,.82); background: linear-gradient(180deg, #132628 0%, #1d4f53 67%, #3e7e72 100%); }.sidebar-top { padding: 0 10px; display: flex; align-items: center; justify-content: space-between; }.sidebar-label { margin: 49px 12px 14px; color: rgba(255,255,255,.45); text-transform: uppercase; font-size: 9px; font-weight: 700; letter-spacing: .17em; }.sidebar-close { display: none; border: 0; background: none; color: var(--white); font-size: 24px; }.dashboard-nav { display: flex; flex-direction: column; gap: 4px; }.nav-item { width: 100%; min-height: 48px; padding: 0 13px; border: 0; border-radius: 4px; display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.7); background: transparent; text-align: left; font-size: 12px; }.nav-item span { display: flex; align-items: center; gap: 12px; }.nav-item:hover, .nav-item.active { color: var(--ink); background: #a6ed78; }.nav-item b { min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--gold); font-size: 10px; }.nav-item small { color: rgba(255,255,255,.4); font-size: 8px; }.sidebar-bottom { margin-top: auto; }.secure-badge { margin: 0 8px 20px; padding: 12px 10px; display: flex; gap: 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 4px; color: rgba(255,255,255,.6); }.secure-badge strong, .secure-badge small { display: block; }.secure-badge strong { color: rgba(255,255,255,.9); font-size: 10px; }.secure-badge small { margin-top: 4px; font-size: 8px; }.logout-button { width: 100%; padding: 10px 12px; display: flex; gap: 10px; align-items: center; border: 0; color: rgba(255,255,255,.7); background: transparent; font-size: 11px; }.logout-button:hover { color: var(--white); }.dashboard-main { min-width: 0; flex: 1; }.dashboard-header { min-height: 100px; padding: 22px 5.5%; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--white); }.dashboard-kicker { margin: 0 0 6px; color: var(--teal); text-transform: uppercase; font-size: 9px; font-weight: 700; letter-spacing: .15em; }.dashboard-header h1 { margin: 0; font-size: 29px; font-family: 'Playfair Display', Georgia, serif; font-weight: 500; letter-spacing: -.03em; }.profile-chip { display: flex; align-items: center; gap: 10px; }.profile-chip > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-dark); background: var(--mint-deep); font-size: 11px; font-weight: 700; }.profile-chip strong, .profile-chip small { display: block; }.profile-chip strong { font-size: 11px; }.profile-chip small { margin-top: 3px; color: #839795; font-size: 9px; }.profile-chip > .icon { margin-left: 8px; color: #8ba09c; }.mobile-menu-button { display: none; border: 0; background: transparent; color: var(--teal-dark); }.dashboard-content { width: min(1150px, calc(100% - 80px)); margin: 0 auto; padding: 42px 0 65px; }.welcome-banner { min-height: 191px; padding: 32px 39px; display: flex; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; color: var(--white); background: linear-gradient(105deg, #1c5558, #4b8c7d); border-radius: 5px; position: relative; }.welcome-banner::after { content: ''; position: absolute; right: 45px; width: 200px; height: 200px; border: 1px solid rgba(223,205,144,.35); border-radius: 50%; box-shadow: 0 0 0 24px rgba(223,205,144,.06), 0 0 0 48px rgba(223,205,144,.04); }.welcome-banner > div:first-child { position: relative; z-index: 1; }.welcome-banner h2 { max-width: 540px; margin: 0 0 8px; font-size: 32px; }.welcome-banner p:last-child { max-width: 580px; margin: 0; color: rgba(255,255,255,.75); font-size: 12px; line-height: 1.65; }.welcome-symbol { width: 63px; height: 63px; flex: 0 0 63px; margin-right: 50px; display: grid; place-items: center; z-index: 1; color: var(--gold); border: 1px solid rgba(223,205,144,.75); border-radius: 50%; }.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }.dashboard-card { padding: 25px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.card-heading h3 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 500; }.status-pill, .conversation-count { white-space: nowrap; padding: 7px 10px; border-radius: 20px; color: var(--teal-dark); background: var(--mint); font-size: 9px; font-weight: 700; }.status-pill { display: inline-flex; align-items: center; gap: 6px; }.status-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }.journey-line { margin-top: 30px; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }.journey-line::before { content: ''; position: absolute; left: 7px; right: 8px; top: 8px; height: 1px; background: var(--line); }.journey-step { min-width: 0; padding-right: 8px; position: relative; z-index: 1; }.journey-dot { width: 17px; height: 17px; margin-bottom: 12px; display: grid; place-items: center; border: 1px solid #c5d5d1; border-radius: 50%; color: var(--white); background: var(--white); }.journey-step.done .journey-dot { border-color: var(--teal); background: var(--teal); }.journey-step strong, .journey-step small { display: block; }.journey-step strong { font-size: 10px; line-height: 1.3; }.journey-step small { margin-top: 5px; color: #8da19d; font-size: 9px; line-height: 1.45; }.round-icon { width: 35px; height: 35px; display: grid; place-items: center; color: var(--teal); border-radius: 50%; background: var(--mint); }.profile-details { margin-top: 29px; display: flex; flex-direction: column; gap: 16px; }.profile-details > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 11px; }.profile-details small, .profile-details strong { font-size: 10px; }.profile-details small { color: #8da19d; }.profile-details strong { max-width: 160px; text-align: right; }.profile-note { margin-top: 17px; padding: 10px; display: flex; align-items: center; gap: 8px; border-radius: 3px; color: var(--teal-dark); background: #f1f7f1; font-size: 9px; line-height: 1.4; }.conversations-card { margin-top: 18px; }.conversations-card > .card-heading { align-items: center; }.conversation-body { min-height: 138px; margin-top: 25px; padding: 2px 0; }.empty-conversation { min-height: 138px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #8da19d; }.empty-icon { width: 47px; height: 47px; margin-bottom: 11px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--mint); }.empty-conversation h4 { margin: 0 0 5px; color: var(--ink); font-family: 'Playfair Display', Georgia, serif; font-size: 17px; font-weight: 500; }.empty-conversation p { max-width: 320px; margin: 0; font-size: 10px; line-height: 1.55; }.dashboard-notice { margin-top: 15px; padding: 10px 13px; color: var(--teal-dark); background: var(--mint); font-size: 10px; }.message-list { max-height: 310px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }.message-bubble { max-width: 75%; padding: 12px 15px; border-radius: 3px 12px 12px 12px; color: var(--ink); background: #f1f6f5; }.message-bubble.from-patient { margin-left: auto; border-radius: 12px 3px 12px 12px; color: var(--white); background: var(--teal); }.message-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 6px; }.message-meta strong, .message-meta span { font-size: 9px; }.message-meta span { opacity: .65; }.message-bubble p { margin: 0; font-size: 11px; line-height: 1.5; }.message-composer { margin-top: 20px; padding-top: 18px; display: flex; gap: 12px; border-top: 1px solid var(--line); }.message-composer textarea { min-width: 0; flex: 1; padding: 12px; resize: vertical; border: 1px solid var(--line); outline: none; border-radius: 3px; color: var(--ink); background: #fbfdfc; font-size: 11px; }.message-composer textarea:focus { border-color: var(--teal); }.message-composer .button { min-height: 43px; align-self: flex-end; padding: 0 15px; font-size: 11px; }.icon { display: block; flex: 0 0 auto; }
/* Poppins is the single typeface used across the landing page, forms and portal. */
html, body, button, input, select, textarea,
.brand-mark, h1, h2, h3, h4, .play-icon, .logo-strip,
.auth-quote > span, .auth-quote p, .loading-mark,
.dashboard-header h1, .card-heading h3, .empty-conversation h4 {
  font-family: 'Poppins', Arial, sans-serif !important;
}

@media (max-width: 980px) { .landing-nav { display: none; }.hero-section { grid-template-columns: 1fr 1fr; gap: 20px; }.hero-note { transform: scale(.88); }.note-top { right: -22px; }.note-bottom { left: -15px; }.split-heading { gap: 35px; }.portal-cta { padding: 48px; }.auth-visual { padding: 45px; }.auth-visual .brand { margin-bottom: 95px; }.dashboard-sidebar { width: 215px; flex-basis: 215px; }.dashboard-content { width: min(100% - 42px, 900px); }.dashboard-grid { grid-template-columns: 1fr; }.profile-details { flex-direction: row; justify-content: space-between; }.profile-details > div { flex-direction: column; border: 0; padding: 0; }.profile-details strong { text-align: left; }.profile-note { margin-top: 22px; } }
@media (max-width: 720px) { .landing-header { width: calc(100% - 32px); height: 72px; }.header-actions { display: none; }.mobile-header-actions { display: block; }.icon-button { padding: 8px; border: 0; color: var(--teal-dark); background: transparent; }.hero-section { width: calc(100% - 32px); padding-top: 24px; display: flex; flex-direction: column; align-items: stretch; }.hero-copy { padding: 38px 0 10px; }.hero-visual { min-height: 390px; margin-top: 5px; }.hero-image-card { width: min(78%, 350px); }.visual-orbit { transform: scale(.75) rotate(-19deg); }.note-top { top: 42px; right: -5px; }.note-bottom { bottom: 28px; left: -4px; }.hero-note { min-width: 175px; padding: 10px; }.hero-note strong { font-size: 9px; }.hero-note small { font-size: 8px; }.logo-strip { flex-wrap: wrap; gap: 18px; padding: 22px 16px; font-size: 14px; }.content-section { width: calc(100% - 32px); padding: 78px 0; }.feature-grid { grid-template-columns: 1fr; margin-top: 32px; }.feature-card { min-height: 250px; }.split-heading { display: block; }.split-heading > p { margin-top: 20px; }.service-row { min-height: 142px; grid-template-columns: 42px 1fr 35px; gap: 10px; }.service-row h3 { font-size: 20px; }.service-row p { grid-column: 2 / 3; }.service-arrow { grid-column: 3; grid-row: 1 / 3; }.portal-cta { width: calc(100% - 32px); margin-bottom: 58px; padding: 35px 25px; display: block; }.portal-cta h2 { font-size: 34px; }.portal-cta .button { margin-top: 25px; }.site-footer { padding: 30px 20px; flex-wrap: wrap; gap: 17px; }.site-footer p { flex-basis: 100%; }.auth-shell { display: block; }.auth-visual { min-height: 360px; padding: 28px 24px 42px; }.auth-visual .brand { margin-bottom: 60px; }.auth-visual h1 { margin-bottom: 12px; font-size: 45px; }.auth-visual-inner > p:not(.eyebrow) { max-width: 310px; font-size: 12px; }.auth-quote { display: none; }.auth-visual::after { width: 330px; height: 330px; right: -130px; bottom: -180px; }.auth-content { padding: 28px 20px 50px; }.back-link { margin-bottom: 28px; }.auth-card-heading h2 { font-size: 36px; }.two-columns { grid-template-columns: 1fr; gap: 16px; }.dashboard-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 260px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 15px 0 30px rgba(16,37,40,.15); }.dashboard-sidebar.mobile-open { transform: translateX(0); }.sidebar-close { display: block; }.mobile-menu-button { display: block; }.dashboard-header { padding: 18px 20px; align-items: flex-start; }.dashboard-header h1 { font-size: 22px; }.dashboard-kicker { font-size: 8px; }.profile-chip { display: none; }.dashboard-content { width: calc(100% - 30px); padding: 24px 0 45px; }.welcome-banner { padding: 25px; min-height: 220px; }.welcome-banner h2 { font-size: 28px; }.welcome-symbol { display: none; }.dashboard-card { padding: 20px 17px; }.journey-line { grid-template-columns: 1fr; gap: 14px; }.journey-line::before { left: 8px; top: 8px; bottom: 8px; width: 1px; height: auto; }.journey-step { display: flex; align-items: flex-start; gap: 12px; padding: 0; }.journey-dot { flex: 0 0 17px; margin: 0; }.profile-details { flex-direction: column; gap: 13px; }.profile-details > div { flex-direction: row; padding-bottom: 10px; border-bottom: 1px solid var(--line); }.profile-details strong { text-align: right; }.message-composer { display: block; }.message-composer .button { width: 100%; margin-top: 9px; }.message-bubble { max-width: 90%; } }

/* Patient profile photos are reused in the portal header and conversation bubbles. */
.profile-chip > span { overflow: hidden; }
.profile-chip > span.profile-chip-image { background: #dceae6; }
.profile-chip > span img { width: 100%; height: 100%; display: block; object-fit: cover; }
.message-bubble { position: relative; }
.message-avatar { width: 25px; height: 25px; display: grid; place-items: center; overflow: hidden; position: absolute; right: -33px; bottom: 8px; border: 2px solid var(--white); border-radius: 50%; color: var(--teal-dark); background: var(--mint-deep); font-size: 8px; font-weight: 700; }
.message-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.dashboard-header .profile-chip > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
}
.dashboard-header .profile-chip > span img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Patient portal sidebar matches the staff collapse/expand interaction. */
.patient-portal-shell .dashboard-sidebar { transition: width .22s ease, flex-basis .22s ease, padding .22s ease; }
.patient-portal-shell .dashboard-nav .nav-item > span > b { min-width: 0; height: auto; padding: 0; color: inherit; background: transparent; font-size: inherit; font-weight: 600; }
.patient-portal-shell .patient-sidebar-toggle { margin-left: auto; }

@media (min-width: 721px) {
  .patient-portal-shell.sidebar-collapsed .dashboard-sidebar { width: 72px; flex-basis: 72px; padding: 18px 8px 14px; }
  .patient-portal-shell.sidebar-collapsed .dashboard-sidebar .sidebar-top { padding: 0; justify-content: center; }
  .patient-portal-shell.sidebar-collapsed .dashboard-sidebar .brand,
  .patient-portal-shell.sidebar-collapsed .dashboard-sidebar .sidebar-label { display: none; }
  .patient-portal-shell.sidebar-collapsed .dashboard-nav .nav-item { justify-content: center; padding: 0; position: relative; font-size: 20px; }
  .patient-portal-shell.sidebar-collapsed .dashboard-nav .nav-item > span { gap: 0; }
  .patient-portal-shell.sidebar-collapsed .dashboard-nav .nav-item > span > b,
  .patient-portal-shell.sidebar-collapsed .patient-sidebar-label,
  .patient-portal-shell.sidebar-collapsed .secure-badge span { display: none; }
  .patient-portal-shell.sidebar-collapsed .dashboard-nav .nav-item > b { position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; font-size: 8px; }
  .patient-portal-shell.sidebar-collapsed .secure-badge { justify-content: center; margin: 0 0 20px; padding: 12px 0; }
  .patient-portal-shell.sidebar-collapsed .logout-button { justify-content: center; padding: 10px 0; }
  .patient-portal-shell.sidebar-collapsed .dashboard-nav .nav-item[data-tooltip]::after { content: attr(data-tooltip); position: absolute; z-index: 120; left: calc(100% + 10px); top: 50%; min-width: max-content; padding: 7px 10px; transform: translateY(-50%) translateX(-4px); opacity: 0; visibility: hidden; border: 1px solid rgba(20, 48, 55, .12); border-radius: 5px; color: #17383b; background: #fff; box-shadow: 0 7px 18px rgba(16, 37, 40, .18); font-size: 11px; font-weight: 600; pointer-events: none; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
  .patient-portal-shell.sidebar-collapsed .dashboard-nav .nav-item[data-tooltip]:hover::after { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
}

/* Patient documents saved by the care team, grouped by filing category. */
.patient-documents-card { margin-top: 18px; }
.patient-documents-intro { margin: 8px 0 18px; color: #718883; font-size: 10px; line-height: 1.55; }
.patient-documents-empty { min-height: 82px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #7c908c; background: #f6faf8; border: 1px dashed #c8d9d2; border-radius: 5px; font-size: 11px; }
.patient-document-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.patient-document-category { min-width: 0; border: 1px solid #c8d9d2; border-radius: 6px; background: #fbfdfc; overflow: hidden; }
.patient-document-category summary { min-height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #214e50; background: #eef7f2; cursor: pointer; list-style: none; font-size: 11px; font-weight: 700; }
.patient-document-category summary::-webkit-details-marker { display: none; }
.patient-document-category summary::after { content: '⌄'; color: #6d9085; font-size: 14px; transition: transform .15s ease; }
.patient-document-category[open] summary::after { transform: rotate(180deg); }
.patient-document-category summary b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: #183d3e; background: #cfecc4; font-size: 9px; }
.patient-document-list { padding: 7px; display: grid; gap: 6px; }
.patient-document-row { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 6px; border: 1px solid #dbe8e2; border-radius: 5px; background: #fff; }
.patient-document-row:hover { border-color: #9ecabb; box-shadow: 0 3px 8px rgba(35, 89, 80, .08); }
.patient-document-preview { min-width: 0; flex: 1; padding: 0; display: flex; align-items: center; gap: 9px; border: 0; color: #183d48; background: transparent; text-align: left; cursor: pointer; }
.patient-document-preview > img, .patient-document-file-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 4px; color: #1a6f77; background: #e5f3ee; object-fit: cover; }
.patient-document-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.patient-document-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.patient-document-copy small { color: #80928e; font-size: 8px; }
.patient-document-download { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; color: #1d6870; background: #edf7f2; transform: rotate(90deg); }
.patient-document-download:hover { color: #123d47; background: #cfecc4; }

@media (max-width: 720px) {
  .patient-portal-shell .patient-sidebar-toggle { display: none; }
  .patient-document-groups { grid-template-columns: 1fr; }
}
.admin-login-button { color: var(--gold) !important; }
.admin-login-button:hover { color: var(--white) !important; }
.admin-placeholder { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--cream); }
.admin-placeholder-card { width: min(100%, 540px); padding: 46px; text-align: center; border: 1px solid var(--line); border-radius: 5px; background: var(--white); box-shadow: 0 20px 60px rgba(16,37,40,.08); }
.admin-placeholder-card .brand { justify-content: center; margin-bottom: 45px; }
.admin-placeholder-card h1 { margin: 0 0 12px; font-size: 38px; }
.admin-placeholder-card > p:not(.eyebrow) { margin: 0 auto 28px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.admin-dashboard-content { width: min(1180px, calc(100% - 80px)); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.admin-stat-card { min-height: 126px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.admin-stat-card small { color: #8da19d; font-size: 10px; font-weight: 700; }
.admin-stat-card strong { color: var(--teal-dark); font-family: 'Poppins', Arial, sans-serif; font-size: 38px; font-weight: 500; line-height: 1; }
.admin-overview-grid, .admin-section-grid, .admin-settings-grid { margin-top: 18px; display: grid; grid-template-columns: 1.45fr .85fr; gap: 18px; align-items: start; }
.admin-section-grid { grid-template-columns: 1fr 1fr; }
.admin-settings-grid { grid-template-columns: 1fr 1fr; }
.admin-overview-grid .dashboard-card, .admin-section-grid .dashboard-card, .admin-settings-grid .dashboard-card { min-width: 0; }
.admin-text-action { padding: 4px 0; border: 0; color: var(--teal); background: transparent; font-size: 10px; font-weight: 700; }
.admin-text-action:hover { color: var(--teal-dark); }
.admin-quick-card { min-height: 210px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.admin-quick-card h3 { margin: 4px 0 9px; font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 500; }
.admin-quick-card p:not(.eyebrow) { margin: 0 0 22px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.admin-empty { min-height: 170px; display: grid; place-items: center; color: #8da19d; font-size: 11px; }
.admin-patient-list, .admin-staff-list { margin-top: 20px; display: flex; flex-direction: column; }
.admin-patient-row, .admin-staff-row { min-width: 0; padding: 13px 0; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; border-top: 1px solid var(--line); }
.admin-avatar { width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: var(--teal-dark); background: var(--mint-deep); font-size: 9px; font-weight: 700; }
.admin-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.admin-patient-row strong, .admin-patient-row small, .admin-staff-row strong, .admin-staff-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-patient-row strong, .admin-staff-row strong { color: var(--ink); font-size: 11px; }
.admin-patient-row small, .admin-staff-row small { margin-top: 3px; color: #8da19d; font-size: 9px; }
.admin-patient-service { max-width: 155px; overflow: hidden; color: var(--ink-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-status, .admin-role-badge { padding: 5px 8px; border-radius: 20px; font-size: 8px; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.admin-status { color: var(--teal-dark); background: var(--mint); }
.admin-status.closed { color: #8d5752; background: #fcebe8; }
.admin-status.temporary { color: #7b5d15; background: #fff2bf; }
.admin-role-badge { color: #735d25; background: #f7edc9; }
.admin-role-badge.admin { color: var(--teal-dark); background: #dcefe8; }
.admin-staff-info { min-width: 0; }
.admin-staff-row { grid-template-columns: 36px minmax(0, 1fr) auto auto minmax(210px, auto); }
.admin-status.active { color: var(--teal-dark); background: var(--mint); }
.admin-staff-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.admin-inline-button { min-height: 27px; padding: 0 7px; border: 1px solid #c7d9d5; border-radius: 4px; color: var(--teal-dark); background: #f5fbf8; font-size: 9px; font-weight: 700; white-space: nowrap; }
.admin-inline-button:hover { border-color: var(--teal); background: var(--mint); }
.admin-inline-button:disabled { cursor: not-allowed; opacity: .55; }
.admin-inline-button.danger { color: #9a5149; border-color: #edc5bf; background: #fff8f7; }
.admin-inline-button.danger:hover { background: #fcebe8; }
.admin-current-account { color: #879995; font-size: 9px; font-weight: 600; white-space: nowrap; }
.admin-staff-edit-form { grid-column: 1 / -1; margin-top: 7px; padding: 15px; display: flex; flex-direction: column; gap: 12px; border: 1px solid #c6ddd8; border-radius: 5px; background: #f7fcfa; }
.admin-staff-edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--teal-dark); font-size: 11px; }
.admin-staff-edit-form .portal-form { gap: 12px; }
.admin-staff-edit-form .button { align-self: flex-start; min-height: 38px; padding: 0 15px; font-size: 10px; }
.temporary-password-notice { padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #ead994; border-radius: 5px; color: #6d581b; background: #fff9df; font-size: 10px; line-height: 1.45; }
.temporary-password-notice strong { font-size: 11px; }
.temporary-password-notice span { color: #8c7840; }
.admin-notice, .admin-alert { margin-bottom: 16px; }
.admin-settings-grid .portal-form { gap: 16px; }
.admin-automation-card { grid-column: 1 / -1; }
.settings-help-text { margin: -4px 0 2px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.automation-days { display: flex; flex-direction: column; gap: 9px; }
.automation-day-list { display: flex; flex-wrap: wrap; gap: 8px; }
.automation-day-list label { padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); background: #fbfdfc; font-size: 10px; cursor: pointer; }
.automation-day-list label:has(input:checked) { border-color: var(--teal); color: var(--teal-dark); background: var(--mint); }
.automation-day-list input { margin-right: 4px; accent-color: var(--teal); }
.automation-toggle { padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 4px; background: #fbfdfc; cursor: pointer; }
.automation-toggle input { margin-top: 2px; accent-color: var(--teal); }
.automation-toggle strong, .automation-toggle small { display: block; }
.automation-toggle strong { color: var(--ink); font-size: 11px; }
.automation-toggle small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.textarea-label textarea { min-height: 100px; resize: vertical; }
.staff-login-button { color: #b8cfca !important; }
.staff-login-button:hover { color: var(--white) !important; }
.staff-header-actions { display: flex; align-items: center; gap: 20px; }
.staff-notification-button { width: 34px; height: 34px; display: grid; place-items: center; position: relative; border: 1px solid var(--line); border-radius: 50%; color: var(--teal-dark); background: var(--white); }
.staff-notification-button b { min-width: 16px; height: 16px; padding: 0 3px; display: grid; place-items: center; position: absolute; top: -5px; right: -5px; border-radius: 50%; color: var(--white); background: var(--teal); font-size: 8px; }
.admin-patient-button { width: 100%; border-right: 0; border-bottom: 0; border-left: 0; border-top: 1px solid var(--line); text-align: left; font-family: inherit; cursor: pointer; }
.admin-patient-button:hover { background: #f7faf8; }
.staff-inbox-card { margin-top: 0; }
.staff-inbox { min-height: 490px; margin-top: 22px; display: grid; grid-template-columns: 300px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 4px; }
.staff-thread-list { max-height: 550px; overflow-y: auto; border-right: 1px solid var(--line); background: #fbfdfc; }
.staff-thread-item { width: 100%; min-width: 0; padding: 13px 12px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; font-family: inherit; cursor: pointer; }
.staff-thread-item:hover, .staff-thread-item.active { background: var(--mint); }
.staff-thread-item > span:nth-child(2) { min-width: 0; }
.staff-thread-item strong, .staff-thread-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-thread-item strong { font-size: 10px; }
.staff-thread-item small { margin-top: 4px; color: #8da19d; font-size: 9px; }
.staff-thread-item time { color: #8da19d; font-size: 8px; white-space: nowrap; }
.staff-thread-view { min-width: 0; display: flex; flex-direction: column; background: var(--white); }
.staff-thread-heading { padding: 14px 17px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.staff-thread-heading strong, .staff-thread-heading small { display: block; }
.staff-thread-heading strong { font-size: 12px; }
.staff-thread-heading small { margin-top: 3px; color: #8da19d; font-size: 9px; }
.staff-message-list { min-height: 300px; max-height: 390px; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; }
.staff-message { max-width: 78%; padding: 11px 13px; border-radius: 3px 11px 11px 11px; background: #f1f6f5; }
.staff-message.from-staff { margin-left: auto; border-radius: 11px 3px 11px 11px; color: var(--white); background: var(--teal); }
.staff-message p { margin: 0; font-size: 10px; line-height: 1.55; }
.staff-message-composer { margin-top: auto; padding: 13px; display: flex; gap: 9px; border-top: 1px solid var(--line); }
.staff-message-composer textarea { min-width: 0; min-height: 42px; flex: 1; padding: 10px; resize: vertical; border: 1px solid var(--line); outline: none; border-radius: 3px; color: var(--ink); background: #fbfdfc; font-family: inherit; font-size: 10px; }
.staff-message-composer textarea:focus { border-color: var(--teal); }
.staff-message-composer .button { align-self: flex-end; min-height: 42px; padding: 0 14px; font-size: 10px; }

@media (max-width: 980px) {
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-overview-grid, .admin-section-grid, .admin-settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .admin-dashboard-content { width: calc(100% - 30px); }
  .admin-patient-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .admin-patient-service { display: none; }
  .admin-staff-row { grid-template-columns: 36px minmax(0, 1fr); }
  .admin-staff-row .admin-role-badge, .admin-staff-row .admin-status, .admin-staff-row .admin-staff-actions { grid-column: 2; justify-self: start; }
  .admin-staff-actions { justify-content: flex-start; }
  .admin-staff-edit-form { grid-column: 1 / -1; }
  .admin-placeholder-card { padding: 30px 22px; }
  .staff-header-actions .profile-chip { display: none; }
  .staff-inbox { grid-template-columns: 1fr; }
  .staff-thread-list { max-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
  .staff-message { max-width: 88%; }
  .staff-message-composer { display: block; }
  .staff-message-composer .button { width: 100%; margin-top: 8px; }
}

/* Agent patient-list view, styled after the supplied CRM reference. */
.rise-agent-shell { background: #ececf1; }
.rise-agent-shell .rise-agent-sidebar { width: 282px; flex: 0 0 282px; padding: 28px 15px 18px; background: linear-gradient(180deg, #171f1d 0%, #172b32 52%, #245a67 100%); }
.rise-agent-sidebar .sidebar-top { padding: 0 10px; }
.rise-search-link { width: 100%; margin: 32px 0 24px; padding: 0 7px; display: flex; align-items: center; gap: 8px; border: 0; color: rgba(255,255,255,.86); background: transparent; text-align: left; font-size: 20px; }
.rise-search-link span { font-size: 16px; }
.rise-search-link small { margin-left: auto; color: rgba(255,255,255,.72); font-size: 12px; }
.rise-agent-nav { gap: 5px; }
.rise-agent-nav .nav-item { min-height: 48px; padding: 0 9px; border-radius: 5px; font-size: 20px; }
.rise-agent-nav .nav-item > span { gap: 13px; }
.rise-agent-nav .nav-item > span > b { min-width: 0; height: auto; padding: 0; color: inherit; background: transparent; font-size: 14px; font-weight: 600; }
.rise-agent-nav .nav-item > b { min-width: 21px; height: 21px; color: #132628; background: #a6ed78; }
.rise-agent-nav .nav-item:hover, .rise-agent-nav .nav-item.active { color: #0e1d20; background: #a6ed78; }
.rise-nav-divider { height: 1px; margin: 18px 10px 24px; background: rgba(255,255,255,.7); }
.rise-settings-link { margin-top: auto; }
.rise-agent-main { background: #ececf1; }
.rise-topbar { height: 58px; padding: 0 25px; display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.9); background: linear-gradient(105deg, #153b44 0%, #296576 56%, #659078 100%); }
.rise-topbar-actions { display: flex; align-items: center; gap: 17px; }
.rise-slack-button { display: none; }
.rise-topbar-icon { display: none; }
.rise-topbar-avatar { width: auto; min-width: 35px; max-width: 240px; height: 35px; padding: 0 12px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rise-topbar-avatar.has-image { width: 35px; min-width: 35px; padding: 0; overflow: hidden; }
.rise-topbar-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.staff-topbar-name { min-width: 108px; padding: 0; display: flex; flex-direction: column; align-items: flex-start; border: 0; color: #fff; background: transparent; text-align: left; cursor: pointer; }
.staff-topbar-name strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.staff-topbar-name small { margin-top: 2px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 500; }
.staff-topbar-name:hover strong { text-decoration: underline; }
.agent-push-floating { position: fixed; top: 72px; right: 18px; z-index: 80; max-width: 240px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.agent-push-floating button { padding: 9px 13px; border: 0; border-radius: 5px; color: #13211e; background: #9af06e; box-shadow: 0 5px 18px rgba(16, 37, 40, .18); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.agent-push-floating button:disabled { opacity: .65; cursor: wait; }
.agent-push-floating small { padding: 6px 8px; border-radius: 4px; color: #fff; background: #a94d48; font-size: 9px; line-height: 1.35; text-align: right; }
.agent-push-unsupported { max-width: 285px; }
.agent-push-unsupported small { background: #637b83; }
.staff-push-overlay { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 18px; background: rgba(10, 30, 34, .48); }
.staff-push-dialog { width: min(390px, 100%); position: relative; padding: 28px 24px 22px; border: 1px solid #d7e5e2; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 24px 70px rgba(10, 30, 34, .27); text-align: center; }
.staff-push-close { width: 30px; height: 30px; display: grid; place-items: center; position: absolute; top: 10px; right: 10px; border: 0; border-radius: 50%; color: #7d918f; background: #f0f6f4; font-size: 20px; cursor: pointer; }
.staff-push-icon { width: 52px; height: 52px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 50%; color: #155d66; background: #e2f5e7; }
.staff-push-dialog h2 { margin: 0 0 9px; color: var(--ink); font-family: 'Poppins', Arial, sans-serif; font-size: 20px; }
.staff-push-dialog > p:not(.eyebrow) { margin: 0 auto 20px; max-width: 310px; color: #60736f; font-size: 11px; line-height: 1.6; }
.staff-push-primary { min-height: 42px; padding: 0 20px; border: 0; border-radius: 9px; color: #fff; background: #1f7d86; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.staff-push-primary:disabled { opacity: .65; cursor: wait; }
.staff-push-later { display: block; margin: 13px auto 0; padding: 0; border: 0; color: #73827f; background: transparent; font: inherit; font-size: 10px; cursor: pointer; }
.staff-push-dialog-error { display: block; margin-top: 13px; color: #a94d48; font-size: 10px; line-height: 1.4; }
.rise-agent-content { min-width: 0; padding: 0 0 30px; }
.rise-title-row { min-height: 58px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #d4d5dd; background: #fff; }
.rise-title-row > div:first-child { display: flex; align-items: center; gap: 14px; }
.rise-title-row h1 { margin: 0; color: #162e46; font-family: 'Poppins', Arial, sans-serif; font-size: 23px; font-weight: 500; }
.rise-smart-title { padding: 7px 10px; border: 0; border-radius: 4px; color: #fff; background: #1e5d73; font-size: 12px; font-weight: 600; }
.rise-title-actions { display: flex; align-items: center; gap: 14px; }
.rise-action-button, .rise-more-button { min-height: 40px; padding: 0 15px; border: 0; border-radius: 5px; color: #fff; background: #1d718d; font-size: 14px; font-weight: 600; }
.rise-more-button { width: 32px; padding: 0; font-size: 23px; }
.rise-list-panel { min-width: 0; padding: 15px 17px 0; }
.rise-contact-heading { padding: 0 0 18px; }
.rise-contact-heading h2 { margin: 0; color: #1a3048; font-size: 25px; font-weight: 600; }
.rise-contact-heading h2 span { margin-left: 10px; padding: 8px 13px; border-radius: 5px; color: #fff; background: #237692; font-size: 15px; vertical-align: middle; }
.rise-smart-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding-bottom: 15px; }
.rise-smart-tabs button { min-height: 39px; padding: 0 13px; border: 0; border-radius: 5px; color: #1b2c3b; background: transparent; white-space: nowrap; font-size: 14px; }
.rise-smart-tabs button.active { color: #fff; background: #1d536a; }
.rise-smart-tabs button small { margin-left: 7px; color: inherit; opacity: .72; font-size: 10px; }
.rise-smart-tabs .rise-more-list { margin-left: auto; background: #f7f8fb; color: #506174; }
.rise-smart-tabs .rise-add-list { font-size: 14px; }
.rise-list-controls { min-height: 57px; display: flex; align-items: center; gap: 10px; }
.rise-control-group { display: flex; gap: 10px; }
.rise-control-button, .rise-control-select { height: 39px; padding: 0 14px; border: 0; border-radius: 5px; color: #1b4260; background: #fff; font-size: 14px; }
.rise-control-button.active { color: #fff; background: #1e637c; }
.rise-control-select { outline: none; }
.rise-search-box { min-width: 260px; height: 39px; margin-left: auto; padding: 0 10px; display: flex; align-items: center; gap: 8px; border-radius: 5px; background: #fff; }
.rise-search-box span { color: #7c8998; font-size: 21px; }
.rise-search-box input { min-width: 0; flex: 1; border: 0; outline: none; color: #22384d; background: transparent; font-family: inherit; font-size: 14px; }
.rise-search-box input::placeholder { color: #718094; }
.rise-search-box button { display: none; }
.rise-manage-fields { padding: 0 0 0 3px; border: 0; color: #20364d; background: transparent; font-size: 14px; font-weight: 600; white-space: nowrap; }
.rise-filter-panel { margin: 2px 0 14px; padding: 14px; display: flex; align-items: flex-end; gap: 15px; border: 1px solid #d9dde5; border-radius: 5px; background: #f8f9fc; }
.rise-filter-panel label { display: flex; flex-direction: column; gap: 5px; color: #506174; font-size: 11px; font-weight: 600; }
.rise-filter-panel select { height: 34px; min-width: 170px; padding: 0 9px; border: 1px solid #d2d8e1; border-radius: 4px; color: #1b2c3b; background: #fff; }
.rise-filter-panel button { height: 34px; padding: 0 12px; border: 0; border-radius: 4px; color: #1e637c; background: transparent; font-size: 12px; font-weight: 600; }
.rise-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e0e2e7; border-radius: 5px; background: #fff; }
.rise-patient-table { width: 100%; min-width: 1050px; border-collapse: collapse; color: #33465d; background: #fff; font-size: 13px; }
.rise-pipeline-table { min-width: 1260px; }
.rise-patient-table th, .rise-patient-table td { height: 54px; padding: 0 15px; border-bottom: 1px solid #e6e8ec; text-align: left; white-space: nowrap; }
.rise-patient-table th { height: 49px; color: #506174; background: #fbfcfd; font-size: 12px; font-weight: 600; }
.rise-patient-table th:first-child, .rise-patient-table td:first-child { width: 34px; padding-right: 0; }
.rise-patient-table input[type="checkbox"] { width: 19px; height: 19px; accent-color: #19708c; }
.rise-contact-cell { display: flex; align-items: center; gap: 9px; }
.rise-contact-link { padding: 0; border: 0; display: flex; align-items: center; gap: 9px; color: inherit; background: transparent; font: inherit; cursor: pointer; text-align: left; }
.rise-contact-link:hover strong { color: #1d657e; text-decoration: underline; }
.rise-contact-cell strong { color: #42536b; font-size: 14px; font-weight: 500; }
.rise-patient-avatar { width: 35px; height: 35px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #40556a; background: #e9eef4; font-size: 11px; font-weight: 600; }
.rise-patient-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.rise-phone-cell { color: #274257; }
.rise-email-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.rise-tag, .rise-tag-count { display: inline-block; padding: 4px 9px; border: 1px solid #1980ab; border-radius: 15px; color: #183246; font-size: 12px; }
.rise-tag-count { margin-left: 6px; padding: 4px 8px; }
.rise-table-message { height: 180px !important; color: #7c8998; text-align: center !important; }
.rise-table-message.error { color: #b15b53; }
.rise-pagination { min-height: 57px; padding: 0 5px; display: flex; align-items: center; gap: 9px; color: #536477; font-size: 13px; }
.rise-pagination > span { margin-right: auto; }
.rise-pagination label { padding: 8px 12px; border: 1px solid #d9dde5; border-radius: 5px; background: #fff; }
.rise-pagination button { min-width: 40px; height: 36px; padding: 0 9px; border: 1px solid #d9dde5; border-radius: 4px; color: #536477; background: #fff; font-size: 13px; }
.rise-pagination button.active { color: #1d5f80; border-color: #2876a1; background: #f5f9fd; }
.rise-pagination button:disabled { color: #aeb6c1; background: #f3f4f6; }

@media (max-width: 1050px) {
  .rise-agent-shell .rise-agent-sidebar { width: 235px; flex-basis: 235px; }
  .rise-smart-tabs .rise-more-list { margin-left: 0; }
  .rise-list-controls { flex-wrap: wrap; padding: 7px 0; }
  .rise-search-box { margin-left: 0; }
  .rise-manage-fields { margin-left: auto; }
}
@media (max-width: 720px) {
  .rise-agent-shell .rise-agent-sidebar { position: fixed; z-index: 30; width: 260px; transform: translateX(-100%); transition: transform .25s ease; }
  .rise-agent-shell .rise-agent-sidebar.mobile-open { transform: translateX(0); }
  .rise-topbar { height: 52px; padding: 0 14px; }
  .rise-topbar-actions { gap: 9px; }
  .rise-topbar-icon { display: none; }
  .agent-push-floating { top: 60px; right: 12px; max-width: 190px; }
  .agent-push-floating button { padding: 8px 10px; font-size: 10px; }
  .rise-title-row { padding: 10px 14px; align-items: flex-start; flex-direction: column; }
  .rise-title-actions { width: 100%; overflow-x: auto; }
  .rise-list-panel { padding: 14px 10px 0; }
  .rise-contact-heading h2 { font-size: 21px; }
  .rise-list-controls { align-items: stretch; }
  .rise-control-group { width: 100%; overflow-x: auto; }
  .rise-search-box { width: 100%; }
  .rise-manage-fields { margin-left: 0; }
  .rise-filter-panel { align-items: stretch; flex-direction: column; }
  .rise-filter-panel select { width: 100%; }
}

/* CRM-style team inbox for staff conversations. */
.staff-conversation-page-heading { min-height: 58px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #d4d5dd; background: #fff; }
.staff-conversation-title { display: flex; align-items: center; gap: 5px; min-width: 0; }
.staff-conversation-title h1 { margin: 0 12px 0 0; color: #162e46; font-family: 'Poppins', Arial, sans-serif; font-size: 23px; font-weight: 500; }
.staff-conversation-tab { min-height: 40px; padding: 0 12px; border: 1px solid #ccd2da; border-radius: 5px; color: #1b2c3b; background: #fff; font-size: 14px; white-space: nowrap; }
.staff-conversation-tab.active { color: #fff; border-color: #1e5d73; background: #1e5d73; font-weight: 600; }
.staff-automation-badge { display: none; padding: 9px 13px; border-radius: 5px; color: #fff; background: #257252; font-size: 12px; font-weight: 600; white-space: nowrap; }
.staff-conversation-notice { padding: 0 17px; }
.staff-conversation-notice:empty { display: none; }
.staff-crm-workspace { margin: 18px 17px 30px; overflow: hidden; border: 1px solid #e0e3e8; border-radius: 12px; background: #f8fafd; box-shadow: 0 1px 2px rgba(20, 42, 58, .04); }
.staff-inbox-toolbar { min-height: 66px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6e9ef; background: #f8fafd; }
.staff-inbox-toolbar h2 { margin: 0; color: #172e47; font-size: 20px; font-weight: 600; }
.staff-inbox-toolbar p { margin: 4px 0 0; color: #8795a4; font-size: 10px; }
.staff-inbox-tools { display: flex; gap: 8px; }
.staff-inbox-tools button, .crm-conversation-actions button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 5px; color: #5c6e80; background: transparent; font-size: 19px; }
.staff-inbox-tools button:hover, .crm-conversation-actions button:hover { color: #1c6680; background: #e5f2f4; }
.staff-inbox-tabs { min-height: 61px; padding: 0 20px; display: flex; align-items: end; gap: 27px; border-bottom: 1px solid #e6e9ef; background: #f8fafd; }
.staff-inbox-tabs button { min-height: 48px; padding: 0 2px; display: flex; align-items: center; gap: 6px; position: relative; border: 0; color: #53677d; background: transparent; font-size: 13px; }
.staff-inbox-tabs button.active { color: #172e47; font-weight: 600; }
.staff-inbox-tabs button.active::after { content: ''; height: 2px; position: absolute; right: 0; bottom: -1px; left: 0; background: #2879e7; }
.staff-inbox-tabs button b { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: #2879e7; font-size: 10px; }
.staff-inbox-tabs button:not(.active) b { color: #65778a; background: #e9edf3; }
.staff-inbox-actions { min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e6e9ef; background: #fff; }
.staff-inbox-actions label { display: flex; align-items: center; gap: 9px; color: #506174; font-size: 12px; }
.staff-inbox-actions input[type="checkbox"], .crm-thread-item input[type="checkbox"], .staff-dnd-panel input[type="checkbox"] { width: 17px; height: 17px; accent-color: #237bdf; }
.staff-inbox-actions form { width: 245px; height: 34px; padding: 0 10px; display: flex; align-items: center; gap: 7px; border: 1px solid #d9dfe7; border-radius: 5px; background: #fff; }
.staff-inbox-actions form span { color: #8c99a8; font-size: 18px; }
.staff-inbox-actions form input { min-width: 0; flex: 1; border: 0; outline: 0; color: #263b51; background: transparent; font-family: inherit; font-size: 11px; }
.staff-crm-body { min-height: 630px; display: grid; grid-template-columns: 305px minmax(0, 1fr) 286px; background: #fff; }
.staff-crm-body .crm-thread-list { height: 630px; max-height: none; overflow-y: auto; border-right: 1px solid #e0e5eb; background: #fbfcfe; }
.crm-thread-item { min-height: 78px; padding: 11px 12px; display: grid; grid-template-columns: 18px 34px minmax(0, 1fr) auto 18px; align-items: center; gap: 8px; border-bottom: 1px solid #e9edf1; }
.crm-thread-item:hover { background: #f0f6ff; }
.crm-thread-item.active { border-left: 3px solid #2879e7; background: #e5f0ff; }
.crm-thread-item input { margin: 0; }
.crm-thread-item .admin-avatar { width: 34px; height: 34px; }
.crm-thread-copy { min-width: 0; position: relative; padding-right: 2px; }
.crm-thread-copy strong, .crm-thread-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-thread-copy strong { color: #263a51; font-size: 11px; }
.crm-thread-copy small { margin-top: 5px; color: #718094; font-size: 9px; }
.crm-thread-copy em { display: block; margin-top: 5px; color: #9aa6b2; font-size: 8px; font-style: normal; }
.crm-unread-count { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: #2879e7; font-size: 9px; }
.crm-unread-count::before { content: 'Unread '; }
.crm-thread-item:not(:has(.crm-unread-count)) .crm-star { grid-column: 4 / 6; width: auto; display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: #718094; font-size: 9px; }
.crm-thread-item:not(:has(.crm-unread-count)) .crm-star::before { content: 'Read'; }
.crm-star { color: #91a0ae; font-size: 18px; line-height: 1; cursor: pointer; }
.crm-star.active { color: #f2ac26; }
.crm-read-status { padding: 4px 6px; border-radius: 10px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.crm-read-status.unread { color: #fff; background: #2879e7; }
.crm-read-status.read { color: #6e7f90; background: #edf1f5; }
.crm-conversation-view { min-width: 0; height: 630px; border-right: 1px solid #e0e5eb; background: #f8fafd; }
.crm-conversation-heading { min-height: 68px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e2e7ed; background: #fff; }
.crm-person-heading { min-width: 0; display: flex; align-items: center; gap: 10px; }
.crm-person-heading strong, .crm-person-heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-person-heading strong { color: #24384e; font-size: 13px; }
.crm-person-heading small { margin-top: 3px; color: #8795a4; font-size: 9px; }
.crm-conversation-actions { display: flex; gap: 3px; }
.crm-message-list { min-height: 0; max-height: none; flex: 1; padding: 20px 18px; overflow-y: auto; background: #f5f8fc; }
.crm-message { max-width: 75%; padding: 11px 14px; border: 1px solid #e5eaf0; border-radius: 4px 13px 13px 13px; background: #fff; box-shadow: 0 1px 2px rgba(22, 46, 70, .04); }
.crm-message.from-staff { border-color: #d5e3fb; border-radius: 13px 4px 13px 13px; background: #e5efff; color: #1f3852; }
.crm-composer { min-height: 67px; margin-top: 0; padding: 11px 13px; align-items: center; border-top: 1px solid #e2e7ed; background: #fff; }
.crm-compose-icon { min-width: 44px; height: 40px; border: 0; color: #2879e7; background: transparent; font-size: 14px; }
.crm-composer textarea { min-height: 40px; padding: 11px; border-color: #dce3eb; background: #fbfcfe; font-size: 10px; }
.crm-composer .button { min-height: 40px; border-radius: 5px; background: #2879e7; }
.staff-contact-panel { min-width: 0; height: 630px; overflow-y: auto; background: #fff; }
.staff-contact-heading { min-height: 68px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e2e7ed; }
.staff-contact-heading strong { color: #20364d; font-size: 14px; }
.staff-contact-heading button { border: 0; color: #6d7d8d; background: transparent; font-size: 21px; }
.staff-contact-profile { padding: 19px 17px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #e8ecf1; }
.staff-contact-profile h3 { margin: 0; color: #24384e; font-size: 13px; }
.staff-contact-profile small { display: block; max-width: 175px; margin-top: 4px; overflow: hidden; color: #8795a4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.staff-contact-details { padding: 6px 17px 22px; display: flex; flex-direction: column; }
.staff-contact-detail { padding: 10px 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 9px; border-bottom: 1px solid #edf0f3; }
.staff-contact-detail span { color: #8795a4; font-size: 9px; }
.staff-contact-detail strong { min-width: 0; color: #263a51; font-size: 10px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.staff-contact-detail strong.empty { color: #aab4bf; font-weight: 400; }
.staff-contact-fields { padding: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.staff-contact-fields span, .staff-contact-fields strong { display: block; }
.staff-contact-fields span { margin-bottom: 7px; color: #8795a4; font-size: 10px; }
.staff-contact-fields strong { padding: 6px 9px; overflow: hidden; border: 1px solid #b9d5ef; border-radius: 13px; color: #24384e; background: #f4f9ff; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.staff-contact-fields button, .staff-contact-tags > button { width: 25px; height: 25px; border: 1px solid #ccd6e0; border-radius: 50%; color: #2879e7; background: #fff; }
.staff-contact-tags { padding: 0 17px 18px; }
.staff-contact-tags > strong { color: #24384e; font-size: 11px; }
.staff-contact-tags > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.staff-contact-tags > div span { padding: 5px 8px; border-radius: 12px; color: #53677d; background: #eef2f6; font-size: 9px; }
.staff-contact-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #e2e7ed; border-bottom: 1px solid #e2e7ed; }
.staff-contact-tabs button { min-height: 34px; border: 0; color: #53677d; background: #fff; font-size: 10px; }
.staff-contact-tabs button.active { color: #fff; background: #1e5369; font-weight: 600; }
.staff-dnd-panel { padding: 18px 17px; display: flex; flex-direction: column; gap: 13px; color: #53677d; font-size: 10px; }
.staff-dnd-panel > strong { color: #24384e; font-size: 12px; }
.staff-dnd-panel label { display: flex; align-items: center; gap: 8px; }
.staff-dnd-panel hr { width: 100%; border: 0; border-top: 1px solid #e5e9ee; }

@media (max-width: 1180px) {
  .staff-crm-body { grid-template-columns: 280px minmax(0, 1fr); }
  .staff-contact-panel { grid-column: 1 / -1; height: auto; border-top: 1px solid #e0e5eb; }
  .staff-contact-profile, .staff-contact-fields, .staff-contact-tags, .staff-dnd-panel { max-width: 680px; }
}
@media (max-width: 720px) {
  .staff-conversation-page-heading { min-height: auto; padding: 10px 14px; align-items: flex-start; flex-direction: column; }
  .staff-conversation-title { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .staff-conversation-title h1 { font-size: 19px; }
  .staff-automation-badge { align-self: flex-end; }
  .staff-crm-workspace { margin: 12px 10px 20px; }
  .staff-inbox-tabs { gap: 15px; overflow-x: auto; }
  .staff-inbox-actions { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
  .staff-inbox-actions form { width: 100%; }
  .staff-crm-body { display: block; }
  .staff-crm-body .crm-thread-list, .crm-conversation-view { height: auto; max-height: none; }
  .staff-crm-body .crm-thread-list { max-height: 290px; border-right: 0; border-bottom: 1px solid #e0e5eb; }
  .crm-conversation-view { min-height: 560px; border-right: 0; }
  .staff-contact-panel { height: auto; }
  .crm-message { max-width: 88%; }
  .crm-composer { align-items: stretch; flex-wrap: wrap; }
  .crm-composer textarea { flex-basis: calc(100% - 55px); }
  .crm-composer .button { width: 100%; }
}

/* Patient Process tracker board inspired by the supplied opportunity view. */
.rise-process-tab { min-height: 32px; padding: 0 10px; border: 1px solid #ccd2da; border-radius: 4px; color: #1b2c3b; background: #fff; font-size: 12px; }
.rise-process-content { min-width: 0; padding: 16px 17px 30px; background: #ececf1; }
.rise-process-toolbar { min-height: 145px; padding: 15px 9px 18px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; position: relative; }
.rise-pipeline-select { width: 320px; height: 45px; padding: 0 16px; border: 1px solid #d1d6df; border-radius: 5px; outline: none; color: #364b60; background: #fff; font-size: 15px; }
.rise-process-toolbar .rise-pipeline-select { display: none !important; }
.rise-opportunity-count { min-height: 43px; padding: 12px 16px; border-radius: 5px; color: #fff; background: #237692; font-size: 15px; font-weight: 600; }
.rise-view-toggle { width: 43px; height: 43px; border: 0; border-radius: 5px; color: #fff; background: #174f67; font-size: 20px; }
.rise-view-toggle.active, .rise-process-action.active { background: #1d718d; }
.rise-process-action, .rise-process-sort { height: 40px; padding: 0 14px; border: 0; border-radius: 5px; color: #fff; background: #1f6e88; font-size: 13px; font-weight: 600; }
.rise-process-sort { color: #1b4260; background: #fff; }
.rise-process-search { width: 300px; height: 40px; margin-left: auto; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 5px; background: #fff; }
.rise-process-search span { color: #7c8998; font-size: 20px; }
.rise-process-search input { min-width: 0; flex: 1; border: 0; outline: none; color: #22384d; background: transparent; font-family: inherit; font-size: 13px; }
.rise-process-filters { width: 100%; margin: 0; }
.rise-process-board { width: 100%; min-height: 500px; padding-bottom: 12px; display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; }
.rise-process-column { min-width: 292px; flex: 0 0 292px; min-height: 480px; }
.rise-process-column-heading { min-height: 87px; padding: 17px 17px 12px; display: flex; align-items: flex-start; justify-content: space-between; border: 1px solid #d8dbe1; background: #fff; box-shadow: 0 1px 1px rgba(30, 46, 68, .06); }
.rise-process-column-heading h2 { margin: 0 0 9px; color: #172536; font-size: 16px; font-weight: 700; }
.rise-process-column-heading span { padding: 7px 10px; border-radius: 3px; color: #172536; background: #e9ebef; font-size: 11px; }
.rise-process-column-heading button { border: 0; color: #495a6a; background: transparent; font-size: 21px; }
.rise-process-empty { min-height: 86px; padding: 28px 12px; color: #8793a0; background: #f2f3f6; text-align: center; font-size: 11px; }
.rise-opportunity-card { min-height: 130px; margin-top: 18px; padding: 16px 12px 12px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #e0e2e6; border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(27, 44, 59, .1); cursor: grab; }
.rise-opportunity-card:active { cursor: grabbing; }
.rise-opportunity-name { padding: 0; border: 0; color: #23165e; background: transparent; text-align: left; font-family: inherit; font-size: 15px; line-height: 1.35; cursor: pointer; }
.rise-opportunity-name:hover { text-decoration: underline; }
.rise-opportunity-meta { min-height: 28px; display: flex; align-items: center; gap: 13px; color: #152e33; font-size: 17px; }
.rise-opportunity-meta a, .rise-opportunity-meta button { padding: 0; border: 0; color: #17383b; background: transparent; font-size: 18px; text-decoration: none; }
.rise-opportunity-meta span { font-size: 12px; }
.rise-opportunity-avatar { width: 25px; height: 25px; margin-left: auto; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: #4a8b87; font-size: 8px !important; font-weight: 700; }
.rise-opportunity-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.rise-process-column .rise-opportunity-card { min-height: 78px; margin-top: 7px; padding: 9px 10px 8px; border-color: #cbdde0; border-radius: 8px; box-shadow: 0 3px 9px rgba(27, 69, 77, .09); }
.rise-process-column .rise-opportunity-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #174f67; font-size: 13px; font-weight: 700; }
.rise-process-column .rise-opportunity-meta { min-height: 25px; gap: 9px; }
.rise-process-column .rise-opportunity-meta > a { display: none !important; }
.rise-process-column .rise-opportunity-meta > button:last-of-type { display: none !important; }
.rise-process-column .rise-opportunity-meta > button:first-of-type { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #b8d9d5; border-radius: 50%; color: #166174; background: #e8f6f2; box-shadow: 0 2px 5px rgba(22, 97, 116, .14); font-size: 18px; }
.rise-process-column .rise-opportunity-meta > span[title="Conversation count"] { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 11px; color: #185368; background: #e5f0f2; font-size: 11px; font-weight: 700; }
.rise-stage-move-menu { position: relative; margin: 7px 0 5px; }
.rise-stage-move-menu summary { width: max-content; min-height: 23px; padding: 4px 9px; border: 1px solid #b8d9d5; border-radius: 12px; color: #166174; background: #f1fbf8; cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.rise-stage-move-menu summary::-webkit-details-marker { display: none; }
.rise-stage-move-menu summary::after { content: '⌄'; margin-left: 5px; font-size: 10px; }
.rise-stage-move-menu[open] summary { color: #fff; background: #23758b; }
.rise-stage-move-menu[open] summary::after { content: '⌃'; }
.rise-stage-move-options { position: absolute; z-index: 20; left: 0; top: calc(100% + 5px); width: 205px; max-height: 220px; overflow-y: auto; padding: 5px; border: 1px solid #b8d9d5; border-radius: 8px; background: #fff; box-shadow: 0 8px 20px rgba(21, 62, 72, .2); }
.rise-stage-move-options button { width: 100%; min-height: 28px; padding: 5px 8px; border: 0; border-radius: 5px; color: #234959; background: transparent; text-align: left; font-family: inherit; font-size: 10px; cursor: pointer; }
.rise-stage-move-options button:hover { color: #124d5f; background: #e8f6f2; }
.rise-stage-move-options button.current, .rise-stage-move-options button:disabled { color: #7a9299; background: #f0f4f4; cursor: default; }
.rise-process-list { max-height: calc(100vh - 275px); overflow: auto; border: 1px solid #6f8f94; border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(27, 69, 77, .1); }
.rise-process-list table { width: 100%; min-width: 900px; border-collapse: collapse; color: #203746; background: #fff; font-size: 12px; }
.rise-process-list th, .rise-process-list td { height: 48px; padding: 0 10px; border: 1px solid #b8cacc; text-align: left; white-space: nowrap; }
.rise-process-list th { height: 42px; color: #173b4c; background: #dcebed; font-size: 11px; font-weight: 700; }
.rise-process-list tbody tr:nth-child(even) td { background: #fbfdfd; }
.rise-process-list tbody tr:hover td { background: #f1fbf3; }
.rise-process-list td:first-child { color: #1d3443; font-weight: 700; }
.rise-process-list td:nth-child(2), .rise-process-list td:nth-child(4), .rise-process-list td:nth-child(5) { color: #1d4050; }
.rise-process-list select { width: 100%; min-height: 31px; padding: 0 8px; border: 1px solid #9fc6d3; border-radius: 5px; color: #1c4963; background: #f4f9ff; font-family: inherit; font-size: 11px; font-weight: 600; }
.rise-stage-cell { min-width: 138px; display: flex; flex-direction: column; gap: 4px; }
.rise-stage-select { min-height: 32px; max-width: 145px; padding: 0 7px; border: 1px solid #b9d5ef; border-radius: 4px; color: #1c4963; background: #f4f9ff; font-family: inherit; font-size: 10px; font-weight: 600; }
.rise-stage-cell small { color: #96a2ae; font-size: 8px; }
.rise-followup-input { width: 145px; min-height: 30px; padding: 0 6px; border: 1px solid #d4dce4; border-radius: 4px; color: #53677d; background: #fff; font-family: inherit; font-size: 9px; }

@media (max-width: 1050px) {
  .rise-process-toolbar { min-height: 195px; }
  .rise-process-search { margin-left: 0; }
}
@media (max-width: 720px) {
  .rise-process-content { padding: 10px 10px 20px; }
  .rise-process-toolbar { min-height: 275px; padding: 10px 4px; }
  .rise-pipeline-select, .rise-process-search { width: 100%; }
  .rise-process-action, .rise-process-sort { flex: 1; }
  .rise-process-board { margin: 0 -2px; }
  .rise-process-column { min-width: 270px; flex-basis: 270px; }
  .rise-process-list { max-height: none; }
}

/* Keep the pipeline compact: each stage gets its own scroll area instead of making the whole page very tall. */
@media (min-width: 721px) {
  .rise-process-content { padding: 10px 12px 16px; }
  .rise-process-toolbar { min-height: 108px; padding: 10px 7px 12px; gap: 8px; }
  .rise-process-board { height: calc(100vh - 275px); min-height: 400px; max-height: calc(100vh - 275px); padding-bottom: 6px; overflow-x: auto; overflow-y: hidden; }
  .rise-process-column { min-width: 250px; flex: 0 0 250px; height: 100%; min-height: 0; max-height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #9bb7bc transparent; }
  .rise-process-column-heading { position: sticky; z-index: 2; top: 0; min-height: 68px; padding: 12px; }
  .rise-process-column-heading h2 { margin-bottom: 6px; font-size: 14px; }
  .rise-process-column-heading span { padding: 5px 8px; font-size: 10px; }
  .rise-opportunity-card { min-height: 94px; margin-top: 8px; padding: 11px 10px 9px; }
  .rise-opportunity-name { font-size: 13px; line-height: 1.3; }
  .rise-opportunity-meta { min-height: 24px; gap: 9px; font-size: 15px; }
  .rise-opportunity-meta a, .rise-opportunity-meta button { font-size: 16px; }
  .rise-opportunity-avatar { width: 23px; height: 23px; }
}

@media (max-width: 720px) {
  .rise-process-board { height: auto; min-height: 500px; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .rise-process-column { height: auto; max-height: none; overflow-y: visible; }
}
.message-bubble.unread-message {
  border-color: rgba(29, 101, 126, 0.45);
  box-shadow: 0 0 0 2px rgba(29, 101, 126, 0.08);
}

.message-unread-label {
  color: #1d657e;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Compact patient welcome banner with a clear conversation action. */
.welcome-banner {
  min-height: 112px;
  padding: 20px 30px;
}

.welcome-banner h2 {
  font-size: 26px;
  white-space: nowrap;
}

.welcome-banner-actions {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.welcome-banner-actions .button {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .welcome-banner {
    min-height: auto;
    padding: 24px 20px;
    align-items: flex-start;
  }

  .welcome-banner h2 {
    white-space: normal;
  }

  .welcome-banner-actions,
  .welcome-banner-actions .button {
    width: 100%;
  }
}

/* Keep both sides of a conversation visually balanced. */
.message-bubble,
.staff-message,
.crm-message {
  width: min(62%, 520px);
  max-width: 62%;
}

.message-bubble:not(.from-patient),
.staff-message:not(.from-staff),
.crm-message:not(.from-staff) {
  border: 1px solid #d5e5e1;
  background: #d9ebe6;
}

.crm-message.from-staff,
.staff-message.from-staff {
  border-color: #c5ddf5;
  background: #cfe3f7;
  color: #1f3852;
}

@media (max-width: 720px) {
  .message-bubble,
  .staff-message,
  .crm-message {
    width: 94%;
    max-width: 94%;
  }
}

/* Prevent chat overflow and keep the avatar visible inside the message area. */
.message-list,
.staff-message-list,
.crm-message-list {
  overflow-x: hidden;
}

.message-bubble,
.staff-message,
.crm-message {
  box-sizing: border-box;
  width: min(54%, 440px);
  max-width: 54%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-bubble.from-patient {
  padding-right: 48px;
}

.message-avatar {
  right: 8px;
  bottom: 8px;
}

@media (max-width: 720px) {
  .message-bubble,
  .staff-message,
  .crm-message {
    width: calc(100% - 4px);
    max-width: calc(100% - 4px);
  }
}

/* Make the message composer clearly visible and easy to find. */
.message-composer,
.staff-message-composer,
.crm-composer {
  border: 1px solid #b7d9d1;
  border-radius: 9px;
  background: #edf8f4;
  box-shadow: 0 5px 16px rgba(32, 91, 82, .08);
}

.message-composer textarea,
.staff-message-composer textarea,
.crm-composer textarea {
  border: 2px solid #86bdb2;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(25, 72, 65, .06);
}

.message-composer textarea:focus,
.staff-message-composer textarea:focus,
.crm-composer textarea:focus {
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px rgba(62, 126, 114, .14);
}

/* Keep registration/profile fields compact: label on the left, control on the right. */
.field-label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(105px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 10px;
}

.field-label-text {
  min-width: 0;
}

.field-label input,
.field-label select,
.field-label textarea {
  grid-column: 2;
}

.field-error {
  grid-column: 2;
}

.password-input-wrap {
  min-width: 0;
  grid-column: 2;
  position: relative;
}

.password-input-wrap input {
  grid-column: auto;
  padding-right: 42px;
}

.password-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  position: absolute;
  top: 4px;
  right: 4px;
  border: 0;
  border-radius: 3px;
  color: #66827d;
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--teal-dark);
  background: #eef6f2;
}

.field-hint {
  grid-column: 2;
  color: #8aa09c;
  font-size: 10px;
  font-weight: 400;
}

@media (max-width: 720px) {
  .field-label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .field-label input,
  .field-label select,
  .field-label textarea,
  .field-error {
    grid-column: auto;
  }

  .password-input-wrap,
  .field-hint {
    width: 100%;
    grid-column: auto;
  }
}

.rise-agent-shell .rise-title-actions .rise-action-button:nth-child(2) { font-size: 0; }
.rise-agent-shell .rise-title-actions .rise-action-button:nth-child(2)::after { content: '＋ Add Patient'; font-size: 14px; }
button[hidden] { display: none !important; }
.rise-agent-sidebar .rise-agent-nav > .staff-hidden-nav-item,
.rise-agent-sidebar .rise-agent-nav > .rise-nav-divider { display: none !important; }
.rise-agent-sidebar .rise-agent-nav > .staff-sidebar-documents { display: flex !important; visibility: visible !important; opacity: 1 !important; }

/* Admin staff editing: keep the inline editor full-width and prevent the
   compact field layout from collapsing inside the staff-account grid. */
.admin-staff-row > .admin-staff-edit-form {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  grid-column: 1 / -1 !important;
}

.admin-staff-edit-form .form-grid.two-columns {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-staff-edit-form .field-label {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(100px, .78fr) minmax(0, 1.22fr);
  align-items: center;
}

.admin-staff-edit-form .field-label-text {
  white-space: normal;
  line-height: 1.25;
}

.admin-staff-edit-form .field-label input,
.admin-staff-edit-form .field-label select,
.admin-staff-edit-form .password-input-wrap,
.admin-staff-edit-form .field-hint,
.admin-staff-edit-form .field-error {
  min-width: 0;
  width: 100%;
}

.admin-staff-edit-form .admin-inline-button,
.admin-staff-edit-form .button,
.admin-staff-actions .admin-inline-button {
  appearance: none;
  border-radius: 4px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
}

.admin-staff-edit-form .admin-inline-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #b9d1cb;
  color: var(--teal-dark);
  background: #eef8f3;
}

.admin-staff-edit-form .admin-inline-button:hover {
  border-color: var(--teal);
  background: var(--mint);
}

.admin-staff-edit-form .button {
  width: auto;
  min-width: 180px;
  min-height: 42px;
  margin-top: 1px;
  padding: 0 18px;
  border: 0;
  color: var(--white);
  background: var(--teal-dark);
  font-size: 11px;
}

@media (max-width: 720px) {
  .admin-staff-edit-form .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .admin-staff-edit-form .field-label {
    display: grid;
    grid-template-columns: minmax(105px, .78fr) minmax(0, 1.22fr);
  }
}
.rise-agent-sidebar .brand-logo { width: 120px; }
.rise-sidebar-toggle { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border: 1px solid #78c85a; border-radius: 50%; color: #132628; background: #a6ed78; box-shadow: 0 0 0 3px rgba(166,237,120,.16), 0 3px 8px rgba(7,31,31,.22); font-size: 22px; line-height: 1; cursor: pointer; }
.rise-sidebar-toggle:hover { color: #132628; background: #c6ff9e; box-shadow: 0 0 0 4px rgba(166,237,120,.24), 0 4px 10px rgba(7,31,31,.28); }

/* Compact staff navigation and patient-stage filters. */
.rise-agent-shell .rise-agent-sidebar { width: 210px; flex-basis: 210px; padding: 22px 11px 16px; transition: width .22s ease, flex-basis .22s ease, padding .22s ease; }
.rise-agent-nav { gap: 3px; }
.rise-agent-nav .nav-item { min-height: 41px; padding: 0 8px; border-radius: 5px; font-size: 17px; }
.rise-agent-nav .nav-item > span { gap: 10px; }
.rise-agent-nav .nav-item > span > b { font-size: 11px; }
.rise-agent-nav .nav-item > b { min-width: 18px; height: 18px; font-size: 9px; }
.rise-agent-nav .staff-sidebar-profile { margin-top: 3px; }
.rise-search-link { margin: 24px 0 17px; font-size: 17px; }
.rise-search-link { min-height: 40px; padding: 0 10px; border: 1px solid rgba(166,237,120,.48); border-radius: 6px; color: #fff; background: rgba(166,237,120,.14); box-shadow: 0 3px 9px rgba(7,31,31,.16); font-weight: 700; }
.rise-search-link span { font-size: 14px; letter-spacing: .01em; }
.rise-search-link small { display: none; }
.rise-profile-panel { min-width: 0; padding: 22px; }
.rise-profile-panel .patient-profile-page { max-width: 1180px; margin: 0 auto; }
.rise-smart-tabs { gap: 6px; margin: 0 0 8px; padding: 7px; border: 1px solid #d9e6e8; border-radius: 8px; background: #f1f7f7; box-shadow: 0 3px 10px rgba(27, 69, 77, .08); scrollbar-width: thin; scrollbar-color: #9bb9bd transparent; }
.rise-smart-tabs button { min-height: 36px; padding: 0 11px; border: 1px solid #8faeb3; border-radius: 6px; color: #274857; background: #fff; box-shadow: 0 1px 3px rgba(27, 69, 77, .08); font-size: 12px; font-weight: 600; transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease; }
.rise-smart-tabs button:hover { color: #143f4d; border-color: #8fc5bd; background: #f6fffa; box-shadow: 0 3px 7px rgba(27, 69, 77, .12); transform: translateY(-1px); }
.rise-smart-tabs button small { width: 21px; height: 21px; min-width: 21px; margin-left: 6px; padding: 0; display: inline-grid; place-items: center; border: 1px solid #9bcf85; border-radius: 50%; color: #173824; background: #d3edc3; opacity: 1; font-size: 10px; font-weight: 700; line-height: 1; }
.rise-smart-tabs button.active { color: #143127; border-color: #72bf56; background: #a6ed78; box-shadow: 0 3px 8px rgba(56, 112, 70, .24); font-weight: 700; }
.rise-smart-tabs button.active small { color: #173824; border-color: #78c85a; background: #fff; }
.rise-list-controls { position: relative; }
.rise-fields-popover { position: absolute; z-index: 80; top: calc(100% + 5px); right: 0; width: 235px; padding: 13px; display: flex; flex-direction: column; gap: 9px; border: 1px solid #8eabb0; border-radius: 7px; color: #203746; background: #fff; box-shadow: 0 10px 24px rgba(27, 69, 77, .18); }
.rise-fields-popover[hidden] { display: none; }
.rise-fields-popover strong { color: #173b4c; font-size: 12px; }
.rise-fields-popover > small { margin-top: -5px; color: #6b7e86; font-size: 10px; line-height: 1.35; }
.rise-fields-popover label { min-height: 27px; padding: 4px 5px; display: flex; align-items: center; gap: 8px; border-radius: 4px; color: #274857; background: #f6faf9; font-size: 11px; font-weight: 600; cursor: pointer; }
.rise-fields-popover label:hover { background: #eaf7e5; }
.rise-fields-popover input { width: 15px; height: 15px; accent-color: #65b84e; }
.rise-fields-popover input:disabled { opacity: .55; cursor: not-allowed; }
.rise-grid-note { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; color: #203746; font-size: 10px; font-weight: 600; }
.rise-grid-note + small { display: block; margin-top: 3px; color: #6b7e86; font-size: 8px; }
.rise-smart-tabs button:focus-visible { outline: 2px solid #2b7d91; outline-offset: 1px; }

.rise-pagination-top { min-height: 46px; margin: 0 0 8px; padding: 0 8px; border: 1px solid #c9dadd; border-radius: 7px; color: #355668; background: #f5faf9; box-shadow: 0 2px 8px rgba(27, 69, 77, .08); }
.rise-pagination { min-height: 48px; }
.rise-pagination label { padding: 6px 9px; font-size: 0; }
.rise-pagination label::after { content: '10 / page'; font-size: 11px; }
.rise-pagination button { min-width: 36px; height: 32px; font-size: 11px; }
.rise-view-more { min-width: 150px !important; padding: 0 16px !important; border-color: #28768a !important; color: #fff !important; background: #23758b !important; font-weight: 600; }
.rise-view-more:hover { background: #185c70 !important; }
.rise-view-more:disabled { color: #fff !important; background: #8aaeb5 !important; }
.rise-agent-main .rise-table-wrap { border: 1px solid #6f8f94; border-radius: 8px; box-shadow: 0 4px 14px rgba(27, 69, 77, .1); }
.rise-agent-main .rise-patient-table th,
.rise-agent-main .rise-patient-table td { border: 1px solid #b8cacc; }
.rise-agent-main .rise-patient-table td { color: #203746; }
.rise-agent-main .rise-patient-table .rise-contact-cell strong { color: #1d3443; font-weight: 600; }
.rise-agent-main .rise-patient-table .rise-phone-cell,
.rise-agent-main .rise-patient-table .rise-email-cell { color: #1d4050; }
.rise-agent-main .rise-patient-table th { color: #173b4c; background: #dcebed; border-color: #8eabb0; font-weight: 700; }
.rise-agent-main .rise-patient-table tbody tr:nth-child(even) td { background: #fbfdfd; }
.rise-agent-main .rise-patient-table tbody tr:hover td { background: #f1fbf3; }
.rise-agent-main .rise-patient-table tbody tr:has(input[type="checkbox"]:checked) td { background: #ddf5c9 !important; border-bottom-color: #a8d88c; }
.rise-agent-main .rise-patient-table tbody tr:has(input[type="checkbox"]:checked) .rise-contact-cell strong { color: #1d5130; font-weight: 700; }
.rise-agent-main .rise-pipeline-table th:nth-child(2),
.rise-agent-main .rise-pipeline-table td:nth-child(2) { width: 18%; }
.rise-agent-main .rise-pipeline-table td:nth-child(2) { white-space: normal; }
.rise-agent-main .rise-pipeline-table .rise-contact-cell,
.rise-agent-main .rise-pipeline-table .rise-contact-link { min-width: 0; max-width: 100%; }
.rise-agent-main .rise-pipeline-table .rise-contact-link { width: 100%; }
.rise-agent-main .rise-pipeline-table .rise-contact-cell strong { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.25; }
.rise-agent-main .rise-pipeline-table th:nth-child(3),
.rise-agent-main .rise-pipeline-table td:nth-child(3) { width: 14%; }
.rise-agent-main .rise-pipeline-table th:nth-child(4),
.rise-agent-main .rise-pipeline-table td:nth-child(4) { width: 20%; }
.rise-agent-main .rise-pipeline-table th:nth-child(5),
.rise-agent-main .rise-pipeline-table td:nth-child(5) { width: 11%; }
.rise-agent-main .rise-pipeline-table th:nth-child(6),
.rise-agent-main .rise-pipeline-table td:nth-child(6) { width: 14%; }
.rise-agent-main .rise-pipeline-table th:nth-child(7),
.rise-agent-main .rise-pipeline-table td:nth-child(7) { width: 11%; }
.rise-agent-main .rise-pipeline-table th:nth-child(8),
.rise-agent-main .rise-pipeline-table td:nth-child(8) { width: 12%; }
.rise-agent-main .rise-pipeline-table th[data-grid-field="last_seen"],
.rise-agent-main .rise-pipeline-table td[data-grid-field="last_seen"] { width: 10%; min-width: 104px; max-width: 150px; height: 48px !important; padding: 0 8px !important; overflow: hidden !important; position: relative; color: #1e5965; font-weight: 600; white-space: nowrap !important; vertical-align: middle !important; line-height: 18px !important; }
.rise-agent-main .rise-pipeline-table .rise-last-seen-value { position: relative; z-index: 1; display: block; width: 100%; max-width: 100%; height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 18px; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th:nth-child(2),
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td:nth-child(2) { width: 16% !important; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th:nth-child(3),
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td:nth-child(3) { width: 12% !important; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th:nth-child(4),
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td:nth-child(4) { width: 17% !important; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th:nth-child(5),
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td:nth-child(5) { width: 10% !important; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th:nth-child(6),
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td:nth-child(6) { width: 13% !important; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th:nth-child(7),
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td:nth-child(7) { width: 10% !important; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th:nth-child(8),
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td:nth-child(8) { width: 8% !important; }
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen th[data-grid-field="last_seen"],
.rise-agent-main .rise-pipeline-table.rise-grid-has-last-seen td[data-grid-field="last_seen"] { width: 14% !important; min-width: 0 !important; max-width: none !important; box-sizing: border-box; }
.rise-agent-main .rise-pipeline-table .rise-email-cell { width: 100%; max-width: none; overflow: hidden; text-overflow: ellipsis; }
.rise-agent-main .rise-pipeline-table .rise-column-resizer { position: absolute; z-index: 3; top: 0; right: -4px; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; }
.rise-agent-main .rise-pipeline-table .rise-column-resizer::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 2px; border-radius: 2px; background: transparent; }
.rise-agent-main .rise-pipeline-table th:hover .rise-column-resizer::after,
.rise-agent-main .rise-pipeline-table .rise-column-resizer:hover::after { background: #28768a; }

@media (min-width: 721px) {
  .rise-agent-main .rise-table-wrap { overflow-x: hidden; }
  .rise-agent-main .rise-pipeline-table { min-width: 0; table-layout: fixed; }
  .rise-agent-main .rise-pipeline-table th,
  .rise-agent-main .rise-pipeline-table td { height: 48px; padding: 0 8px; font-size: 11px; }
  .rise-agent-main .rise-pipeline-table th { height: 42px; font-size: 10px; }
  .rise-agent-main .rise-pipeline-table .rise-stage-cell { min-width: 0; gap: 2px; }
  .rise-agent-main .rise-pipeline-table .rise-stage-select,
  .rise-agent-main .rise-pipeline-table .rise-followup-input { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .rise-agent-main .rise-pipeline-table .rise-email-cell { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

.rise-agent-main .rise-pipeline-table td:nth-child(3),
.rise-agent-main .rise-pipeline-table td:nth-child(4),
.rise-agent-main .rise-pipeline-table td:nth-child(5),
.rise-agent-main .rise-pipeline-table .rise-phone-cell,
.rise-agent-main .rise-pipeline-table .rise-email-cell { font-size: 12px; }
.rise-agent-main .rise-pipeline-table .rise-phone-cell,
.rise-agent-main .rise-pipeline-table .rise-email-cell { font-size: 13px; font-weight: 700; color: #1b3048; }

@media (min-width: 721px) {
  .rise-agent-shell.sidebar-collapsed .rise-agent-sidebar { width: 72px; flex-basis: 72px; padding: 18px 8px 14px; }
  .rise-agent-shell.sidebar-collapsed .rise-agent-sidebar .sidebar-top { padding: 0; justify-content: center; }
  .rise-agent-shell.sidebar-collapsed .rise-agent-sidebar .brand { display: none; }
  .rise-agent-shell.sidebar-collapsed .rise-search-link { justify-content: center; margin: 28px 0 18px; padding: 0; font-size: 19px; }
  .rise-agent-shell.sidebar-collapsed .rise-search-link span,
  .rise-agent-shell.sidebar-collapsed .rise-search-link small,
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .nav-item > span > b,
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .nav-item small,
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .rise-nav-divider { display: none; }
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .nav-item { justify-content: center; padding: 0; position: relative; font-size: 20px; }
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .nav-item > span { gap: 0; }
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .nav-item > b { position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; font-size: 8px; }
  .rise-agent-shell.sidebar-collapsed .rise-settings-link { justify-content: center; }
  .rise-agent-shell.sidebar-collapsed .rise-settings-link span { gap: 0; }
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .nav-item[data-tooltip]::after,
  .rise-agent-shell.sidebar-collapsed .rise-search-link[data-tooltip]::after { content: attr(data-tooltip); position: absolute; z-index: 120; left: calc(100% + 10px); top: 50%; min-width: max-content; padding: 7px 10px; transform: translateY(-50%) translateX(-4px); opacity: 0; visibility: hidden; border: 1px solid rgba(20, 48, 55, .12); border-radius: 5px; color: #17383b; background: #fff; box-shadow: 0 7px 18px rgba(16, 37, 40, .18); font-size: 11px; font-weight: 600; pointer-events: none; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
  .rise-agent-shell.sidebar-collapsed .rise-agent-nav .nav-item[data-tooltip]:hover::after,
  .rise-agent-shell.sidebar-collapsed .rise-search-link[data-tooltip]:hover::after { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
  .rise-agent-shell.sidebar-collapsed .rise-search-link { position: relative; }
}
.staff-add-patient-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: rgba(16, 37, 40, .5); }
.staff-add-patient-dialog { width: min(760px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; padding: 28px 30px 30px; border: 1px solid #dfe4e8; border-radius: 8px; color: #1a3048; background: #fff; box-shadow: 0 24px 70px rgba(16, 37, 40, .25); }
.staff-add-patient-heading { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.staff-add-patient-heading h2 { margin: 0 0 7px; color: #172d43; font-family: 'Poppins', Arial, sans-serif; font-size: 26px; font-weight: 600; }
.staff-add-patient-heading p:not(.eyebrow) { max-width: 500px; margin: 0; color: #6e7d89; font-size: 12px; line-height: 1.55; }
.staff-add-patient-close { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #536477; background: #f1f4f6; font-size: 21px; line-height: 1; }
.staff-add-patient-dialog .portal-form { gap: 14px; }
.staff-add-patient-dialog .full-button { margin-top: 3px; }

@media (max-width: 720px) {
  .staff-add-patient-overlay { padding: 12px; }
  .staff-add-patient-dialog { max-height: calc(100vh - 24px); padding: 22px 18px 20px; }
  .staff-add-patient-heading { margin-bottom: 18px; }
}

/* Conversation workspace refresh: clearer inbox, chat area and always-visible composer. */
.staff-crm-workspace .staff-inbox-toolbar { display: none; }
.staff-crm-workspace {
  border-color: #c8d6e2;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(31, 63, 89, .10);
}
.staff-inbox-toolbar {
  min-height: 70px;
  background: linear-gradient(110deg, #f8fbff 0%, #eef6fb 100%);
}
.staff-inbox-toolbar h2 { color: #163d56; font-size: 21px; font-weight: 700; }
.staff-inbox-toolbar p { color: #657c90; font-size: 11px; }
.staff-inbox-tools button { width: 36px; height: 36px; border: 1px solid #c8d7e3; border-radius: 8px; color: #1e5f78; background: #fff; }
.staff-inbox-tabs { min-height: 58px; gap: 25px; background: #f3f8fc; }
.staff-inbox-tabs button { min-height: 46px; color: #5c7285; font-size: 13px; font-weight: 500; }
.staff-inbox-tabs button.active { color: #155b76; font-weight: 700; }
.staff-inbox-tabs button.active::after { height: 3px; border-radius: 3px 3px 0 0; background: #1e7990; }
.staff-inbox-tabs button b { border-radius: 50%; background: #247b94; }
.staff-inbox-actions { min-height: 60px; background: #fff; }
.staff-inbox-actions form { width: 280px; height: 38px; border-color: #b9ccd9; border-radius: 9px; box-shadow: inset 0 1px 2px rgba(34, 74, 99, .05); }
.staff-inbox-actions form input { font-size: 12px; }
.staff-crm-body { background: #eaf1f6; }
.staff-crm-body .crm-thread-list { background: #f8fbfd; border-right-color: #cbd9e3; }
.crm-thread-item { min-height: 84px; padding: 12px 13px; border-bottom-color: #dce6ed; }
.crm-thread-item:hover { background: #edf7fb; }
.crm-thread-item.active {
  border-left: 5px solid #1e7890;
  padding-left: 10px;
  background: #dff2f5;
  box-shadow: inset 0 0 0 1px #acd2dc;
}
.crm-thread-item.active .crm-thread-copy strong { color: #104d63; }
.crm-thread-item .admin-avatar { width: 38px; height: 38px; font-size: 10px; }
.crm-thread-copy strong { color: #203c53; font-size: 12px; font-weight: 700; }
.crm-thread-copy small { margin-top: 6px; color: #60788b; font-size: 10px; }
.crm-thread-copy em { margin-top: 6px; color: #8a9eac; font-size: 9px; }
.crm-unread-count, .crm-read-status { font-size: 9px; }
.crm-conversation-view { background: #edf4f8; }
.crm-conversation-heading { min-height: 74px; border-bottom-color: #cbd9e3; box-shadow: 0 2px 8px rgba(31, 63, 89, .05); }
.crm-person-heading .admin-avatar { width: 40px; height: 40px; font-size: 10px; }
.crm-person-heading strong { color: #163d56; font-size: 14px; font-weight: 700; }
.crm-person-heading small { color: #6e8596; font-size: 10px; }
.crm-conversation-actions button { border: 1px solid transparent; border-radius: 8px; }
.crm-message-list { padding: 22px 24px; gap: 16px; background: linear-gradient(180deg, #edf4f8 0%, #e8f1f6 100%); }
.crm-message {
  align-self: flex-start;
  width: min(68%, 510px);
  max-width: 68%;
  padding: 13px 16px;
  border-color: #cbdbe4;
  border-radius: 7px 16px 16px 16px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(31, 63, 89, .08);
}
.crm-message.from-staff {
  align-self: flex-end;
  border-color: #a8c8e5;
  border-radius: 16px 7px 16px 16px;
  background: #c7def2;
  color: #173b58;
}
.crm-message .message-meta { margin-bottom: 7px; }
.crm-message .message-meta strong { color: inherit; font-size: 11px; font-weight: 700; }
.crm-message .message-meta span { font-size: 10px; }
.crm-message .message-meta .crm-message-time { color: #728797; font-size: 10px; white-space: nowrap; }
.crm-message.from-staff .message-meta .crm-message-time { color: #52718a; }
.crm-message p { color: inherit; font-size: 14px; line-height: 1.65; }
.crm-message[data-chat-day] {
  position: relative;
  margin-top: 29px;
}
.crm-message[data-chat-day]::before {
  content: attr(data-chat-day);
  position: absolute;
  z-index: 1;
  top: -28px;
  left: 50%;
  padding: 6px 12px;
  transform: translateX(-50%);
  border: 1px solid #cbdce5;
  border-radius: 14px;
  color: #587284;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 2px 7px rgba(31, 63, 89, .07);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.crm-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  min-height: 84px;
  margin: 0 12px 12px;
  padding: 11px;
  gap: 9px;
  border: 1px solid #8fbdb6;
  border-radius: 12px;
  background: #f8fffc;
  box-shadow: 0 6px 18px rgba(29, 85, 78, .15);
}
.crm-compose-icon { width: 42px; min-width: 42px; height: 42px; border: 1px solid #76aaa3; border-radius: 50%; color: #1d716d; background: #e7f8f3; font-size: 19px; line-height: 1; cursor: pointer; }
.crm-compose-icon:hover,
.crm-compose-icon.attachment-open { color: #fff; background: #277b78; box-shadow: 0 0 0 3px rgba(39, 123, 120, .14); }
.crm-composer textarea {
  min-height: 50px;
  padding: 12px 13px;
  border: 2px solid #79aea5;
  border-radius: 8px;
  background: #fff;
  color: #173c4a;
  font-size: 12px;
}
.crm-composer textarea::placeholder { color: #789099; }
.crm-composer .button { min-height: 46px; padding: 0 18px; border-radius: 8px; background: #1b706f; font-size: 11px; }

@media (min-width: 1181px) {
  .staff-crm-body {
    height: clamp(520px, calc(100vh - 230px), 780px);
    min-height: 0;
  }
  .staff-crm-body .crm-thread-list,
  .crm-conversation-view,
  .staff-contact-panel { height: 100%; }
}

@media (max-width: 720px) {
  .crm-message { width: calc(100% - 4px); max-width: calc(100% - 4px); }
  .crm-message-list { padding: 16px 12px; }
  .crm-message p { font-size: 13px; }
  .crm-composer { margin: 0 8px 8px; }
}

/* Secure conversation attachments and patient documents. */
.crm-composer,
.message-composer { flex-wrap: wrap; }
.attachment-composer-tools {
  order: -1;
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 5px 6px 8px;
  border-bottom: 1px solid #d8e8e6;
}
.attachment-composer-tools:not(.is-open) { display: none; }
.attachment-composer-tools.voice-mode > .attachment-choose-button,
.attachment-composer-tools.voice-mode > .attachment-selected-file,
.attachment-composer-tools.voice-mode > .attachment-send-button { display: none; }
.attachment-file-input { display: none; }
.attachment-choose-button,
.attachment-send-button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #78aaa3;
  border-radius: 7px;
  color: #176460;
  background: #eaf9f5;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.attachment-send-button { color: #fff; border-color: #277e78; background: #277e78; }
.attachment-choose-button:disabled,
.attachment-send-button:disabled { cursor: not-allowed; opacity: .5; }
.attachment-category-select {
  max-width: 190px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid #b9d1cd;
  border-radius: 7px;
  color: #315a5a;
  background: #fff;
  font-family: inherit;
  font-size: 10px;
}
.attachment-selected-file {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 230px;
  min-height: 30px;
  padding: 0 8px 0 32px;
  overflow: hidden;
  border-radius: 6px;
  color: #6c8585;
  background-color: #f4f8f7;
  background-position: 7px center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-selected-file.has-preview { color: #285c5b; font-weight: 600; }
.message-attachment-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  width: min(100%, 330px);
  margin-top: 10px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #c5d9df;
  border-radius: 9px;
  color: #21475b;
  background: rgba(255, 255, 255, .9);
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(31, 63, 89, .08);
}
.crm-message.from-staff .message-attachment-card { border-color: #a3c5dd; background: rgba(244, 250, 255, .88); }
.message-attachment-card img { width: 62px; height: 54px; flex: 0 0 62px; object-fit: cover; border-radius: 6px; }
.attachment-file-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 7px; color: #277b78; background: #def3ee; font-size: 20px; }
.attachment-file-info { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.attachment-file-info strong { overflow: hidden; color: #21475b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-file-info small { color: #708993; font-size: 9px; }
.attachment-inline-save { flex: 0 0 auto; padding: 4px 6px; border-radius: 5px; color: #1b716e; background: #e4f5f0; font-size: 9px; font-weight: 700; text-decoration: none; }
.attachment-file-to-documents { flex: 1 0 100%; padding: 7px 8px; border: 1px solid #9bc4ba; border-radius: 6px; color: #1d6965; background: #e8f7f2; font-family: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
.attachment-file-to-documents:hover { color: #fff; background: #277b78; }
.attachment-save-controls { display: flex; flex: 1 0 100%; align-items: center; gap: 6px; }
.attachment-document-category { min-width: 0; flex: 1; padding: 7px 6px; border: 1px solid #a8c8c0; border-radius: 6px; color: #315d5a; background: #fff; font-family: inherit; font-size: 9px; }
.attachment-save-status { color: #6e8588; font-size: 9px; }
.attachment-confirm-save { padding: 7px 9px; border: 0; border-radius: 6px; color: #fff; background: #277b78; font-family: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
.attachment-confirm-save:disabled { opacity: .6; cursor: wait; }
.attachment-filed-status { flex: 1 0 100%; padding: 6px 8px; border-radius: 6px; color: #266a58; background: #e6f6ee; font-size: 9px; font-weight: 700; }
.attachment-lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: rgba(8, 28, 40, .74); }
.attachment-lightbox-panel { position: relative; display: flex; width: min(920px, 100%); max-height: calc(100vh - 48px); flex-direction: column; gap: 10px; padding: 20px; overflow: hidden; border-radius: 14px; color: #173b50; background: #fff; box-shadow: 0 20px 70px rgba(0, 0, 0, .3); }
.attachment-lightbox-panel > strong { padding-right: 36px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-lightbox-close { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; color: #315468; background: #edf4f6; font-size: 22px; line-height: 1; cursor: pointer; }
.attachment-lightbox-content { display: grid; min-height: 140px; max-height: calc(100vh - 160px); place-items: center; overflow: auto; border-radius: 9px; background: #f2f6f8; }
.attachment-lightbox-content img { display: block; max-width: 100%; max-height: calc(100vh - 180px); object-fit: contain; }
.attachment-lightbox-content iframe { width: 100%; height: min(650px, calc(100vh - 180px)); border: 0; }
.attachment-lightbox-content p { padding: 30px; color: #637b88; font-size: 12px; text-align: center; }
.attachment-save-link { align-self: flex-end; padding: 8px 12px; border-radius: 7px; color: #fff; background: #1c7376; font-size: 11px; font-weight: 700; text-decoration: none; }
.crm-details-toggle { width: calc(100% - 24px); margin: 10px 12px 0; padding: 9px 10px; border: 1px solid #c8d9e3; border-radius: 7px; color: #1d6078; background: #f5fafc; font-family: inherit; font-size: 10px; font-weight: 700; text-align: left; cursor: pointer; }
.staff-contact-details[hidden] { display: none; }
.crm-documents-panel { margin: 12px; padding: 12px; border: 1px solid #c8d9e3; border-radius: 10px; background: #f7fbfd; }
.crm-documents-heading { display: flex; flex-direction: column; gap: 3px; padding-bottom: 2px; }
.crm-documents-toggle { width: 100%; padding: 7px 8px; border: 1px solid #c8d9e3; border-radius: 7px; color: #1b5068; background: #fff; font-family: inherit; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.crm-documents-toggle:hover { border-color: #78aaa3; background: #eef8f7; }
.crm-documents-heading strong { color: #1b5068; font-size: 12px; }
.crm-documents-heading small { color: #78909d; font-size: 9px; }
.crm-document-category { border-top: 1px solid #d9e6ec; }
.crm-document-category summary { padding: 9px 2px; color: #28566c; cursor: pointer; font-size: 10px; font-weight: 700; list-style-position: inside; }
.crm-document-row { display: flex; align-items: center; width: 100%; gap: 7px; padding: 7px 3px; border-top: 1px solid #e3edf1; color: #31586b; background: transparent; font-family: inherit; text-align: left; }
.crm-document-row:hover { border-radius: 5px; background: #e8f4f7; }
.crm-document-preview { display: flex; min-width: 0; flex: 1; align-items: center; gap: 7px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.crm-document-preview:hover { color: #1b716e; }
.crm-document-category-select { width: 106px; min-width: 106px; padding: 5px 4px; border: 1px solid #b9d1cd; border-radius: 5px; color: #315d5a; background: #fff; font-family: inherit; font-size: 8px; }
.crm-document-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 5px; color: #277b78; background: #dff3ed; font-size: 13px; }
.crm-document-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.crm-document-copy strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.crm-document-copy small { color: #8296a0; font-size: 8px; }
.crm-profile-phone { color: #78909d; }
.crm-documents-empty { margin: 5px 0 2px; color: #8296a0; font-size: 10px; }
.crm-document-fallback-list { display: grid; gap: 4px; }
.crm-document-fallback-list .crm-document-row { border-top: 1px solid #e3edf1; }

/* Patient documents must remain visible in the staff profile panel, even when the
   panel is scrolled or a document request returns an empty list. */
.staff-contact-panel .crm-documents-panel {
  display: block !important;
  visibility: visible !important;
  position: relative;
  z-index: 2;
  min-height: 54px;
}
.staff-contact-panel .crm-documents-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.staff-contact-panel .crm-documents-toggle span { flex: 1; }
.staff-contact-panel .crm-documents-toggle b { min-width: 22px; padding: 2px 6px; border-radius: 999px; color: #fff; background: #2585a9; text-align: center; }
.staff-contact-panel .crm-documents-content,
.staff-contact-panel .crm-documents-content * { visibility: visible !important; opacity: 1 !important; }
.staff-contact-panel .crm-documents-panel .crm-documents-content {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.staff-contact-panel .crm-documents-panel details.crm-document-category,
.staff-contact-panel .crm-documents-panel details.crm-document-category[open] {
  display: block !important;
  height: auto !important;
  visibility: visible !important;
}
.staff-contact-panel .crm-documents-panel details.crm-document-category > .crm-document-row {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.staff-contact-panel .crm-documents-content .crm-document-category { display: block !important; min-height: 34px; }
.staff-contact-panel .crm-documents-content .crm-document-category summary { display: block !important; min-height: 28px; }
.staff-contact-panel .crm-documents-content .crm-document-row { display: flex !important; min-height: 34px; }

@media (max-width: 720px) {
  .attachment-composer-tools { flex-wrap: wrap; }
  .attachment-category-select { flex: 1 1 145px; max-width: none; }
  .attachment-selected-file { order: 3; flex: 1 1 100%; max-width: none; }
  .attachment-lightbox { padding: 10px; }
  .attachment-lightbox-panel { max-height: calc(100vh - 20px); padding: 14px; }
}

/* Keep the active conversation tall enough to show the newest message and its attachment. */
.staff-crm-body { min-height: 720px; }
.staff-crm-body .crm-thread-list,
.crm-conversation-view,
.staff-contact-panel { height: 720px; }
.crm-conversation-view { display: flex; min-height: 0; flex-direction: column; }
.crm-message-list { min-height: 0; }
@media (min-width: 1181px) {
  .staff-crm-body { height: clamp(520px, calc(100vh - 230px), 780px); }
  .staff-crm-body .crm-thread-list,
  .crm-conversation-view,
  .staff-contact-panel { height: 100%; }
}
@media (max-width: 720px) {
  .staff-crm-body { min-height: 0; }
  .crm-conversation-view { min-height: 700px; height: 700px; }
}

/* Conversation colors: patient messages are light blue and care-team messages are light green. */
.message-bubble:not(.from-patient),
.staff-message:not(.from-staff),
.crm-message:not(.from-staff) {
  border-color: #b9d7ef;
  color: #214766;
  background: #dceeff;
}
.message-bubble.from-patient,
.staff-message.from-staff,
.crm-message.from-staff {
  border-color: #e5cf8b;
  color: #5d4b20;
  background: #fff3c4;
}

/* Keep the complete conversation area clean and white behind the message bubbles. */
.message-list,
.staff-message-list,
.crm-message-list,
.crm-conversation-view {
  background: #fff;
}

/* WhatsApp-style day separators for patient and care-team conversations. */
.crm-chat-date-separator {
  align-self: center;
  margin: 5px 0 2px;
  padding: 5px 11px;
  border: 1px solid #d9e4e8;
  border-radius: 999px;
  color: #607883;
  background: #f1f5f6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Keep the patient and care-team profile photos visible inside each chat bubble. */
.crm-message {
  position: relative;
}
.crm-message:not(.from-staff) {
  padding-left: 52px;
}
.crm-message.from-staff {
  padding-right: 52px;
}
.crm-chat-avatar {
  position: absolute;
  bottom: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #1b5068;
  background: #dceee8;
  font-size: 9px;
  font-weight: 700;
}
.crm-chat-avatar.from-patient {
  left: 10px;
}
.crm-chat-avatar.from-staff {
  right: 10px;
  color: #67551c;
  background: #f1dc8a;
}
.crm-chat-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.message-bubble:not(.from-patient) {
  position: relative;
  padding-left: 52px;
}
.message-bubble:not(.from-patient) .crm-chat-avatar.from-staff {
  right: auto;
  left: 10px;
}

/* Keep the staff portal focused on conversations for now. */
.staff-conversation-title .staff-conversation-tab:not(.active) {
  display: none;
}

/* Voice messages: record first, preview, then send. */
.voice-record-trigger {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #9bc5bd;
  border-radius: 50%;
  color: #176460;
  background: #edf9f5;
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: .18s ease;
}
.voice-record-trigger:hover,
.voice-record-trigger.has-recording { color: #fff; border-color: #277e78; background: #277e78; box-shadow: 0 0 0 3px rgba(39, 126, 120, .14); }
.voice-record-trigger.is-recording { color: #fff; border-color: #bd5757; background: #bd5757; animation: voice-record-pulse 1.25s ease-in-out infinite; }
.voice-record-trigger:disabled { cursor: wait; opacity: .6; }
@keyframes voice-record-pulse { 50% { box-shadow: 0 0 0 7px rgba(189, 87, 87, .16); } }
.voice-message-panel {
  display: flex;
  flex: 1 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 7px 0 2px;
}
.voice-message-panel[hidden] { display: none; }
.voice-message-status { min-width: 0; flex: 1 1 180px; color: #547776; font-size: 10px; font-weight: 700; }
.voice-message-preview { width: min(100%, 260px); min-width: 0; height: 34px; flex: 1 1 220px; }
.voice-message-send,
.voice-message-discard {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #277e78;
  border-radius: 7px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.voice-message-send { color: #fff; background: #277e78; }
.voice-message-discard { color: #8a5555; border-color: #dfb5b5; background: #fff4f4; }
.voice-message-send:disabled,
.voice-message-discard:disabled { cursor: not-allowed; opacity: .5; }
.message-attachment-card.audio-attachment { align-items: center; cursor: default; }
.has-audio-attachment > p { display: none; }
.message-audio-player { width: min(100%, 270px); height: 38px; flex: 1 1 210px; }
.attachment-preview-audio { width: min(100%, 520px); height: 52px; }
.dashboard-grid > .conversations-card { margin-top: 0; }

/* Give the patient conversation more room while keeping the profile card beside it. */
@media (min-width: 721px) {
  .patient-portal-shell .dashboard-grid { grid-template-columns: minmax(0, 1.85fr) minmax(285px, .9fr); }
  .patient-portal-shell .dashboard-grid > .conversations-card { min-height: 430px; }
  .patient-portal-shell .conversations-card .conversation-body { min-height: 245px; }
  .patient-portal-shell .conversations-card .message-list { min-height: 215px; max-height: 380px; gap: 14px; }
  .patient-portal-shell .conversations-card .message-bubble { width: min(66%, 520px); max-width: 66%; padding: 14px 17px; }
  .patient-portal-shell .conversations-card .message-meta strong,
  .patient-portal-shell .conversations-card .message-meta span { font-size: 10px; }
  .patient-portal-shell .conversations-card .message-bubble p { font-size: 12px; line-height: 1.55; }
}

@media (max-width: 720px) {
  .patient-portal-shell .conversations-card .message-bubble p { font-size: 12px; }
}

/* Improve readability of patient portal chat text. */
.patient-portal-shell .conversations-card .message-bubble p { font-size: 13.5px; line-height: 1.6; }

/* Slightly wider patient bubbles and readable attachment status text. */
@media (min-width: 721px) {
  .patient-portal-shell .conversations-card .message-bubble { width: min(72%, 560px); max-width: 72%; }
  .patient-portal-shell .conversations-card .message-attachment-card { width: 100%; max-width: 100%; box-sizing: border-box; overflow: visible; }
  .patient-portal-shell .conversations-card .attachment-file-info { overflow: visible; }
  .patient-portal-shell .conversations-card .attachment-file-info small { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
}

/* Staff conversation workspace: full-height inbox, chat and patient profile. */
.staff-conversation-content { padding-bottom: 12px; }
.staff-conversation-page-heading-compact { min-height: 66px; padding: 0 22px; }
.staff-conversation-page-heading-compact h1 { display: flex; align-items: center; gap: 10px; color: #123b53; font-size: 22px; font-weight: 700; }
.staff-conversation-page-heading-compact h1 span { min-width: 25px; height: 25px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; color: #fff; background: #2879e7; font-size: 11px; }
.staff-conversation-page-heading-compact small { display: block; margin-top: 3px; color: #758b9a; font-size: 10px; }
.staff-live-indicator { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #bce4d1; border-radius: 999px; color: #27734f; background: #effbf4; font-size: 10px; font-weight: 700; }
.staff-live-indicator i, .crm-online-badge i, .crm-profile-status i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #19b66b; }
.staff-conversation-notice:empty { display: none; }
.staff-crm-workspace { height: calc(100vh - 146px); min-height: 0; margin: 10px 12px 0; border-color: #c7d8e2; border-radius: 16px; box-shadow: 0 10px 30px rgba(24, 67, 91, .10); }
.staff-crm-body { height: 100%; min-height: 0; grid-template-columns: 285px minmax(460px, 1fr) 320px; background: #eaf2f7; }
.staff-inbox-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #c6cdd3; background: #e8ecef; }
.staff-inbox-column .staff-inbox-toolbar { min-height: 70px; flex: 0 0 70px; padding: 0 16px; background: linear-gradient(135deg, #f9fcff, #edf6fb); }
.staff-inbox-toolbar h2 { display: flex; align-items: center; gap: 7px; font-size: 18px; }
.staff-inbox-toolbar h2 b { min-width: 25px; height: 25px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: #2879e7; font-size: 10px; }
.staff-inbox-toolbar p { font-size: 10px; }
.staff-inbox-actions { min-height: 57px; padding: 10px 13px; flex: 0 0 57px; }
.staff-inbox-actions form { width: 100%; height: 36px; border-color: #c4d6e1; border-radius: 9px; }
.staff-inbox-actions form input { font-size: 10px; }
.staff-inbox-tabs { min-height: 50px; padding: 0 14px; gap: 16px; align-items: end; flex: 0 0 50px; overflow-x: auto; }
.staff-inbox-tabs button { min-height: 40px; color: #4d5a64; font-size: 11px; font-weight: 700; }
.staff-inbox-select-all { min-height: 42px; padding: 0 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #dce6ed; color: #647c8c; background: #fff; font-size: 10px; }
.staff-inbox-select-all input { width: 15px; height: 15px; accent-color: #2879e7; }
.staff-inbox-column .crm-thread-list { height: auto !important; max-height: none; min-height: 0; flex: 1; border-right: 0; background: #e8ecef; }
.crm-thread-item { grid-template-columns: 18px 40px minmax(0, 1fr) auto 18px; min-height: 88px; padding: 13px 12px; }
.crm-thread-item { border-bottom-color: #cbd2d7; background: #e8ecef; }
.crm-thread-item:hover { background: #dfe5e8; }
.crm-thread-copy strong { color: #3c4852; }
.crm-thread-copy small { color: #5e6c76; }
.crm-thread-copy em { color: #7a878f; }
.crm-thread-item .admin-avatar { width: 40px; height: 40px; }
.crm-thread-copy small { max-width: 175px; }
.crm-thread-item.active { border-left-width: 5px; padding-left: 10px; }
.crm-read-status.unread { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; font-size: 9px; }
.crm-read-status.read { padding: 5px 7px; border-radius: 999px; font-size: 8px; }
.crm-conversation-view { height: auto !important; min-height: 0; border-right: 1px solid #cedce5; background: #fff; }
.crm-conversation-view { overflow-y: auto; }
.crm-documents-side-hidden { display: none !important; }
.crm-documents-side-content-hidden .crm-documents-content { display: none !important; }
.crm-documents-under-chat { flex: 0 0 auto; margin: 0 12px 12px; border-color: #b8d2df; box-shadow: 0 5px 16px rgba(24, 67, 91, .08); }
.crm-documents-under-chat { display: none !important; }
.crm-documents-under-chat .crm-documents-content { display: block !important; }
.crm-document-category-flat { display: block !important; padding-bottom: 5px; }
.crm-document-category-title { display: block; padding: 9px 2px 6px; color: #28566c; font-size: 10px; }
.crm-conversation-heading { min-height: 82px; flex: 0 0 82px; padding: 0 20px; }
.crm-person-heading { gap: 12px; }
.crm-person-heading .admin-avatar { width: 45px; height: 45px; }
.crm-person-name-row { display: flex; align-items: center; gap: 9px; }
.crm-person-name-row strong { font-size: 15px; }
.crm-online-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; color: #218654; background: #e6f8ee; font-size: 9px; font-weight: 700; }
.crm-online-badge.is-offline { color: #687985; background: #eef2f4; }
.crm-online-badge.is-offline i { background: #9aa8af; }
.crm-person-heading small { font-size: 10px; }
.crm-conversation-actions button { width: 35px; height: 35px; border: 1px solid #d5e2e9; border-radius: 9px; color: #265d78; background: #fff; font-size: 16px; }
.crm-follow-up-banner { min-height: 43px; margin: 11px 16px 0; padding: 9px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #f1d998; border-radius: 9px; color: #6d5b2b; background: #fff7df; font-size: 10px; }
.crm-follow-up-banner strong { white-space: nowrap; color: #815d13; font-size: 10px; }
.crm-follow-up-banner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-conversation-view .crm-message-list { flex: 1; min-height: 0; max-height: none; padding: 22px 24px; background: #fbfdff; }
.crm-message { width: min(72%, 550px); max-width: 72%; padding: 14px 16px; }
.crm-message p { font-size: 13px; line-height: 1.55; }
.crm-message .message-meta strong { font-size: 11px; }
.crm-message .message-meta span { font-size: 9px; }
.crm-composer { flex: 0 0 auto; margin: 10px 12px 12px; }
.staff-contact-panel { height: auto !important; min-height: 0; overflow-y: auto; padding-bottom: 14px; background: #f8fbfd; }
.staff-contact-heading { min-height: 64px; padding: 0 17px; background: #fff; }
.staff-contact-heading strong { display: block; font-size: 14px; }
.staff-contact-heading small { display: block; margin-top: 3px; color: #8296a4; font-size: 9px; }
.staff-contact-profile-rich { padding: 18px 17px; background: #fff; }
.staff-contact-profile-rich .admin-avatar { width: 52px; height: 52px; flex: 0 0 52px; font-size: 12px; }
.staff-contact-profile-rich h3 { font-size: 15px; }
.staff-contact-profile-rich small { max-width: 205px; font-size: 9px; }
.crm-profile-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: #26905d; font-size: 9px; font-weight: 700; }
.staff-side-card { margin: 10px 10px 0; padding: 13px; border: 1px solid #d5e3eb; border-radius: 10px; background: #fff; }
.staff-side-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.staff-side-card-heading h3 { margin: 0; color: #24455c; font-size: 11px; font-weight: 700; }
.crm-case-status { padding: 4px 7px; border-radius: 999px; color: #19845a; background: #e7f8ee; font-size: 8px; font-weight: 700; }
.staff-side-row { min-height: 39px; display: flex; align-items: center; gap: 9px; border-top: 1px solid #edf2f5; }
.staff-side-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: #2778a0; background: #edf6ff; font-size: 12px; }
.staff-side-row div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.staff-side-row small, .staff-side-detail span { color: #8295a2; font-size: 8px; }
.staff-side-row strong, .staff-side-detail strong { min-width: 0; overflow-wrap: anywhere; color: #25465b; font-size: 10px; font-weight: 600; }
.staff-side-row strong.empty, .staff-side-detail strong.empty { color: #a9b6bd; font-weight: 400; }
.staff-side-detail { min-height: 28px; padding: 6px 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 7px; border-top: 1px solid #edf2f5; }
.crm-details-toggle { width: calc(100% - 20px); margin: 10px 10px 0; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #c8dbe6; border-radius: 8px; color: #1c6381; background: #f3f9fc; font-family: inherit; font-size: 10px; font-weight: 700; text-align: left; cursor: pointer; }
.crm-details-toggle:hover { background: #eaf5fa; }
.staff-full-details { margin-top: 8px; }
.crm-documents-panel { margin: 10px 10px 0; padding: 0; overflow: hidden; border: 1px solid #d5e3eb; border-radius: 10px; background: #fff; }
.crm-documents-toggle { min-height: 47px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 0; color: #24455c; background: #fff; font-size: 11px; }
.crm-documents-toggle span { font-weight: 700; }
.crm-documents-toggle b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #2374a0; background: #e6f3fb; font-size: 9px; }
.crm-documents-toggle em { margin-left: auto; color: #2879a4; font-size: 9px; font-style: normal; }
.crm-documents-content { display: block !important; min-height: 24px; padding: 0 10px 10px; overflow: visible; }
.crm-document-category summary { padding: 9px 2px; font-size: 9px; }
.crm-document-row { padding: 8px 2px; }
.crm-document-copy strong { font-size: 9px; }
.staff-privacy-card { margin: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; border-radius: 9px; color: #27704d; background: #eaf9f0; }
.staff-privacy-card strong { font-size: 10px; }
.staff-privacy-card span { color: #5a8871; font-size: 8px; line-height: 1.4; }

/* Keep the central conversation column scrollable so documents below the
   composer are reachable without being clipped by the workspace grid. */
@media (min-width: 721px) {
  .staff-crm-body > .crm-conversation-view {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}
.crm-documents-under-chat { position: relative; z-index: 3; overflow: visible; }
.crm-documents-under-chat .crm-document-row { min-height: 42px; }

@media (min-width: 721px) {
  /* Reserve the chat viewport so opening documents only extends downward. */
  .crm-conversation-view .crm-message-list {
    flex: 0 0 auto;
    height: clamp(320px, calc(100% - 200px), 560px);
    min-height: 320px;
  }
  .staff-conversation-content { height: calc(100vh - 58px); overflow: hidden; }
}

/* Keep case details above the patient documents in the staff profile column. */
.staff-contact-panel { display: flex; flex-direction: column; }
.staff-contact-panel > .staff-contact-heading { order: 0; }
.staff-contact-panel > .staff-contact-profile { order: 1; }
.staff-contact-panel > section.staff-side-card:nth-of-type(1) { order: 2; }
.staff-contact-panel > section.crm-documents-panel { order: 3; }
.staff-contact-panel > section.staff-side-card:nth-of-type(2) { order: 4; }
.staff-contact-panel > .crm-details-toggle { order: 5; }
.staff-contact-panel > .staff-full-details { order: 6; }
.staff-contact-panel > .staff-privacy-card { order: 7; }
.staff-contact-panel > .crm-documents-panel { min-height: 58px; overflow: visible; }
.staff-contact-panel > .crm-documents-panel.is-expanded { min-height: 260px; }
.staff-contact-panel > .crm-documents-panel.is-expanded .crm-documents-content { min-height: 190px; max-height: 360px; overflow-y: auto !important; }

/* Keep the conversation focused on the chat; hide the pipeline status banner. */
.staff-thread-view .crm-follow-up-banner {
  display: none !important;
}

@media (max-width: 1180px) and (min-width: 721px) {
  .staff-crm-workspace { height: auto; min-height: 0; }
  .staff-crm-body { height: auto; min-height: 700px; grid-template-columns: 285px minmax(0, 1fr); }
  .staff-inbox-column .crm-thread-list, .crm-conversation-view { height: 680px !important; }
  .staff-contact-panel { grid-column: 1 / -1; height: auto !important; max-height: 420px; }
}

@media (max-width: 720px) {
  .staff-conversation-content { padding-bottom: 8px; }
  .staff-conversation-page-heading-compact { padding: 10px 14px; }
  .staff-crm-workspace { height: auto; min-height: 0; margin: 8px 8px 12px; border-radius: 12px; }
  .staff-crm-body { display: block; height: auto; }
  .staff-inbox-column { border-right: 0; }
  .staff-inbox-column .crm-thread-list { min-height: 270px; max-height: 330px; }
  .crm-conversation-view { min-height: 650px; height: 650px !important; border-right: 0; border-top: 1px solid #cedce5; }
  .crm-conversation-heading { padding: 0 12px; }
  .crm-conversation-actions button:nth-child(n+3) { display: none; }
  .crm-follow-up-banner { margin-left: 10px; margin-right: 10px; }
  .crm-message { width: calc(100% - 4px); max-width: calc(100% - 4px); }
  .staff-contact-panel { max-height: none; border-top: 1px solid #cedce5; }
}

/* On phones, let the conversation and documents use the page scroll instead
   of trapping the document list inside a nested fixed-height panel. */
@media (max-width: 720px) {
  .staff-crm-workspace,
  .staff-crm-body { overflow: visible; }
  .crm-conversation-view {
    height: auto !important;
    min-height: 650px;
    overflow: visible !important;
  }
  .crm-conversation-view .crm-message-list {
    flex: none;
    min-height: 420px;
    max-height: none;
    overflow: visible;
  }
  .crm-documents-under-chat {
    margin-right: 10px;
    margin-left: 10px;
  }
  .crm-documents-under-chat .crm-documents-content {
    max-height: none;
    overflow: visible;
  }
}

/* Keep the patient profile/documents column visible on laptop widths. */
@media (min-width: 981px) and (max-width: 1180px) {
  .staff-conversation-content { height: calc(100vh - 58px); overflow: hidden; }
  .staff-crm-workspace { height: calc(100vh - 146px); overflow: hidden; }
  .staff-crm-body { height: 100%; min-height: 0; grid-template-columns: 240px minmax(300px, 1fr) 270px; }
  .staff-inbox-column .crm-thread-list,
  .crm-conversation-view,
  .staff-contact-panel { height: 100% !important; max-height: none; grid-column: auto; }
}

/* On narrow desktop/tablet widths, place the profile below the chat without clipping it. */
@media (min-width: 721px) and (max-width: 980px) {
  .staff-conversation-content { height: auto; min-height: calc(100vh - 58px); overflow: visible; }
  .staff-crm-workspace { height: auto; overflow: visible; }
  .staff-contact-panel { max-height: none; }
}

/* Staff inbox: keep the patient list white and remove redundant row controls. */
.staff-inbox-column,
.staff-inbox-column .crm-thread-list {
  background: #fff;
}

.staff-inbox-column .crm-thread-list {
  padding: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.staff-inbox-column .crm-thread-list::-webkit-scrollbar,
.staff-inbox-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.staff-inbox-tabs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Keep the patient list scrollbar visible; only the filter heading stays clean. */
.staff-inbox-column .crm-thread-list {
  scrollbar-width: auto;
  -ms-overflow-style: auto;
}

.staff-inbox-column .crm-thread-list::-webkit-scrollbar {
  width: 8px;
  height: auto;
  display: block;
}

.staff-inbox-column .crm-thread-list::-webkit-scrollbar-track {
  background: #eef3f6;
}

.staff-inbox-column .crm-thread-list::-webkit-scrollbar-thumb {
  border: 2px solid #eef3f6;
  border-radius: 999px;
  background: #a9bac3;
}

.staff-inbox-column .crm-thread-item {
  grid-template-columns: 18px 40px minmax(0, 1fr);
  min-height: 82px;
  margin: 0;
  padding: 11px 10px;
  border: 1px solid #e1e9ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(35, 71, 91, .05);
}

.staff-inbox-column .crm-thread-item + .crm-thread-item {
  margin-top: 7px;
}

.staff-inbox-column .crm-thread-item:hover {
  border-color: #bddbe6;
  background: #f6fbfd;
  box-shadow: 0 4px 12px rgba(35, 71, 91, .09);
}

.staff-inbox-column .crm-thread-item.active {
  border-left: 4px solid #1e7890;
  padding-left: 7px;
  border-color: #abd4df;
  background: #eaf7fa;
  box-shadow: 0 4px 13px rgba(30, 120, 144, .14);
}

.staff-inbox-column .crm-read-status,
.staff-inbox-column .crm-star {
  display: none !important;
}

.staff-inbox-column .crm-thread-copy strong {
  color: #1d4055;
  font-size: 11px;
  font-weight: 700;
}

.staff-inbox-column .crm-thread-copy small {
  color: #5f7481;
}

.staff-inbox-column .crm-thread-copy em {
  color: #8a9ba4;
}

/* Patient portal workspace: a focused conversation view with a compact care-team rail. */
.patient-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.patient-dashboard-button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid #c9dce5;
  border-radius: 9px;
  color: #1d617d;
  background: #f3f9fc;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.patient-dashboard-button:hover {
  border-color: #7db7c8;
  background: #e7f5fa;
}

.patient-agent-card {
  margin: 0;
  padding: 17px;
  border-color: #d6e4eb;
  border-radius: 13px;
  box-shadow: 0 6px 18px rgba(35, 71, 91, .06);
}

.patient-agent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}

.patient-agent-heading p {
  margin: 0;
  color: #173b55;
  font-size: 14px;
  font-weight: 700;
}

.patient-agent-more {
  color: #397e9c;
  font-size: 9px;
  font-weight: 700;
}

.patient-agent-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e3edf1;
}

.patient-agent-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #e4f2f5;
  border-radius: 50%;
  color: #216782;
  background: #d9eef1;
  font-size: 12px;
  font-weight: 700;
}

.patient-agent-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.patient-agent-profile h3 {
  margin: 0;
  color: #173b55;
  font-size: 13px;
  line-height: 1.25;
}

.patient-agent-profile small {
  display: block;
  margin-top: 3px;
  color: #718997;
  font-size: 9px;
}

.patient-agent-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: #218654;
  font-size: 9px;
  font-weight: 700;
}

.patient-agent-online i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #19b66b;
}

.patient-agent-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.patient-agent-actions span {
  flex: 1;
  padding: 8px 6px;
  border-radius: 8px;
  color: #297392;
  background: #eef8fb;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 721px) {
  .patient-portal-shell .dashboard-header {
    min-height: 78px;
    padding: 14px 28px;
    border-bottom-color: #dce8ed;
  }

  .patient-portal-shell .dashboard-header h1 {
    color: #173b55;
    font-size: 22px;
    font-weight: 700;
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) {
    width: calc(100% - 40px);
    max-width: 1280px;
    padding: 18px 0 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 14px;
    align-items: start;
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) > .push-banner,
  .patient-portal-shell .dashboard-content:not(.profile-view) > .welcome-banner {
    grid-column: 1 / -1;
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) > .push-banner {
    grid-row: 1;
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) > .welcome-banner {
    grid-row: 2;
    min-height: 82px;
    padding: 18px 24px;
    border-radius: 13px;
    background: linear-gradient(105deg, #1e5a6b, #4a91a0);
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) > .welcome-banner h2 {
    margin: 0;
    font-size: 22px;
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) > .welcome-banner .eyebrow {
    margin-bottom: 4px;
    font-size: 8px;
  }

  .patient-portal-shell .dashboard-grid {
    display: contents;
  }

  .patient-portal-shell .dashboard-grid > .conversations-card {
    grid-column: 1;
    grid-row: 3 / span 3;
    min-height: calc(100vh - 206px);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-color: #d5e4eb;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(35, 71, 91, .08);
  }

  .patient-portal-shell .conversations-card > .card-heading {
    min-height: 76px;
    flex: 0 0 auto;
    padding: 0 22px;
    align-items: center;
    border-bottom: 1px solid #dfeaf0;
    background: #fff;
  }

  .patient-portal-shell .conversations-card > .card-heading h3 {
    color: #173b55;
    font-size: 18px;
    font-weight: 700;
  }

  .patient-portal-shell .conversations-card > .card-heading .eyebrow {
    margin-bottom: 3px;
    color: #4c91a8;
    font-size: 8px;
  }

  .patient-portal-shell .conversations-card .conversation-body {
    min-height: 0;
    flex: 1;
    margin: 0;
    padding: 0;
  }

  .patient-portal-shell .conversations-card .message-list {
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 24px 28px;
    gap: 16px;
    background: linear-gradient(180deg, #f1f9fc 0%, #eaf5fa 100%);
  }

  .patient-portal-shell .conversations-card .message-bubble {
    width: min(72%, 590px);
    max-width: 72%;
    padding: 14px 17px;
    border: 1px solid #d9e7ed;
    border-radius: 5px 15px 15px 15px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(35, 71, 91, .06);
  }

  .patient-portal-shell .conversations-card .message-bubble.from-patient {
    border-color: #b8dcf4;
    border-radius: 15px 5px 15px 15px;
    color: #123d61;
    background: #cfeafe;
  }

  .patient-portal-shell .conversations-card .message-bubble p {
    font-size: 13px;
    line-height: 1.55;
  }

  .patient-portal-shell .conversations-card .message-composer {
    min-height: 80px;
    flex: 0 0 auto;
    margin: 0;
    padding: 14px 18px 16px;
    align-items: flex-end;
    border-top: 1px solid #dce8ed;
    background: #fff;
  }

  .patient-portal-shell .conversations-card .message-composer textarea {
    min-height: 48px;
    padding: 13px 15px;
    border-color: #c7dce5;
    border-radius: 11px;
    background: #f8fcfd;
    font-size: 12px;
  }

  .patient-portal-shell .conversations-card .message-composer .button {
    min-height: 48px;
    border-radius: 11px;
    background: #278fdd;
  }

  .patient-portal-shell .dashboard-grid > .profile-card {
    grid-column: 2;
    grid-row: 4;
    margin: 0;
    padding: 17px;
    border-color: #d6e4eb;
    border-radius: 13px;
    box-shadow: 0 6px 18px rgba(35, 71, 91, .06);
  }

  .patient-portal-shell .dashboard-grid > .profile-card .card-heading h3 {
    font-size: 15px;
    font-weight: 700;
  }

  .patient-portal-shell .dashboard-grid > .profile-card .profile-details {
    margin-top: 18px;
    gap: 0;
  }

  .patient-portal-shell .dashboard-grid > .profile-card .profile-details > div {
    min-height: 39px;
    padding: 8px 0;
    border-bottom-color: #e8eff2;
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) > .patient-agent-card {
    grid-column: 2;
    grid-row: 3;
  }

  .patient-portal-shell .dashboard-content:not(.profile-view) > .patient-documents-card {
    grid-column: 2;
    grid-row: 5;
    margin: 0;
    max-height: 330px;
    overflow-y: auto;
    border-radius: 13px;
  }
}

@media (max-width: 720px) {
  .patient-header-title { gap: 8px; }
  .patient-dashboard-button { min-height: 32px; padding: 0 10px; font-size: 9px; }
  .patient-portal-shell .dashboard-header h1 { font-size: 19px; }
  .patient-agent-card { margin-top: 18px; }
  .patient-portal-shell .conversations-card .message-list { min-height: 460px; }
}

/* Keep the patient message composer inside the first viewport. */
@media (min-width: 721px) {
  .patient-portal-shell .dashboard-grid > .conversations-card {
    height: clamp(430px, calc(100vh - 260px), 720px);
    min-height: 0;
  }

  .patient-portal-shell .conversations-card .conversation-body {
    min-height: 0;
    overflow: hidden;
  }

  .patient-portal-shell .conversations-card .message-composer {
    position: relative;
    z-index: 2;
  }
}

/* Overview and Conversations are separate patient-portal views. */
.patient-portal-shell .dashboard-content.conversation-view > .welcome-banner,
.patient-portal-shell .dashboard-content.overview-view .conversations-card {
  display: none;
}

@media (min-width: 721px) {
  .patient-portal-shell .dashboard-content.conversation-view > .push-banner {
    grid-row: 1;
  }

  .patient-portal-shell .dashboard-content.conversation-view .dashboard-grid > .conversations-card {
    grid-row: 2 / span 3;
  }

  .patient-portal-shell .dashboard-content.conversation-view > .patient-agent-card {
    grid-column: 2;
    grid-row: 2;
  }

  .patient-portal-shell .dashboard-content.conversation-view .dashboard-grid > .profile-card {
    grid-column: 2;
    grid-row: 3;
  }

  .patient-portal-shell .dashboard-content.conversation-view > .patient-documents-card {
    grid-column: 2;
    grid-row: 4;
  }

  .patient-portal-shell .dashboard-content.overview-view > .welcome-banner {
    grid-row: 2;
  }

  .patient-portal-shell .dashboard-content.overview-view .dashboard-grid > .profile-card {
    grid-column: 1;
    grid-row: 3;
  }

  .patient-portal-shell .dashboard-content.overview-view > .patient-agent-card {
    grid-column: 2;
    grid-row: 3;
  }

  .patient-portal-shell .dashboard-content.overview-view > .patient-documents-card {
    grid-column: 1 / -1;
    grid-row: 4;
    max-height: 300px;
  }

  .patient-portal-shell .dashboard-content.conversation-view .dashboard-grid > .conversations-card {
    height: clamp(520px, calc(100vh - 140px), 900px);
    min-height: 0;
  }

  /* Keep the patient document categories and files inside the narrow right rail. */
  .patient-portal-shell .dashboard-content.conversation-view > .patient-documents-card .patient-document-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .patient-portal-shell .dashboard-content.conversation-view > .patient-documents-card .patient-document-category summary span {
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .patient-portal-shell .dashboard-content.conversation-view > .patient-documents-card .patient-document-row,
  .patient-portal-shell .dashboard-content.conversation-view > .patient-documents-card .patient-document-preview {
    width: 100%;
    box-sizing: border-box;
  }

  .patient-portal-shell .dashboard-content.conversation-view > .patient-documents-card .patient-document-copy strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Care-team greeting messages stay clean without a profile photo beside them. */
.message-bubble.without-avatar,
.crm-message.without-avatar:not(.from-staff) {
  padding-left: 15px;
}

.crm-message.without-avatar.from-staff {
  padding-right: 15px;
}

/* Keep care-team text clear of the agent avatar in the patient chat. */
.patient-portal-shell .conversations-card .message-bubble:not(.from-patient) {
  padding-left: 56px;
}

/* Staff patient-document library. */
.staff-documents-page {
  margin: 0 17px 28px;
  padding: 20px;
  border: 1px solid #c9dce6;
  border-radius: 16px;
  background: #f6fafc;
  box-shadow: 0 9px 25px rgba(24, 67, 91, .08);
}
.staff-documents-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.staff-documents-intro h2 { margin: 3px 0 4px; color: #173f56; font-size: 21px; }
.staff-documents-intro p:not(.eyebrow) { max-width: 650px; margin: 0; color: #708796; font-size: 11px; line-height: 1.55; }
.staff-documents-total { min-width: 78px; padding: 9px 11px; border: 1px solid #bed9e5; border-radius: 999px; color: #23647f; background: #eaf7fc; font-size: 10px; font-weight: 700; text-align: center; }
.staff-documents-search { height: 44px; margin: 18px 0; padding: 0 7px 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid #b9d1de; border-radius: 10px; background: #fff; }
.staff-documents-search > span { color: #4b8aa5; font-size: 18px; }
.staff-documents-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: #24455c; background: transparent; font-family: inherit; font-size: 12px; }
.staff-documents-search button { min-height: 32px; padding: 0 15px; border: 0; border-radius: 7px; color: #fff; background: #237b9b; font-family: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.staff-documents-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 14px; align-items: start; }
.staff-documents-patients, .staff-document-results { min-width: 0; border: 1px solid #d1e1e8; border-radius: 12px; background: #fff; }
.staff-documents-patients { max-height: 620px; overflow-y: auto; }
.staff-documents-list-heading { min-height: 45px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e3edf1; color: #234a60; font-size: 12px; }
.staff-documents-list-heading span { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #23759a; background: #e8f5fa; font-size: 9px; font-weight: 700; }
.staff-document-patient { width: 100%; min-height: 69px; padding: 10px 12px; display: grid; grid-template-columns: 35px minmax(0, 1fr) 24px; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid #edf2f5; color: inherit; background: #fff; text-align: left; cursor: pointer; }
.staff-document-patient:hover { background: #f1f8fb; }
.staff-document-patient.active { border-left: 4px solid #2c8eb1; padding-left: 8px; background: #e9f7fb; }
.staff-document-patient .admin-avatar { width: 35px; height: 35px; font-size: 10px; }
.staff-document-patient > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.staff-document-patient strong { overflow: hidden; color: #24465b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.staff-document-patient small { overflow: hidden; color: #8194a0; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.staff-document-patient > b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #24779a; background: #e8f5fa; font-size: 9px; }
.staff-document-results { min-height: 500px; padding: 18px; }
.staff-document-patient-heading { padding-bottom: 15px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #e4eef2; }
.staff-document-patient-heading .admin-avatar { width: 49px; height: 49px; }
.staff-document-patient-heading > div { min-width: 0; flex: 1; }
.staff-document-patient-heading h2 { margin: 0; color: #1d4258; font-size: 17px; }
.staff-document-patient-heading p { margin: 4px 0 0; overflow: hidden; color: #6d8492; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.staff-document-patient-heading small { display: block; margin-top: 4px; color: #98a8b1; font-size: 8px; }
.staff-document-patient-heading .admin-status { flex: 0 0 auto; }
.staff-document-category-grid { padding-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.staff-document-category-card { min-width: 0; border: 1px solid #d6e5eb; border-radius: 11px; background: #fbfdfe; overflow: hidden; }
.staff-document-category-heading { min-height: 52px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #a9c2ce; background: #c5d9e2; cursor: pointer; user-select: none; }
.staff-document-category-heading > div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.staff-document-category-heading > div > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: #17465d; background: #b3d0dc; font-size: 12px; }
.staff-document-category-heading h3 { margin: 0; overflow: hidden; color: #183d52; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.staff-document-category-heading > b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: #17465d; background: #b3d0dc; font-size: 10px; font-weight: 800; }
.staff-document-items { display: none; padding: 5px 10px 8px; }
.staff-document-category-card.is-expanded .staff-document-items { display: block; }
.staff-document-item { min-width: 0; min-height: 51px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid #edf3f5; }
.staff-document-item:last-child { border-bottom: 0; }
.staff-document-preview { min-width: 0; flex: 1; padding: 7px 0; display: flex; align-items: center; gap: 8px; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.staff-document-preview:hover strong { color: #1e83a8; }
.staff-document-preview img, .staff-document-file-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 6px; object-fit: cover; color: #247598; background: #e7f3f7; font-size: 8px; font-weight: 800; }
.staff-document-preview > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.staff-document-preview strong { overflow: hidden; color: #294a5d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.staff-document-preview small { color: #8b9da5; font-size: 8px; }
.staff-document-download { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; color: #24799b; background: #eaf6fa; font-size: 15px; text-decoration: none; }
.staff-document-download:hover { color: #fff; background: #237b9b; }
.staff-document-empty { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #7b909d; text-align: center; }
.staff-document-empty.compact { min-height: 270px; }
.staff-document-empty > span { width: 45px; height: 45px; margin-bottom: 10px; display: grid; place-items: center; border-radius: 50%; color: #2c86a5; background: #e5f5fa; font-size: 21px; }
.staff-document-empty h3 { margin: 0; color: #2b5268; font-size: 14px; }
.staff-document-empty p { max-width: 330px; margin: 7px 0 0; font-size: 10px; line-height: 1.5; }
@media (max-width: 720px) {
  .staff-documents-page { margin: 0 10px 20px; padding: 13px; }
  .staff-documents-intro { flex-direction: column; gap: 10px; }
  .staff-documents-intro h2 { font-size: 18px; }
  .staff-documents-total { align-self: flex-start; }
  .staff-documents-search { height: auto; min-height: 42px; flex-wrap: wrap; padding: 6px 7px 6px 10px; }
  .staff-documents-search input { min-height: 28px; }
  .staff-documents-search button { min-height: 30px; }
  .staff-documents-layout { grid-template-columns: 1fr; }
  .staff-documents-patients { max-height: 270px; }
  .staff-document-results { padding: 13px; }
  .staff-document-patient-heading { align-items: flex-start; flex-wrap: wrap; }
  .staff-document-patient-heading .admin-status { margin-left: 61px; }
  .staff-document-category-grid { grid-template-columns: 1fr; }
}
.rise-patient-avatar { position: relative; }
.rise-patient-avatar.is-online { overflow: visible; }
.rise-patient-avatar.is-online::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #18b66b; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(24,182,107,.15); }
.conversation-heading-status { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.conversation-presence { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; color: #198654; background: #e6f8ee; font-size: 10px; font-weight: 700; white-space: nowrap; }
.conversation-presence i, .patient-agent-online i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #19b66b; }
.conversation-presence.offline, .patient-agent-online.offline { color: #687985; background: #eef2f4; }
.conversation-presence.offline i, .patient-agent-online.offline i { background: #9aa8af; }

/* Portal-to-portal audio calling */
.portal-call-button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid #237c99; border-radius: 9px; color: #fff; background: #237c99; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.portal-call-button:hover { background: #195f78; }
.portal-call-button:disabled { opacity: .58; cursor: not-allowed; }
.portal-call-audio-element { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.portal-call-status, .portal-call-incoming, .portal-call-error { position: fixed; z-index: 1200; font-family: inherit; box-shadow: 0 14px 40px rgba(16, 55, 72, .22); }
.portal-call-status { right: 22px; bottom: 22px; min-width: 270px; display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #c8dce4; border-radius: 14px; color: #234b60; background: #f8fcfd; }
.portal-call-status.is-active { border-color: #a9dec5; background: #effbf4; }
.portal-call-status > div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.portal-call-status strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.portal-call-status small { color: #70909e; font-size: 9px; }
.portal-call-status button { min-height: 28px; padding: 0 8px; border: 1px solid #b7d1db; border-radius: 7px; color: #23637b; background: #fff; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.portal-call-status button.portal-call-audio { border-color: #86c6a4; color: #176d4a; background: #e9f9ef; }
.portal-call-status button.portal-call-end { border-color: #dd9292; color: #a23c3c; background: #fff5f5; }
.portal-call-status-dot { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: #efad3c; box-shadow: 0 0 0 5px rgba(239, 173, 60, .15); }
.portal-call-status.is-active .portal-call-status-dot { background: #1bb672; box-shadow: 0 0 0 5px rgba(27, 182, 114, .14); }
.portal-call-incoming { top: 78px; right: 22px; max-width: min(390px, calc(100vw - 30px)); display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid #c7ddea; border-radius: 16px; color: #244c60; background: #fff; }
.portal-call-incoming > div:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.portal-call-incoming strong { font-size: 11px; line-height: 1.35; }
.portal-call-incoming small { color: #7c95a0; font-size: 9px; }
.portal-call-ring-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #1cae70; font-size: 17px; animation: renovar-call-pulse 1.3s ease-in-out infinite; }
.portal-call-incoming-actions { display: flex; gap: 5px; }
.portal-call-incoming-actions button { min-height: 29px; padding: 0 8px; border: 0; border-radius: 7px; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.portal-call-answer { color: #fff; background: #1da96e; }
.portal-call-reject { color: #9a3838; background: #fff0f0; }
.portal-call-error { right: 22px; bottom: 90px; max-width: 340px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #efc2c2; border-radius: 10px; color: #8e3b3b; background: #fff6f6; font-size: 10px; }
.portal-call-error span { flex: 1; }
.portal-call-error button { border: 0; color: inherit; background: transparent; font-size: 18px; cursor: pointer; }
@keyframes renovar-call-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(28, 174, 112, .12); } }
@media (max-width: 720px) { .portal-call-button { min-height: 32px; padding: 0 9px; font-size: 9px; } .portal-call-status { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); min-width: 0; max-width: calc(100vw - 24px); } .portal-call-incoming { top: max(12px, env(safe-area-inset-top)); right: 12px; left: 12px; max-width: none; padding: 14px 12px; } .portal-call-incoming strong { font-size: 12px; } .portal-call-incoming-actions button { min-height: 34px; padding: 0 10px; font-size: 10px; } .portal-call-error { right: 12px; bottom: 82px; max-width: calc(100vw - 24px); } .agent-push-floating { right: 12px; max-width: calc(100vw - 24px); } .agent-push-floating button { min-height: 38px; padding: 0 13px; font-size: 10px; } }

/* Full-screen portal call controls */
.portal-call-overlay { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px; background: rgba(8, 29, 40, .82); backdrop-filter: blur(7px); }
.portal-call-overlay-card { width: min(430px, 100%); display: flex; flex-direction: column; align-items: center; padding: 32px 26px 28px; border: 1px solid rgba(255,255,255,.72); border-radius: 28px; color: #173b4d; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.3); text-align: center; }
.portal-call-overlay-icon { width: 82px; height: 82px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 50%; color: #fff; background: #168e67; font-size: 34px; box-shadow: 0 0 0 12px rgba(22,142,103,.12); animation: renovar-call-pulse 1.05s ease-in-out infinite; }
.portal-call-overlay.is-active-call .portal-call-overlay-icon { background: #247da0; box-shadow: 0 0 0 12px rgba(36,125,160,.12); animation: none; }
.portal-call-overlay.is-dialing .portal-call-overlay-icon { background: #d59723; box-shadow: 0 0 0 12px rgba(213,151,35,.12); }
.portal-call-overlay-kicker { color: #6c8b98; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.portal-call-overlay-card h2 { margin: 8px 0 5px; color: #12374a; font-size: 25px; line-height: 1.2; }
.portal-call-overlay-subtitle { min-height: 22px; margin: 0; color: #6b8793; font-size: 13px; }
.portal-call-overlay-timer { margin-top: 12px; color: #247da0; font-size: 21px; font-weight: 800; letter-spacing: .04em; }
.portal-call-overlay-actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.portal-call-overlay-actions.portal-call-incoming-actions { grid-template-columns: 1fr 1fr; }
.portal-call-overlay-actions button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 14px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .16s ease, filter .16s ease; }
.portal-call-overlay-actions button:hover { filter: brightness(.96); transform: translateY(-1px); }
.portal-call-overlay-actions button:disabled { opacity: .6; cursor: wait; transform: none; }
.portal-call-primary-action { color: #fff; background: #18a96b; box-shadow: 0 7px 18px rgba(24,169,107,.25); }
.portal-call-danger-action { color: #a13d43; background: #fff0f0; }
.portal-call-control { color: #1d566e; background: #eaf6fa; }
.portal-call-speaker { color: #166d63; background: #e2f8ef; }
.portal-call-speaker.needs-sound { color: #7c5413; background: #fff0c8; animation: renovar-call-control-pulse 1s ease-in-out infinite; }
.portal-call-mute { color: #674b93; background: #f0eafe; }
.portal-call-mute.is-muted { color: #a23e47; background: #ffebed; }
.portal-call-control.portal-call-end { color: #fff; background: #d94f58; box-shadow: 0 7px 18px rgba(217,79,88,.2); }
@keyframes renovar-call-control-pulse { 50% { box-shadow: 0 0 0 6px rgba(213,151,35,.18); } }
@media (max-width: 720px) { .portal-call-overlay { padding: 14px; } .portal-call-overlay-card { width: 100%; max-width: 430px; min-height: 330px; justify-content: center; padding: 34px 18px 22px; border-radius: 25px; } .portal-call-overlay-icon { width: 76px; height: 76px; font-size: 30px; } .portal-call-overlay-card h2 { font-size: 22px; } .portal-call-overlay-subtitle { font-size: 12px; } .portal-call-overlay-actions { gap: 8px; margin-top: 24px; } .portal-call-overlay-actions button { min-height: 55px; font-size: 11px; } }

/* Call UI is temporarily hidden; the underlying call implementation remains available. */
.portal-call-button,
.portal-call-status,
.portal-call-incoming,
.portal-call-error,
.portal-call-overlay { display: none !important; }

/* Admin patient management */
.admin-patient-management { display: flex; flex-direction: column; gap: 16px; }
.admin-patient-management > .dashboard-card { padding: 24px; }
.admin-patient-management-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.admin-patient-management-heading h2 { margin: 0 0 7px; font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 500; }
.admin-patient-management-heading p:not(.eyebrow) { max-width: 610px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.admin-export-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid #b9d2cc; border-radius: 5px; color: var(--teal-dark); background: #eff9f4; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.admin-export-button:hover { border-color: var(--teal); background: var(--mint); }
.admin-patient-management-toolbar { margin-top: 22px; padding-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.admin-patient-tabs { display: flex; gap: 8px; }
.admin-patient-tabs button { min-height: 34px; padding: 0 12px; border: 1px solid #cbdcd8; border-radius: 18px; color: var(--ink-soft); background: #fbfdfc; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.admin-patient-tabs button b { min-width: 19px; height: 19px; margin-left: 5px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--teal-dark); background: #e4efeb; font-size: 9px; }
.admin-patient-tabs button:hover, .admin-patient-tabs button.active { border-color: var(--teal); color: var(--white); background: var(--teal); }
.admin-patient-tabs button:hover b, .admin-patient-tabs button.active b { color: var(--teal-dark); background: var(--mint); }
.admin-patient-search { min-width: min(100%, 350px); height: 35px; display: flex; align-items: center; border: 1px solid #cadbd8; border-radius: 5px; overflow: hidden; background: var(--white); }
.admin-patient-search span { padding-left: 10px; color: #78928f; font-size: 17px; }
.admin-patient-search input { min-width: 0; flex: 1; height: 100%; padding: 0 8px; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 10px; }
.admin-patient-search button { height: 100%; padding: 0 11px; border: 0; color: var(--white); background: var(--teal); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.admin-managed-patient-list { margin-top: 15px; border: 1px solid #c1d2d0; border-radius: 6px; overflow: hidden; }
.admin-managed-patient { border-top: 1px solid #c1d2d0; background: var(--white); }
.admin-managed-patient:first-child { border-top: 0; }
.admin-managed-patient-summary { min-width: 0; min-height: 66px; padding: 10px 13px; display: grid; grid-template-columns: 24px 36px minmax(180px, 1.3fr) auto auto minmax(235px, auto); align-items: center; gap: 10px; }
.admin-managed-patient:hover, .admin-managed-patient.expanded { background: #f8fcfa; }
.admin-patient-expand { width: 23px; height: 23px; padding: 0; border: 1px solid #bed4cf; border-radius: 50%; color: var(--teal-dark); background: #edf8f3; font-size: 15px; line-height: 1; cursor: pointer; }
.admin-managed-patient-main { min-width: 0; }
.admin-managed-patient-main strong, .admin-managed-patient-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-managed-patient-main strong { color: var(--ink); font-size: 11px; }
.admin-managed-patient-main small { margin-top: 4px; color: #839795; font-size: 9px; }
.admin-document-count { color: var(--teal-dark); font-size: 9px; font-weight: 700; white-space: nowrap; }
.admin-managed-patient-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.admin-managed-patient-details { padding: 18px 24px 22px 83px; border-top: 1px solid #d5e3e0; background: #fbfefd; }
.admin-patient-detail-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.admin-patient-detail-grid > div { min-width: 0; padding: 10px; border: 1px solid #d9e6e3; border-radius: 4px; background: var(--white); }
.admin-patient-detail-grid small, .admin-patient-detail-grid strong { display: block; }
.admin-patient-detail-grid small { color: #839795; font-size: 8px; }
.admin-patient-detail-grid strong { margin-top: 4px; overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-managed-documents { margin-top: 17px; border: 1px solid #c7dbd6; border-radius: 5px; background: var(--white); }
.admin-managed-documents-heading { min-height: 43px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dce8e5; }
.admin-managed-documents-heading h3 { margin: 0; color: var(--ink); font-size: 12px; }
.admin-managed-documents-heading span { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--teal); font-size: 9px; font-weight: 700; }
.admin-managed-document-list { display: flex; flex-direction: column; }
.admin-managed-document { min-width: 0; padding: 9px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 205px auto auto; align-items: center; gap: 8px; border-top: 1px solid #e3ecea; }
.admin-managed-document:first-child { border-top: 0; }
.admin-managed-document strong, .admin-managed-document small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-managed-document strong { color: var(--ink); font-size: 10px; }
.admin-managed-document small { margin-top: 3px; color: #839795; font-size: 8px; }
.admin-managed-document select { min-width: 0; height: 29px; padding: 0 7px; border: 1px solid #c6dcd6; border-radius: 4px; color: var(--teal-dark); background: #f7fcfa; font: inherit; font-size: 9px; }
.admin-managed-document .admin-inline-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.admin-managed-documents-empty { margin: 0; padding: 16px 12px; color: #839795; font-size: 10px; }
.admin-patient-edit-form { padding: 15px; border: 1px solid #bcd6d0; border-radius: 5px; background: var(--white); }
.admin-patient-edit-form .form-grid { margin-top: 12px; }
.admin-note-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; color: var(--ink); font-size: 10px; font-weight: 700; }
.admin-note-field textarea { min-height: 72px; padding: 9px; resize: vertical; border: 1px solid #c7dbd6; border-radius: 4px; outline: 0; color: var(--ink); background: #fbfdfc; font: inherit; font-size: 10px; }
.admin-patient-edit-form > .button { margin-top: 14px; min-height: 37px; padding: 0 14px; font-size: 10px; }
@media (max-width: 1050px) { .admin-managed-patient-summary { grid-template-columns: 24px 36px minmax(150px, 1fr) auto auto; } .admin-managed-patient-actions { grid-column: 3 / -1; justify-content: flex-start; } .admin-patient-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .admin-managed-patient-details { padding-left: 24px; } }
@media (max-width: 720px) { .admin-patient-management-heading, .admin-patient-management-toolbar { align-items: stretch; flex-direction: column; } .admin-export-button { justify-content: center; } .admin-patient-search { width: 100%; } .admin-managed-patient-summary { grid-template-columns: 24px 36px minmax(0, 1fr); } .admin-managed-patient-summary > .admin-status, .admin-document-count { grid-column: 3; justify-self: start; } .admin-managed-patient-actions { grid-column: 3; } .admin-patient-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-managed-document { grid-template-columns: minmax(0, 1fr) auto; } .admin-managed-document select { grid-column: 1 / -1; grid-row: 2; width: 100%; } .admin-managed-document .admin-inline-button { grid-row: 2; } }

/* Deep TMS screening wizard */
.screening-content { min-height: calc(100vh - 70px); }
.screening-page { max-width: 1320px; margin: 0 auto; padding: 0 0 34px; }
.screening-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; border: 1px solid #c8dbd6; border-radius: 8px; background: linear-gradient(135deg, #f8fcfa 0%, #eef7f1 100%); }
.screening-intro h2 { margin: 4px 0 8px; color: var(--teal-dark); font-size: clamp(22px, 2vw, 30px); }
.screening-intro p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--ink-soft); font-size: 13px; }
.screening-status-badge { padding: 7px 12px; border-radius: 20px; color: var(--teal-dark); background: #dcefe2; font-size: 11px; font-weight: 800; white-space: nowrap; }
.screening-patient-picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr); gap: 15px; margin: 17px 0; padding: 17px 20px; border: 1px solid #c8dbd6; border-radius: 8px; background: var(--white); box-shadow: 0 8px 20px rgba(27, 78, 81, .05); }
.screening-patient-picker label { display: block; margin-bottom: 7px; color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.screening-patient-picker input, .screening-patient-picker select { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #b9d1ca; border-radius: 5px; outline: none; color: var(--ink); background: #fbfefd; font: inherit; font-size: 12px; }
.screening-patient-picker input:focus, .screening-patient-picker select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(62, 126, 114, .12); }
.screening-blank-option { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: -2px; color: var(--teal-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.screening-blank-option input { width: 17px; min-height: 17px; accent-color: var(--teal); }
.screening-patient-summary { display: flex; align-items: center; gap: 12px; min-height: 66px; margin-bottom: 14px; padding: 10px 15px; border: 1px solid #bdd6cf; border-radius: 7px; background: #fff; }
.screening-patient-summary .admin-avatar { flex: 0 0 42px; width: 42px; height: 42px; }
.screening-patient-summary > div { min-width: 0; flex: 1; }
.screening-patient-summary strong, .screening-patient-summary small { display: block; }
.screening-patient-summary strong { color: var(--ink); font-size: 14px; }
.screening-patient-summary small { margin-top: 4px; overflow: hidden; color: #78908f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.screening-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 3px 0 10px; scrollbar-width: thin; }
.screening-tabs button { flex: 1 0 170px; min-height: 48px; padding: 7px 13px; border: 1px solid #b9d1ca; border-radius: 6px; color: #47686a; background: #f6fbf8; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.screening-tabs button span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px; border-radius: 50%; color: #fff; background: #8eaaa4; font-size: 10px; }
.screening-tabs button.active { border-color: var(--teal-dark); color: #fff; background: var(--teal-dark); box-shadow: 0 5px 14px rgba(27, 78, 81, .16); }
.screening-tabs button.active span, .screening-tabs button.complete span { background: var(--gold); color: #294b4b; }
.screening-form-card { margin-top: 2px; border: 1px solid #c1d7d0; border-radius: 8px; background: #fff; box-shadow: 0 9px 25px rgba(27, 78, 81, .06); }
.screening-section { padding: 22px; }
.screening-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid #dce9e5; }
.screening-section-heading h3 { margin: 3px 0 0; color: var(--teal-dark); font-size: 20px; }
.screening-subheading { margin: 8px 0 0; color: var(--ink); font-size: 13px; }
.screening-section-heading > p { max-width: 390px; margin: 17px 0 0; color: #708987; font-size: 11px; text-align: right; }
.screening-question-list { margin-top: 7px; }
.screening-question { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 14px 4px; border-bottom: 1px solid #e2ece8; }
.screening-question strong { display: block; color: var(--ink); font-size: 12px; line-height: 1.5; }
.screening-question textarea, .screening-long-field textarea { width: 100%; min-height: 55px; margin-top: 9px; padding: 9px 10px; resize: vertical; border: 1px solid #b9d1ca; border-radius: 5px; outline: none; color: var(--ink); background: #fbfefd; font: inherit; font-size: 11px; }
.screening-answer { display: flex; gap: 4px; padding: 3px; border: 1px solid #c7dbd6; border-radius: 5px; background: #f5faf7; }
.screening-answer button { min-width: 46px; min-height: 30px; border: 0; border-radius: 4px; color: #56706f; background: transparent; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.screening-answer button.selected { color: #fff; background: var(--teal); }
.screening-answer button.selected.yes { background: #b97833; }
.screening-long-field { display: block; margin-top: 18px; color: var(--ink); font-size: 12px; }
.screening-long-field textarea { display: block; min-height: 100px; }
.screening-add-button, .screening-secondary-button, .screening-next-button { min-height: 37px; padding: 0 14px; border-radius: 5px; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.screening-add-button { border: 1px solid #a9ccc0; color: var(--teal-dark); background: #edf8f1; }
.screening-table-wrap { overflow-x: auto; margin-top: 17px; border: 1px solid #c8dbd6; border-radius: 5px; }
.screening-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.screening-table th { padding: 10px 9px; color: #fff; background: var(--teal-dark); font-size: 10px; text-align: left; white-space: nowrap; }
.screening-table td { padding: 7px 8px; border-top: 1px solid #dce9e5; color: var(--ink); font-size: 11px; vertical-align: middle; }
.screening-table tbody tr:nth-child(even) { background: #f9fcfb; }
.screening-table input { width: 100%; min-height: 32px; padding: 0 7px; border: 1px solid #c0d6cf; border-radius: 4px; outline: none; color: var(--ink); background: #fff; font: inherit; font-size: 11px; }
.screening-remove-button { width: 28px; height: 28px; border: 1px solid #dfb6af; border-radius: 4px; color: #a04b43; background: #fff6f4; font-size: 18px; line-height: 1; cursor: pointer; }
.screening-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 22px; border-top: 1px solid #dce9e5; background: #f7fbf9; }
.screening-secondary-button { border: 1px solid #9ebfb6; color: var(--teal-dark); background: #fff; }
.screening-next-button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--teal-dark); color: #fff; background: var(--teal-dark); }
.screening-secondary-button:disabled, .screening-next-button:disabled { opacity: .55; cursor: wait; }
.screening-empty, .screening-loading { margin-top: 15px; padding: 68px 20px; border: 1px dashed #b9d1ca; border-radius: 8px; color: #718a88; background: #fbfefd; text-align: center; }
.screening-empty span { display: block; margin-bottom: 9px; color: var(--teal); font-size: 28px; }
.screening-empty h3 { margin: 0 0 6px; color: var(--teal-dark); font-size: 18px; }
.screening-empty p { margin: 0; font-size: 12px; }
.staff-sidebar-screening b { white-space: normal; }
@media (max-width: 850px) { .screening-patient-picker { grid-template-columns: 1fr; } .screening-intro, .screening-section-heading { flex-direction: column; } .screening-section-heading > p { margin-top: 0; text-align: left; } .screening-status-badge { align-self: flex-start; } }
@media (max-width: 580px) { .screening-page { padding: 0 10px 24px; } .screening-intro { padding: 18px; } .screening-section { padding: 15px; } .screening-question { grid-template-columns: 1fr; gap: 9px; } .screening-answer { justify-self: start; } .screening-actions { flex-direction: column-reverse; padding: 13px 15px; } .screening-secondary-button, .screening-next-button { justify-content: center; width: 100%; } }
.screening-record-tabs { display: flex; gap: 8px; margin: 17px 0 10px; }
.screening-record-tabs button { min-height: 38px; padding: 0 15px; border: 1px solid #b9d1ca; border-radius: 6px; color: #47686a; background: #f6fbf8; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.screening-record-tabs button b { display: inline-grid; min-width: 21px; height: 21px; margin-left: 6px; place-items: center; border-radius: 50%; color: #fff; background: #8eaaa4; font-size: 10px; }
.screening-record-tabs button.active { color: #fff; border-color: var(--teal-dark); background: var(--teal-dark); }
.screening-record-tabs button.active b { color: #294b4b; background: var(--gold); }
.screening-completed-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 9px; margin: 0 0 15px; }
.screening-completed-row { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #c8dbd6; border-radius: 7px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.screening-completed-row:hover, .screening-completed-row.active { border-color: var(--teal); background: #eef8f2; box-shadow: 0 5px 14px rgba(27, 78, 81, .09); }
.screening-completed-row > span:nth-child(2) { min-width: 0; flex: 1; }
.screening-completed-row strong, .screening-completed-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screening-completed-row strong { font-size: 12px; }
.screening-completed-row small { margin-top: 3px; color: #78908f; font-size: 10px; }
.screening-completed-row em { color: #277366; font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.screening-completed-empty { grid-column: 1 / -1; margin: 0; padding: 15px; border: 1px dashed #b9d1ca; border-radius: 7px; color: #718a88; background: #fbfefd; font-size: 11px; }
.screening-patient-account { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.screening-patient-account strong, .screening-patient-account small { display: block; }
.screening-patient-account strong { color: var(--teal-dark); font-size: 15px; }
.screening-patient-account small { margin-top: 5px; color: #718a88; font-size: 10px; }
.screening-private-note { padding: 9px 12px; border-radius: 5px; color: #286b5f; background: #e8f5ed; font-size: 11px; font-weight: 700; }
.screening-intro-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.screening-summary-button { min-height: 34px; padding: 0 13px; border: 1px solid var(--teal-dark); border-radius: 5px; color: #fff; background: var(--teal-dark); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.screening-summary-button:hover { background: #286a68; }
.screening-summary-overlay { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(16, 37, 40, .62); }
.screening-summary-modal { width: min(980px, 100%); max-height: min(900px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #a9c5bc; border-radius: 10px; background: #fff; box-shadow: 0 22px 65px rgba(9, 31, 34, .28); }
.screening-summary-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 24px 17px; border-bottom: 1px solid #d8e6e0; background: linear-gradient(135deg, #f5fbf7, #e8f4ee); }
.screening-summary-header h2 { margin: 4px 0 5px; color: var(--teal-dark); font-size: 22px; }
.screening-summary-header span { color: #718a88; font-size: 11px; }
.screening-summary-close { width: 32px; height: 32px; border: 1px solid #b7cec5; border-radius: 50%; color: var(--teal-dark); background: #fff; font-size: 21px; line-height: 1; cursor: pointer; }
.screening-summary-body { overflow-y: auto; padding: 20px 24px; }
.screening-summary-section { margin-bottom: 20px; border: 1px solid #b7cec5; border-radius: 7px; overflow: hidden; background: #fff; }
.screening-summary-section h3 { margin: 0; padding: 11px 14px; color: #fff; background: var(--teal-dark); font-size: 14px; }
.screening-summary-questions { padding: 0 14px; }
.screening-summary-question { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #e0ebe6; }
.screening-summary-question:last-child { border-bottom: 0; }
.screening-summary-question strong, .screening-summary-question p { display: block; margin: 0; color: var(--ink); font-size: 11px; line-height: 1.45; }
.screening-summary-question p { margin-top: 5px; color: #56706f; }
.screening-summary-answer { flex: 0 0 auto; min-width: 42px; padding: 5px 8px; border-radius: 4px; color: #286b5f; background: #e4f3e9; font-size: 10px; font-weight: 800; text-align: center; }
.screening-summary-answer.yes { color: #8a5721; background: #f8ead0; }
.screening-summary-long-answer { padding: 13px 0 4px; }
.screening-summary-long-answer strong { color: var(--ink); font-size: 11px; }
.screening-summary-long-answer p { margin: 7px 0 0; padding: 9px; border: 1px solid #d0e0da; border-radius: 5px; color: #526f6c; background: #f8fcfa; font-size: 11px; white-space: pre-wrap; }
.screening-summary-table-wrap { overflow-x: auto; }
.screening-summary-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.screening-summary-table th { padding: 9px 10px; color: #fff; background: #2b6261; text-align: left; white-space: nowrap; }
.screening-summary-table td { padding: 8px 10px; border-top: 1px solid #dce9e5; color: var(--ink); vertical-align: top; }
.screening-summary-table tbody tr:nth-child(even) { background: #f7fbf9; }
.screening-summary-footer { display: flex; justify-content: flex-end; padding: 13px 24px; border-top: 1px solid #d8e6e0; background: #f7fbf9; }
.screening-shell.patient-portal-shell .screening-patient-picker:not(.screening-patient-account) { display: none; }
.screening-shell.patient-portal-shell > .rise-agent-sidebar { display: none; }
.screening-shell.patient-portal-shell .screening-patient-summary { display: none; }
.screening-patient-header { min-height: 82px; padding-top: 16px; padding-bottom: 16px; }
.screening-patient-header .patient-header-title { display: flex; align-items: center; gap: 14px; }
.screening-patient-header .patient-header-title h1 { font-size: 23px; }
.screening-patient-header .patient-dashboard-button { padding: 8px 12px; border: 1px solid #c8dbd6; border-radius: 5px; color: var(--teal-dark); background: #f4faf7; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.screening-shell.patient-portal-shell .rise-agent-content { padding-top: 25px; }
.rise-stage-history-action { min-height: 27px; margin-left: auto; padding: 4px 9px !important; border: 1px solid #b9d2d0 !important; border-radius: 14px !important; color: #155e6a !important; background: #f2fbf8 !important; font-size: 10px !important; font-weight: 800; cursor: pointer; white-space: nowrap; }
.rise-process-column .rise-opportunity-meta > button.rise-stage-history-action { display: inline-flex !important; align-items: center; justify-content: center; }
.rise-stage-history-action:hover { color: #fff !important; background: #23758b !important; border-color: #23758b !important; }
.rise-stage-history-overlay { position: fixed; z-index: 3000; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(16, 37, 40, .52); }
.rise-stage-history-dialog { width: min(640px, 100%); max-height: min(760px, calc(100vh - 44px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #b6d0cc; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(16, 37, 40, .28); }
.rise-stage-history-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 17px; border-bottom: 1px solid #d9e8e4; background: #f4fbf8; }
.rise-stage-history-heading { min-width: 0; }
.rise-stage-history-eyebrow { display: block; margin-bottom: 5px; color: #3d8177; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rise-stage-history-heading h2 { margin: 0; color: #173d44; font-size: 22px; line-height: 1.2; }
.rise-stage-history-heading p { margin: 5px 0 0; color: #6d8784; font-size: 12px; }
.rise-stage-history-close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #b7d2cd; border-radius: 50%; color: #2a6264; background: #fff; font-size: 23px; line-height: 1; cursor: pointer; }
.rise-stage-history-close:hover { color: #fff; background: #23758b; }
.rise-stage-history-body { min-height: 120px; overflow-y: auto; padding: 20px 24px 24px; }
.rise-stage-history-list { display: grid; gap: 12px; }
.rise-stage-history-item { position: relative; padding: 15px 16px; border: 1px solid #c9dfda; border-left: 4px solid #3d8177; border-radius: 10px; background: #fbfefd; }
.rise-stage-history-item-header { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.rise-stage-history-item-header strong { color: #174f67; font-size: 14px; }
.rise-stage-history-item-header time { color: #718a88; font-size: 11px; white-space: nowrap; }
.rise-stage-history-transition { margin-top: 7px; color: #315e63; font-size: 12px; font-weight: 700; }
.rise-stage-history-meta { display: block; margin-top: 7px; color: #78908d; font-size: 10px; }
.rise-stage-history-note { margin: 11px 0 0; padding: 10px 12px; border-radius: 7px; color: #314e52; background: #fff8df; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.rise-stage-history-empty { margin: 0; padding: 28px 10px; color: #718a88; font-size: 13px; text-align: center; }
.rise-stage-history-empty.error { color: #a64943; }
.patient-messaging-toggle { margin-left: auto; padding: 7px 10px; border: 1px solid #cc9b55; border-radius: 8px; color: #805522; background: #fff7df; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.patient-messaging-toggle:hover { color: #fff; background: #a66b2d; }
.patient-messaging-toggle.is-paused { border-color: #8ebbb0; color: #216a62; background: #eaf8f2; }
.patient-messaging-banner, .staff-messaging-paused-banner { display: flex; align-items: flex-start; gap: 8px; margin: 10px 14px; padding: 10px 12px; border: 1px solid #e1bd76; border-radius: 8px; color: #6d4a25; background: #fff7df; font-size: 12px; line-height: 1.4; }
.patient-messaging-banner strong, .staff-messaging-paused-banner strong { flex: 0 0 auto; color: #805522; }
.staff-messaging-paused-banner { margin: 12px 0; border-color: #e1bd76; color: #6d4a25; background: #fff7df; }
.staff-messaging-paused-banner strong { color: #805522; }
.message-composer.is-disabled, .crm-composer.is-disabled { opacity: .62; pointer-events: none; }
.messaging-paused .conversation-body { border-color: #e1bd76; }
@media (max-width: 580px) { .screening-patient-account { align-items: flex-start; flex-direction: column; } .screening-private-note { width: 100%; box-sizing: border-box; } .screening-patient-header .profile-chip div { display: none; } }
