@font-face {
  font-family: 'Cascadia Code';
  src: url('/assets/fonts/CASCADIACODE regular.woff2') format('woff2');
  font-weight: 400;
}
@font-face {
  font-family: 'Cascadia Code';
  src: url('/assets/fonts/CASCADIACODE bold.woff2') format('woff2');
  font-weight: 700;
}
:root {
  --bg: #f7fbff;
  --card: rgba(255,255,255,.9);
  --ink: #182033;
  --muted: #66708a;
  --line: #dfe8f5;
  --accent: #7c5cff;
  --accent2: #00b8a9;
  --danger: #ff5470;
  --warn: #ffb020;
  --ok: #00a870;
  --shadow: 0 18px 60px rgba(34, 48, 84, .12);
  --radius: 24px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Cascadia Code', 'Courier New', monospace;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(124, 92, 255, .18), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(0, 184, 169, .16), transparent 24rem),
    linear-gradient(180deg, #fbfdff, var(--bg));
  min-height: 100vh;
}
.shell { width: min(940px, calc(100% - 28px)); margin: 0 auto; padding: 58px 0 60px; }
.admin-float {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(34,48,84,.12);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(10px);
}
.admin-float:hover { transform: translateY(-1px); }

.admin-shell { width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 60px; }
.card {
  background: var(--card);
  border: 1px solid rgba(223,232,245,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}
.hero { text-align: center; padding: 34px 24px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -2px; line-height: 1; margin-bottom: 16px; }
h2 { font-size: 1.25rem; margin-bottom: 10px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.warning, .notice {
  background: #fff8e7;
  border: 1px solid #ffe0a5;
  border-radius: 18px;
  padding: 14px 16px;
  color: #765100;
}
.badge, .section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}
label { display: block; font-weight: 700; margin: 14px 0 8px; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: white;
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124,92,255,.12); }
button {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.primary { background: var(--accent); color: white; width: 100%; margin-top: 18px; }
.primary.big { width: auto; padding: 16px 22px; }
.secondary { background: #edf3ff; color: #253052; }
.ghost { background: transparent; border: 1px solid var(--line); }
.danger { background: #ffeaf0; color: #a8002b; }
.form-message { margin: 12px 0 0; color: var(--muted); }
.hidden { display: none !important; }
.strength-wrap { margin-top: 18px; }
.strength-top { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.strength-bar { height: 16px; background: #edf1f8; border-radius: 999px; overflow: hidden; margin-top: 8px; }
#strengthFill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--danger), var(--warn), var(--ok)); border-radius: inherit; transition: width .25s ease; }
.status-card { text-align: center; }
.loader { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.loader span { width: 12px; height: 12px; border-radius: 999px; background: var(--accent); animation: bounce 1s infinite ease-in-out; }
.loader span:nth-child(2) { animation-delay: .15s; background: var(--accent2); }
.loader span:nth-child(3) { animation-delay: .3s; background: var(--warn); }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.8); opacity: .55; } 40% { transform: scale(1.2); opacity: 1; } }
.admin-header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.admin-header h1 { font-size: clamp(1.7rem, 4vw, 3rem); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.level-buttons, .control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.level-btn { width: 54px; height: 54px; border-radius: 18px; background: #edf3ff; color: #253052; }
.level-btn.active { background: var(--accent); color: white; }
.controls-card input { width: 110px; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 700; }
.pill.waiting { background: #edf3ff; color: #38476b; }
.pill.queued, .pill.running { background: #fff4db; color: #7a4e00; }
.pill.found { background: #e5fff6; color: #006b4c; }
.pill.not_found { background: #f1edff; color: #4c35ad; }
.pill.error { background: #ffeaf0; color: #a8002b; }
.login-card { max-width: 520px; margin: 80px auto; }
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topline, .admin-header { flex-direction: column; align-items: stretch; }
  .primary.big { width: 100%; }
}
