/* =============================================================================
   MedCare Clinical Operations Design System
   Architecture: Biophilic Glassmorphism ("Living Vitreous Clinical Sanctuary")
   Aesthetics: Deep Forest Obsidian, Living Botanical Emerald, Translucent Frosted Glass,
   Restorative Sage Accents & Precision Cellular Telemetry.
   Created for physicians who deserve restorative tranquility over administrative burnout.
   ============================================================================= */

:root {
  color-scheme: dark;

  /* Biophilic Forest Obsidian & Botanical Surfaces */
  --pitch: #060b08;
  --surface-dark: #08130e;
  --surface-elevated: #0d1e16;
  --surface-card: #0b1912;
  --surface-moss: #11271d;

  /* Living Botanical Accents */
  --botanical-emerald: #059669;
  --botanical-emerald-hover: #10b981;
  --botanical-emerald-glow: rgba(16, 185, 129, 0.3);
  --botanical-sage: #34d399;
  --botanical-eucalyptus: #6ee7b7;
  --botanical-mint: #a7f3d0;
  --botanical-gold: #f59e0b;
  --botanical-amber: #fbbf24;
  --botanical-rose: #f43f5e;

  /* Frosted Glass Lines & Specular Highlights */
  --glass-line-hairline: rgba(52, 211, 153, 0.14);
  --glass-line-subtle: rgba(52, 211, 153, 0.24);
  --glass-line-glow: rgba(52, 211, 153, 0.45);

  /* Translucent Frosted Vitreous Glass */
  --glass-bg: rgba(11, 25, 19, 0.72);
  --glass-blur: 20px;
  --glass-border: rgba(52, 211, 153, 0.18);
  --glass-shadow: 0 20px 48px -12px rgba(2, 14, 10, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, Monaco, monospace;
}

[x-cloak] { display: none !important; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  background-color: var(--pitch);
}

body {
  color: #f0fdf4;
  font-family: var(--font-sans);
  line-height: 1.5;
  text-align: start;
  background-color: var(--pitch);
  min-height: 100dvh;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--botanical-emerald);
  color: #ffffff;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════════════
   1. BIOPHILIC GLASSMORPHISM (FROSTED LIVING SURFACES & CELLULAR DEPTH)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Frosted Botanical Glass Card */
.glass-biophilic {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 1.25rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-biophilic:hover {
  border-color: var(--glass-line-glow);
  box-shadow:
    0 24px 56px -12px rgba(5, 150, 105, 0.25),
    0 0 0 1px rgba(110, 231, 183, 0.2) inset;
}

/* Translucent Living Navigation */
.glass-nav,
.app-nav {
  background: rgba(6, 11, 8, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-line-hairline);
}

.glass-pill {
  background: rgba(16, 185, 129, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-line-subtle);
  border-radius: 9999px;
  color: #a7f3d0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. BIOPHILIC AMBIENCE & SUBTLE NATURAL TEXTURES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Ambient Canopy Sunlight Glow */
.biophilic-canopy-glow {
  background:
    radial-gradient(1000px circle at 50% -10%, rgba(5, 150, 105, 0.16), transparent 70%),
    radial-gradient(800px circle at 85% 30%, rgba(16, 185, 129, 0.08), transparent 60%);
}

/* Subtle Organic Grid Pattern */
.organic-grid-pattern {
  background-image:
    linear-gradient(to right, rgba(52, 211, 153, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(52, 211, 153, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Living Pulse Indicator */
@keyframes livingPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  50% {
    transform: scale(1.08);
    opacity: 0.85;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

.living-pulse-dot {
  animation: livingPulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. TACTILE INTERACTION & BUTTON CONTROLS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn-press {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-press:active {
  transform: scale(0.98);
}

.btn-biophilic,
.btn-electric,
.btn-gold,
.btn-rose-champagne {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-weight: 700;
  border-radius: 0.75rem;
  border: 1px solid rgba(110, 231, 183, 0.35);
  min-height: 44px;
  padding: 0 1.35rem;
  font-size: 0.875rem;
  box-shadow: 0 4px 16px -2px rgba(5, 150, 105, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-biophilic:hover,
.btn-electric:hover,
.btn-gold:hover,
.btn-rose-champagne:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: rgba(167, 243, 208, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-biophilic:active,
.btn-electric:active,
.btn-gold:active,
.btn-rose-champagne:active {
  transform: scale(0.98);
}

.btn-biophilic-ghost,
.btn-electric-ghost,
.btn-emerald-outline,
.btn-amethyst-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f0fdf4;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 1px solid var(--glass-line-subtle);
  min-height: 44px;
  padding: 0 1.35rem;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-biophilic-ghost:hover,
.btn-electric-ghost:hover,
.btn-emerald-outline:hover,
.btn-amethyst-outline:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--glass-line-glow);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(5, 150, 105, 0.25);
}

.btn-biophilic-ghost:active,
.btn-electric-ghost:active,
.btn-emerald-outline:active,
.btn-amethyst-outline:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. LIVING STATUS BADGES & CELLULAR PILLS
   ═══════════════════════════════════════════════════════════════════════════ */

.badge-gold,
.badge-emerald,
.badge-botanical {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.badge-amber {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. FROSTED CARDS & PANELS COMPATIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

.soft-card,
.glass-panel,
.glass-panel-dark,
.glass-panel-gold,
.cert-card,
.credential-card,
.bento-card-dark {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 1.25rem;
}

.app-nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #a7f3d0;
  opacity: 0.8;
  transition: all 0.15s ease;
}

.app-nav-link:hover,
.app-nav-link[aria-current="page"] {
  color: #ffffff;
  opacity: 1;
}

.focus-ring:focus-visible {
  outline: 2px solid var(--botanical-sage);
  outline-offset: 2px;
}

/* Mobile Dock Navigation */
.mobile-dock {
  background: rgba(6, 11, 8, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-line-hairline);
}

.mobile-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #6ee7b7;
  opacity: 0.75;
  transition: all 0.15s ease;
}

.mobile-dock-btn.active,
.mobile-dock-btn:hover {
  color: #ffffff;
  opacity: 1;
}

.mobile-dock-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

body.theme-bright {
  background-color: #f7fdf9;
  color: #062b1b;
}

html:has(body.theme-bright) {
  background-color: #f7fdf9;
}
