:root {
  --bg: #23281d;
  --panel: #2e3322;
  --panel-2: #23281d;
  --text: #f3f2e7;
  --muted: #b2b28a;
  --accent: #c2b280;
  --good: #6b8e23;
  --warn: #e1b95a;
  --bad: #b22222;
  --line: rgba(194,178,128,0.18);
  --gloss: linear-gradient(180deg, rgba(194,178,128,0.10), rgba(35,40,29,0.02));
  --header-bg: #23281d;
  --header-shadow: 0 2px 8px rgba(35,40,29,0.38);
  --card-shadow: 0 8px 32px rgba(35,40,29,0.28);
  --card-radius: 10px;
  --btn-radius: 8px;
  --btn-bg: #3a3f2c;
  --btn-hover: #6b8e23;
  --btn-text: #f3f2e7;
  --font-main: 'Staatliches', 'Montserrat', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(97,168,255,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(40,199,111,0.10), transparent 24%),
    var(--bg);
  color: var(--text);
}
.container { width: min(1320px, calc(100% - 32px)); margin: 24px auto; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)), var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 32px 24px 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.main-card {
  width: 40vw;
  min-width: 320px;
  max-width: 540px;
  margin: 0;
}
.center-shell {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg) url('images/bg-image.webp') center center/cover no-repeat;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }
h1,h2,h3 { margin: 0 0 12px; }
p.muted, .muted { color: var(--muted); }
label { display:block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
input, textarea, select {
  width: 100%;
  background: #0c1530;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
textarea { min-height: 96px; resize: vertical; }
.row { display:flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }
.btn {
  appearance: none;
  border: none;
  color: var(--btn-text);
  border-radius: var(--btn-radius);
  padding: 14px 32px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--btn-bg);
  box-shadow: 0 2px 8px rgba(63,167,255,0.10);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn:hover {
  background: var(--btn-hover);
  color: #fff;
  box-shadow: 0 4px 16px rgba(63,167,255,0.18);
}
.btn.good {
  background: #28c76f;
  color: #fff;
}
.btn.bad {
  background: #ff5f6d;
  color: #fff;
}
.btn.small {
  padding: 8px 18px; border-radius: 10px; font-size: 13px;
}
.stat {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)), var(--panel-2);
  border: 1px solid var(--line);
}
.stat .value { font-size: 28px; font-weight: 800; margin-top: 6px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.badge {
  display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(97,168,255,0.16); color: #cde0ff; border: 1px solid rgba(97,168,255,0.25);
}
.topbar { display:flex; justify-content:space-between; align-items:center; gap: 12px; margin-bottom: 18px; }
.flash { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.flash.ok { background: rgba(40,199,111,0.12); }
.flash.err { background: rgba(255,95,109,0.12); }
.login-shell { min-height: 100vh; display:grid; place-items:center; }
.login-card { width: min(540px, calc(100% - 32px)); }
pre.json {
  white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.5;
  background: #091126; border: 1px solid var(--line); padding: 14px; border-radius: 12px;
}


.main-header {
  width: 100%;
  background: var(--header-bg);
  color: #fff;
  padding: 0;
  box-shadow: var(--header-shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  max-width: 100vw;
  padding: 0 32px;
}
.header-logo {
  display: flex;
  align-items: center;
}
.header-logo-link {
  color: inherit;
  text-decoration: none;
}
.logo-img {
  height: 44px;
  width: 44px;
  border-radius: 12px;
  margin-right: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  background: #fff;
  object-fit: cover;
}
.logo-title {
  font-size: 2em;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-family: var(--font-main);
  line-height: 1;
}
.logo-accent {
  color: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-action-link {
  text-decoration: none;
}
.user-pill {
  display: inline-flex;
  align-items: center;
  background: #23281d;
  color: var(--accent);
  border: 2px solid var(--good);
  border-radius: 999px;
  font-family: 'Staatliches', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  padding: 6px 18px 6px 10px;
  margin-right: 4px;
  box-shadow: 0 2px 8px #23281d55;
  letter-spacing: 1.2px;
  text-shadow: 1px 1px 0 #000, 0 2px 8px #23281d88;
}
.btn.admin-btn {
  background: var(--good);
  color: #fff;
  font-family: 'Staatliches', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 1.2px;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px #6b8e2355;
  text-transform: uppercase;
  margin-left: 2px;
}
.fancy-title {
  font-family: 'Staatliches', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-size: 2.1em;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 2px 2px 0 #000, 0 2px 8px #23281d88, 0 0 8px #c2b28088;
  border-bottom: 2.5px solid var(--good);
  padding-bottom: 8px;
  margin-bottom: 28px;
  display: inline-block;
}
.fancy-accent {
  color: var(--good);
  text-shadow: 1px 1px 0 #000, 0 2px 8px #6b8e2388;
  margin-left: 8px;
}
@media (max-width: 900px) {
  .header-inner {
    padding: 14px 20px;
    flex-wrap: wrap;
  }
  .logo-title {
    font-size: 1.5em;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}
