:root {
  --ink: #10233f;
  --muted: #66758b;
  --line: #dfe6ef;
  --panel: rgba(255, 255, 255, .86);
  --blue: #246bfd;
  --blue-dark: #1554d1;
  --cyan: #1ec8bb;
  --orange: #f59e0b;
  --danger: #e44747;
  --surface: #f4f7fb;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(25, 51, 88, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font: 15px/1.65 "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.site-bg {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 12% 8%, rgba(36, 107, 253, .16), transparent 29rem),
    radial-gradient(circle at 91% 36%, rgba(30, 200, 187, .13), transparent 25rem),
    linear-gradient(180deg, #f9fbff 0%, #f2f6fb 64%, #eef3f9 100%);
}
.site-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: radial-gradient(#8fa1b8 0.6px, transparent 0.6px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; position: relative; z-index: 1; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 760; font-size: 18px; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #246bfd, #24b8ba);
  color: white;
  box-shadow: 0 8px 20px rgba(36, 107, 253, .25);
}
.brand-mark svg { width: 22px; height: 22px; }
.topnav { display: flex; align-items: center; gap: 8px; }
.topnav a { color: #526278; padding: 9px 14px; border-radius: 10px; font-size: 14px; }
.topnav a:hover { background: rgba(255,255,255,.75); color: var(--ink); }
.topnav .nav-button { color: white; background: var(--ink); }
.topnav .nav-button:hover { background: #1c3558; color: white; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, .9fr);
  gap: 64px;
  align-items: center;
  padding: 58px 0 70px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #2166c7;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}
.eyebrow::before { content: ""; width: 24px; height: 1.5px; background: currentColor; }
.hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 820;
}
.hero h1 span {
  display: inline-block;
  background: linear-gradient(100deg, #1554d1, #16a9af);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy { max-width: 590px; margin: 22px 0 0; color: #5d6d82; font-size: 17px; line-height: 1.9; }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(194, 207, 225, .8);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  color: #45566d;
  font-size: 13px;
  backdrop-filter: blur(10px);
}
.feature-pill svg { width: 16px; height: 16px; color: #1b8f91; }
.proof-row { display: flex; gap: 40px; margin-top: 42px; }
.proof-item strong { display: block; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }
.proof-item span { display: block; margin-top: 4px; color: #7b899c; font-size: 12px; }

.generator-card {
  padding: 26px;
  border-radius: 26px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  position: relative;
}
.generator-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(218, 227, 239, .72);
  border-radius: 18px;
  pointer-events: none;
}
.generator-card > * { position: relative; z-index: 1; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.card-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.card-heading p { margin: 4px 0 0; color: #7a889a; font-size: 12px; }
.step-badge { flex: 0 0 auto; padding: 6px 9px; color: #2166c7; border-radius: 8px; background: #eaf1ff; font-size: 11px; font-weight: 700; }

.field { margin-bottom: 15px; }
.field > label, .field-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 7px; color: #415169; font-size: 13px; font-weight: 650; }
.field small { color: #93a0b0; font-size: 11px; font-weight: 400; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input, .select { height: 46px; padding: 0 13px; }
.textarea { min-height: 84px; padding: 11px 13px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: #7aa4f9; box-shadow: 0 0 0 3px rgba(36, 107, 253, .1); }
.input::placeholder, .textarea::placeholder { color: #a5afbd; }
.input-group { position: relative; }
.input-group .input { padding-left: 40px; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #7b8aa0; pointer-events: none; }
.slug-input { display: flex; align-items: stretch; min-width: 0; overflow: hidden; border: 1px solid #d8e0ea; border-radius: 12px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.slug-input:focus-within { border-color: #7aa4f9; box-shadow: 0 0 0 3px rgba(36, 107, 253, .1); }
.slug-input input { min-width: 0; flex: 1; height: 44px; padding: 0 12px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.slug-input input::placeholder { color: #a5afbd; }
.slug-help { margin: 5px 0 0; color: #99a5b3; font-size: 10px; }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upload-box {
  min-height: 82px;
  padding: 12px;
  border: 1px dashed #c9d5e4;
  border-radius: 12px;
  background: rgba(248, 250, 253, .7);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: .18s ease;
}
.upload-box:hover { border-color: #7aa4f9; background: #f3f7ff; }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; background: white; color: var(--blue); box-shadow: 0 3px 12px rgba(31, 63, 102, .08); }
.upload-icon svg { width: 18px; height: 18px; }
.upload-text { min-width: 0; }
.upload-text strong { display: block; color: #40526b; font-size: 12px; line-height: 1.4; }
.upload-text span { display: block; margin-top: 2px; color: #96a2b1; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recommend-tag { margin-left: 4px; padding: 2px 5px; vertical-align: 1px; color: #16796f; background: #e7faf6; border-radius: 5px; font-size: 8px; font-style: normal; font-weight: 700; }
.art-controls { margin: -2px 0 15px; padding: 1px 0 12px; border-bottom: 1px dashed #e1e8f0; }
.art-controls[hidden], .field[hidden] { display: none; }
.art-hint { margin: -2px 0 0; padding: 10px 12px; color: #6e7f93; background: #f5f9fc; border: 1px solid #e2eaf2; border-radius: 10px; font-size: 10px; line-height: 1.65; }
.live-preview-panel { position: sticky; top: 12px; z-index: 4; margin: 0 0 15px; padding: 10px; border: 1px solid #dde6f0; border-radius: 15px; background: rgba(250, 252, 255, .96); box-shadow: 0 8px 25px rgba(31, 56, 88, .08); backdrop-filter: blur(12px); }
.live-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 8px; color: #43566f; font-size: 11px; font-weight: 700; }
.live-preview-head span { display: inline-flex; align-items: center; gap: 6px; }
.live-preview-head i { width: 6px; height: 6px; border-radius: 50%; background: #1eaa91; box-shadow: 0 0 0 4px rgba(30, 170, 145, .1); }
.live-preview-head small { color: #95a1b1; font-size: 9px; font-weight: 400; }
.live-preview-frame { position: relative; width: min(272px, 100%); margin: 0 auto; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid #e6ecf3; border-radius: 12px; background: repeating-conic-gradient(#f4f6f9 0 25%, #fff 0 50%) 0 / 16px 16px; }
.live-preview-frame img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.live-preview-placeholder { display: grid; place-items: center; gap: 10px; padding: 24px; text-align: center; color: #92a0b2; background: rgba(255,255,255,.9); }
.live-preview-placeholder svg { width: 40px; height: 40px; color: #b3c1d2; }
.live-preview-placeholder span { font-size: 10px; line-height: 1.7; }
.preview-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.72); backdrop-filter: blur(3px); }
.preview-loading .spinner { display: block; width: 22px; height: 22px; border-color: #dbe5f2; border-top-color: var(--blue); }
.live-preview-panel > p { margin: 8px 2px 0; text-align: center; color: #9aa6b5; font-size: 9px; }

.style-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 15px; background: #f6f8fb; border: 1px solid #e7ecf2; border-radius: 12px; }
.style-toolbar span { color: #758499; font-size: 12px; }
.style-picker { display: flex; gap: 5px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: block;
  padding: 6px 9px;
  border-radius: 8px;
  color: #6d7b8d;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid transparent;
}
.segmented input:checked + label { color: #205bc4; background: white; border-color: #d9e4f4; box-shadow: 0 2px 8px rgba(42, 74, 110, .07); }
.color-row { display: flex; gap: 10px; }
.color-item { flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #e0e7f0; border-radius: 10px; background: #fff; }
.color-item input[type=color] { width: 26px; height: 26px; border: 0; border-radius: 7px; padding: 0; background: transparent; cursor: pointer; }
.color-item span { color: #718096; font-size: 11px; }

.btn {
  border: 0;
  border-radius: 11px;
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 650;
  font-size: 13px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: white; background: linear-gradient(135deg, #246bfd, #1754d8); box-shadow: 0 9px 22px rgba(36, 107, 253, .24); }
.btn-primary:hover { color: white; box-shadow: 0 12px 25px rgba(36, 107, 253, .3); }
.btn-large { width: 100%; min-height: 50px; font-size: 14px; border-radius: 12px; }
.btn-dark { color: white; background: var(--ink); }
.btn-dark:hover { color: white; background: #1c3558; }
.btn-light { color: #354962; background: white; border: 1px solid #dce4ee; }
.btn-light:hover { color: var(--ink); background: #f8faff; }
.btn-danger { color: #c33737; background: #fff1f1; border: 1px solid #ffdada; }
.btn-danger:hover { color: #a52525; background: #ffe8e8; }
.btn-sm { min-height: 34px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.btn svg { width: 17px; height: 17px; }
.form-note { margin: 10px 0 0; text-align: center; color: #9aa5b3; font-size: 10px; }

.alert { padding: 12px 14px; margin-bottom: 16px; border-radius: 11px; font-size: 13px; }
.alert-error { color: #9e2d2d; background: #fff1f1; border: 1px solid #f6d7d7; }
.alert-success { color: #147167; background: #edfbf8; border: 1px solid #cbf0e9; }
.alert-info { color: #315f9b; background: #eff5ff; border: 1px solid #d7e5fc; }

.result-panel { display: none; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5ebf2; text-align: center; }
.result-panel.visible { display: block; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.result-image { width: 190px; height: 190px; padding: 7px; object-fit: contain; border-radius: 18px; background: #fff; box-shadow: 0 14px 35px rgba(30, 63, 102, .16); }
.result-title { margin: 14px 0 2px; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-url { margin: 0 auto 13px; max-width: 350px; color: #77869a; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: flex; gap: 8px; justify-content: center; }
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.benefit-section { padding: 20px 0 80px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.section-head p { margin: 6px 0 0; color: #75859a; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.benefit-card { padding: 24px; border: 1px solid rgba(221, 229, 239, .9); border-radius: 18px; background: rgba(255,255,255,.7); transition: .2s ease; }
.benefit-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(31, 57, 91, .08); }
.benefit-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #2166c7; background: #eaf2ff; }
.benefit-icon svg { width: 21px; height: 21px; }
.benefit-card h3 { margin: 16px 0 6px; font-size: 15px; }
.benefit-card p { margin: 0; color: #728196; font-size: 13px; line-height: 1.8; }
.footer { padding: 20px 0 34px; color: #97a3b2; font-size: 12px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid rgba(211,222,235,.72); }

/* Admin */
.admin-body { min-height: 100vh; background: #f3f6fa; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; background: #10233f; color: #c6d2e1; display: flex; flex-direction: column; }
.sidebar .brand { color: white; padding: 2px 8px 26px; }
.sidebar .brand:hover { color: white; }
.side-label { padding: 0 12px 8px; color: #64758e; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.side-nav { display: grid; gap: 5px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; color: #aebdd0; border-radius: 10px; font-size: 13px; }
.side-nav a:hover, .side-nav a.active { color: white; background: rgba(255,255,255,.09); }
.side-nav svg { width: 18px; height: 18px; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.sidebar-user { padding: 12px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.09); }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; color: #15345e; background: linear-gradient(145deg,#fff,#bce7e5); font-weight: 800; }
.sidebar-user strong { display: block; color: white; font-size: 12px; }
.sidebar-user span { display: block; color: #72839a; font-size: 10px; }
.sidebar-logout { margin-left: auto; border: 0; background: none; color: #72839a; padding: 4px; }
.sidebar-logout:hover { color: white; }
.sidebar-logout svg { width: 16px; height: 16px; }
.admin-main { min-width: 0; padding: 32px clamp(20px, 4vw, 54px) 60px; }
.admin-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 25px; }
.admin-top h1 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.admin-top p { margin: 6px 0 0; color: #7c899a; font-size: 13px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 19px; border-radius: 16px; background: white; border: 1px solid #e7ecf3; box-shadow: 0 5px 18px rgba(31, 54, 85, .035); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: #78879a; font-size: 12px; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #edf3ff; color: #2768d8; }
.stat-icon.green { background: #eafaf7; color: #138f84; }
.stat-icon.orange { background: #fff7e6; color: #cf8500; }
.stat-icon.violet { background: #f2efff; color: #7053c7; }
.stat-icon svg { width: 17px; height: 17px; }
.stat-value { margin-top: 10px; font-size: 28px; line-height: 1.1; font-weight: 780; letter-spacing: -.04em; }
.stat-desc { margin-top: 5px; color: #9aa5b3; font-size: 10px; }
.panel { background: white; border: 1px solid #e7ecf3; border-radius: 17px; box-shadow: 0 7px 24px rgba(31, 54, 85, .035); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid #edf0f5; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-head p { margin: 3px 0 0; color: #909baa; font-size: 11px; }
.panel-body { padding: 20px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 16px; }
.domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.chart { min-height: 230px; display: flex; align-items: flex-end; gap: clamp(6px, 1.5vw, 14px); padding: 22px 20px 15px; }
.chart-column { flex: 1; min-width: 0; height: 190px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.chart-bar-wrap { width: 100%; max-width: 46px; height: 156px; display: flex; align-items: flex-end; border-radius: 7px 7px 3px 3px; background: #f2f5f9; overflow: hidden; }
.chart-bar { width: 100%; min-height: 2px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #54a8ff, #246bfd); transition: height .4s ease; }
.chart-date { color: #96a1b0; font-size: 9px; white-space: nowrap; }
.chart-value { color: #627187; font-size: 10px; font-weight: 650; }
.rank-list { display: grid; gap: 2px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f0f3f7; }
.rank-item:last-child { border-bottom: 0; }
.rank-index { width: 23px; height: 23px; border-radius: 7px; display: grid; place-items: center; background: #f2f5fa; color: #8290a2; font-size: 10px; font-weight: 700; }
.rank-item:nth-child(1) .rank-index { color: #ae6c00; background: #fff2d3; }
.rank-info { min-width: 0; flex: 1; }
.rank-info strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info span { display: block; color: #9ba6b4; font-size: 9px; }
.rank-count { color: #42536b; font-size: 12px; font-weight: 700; }

.table-panel { margin-top: 17px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 830px; }
.data-table th { padding: 10px 14px; text-align: left; color: #8793a3; font-size: 10px; font-weight: 650; background: #fafbfd; border-bottom: 1px solid #edf0f4; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #f0f3f6; vertical-align: middle; font-size: 12px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfdff; }
.qr-cell { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.qr-thumb { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; object-fit: cover; background: #f3f6fa; border: 1px solid #e6ebf2; }
.qr-meta { min-width: 0; }
.qr-meta strong { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.qr-meta span { display: block; margin-top: 2px; color: #99a4b2; font-size: 9px; font-family: ui-monospace, Consolas, monospace; }
.target-link { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64758b; font-size: 11px; }
.scan-count { font-size: 15px; font-weight: 750; }
.scan-unique { display: block; color: #98a3b1; font-size: 9px; font-weight: 400; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; font-size: 10px; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-on { color: #128278; background: #eafaf7; }
.status-off { color: #8e99a7; background: #f2f4f7; }
.row-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.icon-button { width: 31px; height: 31px; border: 1px solid #e4e9f0; border-radius: 8px; display: grid; place-items: center; color: #66768b; background: white; }
.icon-button:hover { color: var(--blue); background: #f5f9ff; border-color: #cedcf2; }
.icon-button.danger:hover { color: var(--danger); background: #fff4f4; border-color: #f5d2d2; }
.icon-button svg { width: 14px; height: 14px; }
.empty-state { padding: 55px 20px; text-align: center; color: #8c98a8; }
.empty-state strong { display: block; margin-bottom: 5px; color: #52647c; font-size: 14px; }

.page-card { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid .span-2 { grid-column: span 2; }
.edit-preview { display: flex; gap: 22px; align-items: center; }
.edit-preview img { width: 132px; height: 132px; border: 1px solid #e6ebf1; border-radius: 15px; object-fit: cover; }
.edit-preview h2 { margin: 0 0 4px; font-size: 18px; }
.edit-preview code { color: #748298; font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 16px; }
.detail-box { padding: 13px; border-radius: 11px; background: #f7f9fc; }
.detail-box span { display: block; color: #99a4b2; font-size: 9px; }
.detail-box strong { display: block; margin-top: 3px; font-size: 15px; }
.danger-zone { margin-top: 20px; padding-top: 18px; border-top: 1px solid #eef1f5; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.danger-zone p { margin: 0; color: #8b97a7; font-size: 11px; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 20% 15%,rgba(36,107,253,.15),transparent 30rem), radial-gradient(circle at 90% 90%,rgba(30,200,187,.13),transparent 25rem), #f5f8fc; }
.auth-card { width: min(440px,100%); padding: 34px; background: white; border: 1px solid #e6ebf2; border-radius: 24px; box-shadow: 0 25px 70px rgba(27, 50, 80, .12); }
.auth-card .brand { margin-bottom: 26px; }
.auth-card h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.auth-card > p { margin: 6px 0 24px; color: #7a889b; font-size: 13px; }
.auth-help { margin-top: 18px; text-align: center; color: #9aa5b2; font-size: 11px; }

.flash-stack { position: fixed; z-index: 50; right: 22px; top: 20px; width: min(360px, calc(100vw - 44px)); }
.flash { padding: 12px 14px; margin-bottom: 8px; border-radius: 11px; box-shadow: 0 12px 30px rgba(22,43,70,.13); font-size: 12px; animation: flashIn .25s ease both; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-5px); } }
.flash.success { color: #116c62; background: #ecfbf8; border: 1px solid #c7eee7; }
.flash.error { color: #a72d2d; background: #fff2f2; border: 1px solid #f5d6d6; }

.install-list { display: grid; gap: 10px; margin: 22px 0; }
.install-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e8edf3; border-radius: 11px; }
.install-check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: white; background: #20a58f; font-size: 12px; }
.install-check.fail { background: #dc5353; }
.install-row strong { display: block; font-size: 12px; }
.install-row span { display: block; color: #8f9aa9; font-size: 10px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 30px; }
  .hero-copy { max-width: 720px; }
  .generator-card { max-width: 620px; }
  .benefit-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 78px minmax(0,1fr); }
  .sidebar { padding: 22px 12px; }
  .sidebar .brand span, .side-label, .side-nav span, .sidebar-user > div:not(.avatar), .sidebar-logout { display: none; }
  .sidebar .brand { justify-content: center; padding: 2px 0 25px; }
  .side-nav a { justify-content: center; padding: 12px; }
  .sidebar-user { justify-content: center; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .domain-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .wrap { width: min(100% - 26px, 1180px); }
  .topbar { height: 68px; }
  .topnav a:not(.nav-button) { display: none; }
  .hero { padding: 28px 0 44px; }
  .hero h1 { font-size: 40px; }
  .hero-copy { font-size: 15px; }
  .proof-row { gap: 25px; margin-top: 28px; }
  .proof-item strong { font-size: 20px; }
  .generator-card { padding: 21px; border-radius: 21px; }
  .upload-grid, .color-row { grid-template-columns: 1fr; display: grid; }
  .benefit-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 7px; }
  .admin-layout { display: block; }
  .sidebar { position: static; height: auto; padding: 13px 16px; flex-direction: row; align-items: center; gap: 15px; }
  .sidebar .brand { padding: 0; }
  .sidebar .brand span { display: block; font-size: 15px; }
  .side-nav { display: flex; margin-left: auto; }
  .side-nav a { padding: 9px; }
  .sidebar-bottom { display: none; }
  .admin-main { padding: 22px 13px 40px; }
  .admin-top { align-items: center; }
  .admin-top p { display: none; }
  .admin-top h1 { font-size: 21px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 15px; }
  .stat-value { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .edit-preview { align-items: flex-start; }
  .edit-preview img { width: 98px; height: 98px; }
  .detail-grid { grid-template-columns: 1fr; }
  .chart { gap: 4px; padding-inline: 12px; }
  .auth-card { padding: 26px 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
