* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f4f8ff;
  --card: rgba(255, 255, 255, 0.78);
  --border: rgba(226, 232, 240, 0.9);
  --text: #101828;
  --muted: #667085;
  --blue: #2563eb;
  --cyan: #0ea5e9;
  --green: #16a34a;
  --yellow: #ca8a04;
  --red: #ef4444;
  --dark: #0f172a;
  --shadow: 0 22px 70px rgba(37, 99, 235, 0.13);
  --radius: 26px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 30%),
    linear-gradient(135deg, #f8fbff, #edf4ff);
  color: var(--text);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  border: none;
  cursor: pointer;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #dbe3ef;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

textarea {
  min-height: 110px;
  resize: vertical;
  margin-top: 12px;
}

.primary-btn,
.secondary-btn,
.outline-btn,
.dark-btn,
.biometric-btn {
  border-radius: 16px;
  padding: 13px 20px;
  font-weight: 800;
  transition: 0.25s ease;
  white-space: nowrap;
}

.primary-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.26);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(37, 99, 235, 0.35);
}

.secondary-btn {
  background: #eef5ff;
  color: var(--blue);
}

.outline-btn {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.8);
  color: var(--dark);
}

.dark-btn {
  background: var(--dark);
  color: white;
}

.full-btn {
  width: 100%;
}

.fade-up {
  animation: fadeUp 0.75s ease forwards;
}

.delay {
  animation-delay: 0.18s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Landing */

.landing-body {
  overflow-x: hidden;
}

.landing-page {
  min-height: 100vh;
  padding: 24px;
}

.landing-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.brand-mark h3,
.sidebar-brand h3 {
  font-size: 18px;
}

.brand-mark span,
.sidebar-brand span {
  color: var(--muted);
  font-size: 13px;
}

.hero-section {
  max-width: 1180px;
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.eyebrow,
.page-kicker {
  display: inline-flex;
  color: var(--blue);
  background: #eaf2ff;
  border: 1px solid #cfe0ff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 18px;
}

.hero-content h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -2.6px;
  max-width: 780px;
}

.hero-content p {
  margin-top: 22px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 18px;
  max-width: 690px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.trust-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.trust-row span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  color: #344054;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-preview {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 360px;
  min-height: 680px;
  border-radius: 46px;
  background: #0f172a;
  padding: 16px;
  box-shadow: 0 38px 120px rgba(15, 23, 42, 0.28);
  position: relative;
}

.phone-top {
  width: 110px;
  height: 25px;
  background: #020617;
  border-radius: 0 0 18px 18px;
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.mini-dashboard {
  background: linear-gradient(180deg, #f8fbff, #edf4ff);
  border-radius: 36px;
  min-height: 648px;
  padding: 42px 20px 20px;
}

.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-head small,
.mini-card span,
.mini-grid span,
.mini-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.live-dot {
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(34,197,94,0.14);
}

.mini-card,
.mini-grid div,
.mini-note {
  background: white;
  border: 1px solid #e5edf8;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 14px 35px rgba(37,99,235,0.08);
}

.mini-card {
  margin-top: 22px;
}

.mini-card.blue {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
}

.mini-card.blue span,
.mini-card.blue p {
  color: rgba(255,255,255,0.82);
}

.mini-card strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.mini-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.mini-note {
  margin-top: 12px;
}

.mini-note p {
  color: #475467;
  line-height: 1.6;
  margin-top: 8px;
}

.mini-dashboard button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: var(--dark);
  color: white;
  font-weight: 900;
}

.preview-section {
  max-width: 1180px;
  margin: 100px auto 40px;
}

.section-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 34px;
}

.section-title span {
  color: var(--blue);
  font-weight: 900;
}

.section-title h2 {
  font-size: 38px;
  margin: 10px 0;
  letter-spacing: -1px;
}

.section-title p {
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-grid.smaller {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-icon {
  font-size: 30px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.65;
}

/* Auth */

.auth-body {
  min-height: 100vh;
}

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
}

.auth-left {
  background:
    linear-gradient(135deg, rgba(37,99,235,0.92), rgba(14,165,233,0.88)),
    radial-gradient(circle at top left, rgba(255,255,255,0.28), transparent 40%);
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-mark.light span {
  color: rgba(255,255,255,0.78);
}

.auth-left h1 {
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -2px;
  margin-top: 90px;
  max-width: 760px;
}

.auth-left p {
  max-width: 650px;
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
  margin-top: 22px;
  font-size: 18px;
}

.auth-points {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-points span {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.auth-card {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(16px);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mobile-brand {
  display: none;
}

.auth-card h2 {
  font-size: 34px;
  letter-spacing: -0.8px;
}

.auth-card p {
  color: var(--muted);
  margin: 8px 0 28px;
}

.auth-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
  color: #344054;
}

.auth-card input,
.auth-card select {
  margin-bottom: 18px;
}

.biometric-btn {
  width: 100%;
  margin-top: 14px;
  background: #eef5ff;
  color: var(--blue);
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-top: 20px;
  font-size: 13px;
  font-weight: 700;
}

/* App Layout */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 286px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  padding: 24px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  margin-bottom: 32px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-nav a {
  padding: 14px 16px;
  border-radius: 16px;
  color: #475467;
  font-weight: 900;
  transition: 0.25s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(37,99,235,0.22);
}

.sidebar-security {
  margin-top: auto;
  background: #f8fbff;
  border: 1px solid #e5edf8;
  border-radius: 20px;
  padding: 16px;
}

.sidebar-security span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.sidebar-security strong {
  color: var(--blue);
}

.logout-btn {
  margin-top: 14px;
  width: 100%;
  padding: 13px;
  border-radius: 16px;
  background: #fff1f2;
  color: #e11d48;
  font-weight: 900;
}

.main-content {
  margin-left: 286px;
  width: calc(100% - 286px);
  padding: 30px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}

.topbar h1 {
  font-size: 38px;
  letter-spacing: -1.2px;
  margin-bottom: 8px;
}

.topbar p {
  color: var(--muted);
  line-height: 1.6;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.panel,
.stat-card {
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.82);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.panel {
  padding: 24px;
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-head h2,
.panel h2 {
  font-size: 22px;
  letter-spacing: -0.4px;
}

.panel-head p,
.panel p {
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.55;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -32px;
  top: -32px;
  background: rgba(37,99,235,0.08);
  border-radius: 50%;
}

.stat-icon {
  font-size: 26px;
  margin-bottom: 16px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 900;
}

.stat-card strong {
  display: block;
  font-size: 36px;
  margin: 10px 0;
}

.stat-card p {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 22px;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-item {
  background: #f8fbff;
  border: 1px solid #e8eef8;
  border-radius: 22px;
  padding: 16px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
}

.record-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.record-item p {
  color: #475467;
  margin: 4px 0;
}

.record-item small {
  color: var(--muted);
  line-height: 1.5;
}

.tag,
.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.tag.green,
.status-pill.green {
  background: #dcfce7;
  color: #15803d;
}

.tag.yellow {
  background: #fef9c3;
  color: #a16207;
}

.tag.blue,
.status-pill.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.security-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.security-list li {
  background: #f8fbff;
  border: 1px solid #e8eef8;
  padding: 14px;
  border-radius: 16px;
  color: #475467;
  font-weight: 700;
  line-height: 1.5;
}

.patient-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.patient-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.patient-card {
  background: #f8fbff;
  border: 1px solid #e8eef8;
  border-radius: 24px;
  padding: 18px;
}

.patient-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.patient-card h3 {
  margin-bottom: 5px;
}

.patient-card p,
.patient-card small {
  color: var(--muted);
  line-height: 1.55;
}

.patient-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.patient-meta span {
  background: white;
  border: 1px solid #e5edf8;
  padding: 10px 12px;
  border-radius: 14px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.search-input {
  max-width: 340px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-grid.compact {
  grid-template-columns: repeat(4, 1fr);
}

.wide-panel {
  width: 100%;
}

.voice-field {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.voice-field button {
  width: 50px;
  min-width: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  font-size: 18px;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.2);
}

.dual-input {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.check-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.check-grid label {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f8fbff;
  border: 1px solid #e8eef8;
  padding: 12px;
  border-radius: 14px;
  color: #475467;
  font-weight: 700;
}

.check-grid input {
  width: auto;
}

.upload-box {
  border: 1.5px dashed #93c5fd;
  background: #f8fbff;
  border-radius: 24px;
  padding: 22px;
}

.upload-box p {
  margin-top: 10px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

th {
  text-align: left;
  color: #475467;
  background: #f8fbff;
  padding: 14px;
  font-size: 13px;
}

td {
  border-bottom: 1px solid #eef2f7;
  padding: 10px;
}

td input {
  min-width: 110px;
  padding: 10px;
  border-radius: 12px;
}

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Responsive */

@media (max-width: 1180px) {
  .hero-section,
  .dashboard-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .feature-grid,
  .feature-grid.smaller,
  .patient-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid.compact {
    grid-template-columns: 1fr 1fr;
  }

  .phone-frame {
    width: 330px;
    min-height: 620px;
  }

  .mini-dashboard {
    min-height: 588px;
  }
}

@media (max-width: 860px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-left {
    display: none;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar-nav a {
    white-space: nowrap;
  }

  .sidebar-security {
    margin-top: 18px;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 22px;
  }

  .topbar {
    flex-direction: column;
  }

  .patient-form,
  .stats-grid,
  .feature-grid,
  .feature-grid.smaller,
  .patient-grid,
  .dual-input,
  .form-grid.compact {
    grid-template-columns: 1fr;
  }

  .record-item {
    grid-template-columns: 48px 1fr;
  }

  .record-item .tag {
    grid-column: 1 / -1;
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .landing-page {
    padding: 18px;
  }

  .landing-nav {
    gap: 14px;
  }

  .brand-mark span {
    display: none;
  }

  .hero-section {
    margin-top: 34px;
    gap: 34px;
  }

  .hero-content h1 {
    font-size: 40px;
    letter-spacing: -1.5px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions button {
    width: 100%;
  }

  .phone-frame {
    width: 100%;
    max-width: 330px;
  }

  .section-title h2 {
    font-size: 30px;
  }

  .auth-card {
    padding: 28px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .panel {
    padding: 18px;
  }
}
/* SIMPLE MOBILE DRAWER - ADD ONLY */
.mobile-topbar,
.mobile-overlay,
.mobile-close-btn {
  display: none;
}

@media (max-width: 860px) {
  .mobile-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 999;
    height: 76px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-logo .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 13px;
  }

  .mobile-logo h3 {
    font-size: 15px;
    margin: 0;
  }

  .mobile-logo span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    font-size: 23px;
    font-weight: 900;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -310px !important;
    width: 300px !important;
    height: 100vh !important;
    z-index: 1200 !important;
    transition: left 0.3s ease !important;
    overflow-y: auto;
  }

  .sidebar.mobile-open {
    left: 0 !important;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    z-index: 1100;
  }

  .mobile-overlay.show {
    display: block;
  }

  .mobile-close-btn {
    display: block;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 26px;
    font-weight: 900;
  }

  .sidebar-brand {
    margin-top: 42px;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}
/* Force mobile drawer menu links in column */
@media (max-width: 860px) {
  .sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    overflow-x: visible !important;
    width: 100% !important;
  }

  .sidebar-nav a {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    text-align: left !important;
  }
}
/* Back Button */
.back-btn {
  background: #eef5ff;
  color: var(--blue);
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 900;
  border: 1px solid #dbeafe;
  transition: 0.25s ease;
}

.back-btn:hover {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  transform: translateX(-2px);
}

@media (max-width: 860px) {
  .back-btn {
    width: 100%;
    text-align: center;
  }
}
.record-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.small-btn {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-item {
  background: #f8fbff;
  border: 1px solid #e8eef8;
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 10px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.detail-item strong {
  color: var(--text);
  line-height: 1.5;
}

@media print {
  .sidebar,
  .mobile-topbar,
  .mobile-overlay,
  .back-btn,
  .topbar-actions {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }

  body {
    background: white !important;
  }

  .panel {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
}

@media (max-width: 860px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .record-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
.audit-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.audit-meta span {
  background: white;
  border: 1px solid #e5edf8;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #475467;
  font-weight: 800;
}

.audit-action {
  color: var(--blue);
  font-weight: 900;
}

.audit-danger {
  color: #e11d48;
}

.audit-success {
  color: #15803d;
}
.profile-header-card {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 22px 70px rgba(37, 99, 235, 0.2);
  margin-bottom: 22px;
}

.profile-header-card h2 {
  font-size: 30px;
  margin-bottom: 8px;
}

.profile-header-card p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

.profile-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.profile-badges span {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.danger-btn {
  border: 0;
  background: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.danger-btn:hover {
  background: #dc2626;
  color: white;
  transform: translateY(-2px);
}

.signup-card {
  max-width: 760px;
  width: 100%;
}

.signup-form textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  margin-top: 14px;
}

.form-message {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  font-weight: 800;
  display: none;
}

.form-message.success {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.admin-user-card {
  background: #ffffff;
  border: 1px solid #e8eef8;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.admin-user-card h3 {
  margin-bottom: 6px;
}

.admin-user-card p {
  color: var(--muted);
  line-height: 1.6;
}

.admin-user-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.admin-user-meta span {
  background: #f8fbff;
  border: 1px solid #e8eef8;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  color: #475467;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.reject-btn {
  border: 0;
  background: #fff1f2;
  color: #e11d48;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.reject-btn:hover {
  background: #e11d48;
  color: white;
}

@media (max-width: 860px) {
  .admin-user-meta {
    grid-template-columns: 1fr;
  }

  .admin-actions button {
    width: 100%;
  }
}


/* Professional Signup Form Responsive Fix */

.professional-signup-form {
  margin-top: 24px;
  width: 100%;
}

.signup-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.form-field label {
  font-size: 13px;
  font-weight: 900;
  color: #334155;
  letter-spacing: -0.01em;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid #d8e2f3;
  border-radius: 18px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: 0.25s ease;
  box-sizing: border-box;
}

.form-field textarea {
  min-height: 120px;
  padding: 16px 18px;
  resize: vertical;
  line-height: 1.6;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.full-field {
  margin-top: 16px;
}

.signup-card {
  max-width: 820px;
  width: 100%;
}

.auth-switch {
  margin-top: 18px;
  text-align: center;
  color: #64748b;
  font-weight: 700;
}

.auth-switch a {
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

/* Tablet */
@media (max-width: 900px) {
  .signup-card {
    max-width: 100%;
  }

  .signup-field-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 560px) {
  .auth-card {
    padding: 24px 18px;
    border-radius: 28px;
  }

  .auth-card h2 {
    font-size: 32px;
    line-height: 1.1;
  }

  .auth-card p {
    font-size: 15px;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    min-height: 52px;
    border-radius: 16px;
    font-size: 14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .primary-btn.full-btn {
    width: 100%;
    min-height: 54px;
  }
}

.user-status-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.user-status-row span {
  background: #f8fbff;
  border: 1px solid #e8eef8;
  color: #475467;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-active {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #bbf7d0 !important;
}

.status-pending {
  background: #fef9c3 !important;
  color: #854d0e !important;
  border-color: #fde68a !important;
}

.status-rejected,
.status-suspended {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fecaca !important;
}

.status-trial {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.user-management-card {
  background: #ffffff;
  border: 1px solid #e8eef8;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}

.user-management-card strong {
  font-size: 18px;
  color: var(--text);
}

.user-management-card p {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.6;
}

/* Subscription Plans */

.plans-page {
  min-height: 100vh;
  padding: 26px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 35%),
    linear-gradient(135deg, #f8fbff, #eef5ff);
}

.plans-hero {
  max-width: 900px;
  margin: 70px auto 36px;
  text-align: center;
}

.plans-hero h1 {
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
  color: #0f172a;
  margin: 14px 0;
}

.plans-hero p {
  color: #64748b;
  font-size: 18px;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 auto;
}

.pricing-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.pricing-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbe7fb;
  border-radius: 32px;
  padding: 30px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 36px 100px rgba(15, 23, 42, 0.13);
}

.featured-plan {
  border: 2px solid #2563eb;
  transform: scale(1.03);
  box-shadow: 0 35px 100px rgba(37, 99, 235, 0.18);
}

.popular-badge {
  position: absolute;
  top: -16px;
  right: 26px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.pricing-head span {
  color: #2563eb;
  font-weight: 900;
  font-size: 15px;
}

.pricing-head h2 {
  font-size: 48px;
  color: #0f172a;
  margin: 10px 0 0;
  letter-spacing: -0.05em;
}

.pricing-head p {
  color: #64748b;
  font-weight: 700;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 26px 0;
}

.pricing-card li {
  padding: 10px 0;
  color: #475467;
  font-weight: 800;
  border-bottom: 1px solid #eef3fb;
}

.trial-note {
  max-width: 920px;
  margin: 36px auto 20px;
  background: white;
  border: 1px solid #dbe7fb;
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.06);
}

.trial-note h2 {
  color: #0f172a;
  margin-bottom: 8px;
}

.trial-note p {
  color: #64748b;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .featured-plan {
    transform: none;
  }
}

@media (max-width: 560px) {
  .plans-page {
    padding: 16px;
  }

  .plans-hero {
    margin-top: 44px;
  }

  .pricing-card {
    padding: 22px;
    border-radius: 24px;
  }

  .pricing-head h2 {
    font-size: 38px;
  }
}


/* =====================================================
   CLEAN LOGIN PAGE - THEME 1 CLINICAL BLUE
   Safe for login.html only
===================================================== */

.clean-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%) !important;
  color: #101828 !important;
}

.clean-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.clean-auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe7fb;
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 28px 90px rgba(37, 99, 235, 0.13);
  animation: cleanLoginRise 0.55s ease both;
}

@keyframes cleanLoginRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.clean-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.clean-auth-brand .brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: white !important;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.25) !important;
}

.clean-auth-brand h3 {
  color: #101828 !important;
  font-size: 19px;
  margin: 0;
}

.clean-auth-brand span {
  color: #667085 !important;
  font-size: 13px;
  font-weight: 700;
}

.clean-auth-header {
  margin-bottom: 26px;
}

.clean-auth-header .page-kicker {
  margin-bottom: 14px;
}

.clean-auth-header h1 {
  color: #101828 !important;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0 0 10px;
}

.clean-auth-header p {
  color: #667085 !important;
  font-size: 16px;
  line-height: 1.6;
}

.clean-auth-form {
  display: grid;
  gap: 18px;
}

.clean-field label {
  display: block;
  color: #344054 !important;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 8px;
}

.clean-field input {
  width: 100%;
  min-height: 56px;
  background: #ffffff !important;
  color: #101828 !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 16px !important;
  padding: 0 16px !important;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  transition: 0.25s ease;
  box-shadow: none !important;
}

.clean-field input::placeholder {
  color: #98a2b3 !important;
}

.clean-field input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.11) !important;
}

.clean-auth-form .primary-btn {
  min-height: 56px;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: white !important;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25) !important;
  font-size: 15px;
}

.clean-auth-form .primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.32) !important;
}

.clean-auth-links {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.clean-auth-links p {
  color: #667085 !important;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.clean-auth-links a {
  color: #2563eb !important;
  font-weight: 900;
}

.clean-auth-note {
  margin-top: 22px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #eef5ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 560px) {
  .clean-auth-wrapper {
    padding: 16px;
    align-items: flex-start;
    padding-top: 38px;
  }

  .clean-auth-card {
    padding: 24px;
    border-radius: 24px;
  }

  .clean-auth-header h1 {
    font-size: 34px;
  }

  .clean-auth-brand {
    margin-bottom: 26px;
  }
}
/* =====================================================
   CLEAN SIGNUP PAGE - THEME 1 CLINICAL BLUE
   Safe for signup.html only
===================================================== */

.clean-signup-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.clean-signup-card {
  width: 100%;
  max-width: 860px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe7fb;
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 28px 90px rgba(37, 99, 235, 0.13);
  animation: cleanLoginRise 0.55s ease both;
}

.clean-signup-form {
  display: grid;
  gap: 18px;
}

.clean-signup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.clean-field select {
  width: 100%;
  min-height: 56px;
  background: #ffffff !important;
  color: #101828 !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 16px !important;
  padding: 0 16px !important;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  transition: 0.25s ease;
  box-shadow: none !important;
}

.clean-field textarea {
  width: 100%;
  min-height: 96px;
  background: #ffffff !important;
  color: #101828 !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  transition: 0.25s ease;
  box-shadow: none !important;
}

.clean-field select:focus,
.clean-field textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.11) !important;
}

.clean-hipaa-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.clean-hipaa-box input {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin-top: 2px;
  accent-color: #2563eb;
}

.clean-hipaa-box a {
  color: #2563eb !important;
  font-weight: 900;
  margin-left: 4px;
}

@media (max-width: 760px) {
  .clean-signup-wrapper {
    padding: 16px;
    align-items: flex-start;
    padding-top: 30px;
  }

  .clean-signup-card {
    padding: 24px;
    border-radius: 24px;
  }

  .clean-signup-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
/* =====================================================
   SIMPLE HOME PAGE - CLEAN CLINICAL BLUE
===================================================== */

.simple-home-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%) !important;
  color: #101828 !important;
}

.simple-home-page {
  min-height: 100vh;
  padding: 24px;
}

.simple-home-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbe7fb;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: simpleFadeDown 0.45s ease both;
}

.simple-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.simple-brand .brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: white !important;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22) !important;
}

.simple-brand h3 {
  color: #101828 !important;
  font-size: 19px;
  margin: 0;
}

.simple-brand span {
  color: #667085 !important;
  font-size: 13px;
  font-weight: 700;
}

.simple-nav-actions,
.simple-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.simple-login-btn,
.simple-signup-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
  transition: 0.25s ease;
}

.simple-login-btn {
  background: #ffffff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.simple-signup-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22);
}

.simple-login-btn:hover,
.simple-signup-btn:hover {
  transform: translateY(-2px);
}

.simple-signup-btn.large,
.simple-login-btn.large {
  min-height: 56px;
  padding: 0 28px;
  font-size: 15px;
  border-radius: 16px;
}

.simple-hero {
  max-width: 1120px;
  min-height: calc(100vh - 130px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.simple-hero-content {
  animation: simpleRise 0.6s ease both;
}

.simple-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #eaf2ff;
  border: 1px solid #cfe0ff;
  color: #2563eb !important;
  font-size: 13px;
  font-weight: 900;
}

.simple-hero h1 {
  max-width: 780px;
  color: #101828 !important;
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.065em;
  margin: 0;
}

.simple-hero p {
  max-width: 650px;
  margin: 22px 0 30px;
  color: #667085 !important;
  font-size: 18px;
  line-height: 1.75;
}

.simple-note {
  display: inline-flex;
  margin-top: 20px;
  padding: 12px 15px;
  border-radius: 16px;
  background: #eef5ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.simple-info-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe7fb;
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 28px 90px rgba(37, 99, 235, 0.13);
  animation: simpleRise 0.75s ease both;
}

.simple-info-card h3 {
  color: #101828 !important;
  font-size: 26px;
  margin-bottom: 18px;
}

.simple-info-card ul {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.simple-info-card li {
  padding: 14px 15px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #e5edf8;
  color: #344054;
  font-size: 15px;
  font-weight: 800;
}

.simple-info-card li::before {
  content: "✓";
  color: #2563eb;
  font-weight: 950;
  margin-right: 10px;
}

@keyframes simpleRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes simpleFadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .simple-hero {
    grid-template-columns: 1fr;
    padding: 50px 0;
    min-height: auto;
  }

  .simple-hero h1 {
    font-size: 44px;
  }
}

@media (max-width: 620px) {
  .simple-home-page {
    padding: 14px;
  }

  .simple-home-nav {
    align-items: flex-start;
    gap: 16px;
    flex-direction: column;
  }

  .simple-nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .simple-nav-actions button {
    width: 100%;
  }

  .simple-hero {
    padding: 38px 0;
  }

  .simple-hero h1 {
    font-size: 38px;
    letter-spacing: -0.05em;
  }

  .simple-hero p {
    font-size: 16px;
  }

  .simple-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .simple-hero-actions button {
    width: 100%;
  }

  .simple-info-card {
    padding: 22px;
    border-radius: 24px;
  }
}
/* =====================================================
   CLEAN DASHBOARD LAYOUT
===================================================== */

.clean-dashboard {
  max-width: 1280px;
}

.simple-page-header {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dbe7fb;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.08);
}

.simple-page-header h1 {
  color: #101828 !important;
}

.simple-page-header p {
  color: #667085 !important;
}

.clean-stats-grid .stat-card {
  min-height: 160px;
}

.clean-status-panel {
  margin-bottom: 22px;
}

.clean-account-grid {
  grid-template-columns: repeat(3, 1fr);
}

.permission-hidden-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #eef5ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .clean-account-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .simple-page-header {
    padding: 18px;
    border-radius: 22px;
  }

  .clean-account-grid {
    grid-template-columns: 1fr;
  }
}
/* =====================================================
   CLEAN PATIENTS PAGE
===================================================== */

.clean-page {
  max-width: 1280px;
}

.clean-panel-head {
  margin-bottom: 18px;
}

.clean-patient-form {
  grid-template-columns: repeat(2, 1fr);
}

.clean-patient-form button {
  min-height: 54px;
}

.clean-patient-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .clean-patient-form,
  .clean-patient-grid {
    grid-template-columns: 1fr;
  }
}
/* =====================================================
   CLEAN PLANS PAGE
===================================================== */

.clean-plans-hero {
  max-width: 820px;
  margin: 70px auto 34px;
  text-align: center;
  animation: simpleRise 0.55s ease both;
}

.clean-plans-hero h1 {
  color: #101828 !important;
  font-size: clamp(38px, 5.5vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.06em;
  margin: 0 0 16px;
}

.clean-plans-hero p {
  color: #667085 !important;
  font-size: 18px;
  line-height: 1.7;
  max-width: 650px;
  margin: 0 auto;
}

.clean-pricing-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.clean-price-card {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe7fb;
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 22px 70px rgba(37, 99, 235, 0.1);
  animation: simpleRise 0.65s ease both;
}

.featured-clean-plan {
  border: 2px solid #2563eb;
  box-shadow: 0 28px 90px rgba(37, 99, 235, 0.16);
  transform: translateY(-8px);
}

.plan-label {
  display: inline-flex;
  color: #2563eb !important;
  background: #eaf2ff;
  border: 1px solid #cfe0ff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.clean-price-card h2 {
  color: #101828 !important;
  font-size: 48px;
  line-height: 1;
  margin: 20px 0 6px;
  letter-spacing: -0.05em;
}

.plan-price-note {
  color: #667085 !important;
  font-weight: 800;
  margin-bottom: 22px;
}

.clean-price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  gap: 12px;
}

.clean-price-card li {
  color: #344054;
  font-weight: 800;
  line-height: 1.45;
  padding: 12px 13px;
  background: #f8fbff;
  border: 1px solid #e5edf8;
  border-radius: 14px;
}

.clean-price-card li::before {
  content: "✓";
  color: #2563eb;
  font-weight: 950;
  margin-right: 9px;
}

.popular-badge-clean {
  position: absolute;
  top: -14px;
  right: 24px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
}

.clean-plan-note {
  max-width: 860px;
  margin: 34px auto 0;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe7fb;
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.08);
  text-align: center;
}

.clean-plan-note h3 {
  color: #101828 !important;
  font-size: 24px;
  margin-bottom: 8px;
}

.clean-plan-note p {
  color: #667085 !important;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .clean-pricing-grid {
    grid-template-columns: 1fr;
  }

  .featured-clean-plan {
    transform: none;
  }
}

@media (max-width: 620px) {
  .clean-plans-hero {
    margin-top: 44px;
  }

  .clean-plans-hero h1 {
    font-size: 38px;
  }

  .clean-price-card {
    padding: 22px;
    border-radius: 24px;
  }

  .clean-price-card h2 {
    font-size: 40px;
  }
}
/* =====================================================
   CLEAN PRIVACY GUIDELINES PAGE
===================================================== */

.clean-guidelines-page {
  max-width: 920px;
  margin: 70px auto 0;
  animation: simpleRise 0.55s ease both;
}

.clean-guidelines-header {
  text-align: center;
  margin-bottom: 28px;
}

.clean-guidelines-header h1 {
  color: #101828 !important;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.06em;
  margin: 0 0 14px;
}

.clean-guidelines-header p {
  max-width: 680px;
  margin: 0 auto;
  color: #667085 !important;
  font-size: 17px;
  line-height: 1.7;
}

.clean-guidelines-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe7fb;
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 28px 90px rgba(37, 99, 235, 0.13);
}

.clean-guidelines-card h2 {
  color: #101828 !important;
  font-size: 26px;
  margin-bottom: 20px;
}

.clean-guidelines-card ul {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0 0 26px;
}

.clean-guidelines-card li {
  color: #344054;
  background: #f8fbff;
  border: 1px solid #e5edf8;
  border-radius: 16px;
  padding: 14px 15px;
  font-weight: 800;
  line-height: 1.5;
}

.clean-guidelines-card li::before {
  content: "✓";
  color: #2563eb;
  font-weight: 950;
  margin-right: 10px;
}

.clean-guidelines-note {
  margin-top: 22px;
  background: #eef5ff;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  padding: 22px;
  text-align: center;
}

.clean-guidelines-note h3 {
  color: #101828 !important;
  margin-bottom: 8px;
}

.clean-guidelines-note p {
  color: #475467 !important;
  line-height: 1.7;
  max-width: 740px;
  margin: 0 auto;
}

@media (max-width: 620px) {
  .clean-guidelines-page {
    margin-top: 44px;
  }

  .clean-guidelines-card {
    padding: 22px;
    border-radius: 24px;
  }

  .clean-guidelines-header h1 {
    font-size: 38px;
  }
}
/* =====================================================
   CLEAN PATIENT DETAIL PAGE
===================================================== */

.clean-page #patientDetailBox {
  margin-bottom: 22px;
}

.clean-page .profile-header-card {
  background: rgba(255, 255, 255, 0.94) !important;
  color: #101828 !important;
  border: 1px solid #dbe7fb !important;
  box-shadow: 0 22px 70px rgba(37, 99, 235, 0.1) !important;
}

.clean-page .profile-header-card h2 {
  color: #101828 !important;
}

.clean-page .profile-header-card p {
  color: #667085 !important;
}

.clean-page .profile-badges span {
  background: #eef5ff !important;
  border: 1px solid #dbeafe !important;
  color: #1d4ed8 !important;
}

@media (max-width: 760px) {
  .simple-page-header {
    flex-direction: column;
  }

  .simple-page-header .topbar-actions {
    width: 100%;
  }

  .simple-page-header .topbar-actions button {
    width: 100%;
  }
}
/* =====================================================
   CLEAN RECORDS PAGE
===================================================== */

.clean-records-panel {
  margin-top: 22px;
}

.clean-records-panel .panel-head {
  align-items: center;
}

.clean-records-panel .search-input {
  min-width: 280px;
}

@media (max-width: 760px) {
  .clean-records-panel .panel-head {
    align-items: stretch;
  }

  .clean-records-panel .search-input {
    min-width: 100%;
  }
}
/* =====================================================
   CLEAN TREATMENT DETAIL / PRINT PAGE
===================================================== */

.clean-treatment-report {
  margin-top: 22px;
}

.clean-treatment-report .panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe7fb;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.08);
}

.clean-treatment-report .detail-grid {
  grid-template-columns: repeat(2, 1fr);
}

.clean-treatment-report .detail-item {
  background: #f8fbff;
  border: 1px solid #e5edf8;
}

.clean-treatment-report .detail-item span {
  color: #667085;
}

.clean-treatment-report .detail-item strong {
  color: #101828;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar,
  .mobile-topbar,
  .mobile-overlay,
  .back-btn,
  .topbar-actions,
  .page-kicker {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .simple-page-header {
    box-shadow: none !important;
    border: none !important;
    padding: 0 0 16px !important;
    background: #ffffff !important;
  }

  .simple-page-header h1 {
    color: #000000 !important;
    font-size: 26px !important;
  }

  .simple-page-header p {
    color: #333333 !important;
  }

  .panel {
    box-shadow: none !important;
    border: 1px solid #d0d7de !important;
    background: #ffffff !important;
    page-break-inside: avoid;
  }

  .detail-item {
    background: #ffffff !important;
    border: 1px solid #d0d7de !important;
  }

  .detail-item span,
  .detail-item strong,
  .panel h2,
  .panel h3,
  .panel p {
    color: #000000 !important;
  }
}

@media (max-width: 760px) {
  .clean-treatment-report .detail-grid {
    grid-template-columns: 1fr;
  }
}
/* =====================================================
   CLEAN ADMIN APPROVALS PAGE
===================================================== */

.clean-approvals-panel {
  margin-top: 22px;
}

.clean-admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clean-approvals-panel .panel-head {
  align-items: center;
}

.clean-approvals-panel .search-input {
  min-width: 280px;
}

@media (max-width: 900px) {
  .clean-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .clean-approvals-panel .panel-head {
    align-items: stretch;
  }

  .clean-approvals-panel .search-input {
    min-width: 100%;
  }
}
/* =====================================================
   CLEAN USER MANAGEMENT PAGE
===================================================== */

.clean-user-stats {
  margin-bottom: 22px;
}

.clean-users-panel .panel-head {
  align-items: center;
}

.clean-users-panel .search-input {
  min-width: 280px;
}

.plan-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.plan-modal {
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe7fb;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 28px 90px rgba(37, 99, 235, 0.18);
  position: relative;
  animation: simpleRise 0.35s ease both;
}

.plan-modal h2 {
  color: #101828 !important;
  font-size: 30px;
  margin-bottom: 8px;
}

.plan-modal p {
  color: #667085 !important;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eef5ff;
  color: #2563eb;
  font-size: 24px;
  font-weight: 900;
}

.plan-options {
  display: grid;
  gap: 12px;
}

@media (max-width: 760px) {
  .clean-users-panel .panel-head {
    align-items: stretch;
  }

  .clean-users-panel .search-input {
    min-width: 100%;
  }

  .plan-modal {
    padding: 22px;
    border-radius: 22px;
  }
}
/* =====================================================
   CLEAN AUDIT LOGS PAGE
===================================================== */

.clean-audit-panel {
  margin-top: 22px;
}

.clean-audit-panel .panel-head {
  align-items: center;
}

.clean-audit-panel .search-input {
  min-width: 280px;
}

.audit-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.audit-meta span {
  background: #f8fbff;
  border: 1px solid #e5edf8;
  color: #475467;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.audit-action {
  color: #2563eb;
  font-weight: 900;
}

.audit-danger {
  color: #e11d48;
}

.audit-success {
  color: #15803d;
}

@media (max-width: 760px) {
  .clean-audit-panel .panel-head {
    align-items: stretch;
  }

  .clean-audit-panel .search-input {
    min-width: 100%;
  }
}
/* =====================================================
   CLEAN STEP-BASED TREATMENT PAGE
===================================================== */

.treatment-wizard-page {
  max-width: 1280px;
}

.treatment-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.wizard-step-btn {
  min-height: 62px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbe7fb;
  color: #475467;
  font-weight: 900;
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.07);
  transition: 0.25s ease;
}

.wizard-step-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2563eb;
  font-size: 13px;
}

.wizard-step-btn.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.22);
}

.wizard-step-btn.active span {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.wizard-step {
  display: none;
  animation: simpleRise 0.35s ease both;
}

.wizard-step.active {
  display: block;
}

.clean-treatment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.clean-treatment-grid input,
.clean-treatment-grid select,
.clean-treatment-grid textarea {
  min-height: 54px;
}

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

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.wizard-actions button {
  min-width: 140px;
}

.treatment-wizard-page textarea {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .treatment-stepper {
    grid-template-columns: repeat(3, 1fr);
  }

  .clean-treatment-grid,
  .clean-check-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .treatment-stepper {
    grid-template-columns: 1fr;
  }

  .wizard-step-btn {
    justify-content: flex-start;
    padding: 0 18px;
    text-align: left;
  }

  .wizard-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wizard-actions button {
    width: 100%;
  }
}
/* =====================================================
   CLEAN EXCHANGE PAGE
===================================================== */

.clean-exchange-panel {
  margin-top: 22px;
}

.clean-exchange-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clean-exchange-form textarea {
  grid-column: 1 / -1;
  min-height: 96px;
}

.clean-exchange-form button {
  min-height: 54px;
}

.clean-exchange-panel .panel-head {
  align-items: center;
}

.clean-exchange-panel .search-input {
  min-width: 280px;
}

@media (max-width: 760px) {
  .clean-exchange-form {
    grid-template-columns: 1fr;
  }

  .clean-exchange-panel .panel-head {
    align-items: stretch;
  }

  .clean-exchange-panel .search-input {
    min-width: 100%;
  }
}
/* =====================================================
   FINAL CLEAN CLINICAL BLUE UI POLISH
   Theme 1 consistency across full app
===================================================== */

body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 30%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.08), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%) !important;
  color: #101828 !important;
}

/* Clean cards */
.panel,
.stat-card,
.patient-card,
.record-item,
.admin-user-card,
.user-management-card,
.detail-item,
.feature-card {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid #dbe7fb !important;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.08) !important;
  backdrop-filter: none !important;
}

/* Text consistency */
h1,
h2,
h3,
strong {
  color: #101828 !important;
}

p,
small,
.panel p,
.panel-head p,
.patient-card p,
.patient-card small,
.record-item p,
.record-item small {
  color: #667085 !important;
}

/* Inputs */
input,
textarea,
select {
  background: #ffffff !important;
  color: #101828 !important;
  border: 1px solid #dbe3ef !important;
  box-shadow: none !important;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3 !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.10) !important;
}

/* Buttons */
.primary-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: #ffffff !important;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22) !important;
}

.primary-btn:hover {
  transform: translateY(-2px);
}

.secondary-btn,
.outline-btn,
.back-btn {
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: none !important;
}

.secondary-btn:hover,
.outline-btn:hover,
.back-btn:hover {
  background: #eef5ff !important;
  color: #1d4ed8 !important;
  transform: translateY(-2px);
}

.dark-btn {
  background: #101828 !important;
  color: #ffffff !important;
}

/* Sidebar */
.sidebar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-right: 1px solid #dbe7fb !important;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.06) !important;
}

.sidebar-nav a {
  color: #475467 !important;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.20) !important;
}

.sidebar-security {
  background: #f8fbff !important;
  border: 1px solid #e5edf8 !important;
}

.sidebar-security span {
  color: #667085 !important;
}

.sidebar-security strong {
  color: #2563eb !important;
}

/* Brand */
.brand-icon,
.record-avatar,
.mobile-menu-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.22) !important;
}

/* Topbar */
.mobile-topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #dbe7fb !important;
}

.simple-page-header,
.topbar {
  color: #101828 !important;
}

.topbar h1 {
  color: #101828 !important;
}

.topbar p {
  color: #667085 !important;
}

/* Status pills */
.status-pill,
.tag {
  border: 1px solid transparent;
}

.status-pill.blue,
.tag.blue {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.status-pill.green,
.tag.green {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #bbf7d0 !important;
}

.tag.yellow,
.status-pill.yellow {
  background: #fef9c3 !important;
  color: #a16207 !important;
  border-color: #fde68a !important;
}

/* Cleaner spacing */
.main-content {
  padding: 28px !important;
}

.panel {
  margin-bottom: 22px;
}

.panel-head {
  margin-bottom: 18px;
}

/* Better mobile */
@media (max-width: 860px) {
  .main-content {
    padding: 18px !important;
  }

  .sidebar {
    background: #ffffff !important;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button,
  .topbar-actions .status-pill {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
/* Smooth entry animation */
.simple-page-header,
.panel,
.stat-card,
.patient-card,
.record-item,
.clean-price-card,
.clean-guidelines-card,
.clean-auth-card,
.clean-signup-card {
  animation: softPageRise 0.35s ease both;
}

@keyframes softPageRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* =====================================================
   PROFESSIONAL MOBILE APP EXPERIENCE
   Bottom nav + cleaner cards + touch-friendly layout
===================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  body {
    padding-bottom: 88px;
  }

  .mobile-topbar {
    height: 68px;
    padding: 10px 16px;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
  }

  .mobile-logo .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .mobile-logo h3 {
    font-size: 15px;
  }

  .mobile-logo span {
    font-size: 11px;
  }

  .mobile-menu-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1600;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dbe7fb;
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(37, 99, 235, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-height: 56px;
    border-radius: 18px;
    background: transparent;
    color: #475467;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 18px;
    font-weight: 900;
    border: 0;
    text-decoration: none;
  }

  .mobile-bottom-nav span {
    color: inherit;
    font-size: 10px;
    font-weight: 900;
  }

  .mobile-bottom-nav a:active,
  .mobile-bottom-nav button:active {
    background: #eef5ff;
    color: #2563eb;
    transform: scale(0.98);
  }

  .app-shell {
    display: block;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 16px !important;
  }

  .simple-page-header,
  .topbar {
    border-radius: 22px !important;
    padding: 18px !important;
    margin-bottom: 18px;
  }

  .topbar {
    display: grid !important;
    gap: 14px;
  }

  .topbar h1 {
    font-size: 28px !important;
    line-height: 1.1;
    letter-spacing: -0.04em;
  }

  .topbar p {
    font-size: 14px !important;
    line-height: 1.55;
  }

  .page-kicker {
    font-size: 11px !important;
    padding: 7px 10px !important;
    margin-bottom: 10px !important;
  }

  .topbar-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .topbar-actions button,
  .topbar-actions .status-pill {
    width: 100%;
    min-height: 48px;
  }

  .back-btn {
    width: 100%;
    min-height: 46px;
  }

  .stats-grid,
  .dashboard-grid,
  .form-grid,
  .patient-form,
  .patient-grid,
  .detail-grid,
  .clean-account-grid,
  .clean-patient-form,
  .clean-patient-grid,
  .clean-admin-grid,
  .clean-treatment-grid,
  .clean-exchange-form {
    grid-template-columns: 1fr !important;
  }

  .panel,
  .stat-card,
  .patient-card,
  .record-item,
  .detail-item {
    border-radius: 22px !important;
  }

  .panel {
    padding: 18px !important;
    margin-bottom: 16px;
  }

  .panel-head {
    display: grid !important;
    gap: 12px;
    margin-bottom: 16px;
  }

  .panel-head h2 {
    font-size: 21px !important;
  }

  .panel-head p {
    font-size: 14px !important;
  }

  input,
  select,
  textarea {
    min-height: 52px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
  }

  textarea {
    min-height: 96px !important;
  }

  .primary-btn,
  .secondary-btn,
  .outline-btn,
  .dark-btn,
  .back-btn,
  .logout-btn {
    min-height: 50px;
    border-radius: 16px !important;
    font-size: 14px;
  }

  .record-item {
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    gap: 12px;
    padding: 14px !important;
  }

  .record-actions {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .record-actions button {
    width: 100%;
  }

  .patient-meta {
    gap: 8px;
  }

  .patient-meta span {
    font-size: 12px;
    padding: 9px 10px;
  }

  .table-wrap {
    border-radius: 18px;
    border: 1px solid #dbe7fb;
    overflow-x: auto;
    background: #ffffff;
  }

  .table-wrap::before {
    content: "Swipe left/right to view all columns";
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 900;
    padding: 12px;
    background: #f8fbff;
    border-bottom: 1px solid #e5edf8;
  }

  table {
    min-width: 1100px;
  }

  th,
  td {
    white-space: nowrap;
  }

  .treatment-stepper {
    position: sticky;
    top: 76px;
    z-index: 500;
    grid-template-columns: repeat(5, minmax(78px, 1fr)) !important;
    overflow-x: auto;
    padding-bottom: 6px;
    margin: 16px 0;
  }

  .wizard-step-btn {
    min-width: 78px;
    min-height: 54px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .wizard-step-btn span {
    width: 22px;
    height: 22px;
    margin-right: 0;
    margin-bottom: 3px;
    display: flex;
  }

  .wizard-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .wizard-actions button {
    width: 100%;
  }

  .search-input {
    max-width: 100% !important;
    width: 100%;
  }
}
@media (max-width: 860px) {
  .mobile-bottom-nav a.active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
  }
}
/* =====================================================
   MOBILE NAV + SIDEBAR FIXES
   Fixes bottom nav overlap, menu z-index, scroll, desktop logout
===================================================== */

/* Desktop sidebar structure fix */
.sidebar {
  height: 100vh !important;
  position: sticky;
  top: 0;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  padding-bottom: 22px !important;
}

.sidebar-nav {
  flex: 1;
}

.logout-btn {
  margin-top: auto !important;
  flex-shrink: 0;
}

/* Make sure sidebar logout is visible on desktop */
@media (min-width: 861px) {
  .sidebar {
    min-height: 100vh !important;
  }

  .logout-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
}

/* Mobile app layout fixes */
@media (max-width: 860px) {
  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    padding-bottom: 115px !important;
  }

  .main-content {
    padding-bottom: 130px !important;
  }

  /* Bottom nav should stay above page content */
  .mobile-bottom-nav {
    z-index: 1200 !important;
  }

  /* Mobile menu must appear above bottom nav */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -100%;
    width: 82%;
    max-width: 330px;
    height: 100vh !important;
    z-index: 2500 !important;
    transition: left 0.28s ease;
    padding-bottom: 28px !important;
    overflow-y: auto !important;
  }

  .sidebar.active {
    left: 0 !important;
  }

  .mobile-overlay {
    z-index: 2200 !important;
  }

  .mobile-overlay.active {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mobile-close-btn {
    display: flex !important;
    z-index: 2600 !important;
  }

  /* Hide bottom navigation when side menu is open */
  body.menu-open .mobile-bottom-nav {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
  }

  /* Treatment stepper should not cut from left/right */
  .treatment-stepper {
    display: flex !important;
    overflow-x: auto !important;
    gap: 12px !important;
    padding: 4px 4px 12px !important;
    margin: 18px -4px 18px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .treatment-stepper::-webkit-scrollbar {
    display: none;
  }

  .wizard-step-btn {
    min-width: 116px !important;
    flex: 0 0 auto !important;
    scroll-snap-align: start;
  }

  /* Treatment panels need extra space above bottom nav */
  .wizard-step {
    padding-bottom: 32px;
  }

  .wizard-step .panel:last-child {
    margin-bottom: 120px !important;
  }

  /* Form fields should never be hidden behind bottom nav */
  input,
  textarea,
  select {
    scroll-margin-bottom: 150px;
  }

  .panel {
    scroll-margin-bottom: 150px;
  }

  /* Better mobile action buttons */
  .wizard-actions {
    margin-bottom: 24px;
  }

  .action-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding-bottom: 90px;
  }

  .action-row button {
    width: 100% !important;
  }
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}
/* =====================================================
   FINAL CLEAN DASHBOARD MOBILE + DESKTOP
===================================================== */

.mobile-dashboard-layout {
  max-width: 1280px;
}

.dashboard-mini-header {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe7fb;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.08);
  margin-bottom: 16px;
  animation: softPageRise 0.35s ease both;
}

.dashboard-mini-header h1 {
  color: #101828 !important;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin: 8px 0;
}

.dashboard-mini-header p {
  color: #667085 !important;
  font-size: 16px;
  line-height: 1.6;
  max-width: 620px;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-action-grid button {
  min-height: 54px;
  border-radius: 16px !important;
}

.dashboard-stats-compact {
  margin-bottom: 22px;
}

.dashboard-recent-panel {
  margin-bottom: 22px;
}

.dashboard-status-panel {
  margin-bottom: 100px;
}

@media (max-width: 860px) {
  .dashboard-mini-header {
    padding: 18px;
    border-radius: 22px;
    margin-bottom: 14px;
  }

  .dashboard-mini-header h1 {
    font-size: 30px;
    letter-spacing: -0.045em;
  }

  .dashboard-mini-header p {
    font-size: 14px;
  }

  .dashboard-action-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .dashboard-action-grid button {
    width: 100%;
    min-height: 52px;
  }

  .dashboard-stats-compact {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .dashboard-stats-compact .stat-card {
    min-height: 132px;
    padding: 16px !important;
  }

  .dashboard-stats-compact .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
    margin-bottom: 10px;
  }

  .dashboard-stats-compact .stat-card span {
    font-size: 12px;
  }

  .dashboard-stats-compact .stat-card strong {
    font-size: 28px;
  }

  .dashboard-stats-compact .stat-card p {
    font-size: 12px !important;
  }

  .dashboard-recent-panel .panel-head,
  .dashboard-status-panel .panel-head {
    display: grid !important;
    gap: 12px;
    align-items: stretch;
  }

  .dashboard-recent-panel .panel-head button {
    width: 100%;
  }

  .dashboard-status-panel {
    margin-bottom: 120px;
  }
}

@media (max-width: 420px) {
  .dashboard-stats-compact {
    grid-template-columns: 1fr 1fr !important;
  }

  .dashboard-mini-header h1 {
    font-size: 28px;
  }
}
/* =====================================================
   DASHBOARD FINAL DESKTOP + MOBILE POLISH
   Fixes wide empty gap, oversized cards, bad desktop layout
===================================================== */

/* Better app shell on desktop */
@media (min-width: 861px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    min-height: 100vh;
  }

  .sidebar {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    position: sticky !important;
    top: 0 !important;
  }

  .main-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 28px 36px !important;
  }

  .clean-dashboard,
  .mobile-dashboard-layout {
    max-width: 1180px !important;
    margin: 0 auto !important;
  }
}

/* Dashboard header should be compact, not huge */
.dashboard-mini-header {
  padding: 26px 30px !important;
  border-radius: 24px !important;
  margin-bottom: 18px !important;
}

.dashboard-mini-header h1 {
  font-size: 42px !important;
  line-height: 1.05 !important;
  margin: 8px 0 8px !important;
}

.dashboard-mini-header p {
  font-size: 16px !important;
  max-width: 680px !important;
}

/* Hide quick action grid on desktop if you want cleaner dashboard */
@media (min-width: 861px) {
  .dashboard-action-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 20px !important;
  }

  .dashboard-action-grid button {
    min-height: 52px !important;
  }
}

/* Stats row cleaner */
.dashboard-stats-compact,
.clean-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.dashboard-stats-compact .stat-card,
.clean-stats-grid .stat-card {
  min-height: 150px !important;
  padding: 22px !important;
  border-radius: 22px !important;
}

.dashboard-stats-compact .stat-icon,
.clean-stats-grid .stat-icon {
  width: 42px !important;
  height: 42px !important;
  font-size: 20px !important;
  margin-bottom: 14px !important;
}

.dashboard-stats-compact .stat-card span,
.clean-stats-grid .stat-card span {
  font-size: 14px !important;
}

.dashboard-stats-compact .stat-card strong,
.clean-stats-grid .stat-card strong {
  font-size: 34px !important;
  line-height: 1 !important;
}

.dashboard-stats-compact .stat-card p,
.clean-stats-grid .stat-card p {
  font-size: 13px !important;
  margin-top: 8px !important;
}

/* Desktop: Recent records + status can sit cleanly */
@media (min-width: 1020px) {
  .dashboard-recent-panel {
    margin-bottom: 22px !important;
  }

  .dashboard-status-panel {
    margin-bottom: 40px !important;
  }

  .clean-account-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Patient / record cards cleaner */
.dashboard-recent-panel .patient-card,
.dashboard-recent-panel .record-item {
  border-radius: 20px !important;
  padding: 18px !important;
}

.dashboard-recent-panel .record-actions button,
.dashboard-recent-panel .patient-card button {
  min-height: 44px !important;
  border-radius: 14px !important;
}

/* Remove giant empty visual feel */
body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%) !important;
}

/* Mobile stays compact */
@media (max-width: 860px) {
  .main-content {
    padding: 14px !important;
    padding-bottom: 130px !important;
  }

  .dashboard-mini-header {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  .dashboard-mini-header h1 {
    font-size: 30px !important;
  }

  .dashboard-mini-header p {
    font-size: 14px !important;
  }

  .dashboard-action-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .dashboard-stats-compact,
  .clean-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .dashboard-stats-compact .stat-card,
  .clean-stats-grid .stat-card {
    min-height: 130px !important;
    padding: 16px !important;
  }

  .dashboard-stats-compact .stat-card strong,
  .clean-stats-grid .stat-card strong {
    font-size: 28px !important;
  }

  .clean-account-grid {
    grid-template-columns: 1fr !important;
  }
}
/* =====================================================
   FIX TREATMENT MONITORING TABLE + PAGE OVERFLOW
   Stops whole page from sliding horizontally
===================================================== */

html,
body {
  max-width: 100%;
  overflow-x: hidden !important;
}

.app-shell,
.main-content,
.treatment-wizard-page,
.wizard-step,
.panel,
.wide-panel {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden;
}

/* Desktop layout must not slide under sidebar */
@media (min-width: 861px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .sidebar {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    z-index: 900 !important;
    background: #ffffff !important;
    opacity: 1 !important;
  }

  .main-content {
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
}

/* Treatment stepper should stay inside page */
.treatment-stepper {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

/* Monitoring table scrolls inside its own box only */
.table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border-radius: 20px;
  border: 1px solid #dbe7fb;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: max-content !important;
  min-width: 1180px !important;
  max-width: none !important;
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap th,
.table-wrap td {
  white-space: nowrap !important;
  min-width: 130px;
}

.table-wrap input {
  min-width: 120px !important;
}

/* Keep Add Row / Previous / Next buttons visible and clean */
#wizardStep4,
#treatmentStep4 {
  overflow-x: hidden !important;
}

#treatmentStep4 .panel {
  overflow-x: hidden !important;
}

#treatmentStep4 .wizard-actions {
  position: relative;
  z-index: 2;
  background: transparent;
}

/* Desktop monitoring panel should not cover sidebar */
@media (min-width: 861px) {
  #treatmentStep4 .table-wrap {
    max-width: calc(100vw - 360px) !important;
  }
}

/* Mobile monitoring table hint */
@media (max-width: 860px) {
  .table-wrap {
    max-width: 100% !important;
  }

  .table-wrap table {
    min-width: 1100px !important;
  }

  .table-wrap::before {
    content: "Swipe left/right to view monitoring columns";
    display: block;
    padding: 12px;
    background: #f8fbff;
    border-bottom: 1px solid #e5edf8;
    color: #667085;
    font-size: 12px;
    font-weight: 900;
  }
}
/* =====================================================
   FINAL SIDEBAR POLISH - DESKTOP + MOBILE
   Fixes sidebar scroll, logout position, spacing, and clean look
===================================================== */

/* Desktop sidebar clean layout */
@media (min-width: 861px) {
  .sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 24px 18px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-right: 1px solid #dbe7fb !important;
    box-shadow: 10px 0 35px rgba(37, 99, 235, 0.06) !important;
  }

  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }

  .sidebar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 28px !important;
    flex-shrink: 0 !important;
  }

  .sidebar-brand .brand-icon {
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
    font-size: 18px !important;
  }

  .sidebar-brand h3 {
    font-size: 20px !important;
    line-height: 1.1 !important;
    color: #101828 !important;
    margin: 0 !important;
  }

  .sidebar-brand span {
    font-size: 13px !important;
    color: #667085 !important;
    font-weight: 700 !important;
  }

  .sidebar-nav {
    flex: 1 !important;
    display: grid !important;
    align-content: start !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  .sidebar-nav a {
    min-height: 48px !important;
    padding: 0 18px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    color: #475467 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
  }

  .sidebar-nav a:hover,
  .sidebar-nav a.active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.20) !important;
  }

  .sidebar-security {
    flex-shrink: 0 !important;
    margin-top: 18px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    background: #f8fbff !important;
    border: 1px solid #dbe7fb !important;
  }

  .sidebar-security span {
    display: block !important;
    font-size: 12px !important;
    color: #667085 !important;
    font-weight: 900 !important;
    margin-bottom: 6px !important;
  }

  .sidebar-security strong {
    display: block !important;
    font-size: 16px !important;
    color: #2563eb !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
  }

  .logout-btn {
    flex-shrink: 0 !important;
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 10px !important;
    border-radius: 16px !important;
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border: 1px solid #ffe4e6 !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
  }

  .logout-btn:hover {
    background: #ffe4e6 !important;
    color: #be123c !important;
    transform: translateY(-2px);
  }
}

/* If screen height is small, make nav slightly tighter */
@media (min-width: 861px) and (max-height: 760px) {
  .sidebar {
    padding: 18px 16px !important;
  }

  .sidebar-brand {
    margin-bottom: 18px !important;
  }

  .sidebar-brand .brand-icon {
    width: 46px !important;
    height: 46px !important;
  }

  .sidebar-nav {
    gap: 6px !important;
  }

  .sidebar-nav a {
    min-height: 42px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
  }

  .sidebar-security {
    padding: 12px !important;
    margin-top: 12px !important;
  }

  .logout-btn {
    min-height: 42px !important;
  }
}

/* Mobile sidebar remains drawer */
@media (max-width: 860px) {
  .sidebar {
    overflow-y: auto !important;
  }

  .sidebar-nav {
    gap: 8px !important;
  }



  .sidebar-nav a {
    min-height: 48px !important;
  }

  .logout-btn {
    margin-top: 14px !important;
  }
}

select {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #101828;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  appearance: auto;
}

select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.10);
}
/* =====================================================
   CLEAN SIGNUP PAGE - NEPHROFLOW
===================================================== */

.clean-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.10), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%) !important;
  color: #101828;
}

.clean-signup-wrapper {
  width: 100%;
  min-height: 100vh;
  padding: 34px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clean-signup-card {
  width: 100%;
  max-width: 980px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe7fb;
  border-radius: 32px;
  padding: 34px;
  box-shadow: 0 28px 80px rgba(37, 99, 235, 0.12);
  animation: softPageRise 0.35s ease both;
}

.clean-auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.clean-auth-brand .brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.22);
}

.clean-auth-brand h3 {
  margin: 0;
  color: #101828;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}

.clean-auth-brand span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.clean-auth-header {
  margin-bottom: 26px;
}

.clean-auth-header h1 {
  margin: 12px 0 8px;
  color: #101828;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.clean-auth-header p {
  color: #667085;
  font-size: 16px;
  line-height: 1.6;
  max-width: 680px;
}

.clean-signup-form {
  width: 100%;
}

.clean-signup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.clean-field {
  display: grid;
  gap: 8px;
}

.clean-field label {
  color: #344054;
  font-size: 14px;
  font-weight: 950;
}

.clean-field input,
.clean-field select,
.clean-field textarea {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #101828;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 750;
  outline: none;
  box-shadow: none;
  transition: 0.22s ease;
}

.clean-field textarea {
  min-height: 120px;
  resize: vertical;
  padding-top: 16px;
  line-height: 1.6;
  margin-top: 18px;
}

.clean-field input::placeholder,
.clean-field textarea::placeholder {
  color: #98a2b3;
}

.clean-field input:focus,
.clean-field select:focus,
.clean-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.10);
}

/* Role choice buttons */
.role-field {
  width: 100%;
}

.role-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.role-choice {
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #475467;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  transition: 0.25s ease;
}

.role-choice:hover {
  background: #eef5ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.role-choice.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.20);
}

.clean-hipaa-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  padding: 18px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #dbe7fb;
  color: #344054;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.5;
}

.clean-hipaa-box input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: #2563eb;
}

.clean-hipaa-box a {
  color: #2563eb;
  font-weight: 950;
  text-decoration: none;
}

.clean-hipaa-box a:hover {
  text-decoration: underline;
}

.full-btn {
  width: 100%;
  min-height: 58px;
}

.form-message {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 900;
  display: none;
}

.form-message.success {
  display: block;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.form-message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.clean-auth-links {
  margin-top: 26px;
  text-align: center;
}

.clean-auth-links p {
  margin: 8px 0;
  color: #667085;
  font-size: 15px;
  font-weight: 850;
}

.clean-auth-links a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 950;
}

.clean-auth-links a:hover {
  text-decoration: underline;
}

@keyframes softPageRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 760px) {
  .clean-signup-wrapper {
    padding: 18px 12px;
    align-items: flex-start;
  }

  .clean-signup-card {
    padding: 22px;
    border-radius: 26px;
  }

  .clean-auth-header h1 {
    font-size: 34px;
  }

  .clean-auth-header p {
    font-size: 14px;
  }

  .clean-signup-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .role-choice-grid {
    grid-template-columns: 1fr;
  }

  .clean-hipaa-box {
    align-items: flex-start;
    font-size: 14px;
  }
}
/* =====================================================
   STABLE DESKTOP SIDEBAR FIX
===================================================== */

@media (min-width: 901px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    min-height: 100vh !important;
    width: 100% !important;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    border-right: 1px solid #dbe7fb !important;
    z-index: 20 !important;
    padding: 28px 22px !important;
  }

  .main-content {
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    padding: 28px !important;
  }

  .sidebar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 28px !important;
  }

  .sidebar-nav {
    display: grid !important;
    gap: 10px !important;
  }

  .sidebar-nav a {
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    border-radius: 16px !important;
    color: #475467 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }

  .sidebar-nav a.active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18) !important;
  }

  .sidebar-security {
    margin-top: 24px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    background: #f8fbff !important;
    border: 1px solid #dbe7fb !important;
  }

  .logout-btn {
    width: 100% !important;
    margin-top: 14px !important;
    min-height: 46px !important;
    border-radius: 16px !important;
  }
}

/* Mobile bottom spacing */
@media (max-width: 900px) {
  .main-content {
    padding-bottom: 110px !important;
  }

  .mobile-bottom-nav,
  .bottom-nav {
    z-index: 9999 !important;
  }
}
/* Button loading spinner */
button[disabled],
.primary-btn[disabled] {
  opacity: 0.75;
  cursor: not-allowed !important;
  pointer-events: none;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
  animation: btnSpin 0.75s linear infinite;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

.primary-btn.full-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* =====================================================
   FINAL SIDEBAR + MOBILE MENU FIX
   Desktop scroll + mobile overlay above bottom nav
===================================================== */

/* Desktop layout */
@media (min-width: 901px) {
  html,
  body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .app-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    width: 100% !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 26px 22px !important;
    background: #ffffff !important;
    border-right: 1px solid #dbe7fb !important;
    z-index: 50 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .sidebar::-webkit-scrollbar {
    width: 6px !important;
  }

  .sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 999px !important;
  }

  .sidebar-brand {
    flex-shrink: 0 !important;
    margin-bottom: 24px !important;
  }

  .sidebar-nav {
    display: grid !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .sidebar-nav a {
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    border-radius: 16px !important;
    color: #475467 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
  }

  .sidebar-nav a.active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18) !important;
  }

  .sidebar-security {
    flex-shrink: 0 !important;
    margin-top: 24px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    background: #f8fbff !important;
    border: 1px solid #dbe7fb !important;
  }

  .logout-btn {
    flex-shrink: 0 !important;
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 14px !important;
    margin-bottom: 20px !important;
    border-radius: 16px !important;
  }

  .main-content {
    min-width: 0 !important;
    width: 100% !important;
    padding: 28px !important;
    overflow-x: hidden !important;
  }

  .mobile-topbar,
  .mobile-overlay,
  .mobile-close-btn,
  .mobile-bottom-nav,
  .bottom-nav {
    display: none !important;
  }
}

/* Mobile layout */
@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    min-height: 100vh !important;
  }

  .main-content {
    width: 100% !important;
    min-width: 0 !important;
    padding: 18px 14px 115px !important;
    overflow-x: hidden !important;
  }

  .mobile-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 8000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 72px !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid #dbe7fb !important;
  }

  .mobile-menu-btn {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    border: 1px solid #dbe7fb !important;
    background: #ffffff !important;
    color: #101828 !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    display: grid !important;
    place-items: center !important;
    cursor: pointer !important;
  }

  .mobile-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.45) !important;
    z-index: 9000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: 0.25s ease !important;
  }

  .mobile-overlay.active,
  body.menu-open .mobile-overlay {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 82% !important;
    max-width: 340px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    z-index: 10000 !important;
    padding: 24px 20px 135px !important;
    border-right: 1px solid #dbe7fb !important;
    transform: translateX(-105%) !important;
    transition: transform 0.28s ease !important;
    box-shadow: 20px 0 70px rgba(15, 23, 42, 0.16) !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .sidebar.active,
  body.menu-open .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar::-webkit-scrollbar {
    width: 5px !important;
  }

  .sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 999px !important;
  }

  .mobile-close-btn {
    display: grid !important;
    place-items: center !important;
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    border: 1px solid #dbe7fb !important;
    background: #ffffff !important;
    color: #101828 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
  }

  .sidebar-brand {
    flex-shrink: 0 !important;
    margin: 8px 54px 24px 0 !important;
  }

  .sidebar-nav {
    display: grid !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .sidebar-nav a {
    display: flex !important;
    align-items: center !important;
    min-height: 50px !important;
    padding: 13px 16px !important;
    border-radius: 16px !important;
    color: #475467 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 900 !important;
  }

  .sidebar-nav a.active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    color: #ffffff !important;
  }

  .sidebar-security {
    flex-shrink: 0 !important;
    margin-top: 24px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    background: #f8fbff !important;
    border: 1px solid #dbe7fb !important;
  }

  .logout-btn {
    flex-shrink: 0 !important;
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 14px !important;
    margin-bottom: 30px !important;
    border-radius: 16px !important;
  }

  /* Bottom nav must stay below sidebar */
  .mobile-bottom-nav,
  .bottom-nav {
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
    z-index: 7000 !important;
  }

  body.menu-open .mobile-bottom-nav,
  body.menu-open .bottom-nav {
    z-index: 1000 !important;
    pointer-events: none !important;
    opacity: 0.25 !important;
  }
}


/* =====================================================
   FINAL SIDEBAR POLISH - DESKTOP + MOBILE
   Fixes sidebar scroll, logout position, spacing, and clean look
===================================================== */

/* Desktop sidebar clean layout */
@media (min-width: 861px) {
  .sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 24px 18px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-right: 1px solid #dbe7fb !important;
    box-shadow: 10px 0 35px rgba(37, 99, 235, 0.06) !important;
  }

  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }

  .sidebar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 28px !important;
    flex-shrink: 0 !important;
  }

  .sidebar-brand .brand-icon {
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
    font-size: 18px !important;
  }

  .sidebar-brand h3 {
    font-size: 20px !important;
    line-height: 1.1 !important;
    color: #101828 !important;
    margin: 0 !important;
  }

  .sidebar-brand span {
    font-size: 13px !important;
    color: #667085 !important;
    font-weight: 700 !important;
  }

  .sidebar-nav {
    flex: 1 !important;
    display: grid !important;
    align-content: start !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  .sidebar-nav a {
    min-height: 48px !important;
    padding: 0 18px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    color: #475467 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
  }

  .sidebar-nav a:hover,
  .sidebar-nav a.active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.20) !important;
  }

  .sidebar-security {
    flex-shrink: 0 !important;
    margin-top: 18px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    background: #f8fbff !important;
    border: 1px solid #dbe7fb !important;
  }

  .sidebar-security span {
    display: block !important;
    font-size: 12px !important;
    color: #667085 !important;
    font-weight: 900 !important;
    margin-bottom: 6px !important;
  }

  .sidebar-security strong {
    display: block !important;
    font-size: 16px !important;
    color: #2563eb !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
  }

  .logout-btn {
    flex-shrink: 0 !important;
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 10px !important;
    border-radius: 16px !important;
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border: 1px solid #ffe4e6 !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
  }

  .logout-btn:hover {
    background: #ffe4e6 !important;
    color: #be123c !important;
    transform: translateY(-2px);
  }
}

/* If screen height is small, make nav slightly tighter */
@media (min-width: 861px) and (max-height: 760px) {
  .sidebar {
    padding: 18px 16px !important;
  }

  .sidebar-brand {
    margin-bottom: 18px !important;
  }

  .sidebar-brand .brand-icon {
    width: 46px !important;
    height: 46px !important;
  }

  .sidebar-nav {
    gap: 6px !important;
  }

  .sidebar-nav a {
    min-height: 42px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
  }

  .sidebar-security {
    padding: 12px !important;
    margin-top: 12px !important;
  }

  .logout-btn {
    min-height: 42px !important;
  }
}

/* Mobile sidebar remains drawer */
@media (max-width: 860px) {
  .sidebar {
    overflow-y: auto !important;
  }

  .sidebar-nav {
    gap: 8px !important;
  }

  .sidebar-nav a {
    min-height: 48px !important;
  }

  .logout-btn {
    margin-top: 14px !important;
  }
}
/* Treatment voice dictation table */
.mini-mic-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #ff3b30;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(255, 59, 48, 0.22);
}

.dictation-active {
  border-color: #ff3b30 !important;
  box-shadow: 0 0 0 5px rgba(255, 59, 48, 0.14) !important;
}

.voice-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.voice-table-wrap table {
  min-width: 1180px;
}

.voice-table-wrap input {
  min-width: 110px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  padding: 0 12px;
  font-weight: 700;
}

.voice-table-wrap .flow-notes {
  min-width: 180px;
}
/* =====================================================
   EMERGENCY TREATMENT PAGE CLEAN FIX
   Fixes blank fields, black mobile background, desktop width,
   mic button alignment, and treatment layout mess
===================================================== */

/* Hide backend compatibility fields completely */
.hidden-compat-fields,
.hidden-compat-fields *,
.hidden-utility-field,
.hidden-utility-field * {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Page background reset */
body,
.treatment-voice-page,
.clean-page {
  background: #eef5ff !important;
  color: #101828 !important;
}

/* Desktop treatment layout */
@media (min-width: 901px) {
  .treatment-voice-page {
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 28px !important;
  }

  .voice-card {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #dbe7fb !important;
    border-radius: 24px !important;
    padding: 24px !important;
    margin-bottom: 22px !important;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.08) !important;
  }

  .voice-card-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-bottom: 18px !important;
  }

  .voice-card-head h2 {
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1.15 !important;
    color: #101828 !important;
  }

  .voice-card-head p {
    margin: 6px 0 0 !important;
    color: #667085 !important;
    font-size: 14px !important;
  }

  .voice-field-list {
    display: grid !important;
    gap: 14px !important;
  }

  .voice-field {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px !important;
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .voice-field.label-field {
    grid-template-columns: 150px minmax(0, 1fr) 52px !important;
  }

  .voice-field label {
    color: #475467 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  .voice-field input,
  .voice-field textarea {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    border: 1px solid #dbe3ef !important;
    background: #ffffff !important;
    color: #101828 !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 750 !important;
    outline: none !important;
  }

  .voice-field textarea {
    min-height: 120px !important;
    padding: 14px 16px !important;
    resize: vertical !important;
  }

  .textarea-voice-field {
    grid-template-columns: minmax(0, 1fr) 52px !important;
    align-items: stretch !important;
  }

  .mic-btn {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border: none !important;
    border-radius: 16px !important;
    background: #ff3b30 !important;
    color: #ffffff !important;
    font-size: 18px !important;
    display: grid !important;
    place-items: center !important;
    cursor: pointer !important;
    box-shadow: 0 10px 22px rgba(255, 59, 48, 0.22) !important;
  }

  .voice-check-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }

  .voice-check-grid label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 46px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    background: #f8fbff !important;
    border: 1px solid #dbe7fb !important;
    color: #344054 !important;
    font-weight: 850 !important;
  }

  .voice-check-grid input {
    width: 18px !important;
    height: 18px !important;
  }
}

/* Mobile treatment layout */
@media (max-width: 900px) {
  body {
    background: #eef5ff !important;
  }

  .treatment-voice-page {
    width: 100% !important;
    padding: 14px 10px 120px !important;
    background: #eef5ff !important;
    color: #101828 !important;
  }

  .treatment-voice-page .topbar {
    background: #ffffff !important;
    border: 1px solid #dbe7fb !important;
    border-radius: 22px !important;
    padding: 16px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.10) !important;
  }

  .treatment-voice-page .topbar h1 {
    font-size: 28px !important;
    color: #101828 !important;
    margin: 8px 0 !important;
  }

  .treatment-voice-page .topbar p {
    color: #667085 !important;
    font-size: 13px !important;
  }

  .topbar-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .topbar-actions button,
  .topbar-actions span {
    width: 100% !important;
    justify-content: center !important;
  }

  .voice-card {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #dbe7fb !important;
    border-radius: 22px !important;
    padding: 16px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08) !important;
  }

  .voice-card-head {
    display: block !important;
    margin-bottom: 14px !important;
  }

  .voice-card-head h2 {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.15 !important;
    color: #101828 !important;
  }

  .voice-card-head p {
    margin: 6px 0 0 !important;
    color: #667085 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .voice-field-list {
    display: grid !important;
    gap: 10px !important;
  }

  .voice-field,
  .voice-field.label-field,
  .textarea-voice-field {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .voice-field.label-field label {
    grid-column: 1 / -1 !important;
    color: #344054 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    margin-bottom: -4px !important;
  }

  .voice-field input,
  .voice-field textarea {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 14px !important;
    border: 1px solid #dbe3ef !important;
    background: #ffffff !important;
    color: #101828 !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 750 !important;
  }

  .voice-field textarea {
    min-height: 100px !important;
    padding: 12px 14px !important;
  }

  .mic-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border: none !important;
    border-radius: 14px !important;
    background: #ff3b30 !important;
    color: #ffffff !important;
    font-size: 17px !important;
    display: grid !important;
    place-items: center !important;
    box-shadow: 0 8px 18px rgba(255, 59, 48, 0.22) !important;
  }

  .voice-check-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  .voice-check-grid label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 44px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    background: #f8fbff !important;
    border: 1px solid #dbe7fb !important;
    color: #344054 !important;
    font-size: 13px !important;
    font-weight: 850 !important;
  }

  .voice-check-grid input {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
  }

  .voice-upload-box {
    border-radius: 16px !important;
    padding: 14px !important;
    background: #f8fbff !important;
    border: 1px dashed #93c5fd !important;
  }

  .voice-upload-box input {
    width: 100% !important;
  }

  .voice-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .voice-actions button {
    width: 100% !important;
    min-height: 48px !important;
  }
}

/* Table fix desktop/mobile */
.voice-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  background: #ffffff !important;
  border-radius: 16px !important;
}

.voice-table-wrap table {
  min-width: 1120px !important;
  width: 1120px !important;
  border-collapse: separate !important;
  border-spacing: 8px !important;
}

.voice-table-wrap th {
  color: #344054 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.voice-table-wrap td {
  min-width: 100px !important;
}

.voice-table-wrap input {
  width: 100% !important;
  min-width: 100px !important;
  height: 44px !important;
  border-radius: 14px !important;
  border: 1px solid #dbe3ef !important;
  padding: 0 12px !important;
  background: #ffffff !important;
  color: #101828 !important;
}

.mini-mic-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border: none !important;
  border-radius: 14px !important;
  background: #ff3b30 !important;
  color: #ffffff !important;
  font-size: 17px !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
}

/* Prevent old black/junky sections from leaking */
.treatment-voice-page section,
.treatment-voice-page div,
.treatment-voice-page label,
.treatment-voice-page p,
.treatment-voice-page h1,
.treatment-voice-page h2 {
  max-width: 100% !important;
}


@media print {
  .sidebar,
  .mobile-topbar,
  .mobile-bottom-nav,
  .bottom-nav,
  .mobile-overlay,
  .topbar-actions,
  .back-btn,
  button,
  .no-print {
    display: none !important;
  }

  body {
    background: #ffffff !important;
  }

  .app-shell {
    display: block !important;
  }

  .main-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  #recordDetailBox {
    display: block !important;
    width: 100% !important;
  }
}

/* =====================================================
   MOBILE + DESKTOP CLEAN PRINT REPORT FIX
===================================================== */


@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html,
  body {
    background: #ffffff !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }



  #mobilePrintReport,
  #mobilePrintReport * {
    visibility: visible !important;
  }



  .print-report {
    width: 100% !important;
    max-width: 100% !important;
    font-family: Arial, Helvetica, sans-serif !important;
    color: #111827 !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  .print-header {
    border-bottom: 2px solid #111827 !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
  }

  .print-brand-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .print-brand-row h1 {
    font-size: 22px !important;
    margin: 0 !important;
    color: #111827 !important;
    font-weight: 900 !important;
  }

  .print-brand-row p {
    margin: 3px 0 0 !important;
    color: #2563eb !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }

  .print-date {
    font-size: 10px !important;
    color: #6b7280 !important;
    text-align: right !important;
  }

  .print-patient-title {
    margin-top: 10px !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    color: #111827 !important;
  }

  .print-subtitle {
    margin-top: 3px !important;
    font-size: 11px !important;
    color: #4b5563 !important;
  }

  #mobilePrintReport .mobile-topbar,
  #mobilePrintReport .mobile-bottom-nav,
  #mobilePrintReport .bottom-nav,
  #mobilePrintReport .sidebar,
  #mobilePrintReport .topbar,
  #mobilePrintReport button,
  #mobilePrintReport .no-print {
    display: none !important;
  }

  #mobilePrintReport section,
  #mobilePrintReport .panel,
  #mobilePrintReport .patient-card,
  #mobilePrintReport .record-card,
  #mobilePrintReport .detail-section {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #mobilePrintReport .panel,
  #mobilePrintReport .patient-card,
  #mobilePrintReport .record-card,
  #mobilePrintReport .detail-section,
  #mobilePrintReport .info-card,
  #mobilePrintReport .detail-field,
  #mobilePrintReport .record-field,
  #mobilePrintReport .stat-card {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    padding: 7px !important;
    margin: 0 0 6px !important;
    min-height: auto !important;
  }

  #mobilePrintReport h1,
  #mobilePrintReport h2,
  #mobilePrintReport h3 {
    color: #111827 !important;
    margin: 0 0 6px !important;
    line-height: 1.2 !important;
  }

  #mobilePrintReport h1 {
    font-size: 17px !important;
  }

  #mobilePrintReport h2 {
    font-size: 14px !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding-bottom: 4px !important;
  }

  #mobilePrintReport h3 {
    font-size: 12px !important;
  }

  #mobilePrintReport p {
    color: #374151 !important;
    margin: 0 0 5px !important;
    font-size: 10.5px !important;
  }

  #mobilePrintReport .detail-grid,
  #mobilePrintReport .info-grid,
  #mobilePrintReport .record-grid,
  #mobilePrintReport .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #mobilePrintReport span,
  #mobilePrintReport label {
    font-size: 9.5px !important;
    color: #6b7280 !important;
    font-weight: 800 !important;
  }

  #mobilePrintReport strong {
    font-size: 11.5px !important;
    color: #111827 !important;
    font-weight: 900 !important;
  }

  #mobilePrintReport table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9.5px !important;
    margin-top: 6px !important;
  }

  #mobilePrintReport th,
  #mobilePrintReport td {
    border: 1px solid #d1d5db !important;
    padding: 4px !important;
    text-align: left !important;
  }

  #mobilePrintReport th {
    background: #f3f4f6 !important;
    font-weight: 900 !important;
  }

  #mobilePrintReport .status-pill,
  #mobilePrintReport .badge {
    display: inline-block !important;
    padding: 3px 7px !important;
    border-radius: 999px !important;
    background: #dcfce7 !important;
    color: #166534 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
  }
}

.danger-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.danger-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

.record-actions,
.patient-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.record-item {
  gap: 16px;
}

.record-main {
  flex: 1;
}

.record-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

.danger-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.danger-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}
/* =====================================================
   COMPACT MOBILE FLOWSHEET DESIGN
===================================================== */

.clean-table,
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#flowRows .flow-cell {
  padding: 8px 6px !important;
  min-width: 135px;
}

.flow-field-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.flow-mini-input {
  width: 86px !important;
  min-width: 86px !important;
  height: 42px !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 700;
}

.flow-mic-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: none;
  border-radius: 13px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flow-mic-btn:hover {
  background: #dbeafe;
}

.flow-mic-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .flow-mini-input {
    width: 78px !important;
    min-width: 78px !important;
    height: 38px !important;
    font-size: 13px !important;
    padding: 7px 8px !important;
  }

  .flow-mic-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 11px;
    font-size: 13px;
  }

  #flowRows .flow-cell {
    min-width: 122px;
    padding: 7px 5px !important;
  }

  .treatment-table th {
    font-size: 13px !important;
    padding: 12px 10px !important;
  }
}

@media (max-width: 480px) {
  .flow-mini-input {
    width: 72px !important;
    min-width: 72px !important;
    height: 36px !important;
    font-size: 12px !important;
  }

  .flow-mic-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 12px;
  }

  #flowRows .flow-cell {
    min-width: 112px;
  }
}
/* =====================================================
   DICTATION HELP POPUP
===================================================== */

.dictation-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.dictation-help-modal {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  position: relative;
  animation: dictationPop 0.25s ease;
}

@keyframes dictationPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dictation-help-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 14px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
}

.dictation-help-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 18px;
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.25);
}

.dictation-help-modal h2 {
  margin: 0 0 8px;
  font-size: 28px;
  color: #0f172a;
}

.dictation-help-intro {
  margin: 0 0 18px;
  color: #64748b;
  font-size: 16px;
  line-height: 1.5;
}

.dictation-help-steps {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.dictation-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fbff;
}

.dictation-step strong {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.dictation-step span {
  color: #334155;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 650;
}

.dictation-help-note {
  padding: 14px;
  border-radius: 18px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  margin-bottom: 18px;
}

.dictation-help-btn {
  width: 100%;
  justify-content: center;
}

.dictation-floating-help {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 9998;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

@media (max-width: 640px) {
  .dictation-help-modal {
    border-radius: 24px;
    padding: 24px 18px;
  }

  .dictation-help-modal h2 {
    font-size: 24px;
  }

  .dictation-help-intro {
    font-size: 15px;
  }

  .dictation-step {
    padding: 12px;
  }

  .dictation-step span {
    font-size: 14px;
  }

  .dictation-floating-help {
    right: 14px;
    bottom: 86px;
    padding: 11px 15px;
    font-size: 13px;
  }
}
/* =====================================================
   LANDING PAGE WHAT YOU CAN DO SECTION - PREMIUM MOBILE
===================================================== */

.what-can-do-section {
  margin: 28px auto 40px;
  width: min(100%, 760px);
  padding: 0 18px;
}

.section-mini-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.feature-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.07);
  backdrop-filter: blur(12px);
}

.feature-card span {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  margin-top: 1px;
}

.feature-card p {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.42;
  font-weight: 750;
}

@media (min-width: 720px) {
  .feature-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .what-can-do-section {
    margin-top: 24px;
    padding: 0 16px 28px;
  }

  .section-mini-title {
    font-size: 14px;
    padding: 9px 14px;
  }

  .feature-card {
    padding: 14px;
    border-radius: 16px;
  }

  .feature-card p {
    font-size: 14px;
  }

  .feature-card span {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 13px;
  }
}
/* =====================================================
   LANDING PAGE PLANS / TRIAL SECTION
===================================================== */

.plans-preview-section {
  width: min(100%, 1100px);
  margin: 34px auto 60px;
  padding: 0 18px;
}

.plans-header {
  text-align: center;
  margin-bottom: 22px;
}

.plans-header .section-mini-title {
  margin-bottom: 14px;
}

.plans-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.plans-header p {
  max-width: 720px;
  margin: 12px auto 0;
  color: #64748b;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 650;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(14px);
}

.featured-plan {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: 0 26px 70px rgba(37, 99, 235, 0.16);
  transform: translateY(-6px);
}

.plan-badge {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 16px;
}

.featured-plan .plan-badge {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
}

.plan-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.plan-desc {
  margin: 10px 0 18px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 650;
}

.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 11px;
}

.plan-card li {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.trial-pill {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 14px;
  font-weight: 950;
  text-align: center;
}

@media (max-width: 900px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .featured-plan {
    transform: none;
  }
}

@media (max-width: 480px) {
  .plans-preview-section {
    margin-top: 26px;
    padding: 0 16px 44px;
  }

  .plans-header {
    text-align: left;
  }

  .plans-header h2 {
    font-size: 28px;
  }

  .plans-header p {
    font-size: 15px;
  }

  .plan-card {
    padding: 20px;
    border-radius: 24px;
  }

  .plan-card h3 {
    font-size: 22px;
  }
}
/* =====================================================
   CONSENT MODULE
===================================================== */

.consent-warning-panel {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.9));
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.signature-card {
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #f8fbff;
  padding: 16px;
}

.signature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.signature-head strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.signature-head button {
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 900;
  cursor: pointer;
}

.signature-pad {
  width: 100%;
  height: 150px;
  border: 1px dashed #93c5fd;
  border-radius: 18px;
  background: #ffffff;
  touch-action: none;
}

.consents-list {
  display: grid;
  gap: 14px;
}

.consent-record-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #ffffff;
}

.consent-record-card strong {
  color: #0f172a;
  font-size: 17px;
}

.consent-record-card p {
  margin: 6px 0;
  color: #475569;
  font-weight: 700;
}

.consent-record-card small {
  color: #64748b;
  font-weight: 700;
}

.consent-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .consent-record-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .consent-card-actions {
    justify-content: flex-start;
  }

  .signature-pad {
    height: 130px;
  }
}
/* =====================================================
   CONSENT DETAIL / PRINT PAGE
===================================================== */

.consent-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.consent-detail-field {
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 15px;
  background: #ffffff;
}

.consent-detail-field span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.consent-detail-field strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.4;
}

.consent-text-box {
  margin-top: 18px;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 18px;
  background: #f8fbff;
}

.consent-text-box h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
}

.consent-text-box p {
  margin: 0;
  white-space: pre-wrap;
  color: #334155;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 650;
}

.consent-signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.consent-signature-view {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #ffffff;
  padding: 16px;
}

.consent-signature-view .signature-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.consent-signature-view img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border: 1px dashed #93c5fd;
  border-radius: 14px;
  background: #ffffff;
}

.signature-empty {
  height: 120px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 800;
}

.consent-signature-view p {
  margin: 10px 0 0;
  color: #0f172a;
  font-weight: 900;
}

@media (max-width: 768px) {
  .consent-detail-grid,
  .consent-signature-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .no-print,
  .mobile-topbar,
  .mobile-bottom-nav,
  .sidebar {
    display: none !important;
  }

  .app-shell {
    display: block !important;
  }

  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  .consent-detail-page {
    background: #ffffff !important;
  }

  .panel {
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  body {
    background: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
/* =====================================================
   CONSENT PAGE PREMIUM FIELD UI + DICTATION
===================================================== */

.consent-page .form-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 20px;
}

.consent-page .form-grid label {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.consent-page input,
.consent-page select,
.consent-page textarea {
  width: 100%;
  min-height: 58px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  font-size: 16px;
  font-weight: 750;
  padding: 15px 16px;
  outline: none;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.05);
}

.consent-page select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, #2563eb 50%),
    linear-gradient(135deg, #2563eb 50%, transparent 50%),
    linear-gradient(to right, #eff6ff, #eff6ff);
  background-position:
    calc(100% - 24px) 50%,
    calc(100% - 17px) 50%,
    calc(100% - 48px) 50%;
  background-size:
    7px 7px,
    7px 7px,
    1px 34px;
  background-repeat: no-repeat;
}

.consent-page textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.consent-page input:focus,
.consent-page select:focus,
.consent-page textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.consent-dictation-wrap {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin-top: 9px;
}

.consent-dictation-wrap .consent-dictation-field {
  margin-top: 0 !important;
  flex: 1;
}

.consent-mic-btn {
  width: 58px;
  min-width: 58px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.consent-mic-btn.recording {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.consent-dictation-note {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.consent-page .signature-pad {
  height: 180px;
}

@media (max-width: 768px) {
  .consent-page .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .consent-page input,
  .consent-page select,
  .consent-page textarea {
    min-height: 56px;
    font-size: 15px;
    border-radius: 17px;
    padding: 14px 15px;
  }

  .consent-page textarea {
    min-height: 120px;
  }

  .consent-mic-btn {
    width: 52px;
    min-width: 52px;
    border-radius: 16px;
  }

  .consent-page .signature-pad {
    height: 155px;
  }
}

@media (max-width: 480px) {
  .consent-page input,
  .consent-page select,
  .consent-page textarea {
    font-size: 14px;
  }

  .consent-mic-btn {
    width: 48px;
    min-width: 48px;
  }
}
/* =====================================================
   FINAL CONSENT PAGE FIELD + MIC UI FIX
===================================================== */

.consent-page .form-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
  gap: 22px !important;
}

.consent-page .form-grid label {
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
}

.consent-page input,
.consent-page select,
.consent-page textarea {
  width: 100% !important;
  min-height: 62px !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  padding: 16px 18px !important;
  outline: none !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.06) !important;
}

.consent-page select {
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 54px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #2563eb 50%),
    linear-gradient(135deg, #2563eb 50%, transparent 50%),
    linear-gradient(to right, #eff6ff, #eff6ff) !important;
  background-position:
    calc(100% - 26px) 50%,
    calc(100% - 18px) 50%,
    calc(100% - 54px) 50% !important;
  background-size:
    8px 8px,
    8px 8px,
    1px 36px !important;
  background-repeat: no-repeat !important;
}

.consent-page textarea {
  min-height: 140px !important;
  resize: vertical !important;
  line-height: 1.55 !important;
}

.consent-final-dictation-wrap {
  display: flex !important;
  align-items: stretch !important;
  gap: 10px !important;
  margin-top: 10px !important;
  width: 100% !important;
}

.consent-final-dictation-wrap input,
.consent-final-dictation-wrap textarea {
  margin-top: 0 !important;
  flex: 1 !important;
}

.consent-final-mic-btn {
  width: 62px !important;
  min-width: 62px !important;
  border: none !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: #ffffff !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.25) !important;
}

.consent-final-mic-btn.recording {
  background: linear-gradient(135deg, #ef4444, #f97316) !important;
}

.consent-final-note {
  margin: 0 0 22px !important;
  padding: 16px 18px !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 22px !important;
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  line-height: 1.45 !important;
}

.consent-page .signature-pad {
  height: 190px !important;
}

@media (max-width: 768px) {
  .consent-page .form-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .consent-page input,
  .consent-page select,
  .consent-page textarea {
    min-height: 58px !important;
    font-size: 15px !important;
    border-radius: 18px !important;
  }

  .consent-final-mic-btn {
    width: 54px !important;
    min-width: 54px !important;
    border-radius: 18px !important;
  }

  .consent-page .signature-pad {
    height: 160px !important;
  }
}
/* =====================================================
   CONSENT RECORD LIST + DELETE BUTTON
===================================================== */

.consent-record-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.06);
}

.consent-record-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.consent-record-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 16px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
}

.consent-record-main strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
}

.consent-record-main p {
  margin: 6px 0;
  color: #475569;
  font-weight: 750;
}

.consent-record-main small {
  color: #64748b;
  font-weight: 700;
  line-height: 1.4;
}

.consent-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.danger-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .consent-record-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .consent-card-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .consent-card-actions button {
    flex: 1;
  }
}
/* =====================================================
   SEPARATE CONSENT RECORDS PAGE
===================================================== */

.record-search-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 14px;
}

.record-search-row input,
.record-search-row select {
  width: 100%;
  min-height: 56px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 750;
  padding: 14px 16px;
  outline: none;
}

.consent-records-list {
  display: grid;
  gap: 14px;
}

.consent-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.06);
}

.consent-record-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.consent-record-avatar {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 17px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
}

.consent-record-info {
  min-width: 0;
}

.consent-record-info strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
}

.consent-record-info p {
  margin: 6px 0;
  color: #475569;
  font-weight: 750;
}

.consent-record-info small {
  color: #64748b;
  font-weight: 700;
  line-height: 1.4;
}

.consent-record-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.danger-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .record-search-row {
    grid-template-columns: 1fr;
  }

  .consent-record-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .consent-record-right {
    justify-content: flex-start;
    width: 100%;
  }

  .consent-record-right button {
    flex: 1;
  }
}
.feature-card p {
  font-size: 14px !important;
  line-height: 1.25 !important;
}

@media (max-width: 480px) {
  .feature-card {
    padding: 13px 14px !important;
  }

  .feature-card p {
    font-size: 13.5px !important;
  }
}
/* =====================================================
   DASHBOARD VISION / CAPABILITIES / PLANS
===================================================== */

.dashboard-vision-section {
  display: grid;
  gap: 26px;
}

.vision-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px;
  border: 1px solid #dbeafe;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 35%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 20px 55px rgba(37, 99, 235, 0.08);
}

.vision-hero-card h1 {
  max-width: 850px;
  margin: 8px 0 12px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.vision-hero-card p {
  max-width: 850px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 650;
}

.vision-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.dashboard-section-heading p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  font-weight: 650;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.capability-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 26px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.07);
  transition: 0.22s ease;
}

.capability-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 24px 55px rgba(37, 99, 235, 0.12);
}

.capability-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 18px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.capability-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 950;
}

.capability-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.benefit-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.benefit-item {
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.benefit-item strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  margin-bottom: 8px;
}

.benefit-item span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.dashboard-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-plan-card {
  padding: 24px;
  border: 1px solid #dbeafe;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.07);
}

.dashboard-plan-card span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-plan-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
}

.dashboard-plan-card p {
  margin: 10px 0 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

.dashboard-plan-card strong {
  display: block;
  margin-bottom: 16px;
  color: #15803d;
  font-size: 14px;
  font-weight: 950;
}

.featured-dashboard-plan {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  box-shadow: 0 26px 70px rgba(37, 99, 235, 0.16);
}

@media (max-width: 1000px) {
  .vision-hero-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .vision-hero-actions {
    justify-content: flex-start;
  }

  .capability-grid,
  .benefit-strip,
  .dashboard-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .vision-hero-card {
    padding: 24px;
    border-radius: 26px;
  }

  .vision-hero-card h1 {
    font-size: 32px;
  }

  .vision-hero-card p {
    font-size: 15px;
  }

  .capability-card,
  .benefit-item,
  .dashboard-plan-card {
    padding: 18px;
    border-radius: 22px;
  }

  .capability-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 15px;
    font-size: 21px;
  }
}
/* =====================================================
   UNIQUE HOME DASHBOARD REDESIGN
===================================================== */

.home-dashboard-page {
  display: grid;
  gap: 28px;
  padding-bottom: 110px;
}

/* Hero Slider */
.home-hero-slider {
  position: relative;
  min-height: 430px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid #dbeafe;
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.14);
  background: #0f172a;
}

.home-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  transition: opacity 0.75s ease;
}

.home-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.home-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.88) 42%, rgba(248, 251, 255, 0.36) 72%, rgba(15, 23, 42, 0.12) 100%);
}

.home-slide-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 56px;
}

.home-eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.11);
  color: #2563eb;
  font-size: 13px;
  font-weight: 950;
}

.home-slide-content h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.home-slide-content p {
  max-width: 660px;
  margin: 18px 0 0;
  color: #475569;
  font-size: 18px;
  line-height: 1.62;
  font-weight: 700;
}

.home-slide-actions {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(12px);
}

.home-slider-dots {
  position: absolute;
  z-index: 3;
  left: 56px;
  bottom: 26px;
  display: flex;
  gap: 9px;
}

.home-slider-dots button {
  width: 34px;
  height: 7px;
  border: none;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.22);
  cursor: pointer;
  transition: 0.25s ease;
}

.home-slider-dots button.active {
  width: 58px;
  background: #2563eb;
}

/* Two Main Action Cards */
.home-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.home-action-card {
  position: relative;
  min-height: 260px;
  border-radius: 32px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid rgba(191, 219, 254, 0.9);
  box-shadow: 0 22px 65px rgba(37, 99, 235, 0.15);
  transition: 0.24s ease;
}

.home-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 80px rgba(37, 99, 235, 0.22);
}

.home-action-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: 0.45s ease;
}

.home-action-card:hover .home-action-bg {
  transform: scale(1.06);
}

.add-patient-card .home-action-bg {
  background-image:
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(37, 99, 235, 0.54)),
    url('https://images.unsplash.com/photo-1551076805-e1869033e561?auto=format&fit=crop&w=1200&q=80');
}

.start-treatment-card .home-action-bg {
  background-image:
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(14, 165, 233, 0.52)),
    url('https://images.unsplash.com/photo-1584982751601-97dcc096659c?auto=format&fit=crop&w=1200&q=80');
}

.home-action-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.home-action-content span {
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  backdrop-filter: blur(10px);
}

.home-action-content h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.home-action-content p {
  max-width: 520px;
  margin: 12px 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
}

.home-action-content strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

/* Capability Panel */
.home-capability-panel {
  padding: 28px;
  border: 1px solid #dbeafe;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.08);
}

.home-section-head {
  margin-bottom: 20px;
}

.home-section-head h2 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.home-section-head p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
}

.home-capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-capability-list div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 15px 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #334155;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
}

.home-capability-list span {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 950;
}

/* Mobile */
@media (max-width: 900px) {
  .home-primary-actions {
    grid-template-columns: 1fr;
  }

  .home-capability-list {
    grid-template-columns: 1fr;
  }

  .home-hero-slider {
    min-height: 500px;
  }

  .home-slide-overlay {
    background:
      linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.9) 56%, rgba(248, 251, 255, 0.35) 100%);
  }

  .home-slide-content {
    padding: 34px 24px;
  }

  .home-slider-dots {
    left: 24px;
    bottom: 22px;
  }
}

@media (max-width: 640px) {
  .home-dashboard-page {
    gap: 22px;
  }

  .home-hero-slider {
    min-height: 520px;
    border-radius: 26px;
  }

  .home-slide-content h1 {
    font-size: 34px;
  }

  .home-slide-content p {
    font-size: 15px;
  }

  .home-action-card,
  .home-action-content {
    min-height: 220px;
  }

  .home-action-card {
    border-radius: 26px;
  }

  .home-action-content {
    padding: 24px;
  }

  .home-action-content h2 {
    font-size: 30px;
  }

  .home-capability-panel {
    padding: 20px;
    border-radius: 26px;
  }

  .home-capability-list div {
    font-size: 14px;
    min-height: 54px;
    padding: 13px 14px;
  }
}
/* =====================================================
   FINAL DASHBOARD CLEAN FIX
   Paste at the VERY END of style.css
   Fixes huge hero, dark cards, bad readability
===================================================== */

.home-dashboard-page {
  gap: 22px !important;
  padding: 28px 32px 110px !important;
  background: #eef5ff !important;
}

/* Compact clean hero */
.home-hero-slider {
  min-height: 320px !important;
  max-height: 360px !important;
  border-radius: 30px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.10) !important;
}

.home-slide {
  background-position: center right !important;
}

.home-slide-overlay {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 48%, rgba(255,255,255,0.60) 78%, rgba(255,255,255,0.25) 100%) !important;
}

.home-slide-content {
  max-width: 720px !important;
  padding: 38px 46px !important;
}

.home-eyebrow {
  margin-bottom: 12px !important;
  padding: 8px 13px !important;
  font-size: 12px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

.home-slide-content h1 {
  max-width: 690px !important;
  margin: 0 !important;
  font-size: clamp(30px, 3.2vw, 46px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.045em !important;
  color: #0f172a !important;
  font-weight: 950 !important;
}

.home-slide-content p {
  max-width: 650px !important;
  margin: 14px 0 0 !important;
  color: #475569 !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
  font-weight: 700 !important;
}

.home-slide-actions {
  margin-top: 22px !important;
}

.home-slider-dots {
  left: 46px !important;
  bottom: 20px !important;
}

/* Two main action cards: light, readable, professional */
.home-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

.home-action-card {
  min-height: 190px !important;
  border-radius: 28px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.09) !important;
  overflow: hidden !important;
}

.home-action-bg {
  opacity: 0.18 !important;
  background-position: center right !important;
}

.add-patient-card .home-action-bg,
.start-treatment-card .home-action-bg {
  background-blend-mode: normal !important;
}

.home-action-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.94) 54%, rgba(255,255,255,0.70) 100%);
  z-index: 1;
}

.home-action-content {
  position: relative !important;
  z-index: 2 !important;
  min-height: 190px !important;
  justify-content: center !important;
  padding: 28px !important;
  color: #0f172a !important;
}

.home-action-content span {
  margin-bottom: 10px !important;
  padding: 6px 11px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  font-size: 12px !important;
}

.home-action-content h2 {
  color: #0f172a !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: -0.04em !important;
}

.home-action-content p {
  max-width: 520px !important;
  margin: 10px 0 14px !important;
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 750 !important;
}

.home-action-content strong {
  color: #2563eb !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}

/* Capabilities: clean cards, no dark look */
.home-capability-panel {
  padding: 24px !important;
  border-radius: 28px !important;
  background: #ffffff !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.08) !important;
}

.home-section-head h2 {
  font-size: clamp(24px, 2.6vw, 34px) !important;
  line-height: 1.1 !important;
}

.home-capability-list {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.home-capability-list div {
  min-height: 54px !important;
  padding: 13px 15px !important;
  border-radius: 17px !important;
  background: #f8fbff !important;
  border: 1px solid #dbeafe !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

.home-capability-list span {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
}

/* Keep existing useful panels clean */
.dashboard-recent-panel,
.dashboard-status-panel {
  border-radius: 28px !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.08) !important;
}

/* Mobile */
@media (max-width: 900px) {
  .home-dashboard-page {
    padding: 20px 16px 105px !important;
  }

  .home-hero-slider {
    min-height: 390px !important;
    max-height: none !important;
    border-radius: 26px !important;
  }

  .home-slide-overlay {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.93) 68%, rgba(255,255,255,0.72) 100%) !important;
  }

  .home-slide-content {
    padding: 28px 22px !important;
  }

  .home-slide-content h1 {
    font-size: 31px !important;
    line-height: 1.12 !important;
  }

  .home-slide-content p {
    font-size: 14.5px !important;
  }

  .home-primary-actions {
    grid-template-columns: 1fr !important;
  }

  .home-action-card,
  .home-action-content {
    min-height: 175px !important;
  }

  .home-action-content {
    padding: 22px !important;
  }

  .home-action-content h2 {
    font-size: 27px !important;
  }

  .home-capability-list {
    grid-template-columns: 1fr !important;
  }
}
/* =====================================================
   FINAL MOBILE DASHBOARD REAL FIX
   Fixes clipped hero, huge cards, bad mobile spacing
   Paste at VERY END of style.css
===================================================== */

/* Main dashboard spacing */
.home-dashboard-page {
  padding: 18px 18px 105px !important;
  gap: 18px !important;
  background: #eef5ff !important;
  overflow-x: hidden !important;
}

/* Stop old slider from clipping */
.home-hero-slider {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.10) !important;
}

/* Only active slide should take space */
.home-slide {
  display: none !important;
  position: relative !important;
  inset: auto !important;
  min-height: 0 !important;
  height: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background-size: cover !important;
  background-position: center right !important;
}

.home-slide.active {
  display: block !important;
}

/* Clean readable overlay */
.home-slide-overlay {
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.93) 60%, rgba(255,255,255,0.72) 100%) !important;
}

/* Hero content compact */
.home-slide-content {
  position: relative !important;
  z-index: 2 !important;
  max-width: 720px !important;
  padding: 28px 28px 52px !important;
}

.home-eyebrow {
  margin-bottom: 10px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
}

.home-slide-content h1 {
  max-width: 650px !important;
  font-size: clamp(28px, 4vw, 42px) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.04em !important;
  margin: 0 !important;
  color: #0f172a !important;
}

.home-slide-content p {
  max-width: 620px !important;
  margin: 12px 0 0 !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  color: #475569 !important;
  font-weight: 700 !important;
}

/* Buttons should not cut */
.home-slide-actions {
  margin-top: 18px !important;
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.home-slide-actions .primary-btn,
.home-slide-actions .secondary-btn {
  min-height: 46px !important;
  padding: 12px 18px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
}

/* Dots fixed inside hero */
.home-slider-dots {
  left: 28px !important;
  bottom: 18px !important;
  z-index: 5 !important;
}

.home-slider-dots button {
  width: 28px !important;
  height: 6px !important;
}

.home-slider-dots button.active {
  width: 46px !important;
}

/* Two action cards compact and readable */
.home-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.home-action-card {
  min-height: 165px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.09) !important;
}

.home-action-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, rgba(255,255,255,0.97), rgba(255,255,255,0.78)) !important;
  z-index: 1 !important;
}

.home-action-bg {
  opacity: 0.42 !important;
  background-position: center right !important;
}

.home-action-content {
  position: relative !important;
  z-index: 2 !important;
  min-height: 165px !important;
  justify-content: center !important;
  padding: 22px !important;
}

.home-action-content span {
  background: #eff6ff !important;
  color: #2563eb !important;
  margin-bottom: 8px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

.home-action-content h2 {
  font-size: 26px !important;
  line-height: 1.05 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.home-action-content p {
  margin: 8px 0 10px !important;
  color: #475569 !important;
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
}

.home-action-content strong {
  color: #2563eb !important;
  font-size: 13.5px !important;
}

/* Capability section compact */
.home-capability-panel {
  padding: 20px !important;
  border-radius: 24px !important;
  background: #ffffff !important;
}

.home-section-head h2 {
  font-size: 26px !important;
  line-height: 1.1 !important;
}

.home-section-head p {
  font-size: 14px !important;
}

.home-capability-list {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.home-capability-list div {
  min-height: 48px !important;
  padding: 12px 13px !important;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
  border-radius: 15px !important;
}

.home-capability-list span {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  font-size: 12px !important;
}

/* Mobile exact fix */
@media (max-width: 768px) {
  .home-dashboard-page {
    padding: 16px 14px 100px !important;
  }

  .home-slide-content {
    padding: 24px 20px 48px !important;
  }

  .home-slide-content h1 {
    font-size: 28px !important;
  }

  .home-slide-content p {
    font-size: 14px !important;
  }

  .home-primary-actions {
    grid-template-columns: 1fr !important;
  }

  .home-action-card,
  .home-action-content {
    min-height: 145px !important;
  }

  .home-action-content h2 {
    font-size: 24px !important;
  }

  .home-action-content p {
    font-size: 13px !important;
  }

  .home-capability-list {
    grid-template-columns: 1fr !important;
  }
}

/* Very small mobile */
@media (max-width: 420px) {
  .home-slide-content h1 {
    font-size: 25px !important;
  }

  .home-slide-content {
    padding: 22px 18px 46px !important;
  }

  .home-action-card,
  .home-action-content {
    min-height: 135px !important;
  }
}
/* =====================================================
   GLOBAL THEME SWITCHER UI
===================================================== */

.global-theme-switcher {
  margin: 18px 20px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.9);
}

.global-theme-switcher > span {
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-switch-buttons {
  display: grid;
  gap: 8px;
}

.theme-switch-buttons button {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 9px 10px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.theme-switch-buttons button.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  border-color: transparent;
}

/* =====================================================
   THEME 1: EMERALD CLINICAL
===================================================== */

html[data-theme="emerald"] body {
  background: #ecfdf5 !important;
  color: #06281f !important;
}

html[data-theme="emerald"] .main-content,
html[data-theme="emerald"] .clean-page,
html[data-theme="emerald"] .clean-dashboard,
html[data-theme="emerald"] .home-dashboard-page {
  background: linear-gradient(180deg, #ecfdf5, #f8fffc) !important;
}

html[data-theme="emerald"] .sidebar,
html[data-theme="emerald"] .mobile-topbar,
html[data-theme="emerald"] .mobile-bottom-nav {
  background: #ffffff !important;
  border-color: #bbf7d0 !important;
}

html[data-theme="emerald"] .brand-icon,
html[data-theme="emerald"] .primary-btn,
html[data-theme="emerald"] .sidebar-nav a.active,
html[data-theme="emerald"] .mobile-bottom-nav a.active,
html[data-theme="emerald"] .mobile-bottom-nav button:hover,
html[data-theme="emerald"] .theme-switch-buttons button.active {
  background: linear-gradient(135deg, #059669, #14b8a6) !important;
  color: #ffffff !important;
}

html[data-theme="emerald"] .page-kicker,
html[data-theme="emerald"] .sidebar-security strong,
html[data-theme="emerald"] .dashboard-section-heading h2,
html[data-theme="emerald"] .home-section-head h2,
html[data-theme="emerald"] .panel-head h2 {
  color: #047857 !important;
}

html[data-theme="emerald"] .panel,
html[data-theme="emerald"] .patient-card,
html[data-theme="emerald"] .detail-item,
html[data-theme="emerald"] .consent-record-row,
html[data-theme="emerald"] .consent-record-card,
html[data-theme="emerald"] .home-capability-panel,
html[data-theme="emerald"] .home-action-card,
html[data-theme="emerald"] .home-hero-slider {
  background: #ffffff !important;
  border-color: #bbf7d0 !important;
  box-shadow: 0 16px 38px rgba(5, 150, 105, 0.10) !important;
}

html[data-theme="emerald"] .secondary-btn,
html[data-theme="emerald"] .status-pill.blue,
html[data-theme="emerald"] .section-mini-title,
html[data-theme="emerald"] .home-eyebrow {
  background: #d1fae5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
}

html[data-theme="emerald"] input,
html[data-theme="emerald"] select,
html[data-theme="emerald"] textarea {
  border-color: #a7f3d0 !important;
}

html[data-theme="emerald"] input:focus,
html[data-theme="emerald"] select:focus,
html[data-theme="emerald"] textarea:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important;
}

html[data-theme="emerald"] .home-capability-list span,
html[data-theme="emerald"] .feature-card span,
html[data-theme="emerald"] .consent-record-avatar,
html[data-theme="emerald"] .capability-icon {
  background: linear-gradient(135deg, #059669, #14b8a6) !important;
  color: #ffffff !important;
}

html[data-theme="emerald"] .logout-btn {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

/* =====================================================
   THEME 2: MIDNIGHT GOLD
===================================================== */

html[data-theme="midnight"] body {
  background: #08111f !important;
  color: #f8fafc !important;
}

html[data-theme="midnight"] .main-content,
html[data-theme="midnight"] .clean-page,
html[data-theme="midnight"] .clean-dashboard,
html[data-theme="midnight"] .home-dashboard-page {
  background: linear-gradient(180deg, #08111f, #0f172a) !important;
  color: #f8fafc !important;
}

html[data-theme="midnight"] .sidebar,
html[data-theme="midnight"] .mobile-topbar,
html[data-theme="midnight"] .mobile-bottom-nav {
  background: #0f172a !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="midnight"] .sidebar-brand h3,
html[data-theme="midnight"] .mobile-logo h3,
html[data-theme="midnight"] h1,
html[data-theme="midnight"] h2,
html[data-theme="midnight"] h3,
html[data-theme="midnight"] strong {
  color: #f8fafc !important;
}

html[data-theme="midnight"] p,
html[data-theme="midnight"] span,
html[data-theme="midnight"] small,
html[data-theme="midnight"] .sidebar-nav a {
  color: #cbd5e1 !important;
}

html[data-theme="midnight"] .brand-icon,
html[data-theme="midnight"] .primary-btn,
html[data-theme="midnight"] .sidebar-nav a.active,
html[data-theme="midnight"] .mobile-bottom-nav a.active,
html[data-theme="midnight"] .theme-switch-buttons button.active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #111827 !important;
}

html[data-theme="midnight"] .page-kicker,
html[data-theme="midnight"] .sidebar-security strong,
html[data-theme="midnight"] .home-eyebrow {
  color: #fbbf24 !important;
}

html[data-theme="midnight"] .panel,
html[data-theme="midnight"] .patient-card,
html[data-theme="midnight"] .detail-item,
html[data-theme="midnight"] .consent-record-row,
html[data-theme="midnight"] .consent-record-card,
html[data-theme="midnight"] .home-capability-panel,
html[data-theme="midnight"] .home-action-card,
html[data-theme="midnight"] .home-hero-slider,
html[data-theme="midnight"] .global-theme-switcher {
  background: #111827 !important;
  border-color: rgba(245, 158, 11, 0.24) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="midnight"] .secondary-btn,
html[data-theme="midnight"] .status-pill.blue,
html[data-theme="midnight"] .section-mini-title,
html[data-theme="midnight"] .home-eyebrow {
  background: rgba(245, 158, 11, 0.13) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}

html[data-theme="midnight"] input,
html[data-theme="midnight"] select,
html[data-theme="midnight"] textarea {
  background: #0f172a !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
  color: #f8fafc !important;
}

html[data-theme="midnight"] input::placeholder,
html[data-theme="midnight"] textarea::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="midnight"] input:focus,
html[data-theme="midnight"] select:focus,
html[data-theme="midnight"] textarea:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15) !important;
}

html[data-theme="midnight"] .home-slide-overlay {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.98) 0%, rgba(17, 24, 39, 0.92) 60%, rgba(17, 24, 39, 0.65) 100%) !important;
}

html[data-theme="midnight"] .home-slide-content h1,
html[data-theme="midnight"] .home-action-content h2 {
  color: #f8fafc !important;
}

html[data-theme="midnight"] .home-slide-content p,
html[data-theme="midnight"] .home-action-content p {
  color: #cbd5e1 !important;
}

html[data-theme="midnight"] .home-action-card::after {
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.80)) !important;
}

html[data-theme="midnight"] .home-capability-list div,
html[data-theme="midnight"] .feature-card,
html[data-theme="midnight"] .signature-card {
  background: #0f172a !important;
  border-color: rgba(245, 158, 11, 0.22) !important;
  color: #e2e8f0 !important;
}

html[data-theme="midnight"] .home-capability-list span,
html[data-theme="midnight"] .feature-card span,
html[data-theme="midnight"] .consent-record-avatar,
html[data-theme="midnight"] .capability-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #111827 !important;
}

html[data-theme="midnight"] .theme-switch-buttons button {
  background: #0f172a !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
  color: #e2e8f0 !important;
}

html[data-theme="midnight"] .logout-btn {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fecaca !important;
}