/* HistoSuite - Custom Healthcare SaaS CSS & Dark Mode System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --color-brand-primary: #0284c7; /* Vibrant Healthcare Cyan/Sky Blue */
  --color-brand-dark: #0f172a;    /* Sleek Slate Dark */
  --color-brand-accent: #2563eb;  /* Deep Indigo Blue */
  --bg-page: #f8fbff;             /* Crisp Porcelain Light */
  --bg-section-alt: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(226, 232, 240, 0.9);
  --card-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-border: rgba(226, 232, 240, 0.8);
}

/* Dark Theme Variables */
html[data-theme="dark"],
body.dark-mode {
  --bg-page: #060b17;             /* Deep Obsidian Dark */
  --bg-section-alt: #0a1124;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: rgba(13, 21, 39, 0.85);
  --card-border: rgba(56, 189, 248, 0.2);
  --card-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
  --nav-bg: rgba(6, 11, 23, 0.9);
  --nav-border: rgba(30, 41, 59, 0.8);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: hidden;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Hero Section Override */
html[data-theme="dark"] #top {
  background-image: linear-gradient(to bottom, #060b17, #0a1124, #060b17) !important;
}

/* Dark Mode Navigation Override */
html[data-theme="dark"] header.glass-nav {
  background: rgba(6, 11, 23, 0.9) !important;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8) !important;
}

html[data-theme="dark"] header nav a {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] header nav a:hover {
  color: #38bdf8 !important;
}

/* Glassmorphism Navigation */
.glass-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nav-border);
  transition: all 0.3s ease;
}

/* Modern Display Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .glass-card {
  background: rgba(13, 21, 39, 0.88);
  border-color: rgba(56, 189, 248, 0.2);
}

/* Animated Top Accent Border on Cards */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0284c7, #6366f1, #3b82f6);
  opacity: 0.8;
  transition: opacity 0.35s ease;
}

.glass-card:hover::before {
  opacity: 1;
}

/* Card Hover Animation & Modern Lighting */
.card-hover-effect {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.card-hover-effect:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.2), 0 0 20px rgba(99, 102, 241, 0.15);
  border-color: rgba(2, 132, 199, 0.4);
}

html[data-theme="dark"] .card-hover-effect:hover {
  box-shadow: 0 25px 45px -15px rgba(56, 189, 248, 0.25), 0 0 25px rgba(129, 140, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
}

/* Icon Pop Micro-Animation inside Cards */
.card-hover-effect:hover .card-icon {
  transform: scale(1.15) rotate(4deg);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Featured Card Neon Pulse */
.card-featured {
  position: relative;
}

.card-featured::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #0284c7, #6366f1, #10b981);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Pulse animation for live badge */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
    box-shadow: 0 0 15px 4px rgba(2, 132, 199, 0.2);
  }
}

.badge-glow {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

/* Dashboard Mockup Styling */
.mockup-window-custom {
  border-radius: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

html[data-theme="dark"] .mockup-window-custom {
  background: rgba(13, 21, 39, 0.95);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
}

.mockup-header-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* AI Chat Console Styling */
.ai-console-box {
  background: #060b17;
  border-radius: 1.25rem;
  color: #f8fafc;
  box-shadow: 0 25px 50px -12px rgba(2, 132, 199, 0.3), 0 0 30px rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.typing-cursor::after {
  content: '│';
  animation: blink 1s infinite;
  color: #38bdf8;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Dark Mode Overrides for Specific Sections */
html[data-theme="dark"] section {
  background-color: #060b17 !important;
}

html[data-theme="dark"] .bg-white {
  background-color: #080e1e !important;
}

html[data-theme="dark"] .bg-slate-50 {
  background-color: #060b17 !important;
}

html[data-theme="dark"] .text-slate-900 {
  color: #f8fafc !important;
}

html[data-theme="dark"] .text-slate-600 {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .text-slate-700 {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .border-slate-200 {
  border-color: rgba(51, 65, 85, 0.7) !important;
}

/* Dark Mode Dashboard Mini Cards */
html[data-theme="dark"] .mockup-window-custom .bg-slate-50 {
  background-color: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
}

html[data-theme="dark"] .mockup-window-custom .bg-indigo-50 {
  background-color: rgba(30, 27, 75, 0.85) !important;
  border-color: rgba(67, 56, 202, 0.7) !important;
  color: #a5b4fc !important;
}

html[data-theme="dark"] .mockup-window-custom .bg-amber-50,
html[data-theme="dark"] .mockup-window-custom .bg-amber-50\/70 {
  background-color: rgba(69, 26, 3, 0.65) !important;
  border-color: rgba(146, 64, 14, 0.6) !important;
}

html[data-theme="dark"] .mockup-window-custom .bg-sky-50,
html[data-theme="dark"] .mockup-window-custom .bg-sky-50\/70 {
  background-color: rgba(12, 74, 110, 0.65) !important;
  border-color: rgba(3, 105, 161, 0.6) !important;
}

html[data-theme="dark"] .mockup-window-custom .bg-indigo-50\/70 {
  background-color: rgba(30, 27, 75, 0.65) !important;
  border-color: rgba(67, 56, 202, 0.6) !important;
}

html[data-theme="dark"] .mockup-window-custom .bg-emerald-50\/70 {
  background-color: rgba(6, 78, 59, 0.65) !important;
  border-color: rgba(4, 120, 87, 0.6) !important;
}

html[data-theme="dark"] .mockup-window-custom .text-amber-700 {
  color: #fbbf24 !important;
}

html[data-theme="dark"] .mockup-window-custom .text-sky-700 {
  color: #38bdf8 !important;
}

html[data-theme="dark"] .mockup-window-custom .text-indigo-700 {
  color: #818cf8 !important;
}

html[data-theme="dark"] .mockup-window-custom .text-emerald-700 {
  color: #34d399 !important;
}

html[data-theme="dark"] .mockup-window-custom .text-slate-900 {
  color: #f8fafc !important;
}

html[data-theme="dark"] .mockup-window-custom .text-slate-500 {
  color: #94a3b8 !important;
}

/* Dark Mode Modal Styling */
html[data-theme="dark"] .modal-box {
  background-color: #0a1124 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #060b17 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: #38bdf8 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}
