/*
 * UCHIHA Builder interface system — v2
 * A lightweight, original UI layer shared by the platform, merchant dashboard,
 * storefront and operational tools. It intentionally builds on the existing
 * functional CSS so older states remain usable while the visual system evolves.
 */

:root {
  color-scheme: light;
  --ink: #17151f;
  --muted: #6e6b79;
  --line: #e4e2ea;
  --border: var(--line);
  --line-strong: #d6d2dd;
  --surface: #ffffff;
  --surface-strong: #f0eef5;
  --canvas: #f8f7fb;
  --brand: #6654d9;
  --brand-deep: #4c3ab4;
  --brand-soft: #efedff;
  --accent: #d74768;
  --accent-soft: #fff0f3;
  --danger: #c6314d;
  --success: #118a74;
  --warning: #a96511;
  --focus: #7d6ce4;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 70px rgba(32, 26, 48, 0.09);
  --shadow-soft: 0 10px 30px rgba(32, 26, 48, 0.055);
  font-family: "Tajawal", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f3f8;
  --muted: #a8a4b2;
  --line: #2a2933;
  --border: var(--line);
  --line-strong: #393641;
  --surface: #15151d;
  --surface-strong: #1d1c27;
  --canvas: #0b0c12;
  --brand: #9a87ff;
  --brand-deep: #7a65eb;
  --brand-soft: #24203d;
  --accent: #ff6078;
  --accent-soft: #321a24;
  --danger: #ff7187;
  --success: #45c7aa;
  --warning: #f2b95e;
  --focus: #b3a5ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 38px rgba(0, 0, 0, 0.22);
}

html {
  background: var(--canvas);
  scroll-padding-top: 92px;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% -8%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 26rem),
    radial-gradient(circle at 6% 18%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 24rem),
    var(--canvas);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: var(--brand);
}

button,
input,
select,
textarea {
  min-width: 0;
}

button,
a,
summary,
input,
select,
textarea {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 34%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 1000;
  padding: 10px 15px;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  background: transparent;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 22%, transparent);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand > span:last-child {
  align-items: center;
  gap: 7px;
}

.brand b {
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.brand small {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  font-size: 12px;
  font-weight: 750;
}

.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.theme-toggle::before {
  content: "☾";
  font-size: 18px;
  line-height: 1;
}

.theme-toggle[data-current-theme="dark"]::before {
  content: "☀";
}

.theme-toggle [data-theme-label] {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.button,
.store-button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 68%, var(--accent)));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 23%, transparent);
  font-size: 14px;
  font-weight: 850;
}

.button:hover,
.store-button:hover {
  background: linear-gradient(135deg, var(--brand-deep), color-mix(in srgb, var(--brand-deep) 65%, var(--accent)));
  box-shadow: 0 15px 32px color-mix(in srgb, var(--brand) 27%, transparent);
}

.button-secondary,
.store-button-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-soft);
}

.button-secondary:hover,
.store-button-secondary:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.button-compact {
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
}

.eyebrow,
.store-eyebrow {
  min-height: 28px;
  gap: 9px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.eyebrow::before {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
}

.notice {
  padding: 14px 16px;
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 14px;
  color: color-mix(in srgb, var(--brand) 65%, var(--ink));
  background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface));
  font-size: 14px;
  line-height: 1.65;
}

.notice.error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.notice.success {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 28%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

/* Platform landing */

body[data-page="builder"] .topbar {
  width: min(1240px, calc(100% - 40px));
  min-height: 82px;
  margin-top: 10px;
  padding: 0 14px 0 10px;
  position: sticky;
  top: 10px;
  z-index: 50;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  box-shadow: 0 12px 38px rgba(25, 20, 37, 0.06);
  backdrop-filter: blur(18px) saturate(145%);
}

body[data-page="builder"] .topbar nav {
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

body[data-page="builder"] .topbar nav > a:not(.button) {
  min-height: 42px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
}

body[data-page="builder"] .topbar nav > a:not(.button):hover {
  color: var(--ink);
  background: var(--surface-strong);
}

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

body[data-page="builder"] .hero {
  width: min(1240px, calc(100% - 40px));
  min-height: 690px;
  margin: 22px auto 80px;
  padding: clamp(30px, 5vw, 68px);
  position: relative;
  isolation: isolate;
  grid-template-columns: 1.03fr 0.97fr;
  gap: clamp(40px, 6vw, 86px);
  overflow: hidden;
  border: 1px solid #2d2938;
  border-radius: 36px;
  color: #f8f6fb;
  background:
    radial-gradient(circle at 76% 22%, rgba(112, 82, 219, 0.25), transparent 23rem),
    radial-gradient(circle at 13% 88%, rgba(216, 67, 102, 0.15), transparent 22rem),
    linear-gradient(135deg, #11121a 0%, #17141f 46%, #0d1018 100%);
  box-shadow: 0 38px 100px rgba(20, 16, 31, 0.19);
}

body[data-page="builder"] .hero::before,
body[data-page="builder"] .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

body[data-page="builder"] .hero::before {
  width: 490px;
  height: 490px;
  inset-block-start: -265px;
  inset-inline-start: -170px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow:
    0 0 0 54px rgba(255, 255, 255, 0.022),
    0 0 0 110px rgba(255, 255, 255, 0.012);
}

body[data-page="builder"] .hero::after {
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent, #000 52%, transparent);
}

body[data-page="builder"] .hero .eyebrow {
  color: #ff8799;
}

body[data-page="builder"] .hero h1 {
  max-width: 650px;
  margin: 18px 0 22px;
  color: #faf9fc;
  font-size: clamp(42px, 5.5vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

body[data-page="builder"] .hero-copy > p {
  max-width: 620px;
  color: #b8b4c2;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.85;
}

body[data-page="builder"] .hero .button-secondary {
  color: #f7f4fa;
  border-color: #363341;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
}

.trust-row {
  margin-top: 34px;
  gap: 9px 18px;
  color: #aaa5b3;
  font-size: 13px;
}

.trust-row span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}

.trust-row span::before {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 4px rgba(67, 210, 175, 0.1);
  background: #43d2af;
}

.hero-product {
  min-height: 470px;
  isolation: isolate;
}

.hero-product::before {
  content: "";
  width: 370px;
  height: 370px;
  position: absolute;
  inset-block-start: 46px;
  inset-inline-start: 50%;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(109, 85, 218, 0.045),
    0 0 0 78px rgba(215, 71, 104, 0.025);
  transform: translateX(-50%);
}

.mock-window {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 25px;
  background: rgba(244, 242, 248, 0.96);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
}

.mock-window-head {
  min-height: 45px;
  color: #3e3948;
  background: #fbfafe;
}

.mock-window-head i {
  background: #cec9d6;
}

.mock-layout aside {
  width: 88px;
  background: #12131c;
}

.mock-layout aside span:first-child {
  background: linear-gradient(90deg, #795fe7, #d74768);
}

.mock-main {
  padding: 24px;
  background: #f7f6fa;
}

.mock-stat-row div {
  border: 1px solid #e1dee7;
  border-radius: 12px;
  background: #fff;
}

.mock-chart {
  border: 1px solid #e5e2e9;
  border-radius: 16px;
  background:
    linear-gradient(180deg, transparent 64%, rgba(103, 84, 217, 0.06) 64%),
    linear-gradient(135deg, transparent 48%, #725be0 49% 51%, transparent 52%),
    #fff;
}

.channel-card {
  min-height: 52px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #faf8fd;
  background: rgba(22, 20, 30, 0.9);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
}

.channel-card::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ad8b4;
  box-shadow: 0 0 0 4px rgba(74, 216, 180, 0.1);
}

.channel-store {
  inset-block-start: 12px;
  inset-inline-end: -12px;
}

.channel-bot {
  inset-block-end: 44px;
  inset-inline-start: -16px;
}

.channel-admin {
  inset-block-end: -4px;
  inset-inline-end: 30px;
}

.section {
  width: min(1160px, calc(100% - 40px));
  margin-top: 110px;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  margin: 12px 0 12px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.section-heading p {
  color: var(--muted);
  font-size: 16px;
}

.feature-grid {
  gap: 14px;
}

.feature-grid article {
  min-height: 245px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feature-grid article::after {
  content: "";
  width: 100px;
  height: 100px;
  position: absolute;
  inset-block-end: -64px;
  inset-inline-start: -40px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: 50%;
}

.feature-grid article > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 13px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
}

.feature-grid h3 {
  margin: 38px 0 10px;
  font-size: 19px;
}

.feature-grid p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.template-strip {
  gap: 18px;
}

.template-card {
  padding: 10px 10px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.template-card > div {
  height: 240px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border-radius: 17px;
}

.template-card b,
.template-card small {
  padding-inline: 8px;
}

.template-card b {
  font-size: 16px;
}

.template-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.template-professional-dark > div {
  background:
    linear-gradient(90deg, transparent 31%, rgba(255, 255, 255, 0.06) 31% 32%, transparent 32%),
    radial-gradient(circle at 72% 35%, #7d69ed 0 5%, transparent 5.5%),
    linear-gradient(145deg, #171923, #0e1017);
}

.template-professional-dark > div::before {
  content: "";
  width: 55%;
  height: 72%;
  position: absolute;
  inset-block-start: 14%;
  inset-inline-end: 9%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(#795fe7 0 0) 88% 14% / 34% 8% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.12) 0 0) 88% 31% / 70% 5% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.08) 0 0) 88% 45% / 54% 5% no-repeat,
    rgba(255, 255, 255, 0.035);
}

.template-modern-light > div {
  background:
    linear-gradient(#6455d9 0 0) 78% 15% / 18% 7% no-repeat,
    linear-gradient(#ece9f4 0 0) 78% 30% / 52% 5% no-repeat,
    linear-gradient(#ece9f4 0 0) 78% 42% / 42% 5% no-repeat,
    linear-gradient(135deg, #fff, #f0eef7);
}

.template-modern-light > div::before,
.template-modern-light > div::after {
  content: "";
  position: absolute;
  inset-block-end: 13%;
  border: 1px solid #e3dfeb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 25px rgba(37, 31, 51, 0.06);
}

.template-modern-light > div::before {
  width: 36%;
  height: 35%;
  inset-inline-end: 9%;
}

.template-modern-light > div::after {
  width: 36%;
  height: 35%;
  inset-inline-start: 9%;
}

.template-gaming > div {
  clip-path: polygon(0 0, 100% 0, 100% 86%, 92% 100%, 0 100%);
  background:
    radial-gradient(circle at 20% 24%, rgba(231, 69, 101, 0.32), transparent 28%),
    linear-gradient(125deg, transparent 45%, rgba(135, 93, 255, 0.8) 46% 48%, transparent 49%),
    #0d0e14;
}

.template-gaming > div::before {
  content: "";
  width: 58%;
  height: 56%;
  position: absolute;
  inset-block-start: 22%;
  inset-inline-end: 20%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  background:
    linear-gradient(#ff5e78 0 0) 84% 18% / 46% 8% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.11) 0 0) 84% 36% / 64% 6% no-repeat,
    rgba(255, 255, 255, 0.035);
}

.builder-shell {
  width: min(1160px, calc(100% - 40px));
  margin-top: 110px;
  border-color: var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.builder-intro {
  padding: 48px 38px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 20% 8%, rgba(215, 71, 104, 0.22), transparent 13rem),
    linear-gradient(155deg, #171621, #0e1119);
}

.builder-intro::after {
  content: "";
  width: 260px;
  height: 260px;
  position: absolute;
  inset-block-end: -150px;
  inset-inline-start: -90px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(255, 255, 255, 0.025);
}

.builder-intro h2 {
  font-size: 34px;
  line-height: 1.25;
}

.builder-intro p {
  color: #b4afbd;
  font-size: 14px;
}

.progress-list li {
  min-height: 38px;
  font-size: 14px;
}

.progress-list span {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.progress-list li.active span {
  border-color: var(--brand);
  background: linear-gradient(135deg, #7b62e6, #d84a6d);
}

.progress-list li.done span {
  border-color: var(--success);
  background: var(--success);
}

.builder-panel {
  padding: clamp(26px, 4vw, 52px);
  background: var(--surface);
}

.link-box {
  border-color: var(--line);
  background: var(--surface-strong);
}

.link-box span {
  font-size: 12px;
}

body[data-page="builder"] footer {
  width: min(1160px, calc(100% - 40px));
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  gap: 6px;
  border-bottom-color: var(--line);
}

.tab {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 11px 11px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tab.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.form-grid {
  gap: 18px;
}

.field {
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
}

.field input,
.field select,
.field textarea,
.order-dialog input,
.order-dialog select,
.order-dialog textarea {
  min-height: 48px;
  padding: 11px 14px;
  border-color: var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--surface);
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.order-dialog input:focus,
.order-dialog select:focus,
.order-dialog textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}

.field small,
.field-help,
.form-hint {
  min-height: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.input-suffix {
  border-color: var(--line);
  border-radius: 13px;
  background: var(--surface-strong);
}

.input-suffix span {
  color: var(--muted);
  font-size: 12px;
}

.form-details {
  border-color: var(--line);
  border-radius: 15px;
  background: var(--surface-strong);
}

.form-details summary {
  min-height: 48px;
  padding: 13px 16px;
  color: var(--ink);
  font-size: 14px;
}

.live-preview {
  min-height: 470px;
  border: 7px solid #13151d;
  border-radius: 33px;
  box-shadow: 0 30px 70px rgba(18, 16, 27, 0.23);
}

.live-preview[data-template="professional-dark"] .preview-cover {
  background:
    radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.25) 0 7%, transparent 8%),
    linear-gradient(135deg, var(--preview-secondary), var(--preview-primary));
}

.live-preview[data-template="modern-light"] .preview-cover {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--preview-primary) 18%, #fff), #fff);
}

.live-preview[data-template="gaming-digital"] .preview-cover {
  clip-path: polygon(0 0, 100% 0, 100% 84%, 88% 100%, 0 100%);
  background:
    linear-gradient(120deg, transparent 46%, rgba(255, 255, 255, 0.15) 47% 49%, transparent 50%),
    linear-gradient(135deg, var(--preview-secondary), var(--preview-primary));
}

/* Merchant dashboard */

body[data-page="admin"],
body[data-page="product-intelligence"] {
  background:
    radial-gradient(circle at 90% -4%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 25rem),
    var(--canvas);
}

.dashboard-shell {
  min-height: 100vh;
  grid-template-columns: 274px minmax(0, 1fr);
  background: transparent;
}

.dashboard-sidebar {
  min-height: calc(100vh - 24px);
  margin: 12px;
  padding: 20px 14px;
  position: sticky;
  top: 12px;
  align-self: start;
  overflow: hidden;
  border: 1px solid #282630;
  border-radius: 24px;
  color: #f5f3f8;
  background:
    radial-gradient(circle at 22% 8%, rgba(216, 68, 104, 0.18), transparent 11rem),
    linear-gradient(165deg, #171720, #0f1118);
  box-shadow: 0 26px 70px rgba(11, 10, 16, 0.25);
}

.dashboard-sidebar::after {
  content: "";
  width: 240px;
  height: 240px;
  position: absolute;
  inset-block-end: -150px;
  inset-inline-start: -120px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.brand-dashboard {
  min-height: 58px;
  padding: 0 8px 16px;
  border-bottom: 1px solid #292833;
}

.brand-dashboard b {
  color: #fff;
}

.brand-dashboard small {
  color: #bbb6c4;
  border-color: #363440;
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-sidebar nav {
  margin-top: 18px;
  gap: 5px;
}

.nav-item {
  min-height: 47px;
  padding: 0 13px;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #aaa6b4;
  font-size: 13px;
  font-weight: 750;
}

.nav-item:hover {
  color: #fff;
  border-color: #2f2d39;
  background: rgba(255, 255, 255, 0.045);
}

.nav-item.active {
  color: #fff;
  border-color: rgba(155, 130, 255, 0.28);
  background: linear-gradient(90deg, rgba(112, 87, 219, 0.24), rgba(216, 69, 103, 0.08));
  box-shadow: inset -3px 0 #9a83ff;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-exit {
  min-height: 46px;
  margin-top: auto;
  padding: 0 13px;
  border: 1px solid #302e3a;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b6b2bd;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 750;
}

.dashboard-main {
  width: min(100%, 1500px);
  padding: 28px clamp(18px, 3vw, 38px) 70px;
}

.dashboard-header {
  min-height: 94px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.dashboard-header h1 {
  margin-top: 3px;
  font-size: clamp(22px, 3vw, 34px);
}

.dashboard-actions {
  gap: 8px;
}

.status-badge {
  min-height: 40px;
  padding: 0 13px;
  border-color: var(--line);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  font-size: 12px;
}

.status-badge.active {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 25%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

.status-badge.error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 25%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.stat-grid {
  gap: 13px;
}

.stat-grid article {
  min-height: 146px;
  padding: 21px;
  position: relative;
  overflow: hidden;
  border-color: var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-grid article::after {
  content: "";
  width: 70px;
  height: 70px;
  position: absolute;
  inset-block-end: -38px;
  inset-inline-start: -23px;
  border: 1px solid color-mix(in srgb, var(--brand) 17%, transparent);
  border-radius: 50%;
}

.stat-grid span,
.stat-grid small {
  color: var(--muted);
  font-size: 13px;
}

.stat-grid strong {
  margin: 8px 0 1px;
  color: var(--ink);
  font-size: 34px;
}

.dashboard-grid {
  gap: 14px;
}

.surface-card {
  border-color: var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-heading {
  margin-bottom: 20px;
  padding: 4px 2px;
}

.panel-heading h2 {
  font-size: clamp(25px, 3.4vw, 38px);
}

.panel-heading p {
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
}

.timeline::before {
  background: var(--line);
}

.timeline li > span {
  border-color: var(--line-strong);
  background: var(--surface);
}

.timeline li.done > span {
  border-color: var(--success);
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 10%, transparent);
}

.identity-summary {
  gap: 10px;
}

.identity-summary span {
  border-color: var(--line);
  background: var(--surface-strong);
}

.design-editor-layout {
  gap: 18px;
}

.design-editor-layout .surface-card {
  padding: 22px;
}

.design-live-preview {
  min-height: 610px;
  overflow: hidden;
  border-color: #2d2b35;
  border-width: 7px;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(16, 14, 23, 0.22);
}

.design-live-preview[data-template="gaming-digital"] {
  clip-path: polygon(0 0, 100% 0, 100% 95%, 92% 100%, 0 100%);
}

.design-live-preview[data-template="modern-light"] .design-preview-hero {
  text-align: center;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--preview-primary) 12%, #fff), #fff);
}

.design-live-preview[data-template="professional-dark"] .design-preview-hero {
  background:
    radial-gradient(circle at 75% 25%, color-mix(in srgb, var(--preview-primary) 30%, transparent), transparent 10rem),
    var(--preview-secondary);
}

.product-media-library {
  gap: 9px;
}

.product-media-library button {
  min-height: 98px;
  border-color: var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface-strong);
}

.product-media-library button.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}

.catalog-search input {
  min-height: 44px;
  border-color: var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-strong);
}

.data-list {
  border-color: var(--line);
}

.catalog-product-row,
.data-row,
.connection-card {
  border-color: var(--line);
  border-radius: 15px;
  background: var(--surface-strong);
}

.service-grid {
  gap: 14px;
}

.service-grid.filter-empty::after {
  content: "لا توجد خدمات مطابقة للبحث.";
  min-height: 170px;
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
  font-size: 14px;
}

.library-toolbar {
  margin-bottom: 14px;
  padding: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.service-search {
  min-width: min(100%, 360px);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.service-search input {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-strong);
}

.service-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 11%, transparent);
}

.library-trust {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--success) 24%, var(--line));
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 7%, var(--surface));
  font-size: 11px;
  font-weight: 750;
}

.service-card {
  min-height: 285px;
  padding: 22px;
  border-color: var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.service-source {
  border-radius: 9px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 11px;
}

.service-card h3 {
  font-size: 17px;
}

.service-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.service-meta strong {
  font-size: 16px;
}

.service-meta button {
  min-height: 40px;
}

.botfather-guide code {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Storefront */

.store-loading {
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 12rem),
    var(--canvas);
}

.store-loading span {
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  border-block-start-color: var(--brand);
  border-inline-end-color: var(--accent);
}

.store-loading p {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 750;
}

.store-app {
  min-height: 100vh;
  position: relative;
  color: var(--store-text);
  background: var(--store-background);
}

.store-app::before {
  content: "";
  width: 460px;
  height: 460px;
  position: fixed;
  inset-block-start: -250px;
  inset-inline-end: -180px;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--store-primary) 12%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 54px color-mix(in srgb, var(--store-primary) 3%, transparent);
  pointer-events: none;
}

.store-header,
.store-app main,
.store-footer,
.store-mobile-nav {
  position: relative;
  z-index: 1;
}

.store-header {
  width: min(1280px, calc(100% - 32px));
  min-height: 76px;
  margin: 12px auto 0;
  padding: 0 14px;
  top: 10px;
  border: 1px solid var(--store-border);
  border-radius: calc(var(--store-radius) + 4px);
  background: color-mix(in srgb, var(--store-surface) 86%, transparent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--store-secondary) 12%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
}

.store-brand {
  gap: 11px;
}

.store-brand > span,
.store-brand > img {
  width: 45px;
  height: 45px;
  border-radius: calc(var(--store-radius) - 4px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--store-primary) 20%, transparent);
}

.store-brand b {
  font-size: 15px;
}

.store-brand small {
  color: var(--store-muted);
  font-size: 11px;
}

.store-header nav {
  gap: 4px;
}

.store-header nav a,
.store-header nav button {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--store-muted);
  font-size: 13px;
  font-weight: 780;
}

.store-header nav a:hover,
.store-header nav button:hover {
  color: var(--store-text);
  background: color-mix(in srgb, var(--store-primary) 8%, var(--store-surface));
}

.store-theme-toggle {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--store-border);
  border-radius: 12px;
  color: var(--store-text);
  background: var(--store-surface);
  box-shadow: none;
}

.store-theme-toggle [data-theme-label] {
  display: none;
}

.store-hero {
  width: min(1240px, calc(100% - 32px));
  min-height: 510px;
  margin: 34px auto 76px;
  padding: clamp(32px, 5vw, 62px);
  overflow: hidden;
  border: 1px solid var(--store-border);
  border-radius: calc(var(--store-radius) + 12px);
  background:
    radial-gradient(circle at 12% 88%, color-mix(in srgb, var(--store-primary) 11%, transparent), transparent 19rem),
    var(--store-surface);
  box-shadow: 0 28px 75px color-mix(in srgb, var(--store-secondary) 12%, transparent);
}

.store-hero-copy {
  position: relative;
  z-index: 2;
}

.store-hero h1 {
  max-width: 700px;
  margin: 14px 0;
  color: var(--store-text);
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.store-hero-copy > p {
  max-width: 640px;
  color: var(--store-muted);
  font-size: 16px;
  line-height: 1.85;
}

.store-hero-actions {
  align-items: center;
}

.store-text-link {
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  color: var(--store-primary);
  font-size: 13px;
  font-weight: 850;
}

.store-text-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.store-assurance {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  color: var(--store-muted);
  font-size: 12px;
  font-weight: 750;
}

.store-assurance span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-assurance span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--store-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--store-primary) 10%, transparent);
}

.store-cover {
  min-height: 335px;
  border: 1px solid color-mix(in srgb, var(--store-border) 78%, transparent);
  border-radius: calc(var(--store-radius) + 4px);
  background:
    radial-gradient(circle at 72% 28%, color-mix(in srgb, var(--store-primary) 42%, transparent), transparent 11rem),
    linear-gradient(145deg, var(--store-secondary), color-mix(in srgb, var(--store-secondary) 78%, var(--store-primary)));
  box-shadow: 0 24px 55px color-mix(in srgb, var(--store-secondary) 25%, transparent);
}

.cover-card {
  min-width: min(82%, 330px);
  padding: 18px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--store-radius) - 1px);
  color: #f8f7fb;
  background: rgba(15, 15, 23, 0.65);
  backdrop-filter: blur(15px);
}

.cover-card strong {
  font-size: 19px;
}

.store-category-section,
.store-products-section {
  width: min(1180px, calc(100% - 32px));
}

.store-section-heading {
  gap: 18px;
}

.store-section-heading h2 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.025em;
}

.store-section-heading p,
.store-search span {
  color: var(--store-muted);
  font-size: 13px;
}

.store-outline-button {
  min-height: 44px;
  padding: 0 16px;
  border-color: var(--store-border);
  border-radius: calc(var(--store-radius) - 4px);
  color: var(--store-text);
  background: var(--store-surface);
}

.store-category-grid {
  gap: 12px;
}

.store-category-card {
  min-height: 144px;
  padding: 17px;
  border-color: var(--store-border);
  border-radius: var(--store-radius);
  color: var(--store-text);
  background: var(--store-surface);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--store-secondary) 7%, transparent);
}

.store-category-card:hover,
.store-category-card.active {
  border-color: color-mix(in srgb, var(--store-primary) 55%, var(--store-border));
  box-shadow: 0 16px 34px color-mix(in srgb, var(--store-primary) 12%, transparent);
}

.category-card-visual {
  border-radius: calc(var(--store-radius) - 5px);
  background: color-mix(in srgb, var(--store-primary) 10%, var(--store-background));
}

.category-monogram {
  color: var(--store-primary);
}

.category-card-copy small {
  color: var(--store-muted);
  font-size: 11px;
}

.store-subcategory-panel {
  border-color: var(--store-border);
  border-radius: var(--store-radius);
  background: var(--store-surface);
}

.store-subcategory-list button {
  min-height: 42px;
  border-color: var(--store-border);
  border-radius: 12px;
  color: var(--store-muted);
}

.store-subcategory-list button.active {
  color: #fff;
  border-color: var(--store-primary);
  background: var(--store-primary);
}

.store-search input {
  min-height: 48px;
  border-color: var(--store-border);
  border-radius: calc(var(--store-radius) - 4px);
  color: var(--store-text);
  background: var(--store-surface);
}

.store-search input:focus {
  border-color: var(--store-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--store-primary) 12%, transparent);
}

.store-product-grid {
  gap: 14px;
}

.store-product-card {
  overflow: hidden;
  border-color: var(--store-border);
  border-radius: var(--store-radius);
  background: var(--store-surface);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--store-secondary) 8%, transparent);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.store-product-card:hover {
  border-color: color-mix(in srgb, var(--store-primary) 46%, var(--store-border));
  box-shadow: 0 19px 42px color-mix(in srgb, var(--store-primary) 13%, transparent);
  transform: translateY(-3px);
}

.product-visual {
  aspect-ratio: 1.42 / 1;
  background: color-mix(in srgb, var(--store-primary) 6%, var(--store-background));
}

.product-body {
  padding: 17px;
}

.product-kind {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--store-primary);
  background: color-mix(in srgb, var(--store-primary) 10%, var(--store-surface));
  font-size: 10px;
  font-weight: 850;
}

.product-meta-line small {
  color: var(--store-muted);
  font-size: 11px;
}

.product-body h3 {
  margin-top: 12px;
  color: var(--store-text);
  font-size: 16px;
}

.product-body p {
  color: var(--store-muted);
  font-size: 12px;
}

.product-footer strong {
  color: var(--store-text);
  font-size: 17px;
}

.product-footer button {
  min-height: 40px;
  border-radius: calc(var(--store-radius) - 6px);
}

.store-support {
  width: min(1180px, calc(100% - 32px));
  min-height: 190px;
  padding: clamp(24px, 4vw, 46px);
  overflow: hidden;
  border-color: var(--store-border);
  border-radius: calc(var(--store-radius) + 8px);
  background:
    radial-gradient(circle at 12% 90%, color-mix(in srgb, var(--store-primary) 16%, transparent), transparent 13rem),
    var(--store-surface);
}

.store-footer {
  width: min(1180px, calc(100% - 32px));
  border-color: var(--store-border);
  color: var(--store-muted);
  font-size: 12px;
}

.order-dialog {
  width: min(570px, calc(100% - 24px));
  max-height: calc(100vh - 30px);
  padding: 22px;
  overflow-y: auto;
  border-color: var(--store-border, var(--line));
  border-radius: 24px;
  color: var(--store-text, var(--ink));
  background: var(--store-surface, var(--surface));
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.32);
}

.order-dialog::backdrop {
  background: rgba(8, 8, 13, 0.78);
  backdrop-filter: blur(6px);
}

.dialog-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--store-border, var(--line));
  border-radius: 13px;
  color: var(--store-muted, var(--muted));
  background: var(--store-background, var(--surface-strong));
  font-size: 23px;
}

/* Three genuinely distinct storefront compositions */

.store-app[data-template="professional-dark"] .store-hero {
  color: #fff;
  border-color: color-mix(in srgb, var(--store-primary) 22%, #292936);
  background:
    radial-gradient(circle at 13% 88%, color-mix(in srgb, var(--store-primary) 26%, transparent), transparent 20rem),
    linear-gradient(145deg, var(--store-secondary), #10121a);
}

.store-app[data-template="professional-dark"] .store-hero h1,
.store-app[data-template="professional-dark"] .store-hero-copy > p {
  color: #fff;
}

.store-app[data-template="professional-dark"] .store-hero-copy > p {
  color: #b9b6c2;
}

.store-app[data-template="professional-dark"] .store-cover {
  border-radius: 50% 50% 20px 20px;
}

.store-app[data-template="professional-dark"] .store-product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-app[data-template="professional-dark"] .store-product-card {
  border-inline-start: 3px solid color-mix(in srgb, var(--store-primary) 62%, transparent);
}

.store-app[data-template="modern-light"] .store-hero {
  min-height: 560px;
  grid-template-columns: 1fr;
  text-align: center;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--store-primary) 12%, transparent), transparent 23rem),
    var(--store-surface);
}

.store-app[data-template="modern-light"] .store-hero-copy {
  max-width: 820px;
  margin: auto;
}

.store-app[data-template="modern-light"] .store-hero h1,
.store-app[data-template="modern-light"] .store-hero-copy > p {
  margin-inline: auto;
}

.store-app[data-template="modern-light"] .store-hero-actions {
  justify-content: center;
}

.store-app[data-template="modern-light"] .store-cover {
  display: none;
}

.store-app[data-template="modern-light"] .store-category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.store-app[data-template="modern-light"] .store-category-card {
  min-height: 116px;
  grid-template-columns: 56px 1fr auto;
}

.store-app[data-template="modern-light"] .store-product-card {
  box-shadow: none;
}

.store-app[data-template="gaming-digital"] {
  --store-radius: 14px;
}

.store-app[data-template="gaming-digital"] .store-header,
.store-app[data-template="gaming-digital"] .store-category-card,
.store-app[data-template="gaming-digital"] .store-product-card,
.store-app[data-template="gaming-digital"] .store-support {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.store-app[data-template="gaming-digital"] .store-hero {
  grid-template-columns: 0.92fr 1.08fr;
  grid-template-areas: "cover copy";
  border-color: color-mix(in srgb, var(--store-primary) 34%, var(--store-border));
  clip-path: polygon(0 0, 100% 0, 100% 90%, 94% 100%, 0 100%);
  background:
    linear-gradient(120deg, transparent 46%, color-mix(in srgb, var(--store-primary) 13%, transparent) 47% 49%, transparent 50%),
    var(--store-surface);
}

.store-app[data-template="gaming-digital"] .store-hero-copy {
  grid-area: copy;
}

.store-app[data-template="gaming-digital"] .store-cover {
  grid-area: cover;
  transform: rotate(-2deg);
}

.store-app[data-template="gaming-digital"] .store-product-card {
  border-block-start: 2px solid color-mix(in srgb, var(--store-primary) 68%, transparent);
}

.store-app[data-template="gaming-digital"] .product-visual {
  clip-path: polygon(0 0, 100% 0, 100% 88%, 92% 100%, 0 100%);
}

/* Loading and empty states */

.skeleton-grid article,
.store-product-grid:empty::before,
.store-category-grid:empty::before {
  background:
    linear-gradient(
      100deg,
      color-mix(in srgb, var(--surface-strong) 85%, transparent) 18%,
      color-mix(in srgb, var(--surface) 98%, transparent) 33%,
      color-mix(in srgb, var(--surface-strong) 85%, transparent) 48%
    );
  background-size: 220% 100%;
  animation: uchiha-shimmer 1.35s ease-in-out infinite;
}

.empty-state {
  min-height: 170px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 6rem),
    var(--surface);
  text-align: center;
  font-size: 14px;
}

.empty-state::before {
  content: "";
  width: 44px;
  height: 44px;
  border: 2px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 8px var(--surface),
    inset 0 0 0 10px color-mix(in srgb, var(--accent) 36%, var(--line));
}

@keyframes uchiha-shimmer {
  to { background-position-x: -220%; }
}

@media (max-width: 1100px) {
  body[data-page="builder"] .hero {
    min-height: 620px;
    grid-template-columns: 1fr 0.9fr;
    gap: 36px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .dashboard-actions .button {
    display: none;
  }

  .store-app[data-template="modern-light"] .store-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body[data-page="builder"] .topbar {
    width: calc(100% - 24px);
    min-height: 70px;
    margin-top: 8px;
    padding-inline: 10px;
    top: 8px;
  }

  body[data-page="builder"] .topbar nav > a:not(.button),
  body[data-page="builder"] .topbar .theme-toggle [data-theme-label] {
    display: none;
  }

  body[data-page="builder"] .hero {
    width: calc(100% - 24px);
    min-height: auto;
    margin-top: 18px;
    padding: 42px 28px 36px;
    grid-template-columns: 1fr;
    border-radius: 28px;
  }

  body[data-page="builder"] .hero h1 {
    font-size: clamp(42px, 11vw, 62px);
  }

  .hero-product {
    min-height: 400px;
    margin-top: 8px;
  }

  .channel-store {
    inset-inline-end: 0;
  }

  .channel-bot {
    inset-inline-start: 0;
  }

  .section,
  .builder-shell {
    width: calc(100% - 24px);
  }

  .template-strip {
    grid-template-columns: 1fr;
  }

  .template-card {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) 1fr;
    align-items: center;
    column-gap: 12px;
  }

  .template-card > div {
    grid-row: 1 / 3;
    height: 190px;
    margin: 0;
  }

  .builder-shell {
    grid-template-columns: 1fr;
  }

  .builder-intro {
    padding: 30px 26px;
  }

  .progress-list {
    margin-top: 26px;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .progress-list li {
    display: grid;
    justify-items: center;
    gap: 5px;
    font-size: 12px;
    text-align: center;
  }

  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .live-preview {
    width: min(100%, 330px);
    min-height: 520px;
    margin: 0 auto;
    position: relative;
    top: 0;
  }

  .dashboard-shell {
    display: block;
  }

  .dashboard-sidebar {
    min-height: auto;
    margin: 8px;
    padding: 10px;
    position: sticky;
    top: 8px;
    z-index: 60;
    border-radius: 18px;
  }

  .brand-dashboard {
    min-height: 48px;
    padding: 0 4px 8px;
  }

  .dashboard-sidebar nav {
    margin-top: 8px;
    padding-bottom: 2px;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .dashboard-sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    min-width: max-content;
    min-height: 44px;
    scroll-snap-align: start;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px #9a83ff;
  }

  .sidebar-exit {
    display: none;
  }

  .dashboard-main {
    padding: 14px 12px 72px;
  }

  .dashboard-header {
    align-items: flex-start;
  }

  .dashboard-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .design-editor-layout {
    grid-template-columns: 1fr;
  }

  .design-live-preview {
    width: min(100%, 420px);
    min-height: 560px;
    margin: auto;
  }

  .store-header {
    width: calc(100% - 20px);
    margin-top: 8px;
  }

  .store-header nav a,
  .store-header nav button:not(.store-theme-toggle) {
    display: none;
  }

  .store-hero,
  .store-app[data-template="gaming-digital"] .store-hero {
    width: calc(100% - 20px);
    min-height: auto;
    margin-top: 22px;
    padding: 34px 24px;
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "cover";
  }

  .store-hero h1 {
    font-size: clamp(36px, 10vw, 54px);
  }

  .store-cover {
    min-height: 250px;
  }

  .store-category-section,
  .store-products-section,
  .store-support,
  .store-footer {
    width: calc(100% - 24px);
  }

  .store-app[data-template="professional-dark"] .store-product-grid,
  .store-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-mobile-nav {
    width: calc(100% - 18px);
    inset-block-end: 8px;
    inset-inline-start: 9px;
    padding: 7px;
    border: 1px solid var(--store-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--store-surface) 90%, transparent);
    box-shadow: 0 18px 50px color-mix(in srgb, var(--store-secondary) 24%, transparent);
    backdrop-filter: blur(18px);
  }

  .store-mobile-nav a {
    min-height: 52px;
    border-radius: 12px;
    color: var(--store-muted);
  }

  .store-mobile-nav .mobile-nav-primary {
    color: #fff;
    background: var(--store-primary);
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .brand > span:last-child {
    display: grid;
    gap: 4px;
  }

  .brand small {
    width: max-content;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body[data-page="builder"] .topbar .button {
    min-width: 44px;
    width: 44px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  body[data-page="builder"] .topbar .button::before {
    content: "←";
    font-size: 18px;
  }

  body[data-page="builder"] .hero {
    padding: 34px 21px 28px;
  }

  body[data-page="builder"] .hero h1 {
    margin-top: 14px;
    font-size: clamp(39px, 12vw, 52px);
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-product {
    min-height: 300px;
  }

  .mock-window {
    transform: none;
  }

  .channel-card {
    min-height: 44px;
    font-size: 12px;
  }

  .channel-admin {
    inset-inline-end: 8px;
  }

  .section {
    margin-top: 86px;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    min-height: 200px;
  }

  .feature-grid h3 {
    margin-top: 24px;
  }

  .template-card {
    display: block;
  }

  .template-card > div {
    height: 210px;
    margin-bottom: 16px;
  }

  .builder-shell {
    margin-top: 84px;
    border-radius: 24px;
  }

  .builder-intro h2 {
    font-size: 28px;
  }

  .builder-panel {
    padding: 24px 17px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .progress-list li {
    font-size: 12px;
  }

  .progress-list span {
    width: 30px;
    height: 30px;
  }

  .dashboard-header {
    min-height: auto;
    display: grid;
  }

  .dashboard-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid article {
    min-height: 126px;
    padding: 17px;
  }

  .stat-grid strong {
    font-size: 28px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .service-search {
    width: 100%;
  }

  .library-trust {
    width: fit-content;
  }

  .product-media-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-brand small {
    display: none;
  }

  .store-hero {
    border-radius: calc(var(--store-radius) + 5px);
  }

  .store-hero-actions {
    display: grid;
  }

  .store-hero-actions > * {
    width: 100%;
  }

  .store-section-heading {
    align-items: flex-start;
  }

  .store-category-grid,
  .store-app[data-template="modern-light"] .store-category-grid,
  .store-app[data-template="professional-dark"] .store-product-grid,
  .store-product-grid {
    grid-template-columns: 1fr;
  }

  .store-category-card,
  .store-app[data-template="modern-light"] .store-category-card {
    min-height: 105px;
    grid-template-columns: 62px 1fr auto;
  }

  .store-product-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .product-visual {
    height: 100%;
    min-height: 185px;
    aspect-ratio: auto;
  }

  .product-body {
    padding: 14px;
  }

  .product-body p {
    height: 40px;
  }

  .product-footer {
    align-items: flex-end;
    gap: 6px;
  }

  .product-footer button {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .store-support {
    align-items: flex-start;
  }

  .order-dialog {
    padding: 16px;
    border-radius: 20px;
  }
}

@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;
  }
}
