:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --bg-soft: #11182a;
  --card: #131c2d;
  --text: #e6eeff;
  --muted: #9fb0d8;
  --primary: #6ea8ff;
  --primary-2: #7ad7ff;
  --border: #2a3a58;
  --border-soft: #1f2b44;
  --ok: #42d392;
  --warn: #f5c451;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(110, 168, 255, 0.15), transparent),
    radial-gradient(900px 500px at 100% 20%, rgba(122, 215, 255, 0.08), transparent),
    linear-gradient(160deg, #0b0f17 0%, #0b1322 45%, #0b1020 100%);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.2rem;
}

.hero {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #335184;
  color: #b4ceff;
  background: rgba(71, 116, 196, 0.15);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  letter-spacing: 0.2px;
}

.hero p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 760px;
}

.dashboard-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding-bottom: 2rem;
}

.span-2 {
  grid-column: span 2;
}

@media (max-width: 980px) {
  .span-2 {
    grid-column: span 1;
  }
}

.card {
  background: linear-gradient(180deg, rgba(23, 33, 52, 0.75) 0%, rgba(19, 28, 45, 0.88) 100%);
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  padding: 1rem 1rem 0.9rem;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-subtitle {
  margin: 0.4rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.inline-form {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr auto;
}

.stack-form {
  display: grid;
  gap: 0.55rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.grid-form.tight {
  gap: 0.55rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.field label {
  color: #b8c5e3;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.field-span-2 {
  grid-column: span 2;
}

@media (max-width: 760px) {
  .grid-form {
    grid-template-columns: 1fr;
  }
  .field-span-2 {
    grid-column: span 1;
  }
}

input,
select,
button,
textarea {
  border-radius: 0.5rem;
  border: 1px solid var(--border-soft);
  background: #0d1423;
  color: var(--text);
  padding: 0.56rem 0.72rem;
  min-height: 38px;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.16);
  background: #0f1729;
}

input[readonly] {
  color: #9db1da;
  background: #0c1320;
  border-style: dashed;
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #2b456f 0%, #243a5c 100%);
  border-color: #436ca9;
  font-weight: 600;
  letter-spacing: 0.2px;
  width: auto;
  min-width: 110px;
}

button:hover {
  border-color: var(--primary-2);
  filter: brightness(1.07);
}

button:active {
  transform: translateY(1px);
}

.hint {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(22, 34, 56, 0.65);
  border: 1px solid #263756;
}

.hint.ok {
  color: #c8f3dc;
  border-color: rgba(66, 211, 146, 0.45);
  background: rgba(36, 80, 59, 0.35);
}

.hint.warn {
  color: #f8e7bc;
  border-color: rgba(245, 196, 81, 0.45);
  background: rgba(95, 75, 32, 0.32);
}

.hint.info {
  color: #c8dcff;
  border-color: rgba(110, 168, 255, 0.45);
  background: rgba(33, 58, 95, 0.35);
}

pre {
  margin-top: 0.75rem;
  padding: 0.8rem;
  border-radius: 0.5rem;
  background: #0a1324;
  border: 1px solid #1f2f4b;
  color: #b8d8ff;
  white-space: pre-wrap;
  min-height: 86px;
  max-height: 270px;
  overflow: auto;
  font-size: 0.77rem;
  line-height: 1.38;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.mini-cards {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
}

.mini-card {
  border: 1px solid #28406a;
  background: rgba(17, 29, 49, 0.7);
  border-radius: 0.6rem;
  padding: 0.55rem 0.65rem;
}

.mini-card .title {
  font-weight: 700;
  font-size: 0.9rem;
}

.mini-card .meta {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}
