/* ============================================================
   Linkhop design tokens
   ============================================================ */
:root {
  --ink: #1e2330;
  --concrete: #676b5f;
  --sand: #e0e2d9;
  --marble: #f3f3f1;
  --lime: #d2e823;
  --forest: #254f1a;
  --white: #ffffff;

  --font-product: "Hopper Sans", "Link Sans Product", "Link Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-card: 24px;
  --radius-input: 12px;
  --radius-pill: 9999px;

  --shadow-card: 0 1px 2px rgba(30, 35, 48, .04), 0 8px 24px rgba(30, 35, 48, .06);
  --shadow-pop: 0 12px 40px rgba(30, 35, 48, .16);
  --hairline: #e6e7e2;

  --admin-bg: #f7f8f5;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-product);
  color: var(--ink);
  background: var(--marble);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }
a { color: inherit; }

/* ============================================================
   Public profile page
   ============================================================ */
.lh-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 32px;
  background: var(--lh-bg, var(--marble));
  color: var(--lh-text, var(--ink));
  font-family: var(--lh-font, var(--font-product));
  --lh-radius: 9999px;
  --lh-shadow: 0 4px 8px rgba(0, 0, 0, .12);
  --lh-btn-bg: #fff;
  --lh-btn-text: #000;
  transition: background .25s ease, color .25s ease;
}

.lh-page[data-roundness="square"]  { --lh-radius: 0px; }
.lh-page[data-roundness="round"]   { --lh-radius: 12px; }
.lh-page[data-roundness="rounder"] { --lh-radius: 24px; }
.lh-page[data-roundness="full"]    { --lh-radius: 9999px; }

.lh-page[data-shadow="none"]   { --lh-shadow: none; }
.lh-page[data-shadow="soft"]   { --lh-shadow: 0 4px 8px rgba(0, 0, 0, .12); }
.lh-page[data-shadow="strong"] { --lh-shadow: 0 8px 20px rgba(0, 0, 0, .22); }
.lh-page[data-shadow="hard"]   { --lh-shadow: 0 4px 0 rgba(0, 0, 0, .85); }

.lh-wrap {
  width: 100%;
  max-width: 524px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lh-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  background: var(--lh-btn-bg);
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--lh-btn-text);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .55);
  user-select: none;
  flex: 0 0 auto;
}

.lh-verified {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-left: 4px;
}

.lh-title {
  margin: 16px 0 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.01em;
  text-align: center;
}

.lh-bio {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
  text-align: center;
  max-width: 60ch;
  opacity: .82;
  white-space: pre-wrap;
}

.lh-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 4px;
  flex-wrap: wrap;
}

.lh-social {
  width: 24px;
  height: 24px;
  display: block;
  opacity: .85;
  transition: transform .15s ease, opacity .15s ease;
}
.lh-social:hover { transform: translateY(-2px); opacity: 1; }
.lh-social svg { width: 100%; height: 100%; display: block; fill: currentColor; }

.lh-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.lh-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 20px;
  border-radius: var(--lh-radius);
  background: var(--lh-btn-bg);
  color: var(--lh-btn-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: var(--lh-shadow);
  transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s ease, filter .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.lh-page[data-style="outline"] .lh-link {
  background: transparent;
  border: 2px solid var(--lh-btn-bg);
  box-shadow: none;
}

.lh-page[data-style="glass"] .lh-link {
  background: color-mix(in srgb, var(--lh-btn-bg) 28%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid color-mix(in srgb, #fff 45%, transparent);
}

.lh-link:hover {
  transform: translateY(-2px) scale(1.008);
  filter: brightness(1.02);
}
.lh-page[data-shadow="hard"] .lh-link:hover {
  transform: translate(0, -1px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .85);
}
.lh-link:active { transform: translateY(0) scale(.995); }

.lh-link-body { flex: 1 1 auto; min-width: 0; }
.lh-link-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lh-link-sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  opacity: .65;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lh-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(0, 0, 0, .06);
}

.lh-header-row {
  width: 100%;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  opacity: .6;
  padding: 4px 0;
  letter-spacing: .01em;
}

.lh-foot {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px;
  border-radius: 64px;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
  transition: transform .15s ease;
}
.lh-pill:hover { transform: translateY(-1px); }
.lh-pill svg { width: 20px; height: 20px; }

.lh-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  opacity: .55;
  flex-wrap: wrap;
  justify-content: center;
}
.lh-meta a { text-decoration: none; }
.lh-meta a:hover { text-decoration: underline; }

.lh-share {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .06);
  color: inherit;
  cursor: pointer;
  transition: background .15s ease;
}
.lh-share:hover { background: rgba(0, 0, 0, .12); }
.lh-share svg { width: 18px; height: 18px; }

.lh-empty {
  text-align: center;
  padding: 32px 16px;
  opacity: .55;
  font-size: 15px;
}

/* ============================================================
   Admin shell
   ============================================================ */
.adm {
  display: flex;
  min-height: 100vh;
  background: var(--admin-bg);
}

.adm-sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--hairline);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 18px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
}
.adm-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--forest);
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.adm-nav-item:hover { background: var(--marble); }
.adm-nav-item[aria-current="page"] { background: var(--ink); color: var(--white); }
.adm-nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }

.adm-nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--concrete);
  padding: 16px 12px 6px;
  font-weight: 600;
}

.adm-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--marble);
  font-size: 13px;
}
.adm-user-dot {
  width: 28px; height: 28px;
  border-radius: 9999px;
  background: var(--forest);
  color: var(--lime);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}

.adm-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.adm-topbar {
  height: 64px;
  border-bottom: 1px solid var(--hairline);
  background: var(--white);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.adm-tabs {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.adm-tab {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  border: 0;
  background: none;
  cursor: pointer;
}
.adm-tab:hover { background: var(--marble); }
.adm-tab[aria-selected="true"] { background: var(--marble); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, transform .12s ease;
}
.btn:hover { background: var(--marble); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-primary:hover { background: #2c3242; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: #b42318; border-color: #f3c0bb; }
.btn-danger:hover { background: #fef3f2; }
.btn svg { width: 16px; height: 16px; }

.adm-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  padding: 24px;
  align-items: start;
}

.adm-panel {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: 0 1px 2px rgba(30, 35, 48, .03);
}
.adm-panel + .adm-panel { margin-top: 16px; }

.adm-h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}
.adm-h2 {
  font-size: 15px;
  font-weight: 650;
  margin: 0 0 12px;
}
.adm-sub {
  font-size: 13px;
  color: var(--concrete);
  margin: -8px 0 16px;
}

/* profile row */
.adm-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 16px;
}
.adm-avatar {
  width: 64px; height: 64px;
  border-radius: 9999px;
  background: var(--marble);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
  color: var(--concrete);
  overflow: hidden;
  flex: 0 0 auto;
}
.adm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.adm-handle { font-size: 13px; color: var(--concrete); }

.adm-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid var(--hairline);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.adm-social-chip:hover { background: var(--marble); }
.adm-social-chip.draggable { cursor: grab; }
.adm-social-chip.draggable:active { cursor: grabbing; }
.adm-social-chip.dragging { opacity: .4; }
.adm-social-chip.drop-target {
  border-color: var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
}
.adm-socials-inline { gap: 8px; }

.adm-social-chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--marble);
  box-shadow: inset 0 0 0 1px var(--ink);
}
/* Inline SVGs carry a viewBox but no intrinsic size, so they collapse to 0x0
   inside a flex chip. Size them explicitly wherever the icon is rendered. */
.adm-social-chip svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
  display: block;
}
.adm-social-chip .x { opacity: .45; font-size: 15px; line-height: 1; }
.adm-social-chip:hover .x { opacity: 1; color: #b42318; }

/* links list */
.link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--white);
  margin-bottom: 10px;
  transition: box-shadow .15s ease, opacity .15s ease;
}
.link-row:hover { box-shadow: var(--shadow-card); }
.link-row.dragging { opacity: .4; }
.link-row.drop-target { box-shadow: 0 0 0 2px var(--forest); }
.link-row.hidden-link { opacity: .55; }

.link-grip {
  cursor: grab;
  color: var(--concrete);
  display: grid;
  place-items: center;
  width: 22px;
  flex: 0 0 auto;
  touch-action: none;
}
.link-grip svg { width: 16px; height: 16px; }

.link-info { flex: 1 1 auto; min-width: 0; }
.link-title {
  font-size: 14px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-url {
  font-size: 12px;
  color: var(--concrete);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--marble);
  color: var(--concrete);
}
.link-clicks {
  font-size: 12px;
  color: var(--concrete);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.link-actions { display: flex; gap: 4px; }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--concrete);
  display: grid; place-items: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--marble); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

/* toggle */
.switch {
  position: relative;
  width: 38px; height: 22px;
  border-radius: 9999px;
  border: 0;
  background: var(--sand);
  cursor: pointer;
  transition: background .18s ease;
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 9999px;
  background: var(--white);
  transition: transform .18s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch[aria-checked="true"] { background: var(--forest); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* forms */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(37, 79, 26, .12);
}
.textarea { resize: vertical; min-height: 78px; }

.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1 1 0; }

/* design controls */
.opt-group { margin-bottom: 18px; }
.opt-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.opt-label span:last-child { color: var(--concrete); font-weight: 400; font-size: 12px; }

.seg {
  display: flex;
  gap: 4px;
  background: var(--marble);
  padding: 4px;
  border-radius: 12px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1 1 auto;
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
}
.seg button[aria-pressed="true"] { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.themes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}
.theme-tile {
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}
.theme-tile[aria-pressed="true"] { border-color: var(--ink); }
.theme-swatch {
  height: 56px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  justify-content: center;
}
.theme-swatch i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .9);
}
.theme-name { font-size: 12px; font-weight: 500; padding: 6px 2px 2px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch {
  width: 30px; height: 30px;
  border-radius: 9999px;
  border: 2px solid var(--hairline);
  cursor: pointer;
  padding: 0;
}
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--white) inset; }
.swatch-custom {
  width: 30px; height: 30px;
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  padding: 0;
  cursor: pointer;
  background: var(--marble);
}
.swatch-custom input { width: 46px; height: 46px; border: 0; padding: 0; margin: -8px 0 0 -8px; cursor: pointer; background: none; }

/* preview */
.adm-preview {
  position: sticky;
  top: 88px;
}
.preview-frame {
  border-radius: var(--radius-card);
  background: var(--marble);
  padding: 18px;
  display: flex;
  justify-content: center;
  border: 1px solid var(--hairline);
}
.preview-scale {
  width: 340px;
  height: 560px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--lh-bg, #f3f3f1);
  box-shadow: 0 10px 30px rgba(30, 35, 48, .14);
  position: relative;
}
.preview-scale .lh-page {
  width: 680px;
  height: 1120px;
  transform: scale(.5);
  transform-origin: top left;
  padding: 40px 32px 28px;
  min-height: 0;
}
.preview-scale .lh-links { gap: 14px; margin-top: 20px; }
.preview-scale .lh-avatar { width: 84px; height: 84px; }
.preview-scale .lh-title { font-size: 22px; }
.preview-note {
  font-size: 12px;
  color: var(--concrete);
  text-align: center;
  margin-top: 10px;
}

/* insights */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 14px;
}
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--concrete); margin-top: 2px; }
.stat-delta { font-size: 12px; font-weight: 600; color: var(--forest); }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 8px; }
.chart-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 100%; justify-content: center; }
.chart-bar { width: 9px; border-radius: 4px 4px 0 0; min-height: 2px; transition: height .3s ease; }
.chart-bar.views { background: var(--sand); }
.chart-bar.clicks { background: var(--forest); }
.chart-day { font-size: 11px; color: var(--concrete); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--concrete); margin-top: 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 13px; align-items: center; }
.bar-track { grid-column: 1 / -1; height: 6px; background: var(--marble); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--forest); border-radius: 3px; }

/* image uploader */
.uploader {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed var(--hairline);
  border-radius: 16px;
  background: #fcfcfa;
  transition: border-color .15s ease, background .15s ease;
}
.uploader.dragover {
  border-color: var(--forest);
  background: rgba(37, 79, 26, .05);
}
.upload-preview {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--white);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.upload-preview.is-circle { border-radius: 9999px; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-empty { font-size: 11px; color: var(--concrete); }
.upload-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1 1 220px; }
.upload-hint { flex: 1 1 100%; margin: 0; font-size: 12px; color: var(--concrete); }
.upload-url-row { flex: 1 1 100%; display: flex; gap: 8px; }
.upload-url-row .input { flex: 1 1 auto; }

/* modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 35, 48, .45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
  animation: fade .15s ease;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-pop);
  animation: pop .18s cubic-bezier(.2,.8,.2,1);
}
.modal h3 { margin: 0 0 16px; font-size: 18px; letter-spacing: -.01em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  z-index: 200;
  animation: pop .18s ease;
}
.toast[hidden] { display: none; }

.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--concrete);
}
.empty-state h3 { color: var(--ink); margin: 0 0 6px; font-size: 16px; }
.empty-state p { margin: 0 0 16px; font-size: 14px; }

/* responsive */
@media (max-width: 1080px) {
  .adm-body { grid-template-columns: 1fr; }
  .adm-preview { position: static; order: -1; }
  .preview-scale { width: 100%; max-width: 340px; }
}
@media (max-width: 760px) {
  .adm { flex-direction: column; }
  .adm-sidebar {
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    align-items: center;
  }
  .adm-brand { padding: 0 12px 0 4px; }
  .adm-nav { flex-direction: row; }
  .adm-nav-label, .adm-user { display: none; }
  .adm-nav-item { white-space: nowrap; }
  .adm-body { padding: 14px; }
  .lh-page { padding: 32px 18px 24px; }
}

/* ============================================================
   Public profile — added surfaces
   ============================================================ */
.lh-page { position: relative; overflow-x: clip; }

.lh-banner {
  width: 100%;
  max-width: 524px;
  margin: 0 0 22px;
  padding: 10px 18px;
  border-radius: 9999px;
  background: var(--lh-btn-bg);
  color: var(--lh-btn-text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--lh-shadow);
}
.lh-banner:hover { filter: brightness(1.03); }

.lh-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lh-page[data-header="hero"] .lh-header {
  align-items: flex-start;
  padding: 24px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--lh-btn-bg) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--lh-btn-text) 10%, transparent);
}
.lh-page[data-header="hero"] .lh-title,
.lh-page[data-header="hero"] .lh-bio { text-align: left; }
.lh-page[data-header="hero"] .lh-socials { justify-content: flex-start; }

.lh-page[data-header="banner"] .lh-header {
  padding: 26px 20px 22px;
  border-radius: 20px;
  background: var(--lh-btn-bg);
  color: var(--lh-btn-text);
}
.lh-page[data-header="banner"] .lh-title { color: var(--lh-btn-text); }

.lh-page[data-header="cutout"] .lh-avatar {
  width: 112px;
  height: 112px;
  margin-bottom: -28px;
  border: 5px solid var(--lh-bg);
  box-shadow: none;
}
.lh-page[data-header="cutout"] .lh-header { padding-bottom: 6px; }

.lh-page[data-header="shape"] .lh-avatar,
.lh-page[data-header="shape"] .lh-logo {
  border-radius: 22px;
  transform: rotate(-3deg);
}

.lh-logo {
  max-width: 220px;
  max-height: 96px;
  object-fit: contain;
  display: block;
}

.lh-verified-badge {
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-left: 5px;
  vertical-align: -2px;
  color: #1d9bf0;
}
.lh-verified-badge svg { width: 100%; height: 100%; display: block; }

.lh-followers {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: .7;
}

.lh-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-top: 26px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--lh-text) 8%, transparent);
}
.lh-tab {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px;
  border-radius: 9999px;
  cursor: pointer;
}
.lh-tab[aria-selected="true"] { background: var(--lh-btn-bg); color: var(--lh-btn-text); }

.lh-products {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.lh-product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--lh-btn-bg);
  color: var(--lh-btn-text);
  text-decoration: none;
  box-shadow: var(--lh-shadow);
  transition: transform .16s ease;
}
.lh-product:hover { transform: translateY(-2px); }
.lh-product-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: rgba(0,0,0,.06); }
.lh-product-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.lh-product-title { font-size: 14px; font-weight: 650; }
.lh-product-desc { font-size: 12px; opacity: .7; }
.lh-product-price { font-size: 14px; font-weight: 700; margin-top: 4px; }

.lh-collection { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.lh-collection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  opacity: .85;
}
.lh-collection-head svg { width: 18px; height: 18px; transition: transform .18s ease; }
.lh-collection-head[aria-expanded="false"] svg { transform: rotate(-90deg); }
.lh-collection-body { display: flex; flex-direction: column; gap: 16px; }
.lh-collection-body[hidden] { display: none; }

.lh-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.lh-action {
  border: 1px solid color-mix(in srgb, var(--lh-text) 22%, transparent);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background .15s ease;
}
.lh-action:hover { background: color-mix(in srgb, var(--lh-text) 7%, transparent); }

.lh-link-arrow { font-size: 18px; opacity: .55; }
.lh-form-link { border: 0; font: inherit; text-align: left; cursor: pointer; }

.lh-sticker {
  position: absolute;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
  z-index: 0;
}
.lh-wrap, .lh-banner { position: relative; z-index: 1; }

.lh-lock {
  width: 100%;
  max-width: 420px;
  margin: 8vh auto 0;
  padding: 30px 26px;
  border-radius: 24px;
  background: var(--lh-btn-bg);
  color: var(--lh-btn-text);
  box-shadow: var(--lh-shadow);
  text-align: center;
}
.lh-lock-head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lh-lock .lh-avatar { width: 72px; height: 72px; font-size: 28px; }
.lh-lock .lh-title { margin: 4px 0 0; color: inherit; }
.lh-lock-sub { margin: 0; font-size: 14px; opacity: .72; line-height: 1.45; }
.lh-lock-form { display: flex; gap: 8px; margin-top: 20px; }
.lh-lock-form .input {
  flex: 1 1 auto;
  border-color: color-mix(in srgb, var(--lh-btn-text) 18%, transparent);
  background: color-mix(in srgb, var(--lh-btn-text) 6%, transparent);
  color: var(--lh-btn-text);
}
.lh-lock-error { margin: 12px 0 0; font-size: 13px; color: #b42318; }
.lh-lock-icon {
  width: 44px; height: 44px;
  border-radius: 9999px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--lh-btn-text) 12%, transparent);
  font-size: 22px; font-weight: 800;
}

.lh-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 22, 28, .5);
  backdrop-filter: blur(3px);
}
.lh-modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  border-radius: 20px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  animation: pop .18s cubic-bezier(.2,.8,.2,1);
}
.lh-modal-card h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; }
.lh-modal-desc { margin: 0 0 18px; font-size: 13px; color: var(--concrete); }
.lh-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border: 0; border-radius: 9999px;
  background: var(--marble);
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.lh-modal-field { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.lh-modal-field input, .lh-modal-field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font: inherit;
  font-weight: 400;
  resize: vertical;
}
.lh-modal-field input:focus, .lh-modal-field textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(37,79,26,.12);
}
.lh-modal-card .btn { width: 100%; margin-top: 6px; }
.lh-modal-error { margin: 10px 0 0; color: #b42318; font-size: 13px; }

.lh-page[data-wallpaper="gradient"] {
  background-image: linear-gradient(150deg, var(--lh-bg) 10%, color-mix(in srgb, var(--lh-bg) 45%, var(--lh-btn-bg)) 100%);
}

/* ============================================================
   Admin — shell additions
   ============================================================ */
.adm-nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--forest);
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.adm-nav-item[aria-current="page"] .adm-nav-badge { background: var(--lime); color: var(--forest); }
.adm-settings-gear { width: 38px; height: 38px; border: 1px solid var(--hairline); }
.adm-body.no-preview { grid-template-columns: minmax(0, 1fr); }
.content-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.content-head .adm-h1 { margin-bottom: 12px; }
.row-check { width: 17px; height: 17px; accent-color: var(--forest); flex: 0 0 auto; }

.collection-card {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fcfcfa;
}
.collection-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.collection-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.collection-title svg { width: 16px; height: 16px; color: var(--concrete); }
.collection-body .link-row { background: var(--white); }
.collection-body .set-muted { margin: 2px 4px 8px; }

.product-thumb {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--marble);
  display: grid; place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  color: var(--concrete);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-settings { border: 1px solid var(--hairline); border-radius: 16px; padding: 6px 14px; margin-bottom: 16px; }
.shop-settings .opt-group { margin: 10px 0; }

.add-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.add-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.add-tile:hover { border-color: var(--ink); background: var(--marble); }
.add-tile strong { font-size: 14px; }
.add-tile span { font-size: 12px; color: var(--concrete); line-height: 1.35; }

.design-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--hairline);
  margin: 0 0 20px;
  padding-bottom: 2px;
}
.design-tabs button {
  border: 0;
  background: none;
  padding: 9px 12px;
  border-radius: 9px 9px 0 0;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--concrete);
  cursor: pointer;
  white-space: nowrap;
}
.design-tabs button:hover { background: var(--marble); color: var(--ink); }
.design-tabs button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.design-body { min-height: 120px; }

.sticker-palette { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.sticker-add {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--white);
  font-size: 21px;
  cursor: pointer;
}
.sticker-add:hover { background: var(--marble); transform: translateY(-1px); }
.sticker-list { display: flex; flex-direction: column; gap: 8px; }
.sticker-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
}
.sticker-emoji { font-size: 22px; width: 30px; text-align: center; }
.range { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--concrete); }
.range input { width: 92px; accent-color: var(--forest); }

/* ============================================================
   Admin — settings + tools
   ============================================================ */
.set-panel { padding: 24px; }
.set-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.set-head .adm-h1 { margin-bottom: 4px; }
.set-head .adm-sub { margin: 0; }
.pane-tabs { display: flex; gap: 4px; background: var(--marble); padding: 4px; border-radius: 12px; }
.pane-tabs button {
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 550;
  padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--ink); white-space: nowrap;
}
.pane-tabs button[aria-selected="true"] { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.set-body { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.set-card { border: 1px solid var(--hairline); border-radius: 18px; overflow: hidden; background: var(--white); }
.set-card-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--hairline); }
.set-card-head h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.set-card-head .set-desc { margin: 4px 0 0; }
.set-card-body { padding: 6px 20px 18px; }
.set-card-body > h3.set-sub-title:first-child { margin-top: 14px; }
.set-desc { font-size: 13px; line-height: 1.45; color: var(--concrete); margin: 0 0 12px; }
.set-muted { font-size: 12px; color: var(--concrete); margin: 8px 0 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid #f1f2ee; }
.set-row:last-child { border-bottom: 0; }
.set-row-main { min-width: 0; }
.set-row-title { font-size: 13px; font-weight: 650; }
.set-row-desc { font-size: 12px; color: var(--concrete); margin-top: 2px; line-height: 1.4; max-width: 60ch; }
.set-row-control { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.set-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.set-inline-edit { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; padding: 0 0 14px; }
.set-form { margin-top: 8px; }
.set-sub-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.set-sub-title { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.set-feature { padding: 16px 0; border-top: 1px solid var(--hairline); }
.set-feature:first-of-type { border-top: 0; padding-top: 10px; }
.set-feature-head { display: flex; align-items: center; gap: 8px; }
.set-feature-head .set-sub-title { margin: 0; }
.set-list { display: flex; flex-direction: column; }
.set-owned { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; border-bottom: 1px solid var(--hairline); }
.set-owned-avatar { width: 40px; height: 40px; border-radius: 9999px; background: var(--forest); color: var(--lime); display: grid; place-items: center; font-weight: 700; }
.set-owned-name { font-size: 14px; font-weight: 650; }
.set-danger-zone .set-sub-title { color: #b42318; }
.set-jump { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.set-jump-link {
  font-size: 12px; font-weight: 550; text-decoration: none;
  padding: 6px 11px; border-radius: 9999px; border: 1px solid var(--hairline); color: var(--ink);
}
.set-jump-link:hover { background: var(--marble); }
.set-table { display: flex; flex-direction: column; margin-top: 10px; border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.set-table-row { display: grid; grid-template-columns: 1.4fr .8fr .7fr .7fr 1.4fr; gap: 10px; align-items: center; padding: 10px 12px; font-size: 12px; border-bottom: 1px solid #f1f2ee; }
.set-table-row:last-child { border-bottom: 0; }
.set-table-row.head { background: var(--marble); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--concrete); font-weight: 650; }
.set-table-row .btn { height: 28px; padding: 0 10px; font-size: 12px; justify-self: start; }
.invoice-desc { color: var(--concrete); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 9999px; font-size: 11px; font-weight: 650; white-space: nowrap; width: fit-content; }
.pill-ink { background: var(--ink); color: var(--white); }
.pill-lime { background: var(--lime); color: var(--forest); }
.pill-ok { background: #e8f5e4; color: #1f6b12; }
.pill-soft { background: var(--marble); color: var(--concrete); }
.char-count { display: block; font-size: 11px; color: var(--concrete); font-weight: 400; text-align: right; margin-top: 4px; }
.field label .char-count { display: inline; float: right; margin-top: 2px; }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.provider-card { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--white); cursor: pointer; font: inherit; }
.provider-card:hover { background: var(--marble); }
.provider-card[aria-pressed="true"] { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.provider-name { font-size: 13px; font-weight: 650; }
.provider-state { font-size: 11px; color: var(--concrete); }
.provider-card[aria-pressed="true"] .provider-state { color: var(--forest); font-weight: 650; }
.agent-token { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--marble); }
.agent-token code, .agent-code { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
.agent-code { background: var(--white); border: 1px solid var(--hairline); border-radius: 8px; padding: 7px 9px; }
.strength { max-width: 560px; }
.strength-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 8px; }
.strength-track { height: 8px; border-radius: 4px; background: var(--marble); overflow: hidden; margin-bottom: 14px; }
.strength-fill { height: 100%; border-radius: 4px; background: var(--forest); transition: width .3s ease; }
.strength-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.strength-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--concrete); }
.strength-item.done { color: var(--ink); }
.strength-dot { width: 16px; height: 16px; border-radius: 9999px; border: 1px solid var(--hairline); display: grid; place-items: center; font-size: 10px; color: var(--white); flex: 0 0 auto; }
.strength-item.done .strength-dot { background: var(--forest); border-color: var(--forest); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--hairline); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.plan-card.current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.plan-name { font-size: 14px; font-weight: 700; }
.plan-price { font-size: 28px; font-weight: 750; letter-spacing: -.03em; }
.plan-blurb { font-size: 12px; color: var(--concrete); line-height: 1.4; }
.plan-card .btn, .plan-card .pill { margin-top: 10px; }
.payment-card {
  width: 100%; max-width: 330px; padding: 20px; border-radius: 16px; color: var(--white);
  background: linear-gradient(135deg, #1e2330, #3b4356); display: flex; flex-direction: column; gap: 6px;
}
.payment-brand { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.payment-number { font-family: var(--font-mono); font-size: 17px; letter-spacing: .06em; }
.payment-exp { font-size: 12px; opacity: .7; }
.message-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.message-item { border: 1px solid var(--hairline); border-radius: 14px; padding: 13px 15px; }
.message-item.unread { border-color: var(--forest); background: #fbfdf7; }
.message-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.message-body { margin: 7px 0 10px; font-size: 13px; line-height: 1.5; color: #3b3f38; white-space: pre-wrap; }
.short-table .set-table-row { grid-template-columns: 1.3fr 2fr .5fr .6fr; }
.short-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.short-cell code { font-family: var(--font-mono); font-size: 12px; }
.short-dest { color: var(--concrete); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-rows { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.rate-row { display: grid; grid-template-columns: 1fr 130px auto; gap: 8px; }
.rate-row .btn { height: 38px; }

/* Media kit */
.mk-page { max-width: 880px; margin: 0 auto; padding: 56px 24px 64px; }
.mk-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.mk-avatar { width: 76px; height: 76px; border-radius: 9999px; object-fit: cover; background: var(--sand); display: grid; place-items: center; font-size: 28px; font-weight: 700; }
.mk-eyebrow { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--concrete); }
.mk-title { margin: 4px 0 0; font-size: 34px; letter-spacing: -.03em; }
.mk-card { border: 1px solid var(--hairline); border-radius: 20px; background: var(--white); padding: 22px; margin-bottom: 16px; }
.mk-card h2 { margin: 0 0 10px; font-size: 16px; }
.mk-card p { margin: 0; font-size: 14px; line-height: 1.6; color: #3b3f38; }
.mk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.mk-stat { border: 1px solid var(--hairline); border-radius: 14px; padding: 14px; }
.mk-stat strong { display: block; font-size: 24px; letter-spacing: -.02em; }
.mk-stat span { font-size: 12px; color: var(--concrete); }
.mk-rates { display: flex; flex-direction: column; gap: 2px; }
.mk-rate { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.mk-rate:last-child { border-bottom: 0; }
.mk-rate b { font-weight: 650; }
.mk-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mk-link { display: block; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 550; }
.mk-link:hover { background: var(--marble); }
.mk-cta { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 9999px; background: var(--ink); color: var(--white); text-decoration: none; font-size: 14px; font-weight: 600; }
.mk-foot { margin-top: 28px; font-size: 12px; color: var(--concrete); display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .set-inline-edit { grid-template-columns: 1fr; }
  .strength-list { grid-template-columns: 1fr; }
  .set-table-row { grid-template-columns: 1.6fr 1fr .7fr; }
  .set-table-row > :nth-child(5) { display: none; }
  .short-table .set-table-row { grid-template-columns: 1fr auto; }
  .short-table .set-table-row > :nth-child(2),
  .short-table .set-table-row > :nth-child(3) { display: none; }
  .add-menu { grid-template-columns: 1fr; }
  .mk-links { grid-template-columns: 1fr; }
  .lh-products { grid-template-columns: 1fr; }
}

/* Mobile shell: keep topbar and nav scrollable inside the viewport instead
   of letting their intrinsic width stretch the document. */
.adm { overflow-x: clip; }
@media (max-width: 760px) {
  .adm-topbar { overflow-x: auto; gap: 8px; padding: 0 12px; }
  .adm-tabs { flex: 0 0 auto; }
  .adm-topbar .btn, .adm-settings-gear { flex: 0 0 auto; }
  .adm-nav { flex: 0 0 auto; }
  .adm-body { min-width: 0; }
  .set-panel { padding: 16px; }
  .set-row { align-items: flex-start; }
  .pane-tabs { width: 100%; overflow-x: auto; }
}

.url-field { display: flex; align-items: center; gap: 8px; }
.url-field span { font-size: 12px; color: var(--concrete); white-space: nowrap; }
.url-field .input { flex: 1 1 auto; min-width: 0; }

.invoice-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.invoice-dl {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--ink);
}
.invoice-dl:hover { background: var(--marble); }

.adm-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}
.adm-switch:hover { background: var(--marble); }
.adm-switch-avatar {
  width: 22px; height: 22px;
  border-radius: 9999px;
  background: var(--forest);
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}
.adm-switch svg { width: 14px; height: 14px; opacity: .5; }
.switch-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.switch-row:hover { background: var(--marble); }
.switch-row-avatar {
  width: 32px; height: 32px;
  border-radius: 9999px;
  background: var(--forest);
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}
.switch-row-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.switch-row-main strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-row-main span { font-size: 11px; color: var(--concrete); }
.switch-create { width: 100%; }
@media (max-width: 1100px) {
  .adm-switch-name { display: none; }
}
