:root {
  color-scheme: dark;
}

html, body {
  background: #0F1729;
}

body {
  font-family: 'Inter', sans-serif;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(76, 201, 240, 0.08), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(180, 244, 97, 0.06), transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(251, 107, 107, 0.05), transparent 40%);
  min-height: 100vh;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono, .metric {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism base */
.glass {
  background: rgba(19, 29, 52, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-raised {
  background: rgba(21, 31, 56, 0.72);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(76, 201, 240, 0.3) transparent;
}
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb {
  background: rgba(76, 201, 240, 0.3);
  border-radius: 999px;
}
*::-webkit-scrollbar-track { background: transparent; }

/* Live pulse dot (WhatsApp Live etc.) */
.pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #B4F461;
  box-shadow: 0 0 0 0 rgba(180, 244, 97, 0.7);
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(180, 244, 97, 0.65);
  animation: pulseRing 1.6s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* Deadline meter bar */
.meter-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.6s ease;
}
.meter-fill.safe { background: linear-gradient(90deg, #2f8fb0, #4CC9F0); box-shadow: 0 0 12px rgba(76,201,240,0.55); }
.meter-fill.warning { background: linear-gradient(90deg, #d98a1f, #F5A623); box-shadow: 0 0 12px rgba(245,166,35,0.5); }
.meter-fill.critical { background: linear-gradient(90deg, #d64545, #FB6B6B); box-shadow: 0 0 12px rgba(251,107,107,0.6); }
.meter-fill.expired { background: #475569; box-shadow: none; }

.critical-flash {
  animation: criticalFlash 1.4s ease-in-out infinite;
}
@keyframes criticalFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,107,107,0.0); }
  50% { box-shadow: 0 0 0 3px rgba(251,107,107,0.18); }
}

/* Skeleton shimmer for loading cards */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.03) 63%);
  background-size: 400px 100%;
  animation: shimmer 1.8s linear infinite;
}

/* OTP split boxes */
.otp-box {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 1.4rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #E2F6FF;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.otp-box:focus {
  outline: none;
  border-color: #4CC9F0;
  box-shadow: 0 0 0 3px rgba(76,201,240,0.2);
  transform: translateY(-1px);
}
.otp-box.filled {
  border-color: rgba(180,244,97,0.5);
  background: rgba(180,244,97,0.06);
}
.otp-box.error {
  border-color: #FB6B6B;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Chip base */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

/* Modal backdrop */
.modal-backdrop {
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(4px);
}

/* Checkbox custom */
.track-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  appearance: none;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.track-checkbox:checked {
  background: #B4F461;
  border-color: #B4F461;
}
.track-checkbox:checked::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #0F1729;
}

input[type="checkbox"].filter-checkbox {
  accent-color: #4CC9F0;
}

/* Toggle switch */
.toggle-track {
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-track.on { background: #4CC9F0; }
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.toggle-track.on .toggle-thumb { transform: translateX(17px); }

/* Card hover lift */
.opp-card {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.22s, box-shadow 0.22s;
}
.opp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(76, 201, 240, 0.35);
}

/* Custom scroll region for sidebar */
.sidebar-scroll { max-height: calc(100vh - 220px); overflow-y: auto; }

/* Banner slide */
.banner-enter { animation: slideDown 0.4s ease-out; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
