:root {
  --ink: #102c32;
  --muted: #60767a;
  --line: #dce8e7;
  --paper: #ffffff;
  --canvas: #f3f7f6;
  --teal-950: #062f37;
  --teal-900: #083f49;
  --teal-800: #0a525d;
  --teal-700: #0d6770;
  --teal-600: #13818a;
  --teal-100: #dff3f0;
  --teal-50: #eef9f7;
  --orange: #f26f3b;
  --orange-dark: #d64f22;
  --orange-soft: #fff0e9;
  --warning: #b74a20;
  --warning-bg: #fff4e5;
  --success: #17805e;
  --danger: #c43d3d;
  --shadow-sm: 0 1px 2px rgba(8, 63, 73, 0.08), 0 8px 22px rgba(8, 63, 73, 0.05);
  --shadow-lg: 0 28px 80px rgba(4, 37, 43, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img,
video {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(242, 111, 59, 0.35);
  outline-offset: 3px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--teal-950);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: var(--orange);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 18px rgba(242, 111, 59, 0.24);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.brand--light,
.brand--light small {
  color: #fff;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 17px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.button--primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 20px rgba(242, 111, 59, 0.2);
}

.button--primary:hover {
  background: var(--orange-dark);
}

.button--secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--teal-900);
}

.button--secondary:hover,
.button--ghost:hover {
  border-color: #bdd2d0;
  background: var(--teal-50);
}

.button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--teal-800);
}

.button--compact {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 15px;
}

.button--full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--teal-900);
  font-size: 21px;
  line-height: 1;
}

.eyebrow {
  display: block;
  color: var(--teal-700);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow--warning {
  color: var(--warning);
}

.eyebrow--on-dark {
  color: #91d9d3;
}

.loader {
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 3px solid #d6e9e7;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #36b888;
  box-shadow: 0 0 0 4px rgba(54, 184, 136, 0.1);
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: #344f54;
  font-size: 15px;
  font-weight: 750;
}

.field small {
  color: #73878a;
  font-size: 14px;
  line-height: 1.5;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #d7e3e2;
  border-radius: 10px;
  background: #fff;
  padding: 11px 13px;
  outline: 0;
  transition: border 160ms ease, box-shadow 160ms ease;
}

.field input {
  min-height: 45px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(19, 129, 138, 0.1);
}

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

.form-error {
  margin: 0;
  border-radius: 8px;
  background: #fff0f0;
  color: #ad2e2e;
  padding: 9px 11px;
  font-size: 15px;
}

/* Customer manual */

.manual-body {
  min-width: 320px;
  background:
    radial-gradient(circle at 90% 2%, rgba(29, 151, 154, 0.11), transparent 25rem),
    var(--canvas);
}

.manual-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 80px rgba(6, 47, 55, 0.08);
}

.manual-topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}

.secure-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.state-card {
  display: grid;
  min-height: 52vh;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
}

.state-card h1,
.state-card p {
  margin: 0;
}

.state-card h1 {
  font-size: 24px;
}

.state-card p {
  max-width: 480px;
  color: var(--muted);
}

.state-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--warning);
  font-size: 25px;
  font-weight: 900;
}

.product-hero {
  position: relative;
  overflow: hidden;
  background: var(--teal-950);
  color: #fff;
  padding: 38px 22px 32px;
}

.product-hero::after {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -95px;
  bottom: -125px;
  border: 36px solid rgba(108, 211, 202, 0.1);
  border-radius: 50%;
  content: "";
}

.product-hero > * {
  position: relative;
  z-index: 1;
}

.product-hero .eyebrow {
  color: #94dcd7;
}

.product-hero h1 {
  margin: 9px 0 18px;
  font-size: clamp(30px, 8vw, 45px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.variant-picker {
  display: grid;
  gap: 10px;
  max-width: 580px;
  margin-bottom: 16px;
}

.variant-picker > strong {
  color: #d9e9e7;
  font-size: 15px;
}

.variant-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.variant-option {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  color: #e8f2f1;
  padding: 8px 6px;
  font-size: 16px;
  font-weight: 800;
}

.variant-option:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.variant-option.is-active {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
  box-shadow: 0 7px 18px rgba(242, 111, 59, 0.24);
}

.model-confirmation {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.09);
  padding: 9px 11px 9px 14px;
}

.model-confirmation span {
  color: #b7d8d6;
  font-size: 14px;
}

.model-confirmation strong {
  border-radius: 8px;
  background: var(--orange);
  padding: 5px 12px;
  font-size: 18px;
}

.product-hero > p {
  max-width: 560px;
  margin: 19px 0 0;
  color: #c6dddb;
  font-size: 16px;
}

.update-line {
  margin-top: 18px;
  color: #87aeac;
  font-size: 13px;
}

.manual-section {
  border-bottom: 1px solid var(--line);
  padding: 31px 20px 34px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 21px;
}

.section-heading h2 {
  margin: 3px 0 0;
  color: var(--teal-950);
  font-size: 23px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-number {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 14px;
  font-weight: 900;
}

.section-number--warning {
  background: #ffe1cb;
  color: var(--warning);
  font-size: 20px;
}

.safety-card {
  border-bottom-color: #f2ddc5;
  background: var(--warning-bg);
}

.safety-card .prose {
  margin: 0;
  border-left: 3px solid var(--orange);
  padding-left: 14px;
  color: #684d3c;
  white-space: pre-wrap;
}

.video-list {
  display: grid;
  gap: 18px;
}

.content-block-list {
  display: grid;
  gap: 20px;
}

.content-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.content-block__header {
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.content-block__index {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-950);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.content-block__header h3 {
  margin: 0;
  color: var(--teal-950);
  font-size: 18px;
  line-height: 1.35;
}

.content-block__media-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.manual-media {
  overflow: hidden;
  border-radius: 13px;
  background: #e9f1f0;
}

.manual-media video,
.manual-media img,
.media-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.manual-media video {
  background: #031b20;
}

.media-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 15%, rgba(121, 215, 207, 0.17), transparent 35%),
    linear-gradient(145deg, #0a4d57, #062f37);
  color: #fff;
  text-align: center;
}

.media-placeholder--image {
  background:
    linear-gradient(135deg, transparent 60%, rgba(242, 111, 59, 0.16) 60%),
    linear-gradient(145deg, #e6f1ef, #cfe1df);
  color: var(--teal-900);
}

.media-placeholder__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 17px;
}

.media-placeholder--image .media-placeholder__icon {
  border-color: rgba(8, 63, 73, 0.14);
  background: rgba(255, 255, 255, 0.55);
}

.media-placeholder strong {
  font-size: 15px;
}

.media-placeholder small {
  color: #9fc4c1;
  font-size: 13px;
}

.media-placeholder--image small {
  color: var(--muted);
}

.content-block__description {
  margin: 0;
  border-top: 1px solid var(--line);
  background: #f8fbfa;
  padding: 17px 16px 19px;
  color: #526a6e;
  white-space: pre-wrap;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #041b20;
}

.video-card__copy {
  padding: 15px 16px 16px;
}

.video-card__copy strong,
.video-card__copy small {
  display: block;
}

.video-card__copy strong {
  color: var(--teal-950);
  font-size: 17px;
}

.video-card__copy small {
  margin-top: 3px;
  color: var(--muted);
}

.video-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--teal-50);
  padding: 17px;
}

.video-link-card strong,
.video-link-card small {
  display: block;
}

.video-link-card small {
  color: var(--muted);
}

.empty-content {
  display: grid;
  min-height: 138px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed #bed2d0;
  border-radius: var(--radius-md);
  background: #f8fbfa;
  padding: 26px;
  text-align: center;
}

.empty-content strong {
  color: var(--teal-900);
}

.empty-content p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.instruction-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instruction-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.instruction-item img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: var(--canvas);
}

.instruction-item__body {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 13px;
  padding: 18px 16px 20px;
}

.instruction-item__number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-950);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.instruction-item h3 {
  margin: 1px 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.instruction-item p {
  margin: 0;
  color: #526a6e;
  white-space: pre-wrap;
}

.support-card {
  margin: 28px 20px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #0a515b, #062f37);
  color: #fff;
  padding: 27px 22px;
  box-shadow: var(--shadow-lg);
}

.support-kicker {
  color: #8ed7d1;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.support-card h2 {
  margin: 7px 0;
  font-size: 23px;
  line-height: 1.25;
}

.support-card p {
  margin: 0;
  color: #bdd7d5;
}

.support-actions {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.support-actions a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  color: var(--teal-900);
  font-weight: 800;
  text-decoration: none;
}

.support-model {
  margin-top: 17px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 15px;
  font-size: 14px;
}

.manual-footer {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.manual-footer strong {
  color: var(--teal-900);
  letter-spacing: 0.12em;
}

/* Admin auth */

.admin-body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  background: var(--teal-950);
}

.auth-shell:has(.auth-card--loading) {
  place-items: center;
}

.auth-intro {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: space-between;
  gap: 42px;
  background:
    radial-gradient(circle at 85% 20%, rgba(74, 203, 194, 0.16), transparent 18rem),
    linear-gradient(145deg, #073943, #062c33);
  color: #fff;
  padding: 32px 24px 38px;
}

.auth-intro h1 {
  max-width: 620px;
  margin: 14px 0 15px;
  font-size: clamp(34px, 7vw, 60px);
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.auth-intro p {
  max-width: 580px;
  margin: 0;
  color: #b6d1cf;
  font-size: 17px;
}

.auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-feature-list span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 11px;
  color: #d1e4e2;
  font-size: 13px;
}

.auth-card {
  align-self: center;
  width: min(100% - 32px, 460px);
  margin: 32px auto;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 29px 24px;
  box-shadow: var(--shadow-lg);
}

.auth-card--loading {
  display: grid;
  place-items: center;
  gap: 10px;
  color: #fff;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.auth-card--loading h1,
.auth-card--loading p {
  margin: 0;
}

.auth-card--loading p {
  color: #acd0cd;
}

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

.auth-heading {
  margin-bottom: 5px;
}

.auth-heading h2 {
  margin: 7px 0 4px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Admin app */

.admin-app {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: min(86vw, 300px);
  flex-direction: column;
  overflow-y: auto;
  background: var(--teal-950);
  color: #fff;
  padding: 24px 17px;
  transform: translateX(-101%);
  transition: transform 220ms ease;
}

.admin-app.sidebar-open .admin-sidebar {
  transform: translateX(0);
}

.sidebar-backdrop {
  position: fixed;
  z-index: 25;
  inset: 0;
  border: 0;
  background: rgba(3, 28, 33, 0.58);
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-close {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 34px 6px 11px;
}

.sidebar-heading span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.sidebar-heading small {
  color: #719a9a;
  font-size: 12px;
}

.product-nav {
  display: grid;
  gap: 10px;
}

.product-nav-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
}

.product-nav-group__header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 4px 5px 8px;
}

.product-nav-group__header > span:last-child {
  min-width: 0;
}

.product-nav-group__header strong,
.product-nav-group__header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-nav-group__header strong {
  font-size: 14px;
}

.product-nav-group__header small {
  color: #779c9a;
  font-size: 12px;
}

.product-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: rgba(115, 210, 201, 0.11);
  color: #94d6d1;
  font-size: 12px;
  font-weight: 900;
}

.variant-nav-list {
  display: grid;
  gap: 4px;
}

.product-nav-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #fff;
  padding: 10px;
  text-align: left;
}

.sidebar-add-product {
  width: 100%;
  margin-top: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  background: transparent;
  color: #8fc1be;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 750;
}

.sidebar-add-product:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.product-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.product-nav-item.is-active {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
}

.product-size {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: rgba(119, 210, 203, 0.13);
  color: #a7e0dc;
  font-size: 13px;
  font-weight: 900;
}

.product-nav-item.is-active .product-size {
  background: var(--orange);
  color: #fff;
}

.product-nav-copy strong,
.product-nav-copy small {
  display: block;
}

.product-nav-copy strong {
  font-size: 15px;
}

.product-nav-copy small {
  margin-top: 2px;
  color: #8eb0ae;
  font-size: 12px;
}

.product-nav-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6e8989;
}

.product-nav-status.is-live {
  background: #4bc18f;
  box-shadow: 0 0 0 4px rgba(75, 193, 143, 0.1);
}

.sidebar-tip {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px;
}

.sidebar-tip strong {
  color: #9fe0db;
  font-size: 14px;
}

.sidebar-tip p {
  margin: 5px 0 0;
  color: #88a9a7;
  font-size: 13px;
  line-height: 1.55;
}

.sidebar-logout {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #8eafad;
  padding: 9px;
  font-size: 14px;
  text-align: left;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 13px 16px;
  backdrop-filter: blur(14px);
}

.admin-topbar__left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.admin-topbar h1 {
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.save-state {
  display: none;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.save-state.is-dirty .status-dot {
  background: #f2a13b;
  box-shadow: 0 0 0 4px rgba(242, 161, 59, 0.1);
}

.save-state.is-saving .status-dot {
  background: var(--teal-600);
  animation: pulse 900ms ease infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.topbar-actions .button--secondary,
.topbar-actions .button--primary {
  display: none;
}

.editor-content,
.editor-state {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.editor-state {
  display: grid;
  min-height: 55vh;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  padding: 50px 20px;
  text-align: center;
}

.editor-state p {
  margin: 0;
}

.editor-state--error strong {
  color: var(--ink);
  font-size: 18px;
}

.editor-grid {
  display: grid;
  gap: 18px;
  padding: 18px 13px 44px;
}

.editor-primary,
.editor-aside {
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 19px 16px;
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #edf2f1;
  padding-bottom: 16px;
}

.panel-heading--action {
  align-items: center;
}

.panel-heading h2,
.panel h2 {
  margin: 2px 0 3px;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.panel-heading p,
.panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-index {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.publish-toggle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.publish-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.publish-toggle span {
  position: relative;
  width: 36px;
  height: 21px;
  border-radius: 999px;
  background: #c9d5d4;
  transition: background 160ms ease;
}

.publish-toggle span::after {
  position: absolute;
  width: 15px;
  height: 15px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  content: "";
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease;
}

.publish-toggle input:checked + span {
  background: var(--success);
}

.publish-toggle input:checked + span::after {
  transform: translateX(15px);
}

.publish-toggle b {
  font-size: 13px;
  white-space: nowrap;
}

.panel .field + .field,
.panel .form-grid + .field {
  margin-top: 16px;
}

.admin-video-list,
.step-editor-list,
.block-editor-list {
  display: grid;
  gap: 11px;
}

.block-editor-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfc;
  padding: 14px;
}

.block-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e7efee;
  padding-bottom: 12px;
}

.media-editor-area {
  display: grid;
  gap: 10px;
  border-radius: 11px;
  background: #eef5f4;
  padding: 12px;
}

.media-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.media-editor-heading > span {
  color: #3c585c;
  font-size: 14px;
  font-weight: 750;
}

.media-editor-heading > div {
  display: flex;
  gap: 5px;
}

.media-editor-heading button {
  border: 1px solid #c9dcda;
  border-radius: 8px;
  background: #fff;
  color: var(--teal-800);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 750;
}

.media-editor-list {
  display: grid;
  gap: 7px;
}

.media-editor-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid #d7e4e2;
  border-radius: 10px;
  background: #fff;
  padding: 9px;
}

.media-type-badge {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-950);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.media-type-badge.is-image {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.media-storage-state {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-editor-item .item-actions {
  grid-column: 2;
  flex-wrap: wrap;
}

.media-editor-empty {
  border: 1px dashed #b8cfcc;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.5);
  padding: 13px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.admin-video-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.video-thumb {
  display: grid;
  width: 52px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-950);
  color: #fff;
  font-size: 14px;
}

.video-item-copy {
  min-width: 0;
  align-self: center;
}

.video-item-copy strong,
.video-item-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-item-copy strong {
  font-size: 15px;
}

.video-item-copy small {
  color: var(--muted);
  font-size: 13px;
}

.admin-video-item .item-actions {
  grid-column: 2;
  justify-self: start;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-actions button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--teal-700);
  padding: 5px 7px;
  font-size: 13px;
}

.item-actions button:hover {
  background: var(--teal-50);
}

.item-actions .danger-link {
  color: var(--danger);
}

.subpanel {
  margin-top: 14px;
  border: 1px solid #cfe0df;
  border-radius: 13px;
  background: #f8fbfa;
  padding: 16px;
}

.subpanel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.subpanel-heading h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 15px 0;
  border-radius: 10px;
  background: #e9f0ef;
  padding: 3px;
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.segmented-control button.is-active {
  background: #fff;
  color: var(--teal-900);
  box-shadow: 0 2px 8px rgba(6, 47, 55, 0.08);
}

.upload-dropzone {
  display: grid;
  place-items: center;
  border: 1px dashed #aac7c4;
  border-radius: 12px;
  background: #fff;
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.upload-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 7px;
  border-radius: 10px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-weight: 900;
}

.upload-dropzone strong,
.upload-dropzone small,
.upload-dropzone b {
  display: block;
}

.upload-dropzone strong {
  font-size: 15px;
}

.upload-dropzone small {
  color: var(--muted);
  font-size: 13px;
}

.upload-dropzone b {
  margin-top: 7px;
  color: var(--orange-dark);
  font-size: 13px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 17px;
}

.step-editor-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  padding: 13px;
}

.step-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.step-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-title-row strong {
  font-size: 14px;
}

.step-badge {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-950);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.qr-panel {
  text-align: center;
}

.qr-panel .eyebrow {
  margin-bottom: 3px;
}

.qr-preview {
  display: grid;
  width: min(100%, 230px);
  aspect-ratio: 1;
  place-items: center;
  margin: 18px auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(45deg, #edf4f3 25%, transparent 25%),
    linear-gradient(-45deg, #edf4f3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf4f3 75%),
    linear-gradient(-45deg, transparent 75%, #edf4f3 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  padding: 15px;
}

.qr-preview img {
  width: 100%;
  min-height: 100%;
  border-radius: 5px;
  background: #fff;
  object-fit: contain;
}

.qr-placeholder {
  display: grid;
  width: 100%;
  min-height: 100%;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 7px;
  background: #fff;
  color: var(--teal-950);
}

.qr-placeholder > span {
  width: 92px;
  height: 92px;
  margin-bottom: 7px;
  border: 12px dotted var(--teal-950);
  background:
    linear-gradient(90deg, var(--teal-950) 50%, transparent 50%),
    linear-gradient(var(--teal-950) 50%, transparent 50%);
  background-size: 12px 12px;
}

.qr-placeholder strong {
  font-size: 14px;
}

.qr-placeholder small {
  color: var(--muted);
  font-size: 12px;
}

.qr-panel > p {
  margin-bottom: 16px;
}

.qr-panel .button + .button {
  margin-top: 8px;
}

.mini-guide ul {
  display: grid;
  gap: 12px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.mini-guide li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4f676b;
  font-size: 14px;
}

.mini-guide li span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 12px;
  font-weight: 900;
}

.mobile-save-bar {
  position: sticky;
  z-index: 10;
  bottom: 0;
  background: rgba(243, 247, 246, 0.94);
  padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
}

.toast-region {
  position: fixed;
  z-index: 100;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.modal-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.native-modal {
  position: fixed;
  inset: 0;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 18px;
  overflow: visible;
  color: inherit;
}

.native-modal[open] {
  display: grid;
  place-items: center;
}

.native-modal::backdrop {
  background: rgba(3, 26, 31, 0.68);
  backdrop-filter: blur(4px);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 26, 31, 0.68);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal-card h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

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

.toast {
  display: flex;
  width: min(88vw, 340px);
  align-items: center;
  gap: 10px;
  border: 1px solid #cde0de;
  border-radius: 12px;
  background: #fff;
  padding: 11px 13px;
  color: var(--ink);
  box-shadow: 0 15px 45px rgba(4, 37, 43, 0.16);
  font-size: 14px;
  animation: toast-in 200ms ease both;
}

.toast::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  content: "";
}

.toast.is-error::before {
  background: var(--danger);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
}

@media (min-width: 640px) {
  .manual-topbar { padding-inline: 34px; }
  .product-hero { padding: 52px 38px 42px; }
  .manual-section { padding: 38px; }
  .support-card { margin: 34px 38px 44px; padding: 32px; }
  .support-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-footer { padding-inline: 38px; }

  .auth-card { padding: 36px; }
  .form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-video-item { grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; }
  .video-thumb { width: 62px; }
  .admin-video-item .item-actions { grid-column: auto; justify-self: end; }
  .media-editor-item { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .media-editor-item .item-actions { grid-column: auto; justify-self: end; }
  .editor-grid { padding: 26px 22px 54px; }
  .panel { padding: 23px; }
  .save-state { display: inline-flex; }
  .topbar-actions .button--secondary { display: inline-flex; }
}

@media (min-width: 880px) {
  .auth-shell { grid-template-columns: minmax(0, 1.35fr) minmax(400px, 0.65fr); }
  .auth-intro { min-height: 100vh; padding: 48px clamp(42px, 6vw, 90px); }
  .auth-card { margin: auto; }

  .admin-app { padding-left: 270px; }
  .admin-sidebar { width: 270px; transform: none; }
  .sidebar-close, .mobile-menu, .sidebar-backdrop { display: none !important; }
  .admin-topbar { padding: 15px 28px; }
  .admin-topbar h1 { font-size: 20px; }
  .topbar-actions .button--primary { display: inline-flex; }
  .editor-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; padding: 28px; }
  .editor-aside { position: sticky; top: 106px; }
  .mobile-save-bar { display: none; }
}

@media (min-width: 1180px) {
  .admin-app { padding-left: 288px; }
  .admin-sidebar { width: 288px; padding-inline: 20px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 32px; }
  .panel { padding: 26px; }
}

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