:root {
  --bg: #0c1017;
  --surface: #151c28;
  --surface-2: #1c2636;
  --border: #2a364a;
  --text: #e8eef7;
  --muted: #8fa0b8;
  --accent: #4d9fff;
  --accent-dim: #2a6fbf;
  --ok: #3ecf8e;
  --err: #f47174;
  --warn: #e6b84d;
  --audio: #c4a35a;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2740 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #152033 0%, transparent 50%), var(--bg);
  color: var(--text);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.hidden {
  display: none !important;
}

.hint {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0.35rem 0 0;
}

.status {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.status.ok {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
}

.status.err {
  color: var(--err);
  border-color: rgba(244, 113, 116, 0.4);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: #041018;
  font-weight: 600;
}

.btn.primary:hover:not(:disabled) {
  background: #6bb0ff;
}

.btn.secondary {
  border-color: var(--border);
  background: transparent;
}

.btn.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
}

.btn.danger {
  background: rgba(244, 113, 116, 0.18);
  border-color: rgba(244, 113, 116, 0.45);
  color: #ffc9cb;
}

.btn.compact {
  padding: 0.28rem 0.55rem;
  font-size: 0.85rem;
}

.btn.block {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.field > span {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(77, 159, 255, 0.35);
  border-color: var(--accent);
}

.field.full {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--muted);
}
