:root {
  --bg: #090d16;
  --panel: #111827;
  --panel2: #151f31;
  --line: rgba(148, 163, 184, .18);
  --text: #e5edf7;
  --muted: #91a0b6;
  --accent: #22c55e;
  --accent2: #38bdf8;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% -10%, rgba(34,197,94,.22), transparent 28rem),
    radial-gradient(circle at 82% 0, rgba(56,189,248,.16), transparent 26rem),
    var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
.wrap { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(9,13,22,.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #041018;
  font-weight: 900;
  box-shadow: 0 16px 38px rgba(34,197,94,.22);
}
.brand__title { font-weight: 850; font-size: 18px; }
.brand__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.page { padding: 34px 0 56px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.panel {
  background: linear-gradient(180deg, rgba(21,31,49,.94), rgba(17,24,39,.94));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.panel__head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.panel__body { padding: 24px; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.05; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
.muted { color: var(--muted); }
.hero {
  grid-column: span 7;
  padding: 32px;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero p { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.6; margin: 18px 0 0; }
.quick { grid-column: span 5; }
.stack { display: grid; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn {
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: #041018;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 28px rgba(34,197,94,.16);
}
.btn:hover { filter: brightness(1.06); }
.btn--ghost {
  color: var(--text);
  background: rgba(148,163,184,.09);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn--danger {
  color: white;
  background: rgba(239,68,68,.18);
  border: 1px solid rgba(239,68,68,.42);
  box-shadow: none;
}
.btn--wide { width: 100%; }

.form { display: grid; gap: 18px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.field { display: grid; gap: 8px; grid-column: span 6; }
.field--full { grid-column: 1 / -1; }
.field--third { grid-column: span 4; }
.field label { color: #cbd5e1; font-size: 14px; font-weight: 750; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(2,6,23,.52);
  outline: none;
  font: inherit;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(56,189,248,.72);
  box-shadow: 0 0 0 4px rgba(56,189,248,.12);
}
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}
.login-card { width: min(430px, 100%); }
.login-card .panel__body { padding: 30px; }

.bases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.base-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2,6,23,.34);
  display: grid;
  gap: 14px;
}
.base-card__meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(148,163,184,.1);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}
.pill--ok { background: rgba(34,197,94,.13); color: #86efac; }
.pill--warn { background: rgba(245,158,11,.13); color: #facc15; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th { color: #cbd5e1; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
td { color: var(--muted); }
.item-title { color: var(--text); font-weight: 800; }

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(56,189,248,.28);
  background: rgba(56,189,248,.1);
  color: #bae6fd;
}
.notice--error {
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.11);
  color: #fecaca;
}

.media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.media-preview img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #0f172a;
}
.upload-status {
  display: grid;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2,6,23,.34);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.upload-status--ok {
  border-color: rgba(34,197,94,.34);
  color: #86efac;
}
.upload-status--error {
  border-color: rgba(239,68,68,.44);
  color: #fecaca;
}
.upload-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.upload-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148,163,184,.16);
}
.upload-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

@media (max-width: 860px) {
  .topbar__in { align-items: flex-start; padding: 14px 0; flex-direction: column; }
  .hero, .quick { grid-column: 1 / -1; }
  .field, .field--third { grid-column: 1 / -1; }
  .panel__head { align-items: flex-start; flex-direction: column; }
}
