:root {
  --bg: #0e1117;
  --bg2: #161b22;
  --card: #1b2230;
  --line: #2a3344;
  --txt: #e6edf3;
  --muted: #8b97a7;
  --accent: #7c5cff;
  --accent2: #22d3ee;
  --danger: #f85149;
  --ok: #3fb950;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(124, 92, 255, .22), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(34, 211, 238, .14), transparent 55%),
    var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: .2px;
}
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(124, 92, 255, .7);
}

/* ---- centered auth card (login / account) ---- */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; width: 100%; }
.card {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.card h1 { margin: 18px 0 4px; font-size: 22px; }
.card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password] {
  width: 100%; padding: 12px 14px;
  background: #0d1320; color: var(--txt);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 20px; padding: 12px 16px;
  border: none; border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent), #6b46ff);
  transition: transform .06s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.small { width: auto; margin: 0; padding: 8px 12px; font-size: 13px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--txt); }
.btn.danger { background: linear-gradient(135deg, #b3271f, var(--danger)); }

.flash { padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 8px; }
.flash.err { background: rgba(248,81,73,.12); border: 1px solid rgba(248,81,73,.4); color: #ff9d97; }
.flash.ok  { background: rgba(63,185,80,.12); border: 1px solid rgba(63,185,80,.4); color: #7ee787; }

/* ---- admin layout ---- */
.wrap { width: 100%; max-width: 920px; padding: 28px 24px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.top .actions { display: flex; gap: 10px; align-items: center; }

.panel {
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px;
}
.panel h2 { margin: 0 0 16px; font-size: 16px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: none; }

.badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.admin { color: #d2c4ff; border-color: rgba(124,92,255,.5); background: rgba(124,92,255,.12); }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { width: auto; flex: 1; padding: 8px 10px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.checkbox input { width: auto; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

details.reset { margin-top: 4px; }
details.reset summary { cursor: pointer; color: var(--accent2); font-size: 13px; list-style: none; }
details.reset[open] summary { margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 13px; }
