:root {
  --admin-red: #d92633;
  --admin-red-dark: #85121c;
  --admin-red-deep: #43080d;
  --admin-yellow: #f8c82a;
  --admin-cream: #f4eddf;
  --admin-paper: #fffaf1;
  --admin-ink: #30221d;
  --admin-muted: #776960;
  --admin-green: #248a4d;
  --admin-line: rgba(91, 52, 32, .14);
  --admin-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .72),
    inset 0 -3px 0 rgba(81, 40, 20, .08),
    0 16px 34px rgba(62, 28, 15, .13);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--admin-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, .9), transparent 25rem),
    repeating-linear-gradient(0deg, rgba(104, 70, 49, .025) 0 1px, transparent 1px 4px),
    var(--admin-cream);
}

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, .92fr) minmax(470px, 1.08fr);
}

.auth-story {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 42px clamp(34px, 6vw, 88px);
  background:
    radial-gradient(circle at 75% 70%, rgba(248, 200, 42, .22), transparent 18rem),
    linear-gradient(145deg, var(--admin-red-deep), #8c111d 55%, var(--admin-red));
  box-shadow: inset -8px 0 20px rgba(49, 2, 6, .16);
  color: #fff;
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
}

.auth-story::before {
  width: 420px;
  height: 420px;
  top: -210px;
  left: -150px;
}

.auth-story::after {
  width: 650px;
  height: 650px;
  right: -470px;
  bottom: -380px;
}

.auth-brand,
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.auth-brand > span,
.admin-brand > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #fffdf7, #e8ddc8);
  box-shadow:
    inset 0 2px 0 #fff,
    inset 0 -3px 0 rgba(91, 51, 24, .14),
    0 8px 18px rgba(38, 2, 5, .27);
  font-size: 25px;
}

.auth-brand strong,
.admin-brand strong {
  color: #fff;
  font-size: 25px;
  letter-spacing: -.05em;
}

.auth-brand b,
.admin-brand b {
  color: var(--admin-yellow);
}

.auth-story-copy {
  max-width: 560px;
  margin: auto 0;
}

.auth-eyebrow,
.form-kicker,
.page-kicker,
.topbar-kicker,
.sidebar-label {
  color: var(--admin-yellow);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-story h1 {
  max-width: 620px;
  margin: 17px 0 20px;
  font-size: clamp(46px, 5.6vw, 78px);
  font-weight: 900;
  letter-spacing: -.068em;
  line-height: .95;
  text-wrap: balance;
}

.auth-story-copy > p {
  max-width: 560px;
  margin: 0;
  color: #f2d4cf;
  font-size: 17px;
  line-height: 1.75;
}

.security-note {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.security-note > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #4fd080;
  color: #153d23;
  font-weight: 900;
}

.security-note > div { display: flex; flex-direction: column; gap: 2px; }
.security-note small { color: #efc7c1; }

.auth-decoration {
  position: absolute;
  right: 7%;
  bottom: 5%;
  font-size: clamp(100px, 15vw, 220px);
  filter: drop-shadow(0 25px 19px rgba(44, 0, 4, .32));
  opacity: .9;
  transform: rotate(-8deg);
}

.compact-story .auth-decoration { font-size: clamp(95px, 12vw, 180px); }

.auth-form-side {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 24px;
}

.auth-card {
  width: min(100%, 470px);
  padding: 42px;
  border: 1px solid var(--admin-line);
  border-radius: 29px;
  background: linear-gradient(145deg, #fffdf8, #f1e7d5);
  box-shadow: var(--admin-shadow);
}

.mobile-auth-brand { display: none; }
.form-kicker { color: var(--admin-red); }
.auth-card h2 {
  margin: 8px 0 9px;
  font-size: 38px;
  letter-spacing: -.05em;
  line-height: 1;
}

.form-intro {
  margin: 0 0 27px;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.65;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.form-field > span {
  color: #5e4f47;
  font-size: 12px;
  font-weight: 800;
}

.form-field input {
  width: 100%;
  height: 51px;
  padding: 0 15px;
  border: 1px solid rgba(88, 48, 29, .18);
  border-radius: 14px;
  outline: 0;
  background: #fffaf0;
  box-shadow:
    inset 0 2px 7px rgba(84, 42, 21, .09),
    0 1px 0 rgba(255, 255, 255, .7);
  color: var(--admin-ink);
}

.form-field input:focus {
  border-color: rgba(217, 38, 51, .65);
  box-shadow:
    inset 0 2px 6px rgba(84, 42, 21, .07),
    0 0 0 4px rgba(217, 38, 51, .1);
}

.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-field button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 37px;
  height: 37px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 16px;
}

.password-field button:hover { background: #eee1ce; }

.form-help {
  display: flex;
  justify-content: flex-end;
  margin: -5px 0 19px;
}

.form-help a {
  color: var(--admin-red-dark);
  font-size: 12px;
  font-weight: 800;
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  border: 1px solid #941520;
  border-radius: 15px;
  background: linear-gradient(#ef3b48, var(--admin-red));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .2),
    inset 0 -3px 0 rgba(92, 4, 12, .22),
    0 9px 18px rgba(126, 14, 24, .23);
  color: #fff;
  font-weight: 850;
}

.submit-button:hover { filter: brightness(1.04); transform: translateY(-1px); }
.submit-button:active { transform: translateY(1px); }
.link-button { text-decoration: none; }

.return-link {
  display: block;
  margin-top: 22px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.alert-error {
  border: 1px solid rgba(174, 27, 39, .24);
  background: #ffe1e1;
  color: #8a1721;
}

.alert-success {
  border: 1px solid rgba(36, 138, 77, .24);
  background: #dff5e7;
  color: #1a6c3b;
}

.invalid-link {
  padding: 25px;
  border: 1px dashed rgba(91, 52, 32, .24);
  border-radius: 18px;
  background: rgba(255, 250, 240, .65);
  text-align: center;
}
.invalid-link > span { font-size: 43px; }
.invalid-link h3 { margin: 10px 0 5px; }
.invalid-link p { margin: 0 0 20px; color: var(--admin-muted); font-size: 13px; }

.panel-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 5%, rgba(255, 255, 255, .8), transparent 30rem),
    repeating-linear-gradient(0deg, rgba(104, 70, 49, .02) 0 1px, transparent 1px 4px),
    var(--admin-cream);
}

.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 264px 1fr; }
.admin-sidebar {
  position: sticky;
  z-index: 60;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 25px 18px;
  background:
    radial-gradient(circle at 50% 90%, rgba(217, 38, 51, .24), transparent 18rem),
    linear-gradient(180deg, #3b080d, #5b0b12);
  box-shadow: inset -5px 0 13px rgba(33, 0, 3, .15), 8px 0 25px rgba(58, 16, 8, .08);
  color: #fff;
}

.admin-brand { padding: 0 6px; }
.admin-brand > span { width: 41px; height: 41px; border-radius: 13px; font-size: 21px; }
.admin-brand strong { font-size: 21px; }
.sidebar-label { margin: 40px 12px 10px; color: #c99796; font-size: 9px; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 7px; }

.admin-sidebar nav > a,
.admin-sidebar nav > span {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #e9c9c6;
  font-size: 13px;
  font-weight: 700;
}

.admin-sidebar nav > a > span,
.admin-sidebar nav > span > span { width: 21px; color: #f6a5a9; font-size: 18px; text-align: center; }

.admin-sidebar nav > a.active {
  border-color: rgba(255, 255, 255, .12);
  background: linear-gradient(135deg, rgba(239, 59, 72, .86), rgba(183, 24, 36, .88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 8px 17px rgba(40, 0, 3, .24);
  color: #fff;
}

.coming-item { opacity: .62; }
.coming-item small {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: #dfaaa8;
  font-size: 8px;
  text-transform: uppercase;
}

.back-to-store {
  margin-top: auto;
  padding: 13px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #ddb9b6;
  font-size: 12px;
  font-weight: 700;
}

.admin-main { min-width: 0; }
.admin-topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 16px;
  padding: 12px 30px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(255, 250, 241, .88);
  box-shadow: 0 5px 18px rgba(61, 29, 15, .06);
  backdrop-filter: blur(12px);
}

.topbar-kicker { display: block; color: var(--admin-red); font-size: 9px; }
.admin-topbar > div:nth-child(2) > strong { font-size: 14px; }
.menu-toggle { display: none; }

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.admin-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(111, 67, 3, .27);
  border-radius: 13px;
  background: linear-gradient(#ffda4d, var(--admin-yellow));
  box-shadow: var(--admin-shadow);
  color: #513404;
  font-weight: 900;
}

.admin-user > div { display: flex; max-width: 190px; flex-direction: column; }
.admin-user > div strong,
.admin-user > div small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user > div strong { font-size: 12px; }
.admin-user > div small { color: var(--admin-muted); font-size: 10px; }
.admin-user form { margin-left: 5px; }
.admin-user form button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--admin-line);
  border-radius: 11px;
  background: linear-gradient(145deg, #fffdf7, #e9decc);
  box-shadow: inset 0 1px 0 #fff, 0 5px 10px rgba(69, 34, 17, .08);
  color: #765e52;
  font-size: 11px;
  font-weight: 800;
}

.admin-content { max-width: 1480px; margin: 0 auto; padding: 35px 30px 70px; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.page-kicker { display: block; color: var(--admin-red); }
.dashboard-heading h1 { margin: 6px 0 7px; font-size: clamp(32px, 4vw, 45px); letter-spacing: -.05em; }
.dashboard-heading p { margin: 0; color: var(--admin-muted); font-size: 13px; }

.store-switch-card {
  display: flex;
  min-width: 242px;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--admin-line);
  border-radius: 17px;
  background: linear-gradient(145deg, #fffdf8, #eee3d1);
  box-shadow: var(--admin-shadow);
}
.store-light { width: 11px; height: 11px; border-radius: 50%; }
.store-switch-card.open .store-light { background: #45cd79; box-shadow: 0 0 0 5px rgba(69, 205, 121, .13); }
.store-switch-card.closed .store-light { background: #b4a59b; box-shadow: 0 0 0 5px rgba(100, 87, 78, .1); }
.store-switch-card > div { display: flex; flex: 1; flex-direction: column; }
.store-switch-card small { color: var(--admin-muted); font-size: 9px; }
.store-switch-card strong { font-size: 13px; }
.switch-preview { position: relative; width: 39px; height: 23px; border-radius: 999px; background: #c5b9aa; box-shadow: inset 0 2px 4px rgba(63, 40, 24, .17); }
.switch-preview i { position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(43, 23, 13, .22); }
.store-switch-card.open .switch-preview { background: var(--admin-green); }
.store-switch-card.open .switch-preview i { left: 19px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 27px; }
.metric-card {
  display: flex;
  min-height: 144px;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--admin-line);
  border-radius: 21px;
  box-shadow: var(--admin-shadow);
}
.metric-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(84, 44, 21, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 5px 10px rgba(73, 33, 14, .09);
  font-size: 18px;
  font-weight: 900;
}
.metric-card > div:last-child { display: flex; min-width: 0; flex-direction: column; }
.metric-card span { color: rgba(50, 34, 27, .67); font-size: 11px; font-weight: 800; }
.metric-card strong { margin: 4px 0 2px; font-size: clamp(24px, 2.7vw, 35px); letter-spacing: -.04em; white-space: nowrap; }
.metric-card small { color: rgba(50, 34, 27, .56); font-size: 9px; }
.red-card { background: linear-gradient(145deg, #ffd7d9, #f7adb2); }
.yellow-card { background: linear-gradient(145deg, #fff1b6, #f3d36a); }
.green-card { background: linear-gradient(145deg, #d7f2df, #9edaae); }
.cream-card { background: linear-gradient(145deg, #fffdf8, #e8dcc8); }

.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, .8fr); gap: 18px; margin-top: 18px; }
.dashboard-panel {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 22px;
  background: linear-gradient(145deg, #fffdf8, #f1e7d6);
  box-shadow: var(--admin-shadow);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--admin-line); }
.panel-heading h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.035em; }
.module-note { max-width: 180px; color: var(--admin-muted); font-size: 9px; line-height: 1.4; text-align: right; }
.trophy { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: var(--admin-yellow); color: #795006; font-size: 22px; }

.table-scroll { overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th,
.orders-table td { padding: 14px 17px; border-bottom: 1px solid rgba(91, 52, 32, .08); text-align: left; white-space: nowrap; }
.orders-table th { color: var(--admin-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.orders-table td { font-size: 11px; }
.orders-table tr:last-child td { border-bottom: 0; }
.status-chip { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.status-chip.warning { background: #fff0b8; color: #795509; }
.status-chip.info { background: #d9ebff; color: #235d99; }
.status-chip.success { background: #d8f1e0; color: #1e7440; }
.status-chip.purple { background: #eadfff; color: #674098; }
.status-chip.danger { background: #ffe0e0; color: #9e2430; }
.status-chip.neutral { background: #ece5da; color: #685a51; }

.dashboard-empty { display: grid; min-height: 230px; place-content: center; justify-items: center; padding: 25px; text-align: center; }
.dashboard-empty > span { font-size: 44px; }
.dashboard-empty strong { margin: 10px 0 4px; }
.dashboard-empty p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.dashboard-empty.compact { min-height: 220px; }

.popular-list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 8px 20px 17px; list-style: none; }
.popular-list li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid rgba(91, 52, 32, .08); }
.popular-list li:last-child { border-bottom: 0; }
.ranking { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px; background: #efe4d1; color: var(--admin-red-dark); font-size: 11px; font-weight: 900; }
.popular-list li > div { display: flex; min-width: 0; flex-direction: column; }
.popular-list li > div strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.popular-list li > div small { color: var(--admin-muted); font-size: 9px; }
.ranking-bar { grid-column: 2; display: block; height: 4px; overflow: hidden; border-radius: 99px; background: #e6dac6; }
.ranking-bar i { display: block; width: var(--rank-width); height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--admin-red), #f38189); }

.next-modules {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 18px;
  padding: 21px 23px;
  border: 1px solid var(--admin-line);
  border-radius: 20px;
  background: linear-gradient(145deg, #fffdf8, #eee3d1);
  box-shadow: var(--admin-shadow);
}
.next-modules h2 { margin: 5px 0 0; font-size: 19px; letter-spacing: -.035em; }
.module-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.module-pills span { padding: 7px 10px; border: 1px solid rgba(91, 52, 32, .11); border-radius: 999px; background: rgba(255, 255, 255, .46); color: var(--admin-muted); font-size: 9px; font-weight: 800; }
.module-pills span.complete { border-color: rgba(36,138,77,.22); background: #dff5e7; color: #1a6c3b; }

.submenu-link { min-height: 37px !important; margin-left: 18px; font-size: 11px !important; }
.submenu-link.current { background: rgba(255, 255, 255, .08); color: #fff !important; }
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.catalog-heading h1 { margin: 6px 0 7px; font-size: clamp(34px, 4vw, 46px); letter-spacing: -.055em; }
.catalog-heading p { max-width: 650px; margin: 0; color: var(--admin-muted); font-size: 13px; line-height: 1.6; }
.compact-heading { align-items: flex-start; }
.back-link { display: inline-block; margin-bottom: 23px; color: var(--admin-red-dark); font-size: 11px; font-weight: 800; }
.heading-actions, .form-actions, .row-actions { display: flex; align-items: center; gap: 9px; }
.primary-action, .secondary-action, .danger-button {
  display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: 0 16px;
  border-radius: 13px; font-size: 12px; font-weight: 850;
}
.primary-action { border: 1px solid #98141f; background: linear-gradient(#ef3c48, var(--admin-red)); box-shadow: inset 0 2px 0 rgba(255,255,255,.2), inset 0 -3px 0 rgba(92,4,12,.2), 0 8px 15px rgba(126,14,24,.2); color: #fff; }
.secondary-action { border: 1px solid var(--admin-line); background: linear-gradient(145deg, #fffdf8, #e9decc); box-shadow: inset 0 1px 0 #fff, 0 6px 12px rgba(69,34,17,.08); color: #66534a; }
.danger-button { border: 1px solid rgba(174,27,39,.28); background: #fff0f0; color: #a21e29; }
.catalog-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 25px; }
.catalog-summary article { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border: 1px solid var(--admin-line); border-radius: 17px; background: linear-gradient(145deg,#fffdf8,#eee3d1); box-shadow: var(--admin-shadow); }
.catalog-summary span { color: var(--admin-muted); font-size: 11px; font-weight: 800; }
.catalog-summary strong { color: var(--admin-red-dark); font-size: 25px; }
.catalog-panel, .form-panel, .current-image-card { margin-top: 20px; border: 1px solid var(--admin-line); border-radius: 22px; background: linear-gradient(145deg,#fffdf8,#f1e7d6); box-shadow: var(--admin-shadow); }
.catalog-panel { overflow: hidden; }
.catalog-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 22px; border-bottom: 1px solid var(--admin-line); }
.catalog-panel-heading h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.035em; }
.catalog-panel-heading > small { max-width: 390px; color: var(--admin-muted); font-size: 10px; line-height: 1.5; text-align: right; }
.catalog-table-wrap { overflow-x: auto; }
.catalog-table { width: 100%; border-collapse: collapse; }
.catalog-table th, .catalog-table td { padding: 14px 17px; border-bottom: 1px solid rgba(91,52,32,.08); text-align: left; vertical-align: middle; }
.catalog-table th { color: var(--admin-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.catalog-table td { font-size: 11px; }
.catalog-table tbody tr:last-child td { border-bottom: 0; }
.entity-name { display: flex; min-width: 230px; align-items: center; gap: 12px; }
.entity-name > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.entity-name > div strong, .entity-name > div small { overflow: hidden; max-width: 390px; text-overflow: ellipsis; white-space: nowrap; }
.entity-name > div small, .block-note, .old-price { color: var(--admin-muted); font-size: 9px; }
.entity-emoji, .product-thumb { display: grid; width: 45px; height: 45px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid rgba(84,44,21,.12); border-radius: 14px; background: linear-gradient(145deg,#f5dec0,#eac163); box-shadow: inset 0 1px 0 #fff, 0 5px 10px rgba(73,33,14,.09); font-size: 22px; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-actions { flex-wrap: wrap; min-width: 220px; }
.row-actions a, .row-actions button { border: 0; background: none; color: var(--admin-red-dark); font-size: 10px; font-weight: 850; }
.row-actions form { margin: 0; }
.row-actions .danger-link, .danger-link { color: #a52530; }
.block-note, .old-price { display: block; margin-top: 3px; }
.old-price { text-decoration: line-through; }
.catalog-empty { display: grid; min-height: 260px; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.catalog-empty > span { font-size: 48px; }
.catalog-empty strong { margin: 10px 0 4px; }
.catalog-empty p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.catalog-filters { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(160px, .8fr) minmax(150px, .7fr) auto auto; align-items: end; gap: 10px; margin-top: 24px; padding: 15px; border: 1px solid var(--admin-line); border-radius: 18px; background: rgba(255,250,241,.75); box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(62,28,15,.08); }
.catalog-filters label { display: flex; flex-direction: column; gap: 5px; }
.catalog-filters label span { color: var(--admin-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.catalog-filters input, .catalog-filters select, .catalog-field input, .catalog-field textarea, .catalog-field select { width: 100%; border: 1px solid rgba(88,48,29,.18); border-radius: 12px; outline: 0; background: #fffaf0; box-shadow: inset 0 2px 7px rgba(84,42,21,.07); color: var(--admin-ink); }
.catalog-filters input, .catalog-filters select { height: 42px; padding: 0 12px; }
.catalog-filters button { height: 42px; padding: 0 16px; border: 1px solid #98141f; border-radius: 12px; background: var(--admin-red); color: #fff; font-weight: 800; }
.catalog-filters > a { display: grid; height: 42px; place-items: center; padding: 0 8px; color: var(--admin-muted); font-size: 10px; font-weight: 800; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; padding: 18px; border-top: 1px solid var(--admin-line); }
.pagination a { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid var(--admin-line); border-radius: 10px; background: #fffaf0; color: var(--admin-muted); font-size: 11px; font-weight: 850; }
.pagination a.active { border-color: var(--admin-red); background: var(--admin-red); color: #fff; }
.catalog-form { margin-top: 3px; }
.form-panel { padding: 22px; }
.form-panel > header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.form-panel > header > div { display: flex; flex-direction: column; gap: 3px; }
.form-panel h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.form-panel header p { margin: 0; color: var(--admin-muted); font-size: 10px; }
.form-step { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid #9d1520; border-radius: 12px; background: linear-gradient(#ef3c48,var(--admin-red)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); color: #fff; font-size: 12px; font-weight: 900; }
.form-grid { display: grid; gap: 16px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.catalog-field > span { color: #5e4f47; font-size: 10px; font-weight: 850; }
.catalog-field input, .catalog-field select { height: 48px; padding: 0 13px; }
.catalog-field textarea { padding: 13px; resize: vertical; line-height: 1.5; }
.catalog-field small, .upload-field small, .switch-field small, .current-image-card small { color: var(--admin-muted); font-size: 9px; line-height: 1.4; }
.catalog-field.full, .switch-field.full { grid-column: 1 / -1; }
.switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.switch-field { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid rgba(91,52,32,.1); border-radius: 15px; background: rgba(255,255,255,.35); cursor: pointer; }
.switch-field > input { position: absolute; opacity: 0; pointer-events: none; }
.switch-field > span { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border-radius: 99px; background: #c5b9aa; box-shadow: inset 0 2px 5px rgba(63,40,24,.18); }
.switch-field > span::after { position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(43,23,13,.22); content: ""; transition: left .15s ease; }
.switch-field > input:checked + span { background: var(--admin-green); }
.switch-field > input:checked + span::after { left: 21px; }
.switch-field > div { display: flex; flex-direction: column; gap: 2px; }
.switch-field strong { font-size: 11px; }
.upload-field { display: flex; align-items: center; gap: 15px; padding: 18px; border: 2px dashed rgba(217,38,51,.28); border-radius: 17px; background: rgba(255,248,237,.6); cursor: pointer; }
.upload-field > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { display: grid; width: 82px; height: 82px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 17px; background: linear-gradient(145deg,#f5dec0,#eac163); box-shadow: var(--admin-shadow); font-size: 40px; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-field > div { display: flex; flex-direction: column; gap: 4px; }
.upload-field strong { color: var(--admin-red-dark); font-size: 13px; }
.form-actions { justify-content: flex-end; margin-top: 20px; }
.current-image-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px; }
.current-image-card > img { width: 86px; height: 70px; object-fit: cover; border-radius: 14px; }
.current-image-card > div { display: flex; flex-direction: column; gap: 3px; }


.sidebar-overlay { position: fixed; z-index: 55; inset: 0; background: rgba(39, 13, 8, .46); backdrop-filter: blur(3px); }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-columns { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .mobile-auth-brand { display: block; margin-bottom: 32px; color: var(--admin-red-dark); font-size: 21px; font-weight: 900; letter-spacing: -.04em; }
  .mobile-auth-brand span { color: var(--admin-red); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    left: 0;
    width: 264px;
    transform: translateX(-110%);
    transition: transform .2s ease;
  }
  .admin-sidebar.visible { transform: translateX(0); }
  .menu-toggle {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    background: #fffaf0;
    box-shadow: var(--admin-shadow);
  }
  .admin-topbar { padding: 11px 17px; }
  .admin-user > div { display: none; }
  .admin-content { padding: 27px 16px 60px; }
  .dashboard-heading { align-items: stretch; flex-direction: column; }
  .store-switch-card { width: 100%; }
  .next-modules { align-items: flex-start; flex-direction: column; }
  .module-pills { justify-content: flex-start; }
  .catalog-heading { align-items: flex-start; flex-direction: column; }
  .catalog-filters { grid-template-columns: 1fr 1fr; }
  .catalog-filters label:first-child { grid-column: 1 / -1; }
  .three-columns { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 570px) {
  .auth-form-side { padding: 18px 13px; }
  .auth-card { padding: 30px 20px; border-radius: 23px; }
  .auth-card h2 { font-size: 33px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .admin-topbar > div:nth-child(2) { display: none; }
  .admin-avatar { display: none; }
  .admin-user { margin-left: auto; }
  .module-note { display: none; }
  .panel-heading { padding: 18px; }
  .heading-actions { width: 100%; }
  .heading-actions > * { flex: 1; }
  .catalog-summary { grid-template-columns: 1fr; }
  .catalog-filters, .two-columns, .three-columns, .switch-grid { grid-template-columns: 1fr; }
  .catalog-filters label:first-child { grid-column: auto; }
  .catalog-panel-heading { align-items: flex-start; flex-direction: column; }
  .catalog-panel-heading > small { text-align: left; }
  .form-panel { padding: 17px; }
  .current-image-card { grid-template-columns: auto 1fr; }
  .current-image-card form { grid-column: 1 / -1; }
  .current-image-card form button { width: 100%; }
}

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