:root {
  --bg: #070f22;
  --panel: #101d3a;
  --panel-2: #0d1731;
  --line: #243a68;
  --text: #f1f5ff;
  --muted: #90a0bf;
  --blue: #2f69ff;
  --green: #22dca1;
  --red: #ef2a2a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0f2144, var(--bg) 45%);
  color: var(--text);
}

a { color: #8db4ff; text-decoration: none; }

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-wrap { width: min(450px, 100%); }

.auth-card {
  background: linear-gradient(180deg, #142449, #0e1a33);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}

.auth-card h1 { margin: 0 0 14px; font-size: 24px; }
.auth-card h2 { margin: 0 0 8px; }
.auth-card p { margin: 0 0 16px; color: var(--muted); }

label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  color: #a9b9d8;
  letter-spacing: .08em;
  text-transform: uppercase;
}

input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #324878;
  background: #0b1530;
  color: var(--text);
  padding: 12px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.auth-card button { width: 100%; margin-top: 14px; }
.auth-alt { margin-top: 14px; font-size: 14px; }

.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid #1d2f56;
  background: linear-gradient(180deg, #0d1732, #0a1227);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.brand { font-size: 32px; font-weight: 800; margin-bottom: 26px; }
.brand span { color: #28e9cf; }

.sidebar nav a {
  display: block;
  color: #a2b1d3;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  color: #fff;
  background: #2a60f0;
}

.logout {
  margin-top: auto;
  color: #f4a8b1;
  padding: 10px;
}

.main-content {
  padding: 20px;
}

.panel {
  border: 1px solid #203561;
  border-radius: 20px;
  background: linear-gradient(180deg, #102144, #0b1630);
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.panel-head h1 { margin: 0; font-size: 38px; line-height: 1; }

.chip {
  border-radius: 99px;
  padding: 8px 12px;
  background: #253654;
  color: #abb8d4;
  font-size: 12px;
  font-weight: 700;
}

.chip.on { color: #b3ffe8; background: #1e4d44; }

.panel-sub { color: var(--muted); margin-top: 10px; }

.form-grid { margin-top: 20px; max-width: 900px; }

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary { background: var(--blue); }
.secondary { background: #2b3c62; }
.danger { background: var(--red); }

.action-row { display: flex; gap: 10px; margin-top: 12px; }

.preview {
  margin-top: 18px;
  border: 1px solid #27406f;
  border-radius: 16px;
  overflow: hidden;
  background: #060c1d;
  min-height: 280px;
  display: grid;
  place-items: center;
}

.preview iframe { width: 100%; min-height: 420px; border: 0; }
.preview-empty { color: #7382a3; }

.empty {
  border: 1px dashed #355084;
  border-radius: 12px;
  padding: 20px;
  color: #a7b3cc;
}

table { width: 100%; border-collapse: collapse; margin-top: 18px; }
th, td { border-bottom: 1px solid #263d6e; padding: 12px 8px; text-align: left; }
th { color: #8ea0c4; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.prod-cell { display: flex; align-items: center; gap: 10px; }
.prod-cell img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; }

.flash {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
}

.flash.success { background: rgba(34, 220, 161, 0.15); border: 1px solid rgba(34, 220, 161, .4); }
.flash.error { background: rgba(239, 42, 42, 0.15); border: 1px solid rgba(239, 42, 42, .45); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #1d2f56; }
  .cols { grid-template-columns: 1fr; }
  .panel-head h1 { font-size: 30px; }
}
