/* Vitrimax admin hub — MaxAuthor Hub tokens */
:root {
  --hub-bg: #0b1020;
  --hub-sidebar: rgba(20, 28, 46, 0.92);
  --hub-panel: #141c2e;
  --hub-panel-2: #1a2540;
  --hub-line: rgba(100, 116, 139, 0.45);
  --hub-line-strong: rgba(148, 163, 184, 0.35);
  --hub-text: #f1f5f9;
  --hub-muted: #94a3b8;
  --hub-green: #34d399;
  --hub-green-deep: #10b981;
  --hub-green-soft: rgba(52, 211, 153, 0.14);
  --hub-blue: #4f8cff;
  --hub-blue-soft: rgba(79, 140, 255, 0.18);
  --hub-accent: #4f8cff;
  --hub-accent-soft: #93c5fd;
  --hub-accent-glow: rgba(79, 140, 255, 0.28);
  --hub-purple: #7c5cff;
  --hub-danger: #f87171;
  --hub-radius: 1rem;
  --hub-sidebar-w: 268px;
  --font: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

body.hub-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--hub-text);
  background: var(--hub-bg);
  line-height: 1.45;
}

/* ---- Gate ---- */
.gate {
  max-width: 420px;
  margin: 18vh auto 0;
  text-align: center;
  display: grid;
  gap: .9rem;
  justify-items: center;
  padding: 1.5rem;
}
.gate h1 {
  font-family: var(--display);
  letter-spacing: -.04em;
  margin: 0;
  font-size: 2rem;
}
.gate p { color: var(--hub-muted); margin: 0; }
.gate .hint { font-size: .9rem; }

/* ---- Shell ---- */
.hub {
  display: grid;
  grid-template-columns: var(--hub-sidebar-w) 1fr;
  min-height: 100vh;
}
.hub-sidebar {
  background: var(--hub-sidebar);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid var(--hub-line);
  padding: 1rem .85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  z-index: 40;
}
.hub-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--hub-text);
  padding: .35rem .45rem;
}
.hub-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #142033, #0b1220);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: grid;
  place-items: center;
  color: var(--hub-accent-soft);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.2);
  flex-shrink: 0;
  overflow: hidden;
}
.hub-brand-mark img,
.hub-brand-mark svg { width: 22px; height: 22px; display: block; }
.hub-brand-text {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: 1.05rem;
}
.hub-brand-sub {
  display: block;
  font-family: var(--font);
  font-weight: 500;
  font-size: .72rem;
  color: var(--hub-muted);
  letter-spacing: 0;
}

.hub-search {
  position: relative;
}
.hub-search input {
  width: 100%;
  background: var(--hub-panel);
  border: 1px solid var(--hub-line);
  border-radius: 10px;
  color: var(--hub-text);
  padding: .55rem .7rem .55rem 2.1rem;
  font: inherit;
  font-size: .88rem;
}
.hub-search input::placeholder { color: var(--hub-muted); }
.hub-search-ico {
  position: absolute;
  left: .7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hub-muted);
  pointer-events: none;
  font-size: .85rem;
}

.hub-nav { display: grid; gap: 1rem; }
.hub-nav-group { display: grid; gap: .2rem; }
.hub-nav-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hub-muted);
  padding: .35rem .55rem;
}
.hub-nav-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: #c5d0e0;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  text-align: left;
  padding: .55rem .65rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
.hub-nav-item:hover { background: rgba(255,255,255,.04); color: #fff; }
.hub-nav-item.active {
  background: var(--hub-blue-soft);
  color: var(--hub-accent-soft);
}
.hub-nav-item.active .nav-ico { color: var(--hub-accent-soft); }
.nav-ico {
  width: 1.15rem;
  text-align: center;
  color: var(--hub-muted);
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--hub-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}
.nav-badge.empty { display: none; }

.hub-sidebar-foot {
  margin-top: auto;
  padding: .75rem .55rem 0;
  border-top: 1px solid var(--hub-line);
  font-size: .8rem;
  color: var(--hub-muted);
}
.hub-sidebar-foot a { color: var(--hub-accent-soft); text-decoration: none; font-weight: 600; }

/* ---- Main ---- */
.hub-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.hub-topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--hub-line);
  background: rgba(11, 16, 32, 0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.hub-menu-btn {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  border: 1px solid var(--hub-line);
  background: var(--hub-panel);
  color: var(--hub-text);
  cursor: pointer;
  font-size: 1.1rem;
}
.hub-top-title {
  font-weight: 700;
  font-size: .98rem;
}
.hub-top-spacer { flex: 1; }
.hub-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  border: 0;
  cursor: default;
}
.hub-pill.plan {
  background: rgba(124, 92, 255, 0.2);
  color: #c4b5fd;
  cursor: pointer;
  font: inherit;
}
.hub-pill.plan b { font-weight: 800; }
.billing-banner {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  font-size: .92rem;
  font-weight: 650;
}
.billing-banner.ok {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--hub-success);
}
.billing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .85rem;
  margin: 1rem 0;
}
.billing-card {
  border: 1px solid var(--hub-line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: rgba(20, 28, 46, 0.92);
  color: var(--hub-text);
  display: flex;
  flex-direction: column;
  gap: .55rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}
.billing-card.current {
  border-color: rgba(79, 140, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.2), 0 12px 32px rgba(0, 0, 0, 0.22);
}
.billing-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hub-text);
}
.billing-price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--hub-text);
}
.billing-price span {
  font-size: .85rem;
  font-weight: 600;
  color: var(--hub-muted);
}
.billing-card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--hub-muted);
  font-size: .86rem;
  line-height: 1.45;
  flex: 1;
}
.billing-card .btn { width: 100%; margin-top: .35rem; }
.billing-card.biz {
  border-color: rgba(79, 140, 255, 0.4);
  background: linear-gradient(165deg, rgba(26, 37, 64, 0.98), rgba(15, 23, 42, 0.95));
}
.billing-seats {
  display: block;
  margin: 0.65rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hub-muted);
}
.billing-seats select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--hub-line);
  background: var(--hub-bg, #0b1220);
  color: inherit;
  font: inherit;
}

.pay-trust {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(79, 140, 255, 0.08));
  color: var(--hub-text);
}
.pay-trust strong {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #a7f3d0;
}
.pay-trust p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #cbd5e1;
  font-weight: 500;
}
.pay-trust a {
  color: var(--hub-accent-soft);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 197, 253, 0.35);
}
.pay-trust a:hover { border-bottom-color: var(--hub-accent-soft); }

.pay-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0;
}
.pay-provider {
  border: 1px solid var(--hub-line);
  background: var(--hub-panel-2);
  color: var(--hub-text);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}
.pay-provider:hover { border-color: var(--hub-accent); }
.pay-provider.active {
  border-color: var(--hub-accent);
  background: var(--hub-blue-soft);
  color: var(--hub-accent-soft);
}
.pay-provider .soon {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--hub-muted);
}
.pay-fields label {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hub-muted);
}
.pay-fields input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--hub-line);
  background: var(--hub-bg, #0b1020);
  color: inherit;
  font: inherit;
}
#payWebhookUrl {
  word-break: break-all;
  color: var(--hub-accent-soft);
}
.hub-pill.ghost {
  background: transparent;
  border: 1px solid var(--hub-line);
  color: var(--hub-muted);
}

.hub-content {
  padding: 1.25rem 1.35rem 2.5rem;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.page-head {
  margin-bottom: 1.1rem;
}
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 1.95rem);
  letter-spacing: -.04em;
  margin: 0 0 .35rem;
}
.page-head p {
  margin: 0;
  color: var(--hub-muted);
  max-width: 52ch;
}

/* ---- Cards ---- */
.hub-card {
  background: var(--hub-panel);
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  padding: 1.05rem 1.15rem;
  margin-bottom: 1rem;
}
.hub-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem .9rem;
  margin-bottom: .85rem;
}
.hub-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}
.status-tag.live {
  background: var(--hub-green-soft);
  color: var(--hub-green);
}
.hub-card-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .2rem;
  align-items: center;
  color: var(--hub-muted);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.flow-steps .sep { opacity: .45; margin: 0 .15rem; }
.flow-steps .done { color: var(--hub-green); }
.flow-steps .now { color: #fff; }

/* ---- Checklist ---- */
.checklist-title {
  font-weight: 700;
  margin: 0 0 .75rem;
  font-size: .98rem;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.checklist-item {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: .65rem;
  align-items: center;
  padding: .55rem .35rem;
  border-radius: 10px;
}
.checklist-item:hover { background: rgba(255,255,255,.03); }
.checklist-num {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 800;
  background: rgba(255,255,255,.06);
  color: var(--hub-muted);
}
.checklist-item.ok .checklist-num {
  background: var(--hub-green-soft);
  color: var(--hub-green);
}
.checklist-item.ok .checklist-label { color: var(--hub-muted); text-decoration: line-through; }
.checklist-label { font-size: .92rem; font-weight: 600; }
.checklist-action {
  min-height: 2rem;
  padding: .35rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--hub-line-strong);
  background: transparent;
  color: var(--hub-text);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.checklist-action:hover { border-color: var(--hub-green); color: var(--hub-green); }
.checklist-item.ok .checklist-action {
  border-color: transparent;
  color: var(--hub-green);
  cursor: default;
}

.btn-publish {
  width: 100%;
  margin-top: .9rem;
  min-height: 2.85rem;
  border: 0;
  border-radius: 12px;
  background: var(--hub-accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
  box-shadow: 0 10px 28px var(--hub-accent-glow);
}
.btn-publish:hover { filter: brightness(1.06); }
.btn-publish:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: #1e293b;
  color: var(--hub-muted);
  box-shadow: none;
}

/* ---- Sub tabs ---- */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 1.15rem 0 .9rem;
  padding: .3rem;
  background: var(--hub-panel-2);
  border: 1px solid var(--hub-line);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.sub-tab {
  border: 0;
  background: transparent;
  color: var(--hub-muted);
  font: inherit;
  font-weight: 700;
  font-size: .88rem;
  padding: .5rem .95rem;
  border-radius: 9px;
  cursor: pointer;
}
.sub-tab:hover { color: #fff; }
.sub-tab.active {
  background: var(--hub-accent);
  color: #fff;
}

.section-block { margin-bottom: 1.25rem; }
.section-block h3 {
  margin: 0 0 .45rem;
  font-size: 1rem;
}
.section-block .lead {
  color: var(--hub-muted);
  font-size: .9rem;
  margin: 0 0 .85rem;
}

.muted, .hint, .msg { color: var(--hub-muted); font-size: .9rem; }
.msg { margin: .5rem 0 0; }
code {
  font-size: .78rem;
  word-break: break-all;
  color: #a7f3d0;
  background: rgba(34, 197, 94, 0.08);
  padding: .1rem .35rem;
  border-radius: 4px;
}

label {
  display: grid;
  gap: .35rem;
  margin-bottom: .75rem;
  font-weight: 600;
  font-size: .88rem;
  color: #cbd5e1;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--hub-line-strong);
  border-radius: 10px;
  padding: .7rem .8rem;
  font: inherit;
  background: #0a111c;
  color: var(--hub-text);
}
input:focus, textarea:focus, select:focus {
  outline: 1px solid rgba(34, 197, 94, 0.45);
  border-color: rgba(34, 197, 94, 0.35);
}
.row { display: flex; align-items: center; gap: .4rem; }
.prefix { color: var(--hub-muted); font-weight: 600; }
.slug-readonly { margin: 0 0 .85rem; }
.slug-readonly .hint { margin: .35rem 0 0; }
.slug-code {
  display: inline-block;
  padding: .45rem .65rem;
  border-radius: 8px;
  background: #0a111c;
  border: 1px solid var(--hub-line);
  color: #e8eef8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
}
.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  cursor: pointer;
  grid-template-columns: none;
}
.toggle input { width: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: .55rem 1rem;
  border-radius: 10px;
  border: 0;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
}
.btn.primary {
  background: var(--hub-accent);
  color: #fff;
  box-shadow: 0 8px 22px var(--hub-accent-glow);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost {
  background: transparent;
  color: var(--hub-text);
  box-shadow: inset 0 0 0 1px var(--hub-line-strong);
}
.btn.ghost:hover { border-color: var(--hub-accent); color: var(--hub-accent-soft); box-shadow: inset 0 0 0 1px var(--hub-accent); }
.btn.danger {
  background: transparent;
  color: var(--hub-danger);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.35);
}
.btn.sm { min-height: 2.1rem; padding: .35rem .7rem; font-size: .82rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .35rem; }

.import-grid { display: grid; gap: .75rem; }
@media (min-width: 860px) {
  .import-grid { grid-template-columns: 1fr 1fr; }
}
.import-box {
  border: 1px solid var(--hub-line);
  border-radius: 12px;
  padding: .8rem;
  display: grid;
  gap: .45rem;
}
.import-box h4 { margin: 0; }
.import-box .hint { margin: 0; }
.add-form { display: grid; gap: .55rem; margin-bottom: 1rem; }
.add-form.is-editing {
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(79, 140, 255, 0.45);
  background: rgba(79, 140, 255, 0.08);
}
@media (min-width: 720px) {
  .add-form { grid-template-columns: 2fr 1fr 1.4fr auto auto; }
  .cats-form { grid-template-columns: 1fr auto auto; }
}

.list { display: grid; gap: .55rem; }
.item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: .75rem;
  align-items: center;
  padding: .65rem;
  border-radius: 12px;
  background: #0a111c;
  border: 1px solid var(--hub-line);
}
.item.cat-item { grid-template-columns: 1fr auto; }
.item.is-selected {
  border-color: rgba(79, 140, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.2);
}
.item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #152033;
}
.item .meta b { display: block; }
.item .price { color: var(--hub-accent-soft); font-weight: 700; margin-top: .15rem; }
.item-desc {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .item-actions {
    flex-direction: row;
    align-items: center;
  }
}
.photo-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--hub-muted);
  font-weight: 600;
}
.photo-input { margin-top: .2rem; font-size: .78rem; width: 100%; }

.channel-steps {
  margin: .5rem 0 .75rem 1.1rem;
  color: var(--hub-muted);
  font-size: .9rem;
}
.channel-box {
  padding: .85rem;
  border-radius: 12px;
  background: #0a111c;
  border: 1px dashed var(--hub-line-strong);
}
.channel-box.bound {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}
.channel-extras {
  margin-top: .85rem;
  display: grid;
  gap: .65rem;
  padding-top: .75rem;
  border-top: 1px solid var(--hub-line);
}
.channel-extras.hidden { display: none; }
.channel-extras .toggle { margin: 0; }
.channel-extras textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}

.delivery-editor { margin: .5rem 0 1rem; }
.delivery-editor .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.delivery-editor h3 { margin: 0; font-size: .95rem; }
.delivery-opts { display: grid; gap: .5rem; }
.delivery-opt-row {
  display: grid;
  grid-template-columns: auto 1fr 5.5rem;
  gap: .45rem;
  align-items: center;
}
.delivery-opt-row input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }

.pay-box {
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--hub-line);
}
.pay-box h3 { margin: 0 0 .45rem; font-size: 1rem; }

.share-box {
  margin-top: 1rem;
  padding: .85rem;
  border-radius: 12px;
  background: #0a111c;
  border: 1px solid var(--hub-line);
  font-size: .88rem;
  display: grid;
  gap: .35rem;
}
.share-box a { color: var(--hub-accent-soft); word-break: break-all; }

/* ---- Orders ---- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
  margin-bottom: 1rem;
}
@media (min-width: 720px) {
  .kpi-row { grid-template-columns: repeat(4, 1fr); }
}
.kpi {
  background: var(--hub-panel);
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  padding: .85rem 1rem;
}
.kpi-val {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.kpi-label { color: var(--hub-muted); font-size: .8rem; margin-top: .15rem; }

.order-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .9rem;
}
.cat-chip {
  border: 1px solid var(--hub-line);
  background: transparent;
  color: var(--hub-muted);
  border-radius: 999px;
  padding: .35rem .75rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.cat-chip.active {
  background: var(--hub-green-soft);
  border-color: transparent;
  color: var(--hub-green);
}

.orders-list { display: grid; gap: .75rem; }
.order-card {
  background: var(--hub-panel);
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  padding: 1rem;
}
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .35rem;
}
.order-status {
  display: inline-block;
  margin-left: .45rem;
  font-size: .72rem;
  font-weight: 800;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  vertical-align: middle;
}
.status-new { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.status-paid, .status-done { background: var(--hub-green-soft); color: var(--hub-green); }
.status-cancelled { background: rgba(248, 113, 113, 0.14); color: #f87171; }
.status-shipped, .status-packing { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }
.order-pay-badge {
  display: inline-block;
  margin-left: .35rem;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: var(--hub-green-soft);
  color: var(--hub-green);
}
.order-meta { font-size: .85rem; margin-bottom: .35rem; }
.order-lines { font-size: .92rem; margin-bottom: .55rem; }
.order-actions {
  display: grid;
  gap: .55rem;
}
@media (min-width: 640px) {
  .order-actions {
    grid-template-columns: 1.2fr 1.4fr auto;
    align-items: end;
  }
}
.order-actions label { margin-bottom: 0; }
.order-actions select,
.order-actions input { min-height: 2.5rem; }

.preview-frame {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  background: #fff;
}

/* ---- Mobile ---- */
.hub-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 35;
}
@media (max-width: 900px) {
  .hub { grid-template-columns: 1fr; }
  .hub-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: min(288px, 88vw);
    overflow: auto;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 12px 0 40px rgba(0,0,0,.4);
  }
  body.sidebar-open .hub-sidebar { transform: none; }
  body.sidebar-open .hub-backdrop { display: block; }
  .hub-menu-btn { display: inline-grid; place-items: center; }
  .hub-content { padding: 1rem 1rem 2rem; }
  .hub-pill.plan span { display: none; }
}

/* ---- Staff ---- */
.owner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.owner-stat-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.35rem 0 0.85rem;
}
.owner-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--hub-muted);
}
.owner-stat-row b {
  color: var(--hub-text);
  font-weight: 750;
  text-align: right;
}
.owner-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.2rem;
  min-height: 110px;
  padding: 0.5rem 0.15rem 0;
  overflow-x: auto;
}
.owner-bar {
  flex: 1 0 10px;
  min-width: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  height: 100px;
}
.owner-bar i {
  display: block;
  width: 100%;
  max-width: 14px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #93c5fd, #4f8cff);
  min-height: 2px;
}
.owner-bar span {
  font-size: 0.58rem;
  color: var(--hub-muted);
  writing-mode: horizontal-tb;
  transform: scale(0.92);
}
.owner-users-table tbody tr.owner-user-row {
  cursor: pointer;
  transition: background .15s ease;
}
.owner-users-table tbody tr.owner-user-row:hover,
.owner-users-table tbody tr.owner-user-row:focus {
  background: rgba(79, 140, 255, 0.12);
  outline: none;
}
.owner-user-card {
  width: min(640px, 94vw);
  max-height: min(86vh, 900px);
  overflow: auto;
}
.owner-ch-links { display: grid; gap: 0.35rem; }
.owner-ch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.6rem; }
.owner-ch a { color: var(--hub-accent-soft, #93c5fd); font-weight: 750; }
.owner-ch small { color: var(--hub-muted); font-size: 0.75rem; }
.owner-users-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 380px);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}
@media (max-width: 980px) {
  .owner-users-layout { grid-template-columns: 1fr; }
}
.owner-preview-card { position: sticky; top: 0.75rem; }
.owner-preview-picker { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0 0.75rem; }
.owner-preview-chip,
.owner-users-table [data-owner-preview] {
  border: 1px solid var(--hub-line);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.owner-preview-chip.active,
.owner-users-table [data-owner-preview].active {
  background: rgba(79, 140, 255, 0.18);
  border-color: transparent;
  color: var(--hub-accent-soft, #93c5fd);
}
.owner-preview-frame,
.owner-card-preview {
  width: 100%;
  height: 640px;
  border: 1px solid var(--hub-line);
  border-radius: 16px;
  background: #fff;
}
.owner-card-preview { height: 520px; margin-top: 0.75rem; }
.owner-activity { max-width: 280px; color: var(--hub-muted); font-size: 0.84rem; line-height: 1.35; }
.owner-activity-lead { margin: 0 0 0.6rem; font-weight: 750; }
.owner-timeline { display: grid; gap: 0.4rem; }
.owner-tl-item {
  display: grid;
  grid-template-columns: 7.4rem 1fr;
  gap: 0.55rem;
  font-size: 0.86rem;
}
.owner-tl-item span { color: var(--hub-muted); }
.owner-tl-item b { font-weight: 650; }
.owner-user-body { display: grid; gap: .35rem; }
.owner-card-h {
  margin: 1rem 0 .45rem;
  font-size: .92rem;
  font-weight: 800;
  color: var(--hub-accent-soft);
}

.page-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.page-head-row .btn { flex-shrink: 0; }
.staff-table-wrap { overflow-x: auto; }
.staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.staff-table th,
.staff-table td {
  text-align: left;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--hub-line);
  vertical-align: middle;
}
.staff-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hub-muted);
  font-weight: 700;
}
.staff-actions { text-align: right; white-space: nowrap; }
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}
.role-badge.owner { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.role-badge.admin { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.role-badge.manager { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }
.staff-status { font-weight: 700; font-size: 0.88rem; }
.staff-status.ok { color: #34d399; }
.staff-status.pending { color: #fbbf24; }
.staff-status.off { color: #94a3b8; }

.staff-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.staff-modal.hidden { display: none; }
.staff-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 16, 0.55);
}
.staff-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: var(--hub-panel);
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.staff-modal-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.staff-modal-card label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hub-muted);
}
.staff-modal-card input,
.staff-modal-card select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--hub-line);
  background: var(--hub-bg, #0b1220);
  color: inherit;
  font: inherit;
}

/* Help / instructions */
.help-toc h2 { margin: 0 0 .75rem; font-size: 1.05rem; }
.help-toc-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: .35rem;
  columns: 2;
  column-gap: 1.5rem;
}
.help-toc-list li { break-inside: avoid; }
.help-toc-list a {
  color: var(--hub-accent-soft, #7dd3fc);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
}
.help-toc-list a:hover { text-decoration: underline; }
.help-section { scroll-margin-top: 1rem; }
.help-section h2 {
  margin: 0 0 .65rem;
  font-size: 1.15rem;
}
.help-section h3 {
  margin: 1rem 0 .4rem;
  font-size: .95rem;
  color: var(--hub-text, #e2e8f0);
}
.help-section > p { margin: 0 0 .65rem; color: var(--hub-muted); line-height: 1.45; }
.help-steps, .help-list {
  margin: 0 0 .85rem;
  padding-left: 1.2rem;
  color: var(--hub-text);
  line-height: 1.5;
}
.help-steps li, .help-list li { margin-bottom: .35rem; }
.help-section code {
  font-size: .85em;
  padding: .1em .35em;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
}
.help-bots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.help-faq { margin: 0; }
.help-faq dt {
  margin-top: .85rem;
  font-weight: 700;
  color: var(--hub-text);
}
.help-faq dt:first-child { margin-top: 0; }
.help-faq dd {
  margin: .25rem 0 0;
  color: var(--hub-muted);
  line-height: 1.45;
}
@media (max-width: 720px) {
  .help-toc-list { columns: 1; }
  .help-bots-grid { grid-template-columns: 1fr; }
}

.kind-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
}
.kind-card {
  text-align: left;
  border: 1px solid var(--hub-line);
  background: var(--hub-panel-2);
  color: var(--hub-text);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  cursor: pointer;
  font: inherit;
}
.kind-card b { display: block; margin-bottom: 0.2rem; }
.kind-card span { display: block; color: var(--hub-muted); font-size: 0.82rem; line-height: 1.35; }
.kind-card.active {
  border-color: var(--hub-accent);
  box-shadow: inset 0 0 0 1px var(--hub-accent);
}
.channel-kind-row {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--hub-line);
}
.channel-kind-row:first-child { border-top: 0; padding-top: 0; }
.channel-kind-row .kind-picker { margin: 0; }
.salon-master-form { display: grid; gap: 0.55rem; }
.hours-grid { display: grid; gap: 0.4rem; margin: 0.35rem 0 0.25rem; grid-column: 1 / -1; }
.hours-row {
  display: grid;
  grid-template-columns: auto 2.2rem 1fr 1fr;
  gap: 0.45rem;
  align-items: center;
  color: var(--hub-text);
  font-size: 0.9rem;
}
.hours-row input[type="time"] {
  font: inherit;
  color: var(--hub-text);
  background: var(--hub-panel-2);
  border: 1px solid var(--hub-line);
  border-radius: 10px;
  padding: 0.35rem 0.4rem;
}
@media (max-width: 720px) {
  .kind-picker { grid-template-columns: 1fr; }
}
.support-thread { display: flex; flex-direction: column; gap: .65rem; min-height: 2rem; }
.support-bubble {
  max-width: min(36rem, 100%);
  padding: .7rem .85rem;
  border-radius: 14px;
  border: 1px solid var(--hub-line);
  background: var(--hub-panel);
}
.support-bubble.mine { margin-left: auto; border-color: rgba(79, 140, 255, .45); }
.support-bubble .who { font-size: .78rem; margin-bottom: .25rem; }
.support-empty { margin: 0; }
