@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --bg: #f1f5f9;
  --white: #ffffff;
  --border: #e8ecf2;
  --border-focus: #3b82f6;
  --text: #0f172a;
  --text2: #64748b;
  --text3: #94a3b8;
  --blue: #1d4ed8;
  --blue-dark: #1e40af;
  --blue-light: #eff6ff;
  --blue-border: #bfdbfe;
  --green: #10b981;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fef2f2;
  --red-border: #fecaca;
  --amber: #d97706;
  --amber-light: #fff7ed;
  --amber-border: #fed7aa;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 2px 8px rgba(0,0,0,.05), 0 16px 48px rgba(0,0,0,.09);
  --r: 12px;
  --r-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; -webkit-appearance: none; appearance: none; outline: none; }
img { display: block; max-width: 100%; }

.pill {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 20px;
  flex-shrink: 0;
  display: inline-block;
}
.pill-green { background: var(--green-light); color: #15803d; }
.pill-blue  { background: var(--blue-light); color: #1e40af; }
.pill-red   { background: var(--red-light); color: var(--red); }
.pill-amber { background: var(--amber-light); color: var(--amber); }
.pill-gray  { background: #f1f5f9; color: #475569; }

.status-active  { background: var(--green-light); color: #15803d; }
.status-flagged { background: var(--amber-light); color: #a16207; }
.status-banned  { background: var(--red-light); color: #b91c1c; }
.status-used      { background: #dbeafe; color: #1e40af; }
.status-available { background: #d1fae5; color: #065f46; }
.status-locked    { background: #f1f5f9; color: #475569; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.25rem;
  border: none;
  border-radius: var(--r-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, transform .1s;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: var(--white);
  color: #374151;
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: var(--red-light); color: #b91c1c; border: 1.5px solid var(--red-border); }
.btn-danger:hover { background: var(--red-border); }
.btn-warn { background: var(--amber-light); color: #c2410c; border: 1.5px solid var(--amber-border); }
.btn-full { width: 100%; }

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: .38rem;
}
.form-input {
  width: 100%;
  padding: .78rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-input::placeholder { color: #cbd5e1; }
.form-hint { font-size: .73rem; color: var(--text3); margin-top: .28rem; }

.card {
  background: var(--white);
  border-radius: var(--r);
  border: 1.5px solid var(--border);
}
.card-title {
  font-size: .74rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .8rem 1.1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.empty-state { text-align: center; padding: 3.5rem 2rem; color: var(--text3); }
.empty-state svg { display: block; margin: 0 auto 1rem; opacity: .3; }
.empty-title { font-size: .95rem; font-weight: 600; color: var(--text2); margin-bottom: .3rem; }
.empty-sub { font-size: .83rem; }

.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.sec-title { font-size: .76rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; }

.spin {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .55s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .82rem 1rem;
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.alert-error { background: var(--red-light); border: 1.5px solid var(--red-border); color: #b91c1c; }
.alert-warn  { background: var(--amber-light); border: 1.5px solid var(--amber-border); color: #92400e; }
.alert-info  { background: var(--blue-light); border: 1.5px solid var(--blue-border); color: #1e40af; }

.tog-wrap { position: relative; width: 44px; height: 24px; flex-shrink: 0; display: inline-block; }
.tog-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.tog-track { position: absolute; inset: 0; background: #e2e8f0; border-radius: 12px; cursor: pointer; transition: background .2s; }
.tog-wrap input:checked + .tog-track { background: var(--blue); }
.tog-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s; pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.tog-wrap input:checked ~ .tog-thumb { transform: translateX(20px); }

@media (min-width: 768px) {
  .btn { min-height: 44px; }
}
