/* Color theme */
:root {
  --bg: #f4f8ff;
  --bg-soft: #eef4ff;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #5b6b8a;
  --primary: #1c83bc;
  --primary-700: #1871a3;
  --accent: #00a5ff;
  --success: #10b981;
  --danger: #ef4444;
  --shadow: rgba(20, 40, 100, 0.18);
}

/* Global */
html,
body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
}
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(
      800px 600px at -10% -10%,
      rgba(0, 165, 255, 0.18),
      rgba(0, 165, 255, 0) 60%
    ),
    radial-gradient(
      900px 700px at 110% 0%,
      rgba(37, 99, 235, 0.15),
      rgba(37, 99, 235, 0) 60%
    ),
    linear-gradient(180deg, var(--bg), #ffffff 60%);
}

.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

.page {
  min-height: 100dvh;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0;
}

.hero-sub {
  color: var(--muted);
  margin-top: 6px;
}

.badge {
  background: linear-gradient(
    90deg,
    rgba(108, 92, 231, 0.25),
    rgba(34, 211, 238, 0.18)
  );
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}

/* Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.92)
  );
  border: 1px solid rgba(13, 110, 253, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 38px -14px var(--shadow);
  padding: 20px;
  transform: translateY(8px);
  opacity: 0;
  animation: fadeUp 600ms ease forwards;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

/* Form */
label {
  font-weight: 600;
  font-size: 13px;
  display: block;
  margin: 12px 0 6px;
}
input[type="number"],
input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  color: var(--text);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus {
  border-color: rgba(108, 92, 231, 0.6);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.button,
button {
  position: relative;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, var(--primary), var(--primary-700));
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 22px -8px rgba(37, 99, 235, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  overflow: hidden;
}
.button:hover,
button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.button:active,
button:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

a.button.dark {
  background: #121212 !important;
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.45) !important;
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 600ms ease-out;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.25) 40%,
    rgba(255, 255, 255, 0) 60%
  );
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(12);
    opacity: 0;
  }
}

/* Lists */
ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
li {
  margin: 6px 0;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 80, 0.25);
  backdrop-filter: blur(1.5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading .loading-overlay {
  display: flex;
}

.spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(37, 99, 235, 0.18);
  border-top-color: var(--accent);
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

[data-animate] {
  opacity: 0;
  transform: translateY(8px);
}
[data-animate].in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.45s ease;
}

/* Header chips */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

/* Footer note */
.note {
  color: var(--muted);
  margin-top: 12px;
  font-size: 12px;
}
