/* =====================================================================
 * MAP CARE — Healthcare Professional Onboarding & Doctor Mobile Companion
 * SCREENS: SCR-006 & SCR-093 to SCR-112 (21 Canonical Screens)
 * DESIGN TOKENS:
 *   - Primary  : #0e2b5d (Deep Clinical Navy)
 *   - Accent   : #0083ff (Electric Medical Blue)
 *   - Surface  : #edf8ff (Soft Clinical Ice Tint)
 *   - Success  : #10b981 (Verified Emerald Green)
 *   - Warning  : #f59e0b (Under Review Amber)
 *   - Critical : #ef4444 (Triage Urgent Red)
 *   - Border Radius: 22px for cards, 14px for chips, 12px for inputs
 *   - Zero Emojis Policy (All icons are pure SVG vectors)
 * ===================================================================== */

:root {
  --mc-doc-primary: #0e2b5d;
  --mc-doc-primary-dark: #091b3a;
  --mc-doc-accent: #0083ff;
  --mc-doc-accent-hover: #006dd4;
  --mc-doc-surface: #edf8ff;
  --mc-doc-bg: #f8fafc;
  --mc-doc-card-bg: #ffffff;
  --mc-doc-text: #0e2b5d;
  --mc-doc-text-muted: #64748b;
  --mc-doc-text-light: #94a3b8;
  --mc-doc-border: rgba(14, 43, 93, 0.08);
  --mc-doc-border-strong: rgba(14, 43, 93, 0.16);
  --mc-doc-success: #10b981;
  --mc-doc-success-bg: #ecfdf5;
  --mc-doc-warning: #f59e0b;
  --mc-doc-warning-bg: #fffbeb;
  --mc-doc-critical: #ef4444;
  --mc-doc-critical-bg: #fef2f2;
  --mc-doc-radius: 22px;
  --mc-doc-radius-sm: 12px;
  --mc-doc-radius-md: 16px;
  --mc-doc-touch: 48px;
  --mc-doc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body.mc-doc-mobile-body {
  font-family: var(--mc-doc-font);
  background-color: #0b192e;
  color: var(--mc-doc-text);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------
 * Mobile Shell & Frame (Fluid 360px-430px, 100dvh)
 * --------------------------------------------------------------------- */
.mc-doc-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--mc-doc-bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------
 * Top Header Bar (Sticky Mobile Top)
 * --------------------------------------------------------------------- */
.mc-doc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--mc-doc-primary) 0%, var(--mc-doc-primary-dark) 100%);
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.mc-doc-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-doc-brand-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
}

.mc-doc-kicker {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #38bdf8;
  display: block;
}

.mc-doc-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.mc-doc-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-doc-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mc-doc-icon-btn:hover, .mc-doc-icon-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------------------------------------------------------------------
 * Main Content Scrollable Area
 * --------------------------------------------------------------------- */
.mc-doc-content {
  flex: 1;
  padding: 16px;
  padding-bottom: 96px; /* space for bottom navigation bar */
  overflow-y: auto;
}

.mc-doc-content.no-bottom-nav {
  padding-bottom: 24px;
}

/* ---------------------------------------------------------------------
 * Bottom App Navigation Bar (Sticky 5-Tab Bar)
 * --------------------------------------------------------------------- */
.mc-doc-bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-top: 1px solid var(--mc-doc-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px (max(8px, env(safe-area-inset-bottom)));
  z-index: 99;
  box-shadow: 0 -4px 16px rgba(14, 43, 93, 0.06);
}

.mc-doc-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--mc-doc-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  min-height: 48px;
  min-width: 56px;
  border-radius: 12px;
  transition: all 0.15s ease;
  position: relative;
}

.mc-doc-nav-item svg {
  margin-bottom: 2px;
  transition: transform 0.15s ease;
}

.mc-doc-nav-item.active {
  color: var(--mc-doc-accent);
}

.mc-doc-nav-item.active svg {
  transform: translateY(-1px);
}

.mc-doc-nav-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  background: var(--mc-doc-critical);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

/* ---------------------------------------------------------------------
 * Cards, Containers & Layout Components
 * --------------------------------------------------------------------- */
.mc-doc-card {
  background: var(--mc-doc-card-bg);
  border: 1px solid var(--mc-doc-border);
  border-radius: var(--mc-doc-radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(14, 43, 93, 0.04);
  transition: border-color 0.15s ease;
}

.mc-doc-card:hover {
  border-color: var(--mc-doc-border-strong);
}

.mc-doc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mc-doc-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--mc-doc-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-doc-card-subtitle {
  font-size: 12px;
  color: var(--mc-doc-text-muted);
  margin-top: 2px;
}

/* ---------------------------------------------------------------------
 * Hero Banner & Welcome Blocks
 * --------------------------------------------------------------------- */
.mc-doc-hero {
  background: linear-gradient(135deg, var(--mc-doc-primary) 0%, #1e427b 100%);
  color: #ffffff;
  border-radius: var(--mc-doc-radius);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.mc-doc-hero::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 131, 255, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.mc-doc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.mc-doc-hero-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.mc-doc-hero-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}

/* ---------------------------------------------------------------------
 * Metric & KPI Pill Rows
 * --------------------------------------------------------------------- */
.mc-doc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.mc-doc-stat-box {
  background: #ffffff;
  border: 1px solid var(--mc-doc-border);
  border-radius: var(--mc-doc-radius-md);
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(14, 43, 93, 0.03);
}

.mc-doc-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--mc-doc-primary);
  line-height: 1.1;
}

.mc-doc-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--mc-doc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

/* ---------------------------------------------------------------------
 * Steppers & Verification Progress
 * --------------------------------------------------------------------- */
.mc-doc-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  padding: 0 10px;
}

.mc-doc-stepper::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.mc-doc-step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mc-doc-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--mc-doc-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #fff;
  transition: all 0.2s ease;
}

.mc-doc-step-item.active .mc-doc-step-circle {
  background: var(--mc-doc-accent);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 131, 255, 0.2);
}

.mc-doc-step-item.completed .mc-doc-step-circle {
  background: var(--mc-doc-success);
  color: #ffffff;
}

.mc-doc-step-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--mc-doc-text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

.mc-doc-step-item.active .mc-doc-step-label {
  color: var(--mc-doc-primary);
  font-weight: 700;
}

/* ---------------------------------------------------------------------
 * Form Controls, Inputs & Touch Targets (>=48px)
 * --------------------------------------------------------------------- */
.mc-doc-form-group {
  margin-bottom: 14px;
}

.mc-doc-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--mc-doc-primary);
  margin-bottom: 6px;
}

.mc-doc-input, .mc-doc-select, .mc-doc-textarea {
  width: 100%;
  min-height: var(--mc-doc-touch);
  border: 1px solid var(--mc-doc-border-strong);
  border-radius: var(--mc-doc-radius-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--mc-doc-text);
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mc-doc-textarea {
  min-height: 90px;
  resize: vertical;
}

.mc-doc-input:focus, .mc-doc-select:focus, .mc-doc-textarea:focus {
  outline: none;
  border-color: var(--mc-doc-accent);
  box-shadow: 0 0 0 3px rgba(0, 131, 255, 0.12);
}

/* ---------------------------------------------------------------------
 * Buttons & Touch Action Controls (>=48px)
 * --------------------------------------------------------------------- */
.mc-doc-btn {
  min-height: var(--mc-doc-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--mc-doc-radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
}

.mc-doc-btn-primary {
  background: var(--mc-doc-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 131, 255, 0.25);
}

.mc-doc-btn-primary:hover, .mc-doc-btn-primary:active {
  background: var(--mc-doc-accent-hover);
}

.mc-doc-btn-secondary {
  background: var(--mc-doc-surface);
  color: var(--mc-doc-accent);
  border: 1px solid rgba(0, 131, 255, 0.2);
}

.mc-doc-btn-outline {
  background: transparent;
  color: var(--mc-doc-primary);
  border: 1px solid var(--mc-doc-border-strong);
}

.mc-doc-btn-success {
  background: var(--mc-doc-success);
  color: #ffffff;
}

.mc-doc-btn-critical {
  background: var(--mc-doc-critical);
  color: #ffffff;
}

.mc-doc-btn-sm {
  min-height: 36px;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
}

/* ---------------------------------------------------------------------
 * Selection Cards (Profession, Specialization, etc.)
 * --------------------------------------------------------------------- */
.mc-doc-select-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 2px solid var(--mc-doc-border);
  border-radius: var(--mc-doc-radius);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.mc-doc-select-card:hover {
  border-color: rgba(0, 131, 255, 0.4);
}

.mc-doc-select-card.selected {
  border-color: var(--mc-doc-accent);
  background: var(--mc-doc-surface);
}

.mc-doc-select-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mc-doc-surface);
  color: var(--mc-doc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mc-doc-select-card.selected .mc-doc-select-card-icon {
  background: var(--mc-doc-accent);
  color: #ffffff;
}

.mc-doc-select-card-info {
  flex: 1;
}

.mc-doc-select-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--mc-doc-primary);
}

.mc-doc-select-card-sub {
  font-size: 12px;
  color: var(--mc-doc-text-muted);
  margin-top: 2px;
}

/* ---------------------------------------------------------------------
 * Patient Cohort & Queue Cards
 * --------------------------------------------------------------------- */
.mc-doc-patient-card {
  background: #ffffff;
  border: 1px solid var(--mc-doc-border);
  border-radius: var(--mc-doc-radius);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(14, 43, 93, 0.04);
}

.mc-doc-patient-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mc-doc-token-pill {
  background: var(--mc-doc-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.mc-doc-triage-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
}

.mc-doc-triage-P0 {
  background: var(--mc-doc-critical-bg);
  color: var(--mc-doc-critical);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.mc-doc-triage-P1 {
  background: var(--mc-doc-warning-bg);
  color: var(--mc-doc-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.mc-doc-triage-P2 {
  background: var(--mc-doc-surface);
  color: var(--mc-doc-accent);
  border: 1px solid rgba(0, 131, 255, 0.2);
}

.mc-doc-patient-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--mc-doc-primary);
}

.mc-doc-patient-meta {
  font-size: 12px;
  color: var(--mc-doc-text-muted);
}

.mc-doc-patient-vitals-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.mc-doc-vital-pill {
  background: var(--mc-doc-surface);
  color: var(--mc-doc-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 131, 255, 0.15);
}

/* ---------------------------------------------------------------------
 * Dropzone & Document Upload Slot
 * --------------------------------------------------------------------- */
.mc-doc-dropzone {
  border: 2px dashed rgba(0, 131, 255, 0.4);
  background: var(--mc-doc-surface);
  border-radius: var(--mc-doc-radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.15s ease;
}

.mc-doc-dropzone:hover {
  background: #e0f2fe;
  border-color: var(--mc-doc-accent);
}

.mc-doc-dropzone-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  color: var(--mc-doc-accent);
}

.mc-doc-dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mc-doc-primary);
}

.mc-doc-dropzone-sub {
  font-size: 11px;
  color: var(--mc-doc-text-muted);
  margin-top: 4px;
}

/* ---------------------------------------------------------------------
 * Quick Rx Medication Search & Pill List
 * --------------------------------------------------------------------- */
.mc-doc-rx-item {
  background: #ffffff;
  border: 1px solid var(--mc-doc-border);
  border-radius: var(--mc-doc-radius-md);
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
}

.mc-doc-rx-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mc-doc-rx-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mc-doc-primary);
}

.mc-doc-rx-generic {
  font-size: 12px;
  color: var(--mc-doc-text-muted);
}

.mc-doc-rx-dosing-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

/* ---------------------------------------------------------------------
 * Badges, Status Indicators & Timeline
 * --------------------------------------------------------------------- */
.mc-doc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.mc-doc-status-verified {
  background: var(--mc-doc-success-bg);
  color: var(--mc-doc-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.mc-doc-status-review {
  background: var(--mc-doc-warning-bg);
  color: var(--mc-doc-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.mc-doc-status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: mcPulse 1.6s infinite ease-in-out;
}

@keyframes mcPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* ---------------------------------------------------------------------
 * Weekly Schedule Day Card
 * --------------------------------------------------------------------- */
.mc-doc-day-card {
  background: #ffffff;
  border: 1px solid var(--mc-doc-border);
  border-radius: var(--mc-doc-radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mc-doc-day-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--mc-doc-primary);
}

.mc-doc-day-slots {
  font-size: 12px;
  color: var(--mc-doc-text-muted);
}
