/* ==========================================================================
   CareBridge — Modern Healthcare UI System
   Theme: Clean white canvas, Dark Navy headings, Soft Teal & Sky Blue accents
   Crafted for accessible, patient-centric post-discharge healthcare
   ========================================================================== */

:root {
  /* Color Palette */
  --navy-900: #0A192F;
  --navy-800: #0F2744;
  --navy-700: #1A365D;
  --navy-600: #2A4365;

  --teal-600: #0D9488;
  --teal-500: #14B8A6;
  --teal-100: #CCFBF1;
  --teal-50: #F0FDFA;

  --blue-600: #0284C7;
  --blue-500: #0EA5E9;
  --blue-100: #E0F2FE;
  --blue-50: #F0F9FF;

  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --white: #FFFFFF;

  /* Clinical Status Accents */
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;
  --success-text: #065F46;
  --success-dark: #047857;

  --warning-bg: #FFFBEB;
  --warning-border: #FDE68A;
  --warning-text: #92400E;
  --warning-dark: #D97706;

  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;
  --danger-text: #991B1B;
  --danger-dark: #DC2626;

  --info-bg: #F0F9FF;
  --info-border: #BAE6FD;
  --info-text: #0369A1;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Elevations */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 8px 20px -4px rgba(15, 23, 42, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.05);

  /* Dimensions */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: #F8FAFC;
  color: var(--slate-700);
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  color: var(--slate-600);
  line-height: 1.6;
}

a {
  color: var(--teal-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--navy-800);
}

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

/* ==========================================================================
   Utility Helpers
   ========================================================================== */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1;
  white-space: nowrap;
}

.badge-demo {
  background-color: var(--blue-100);
  color: var(--blue-600);
  border: 1px solid var(--blue-500);
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-secondary {
  background-color: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
}

/* Alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.875rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}

.alert-info {
  background-color: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info-text);
}

.alert-warning {
  background-color: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.alert-danger {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.alert-success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  line-height: 1.35;
  user-select: none;
  text-decoration: none;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background-color: var(--navy-800);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(10, 25, 47, 0.12);
}

.btn-primary:hover {
  background-color: var(--navy-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(10, 25, 47, 0.16);
  color: var(--white);
}

.btn-teal {
  background-color: var(--teal-600);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(13, 148, 136, 0.2);
}

.btn-teal:hover {
  background-color: #0F766E;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}

.btn-outline {
  background-color: var(--white);
  color: var(--slate-700);
  border-color: var(--slate-300);
}

.btn-outline:hover {
  background-color: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--navy-900);
}

.btn-outline-primary {
  background-color: var(--white);
  color: var(--navy-800);
  border-color: var(--slate-300);
}

.btn-outline-primary:hover {
  background-color: var(--slate-50);
  border-color: var(--navy-800);
  color: var(--navy-900);
}

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

.btn-danger:hover {
  background-color: #B91C1C;
}

.btn-text {
  background: transparent;
  color: var(--slate-600);
  padding: 0.4rem 0.6rem;
}

.btn-text:hover {
  color: var(--navy-900);
  background-color: var(--slate-100);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.95rem;
  font-size: 0.95rem;
  color: var(--slate-900);
  background-color: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.15s ease;
}

.form-control:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.form-select {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  color: var(--slate-700);
  background-color: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--teal-600);
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-header h2, .card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
}

.card-body {
  padding: 1.35rem 1.4rem;
}

/* ==========================================================================
   1. LOGIN PAGE
   ========================================================================== */
.login-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  margin: 0;
  padding: 0;
  background: var(--white);
  overflow-x: hidden;
}

.login-split-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  background: var(--white);
}

@media (min-width: 960px) {
  .login-split-container {
    flex-direction: row;
    min-height: 100vh;
  }
}

/* 50% Left Half: Hero Graphic (fills the entire left half of the screen without cropping) */
.login-hero-pane {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--slate-200);
  overflow: hidden;
}

@media (min-width: 960px) {
  .login-hero-pane {
    width: 50%;
    min-height: 100vh;
    border-bottom: none;
    border-right: 1px solid var(--slate-200);
    padding: 0;
    margin: 0;
    position: sticky;
    top: 0;
  }
}

.login-hero-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.login-hero-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100vh;
  object-fit: cover; /* Fills 100% of top, bottom, and sides edge-to-edge */
  object-position: center;
  display: block;
  margin: 0;
}

/* 50% Right Half: Login / Registration Credentials */
.login-card {
  width: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

@media (min-width: 960px) {
  .login-card {
    width: 50%;
    min-height: 100vh;
    padding: 3rem 4rem;
  }
}

.login-card > * {
  width: 100%;
  max-width: 440px;
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-icon-wrap {
  width: 54px;
  height: 54px;
  margin: 0 auto 0.85rem;
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--teal-100) 100%);
  border: 1px solid var(--teal-500);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.login-brand h1 {
  font-size: 1.75rem;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.login-brand .tagline {
  font-size: 0.9rem;
  color: var(--teal-600);
  font-weight: 600;
  margin-top: 0.2rem;
}

.login-brand .subtitle {
  font-size: 0.825rem;
  color: var(--slate-500);
  margin-top: 0.35rem;
}

.auth-tabs-bar {
  display: flex;
  background: var(--slate-100);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--slate-200);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-600);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.auth-tab-btn:hover {
  color: var(--navy-900);
}

.auth-tab-btn.active {
  background: var(--white);
  color: var(--navy-900);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.demo-credentials-pill {
  background: var(--slate-50);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: var(--slate-600);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.demo-credentials-pill strong {
  color: var(--navy-800);
}

.login-btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.login-btn-row .btn {
  width: 100%;
  padding: 0.75rem 1rem;
}

.login-footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: 1.75rem;
  line-height: 1.4;
}

/* ==========================================================================
   2. APP LAYOUT (SIDEBAR + MAIN CONTENT + HEADER)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  background-color: #F8FAFC;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--navy-900);
  color: var(--slate-300);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s var(--ease);
}

.sidebar-brand {
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal-500) 0%, var(--teal-600) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--white);
}

.sidebar-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

.sidebar-logo .logo-tagline {
  font-size: 0.65rem;
  color: var(--teal-500);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
}

.nav-group-title {
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  padding: 0.6rem 0.85rem 0.35rem;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94A3B8;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sidebar-menu-item .menu-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  display: inline-block;
  opacity: 0.85;
}

.sidebar-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.sidebar-menu-item.active {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.18) 0%, rgba(20, 184, 166, 0.08) 100%);
  color: #5EEAD4;
  font-weight: 600;
  border-left: 3px solid var(--teal-500);
}

.sidebar-menu-item.active .menu-icon {
  opacity: 1;
}

.sidebar-footer {
  padding: 1rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-footer-notice {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

/* Main Wrapper */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* Header */
.app-header {
  height: var(--header-height);
  background-color: var(--white);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--navy-900);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
}

.header-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-patient-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem;
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
}

.patient-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.patient-info-names {
  line-height: 1.2;
}

.patient-info-names .name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--navy-900);
}

.patient-info-names .id {
  font-size: 0.7rem;
  color: var(--slate-400);
}

/* Page Content View */
.app-content {
  flex: 1;
  padding: 2rem 2.25rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Page Headers */
.view-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-title-wrap h1 {
  font-size: 1.65rem;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.view-title-wrap .subtitle {
  font-size: 0.925rem;
  color: var(--slate-500);
  margin-top: 0.25rem;
}

/* App Footer */
.app-footer-bar {
  background-color: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 1rem 2rem;
  font-size: 0.775rem;
  color: var(--slate-500);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==========================================================================
   3. DASHBOARD PAGE
   ========================================================================== */
.patient-hero-card {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.patient-hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.patient-hero-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.hero-avatar {
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--teal-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.hero-details h2 {
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 700;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.35rem;
  font-size: 0.825rem;
  color: #94A3B8;
  flex-wrap: wrap;
}

.hero-meta span strong {
  color: #E2E8F0;
}

.hero-diagnosis-bar {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.hero-diagnosis-bar .diag-tag {
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: #5EEAD4;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* 4 Summary Cards Grid */
.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}

.summary-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal-500);
  box-shadow: var(--shadow-card-hover);
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.summary-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.icon-blue { background: var(--blue-50); color: var(--blue-600); }
.icon-teal { background: var(--teal-50); color: var(--teal-600); }
.icon-amber { background: var(--warning-bg); color: var(--warning-dark); }
.icon-navy { background: #EEF2F6; color: var(--navy-800); }

.summary-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-400);
  letter-spacing: 0.05em;
}

.summary-card-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.summary-card-desc {
  font-size: 0.775rem;
  color: var(--slate-500);
  line-height: 1.4;
}

/* Feature Navigation Section */
.care-plan-section {
  margin-bottom: 2rem;
}

.section-label-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-label-bar h2 {
  font-size: 1.15rem;
  color: var(--navy-900);
}

.care-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-action-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.feature-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal-500);
  box-shadow: var(--shadow-card-hover);
}

.feature-card-icon {
  width: 44px;
  height: 44px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.feature-action-card:hover .feature-card-icon {
  background: var(--teal-50);
  border-color: var(--teal-100);
}

.feature-card-body h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

.feature-card-body p {
  font-size: 0.8rem;
  color: var(--slate-500);
  line-height: 1.45;
}

.feature-card-arrow {
  margin-left: auto;
  color: var(--slate-300);
  font-size: 1.2rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.feature-action-card:hover .feature-card-arrow {
  color: var(--teal-600);
  transform: translateX(3px);
}

/* ==========================================================================
   4. DISCHARGE SUMMARY UPLOAD PAGE
   ========================================================================== */
.upload-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.upload-dropzone-box {
  background: var(--white);
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.upload-dropzone-box:hover, .upload-dropzone-box.drag-over {
  border-color: var(--teal-500);
  background-color: var(--teal-50);
}

.dropzone-icon-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: var(--slate-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: var(--navy-800);
  transition: transform 0.2s ease;
}

.upload-dropzone-box:hover .dropzone-icon-circle {
  transform: translateY(-2px);
  background: var(--teal-100);
}

.upload-dropzone-box h3 {
  font-size: 1.25rem;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}

.upload-dropzone-box p {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-bottom: 1.25rem;
}

.dropzone-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.selected-file-banner {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.file-pill-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
}

.file-pill-left .name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-900);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.file-pill-left .size {
  font-size: 0.75rem;
  color: var(--slate-500);
}

/* Sample Discharge Helper Card */
.sample-tester-card {
  background: linear-gradient(145deg, #F0FDF4 0%, #FFFFFF 100%);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sample-tester-card h3 {
  font-size: 1.05rem;
  color: #166534;
  margin-bottom: 0.35rem;
}

.sample-tester-card p {
  font-size: 0.825rem;
  color: #15803D;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.sample-features-list {
  list-style: none;
  font-size: 0.775rem;
  color: #166534;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sample-features-list li::before {
  content: '✓ ';
  font-weight: bold;
}

/* Extracted Data Review Card */
.extracted-review-container {
  background: var(--white);
  border: 2px solid var(--teal-500);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.review-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 1.25rem;
}

.extracted-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.extracted-field-block {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.extracted-field-block:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 10px -2px rgba(2, 132, 199, 0.12);
}

.extracted-field-block .field-header-label,
.extracted-field-block h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1e293b;
  background: #f1f5f9;
  padding: 0.6rem 0.95rem;
  margin: 0;
  border-bottom: 2px solid #e2e8f0;
  border-left: 4px solid #0284c7;
}

.extracted-field-block .field-content-body,
.extracted-field-block p {
  padding: 0.85rem 1rem;
  margin: 0;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.55;
  background: #ffffff;
}

.extracted-field-block p strong {
  color: #0369a1;
  font-weight: 700;
}

.extracted-field-block .field-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
}

.review-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
}

/* ==========================================================================
   5. MEDICINE SCHEDULE
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.med-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.med-table thead th {
  background-color: var(--slate-50);
  color: var(--slate-600);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
}

.med-table tbody td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: top;
}

.med-table tbody tr:last-child td {
  border-bottom: none;
}

.med-table tbody tr:hover td {
  background-color: #F8FAFC;
}

.med-name-cell strong {
  color: var(--navy-900);
  font-size: 0.925rem;
  display: block;
}

.med-name-cell .tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--slate-400);
  margin-top: 0.2rem;
}

.instructions-cell {
  max-width: 280px;
  line-height: 1.45;
}

.instructions-cell .caution {
  color: var(--danger-text);
  font-weight: 600;
}

/* ==========================================================================
   6. PERSONALISED DIET PLAN (3 COLUMNS)
   ========================================================================== */
.diet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.diet-col-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.diet-col-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid transparent;
}

.diet-col-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.col-eat {
  border-top: 4px solid var(--teal-600);
}
.col-eat .diet-col-header {
  background-color: var(--teal-50);
  color: var(--teal-600);
  border-bottom-color: var(--teal-100);
}

.col-limit {
  border-top: 4px solid var(--warning-dark);
}
.col-limit .diet-col-header {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border-bottom-color: var(--warning-border);
}

.col-avoid {
  border-top: 4px solid var(--danger-dark);
}
.col-avoid .diet-col-header {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-bottom-color: var(--danger-border);
}

.diet-list {
  list-style: none;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.diet-item {
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--slate-200);
}

.diet-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.diet-item strong {
  display: block;
  font-size: 0.875rem;
  color: var(--navy-900);
  margin-bottom: 0.15rem;
}

.diet-item p {
  font-size: 0.8rem;
  color: var(--slate-500);
  line-height: 1.4;
}

/* ==========================================================================
   7. CAN I EAT THIS? (FOOD SEARCH)
   ========================================================================== */
.search-hero-box {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.search-input-wrap {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.search-input-wrap .form-control {
  font-size: 1rem;
  padding: 0.8rem 1.15rem;
  border-radius: var(--radius-lg);
}

.search-input-wrap .btn {
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-lg);
}

.quick-search-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-search-label {
  font-size: 0.775rem;
  color: var(--slate-500);
  font-weight: 600;
}

.food-tag-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.food-tag-btn:hover {
  background: var(--teal-50);
  border-color: var(--teal-500);
  color: var(--teal-600);
  transform: translateY(-1px);
}

/* Search Verdict Result Card */
.search-verdict-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 2px solid var(--slate-200);
  padding: 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: all 0.2s var(--ease);
}

.verdict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.verdict-title-side {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.verdict-icon {
  font-size: 2rem;
}

.verdict-header h3 {
  font-size: 1.45rem;
  color: var(--navy-900);
}

.verdict-explanation {
  font-size: 0.95rem;
  color: var(--slate-700);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.verdict-notes {
  background: var(--slate-50);
  border-left: 3px solid var(--teal-500);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.85rem;
  color: var(--slate-600);
  margin-bottom: 1rem;
}

.verdict-footer-note {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-style: italic;
}

/* Border styles based on result */
.res-suitable { border-color: var(--success-border); }
.res-limit { border-color: var(--warning-border); }
.res-avoid { border-color: var(--danger-border); }
.res-unknown { border-color: var(--slate-300); }

/* ==========================================================================
   8. FOLLOW-UP AND RECOVERY
   ========================================================================== */
.followup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.appointment-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.appointment-detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.app-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 0.2rem;
}

.app-item strong {
  font-size: 0.95rem;
  color: var(--navy-900);
}

.checklist-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.check-item:hover {
  background: var(--white);
  border-color: var(--teal-500);
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--teal-600);
  cursor: pointer;
}

/* ==========================================================================
   9. WARNING SIGNS
   ========================================================================== */
.warnings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.warning-box {
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.warning-urgent-box {
  background: var(--danger-bg);
  border: 2px solid var(--danger-border);
}

.warning-urgent-box h2 {
  color: var(--danger-text);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.warning-urgent-box p.prompt {
  font-size: 0.875rem;
  color: var(--danger-text);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.urgent-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.urgent-items-list li {
  background: var(--white);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--navy-900);
  font-weight: 500;
}

.warning-caution-box {
  background: var(--warning-bg);
  border: 2px solid var(--warning-border);
}

.warning-caution-box h2 {
  color: var(--warning-text);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.warning-caution-box p.prompt {
  font-size: 0.875rem;
  color: var(--warning-text);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.caution-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.caution-items-list li {
  background: var(--white);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--navy-900);
}

/* ==========================================================================
   5B. MEDICINE ALERTS & REMINDERS
   ========================================================================== */
.alerts-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.med-alert-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.med-alert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.med-alert-card.alert-due {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 2px var(--teal-100), var(--shadow-card-hover);
}

.med-alert-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.med-alert-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.med-alert-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--teal-50);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid var(--teal-100);
  flex-shrink: 0;
}

.med-alert-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0;
}

.med-alert-dose {
  font-size: 0.825rem;
  color: var(--slate-500);
  margin-top: 0.15rem;
}

.med-alert-body {
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--slate-100);
  color: var(--slate-700);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
}

.alert-time-pill.time-morning {
  background: #FEF3C7;
  color: #92400E;
}

.alert-time-pill.time-afternoon {
  background: #E0F2FE;
  color: #0369A1;
}

.alert-time-pill.time-night {
  background: #EDE9FE;
  color: #5B21B6;
}

.med-alert-instructions {
  font-size: 0.8rem;
  color: var(--slate-600);
  line-height: 1.4;
  background: var(--slate-50);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--teal-500);
}

.med-alert-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--slate-100);
}

.alert-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--slate-600);
  cursor: pointer;
  user-select: none;
}

.alert-toggle-input {
  appearance: none;
  width: 36px;
  height: 20px;
  background: var(--slate-300);
  border-radius: 10px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.alert-toggle-input:checked {
  background: var(--teal-600);
}

.alert-toggle-input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.alert-toggle-input:checked::after {
  transform: translateX(16px);
}

/* Intake Log */
.intake-log-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.intake-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  font-size: 0.875rem;
}

.intake-log-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.intake-log-check {
  color: var(--teal-600);
  font-size: 1.1rem;
  font-weight: 700;
}

.intake-log-time {
  font-size: 0.775rem;
  color: var(--slate-500);
}

/* Alarm Modal Popup */
.alarm-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 47, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.alarm-modal-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  max-width: 440px;
  width: 100%;
  padding: 2rem;
  text-align: center;
  position: relative;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(13, 148, 136, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

.alarm-modal-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: #CCFBF1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: pulseGlow 1.5s infinite;
}

.alarm-modal-med-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin: 1.25rem 0 1.5rem;
  text-align: left;
}

.alarm-med-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-900);
}

.alarm-med-dose {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-700);
  margin-top: 0.2rem;
}

.alarm-med-notes {
  font-size: 0.8rem;
  color: var(--slate-600);
  margin-top: 0.4rem;
  border-top: 1px dashed var(--slate-200);
  padding-top: 0.4rem;
}

.alarm-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ==========================================================================
   10. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .care-plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .diet-grid {
    grid-template-columns: 1fr;
  }
  .upload-layout-grid {
    grid-template-columns: 1fr;
  }
  .warnings-layout {
    grid-template-columns: 1fr;
  }
  .followup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  .app-sidebar {
    transform: translateX(-100%);
    width: 260px;
  }

  .app-sidebar.show-mobile {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
  }

  .mobile-toggle-btn {
    display: inline-flex;
  }

  .patient-hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .care-plan-grid {
    grid-template-columns: 1fr;
  }

  .app-content {
    padding: 1.25rem 1rem;
  }

  .extracted-fields-grid {
    grid-template-columns: 1fr;
  }

  .appointment-detail-list {
    grid-template-columns: 1fr;
  }
}

/* Print Optimization */
@media print {
  .app-sidebar, .app-header, .app-footer-bar, .btn, .search-hero-box, .mobile-toggle-btn {
    display: none !important;
  }

  .app-main {
    margin-left: 0 !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* ==========================================================================
   Side-by-Side OCR Verification Interface
   ========================================================================== */
.ocr-split-container {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.15fr);
  gap: 1.25rem;
  margin-top: 1rem;
  align-items: stretch;
}
@media (max-width: 820px) {
  .ocr-split-container {
    grid-template-columns: 1fr;
  }
}
.ocr-document-pane {
  background: var(--navy-900, #0f172a);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 620px;
  max-height: 80vh;
  border: 1px solid var(--slate-700);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.ocr-document-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  color: var(--white);
  font-size: 0.8rem;
}
.ocr-page-tab {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}
.ocr-page-tab:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
}
.ocr-page-tab.active-tab {
  background: #0d9488 !important;
  color: #ffffff !important;
  border-color: #14b8a6 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.4) !important;
}
.ocr-document-viewer {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0b1120;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ocr-document-viewer img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  margin: auto;
  display: block;
  transform-origin: top center;
}
.ocr-document-viewer iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: none;
  border-radius: 6px;
  background: #fff;
}
.ocr-fields-pane {
  display: flex;
  flex-direction: column;
  height: 620px;
  max-height: 80vh;
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.ocr-fields-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
  border-bottom: 2px solid var(--slate-200);
  flex-wrap: wrap;
}
.ocr-fields-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-right: 0.35rem;
}
.ocr-meta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}
.ocr-field-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: all 0.15s ease;
}
.ocr-field-card:hover {
  border-color: var(--teal-400);
  box-shadow: var(--shadow-sm);
}
.ocr-field-card.verified {
  border-left: 4px solid #10b981;
}
.ocr-field-card.needs_verification {
  border-left: 4px solid #f59e0b;
  background: #fffdf5;
}
.ocr-field-card.missing {
  border-left: 4px solid #94a3b8;
  opacity: 0.85;
}
.ocr-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.ocr-field-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-600);
}
.ocr-field-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}
.ocr-field-badge.verified {
  background: #d1fae5;
  color: #065f46;
}
.ocr-field-badge.needs_verification {
  background: #fef3c7;
  color: #92400e;
}
.ocr-field-badge.missing {
  background: #f1f5f9;
  color: #475569;
}
.ocr-field-input {
  width: 100%;
  font-size: 0.925rem;
  color: var(--navy-900);
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-weight: 500;
  font-family: inherit;
}
.ocr-field-input:focus {
  border-color: var(--teal-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  display: none !important;
}
