@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/outfit-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/syne-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0a0a0a;
  --fg: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.45);
  --line: rgba(255, 255, 255, 0.1);
  --input: #161616;
  --accent: #c8f02a;
  --accent-2: #e8ff5a;
  --accent-fg: #050505;
  --glow-1: rgba(31, 168, 74, 0.13);
  --glow-2: rgba(200, 240, 42, 0.09);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f1;
  --panel: #ffffff;
  --fg: #161616;
  --muted: rgba(22, 22, 22, 0.55);
  --line: rgba(22, 22, 22, 0.1);
  --input: #ffffff;
  --accent: #1e6b2f;
  --accent-2: #145224;
  --accent-fg: #ffffff;
  --glow-1: rgba(31, 168, 74, 0.12);
  --glow-2: rgba(30, 107, 47, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Outfit", system-ui, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top, var(--glow-1) 0%, transparent 45%),
    radial-gradient(ellipse at bottom right, var(--glow-2) 0%, transparent 40%);
}
a { color: inherit; }

.login-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.card {
  position: relative;
  width: min(420px, 100%);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 28px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.logo { height: 46px; width: auto; background: #000; border-radius: 6px; padding: 6px 10px; }
h1 {
  margin: 0 0 28px;
  font-family: "Syne", "Outfit", sans-serif;
  font-size: 32px;
  letter-spacing: -0.02em;
}
label { display: block; margin: 0 0 16px; color: var(--muted); font-size: 12px; font-weight: 500; }
label span { display: block; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="search"] {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--fg);
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  padding: 0 16px;
}
button.full { width: 100%; }
.ghost {
  background: transparent;
  color: var(--muted);
  height: 36px;
}
.error { color: #fca5a5; font-size: 14px; }
html[data-theme="light"] .error { color: #b91c1c; }
.links { display: grid; gap: 6px; margin-top: 16px; text-align: center; font-weight: 600; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--accent); text-decoration: underline; }

.theme-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.theme-toggle button {
  width: 28px; height: 28px; padding: 0; background: transparent; color: var(--muted); border-radius: 999px;
}
.theme-toggle button[aria-pressed="true"] { background: color-mix(in srgb, var(--fg) 12%, transparent); color: var(--fg); }

.top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.top .logo { height: 32px; }
.top h1 { margin: 0; font-size: 22px; }
.grow { flex: 1; }
.search { display: flex; gap: 8px; min-width: 0; flex: 1; max-width: 520px; }
.search input { height: 38px; }
.who { color: var(--muted); font-size: 14px; }

.page { position: relative; padding: 20px; max-width: 1100px; margin: 0 auto; }
.sides { display: flex; gap: 8px; margin-bottom: 14px; }
.sides a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--muted);
}
.sides a.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.crumbs { color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--fg); text-decoration: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; font-weight: 500; }
td a { text-decoration: none; }
tr:hover td { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.empty { color: var(--muted); padding: 28px 0; }
.upload { display: flex; gap: 8px; align-items: center; margin: 8px 0 18px; flex-wrap: wrap; }
.upload input[type="file"] { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.note { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  .search { max-width: none; order: 3; flex-basis: 100%; }
}
