/* Harvis Health — static front-end (theme from Streamlit main.py / theme.py) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f0f0f6;
  --surface: #ffffff;
  --border: #e2e2ea;
  --border2: #c8c8d8;
  --text: #1a1a2e;
  --text2: #6b6b88;
  --text3: #9b9bb8;
  --p1: #3b5fe2;
  --p2: #7c3aed;
  --p3: #9b3fd4;
  --grad: linear-gradient(135deg, #3b5fe2 0%, #7c3aed 55%, #9b3fd4 100%);
  --p-bg: #f3f0ff;
  --p-border: rgba(124, 58, 237, 0.2);
  --p-text: #6d28d9;
  --shadow: 0 2px 10px rgba(59, 95, 226, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 32px rgba(124, 58, 237, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --sidebar-width: 280px;
  --sidebar-collapsed: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

.font-display {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
}

/* ── App shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 12px rgba(124, 58, 237, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.22s ease, transform 0.22s ease;
  z-index: 1030;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sb-logo-name,
.sidebar.collapsed .sb-logo-tag,
.sidebar.collapsed .sb-section,
.sidebar.collapsed .sb-nav-item span:not(.sb-nav-icon),
.sidebar.collapsed .sb-footer,
.sidebar.collapsed .patient-block label,
.sidebar.collapsed .patient-block .form-control,
.sidebar.collapsed .patient-block .alert {
  display: none !important;
}

.sidebar.collapsed .sb-nav-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar.collapsed .sb-top {
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sidebar.collapsed .sb-logo {
  justify-content: center;
  margin-bottom: 0;
  padding-right: 0;
}

.sidebar.collapsed .sidebar-toggle {
  position: static;
  margin: 0 auto;
  width: 30px;
  height: 30px;
}

.sidebar.collapsed .sb-nav-item {
  margin: 4px 8px;
  min-height: 40px;
}

.sidebar.collapsed .sb-nav-item.active {
  margin-left: 8px;
  padding-left: 0;
  border-left: none;
}

.sidebar-toggle {
  position: absolute;
  top: 12px;
  right: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.35);
}

.sidebar .sb-top {
  position: relative;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.5rem 2rem;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
  }

  .sidebar.offcanvas-mobile:not(.show-mobile) {
    transform: translateX(-100%);
  }

  .main-wrap {
    padding-top: 3.5rem;
  }

  .mobile-menu-btn {
    display: flex !important;
  }
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1020;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* ── Sidebar blocks ── */
.sb-top {
  padding: 20px 20px 14px;
  background: linear-gradient(90deg, #6d82e8 0%, #6b73d7 42%, #6d4aa6 100%);
  margin-bottom: 8px;
}

.sb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  padding-right: 32px;
}

.sb-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.sb-logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.sb-logo-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.sb-logo-tag {
  font-size: 10px;
  color: rgba(242, 246, 255, 0.9);
  padding-left: 44px;
  margin-top: 1px;
}

.sb-section {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 14px;
  margin-bottom: 4px;
}

.sb-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sb-nav-item:hover {
  background: var(--p-bg);
  color: var(--p-text);
}

.sb-nav-item.active {
  background: var(--p-bg);
  color: var(--p-text);
  border-left: 3px solid var(--p2);
  margin-left: 5px;
  padding-left: 9px;
}

.sb-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--bg);
  flex-shrink: 0;
}

.sb-nav-item.active .sb-nav-icon {
  background: rgba(124, 58, 237, 0.1);
}

.sb-footer {
  margin: 14px 8px 8px;
  margin-top: auto;
  padding: 12px 14px;
  background: var(--p-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--p-border);
}

.sb-footer-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--p-text);
  margin-bottom: 2px;
}

.sb-footer-sub {
  font-size: 10px;
  color: var(--text3);
}

.patient-block {
  padding: 0 12px 12px;
}

/* ── Hero ── */
.hero-banner {
  background: var(--grad);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(124, 58, 237, 0.28);
}

.hero-banner.centered {
  padding: 40px 48px;
  text-align: center;
}

.hero-banner.centered h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.125rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  position: relative;
  z-index: 1;
  letter-spacing: -0.5px;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.hero-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: #fff;
}

.hero-text h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.15rem, 2.5vw, 1.375rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px;
}

.hero-text p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.hero-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

@media (max-width: 575.98px) {
  .hero-badge {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

/* ── Home cards ── */
.section-title {
  text-align: center;
  margin-bottom: 28px;
  margin-top: 4px;
}

.section-title h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 7px;
  letter-spacing: -0.3px;
}

.section-title p {
  font-size: 14px;
  color: var(--text2);
  margin: 0;
}

.spec-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.22s, border-color 0.22s;
  text-decoration: none;
  display: block;
  box-shadow: var(--shadow);
  height: 100%;
  position: relative;
  overflow: hidden;
  color: inherit;
}

.spec-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.2s;
}

.spec-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, 0.3);
  color: inherit;
}

.spec-card:hover::before {
  opacity: 1;
}

.spec-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
  line-height: 1;
}

.spec-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.spec-desc {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.spec-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: all 0.15s;
}

.spec-card:hover .spec-btn {
  border-color: var(--p2);
  color: var(--p-text);
  background: var(--p-bg);
}

.spec-check {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border2);
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Upload zone (page1) ── */
.upload-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.upload-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}

.drop-zone {
  border: 2px dashed rgba(124, 58, 237, 0.35);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.75rem 1.25rem;
  transition: border-color 0.15s, background 0.15s;
}

.drop-zone.dragover {
  border-color: var(--p2);
  background: var(--p-bg);
}

.drop-zone-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.drop-zone .bi-cloud-arrow-up {
  font-size: 2rem;
  color: var(--p2);
}

/* ── Panels ── */
.panel,
.left-panel,
.right-panel,
.ui-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.panel-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-sub {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 16px;
}

.panel-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.auth-box {
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
}

.auth-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--p-text);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.scroll-container {
  max-height: 460px;
  overflow-y: auto;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1.5px solid var(--border);
}

.scroll-container img {
  border-radius: 8px;
  margin-bottom: 12px;
  width: 100%;
  box-shadow: var(--shadow);
}

.img-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.8px;
  margin: 10px 0 5px 2px;
  text-transform: uppercase;
}

.panel-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.panel-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: all 0.15s;
}

.file-row:hover {
  border-color: var(--p-border);
  background: var(--p-bg);
}

.file-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.file-row-name {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.hdivider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.sum-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  color: var(--p-text);
}

.sum-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}

.sum-body {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text2);
  background: #fdf6ec;
  border: 1px solid var(--p-border);
  border-left: 3px solid var(--p2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  white-space: pre-wrap;
}

.visit-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.visit-sep::before,
.visit-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ui-card h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}

.result-banner {
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.result-banner .icon {
  width: 36px;
  height: 36px;
  background: var(--grad);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.result-banner .text strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  display: block;
}

.result-banner .text span {
  color: var(--text2);
  font-size: 12px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-icon {
  font-size: 2.75rem;
  margin-bottom: 14px;
  opacity: 0.35;
}

.empty-text {
  font-size: 14px;
  color: var(--text3);
}

.empty-sub {
  font-size: 12px;
  color: var(--border2);
  margin-top: 6px;
}

/* ── Buttons ── */
.btn-gradient {
  background: var(--grad);
  border: none;
  color: #fff !important;
  font-weight: 600;
  border-radius: 100px;
  padding: 0.55rem 1.5rem;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
  color: #fff !important;
}

.btn-outline-soft {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.btn-outline-soft:hover {
  border-color: var(--p2);
  background: var(--p-bg);
  color: var(--p-text);
}

/* ── Form controls ── */
.form-control,
.form-select {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  padding: 10px 12px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--p2);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  background: var(--bg);
  color: var(--text);
}

.form-control::placeholder {
  color: var(--text3);
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
}

/* Section pills (discharge) */
.section-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 52px;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #607280;
  color: #fff;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  cursor: default;
}

.section-pill button {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  padding: 0;
  line-height: 1;
  cursor: pointer;
  font-size: 1rem;
}

.section-pill button:hover {
  color: #fff;
}

/* Mic + waveform (page3) */
.mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.btn-mic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #0ea5e9;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background 0.2s;
}

.btn-mic:hover {
  transform: scale(1.1);
  background: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.btn-mic.recording {
  background: #dc3545;
  animation: pulse-mic 1s ease-in-out infinite;
}

@keyframes pulse-mic {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
}

.wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  justify-content: center;
}

.wave-bars span {
  display: block;
  width: 3px;
  background: #ff5c5c;
  border-radius: 2px;
  animation: waveBar 0.8s ease-in-out infinite;
}

.wave-bars span:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}
.wave-bars span:nth-child(2) {
  height: 16px;
  animation-delay: 0.1s;
}
.wave-bars span:nth-child(3) {
  height: 10px;
  animation-delay: 0.2s;
}
.wave-bars span:nth-child(4) {
  height: 20px;
  animation-delay: 0.3s;
}
.wave-bars span:nth-child(5) {
  height: 12px;
  animation-delay: 0.15s;
}

@keyframes waveBar {
  0%,
  100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.4);
  }
}

.recording-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255, 60, 60, 0.3);
  border-radius: 30px;
  padding: 10px 20px;
  margin-top: 8px;
}

.rec-dot {
  width: 12px;
  height: 12px;
  background: #ff3b3b;
  border-radius: 50%;
  animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.rec-label {
  color: #ff5c5c;
  font-weight: 600;
  font-size: 0.85rem;
}

.rec-timer {
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 700;
  min-width: 52px;
}

.rec-hint {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  margin-left: auto;
}

.alert-soft-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.pid-badge {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  border-radius: 8px;
  font-size: 11px;
  color: var(--p-text);
  font-weight: 500;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text3);
}

.output-frame-wrap {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 400px;
  background: var(--bg);
}

.output-frame-wrap iframe {
  width: 100%;
  min-height: 400px;
  border: 0;
  display: block;
}

/* Utilities */
.dot-gradient {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #3b5fe2, #7c3aed);
  border-radius: 50%;
  display: inline-block;
}

/* ──────────────────────────────────────────────
   PREMIUM CUSTOMER-FACING POLISH
   ────────────────────────────────────────────── */

/* Animated status dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: dot-pulse 2.2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  }
  60%,
  100% {
    box-shadow: 0 0 0 10px rgba(52, 211, 153, 0);
  }
}

/* ── Premium hero ── */
.hero-pro {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(2.5rem, 5vw, 4.25rem) clamp(1.25rem, 4vw, 3rem) 0;
  margin-bottom: 2.25rem;
  background: radial-gradient(circle at 0% 0%, #5b3aed 0%, transparent 55%),
    radial-gradient(circle at 100% 0%, #9b3fd4 0%, transparent 55%),
    linear-gradient(135deg, #1e1b4b 0%, #2e1d6b 45%, #4a1f8c 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(76, 29, 149, 0.35);
  isolation: isolate;
}

.hero-pro-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  animation: blob-float 14s ease-in-out infinite;
}

.blob-a {
  width: 380px;
  height: 380px;
  background: #6366f1;
  top: -120px;
  right: -100px;
}

.blob-b {
  width: 320px;
  height: 320px;
  background: #ec4899;
  bottom: -120px;
  left: -80px;
  animation-delay: -7s;
}

@keyframes blob-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -30px) scale(1.05);
  }
}

.hero-pro-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero-pro-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 2.25rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #fff;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #c4b5fd 0%, #f9a8d4 50%, #fde68a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero-lede {
  font-size: clamp(0.95rem, 1.4vw, 1.0625rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-light-pro {
  background: #fff;
  color: #4c1d95 !important;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-light-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  color: #4c1d95 !important;
}

.btn-ghost-pro {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff !important;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  transition: background 0.15s, border-color 0.15s, transform 0.2s;
}

.btn-ghost-pro:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  color: #fff !important;
}

/* Floating glyphs */
.hero-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-glyph {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  backdrop-filter: blur(8px);
  animation: float-y 7s ease-in-out infinite;
}

.float-glyph.f1 {
  top: 18%;
  left: 6%;
  animation-delay: -1s;
}
.float-glyph.f2 {
  top: 14%;
  right: 8%;
  animation-delay: -3s;
}
.float-glyph.f3 {
  bottom: 38%;
  left: 4%;
  animation-delay: -5s;
}
.float-glyph.f4 {
  bottom: 32%;
  right: 6%;
  animation-delay: -2s;
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@media (max-width: 767.98px) {
  .float-glyph {
    display: none;
  }
}

/* Stats strip inside hero */
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 1.1rem 1.5rem;
  max-width: 820px;
  margin: 0 auto;
  transform: translateY(40%);
  margin-bottom: -2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.75rem;
  flex: 1;
  min-width: 110px;
}

.stat-value {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

.stat-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.25), transparent);
}

@media (max-width: 575.98px) {
  .stat-divider {
    display: none;
  }
  .hero-stats {
    transform: none;
    margin-top: 1rem;
    margin-bottom: 0;
  }
}

/* Sections + eyebrows */
.apps-section {
  margin-top: 4rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--p-text);
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Premium spec cards */
.spec-card-pro {
  position: relative;
  padding: 2rem 1.5rem 1.75rem;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
}

.spec-card-pro::before {
  display: none;
}

.spec-card-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0) 0%, rgba(124, 58, 237, 0.45) 50%, rgba(155, 63, 212, 0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s;
  z-index: -1;
}

.spec-card-pro:hover .spec-card-glow {
  opacity: 1;
}

.spec-icon-pro {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, #3b5fe2, #7c3aed);
  box-shadow: 0 10px 24px rgba(59, 95, 226, 0.3);
  margin-bottom: 1rem;
  transition: transform 0.25s;
}

.spec-icon-pro.icon-violet {
  background: linear-gradient(135deg, #7c3aed, #9b3fd4);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.32);
}

.spec-icon-pro.icon-magenta {
  background: linear-gradient(135deg, #9b3fd4, #ec4899);
  box-shadow: 0 10px 24px rgba(155, 63, 212, 0.32);
}

.spec-card-pro:hover .spec-icon-pro {
  transform: rotate(-4deg) scale(1.05);
}

.spec-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--p-text);
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.spec-card-pro .spec-title {
  text-align: left;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.spec-card-pro .spec-desc {
  text-align: left;
  margin-bottom: 1rem;
  color: var(--text2);
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.spec-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  padding: 4px 0;
}

.spec-list li i {
  color: var(--p2);
  font-size: 14px;
}

.spec-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--p-text);
  transition: gap 0.2s;
}

.spec-card-pro:hover .spec-cta {
  gap: 12px;
}

.spec-cta i {
  transition: transform 0.2s;
}

.spec-card-pro:hover .spec-cta i {
  transform: translateX(4px);
}

/* Why Harvis */
.why-section {
  margin-top: 4rem;
}

.why-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow);
}

.why-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: var(--shadow-lg);
}

.why-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--p-text);
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  margin-bottom: 0.85rem;
}

.why-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.why-desc {
  font-size: 12.5px;
  color: var(--text3);
  line-height: 1.55;
}

/* Trust strip */
.trust-strip {
  margin-top: 3rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow);
}

.trust-item {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-item i {
  color: var(--p2);
  font-size: 1rem;
}

/* Reveal animation for sections */
.apps-section,
.why-section,
.trust-strip {
  animation: rise 0.6s ease both;
}

.apps-section {
  animation-delay: 0.05s;
}
.why-section {
  animation-delay: 0.1s;
}
.trust-strip {
  animation-delay: 0.15s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Inner-page premium hero (v2) ── */
.hero-banner {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.55) 0%, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.35) 0%, transparent 55%),
    linear-gradient(135deg, #3b5fe2 0%, #7c3aed 55%, #9b3fd4 100%);
  border-radius: 22px;
  padding: 1.75rem 2rem;
  box-shadow: 0 18px 44px rgba(76, 29, 149, 0.28);
}

.hero-banner .hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.hero-banner .hero-content {
  position: relative;
  z-index: 1;
}

.hero-icon-wrap {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hero-badge {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Tools/feature row beneath inner hero */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}

.kpi-tile {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.kpi-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: var(--shadow-lg);
}

.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(135deg, #3b5fe2, #7c3aed);
  box-shadow: 0 4px 12px rgba(59, 95, 226, 0.28);
  font-size: 1rem;
}

.kpi-icon.violet {
  background: linear-gradient(135deg, #7c3aed, #9b3fd4);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
}

.kpi-icon.magenta {
  background: linear-gradient(135deg, #9b3fd4, #ec4899);
  box-shadow: 0 4px 12px rgba(155, 63, 212, 0.28);
}

.kpi-icon.amber {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}

.kpi-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text3);
}

.kpi-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Premium drop zone (document-extractor) ── */
.drop-zone {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8f7ff 100%);
  border: 2px dashed rgba(124, 58, 237, 0.3);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.drop-zone:hover {
  border-color: var(--p2);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
}

.drop-zone.dragover {
  border-color: var(--p2);
  background: linear-gradient(135deg, var(--p-bg) 0%, #ffffff 100%);
  transform: scale(1.005);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.18);
}

.drop-zone .drop-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1f3aa5, #4b1fad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 24px rgba(31, 58, 165, 0.35);
  flex-shrink: 0;
}

.drop-zone .drop-icon-wrap .bi {
  color: #ffffff;
  opacity: 1;
}

.drop-zone .drop-headline {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.drop-zone .drop-sub {
  font-size: 12px;
  color: var(--text3);
  margin: 2px 0 0;
}

.upload-label-row .upload-label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Animated empty states */
.empty-state .empty-icon-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--p-text);
  background: radial-gradient(circle at 30% 30%, var(--p-bg) 0%, #ffffff 100%);
  border: 1.5px solid var(--p-border);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.1);
  position: relative;
  animation: bob 4s ease-in-out infinite;
}

.empty-state .empty-icon-circle::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px dashed rgba(124, 58, 237, 0.18);
  animation: spin-slow 18s linear infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

.empty-state .empty-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.empty-state .empty-sub {
  font-size: 12.5px;
  color: var(--text3);
  margin-top: 6px;
}

/* Panels — premium */
.panel,
.left-panel,
.right-panel,
.ui-card {
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.panel:hover,
.ui-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, 0.18);
}

.panel-title {
  font-size: 15px;
}

.ui-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ui-card h3::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--grad);
  display: inline-block;
}

/* Section pills upgrade */
.section-pill {
  background: linear-gradient(135deg, #6b6f80, #4b4f63);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 12px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s, box-shadow 0.15s;
}

.section-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Button polish */
.btn-gradient {
  position: relative;
  overflow: hidden;
}

.btn-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-gradient:hover::after {
  opacity: 1;
}

/* Scroll container polish */
.scroll-container {
  background: linear-gradient(135deg, #ffffff 0%, #faf9ff 100%);
}

/* Result banner upgrade */
.result-banner {
  background: linear-gradient(135deg, var(--p-bg) 0%, #ffffff 100%);
}

/* Sum body warmer */
.sum-body {
  background: linear-gradient(135deg, #fdf6ec 0%, #fffdf7 100%);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.04);
}

/* File row premium */
.file-row {
  background: linear-gradient(135deg, #ffffff 0%, #fbfaff 100%);
}

.file-row:hover {
  background: var(--p-bg);
  transform: translateX(2px);
}

.btn-download-pdf {
  border: 1px solid rgba(59, 95, 226, 0.25);
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  color: #334155;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 4px 10px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}

.btn-download-pdf i {
  color: #7c3aed;
}

.btn-download-pdf:hover {
  border-color: rgba(124, 58, 237, 0.45);
  color: #4c1d95;
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(124, 58, 237, 0.18);
}

.visit-select-clean {
  min-height: 52px;
  background: linear-gradient(135deg, #ffffff 0%, #faf8ff 100%);
  border: 1.5px solid rgba(124, 58, 237, 0.22);
  padding: 6px;
}

.visit-select-clean option {
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 2px;
}

.visit-select-clean option:checked {
  background: linear-gradient(135deg, #6d82e8 0%, #7c3aed 100%);
  color: #ffffff;
}

/* Clinical visit selector (Tom Select) */
.visit-select-clean + .ts-wrapper.multi .ts-control {
  min-height: 48px;
  border: 1.5px solid rgba(124, 58, 237, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #faf8ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  padding: 5px 8px;
  max-height: 88px;
  overflow-y: auto;
}

.visit-select-clean + .ts-wrapper.multi.has-items .ts-control {
  padding: 5px 8px;
}

.visit-select-clean + .ts-wrapper.multi .ts-control > div {
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: #f5f3ff;
  color: #5b21b6;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
}

.visit-select-clean + .ts-wrapper.plugin-remove_button .item .remove {
  border-left: 1px solid rgba(124, 58, 237, 0.2);
  color: #7c3aed;
  padding-left: 7px;
}

.visit-select-clean + .ts-wrapper .ts-dropdown {
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 12px;
  overflow: hidden;
}

.visit-select-clean + .ts-wrapper .ts-dropdown .option {
  padding: 10px 12px;
  font-size: 13px;
}

.visit-select-clean + .ts-wrapper .ts-dropdown .active {
  background: #f4f1ff;
  color: #4c1d95;
}

/* Generate animation when result arrives */
.fade-in-up {
  animation: rise 0.45s ease both;
}

.dot-gradient-alt {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #7c3aed, #9b3fd4);
  border-radius: 50%;
  display: inline-block;
}

/* ──────────────────────────────────────────────
   CLINICAL SUMMARIZER — left-panel icon badges
   ────────────────────────────────────────────── */

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
}

.left-panel:hover .panel-header__icon {
  transform: rotate(-3deg) scale(1.04);
}

.panel-header__icon--blue {
  background: linear-gradient(135deg, #3b5fe2, #6366f1);
  box-shadow: 0 6px 14px rgba(59, 95, 226, 0.28);
}

.panel-header__icon--purple {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.28);
}

.panel-header__icon--magenta {
  background: linear-gradient(135deg, #9b3fd4, #ec4899);
  box-shadow: 0 6px 14px rgba(155, 63, 212, 0.28);
}

.panel-header__icon--teal {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.28);
}

.panel-header__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.panel-header__title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.panel-header__sub {
  font-size: 11.5px;
  color: var(--text3);
  margin-top: 2px;
}

.file-list-mount {
  background: linear-gradient(135deg, #fcfbff 0%, #f7f4ff 100%);
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 12px;
  padding: 8px;
}

.file-list-mount .file-row {
  padding: 10px 12px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #fdfdff 100%);
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.06);
}

.file-list-mount .file-row:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: linear-gradient(135deg, #f8f5ff 0%, #f2ebff 100%);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
}

.file-list-mount .file-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.file-list-mount .file-row-name {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.file-list-mount:empty::before {
  content: "No files loaded yet — enter a Patient ID to populate this list.";
  display: block;
  font-size: 12px;
  color: #6b7280;
  background: linear-gradient(135deg, #ffffff 0%, #f6f5ff 100%);
  border: 1px dashed rgba(124, 58, 237, 0.24);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

/* ──────────────────────────────────────────────
   SIDEBAR Patient block — premium block
   ────────────────────────────────────────────── */

.patient-block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 10px;
}

.patient-block__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7c3aed, #9b3fd4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 5px 12px rgba(124, 58, 237, 0.28);
}

.patient-block__title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.patient-block__sub {
  font-size: 10.5px;
  color: var(--text3);
}

.pid-input-group .input-group-text {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-right: 0;
  color: var(--text3);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.pid-input-group .form-control {
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.pid-input-group .form-control:focus {
  border-left: 0;
  box-shadow: none;
}

.pid-input-group:focus-within .input-group-text,
.pid-input-group:focus-within .form-control {
  border-color: var(--p2);
}

.pid-input-group:focus-within .input-group-text {
  color: var(--p2);
  background: var(--p-bg);
}

.alert-soft-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  line-height: 1.4;
}

/* ── Clinical Summarizer — main-page Patient Info card ── */
.patient-info-card {
  border-left: 3px solid var(--p2);
}

.patient-info-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: inline-block;
}

.patient-info-card h3::before {
  display: none;
}

.patient-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #9b3fd4 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.25);
}

.patient-info-card .input-group-text {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-right: 0;
  color: var(--text3);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.patient-info-card .input-group .form-control {
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.patient-info-card .input-group .form-control:focus {
  border-left: 0;
  box-shadow: none;
}

.patient-info-card .input-group:focus-within .input-group-text,
.patient-info-card .input-group:focus-within .form-control {
  border-color: var(--p2);
}

.patient-info-card .input-group:focus-within .input-group-text {
  color: var(--p2);
  background: var(--p-bg);
}

.patient-info-card .pid-badge {
  margin: 0;
  white-space: nowrap;
}

/* ── Home page top banner (reference style) ── */
.home-header-banner {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border-radius: 8px;
  margin: 0 0 22px;
  padding: 26px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  isolation: isolate;
  background: linear-gradient(98deg, #5f7ce6 0%, #5d75dd 36%, #6f47b8 68%, #6a3cae 100%);
}

.home-header-content {
  position: relative;
  z-index: 2;
  max-width: 72%;
}

.home-header-content h1 {
  margin: 0 0 6px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.1px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.home-header-content p {
  margin: 0;
  color: rgba(244, 247, 255, 0.95);
  font-size: clamp(0.92rem, 1.3vw, 1.12rem);
  line-height: 1.45;
}

.home-header-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 320px at 102% -12%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(780px 250px at 98% 108%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 66%);
  z-index: 0;
  pointer-events: none;
}

.home-header-ai {
  position: relative;
  z-index: 3;
  margin-right: 14px;
  width: 132px;
  height: 110px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, rgba(180, 236, 255, 0.35), rgba(163, 118, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 14px 30px rgba(38, 12, 88, 0.36);
  transform: perspective(600px) rotateY(-14deg);
}

.home-header-ai-text {
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(180deg, #d8f2ff 0%, #9eddff 45%, #9ab4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4),
    0 7px 20px rgba(17, 65, 180, 0.45);
}

.home-header-ai i {
  position: absolute;
  right: 15px;
  top: 11px;
  font-size: 1.35rem;
  color: #6de1ff;
  text-shadow: 0 0 12px rgba(135, 244, 255, 0.95);
}

.home-header-wave {
  position: absolute;
  left: 26%;
  right: -10%;
  bottom: -54px;
  height: 152px;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(150% 130% at 50% 0%, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.58) 32%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(120% 120% at 56% 0%, rgba(190, 232, 255, 0.53) 0%, rgba(190, 232, 255, 0.28) 35%, rgba(190, 232, 255, 0) 70%);
  border-radius: 50% 50% 0 0;
  transform: rotate(-6deg);
}

@media (max-width: 991.98px) {
  .home-header-banner {
    min-height: 140px;
    padding: 22px 16px;
  }

  .home-header-content {
    max-width: 100%;
  }

  .home-header-ai {
    width: 96px;
    height: 84px;
    border-radius: 18px;
    margin-right: 2px;
  }

  .home-header-ai-text {
    font-size: 2.2rem;
  }

  .home-header-ai i {
    right: 9px;
    top: 7px;
    font-size: 1rem;
  }

  .home-header-wave {
    left: 18%;
    right: -26%;
    bottom: -64px;
  }
}

/* ── Compact Patient ID fields (Clinical + Discharge) ── */
.patient-info-card .pid-input-compact {
  max-width: 460px;
}

.discharge-pid-col .discharge-pid-input {
  max-width: 460px;
}

@media (max-width: 767.98px) {
  .patient-info-card .pid-input-compact,
  .discharge-pid-col .discharge-pid-input {
    max-width: 100%;
  }
}

.discharge-pid-wrap {
  position: relative;
  max-width: 460px;
}

.discharge-top-controls .discharge-pid-wrap,
.discharge-top-controls .discharge-pid-col .discharge-pid-input {
  max-width: 100%;
}

.discharge-top-controls .discharge-main-row {
  align-items: stretch;
}

.discharge-left-stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.discharge-top-controls .section-pills-wrap {
  min-height: 46px;
  padding: 10px;
}

.discharge-top-controls .discharge-pid-input,
.discharge-top-controls .discharge-generate-btn {
  min-height: 42px;
  height: 42px;
}

.discharge-pid-wrap.recording-active .discharge-pid-input {
  border-color: #14b8a6;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.discharge-voice-state {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #334155;
  background: #e2e8f0;
}

.voice-status-badge.active {
  color: #065f46;
  background: #bbf7d0;
}

.discharge-top-controls .discharge-action-col {
  display: flex;
  flex-direction: column;
}

.discharge-top-controls .discharge-action-col .discharge-generate-btn {
  width: 100%;
  max-width: 320px;
}

.section-picker-controls #sectionDropdown {
  min-width: 220px;
}

.discharge-pid-wrap .discharge-pid-input {
  padding-right: 44px;
}

.discharge-mic-inside {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--p3), #10b981);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.discharge-mic-inside:hover {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 10px 18px rgba(16, 185, 129, 0.34);
}

.discharge-mic-inside.recording {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.discharge-mic-inside i {
  font-size: 0.78rem;
}

@media (max-width: 767.98px) {
  .discharge-pid-wrap {
    max-width: 100%;
  }
}

.discharge-voice-status {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.discharge-voice-status.is-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.discharge-voice-status.is-success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.discharge-voice-status.is-info {
  color: var(--p-text);
  background: var(--p-bg);
  border-color: var(--p-border);
}
