:root {
  color-scheme: light;
  --ink: #101114;
  --muted: #72757d;
  --line: rgba(16, 17, 20, 0.09);
  --glass: rgba(255, 255, 255, 0.72);
  --blue: #0066ff;
  --violet: #7c3aed;
  --shadow: 0 24px 70px rgba(48, 55, 75, 0.12);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(95, 138, 255, .22), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(175, 117, 255, .18), transparent 30rem),
    linear-gradient(180deg, #f8faff 0%, #f3f4f8 48%, #fff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 720;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #111 15%, #4f46e5 65%, #b47bff);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.4), 0 8px 18px rgba(78,70,229,.25);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  inset: 0;
  margin: auto;
  box-shadow: 7px -7px 0 -5px white;
}

.ghost-btn, .primary-btn, .danger-btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 650;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.ghost-btn { background: rgba(255,255,255,.62); color: #34363b; border: 1px solid var(--line); }
.primary-btn { color: white; background: #111318; box-shadow: 0 10px 22px rgba(17,19,24,.16); }
.danger-btn { color: #bd2533; background: #fff0f1; }
.ghost-btn:hover, .primary-btn:hover, .danger-btn:hover { transform: translateY(-1px); }
.wide { width: 100%; }

.hero {
  padding: 78px 0 46px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .22em;
  color: #6d52d9;
}

.hero h1 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(42px, 7.3vw, 82px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 770;
}

.gradient-text {
  background: linear-gradient(92deg, #17191e 5%, #335dff 48%, #a14be2 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 600px;
  margin: 25px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.status-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: #64676e;
  font-size: 13px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #26b967;
  box-shadow: 0 0 0 5px rgba(38,185,103,.12);
}

.notice {
  margin: 12px 0 24px;
  padding: 17px 20px;
  border: 1px solid rgba(111, 87, 229, .13);
  border-radius: 18px;
  background: rgba(249, 248, 255, .78);
  color: #5e5480;
  text-align: center;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 20px;
  scrollbar-width: none;
}

.price-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 8px;
}

.search-box {
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
}

.search-box span { color: #777b84; font-size: 22px; }
.search-box input { width: 100%; border: 0; outline: 0; padding: 12px 0; background: transparent; }

.filter-row button {
  flex: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.68);
  color: #696c72;
  border-radius: 999px;
  padding: 9px 15px;
}

.filter-row button.active { background: #15171c; color: white; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 50px;
}

.price-card {
  position: relative;
  min-height: 250px;
  padding: 25px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.9);
  background: var(--glass);
  box-shadow: 0 16px 48px rgba(47,51,69,.07);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.price-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -55px;
  bottom: -55px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(73,111,255,.13), rgba(161,75,226,.1));
}

.card-top { display: flex; justify-content: space-between; gap: 12px; }
.category { color: #787b83; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.badge { color: #7046ca; background: #f0eaff; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 720; }
.price-card h3 { margin: 24px 0 8px; font-size: 21px; letter-spacing: -.025em; }
.card-desc { margin: 0; color: #7b7e85; font-size: 13px; min-height: 42px; line-height: 1.6; }
.price { margin-top: 27px; display: flex; align-items: baseline; gap: 6px; padding-right: 68px; }
.price strong { font-size: 38px; letter-spacing: -.05em; }
.price small { color: #85878c; }
.stock-status { margin-left: auto; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.stock-status.available { color: #16804b; background: #e8f8ef; }
.stock-status.low { color: #9a6413; background: #fff4d9; }
.stock-status.out { color: #a33b47; background: #ffecef; }
.sold-out { opacity: .7; }
.copy-price { position: absolute; right: 22px; bottom: 24px; z-index: 2; border: 0; border-radius: 10px; padding: 8px 10px; color: #586071; background: rgba(241,243,248,.9); }

.footer {
  padding: 22px 0 40px;
  text-align: center;
  color: #96989e;
  font-size: 12px;
}

.login-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(93,126,255,.28), transparent 35rem),
    radial-gradient(circle at 85% 25%, rgba(188,112,255,.22), transparent 34rem),
    #f5f7fc;
}

.login-card {
  width: min(430px, 100%);
  padding: 38px;
  border-radius: 32px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.92);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.login-card .brand-mark { width: 48px; height: 48px; border-radius: 15px; margin-bottom: 28px; }
.login-card h1 { margin: 0; font-size: 31px; letter-spacing: -.04em; }
.login-card > p { color: var(--muted); line-height: 1.6; margin: 11px 0 26px; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 18px; border-radius: 15px; background: #eceef4; }
.login-tabs button { border: 0; border-radius: 11px; padding: 10px; background: transparent; color: #747780; }
.login-tabs button.active { background: white; color: #17191d; box-shadow: 0 4px 13px rgba(30,34,46,.08); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.viewer-pill { padding: 9px 13px; border-radius: 999px; background: rgba(255,255,255,.65); border: 1px solid var(--line); color: #62666f; font-size: 12px; }
.announcement-stack { display: grid; gap: 9px; }
.announcement-stack .notice { display: flex; gap: 13px; text-align: left; margin: 0; }
.announcement-stack .notice span { color: #696574; }
.announcement-warning { background: rgba(255,247,219,.82) !important; border-color: rgba(180,125,20,.18) !important; color: #8a5c13 !important; }
.announcement-urgent { background: rgba(255,235,239,.84) !important; border-color: rgba(190,44,67,.16) !important; color: #a82f43 !important; }

.field { display: grid; gap: 8px; margin-bottom: 15px; }
.field label { font-size: 12px; font-weight: 700; color: #676a71; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid rgba(16,17,20,.1);
  background: rgba(255,255,255,.8);
  border-radius: 14px;
  padding: 13px 14px;
  color: #17191d;
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: #6683ee; box-shadow: 0 0 0 4px rgba(75,105,230,.1); }
.field textarea { resize: vertical; min-height: 82px; }
.error { color: #c73342 !important; font-size: 13px; min-height: 20px; margin: 12px 0 0 !important; }

.empty {
  grid-column: 1 / -1;
  padding: 70px 20px;
  border: 1px dashed #ced0d7;
  border-radius: 24px;
  text-align: center;
  color: #8b8e95;
}

.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 30px 0 70px; }
.sidebar { position: sticky; top: 20px; align-self: start; padding: 18px; border-radius: 24px; background: rgba(255,255,255,.68); border: 1px solid var(--line); }
.sidebar button { width: 100%; border: 0; text-align: left; border-radius: 12px; padding: 12px; background: transparent; color: #6d7077; margin: 2px 0; }
.sidebar button.active { color: #111; background: white; box-shadow: 0 5px 18px rgba(33,36,48,.07); font-weight: 700; }
.admin-main h1 { margin: 0; letter-spacing: -.045em; font-size: 38px; }
.admin-main > p { color: var(--muted); }
.panel { margin-top: 24px; padding: 25px; border-radius: 24px; background: rgba(255,255,255,.72); border: 1px solid var(--line); box-shadow: 0 15px 45px rgba(35,38,50,.05); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 19px; }
.admin-list { display: grid; gap: 10px; }
.admin-toolbar { display: flex; align-items: center; gap: 10px; padding: 5px 0 12px; }
.admin-toolbar input, .admin-toolbar select, .inline-form input, .inline-form select {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
.admin-toolbar span { margin-left: auto; color: var(--muted); font-size: 12px; }
.panel-tip { color: var(--muted); line-height: 1.65; }
.inline-form, .tool-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.file-btn { position: relative; overflow: hidden; display: inline-block; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.audit-list { display: grid; }
.audit-item { display: grid; grid-template-columns: 150px 1fr 160px; gap: 14px; align-items: center; border-top: 1px solid var(--line); padding: 14px 0; }
.audit-item:first-child { border-top: 0; }
.audit-item strong { font-size: 14px; }
.audit-item span { color: var(--muted); font-size: 12px; }
.admin-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 15px 0; }
.admin-item.selectable { grid-template-columns: 24px minmax(220px, 1fr) auto auto; }
.multi-price { font-size: 12px; color: #4f5561; white-space: nowrap; }
.bulk-bar { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 14px; background: #f3f4f7; margin-bottom: 5px; }
.bulk-bar select, .bulk-bar input { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 8px 10px; }
.link-btn { display: inline-block; text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.stat-card { display: grid; gap: 8px; padding: 22px; border-radius: 22px; background: rgba(255,255,255,.75); border: 1px solid var(--line); }
.stat-card strong { font-size: 34px; letter-spacing: -.04em; }
.stat-card span { color: var(--muted); font-size: 13px; }
.dashboard-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.bar-chart { height: 180px; display: flex; align-items: end; justify-content: space-around; gap: 8px; padding-top: 18px; }
.bar-col { height: 150px; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: end; gap: 5px; }
.bar-col i { width: min(34px, 75%); min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #7666ef, #4887ff); }
.bar-col b, .bar-col span { font-size: 11px; color: var(--muted); font-style: normal; }
.rank-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; padding: 11px 0; border-top: 1px solid var(--line); align-items: center; }
.rank-row:first-child { border-top: 0; }
.rank-row b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: #eef0fa; color: #6755d2; }
.rank-row em { color: var(--muted); font-size: 12px; font-style: normal; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-top: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-weight: 600; }
.deploy-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border-radius: 14px; background: var(--line); }
.deploy-list > * { margin: 0; padding: 13px; background: white; }
.deploy-list b { color: #1b8451; }
.deploy-list code { color: #6255ba; }
.admin-item:first-child { border-top: 0; }
.admin-item h3 { margin: 0 0 5px; font-size: 15px; }
.admin-item p { margin: 0; color: var(--muted); font-size: 12px; }
.admin-price { font-weight: 760; }
.actions { display: flex; gap: 6px; }
.actions button { padding: 8px 10px; border: 0; border-radius: 10px; background: #f1f2f5; }
.actions button.delete { color: #c12e3d; background: #fff0f2; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; padding: 13px 17px; border-radius: 13px; background: #17191d; color: white; box-shadow: var(--shadow); }

.modal { position: fixed; z-index: 25; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20,22,28,.28); backdrop-filter: blur(8px); }
.modal-card { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 27px; border-radius: 26px; background: #fafbfe; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-head h2 { margin: 0; }
.icon-btn { border: 0; width: 36px; height: 36px; border-radius: 50%; background: #eceef3; }
.checkbox { display: flex; gap: 9px; align-items: center; margin: 7px 0 18px; }

@media (max-width: 800px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; overflow-x: auto; }
  .sidebar button { width: auto; flex: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .admin-item.selectable { grid-template-columns: 24px 1fr auto; }
  .admin-item.selectable .multi-price { grid-column: 2 / -1; }
}

@media (max-width: 540px) {
  .shell { width: min(100% - 22px, 1120px); }
  .nav { padding-top: 15px; }
  .hero { padding: 52px 0 35px; }
  .hero h1 { font-size: 44px; }
  .cards { grid-template-columns: 1fr; }
  .price-card { min-height: 225px; }
  .login-card { padding: 28px 23px; border-radius: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .admin-item { grid-template-columns: 1fr auto; }
  .admin-price { grid-row: 2; }
  .price-tools, .admin-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .admin-toolbar span { margin-left: 0; }
  .audit-item { grid-template-columns: 1fr; gap: 4px; }
  .viewer-pill { display: none; }
  .tool-actions { width: 100%; }
  .price-tools .tool-actions { display: grid; grid-template-columns: repeat(3, 1fr); }
  .price-tools .tool-actions button { padding: 10px 6px; font-size: 12px; }
  .bulk-bar { align-items: stretch; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
