:root {
  --bg: #111415;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e1e3e4;
  --muted: #a8abbc;
  --soft: #c4c5d9;
  --accent: #caf300;
  --blue: #b8c3ff;
  --danger: #ff6b6b;
  --ok: #63e6be;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--text);
  background: var(--bg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 6%, rgba(46, 91, 255, 0.22), transparent 32%),
    radial-gradient(circle at 84% 10%, rgba(202, 243, 0, 0.12), transparent 28%),
    #111415;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  object-fit: cover;
}

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 32%),
    radial-gradient(circle at 80% 88%, rgba(184, 195, 255, 0.16), transparent 34%);
}

.glass-panel,
.glass-card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.glass-card {
  box-shadow: none;
}

.sidebar {
  position: fixed;
  top: 24px;
  left: 24px;
  bottom: 24px;
  width: 232px;
  padding: 22px;
  border-radius: 28px;
}

.logo {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 34px;
}

.logo span,
.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #102000;
  font-weight: 900;
  background: var(--accent);
  border-radius: 14px;
}

.logo strong {
  color: #fff;
  font-size: 18px;
}

nav {
  display: grid;
  gap: 8px;
}

nav a,
.logout {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--soft);
  border-radius: 14px;
}

nav a.active,
nav a:hover,
.logout:hover {
  color: #101500;
  background: var(--accent);
}

.logout {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
}

.page-shell {
  width: min(1180px, calc(100% - 320px));
  margin: 0 40px 48px 280px;
  padding-top: 40px;
}

.page-shell.narrow {
  width: min(940px, calc(100% - 320px));
}

.hero-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 206px;
  padding: 34px;
  border-radius: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
}

h2 {
  font-size: 24px;
}

.muted,
.table-sub {
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.metric-card {
  min-height: 142px;
  padding: 22px;
  border-radius: 22px;
}

.metric-card span,
.metric-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.metric-card strong {
  display: block;
  margin: 10px 0 6px;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
}

.content-card {
  padding: 22px;
  border-radius: 26px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  color: #101500;
  font-weight: 900;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
}

.primary-btn.compact,
.ghost-btn.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.ghost-btn {
  color: var(--blue);
  background: rgba(184, 195, 255, 0.08);
  border: 1px solid rgba(184, 195, 255, 0.18);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

td {
  color: var(--text);
}

td strong,
td span {
  display: block;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-cell img {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--blue);
  background: rgba(184, 195, 255, 0.08);
  border: 1px solid rgba(184, 195, 255, 0.16);
  border-radius: 999px;
}

.status.ok {
  color: var(--ok);
  background: rgba(99, 230, 190, 0.09);
  border-color: rgba(99, 230, 190, 0.18);
}

.status.off {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

label span,
.field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  outline: 0;
  color-scheme: dark;
}

select {
  cursor: pointer;
  appearance: auto;
}

select option,
select optgroup {
  color: #fff;
  background: #1b1f20;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(202, 243, 0, 0.58);
  box-shadow: 0 0 0 3px rgba(202, 243, 0, 0.12);
}

.product-form {
  display: grid;
  gap: 18px;
}

.image-picker {
  display: grid;
  gap: 10px;
}

.upload-btn {
  position: relative;
  width: max-content;
  overflow: hidden;
}

.upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
  min-height: 0;
}

.image-preview img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

.image-preview.gallery {
  margin-top: 10px;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form select {
  min-width: 112px;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border-radius: 30px;
}

.brand-mark {
  margin-bottom: 24px;
}

.notice {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 14px;
}

.notice.danger {
  color: #fff;
  background: rgba(255, 107, 107, 0.16);
  border: 1px solid rgba(255, 107, 107, 0.28);
}

.coupon-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.manage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.manage-grid.wide {
  align-items: start;
}

.compact-head {
  margin-bottom: 10px;
}

.table-wrap input,
.table-wrap select {
  min-width: 120px;
}

.in-table {
  min-height: 46px;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.check-row span {
  margin: 0;
}

.empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: auto;
    margin: 16px;
  }

  .logout {
    position: static;
    margin-top: 16px;
  }

  .page-shell,
  .page-shell.narrow {
    width: auto;
    margin: 0 16px 32px;
    padding-top: 0;
  }

  .metric-grid,
  .coupon-grid,
  .manage-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .hero-band,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
