:root {
  --bg: #0b0f17;
  --bg-elevated: #121826;
  --bg-panel: #151d2e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef2ff;
  --text-muted: #94a3b8;
  --accent: #5eead4;
  --accent-strong: #14b8a6;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: radial-gradient(circle at top, #152238 0%, var(--bg) 45%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(11, 15, 23, 0.82);
  border-bottom: 1px solid var(--border);
}

.admin-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #041016;
  font-weight: 700;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.market-pill,
.admin-user {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.market-pill.is-open {
  color: var(--success);
}

.market-pill.is-closed {
  color: var(--warning);
}

.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #042f2e;
  font-weight: 600;
}

.btn-success {
  background: rgba(52, 211, 153, 0.16);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.14);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.field.is-invalid input {
  border-color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.field-error,
.form-error {
  min-height: 18px;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--danger);
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease;
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.35);
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.35);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-page .admin-main {
  max-width: none;
  padding: 0;
}

.dashboard-page .admin-header-inner {
  max-width: 1480px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.8125rem;
}

.hidden {
  display: none !important;
}
