/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0a0c;
  --surface:    #111113;
  --surface2:   #18181b;
  --border:     #27272a;
  --border2:    #3f3f46;
  --text:       #e4e4e7;
  --text2:      #a1a1aa;
  --text3:      #52525b;
  --blue:       #3b82f6;
  --blue-dim:   #1d4ed8;
  --green:      #4ade80;
  --green-bg:   #052e16;
  --green-bdr:  #166534;
  --red:        #f87171;
  --red-bg:     #2d0a0a;
  --red-bdr:    #7f1d1d;
  --yellow:     #fbbf24;
  --radius:     10px;
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; }

/* ── Form elements ── */
.field { margin-bottom: 16px; }
.field:last-of-type { margin-bottom: 0; }

label.field-label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
  margin-bottom: 6px;
}
label.field-label .hint { font-weight: 400; color: var(--text3); margin-left: 4px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input[type="number"] { width: 110px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface2); color: var(--text); }
.btn.danger { background: #ef4444; }
.btn.sm { padding: 5px 12px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

/* ── Status messages ── */
.status {
  font-size: 12px;
  padding: 9px 13px;
  border-radius: 8px;
  margin-top: 12px;
  display: none;
  line-height: 1.4;
}
.status.ok   { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bdr); display: block; }
.status.err  { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-bdr);   display: block; }
.status.info { background: #0c1a2e;         color: #60a5fa;      border: 1px solid #1e3a5f;          display: block; }

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  opacity: 0.7;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Badge ── */
.badge {
  display: inline-block;
  background: #1e3a5f;
  color: #60a5fa;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

/* ── Divider ── */
hr.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
