:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111111;
  --panel-2: #181818;
  --field: #0b0b0b;
  --gold: #ffc400;
  --gold-2: #f0a900;
  --gold-soft: rgba(255, 196, 0, .14);
  --ink: #f7f7f7;
  --muted: #a7a7a7;
  --line: rgba(255,255,255,.12);
  --danger: #ff5b4d;
  --success: #58d68d;
  --shadow: 0 18px 50px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,196,0,.18), transparent 34rem),
    linear-gradient(145deg, #050505 0%, #101010 48%, #050505 100%);
  color: var(--ink);
}
button, input, textarea, select { font: inherit; }
button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #111;
  cursor: pointer;
  font-weight: 800;
  padding: 0 18px;
  box-shadow: 0 10px 22px rgba(255,196,0,.18);
}
button:disabled { opacity: .55; cursor: not-allowed; }
button.ghost {
  background: transparent;
  border: 1px solid rgba(255,196,0,.45);
  color: var(--gold);
  box-shadow: none;
}
.shell { min-height: 100vh; }
.hidden { display: none !important; }
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 430px);
  gap: 36px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px;
}
.brand-block { max-width: 660px; }
.brand-logo {
  width: min(320px, 80vw);
  display: block;
  margin-bottom: 22px;
  filter: drop-shadow(0 24px 40px rgba(255,196,0,.16));
}
.brand-block h1, .topbar h1 { margin: 0; line-height: 1.04; }
.brand-block h1 { font-size: clamp(38px, 6vw, 72px); letter-spacing: 0; }
.brand-block p { color: var(--muted); font-size: 18px; max-width: 560px; line-height: 1.5; }
.eyebrow {
  color: var(--gold);
  font-size: 12px !important;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.login-card, .panel-form, .list-panel, .setup-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.login-card { padding: 26px; }
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  padding: 12px;
  outline: none;
}
select { appearance: auto; }
textarea { resize: vertical; }
input[type="file"] { color: var(--muted); }
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.form-error { color: var(--danger); min-height: 20px; }
.form-status { color: var(--success); min-height: 20px; }
.admin-view { padding: 22px; max-width: 1480px; margin: 0 auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 0;
}
.topbar-brand { display: flex; align-items: center; gap: 14px; }
.topbar-brand img { width: 74px; height: 74px; object-fit: contain; }
.topbar h1 { font-size: 32px; }
.account-box { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab {
  background: transparent;
  color: var(--muted);
  border-radius: 8px 8px 0 0;
  border-bottom: 3px solid transparent;
  box-shadow: none;
  white-space: nowrap;
}
.tab.active {
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-bottom-color: var(--gold);
}
.grid { display: grid; gap: 18px; }
.two-cols { grid-template-columns: minmax(320px, 530px) minmax(360px, 1fr); align-items: start; }
.form-grid { grid-template-columns: 1fr 1fr; }
.panel-form, .list-panel, .setup-panel { padding: 20px; }
.section-title { margin-bottom: 18px; }
.section-title.compact { margin-bottom: 16px; }
.section-title h2 { margin: 0 0 6px; font-size: 22px; }
.section-title p { margin: 0; color: var(--muted); line-height: 1.45; }
.row-title { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.target-box {
  border: 1px solid rgba(255,196,0,.24);
  border-radius: 8px;
  background: rgba(255,196,0,.055);
  padding: 14px;
  margin-bottom: 14px;
}
.target-wrap label { margin-bottom: 0; }
.item-list { display: grid; gap: 10px; }
.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: rgba(0,0,0,.22);
}
.item h3 { margin: 0; font-size: 17px; }
.item p { margin: 0; color: var(--muted); line-height: 1.4; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}
.badge.green { background: rgba(88,214,141,.16); color: var(--success); }
.badge.red { background: rgba(255,91,77,.16); color: var(--danger); }
.setup-panel { max-width: 900px; }
.setup-panel li { margin-bottom: 10px; color: var(--muted); }
pre {
  background: #050505;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
}
@media (max-width: 980px) {
  .login-view, .two-cols, .form-grid { grid-template-columns: 1fr; }
  .brand-logo { margin-left: auto; margin-right: auto; }
  .brand-block { text-align: center; }
  .brand-block p { margin-left: auto; margin-right: auto; }
  .topbar { align-items: stretch; flex-direction: column; }
  .account-box { justify-content: space-between; }
}
@media (max-width: 560px) {
  .login-view, .admin-view { padding: 16px; }
  .login-card, .panel-form, .list-panel, .setup-panel { padding: 16px; }
  .topbar-brand img { width: 58px; height: 58px; }
  .topbar h1 { font-size: 25px; }
  .account-box { flex-direction: column; align-items: stretch; }
  .row-title { flex-direction: column; }
  .tabs { gap: 6px; }
  .tab { padding: 0 14px; }
}
