/* Rock K9 — "Neon Glacier": icy white base, electric indigo and cyan accents. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  /* Brand */
  --indigo: #5b4dff;
  --indigo-deep: #4338e0;
  --cyan: #00c2ff;
  --violet: #a78bfa;
  --gradient: linear-gradient(135deg, #5b4dff 0%, #00c2ff 100%);

  /* Surfaces and text */
  --ice: #f4f7fe;
  --surface: #ffffff;
  --frost: rgba(255, 255, 255, 0.7);
  --mist: #e3e8f5;
  --graphite: #0b1020;
  --slate: #5b6478;
  --wash: #eef0ff;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #f43f5e;
  --info: #0ea5e9;
  --neutral: #94a3b8;

  /* Shape and motion */
  --radius: 16px;
  --radius-sm: 12px;
  --glow: 0 8px 24px rgba(91, 77, 255, 0.25);
  --shadow: 0 1px 2px rgba(11, 16, 32, 0.04), 0 8px 24px rgba(11, 16, 32, 0.06);
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--graphite);
  background-color: var(--ice);
  background-image:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(91, 77, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(0, 194, 255, 0.06), transparent 60%);
  background-attachment: fixed;
}

a {
  color: var(--indigo);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--indigo-deep);
}

h1,
h2,
h3,
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--graphite);
}

.muted {
  color: var(--slate);
}

.mono,
time {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

/* Brand mark: gradient tile with a shield glyph */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  box-shadow: var(--glow);
  color: #fff;
}

.logo-mark svg {
  width: 18px;
  height: 18px;
}

.logo .brand {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* Cards */
.panel {
  background: var(--surface);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.glass {
  background: var(--frost);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mist);
}

/* Thin gradient border for KPI cards and live panels */
.gradient-border {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(91, 77, 255, 0.55), rgba(0, 194, 255, 0.55)) border-box;
}

/* Buttons: fully rounded pills */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--glow);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.btn:hover:not(:disabled) {
  background: var(--indigo-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* White text over the cyan end of the gradient only passes contrast as large text
   (WCAG: 18.66px bold), so gradient buttons always use large bold labels. */
.btn-gradient {
  background: var(--gradient);
  font-size: 1.2rem;
  font-weight: 700;
  min-height: 56px;
}

.btn-gradient:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338e0 0%, #00a9e0 100%);
}

.btn-ghost {
  background: var(--surface);
  color: var(--graphite);
  border-color: var(--mist);
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--wash);
  color: var(--graphite);
  transform: none;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field label,
label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--mist);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--graphite);
  font: inherit;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.18);
}

/* Status chips: 12% tint, solid dot, always with a word */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--graphite);
  background: rgba(148, 163, 184, 0.12);
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neutral);
}

.chip-success { background: rgba(16, 185, 129, 0.12); }
.chip-success::before { background: var(--success); }
.chip-warning { background: rgba(245, 158, 11, 0.14); }
.chip-warning::before { background: var(--warning); }
.chip-danger { background: rgba(244, 63, 94, 0.12); }
.chip-danger::before { background: var(--danger); }
.chip-info { background: rgba(14, 165, 233, 0.12); }
.chip-info::before { background: var(--info); }
.chip-indigo { background: var(--wash); }
.chip-indigo::before { background: var(--indigo); }

/* Messages */
.notice {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.45;
  background: var(--wash);
  color: var(--graphite);
}

.notice-success { background: rgba(16, 185, 129, 0.12); }
.notice-warning { background: rgba(245, 158, 11, 0.14); }
.notice-danger { background: rgba(244, 63, 94, 0.12); }
.notice[hidden] { display: none; }

.error {
  color: #be123c;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* KPI tiles */
.stat {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  margin: 0.55rem 0 0.15rem;
}

.stat .label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
}

/* Cyan pulse ring for upcoming/live check-calls */
.pulse {
  position: relative;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  opacity: 0;
  animation: pulse-ring 2.4s var(--ease) infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.92); opacity: 0.7; }
  80%, 100% { transform: scale(1.18); opacity: 0; }
}

.fade-up {
  animation: fadeUp 0.6s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .pulse::after {
    animation: none;
  }
}

.chip-neutral { background: rgba(148, 163, 184, 0.14); }
.chip-neutral::before { background: var(--neutral); }
