/* ==========================================================================
   SrceČuvar Tele-Health Platform Design System
   Theme: Yugoslavian Brutalist Monolith & Atmospheric Melancholy
   Typography: Space Grotesk, Outfit & Inter
   ========================================================================== */

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(18, 22, 31, 0.75);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-card-hover: rgba(239, 68, 68, 0.5);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.45);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.35);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-amber: #f59e0b;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Space Grotesk', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

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

body.brutalist-theme {
  background-color: var(--bg-dark);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 10% 20%, rgba(239, 68, 68, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(15, 23, 42, 0.9) 0%, transparent 60%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.view-container, .sub-view-container {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.view-container.hidden, .sub-view-container.hidden, .hidden {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION MODAL: 2 ENTRY CARDS (FITBIT CLOUD VS FAMILY PIN)
   ========================================================================== */

.auth-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal-card.yugo-panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  padding: 28px 20px;
  border: 1px solid var(--border-card-hover);
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.25);
  display: flex;
  flex-direction: column;
}

.close-modal-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-modal-btn:hover {
  color: var(--accent-red);
}

.auth-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.auth-sub-text {
  font-size: 13px;
  color: var(--text-muted);
}

.auth-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.auth-entry-card.yugo-panel {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--border-card);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-entry-card.yugo-panel:hover {
  transform: translateY(-4px);
  border-color: var(--accent-red);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.entry-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}

.entry-card-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.entry-card-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.auth-entry-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.auth-entry-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* BRUTALIST PANELS */
.glass-panel.yugo-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.glass-panel.yugo-panel:hover {
  border-color: var(--border-card-hover);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(239, 68, 68, 0.2);
}

/* FULL-SCREEN EMOTIONAL LOVE OVERLAY */
.love-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.35) 0%, rgba(7, 9, 14, 0.96) 80%);
  backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.love-overlay-content {
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.giant-pulsing-heart {
  font-size: 90px;
  color: #ec4899;
  filter: drop-shadow(0 0 35px #ec4899);
  animation: giantHeartPulse 1.2s infinite ease-in-out;
  margin-bottom: 20px;
}

@keyframes giantHeartPulse {
  0% { transform: scale(0.85); filter: drop-shadow(0 0 20px #ec4899); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 50px #ec4899); }
  100% { transform: scale(0.85); filter: drop-shadow(0 0 20px #ec4899); }
}

.love-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

@media (max-width: 576px) {
  .love-title { font-size: 24px; }
  .giant-pulsing-heart { font-size: 70px; }
}

.love-subtitle {
  font-size: 15px;
  color: #fbcfe8;
  line-height: 1.5;
}

/* FALL DETECTION EMERGENCY MODAL */
.fall-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fall-modal-card.yugo-panel {
  max-width: 440px;
  width: 100%;
  padding: 28px 20px;
  text-align: center;
  border: 2px solid var(--accent-red);
  box-shadow: 0 0 50px var(--accent-red-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fall-warning-icon {
  font-size: 44px;
  color: var(--accent-amber);
  margin-bottom: 12px;
  animation: fallIconFlash 0.8s infinite alternate;
}

@keyframes fallIconFlash {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 1; }
}

.fall-modal-card h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.fall-modal-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.countdown-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-red);
  margin-bottom: 20px;
  box-shadow: 0 0 25px var(--accent-red-glow);
}

/* NAVBAR */
.navbar.brutalist-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.94);
  backdrop-filter: blur(24px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
  width: 100%;
}

.nav-container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-tabs-group, .nav-actions {
    width: 100%;
  }
}

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

.brand-monolith-logo {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid rgba(239, 68, 68, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
  overflow: hidden;
  flex-shrink: 0;
}

.logo-inner-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.35) 0%, transparent 70%);
  animation: logoGlowPulse 2s infinite alternate;
}

@keyframes logoGlowPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 1; }
}

.logo-icon {
  position: relative;
  z-index: 2;
  color: var(--accent-red);
  font-size: 18px;
  filter: drop-shadow(0 0 6px var(--accent-red));
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  line-height: 1;
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.red-dot {
  color: var(--accent-red);
  font-size: 8px;
  animation: redDotPulse 1.2s infinite alternate;
}

@keyframes redDotPulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* NAVBAR TABS SWITCHER */
.nav-tabs-group {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab-btn.active {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.device-connected-pill.brutalist-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* BUTTONS */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.btn-lg {
  padding: 12px 20px;
  font-size: 14px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 5px 8px;
  font-size: 11px;
}

.brutalist-btn-primary {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-red-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brutalist-btn-primary:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-red-glow);
}

.brutalist-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-card);
}

.brutalist-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-muted);
}

.brutalist-btn-danger {
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
  color: #fff;
  border: 1px solid var(--accent-red);
  box-shadow: 0 0 15px var(--accent-red-glow);
}

/* LANDING HERO */
.landing-hero.yugo-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-items: center;
  padding: 32px 16px;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .landing-hero.yugo-hero-grid {
    grid-template-columns: 1fr;
    padding: 20px 14px;
  }
}

.yugo-badge {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  display: inline-flex;
}

.yugo-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #ffffff;
}

@media (max-width: 768px) {
  .yugo-title { font-size: 26px; }
}

.yugo-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.55;
}

.landing-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

@media (max-width: 576px) {
  .landing-cta-group .btn {
    width: 100%;
  }
}

.hero-visual-frame {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  width: 100%;
}

.yugo-hero-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  filter: contrast(1.1) brightness(0.95);
  transition: transform 0.5s ease;
}

@media (max-width: 768px) {
  .yugo-hero-img { height: 240px; }
}

.hero-visual-frame:hover .yugo-hero-img {
  transform: scale(1.03);
}

.hero-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(7, 9, 14, 0.95), transparent);
  padding: 14px;
}

.overlay-tag {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent-red);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* PREVIEW CARDS */
.preview-cards-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-preview-card.yugo-panel {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--accent-red);
}

.preview-pulse-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-red);
  animation: pulseBeat 1.4s infinite ease-out;
}

.preview-heart {
  color: var(--accent-red);
  font-size: 14px;
}

.preview-icon-shield {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  font-size: 16px;
  flex-shrink: 0;
}

.preview-text h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.preview-text p {
  font-size: 11px;
  color: var(--text-muted);
}

.badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
}

/* PILLARS SECTION */
.brutalist-pillars-section {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 16px;
}

.pillars-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.pillars-main-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .pillars-main-title { font-size: 24px; }
}

.pillars-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 650px;
  margin: 0 auto 30px auto;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.pillar-card.yugo-panel {
  position: relative;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  border: 1px solid var(--border-card);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.pillar-card.yugo-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.pillar-number {
  position: absolute;
  top: -15px;
  right: 15px;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.pillar-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pillar-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.pillar-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.pillar-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.pillar-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.pillar-code {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.pillar-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.pillar-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.pillar-footer-bar {
  height: 3px;
  width: 36px;
  border-radius: 2px;
  transition: width 0.35s ease;
}

.pillar-card.yugo-panel:hover .pillar-footer-bar {
  width: 100%;
}

.red-bar { background: var(--accent-red); box-shadow: 0 0 10px var(--accent-red-glow); }
.amber-bar { background: var(--accent-amber); }
.emerald-bar { background: var(--accent-emerald); }
.purple-bar { background: var(--accent-purple); }

/* APP HIGHLIGHTS */
.app-highlights-section {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 40px 16px;
}

.yugo-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 24px;
  align-items: center;
}

@media (max-width: 960px) {
  .yugo-split-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

.app-highlights-text h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.app-highlights-text p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.55;
}

.app-highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-highlights-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.list-check {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
}

.app-highlights-list h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.app-highlights-list p {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 0;
}

.app-visual-side {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  width: 100%;
}

.yugo-app-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  filter: contrast(1.1) brightness(0.9);
}

.app-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(7, 9, 14, 0.85);
  padding: 10px 14px;
  backdrop-filter: blur(8px);
}

.overlay-label {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* MAIN DASHBOARD LAYOUT */
.main-content {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 40px 16px;
  box-sizing: border-box;
}

.hero-section {
  margin-bottom: 28px;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status-badge.critical {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-red);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.status-dot.red {
  background-color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
}

.last-sync {
  font-size: 11px;
  color: var(--text-dim);
}

/* VITALS HERO GRID */
.vitals-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 960px) {
  .vitals-hero-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 18px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 576px) {
  .card {
    padding: 14px;
  }
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.card-icon-red {
  color: var(--accent-red);
  font-size: 15px;
}

/* PULSE DISPLAY */
.pulse-display-container {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
}

.pulse-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--accent-red);
  opacity: 0.6;
  animation: pulseBeat 1.4s ease-out infinite;
}

@keyframes pulseBeat {
  0% { transform: scale(0.85); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 0.2; }
  100% { transform: scale(1.25); opacity: 0; }
}

.bpm-value-wrapper {
  position: relative;
  z-index: 2;
  text-align: center;
}

.bpm-number {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.bpm-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.pulse-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-card);
  padding-top: 12px;
  margin-top: auto;
  font-size: 11px;
  color: var(--text-dim);
}

.pulse-footer strong {
  color: var(--text-main);
}

.chart-card {
  height: 280px;
}

.chart-container {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 160px;
}

.chart-badge {
  font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 6px;
  border-radius: 4px;
}

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

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

.metric-card {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.metric-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.metric-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.metric-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.metric-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-value small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
}

.metric-sub {
  font-size: 10px;
  color: var(--text-dim);
  display: block;
  margin-top: 1px;
}

/* DEMO CONTROLS BAR */
.demo-controls-bar {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid var(--accent-red);
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .demo-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .demo-actions .btn {
    width: 100%;
  }
}

.demo-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.demo-info i {
  color: var(--accent-red);
  font-size: 15px;
}

/* EMERGENCY BANNER */
.emergency-banner {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  border: 1px solid var(--accent-red);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.emergency-banner.hidden {
  display: none;
}

.banner-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pulse-alert-icon {
  font-size: 22px;
  color: #fff;
  animation: pulseBlink 0.8s infinite alternate;
}

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

.banner-content h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.banner-content p {
  font-size: 12px;
  color: #fca5a5;
}

/* SUPER AI SECTION */
.super-ai-section {
  margin-top: 28px;
}

.section-title-wrapper {
  margin-bottom: 18px;
}

.title-with-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.title-with-badge h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.ai-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.section-desc {
  color: var(--text-dim);
  font-size: 13px;
}

.super-ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.ai-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}

.ai-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-card);
}

.ai-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

.red-glow { background: var(--accent-red); box-shadow: 0 0 15px var(--accent-red-glow); }
.emerald-glow { background: var(--accent-emerald); box-shadow: 0 0 15px var(--accent-emerald-glow); }
.purple-glow { background: var(--accent-purple); box-shadow: 0 0 15px var(--accent-purple-glow); }
.cyan-glow { background: var(--accent-cyan); box-shadow: 0 0 15px var(--accent-cyan-glow); }

.ai-card-header h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-dim);
}

.ai-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  padding: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.notes-box {
  background: rgba(239, 68, 68, 0.05);
  border-left: 3px solid var(--accent-red);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.notes-box label {
  font-weight: 600;
  color: #fca5a5;
  display: block;
  margin-bottom: 2px;
}

.ai-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-card);
}

.badge {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.ai-strategy-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.meal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meal-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meal-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.meal-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* MEDICATION REMINDERS STYLING */
.reminders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reminder-item.completed {
  opacity: 0.65;
  background: rgba(16, 185, 129, 0.05);
}

.reminder-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reminder-time {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
}

.reminder-title {
  font-size: 11px;
  color: var(--text-main);
  font-weight: 500;
}

.reminder-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* CHAT CARD */
.chat-card {
  height: 380px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.message {
  display: flex;
  gap: 8px;
  max-width: 90%;
}

.message.assistant {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}

.message.user .msg-avatar {
  background: var(--accent-purple);
}

.msg-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-main);
  line-height: 1.45;
}

.chat-input-form {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.chat-input-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 11px;
  outline: none;
}

/* USER PROFILE & EMERGENCY CONTACTS */
.profile-layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.contact-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-left: 3px solid var(--accent-red);
  padding: 10px 14px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.contact-details h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.contact-details p {
  font-size: 11px;
  color: var(--text-muted);
}

.contact-relation {
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 600;
  display: block;
}

.delete-contact-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border-card);
  margin: 14px 0;
}

.add-contact-form h4, .profile-settings-form h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-group label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 11px;
  outline: none;
}

/* 30-DAY HISTORY TABLE RESPONSIVE */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
  min-width: 540px;
}

.history-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  font-family: var(--font-heading);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-card);
  font-weight: 600;
}

.history-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

/* FOOTER */
.footer.brutalist-footer {
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  padding: 32px 0;
  margin-top: auto;
  background: rgba(5, 7, 11, 0.95);
  text-align: center;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-slogan {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff, var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.footer-copy {
  font-size: 10px;
  color: var(--text-dim);
}
