:root {
  --ink: #111111;
  --muted: #686a70;
  --line: #dedfe2;
  --soft: #f5f5f6;
  --paper: #ffffff;
  --green: #ed1c24;
  --green-dark: #c30f18;
  --green-soft: #fff0f1;
  --amber: #9a5b0a;
  --amber-soft: #fff2d8;
  --red: #a63232;
  --red-soft: #fce9e8;
  --blue: #255f85;
  --shadow: 0 12px 32px rgba(24, 33, 29, 0.08);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

/* Global Smart Review admin branding */
.admin-brand span,
.auth-mark { color: transparent !important; background: #ed1c24 !important; font-size: 0 !important; }
.admin-brand span::after,
.auth-mark::after { content: "GSR"; color: #fff; font-size: 10px; font-weight: 900; }
.brand-preview .wordmark-preview,
.brand-preview img[src=""] { display: none !important; }
.brand-preview::after { content: "GLOBAL SMART REVIEW"; color: #ed1c24; font-size: 18px; font-weight: 900; letter-spacing: -.04em; }
.editor-form > .editor-top .admin-eyebrow { font-size: 0; }
.editor-form > .editor-top .admin-eyebrow::after { content: "GLOBAL SMART REVIEW"; font-size: 10px; }

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  color: #fff;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-brand { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.admin-brand span,
.auth-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}
.admin-brand strong { font-size: 14px; font-weight: 600; }
.admin-brand small { color: rgba(255,255,255,.58); font-size: 11px; }
.admin-nav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; }
.admin-nav a {
  display: flex;
  align-items: center;
  padding: 0 11px;
  border-bottom: 3px solid transparent;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 500;
}
.admin-nav a:hover,
.admin-nav a.active { color: #fff; border-bottom-color: #61bb92; }
.admin-top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.admin-top-actions form { margin: 0; }
.admin-visit,
.admin-link-button {
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 500;
}
.admin-visit:hover,
.admin-link-button:hover { color: #fff; }
.admin-link-button { padding: 0; border: 0; background: transparent; }
.admin-menu-button {
  display: none;
  min-width: 42px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 6px;
  color: #fff;
  background: transparent;
}

.admin-main { width: min(calc(100% - 40px), 1260px); margin: 0 auto; padding: 30px 0 64px; }
.admin-flash {
  position: relative;
  z-index: 20;
  padding: 12px 24px;
  border-bottom: 1px solid;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.admin-flash.success { color: #184f39; background: var(--green-soft); border-color: #badfce; }
.admin-flash.error { color: #7f2727; background: var(--red-soft); border-color: #efc0bd; }
.admin-flash.hiding { opacity: 0; transition: opacity .2s ease; }

.admin-page-head,
.editor-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.admin-page-head h1,
.editor-top h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.2; letter-spacing: 0; font-weight: 600; }
.admin-page-head p,
.panel-head p,
.section-title p,
.admin-panel > p { margin: 0; color: var(--muted); }
.admin-eyebrow {
  margin: 0 0 7px !important;
  color: var(--green) !important;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}
.back-link { display: inline-block; margin-bottom: 8px; color: var(--green); font-size: 12px; font-weight: 600; }

.admin-primary,
.admin-secondary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.admin-primary { color: #fff; background: var(--green); }
.admin-primary:hover { background: var(--green-dark); }
.admin-secondary { color: var(--ink); background: #fff; border-color: #bdc9c2; }
.admin-secondary:hover { border-color: var(--ink); }
.admin-secondary.full { width: 100%; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  min-height: 106px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat strong { font-size: 30px; font-weight: 600; line-height: 1; }

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 1px 1px rgba(24,33,29,.02);
}
.panel-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2,
.section-title h2,
.form-section > h2 { margin: 0; font-size: 16px; letter-spacing: 0; font-weight: 600; }
.panel-head a { color: var(--green); font-size: 12px; font-weight: 600; }

.admin-table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.admin-table th,
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { padding: 11px 16px; color: var(--muted); background: #fafcfb; font-size: 10px; text-transform: uppercase; letter-spacing: 0; font-weight: 600; }
.admin-table td { font-size: 12px; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fbfdfc; }
.admin-table td > a { display: flex; flex-direction: column; gap: 3px; }
.admin-table td > a:hover strong { color: var(--green); }
.admin-table td small { color: var(--muted); }
.status {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.status.published { color: #155338; background: var(--green-soft); }
.status.draft { color: var(--amber); background: var(--amber-soft); }
.status.pinned { width: fit-content; margin-top: 6px; color: #255f85; background: #e8f2f8; }
.row-actions { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.row-actions form { margin: 0; }
.row-actions a,
.row-actions button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 600; }
.row-actions .danger,
.danger { color: var(--red); }

.filter-row { display: grid; grid-template-columns: minmax(240px, 1fr) 190px; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filter-row input,
.filter-row select { margin: 0; }

.admin-form,
.form-section { display: flex; flex-direction: column; gap: 16px; }
.form-section { padding: 18px; }
.form-section .section-title { margin: -18px -18px 2px; }
.admin-form { width: 100%; }
.admin-form label,
.form-section label { display: flex; flex-direction: column; gap: 6px; color: #2b3932; font-size: 12px; font-weight: 600; }
input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #c7d1cb;
  border-radius: 6px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
input:focus,
select:focus,
textarea:focus,
.rich-editor:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,107,79,.12); }
input[type="file"] { min-height: 46px; padding: 7px; background: #fafcfb; }
label small,
.form-section > small { color: var(--muted); font-size: 11px; font-weight: 500; }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check-row { flex-direction: row !important; align-items: center; gap: 9px !important; }
.check-row input { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--green); }
.featured-settings { display: flex; flex-direction: column; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fafcfb; }
.featured-order-field { max-width: 180px; }
.featured-order-field input { max-width: 116px; font-weight: 750; }
.featured-order-field[hidden] { display: none !important; }

.editor-actions { display: flex; align-items: stretch; gap: 10px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 20px; }
.editor-main,
.editor-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.editor-side { position: sticky; top: 82px; }
.publish-toggle {
  min-width: 168px;
  min-height: 44px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border: 1px solid #c7d1cb;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  user-select: none;
}
.publish-toggle:hover { border-color: #94a69d; background: #fbfdfc; }
.publish-toggle:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,107,79,.12); }
.publish-toggle > input { width: 1px; height: 1px; min-height: 0; position: absolute; opacity: 0; }
.publish-track {
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  position: relative;
  border-radius: 999px;
  background: #aab5af;
  transition: background .18s ease;
}
.publish-track > span {
  width: 18px;
  height: 18px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(24,33,29,.28);
  transition: transform .18s ease;
}
.publish-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.publish-copy strong { font-size: 12px; font-weight: 700; white-space: nowrap; }
.publish-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }
.publish-live { display: none; }
.publish-toggle > input:checked + .publish-track { background: var(--green); }
.publish-toggle > input:checked + .publish-track > span { transform: translateX(18px); }
.publish-toggle > input:checked ~ .publish-copy .publish-draft { display: none; }
.publish-toggle > input:checked ~ .publish-copy .publish-live { display: block; }
.publish-toggle > input:checked ~ .publish-copy strong.publish-live { color: var(--green-dark); }
.save-post-button { min-height: 44px; padding-inline: 17px; box-shadow: 0 2px 4px rgba(31,107,79,.16); }

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border: 1px solid #c7d1cb;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f7f9f8;
}
.editor-toolbar button {
  min-width: 34px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #34423b;
  background: transparent;
  font-size: 11px;
}
.editor-toolbar button:hover,
.editor-toolbar button:focus { border-color: #c7d1cb; background: #fff; }
.rich-editor {
  min-height: 360px;
  padding: 20px;
  border: 1px solid #c7d1cb;
  border-radius: 0 0 6px 6px;
  outline: none;
  background: #fff;
  line-height: 1.7;
}
.rich-editor h2 { margin: 24px 0 8px; font-size: 22px; font-weight: 600; }
.rich-editor h3 { margin: 20px 0 8px; font-size: 18px; font-weight: 600; }
.rich-editor p { margin: 0 0 14px; }
.rich-editor ul,
.rich-editor ol { padding-left: 24px; }
.rich-editor a { color: var(--green); text-decoration: underline; }
details { border: 1px solid var(--line); border-radius: 6px; }
details summary { padding: 11px 13px; cursor: pointer; color: var(--green); font-size: 12px; font-weight: 700; }
.details-body { display: flex; flex-direction: column; gap: 17px; padding: 4px 14px 15px; }
.cover-preview,
.cover-placeholder { width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; background: var(--soft); }
.cover-placeholder { display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); align-items: start; gap: 20px; }
.settings-layout { grid-template-columns: minmax(0, 1fr) 380px; }
.category-admin-list { display: flex; flex-direction: column; }
.category-admin-list > div { min-height: 66px; display: grid; grid-template-columns: 50px minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 9px 15px; border-bottom: 1px solid var(--line); }
.category-admin-list > div:last-child { border-bottom: 0; }
.category-admin-list img { width: 50px; height: 44px; border-radius: 5px; object-fit: cover; background: var(--soft); }
.category-admin-list span { min-width: 0; display: flex; flex-direction: column; }
.category-admin-list small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.category-admin-list a,
.category-admin-list button { border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 600; }
.category-admin-list .danger { color: var(--red); }
.security-note { padding: 15px; border-left: 3px solid #e2ae43; background: var(--amber-soft); }
.security-note p { margin: 5px 0 0; color: #6e521d; font-size: 12px; }

.import-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); align-items: start; gap: 20px; margin-bottom: 20px; }
.import-note ul { display: flex; flex-direction: column; gap: 9px; margin: 0; padding-left: 19px; color: var(--muted); font-size: 12px; }
.import-note li::marker { color: var(--green); }
.import-preview { overflow: hidden; }
.import-preview-head h2 { margin: 0 0 3px; font-size: 17px; font-weight: 600; }
.import-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.import-summary > div { min-height: 94px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 18px 21px; border-right: 1px solid var(--line); }
.import-summary > div:last-child { border-right: 0; }
.import-summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.import-summary strong { font-size: 25px; font-weight: 600; line-height: 1; }
.import-conflict { display: flex; align-items: center; gap: 12px; padding: 12px 21px; color: #6e521d; background: var(--amber-soft); border-bottom: 1px solid #eed6a8; font-size: 13px; }
.import-conflict span { color: #7b6029; }
.import-content-list { border-bottom: 1px solid var(--line); }
.import-content-list .panel-head span { color: var(--muted); font-size: 12px; }
.import-content-row { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 21px; border-top: 1px solid var(--line); }
.import-content-row > span:first-child { min-width: 0; display: flex; flex-direction: column; }
.import-content-row strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.import-content-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.import-options { display: flex; flex-direction: column; gap: 18px; padding: 21px; }
.import-options label { display: flex; flex-direction: column; gap: 7px; color: #2b3932; font-size: 12px; font-weight: 600; }
.import-options label small { color: var(--muted); font-size: 11px; font-weight: 500; }
.import-actions { display: flex; justify-content: flex-end; }
.import-cancel { padding: 0 21px 21px; }
.admin-link-danger { padding: 0; border: 0; color: var(--red); background: transparent; font-size: 12px; font-weight: 750; }
.form-section code { padding: 2px 5px; border-radius: 4px; color: #254f3e; background: var(--green-soft); font-size: 12px; }

.pages-layout { grid-template-columns: 290px minmax(0, 1fr); }
.pages-layout .editor-form { display: flex; flex-direction: column; gap: 20px; }
.page-admin-panel { position: sticky; top: 82px; overflow: hidden; }
.page-list-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fafcfb; }
.page-list-head > div { min-width: 0; display: flex; flex-direction: column; }
.page-list-head strong { font-size: 13px; font-weight: 600; }
.page-list-head small { color: var(--muted); font-size: 11px; }
.page-list-head > span { flex: 0 0 auto; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.page-admin-list { display: flex; flex-direction: column; }
.page-admin-list a { min-height: 70px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 11px; padding: 10px 15px; border-bottom: 1px solid var(--line); transition: background .15s ease, box-shadow .15s ease; }
.page-admin-list a:last-child { border-bottom: 0; }
.page-admin-list a:hover,
.page-admin-list a.active { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); }
.page-list-index { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #cfd9d4; border-radius: 50%; color: var(--muted); background: #fff; font-size: 10px; font-weight: 720; }
.page-admin-list a.active .page-list-index { border-color: var(--green); color: #fff; background: var(--green); }
.page-list-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.page-list-copy strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.page-list-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.appearance-layout { display: grid; grid-template-columns: minmax(0, 980px); }
.appearance-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.brand-preview { min-height: 116px; display: flex; align-items: center; gap: 26px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.brand-preview > img:first-child { width: 72px; height: 72px; border-radius: 10px; object-fit: contain; }
.brand-preview .wordmark-preview { width: min(100%, 360px); max-height: 82px; object-fit: contain; object-position: left center; }
.color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.color-grid label { min-width: 0; }
.color-grid input[type="color"] { height: 48px; padding: 4px; cursor: pointer; }
.method-edit-row { display: grid; grid-template-columns: 90px minmax(180px, .7fr) minmax(260px, 1.3fr); align-items: start; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.method-edit-row > strong { padding-top: 11px; color: var(--green); font-size: 12px; }

.analytics-window { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #bfd2c8; border-radius: 5px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; font-weight: 720; }
.analytics-stat-grid .stat { gap: 10px; }
.analytics-stat-grid .stat small { color: var(--muted); font-size: 11px; font-weight: 600; }
.analytics-click-stat { border-color: #d8c187; background: #fffbf1; }
.analytics-chart-panel,
.analytics-content-grid,
.analytics-table-panel,
.analytics-code-panel { margin-bottom: 20px; }
.analytics-chart { height: 270px; display: grid; grid-template-columns: repeat(14, minmax(28px, 1fr)); align-items: end; gap: 9px; padding: 28px 22px 18px; overflow-x: auto; }
.analytics-day { min-width: 28px; height: 210px; display: grid; grid-template-rows: 20px minmax(0, 1fr) 22px; align-items: end; justify-items: center; }
.analytics-bar-value { color: var(--muted); font-size: 10px; font-weight: 700; }
.analytics-bar { width: min(100%, 32px); min-height: 3px; display: block; border-radius: 3px 3px 1px 1px; background: var(--green); }
.analytics-bar.empty { background: #d8e0dc; }
.analytics-day small { padding-top: 6px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.analytics-content-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); align-items: start; gap: 20px; }
.analytics-content-grid .admin-panel { min-width: 0; }
.analytics-table-panel { overflow: hidden; }
.analytics-table-panel .admin-table { min-width: 520px; }
.analytics-table-panel .admin-table th:last-child,
.analytics-table-panel .admin-table td:last-child { width: 110px; text-align: right; }
.empty-table { padding-block: 26px !important; color: var(--muted); text-align: center !important; }
.analytics-breakdowns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-breakdown { min-width: 0; padding: 18px; border-right: 1px solid var(--line); }
.analytics-breakdown:last-child { border-right: 0; }
.analytics-breakdown h3 { margin: 0 0 15px; font-size: 12px; font-weight: 600; }
.analytics-empty { margin: 0; color: var(--muted); font-size: 12px; }
.analytics-progress-row { margin-top: 13px; }
.analytics-progress-row > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.analytics-progress-row span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-progress-row strong { font-size: 11px; }
.analytics-progress { height: 5px; display: block; overflow: hidden; border-radius: 3px; background: #e7ece9; }
.analytics-progress i { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.code-editor { min-height: 180px; tab-size: 2; color: #23342d; background: #fbfcfb; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; line-height: 1.6; }
.code-warning { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-left: 3px solid #d49a2a; color: #684d19; background: var(--amber-soft); font-size: 12px; }
.code-warning strong { font-weight: 760; }
.analytics-code-panel .admin-primary { align-self: flex-start; }
.analytics-danger-zone { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-top: 1px solid #e1c4c2; color: #6f2c2c; }
.analytics-danger-zone p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.analytics-danger-zone form { margin: 0; }
.danger-outline { color: var(--red); border-color: #dda9a6; }
.danger-outline:hover { border-color: var(--red); background: var(--red-soft); }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink); }
.auth-card { width: min(100%, 440px); padding: 34px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.auth-mark { margin-bottom: 26px; color: #fff; background: var(--ink); }
.auth-card h1 { margin: 0 0 9px; font-size: 25px; font-weight: 600; line-height: 1.2; }
.auth-card > p:not(.admin-eyebrow) { margin: 0 0 24px; color: var(--muted); }
.auth-card .admin-form { margin-top: 20px; }
.auth-back { display: inline-block; margin-top: 22px; color: var(--green); font-size: 12px; font-weight: 600; }
.form-error { padding: 11px 13px; border: 1px solid #efc0bd; border-radius: 6px; color: #7f2727; background: var(--red-soft); font-size: 13px; }

[hidden] { display: none !important; }

@media (max-width: 1120px) {
  .admin-topbar { padding: 0 18px; gap: 14px; }
  .admin-menu-button { display: inline-flex; align-items: center; justify-content: center; order: -1; }
  .admin-nav { position: fixed; inset: 58px 0 auto; display: none; flex-direction: column; align-items: stretch; padding: 10px; background: var(--ink); box-shadow: var(--shadow); }
  .admin-nav.open { display: flex; }
  .admin-nav a { min-height: 44px; padding: 0 13px; border: 0; border-radius: 5px; }
  .admin-nav a:hover,
  .admin-nav a.active { background: rgba(255,255,255,.09); }
  .admin-top-actions { margin-left: auto; }
  .admin-visit { display: none; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-layout,
  .settings-layout,
  .import-layout { grid-template-columns: 1fr; }
  .analytics-content-grid { grid-template-columns: 1fr; }
  .analytics-breakdowns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pages-layout { grid-template-columns: 1fr; }
  .page-admin-panel { position: static; }
  .page-admin-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-admin-list a { border-right: 1px solid var(--line); }
  .page-admin-list a:nth-child(3n) { border-right: 0; }
  .page-admin-list a.active { box-shadow: inset 0 3px 0 var(--green); }
  .field-grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .admin-main { width: min(calc(100% - 24px), 1260px); padding: 25px 0 50px; }
  .admin-brand small { display: none; }
  .admin-top-actions { gap: 0; }
  .admin-page-head,
  .editor-top { align-items: flex-start; flex-direction: column; }
  .admin-page-head h1,
  .editor-top h1 { font-size: 24px; }
  .admin-page-head .admin-primary { width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 102px; }
  .field-grid.two,
  .editor-side { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: 1fr; }
  .brand-preview { align-items: flex-start; flex-direction: column; }
  .method-edit-row { grid-template-columns: 1fr; }
  .method-edit-row > strong { padding-top: 0; }
  .import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-summary > div:nth-child(2) { border-right: 0; }
  .import-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .import-conflict { align-items: flex-start; flex-direction: column; gap: 3px; }
  .filter-row { grid-template-columns: 1fr; }
  .editor-actions { width: 100%; justify-content: flex-end; }
  .form-section { padding: 16px; }
  .form-section .section-title { margin: -16px -16px 2px; }
  .category-admin-list > div { grid-template-columns: 46px minmax(0,1fr) auto; gap: 10px; }
  .category-admin-list img { width: 46px; height: 44px; }
  .category-admin-list form { grid-column: 3; }
  .auth-card { padding: 26px 22px; }
  .page-admin-list { grid-template-columns: 1fr; }
  .page-admin-list a { border-right: 0; border-bottom: 1px solid var(--line); }
  .page-admin-list a:last-child { border-bottom: 0; }
  .page-admin-list a.active { box-shadow: inset 3px 0 0 var(--green); }
  .analytics-chart { gap: 6px; padding-inline: 15px; }
  .analytics-breakdowns { grid-template-columns: 1fr; }
  .analytics-breakdown { border-right: 0; border-bottom: 1px solid var(--line); }
  .analytics-breakdown:last-child { border-bottom: 0; }
  .analytics-danger-zone { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .admin-topbar { padding: 0 12px; }
  .admin-brand strong { display: none; }
  .admin-menu-button { min-width: 48px; }
  .stat-grid { gap: 10px; }
  .stat { padding: 15px; }
  .stat strong { font-size: 29px; }
  .editor-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
  .publish-toggle { min-width: 0; }
  .publish-copy small { display: none !important; }
  .editor-actions .admin-primary { min-width: 116px; }
}

/* Rating and featured-product editor */
.compact { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.rating-controls { display: grid; grid-template-columns: 1fr 1fr minmax(150px,.7fr); align-items: end; gap: 14px; margin-bottom: 18px; }
.rating-controls .check-row { min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.rating-criteria { display: grid; gap: 9px; margin-bottom: 12px; }
.rating-criterion { display: grid; grid-template-columns: minmax(180px,1fr) 110px 110px 36px; gap: 9px; align-items: center; }
.rating-criterion::before { display: none; content: ""; }
.rating-criterion .admin-link-danger { width: 36px; height: 36px; padding: 0; border: 1px solid #e6c4c1; border-radius: 5px; background: #fff; font-size: 20px; }
.featured-product-editor-list { display: grid; gap: 14px; }
.featured-product-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; }
.featured-product-editor > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; cursor: pointer; color: var(--ink); background: #f3f6f4; font-weight: 760; list-style: none; }
.featured-product-editor > summary::-webkit-details-marker { display: none; }
.featured-product-editor > summary::before { content: "+"; flex: 0 0 20px; color: var(--green); font-size: 18px; }
.featured-product-editor[open] > summary::before { content: "−"; }
.featured-product-editor > summary span { flex: 1; }
.featured-product-editor > summary .admin-link-danger { flex: 0 0 auto; }
.featured-product-editor > .details-body { padding: 18px; border-top: 1px solid var(--line); }
.empty-repeater { margin: 0; padding: 25px; border: 1px dashed #bfcac4; border-radius: 7px; color: var(--muted); text-align: center; background: #fbfcfb; }
.brand-fields-admin { border-top: 4px solid var(--green); }
.brand-review-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #c9ddd2; border-radius: 7px; background: #f0f7f3; }
.brand-review-notice strong { color: var(--green); }
.brand-review-notice span { color: var(--muted); font-size: 13px; text-align: right; }

@media (max-width: 760px) {
  .rating-controls { grid-template-columns: 1fr; }
  .rating-criterion { grid-template-columns: 1fr 80px 80px 36px; }
  .brand-review-notice { align-items: flex-start; flex-direction: column; }
  .brand-review-notice span { text-align: left; }
}

@media (max-width: 520px) {
  .rating-criterion { grid-template-columns: minmax(0,1fr) 36px; }
  .rating-criterion input:nth-child(2), .rating-criterion input:nth-child(3) { grid-row: 2; }
  .rating-criterion .admin-link-danger { grid-column: 2; grid-row: 1; }
}
