/* =========================================================
   SIGAP — Design System
   Modern Dashboard + Glassmorphism ringan
   ========================================================= */

:root {
  --c-bg: #F8FAFC;
  --c-primary: #2563EB;
  --c-secondary: #1E40AF;
  --c-accent: #06B6D4;
  --c-success: #22C55E;
  --c-warning: #F59E0B;
  --c-danger: #EF4444;
  --c-white: #FFFFFF;

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --shadow-glass: 0 8px 32px rgba(30, 64, 175, 0.10);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  background: var(--c-bg);
  font-family: var(--font-body);
  color: #0F172A;
}

h1, h2, h3, h4, .font-display { font-family: var(--font-display); }

/* ── Glassmorphism ringan ── */
.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-glass);
}

.glass-dark {
  background: rgba(30, 64, 175, 0.55);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Gradient mesh background untuk hero ── */
.mesh-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(6, 182, 212, 0.20), transparent 60%),
    radial-gradient(50% 45% at 90% 20%, rgba(37, 99, 235, 0.25), transparent 60%),
    radial-gradient(55% 50% at 50% 100%, rgba(30, 64, 175, 0.15), transparent 60%),
    linear-gradient(180deg, #0B1E4D 0%, #123072 55%, #1E40AF 100%);
}

/* ── Signal-wave motif (dipakai di hero) ── */
@keyframes pulseWave {
  0%   { transform: scale(0.85); opacity: 0.55; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
.signal-ping {
  position: absolute;
  border-radius: 9999px;
  border: 1.5px solid rgba(6, 182, 212, 0.55);
  animation: pulseWave 3.2s cubic-bezier(0.25, 0.7, 0.4, 1) infinite;
}
.signal-ping:nth-child(2) { animation-delay: 0.7s; }
.signal-ping:nth-child(3) { animation-delay: 1.4s; }

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.float-slow { animation: floatSlow 5s ease-in-out infinite; }

/* ── Status dot ── */
.status-dot {
  width: 10px; height: 10px; border-radius: 9999px; display: inline-block;
  box-shadow: 0 0 0 4px currentColor22;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.status-dot.online { background: var(--c-success); animation: dotPulse 2s ease-in-out infinite; }
.status-dot.offline { background: var(--c-danger); }

/* ── Card umum ── */
.card {
  background: var(--c-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

/* ── Badge status tiket ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 9999px;
  font-size: 12.5px; font-weight: 600; font-family: var(--font-body);
}
.badge-menunggu { background: #F1F5F9; color: #475569; }
.badge-diproses { background: #DBEAFE; color: #1E40AF; }
.badge-dijadwalkan { background: #E0E7FF; color: #4338CA; }
.badge-teknisi_berangkat { background: #CFFAFE; color: #0E7490; }
.badge-sedang_diperbaiki { background: #FEF3C7; color: #B45309; }
.badge-selesai { background: #DCFCE7; color: #15803D; }
.badge-ditutup { background: #E2E8F0; color: #334155; }

.badge-prio-rendah { background: #F1F5F9; color: #475569; }
.badge-prio-sedang { background: #DBEAFE; color: #1D4ED8; }
.badge-prio-tinggi { background: #FFEDD5; color: #C2410C; }
.badge-prio-urgent { background: #FEE2E2; color: #B91C1C; }

/* ── Scrollbar tipis ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Fokus keyboard terlihat (aksesibilitas) ── */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── Timeline progres tiket ── */
.timeline-item { position: relative; padding-left: 28px; }
.timeline-item::before {
  content: ''; position: absolute; left: 4px; top: 4px; width: 10px; height: 10px;
  border-radius: 9999px; background: var(--c-primary);
}
.timeline-item::after {
  content: ''; position: absolute; left: 8px; top: 16px; bottom: -20px; width: 2px;
  background: #E2E8F0;
}
.timeline-item:last-child::after { display: none; }

/* ── Utility: garis skip link ── */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--c-primary); color: white;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }
