/* MM Admin — panel design system. Neutral warm chrome + per-client --mmadm-accent
   (set inline) reserved for primary actions, focus, and active nav. Keep all
   adm-* selectors; templates/JS depend on them. */
:root {
  --mmadm-bg: #f6f3ee; --mmadm-ink: #1c1c1c; --mmadm-muted: #6b6b6b;
  --mmadm-card: #ffffff; --mmadm-line: #e7e2da; --mmadm-danger: #b3261e;
  --mmadm-accent: #1f2e22; /* per-client override injected inline */
  --mmadm-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mmadm-radius: 14px;
  --mmadm-radius-sm: 10px;
  --mmadm-shadow-sm: 0 1px 2px rgba(28,24,18,.04), 0 1px 3px rgba(28,24,18,.05);
  --mmadm-shadow-md: 0 4px 14px rgba(28,24,18,.06), 0 2px 6px rgba(28,24,18,.04);
  --mmadm-shadow-lg: 0 18px 48px rgba(28,24,18,.12), 0 6px 18px rgba(28,24,18,.07);
  --mmadm-ease: cubic-bezier(.2,.7,.3,1);
  --adm-top-h: 65px;
  --adm-side-w: 250px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--mmadm-accent) 5%, transparent), transparent 60%),
    var(--mmadm-bg);
  background-attachment: fixed;
  color: var(--mmadm-ink);
  font: 16px/1.6 var(--mmadm-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -.005em;
}

/* ---------- App shell: sidebar + main ---------- */
.adm-app { display: grid; grid-template-columns: var(--adm-side-w) 1fr; min-height: 100vh; }
.adm-shell { min-width: 0; display: flex; flex-direction: column; }

.adm-side {
  position: sticky; top: 0; height: 100vh; z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 14px; background: var(--mmadm-card);
  border-right: 1px solid var(--mmadm-line); overflow-y: auto;
}
.adm-side__brand { display: flex; align-items: center; gap: 11px; padding: 8px 10px 18px; font-weight: 800; letter-spacing: -.02em; }
.adm-side__mark { width: 34px; height: 34px; border-radius: 9px; background: var(--mmadm-accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.adm-side__logo { height: 32px; width: auto; }
.adm-side__client { font-size: 1rem; }
.adm-side__group { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--mmadm-muted); padding: 14px 12px 6px; opacity: .8; }

.adm-nav { display: flex; flex-direction: column; gap: 2px; }
.adm-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--mmadm-radius-sm);
  color: var(--mmadm-muted); text-decoration: none; font-weight: 600; font-size: .94rem;
  transition: background .15s var(--mmadm-ease), color .15s var(--mmadm-ease); }
.adm-nav a svg { width: 19px; height: 19px; flex: none; }
.adm-nav a:hover { background: color-mix(in srgb, var(--mmadm-accent) 7%, transparent); color: var(--mmadm-ink); }
.adm-nav a[aria-current="page"] { background: color-mix(in srgb, var(--mmadm-accent) 12%, transparent);
  color: color-mix(in srgb, var(--mmadm-accent) 78%, #000); }
.adm-nav a[aria-current="page"] svg { color: var(--mmadm-accent); }

.adm-side__spacer { flex: 1 1 auto; }

/* sidebar-bottom user menu (reuses .adm-user* JS hook) */
.adm-side__user { position: relative; margin: 0; }
.adm-side__user .adm-user__trigger { display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  background: none; cursor: pointer; text-align: left; }
.adm-side__user .adm-user__trigger:hover { background: color-mix(in srgb, var(--mmadm-ink) 3%, transparent); }
.adm-side__uinfo { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.adm-side__uname { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-side__urole { font-size: .78rem; color: var(--mmadm-muted); }
.adm-side__user .adm-user__trigger > svg { width: 16px; height: 16px; color: var(--mmadm-muted); flex: none; }
.adm-side__user .adm-user__menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; width: 100%; }

/* ---------- Top bar (slim) ---------- */
.adm-top { display: flex; align-items: center; gap: 16px; height: var(--adm-top-h);
  padding: 0 32px; border-bottom: 1px solid var(--mmadm-line); background: var(--mmadm-bg);
  position: sticky; top: 0; z-index: 30; }
.adm-top__burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--mmadm-ink); }
.adm-top__burger svg { width: 22px; height: 22px; }
.adm-top__title { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.adm-top__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.adm-top__search { display: flex; align-items: center; gap: 9px; min-width: 240px;
  padding: 8px 15px; border: 1px solid var(--mmadm-line); border-radius: 999px;
  background: var(--mmadm-card); color: var(--mmadm-muted); font-size: .9rem; }
.adm-top__search svg { width: 16px; height: 16px; }
.adm-top__bell { width: 38px; height: 38px; border-radius: 50%; background: var(--mmadm-card);
  border: 1px solid var(--mmadm-line); display: grid; place-items: center; color: var(--mmadm-muted); cursor: pointer; }
.adm-top__bell svg { width: 18px; height: 18px; }

/* ---------- Main (full width) ---------- */
.adm-main { padding: 28px 32px 60px; flex: 1; }

/* ---------- Layout ---------- */
.adm-h1 {
  font-size: 1.85rem; font-weight: 800; line-height: 1.2; letter-spacing: -.025em;
  margin: 0 0 24px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.adm-h1 .adm-meta { font-size: .9rem; font-weight: 600; }
/* meta/secondary anchors adopt accent, never browser-blue */
a.adm-meta, .adm-h1 a { color: var(--mmadm-accent); text-decoration: none; }
a.adm-meta:hover, .adm-h1 a:hover { color: color-mix(in srgb, var(--mmadm-accent) 80%, #000); text-decoration: underline; }
/* content anchors inside cards/tables never fall back to browser-blue.
   Exclude .adm-mgr-tab (filter chips manage their own active white-on-accent). */
.adm-card a:not(.adm-btn):not(.adm-user__item):not(.adm-tile):not(.adm-meta):not(.adm-mgr-tab),
.adm-mgr-table a, td a {
  color: var(--mmadm-accent); text-decoration: none; font-weight: 600;
}
.adm-card a:not(.adm-btn):not(.adm-user__item):not(.adm-tile):not(.adm-meta):not(.adm-mgr-tab):hover,
.adm-mgr-table a:hover, td a:hover { text-decoration: underline; }
/* file inputs shouldn't render as raw OS chrome */
input[type=file] {
  font: inherit; width: 100%; padding: 10px 12px; cursor: pointer;
  border: 1px dashed var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  background: var(--mmadm-bg); color: var(--mmadm-muted);
}
input[type=file]::file-selector-button {
  font: 600 .9rem var(--mmadm-font); margin-right: 12px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  background: var(--mmadm-card); color: var(--mmadm-ink);
}
input[type=file]::file-selector-button:hover { border-color: var(--mmadm-muted); }

/* ---------- Buttons ---------- */
.adm-btn {
  border: 1px solid var(--mmadm-line); background: var(--mmadm-card); color: var(--mmadm-ink);
  padding: 10px 18px; border-radius: var(--mmadm-radius-sm);
  font: 600 .95rem/1.2 var(--mmadm-font); cursor: pointer; text-decoration: none;
  box-shadow: var(--mmadm-shadow-sm);
  transition: transform .12s var(--mmadm-ease), box-shadow .15s var(--mmadm-ease),
              background .15s var(--mmadm-ease), border-color .15s var(--mmadm-ease);
}
.adm-btn:hover { box-shadow: var(--mmadm-shadow-md); border-color: var(--mmadm-muted); }
.adm-btn:active { transform: translateY(1px); }
.adm-btn:focus-visible { outline: 2px solid var(--mmadm-accent); outline-offset: 2px; }
.adm-btn--primary {
  background: var(--mmadm-accent); border-color: var(--mmadm-accent); color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--mmadm-accent) 28%, transparent);
}
.adm-btn--primary:hover {
  background: color-mix(in srgb, var(--mmadm-accent) 90%, #000);
  border-color: color-mix(in srgb, var(--mmadm-accent) 90%, #000);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--mmadm-accent) 38%, transparent);
}
.adm-btn--ghost { background: var(--mmadm-card); border-color: var(--mmadm-line); box-shadow: none; color: var(--mmadm-ink); }
.adm-btn--ghost:hover { background: color-mix(in srgb, var(--mmadm-ink) 5%, transparent); color: var(--mmadm-ink); box-shadow: none; border-color: var(--mmadm-muted); }
.adm-btn--block { width: 100%; }

/* ---------- Messages ---------- */
.adm-messages { margin-bottom: 22px; }
.adm-msg {
  padding: 12px 16px; border-radius: var(--mmadm-radius-sm); background: var(--mmadm-card);
  border: 1px solid var(--mmadm-line); border-left-width: 4px; margin-bottom: 10px;
  box-shadow: var(--mmadm-shadow-sm); font-size: .95rem;
}
.adm-msg--success { border-left-color: #1b7f4b; }
.adm-msg--error { border-left-color: var(--mmadm-danger); color: var(--mmadm-danger); }

/* ---------- Footer ---------- */
.adm-foot {
  text-align: center; color: var(--mmadm-muted); font-size: .82rem; font-weight: 500;
  letter-spacing: .02em; padding: 28px 0 36px;
}

/* ---------- Cards ---------- */
.adm-card {
  background: var(--mmadm-card); border: 1px solid var(--mmadm-line);
  border-radius: var(--mmadm-radius); padding: 24px 26px; margin-bottom: 20px;
  box-shadow: var(--mmadm-shadow-sm);
  transition: box-shadow .2s var(--mmadm-ease);
}
.adm-card:hover { box-shadow: var(--mmadm-shadow-md); }
.adm-card h2 {
  margin: 28px 0 14px; font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em;
}
.adm-card > h2:first-child, .adm-card__head + h2 { margin-top: 0; }
.adm-card .adm-meta { color: var(--mmadm-muted); font-size: .85rem; font-weight: 500; }

/* ---------- Lists ---------- */
.adm-list { list-style: none; margin: 4px 0 0; padding: 0; }
.adm-list li { border-top: 1px solid var(--mmadm-line); }
.adm-list li:first-child { border-top: 0; }
.adm-list a {
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
  padding: 14px 12px; margin: 0 -12px; color: inherit; text-decoration: none;
  border-radius: var(--mmadm-radius-sm); font-weight: 600;
  transition: background .14s var(--mmadm-ease), color .14s var(--mmadm-ease);
}
.adm-list a:hover { background: color-mix(in srgb, var(--mmadm-accent) 6%, transparent); color: var(--mmadm-accent); }
.adm-list a:hover .adm-meta { color: var(--mmadm-accent); }
.adm-list .adm-meta { font-weight: 500; }

/* ---------- Forms ---------- */
label { display: block; margin: 18px 0 6px; font-weight: 600; font-size: .9rem; color: var(--mmadm-ink); }
input[type=text], input[type=password], textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  font: inherit; background: #fff; color: var(--mmadm-ink);
  transition: border-color .15s var(--mmadm-ease), box-shadow .15s var(--mmadm-ease);
}
input[type=text]:hover, input[type=password]:hover, textarea:hover { border-color: var(--mmadm-muted); }
textarea { min-height: 118px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus {
  outline: none; border-color: var(--mmadm-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mmadm-accent) 18%, transparent);
}
.adm-field__hint { color: var(--mmadm-muted); font-size: .8rem; margin-top: 5px; }
.adm-field__error { color: var(--mmadm-danger); font-size: .85rem; font-weight: 600; margin-top: 5px; }

/* ---------- Login ---------- */
.adm-login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, color-mix(in srgb, var(--mmadm-accent) 9%, transparent), transparent 65%),
    var(--mmadm-bg);
}
.adm-login__card {
  width: 100%; max-width: 392px; background: var(--mmadm-card);
  border: 1px solid var(--mmadm-line); border-radius: 18px; padding: 38px 34px;
  box-shadow: var(--mmadm-shadow-lg);
}
.adm-login__mark {
  font-weight: 800; font-size: 1.7rem; letter-spacing: -.04em; line-height: 1;
}
.adm-login__mark span { color: var(--mmadm-accent); font-weight: 600; margin-left: 7px; letter-spacing: -.02em; }
.adm-login__client { color: var(--mmadm-muted); margin: 8px 0 22px; font-weight: 500; }
.adm-login__card .adm-btn--block { margin-top: 26px; }
/* submit buttons sit flush under the last input everywhere — give them air */
.adm-main form > .adm-btn { margin-top: 22px; }
.adm-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.adm-row > a:first-child { flex: 1; }

/* ---------- Dashboard hero ---------- */
.adm-hero { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.adm-hero__body { min-width: 0; }
.adm-hero h1 { margin: 0 0 4px; font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; }
.adm-hero p { margin: 0; color: var(--mmadm-muted); }
.adm-hero__cta { margin-left: auto; flex: none; }

/* ---------- Stat card (consumer stat widgets) ---------- */
.adm-stat { position: relative; background: var(--mmadm-card); border: 1px solid var(--mmadm-line);
  border-radius: var(--mmadm-radius); padding: 18px 20px; box-shadow: var(--mmadm-shadow-sm); }
.adm-stat__ico { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; background: color-mix(in srgb, var(--mmadm-accent) 12%, transparent); color: var(--mmadm-accent); }
.adm-stat__ico svg { width: 18px; height: 18px; }
.adm-stat__label { font-size: .82rem; font-weight: 600; color: var(--mmadm-muted); margin-bottom: 10px; }
.adm-stat__num { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.adm-stat__sub { font-size: .78rem; color: var(--mmadm-muted); margin-top: 6px; }

/* ---------- Quick actions list ---------- */
.adm-qa { list-style: none; margin: 0; padding: 0; }
.adm-qa li + li { border-top: 1px solid var(--mmadm-line); }
.adm-qa a { display: flex; align-items: center; gap: 13px; padding: 13px 0; color: inherit;
  text-decoration: none; font-weight: 600; font-size: .94rem; }
.adm-qa a svg { width: 19px; height: 19px; color: var(--mmadm-accent); flex: none; }
.adm-qa a .adm-qa__chev { margin-left: auto; color: var(--mmadm-muted); }

/* ---------- Activity feed ---------- */
.adm-feed { list-style: none; margin: 0; padding: 0; }
.adm-feed li { display: flex; gap: 13px; padding: 11px 0; }
.adm-feed li + li { border-top: 1px solid var(--mmadm-line); }
.adm-feed__ico { width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--mmadm-ink) 5%, transparent); color: var(--mmadm-muted); }
.adm-feed__ico svg { width: 16px; height: 16px; }
.adm-feed__t { font-weight: 600; font-size: .92rem; }
.adm-feed__m { font-size: .78rem; color: var(--mmadm-muted); }
.adm-feed__row { display: flex; gap: 13px; align-items: center; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.adm-feed__row:hover .adm-feed__t { color: var(--mmadm-accent); }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .adm-top { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .adm-top { height: auto; min-height: var(--adm-top-h); }
  .adm-top__search { display: none; }
  .adm-main { padding: 24px 16px 56px; }
  .adm-h1 { font-size: 1.55rem; margin-bottom: 18px; }
  .adm-card { padding: 20px; }
  .adm-login__card { padding: 30px 24px; }
}

/* ---------- Card head / title (shared by managers) ---------- */
.adm-card__head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: -2px 0 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--mmadm-line);
}
.adm-card__head:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.adm-card__title {
  margin: 0; font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em;
}
h1.adm-card__title { font-size: 1.85rem; font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.adm-card__head .adm-card__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* a card whose body should sit flush (managers render their own padded body) */
.adm-card--flush { padding: 24px 26px; }

/* ---------- Field labels / inputs (shared) ---------- */
.adm-label { display: block; margin: 0 0 6px; font-weight: 600; font-size: .9rem; color: var(--mmadm-ink); }
.adm-input, select.adm-input,
input[type=search], input[type=number], input[type=date], input[type=email], input[type=url], select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  font: inherit; background: #fff; color: var(--mmadm-ink);
  transition: border-color .15s var(--mmadm-ease), box-shadow .15s var(--mmadm-ease);
}
.adm-input:hover, select:hover,
input[type=search]:hover, input[type=number]:hover, input[type=date]:hover { border-color: var(--mmadm-muted); }
.adm-input:focus,
input[type=search]:focus, input[type=number]:focus, input[type=date]:focus, input[type=email]:focus, input[type=url]:focus, select:focus {
  outline: none; border-color: var(--mmadm-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mmadm-accent) 18%, transparent);
}
select { cursor: pointer; }
.adm-field-error { color: var(--mmadm-danger); font-size: .85rem; font-weight: 600; margin-top: 5px; }
.adm-field-help { color: var(--mmadm-muted); font-size: .8rem; margin-top: 5px; line-height: 1.45; }

/* =====================================================================
   Manager screens — reusable list/edit chrome (.adm-mgr-*)
   Listings manager today; Articles manager tomorrow.
   ===================================================================== */

/* ---- Filter chips / tabs ---- */
.adm-mgr-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.adm-mgr-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--mmadm-line); background: var(--mmadm-card);
  color: var(--mmadm-muted); text-decoration: none;
  font-weight: 600; font-size: .88rem; white-space: nowrap;
  box-shadow: var(--mmadm-shadow-sm);
  transition: background .15s var(--mmadm-ease), color .15s var(--mmadm-ease), border-color .15s var(--mmadm-ease), box-shadow .15s var(--mmadm-ease);
}
.adm-mgr-tab:hover { border-color: var(--mmadm-muted); color: var(--mmadm-ink); }
.adm-mgr-tab--active {
  background: var(--mmadm-accent); border-color: var(--mmadm-accent); color: #fff;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--mmadm-accent) 32%, transparent);
}
.adm-mgr-tab--active:hover { color: #fff; }
.adm-mgr-tab__count {
  font-size: .78rem; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--mmadm-ink) 8%, transparent); color: var(--mmadm-muted);
}
.adm-mgr-tab--active .adm-mgr-tab__count { background: rgba(255,255,255,.22); color: #fff; }

/* ---- Search bar ---- */
.adm-mgr-search { display: flex; gap: 10px; align-items: center; margin: 0 0 20px; }
.adm-mgr-search__field { position: relative; flex: 1; min-width: 0; }
.adm-mgr-search__field input {
  width: 100%; padding-left: 38px;
}
.adm-mgr-search__field::before {
  content: ""; position: absolute; left: 13px; top: 50%; width: 15px; height: 15px;
  transform: translateY(-50%); pointer-events: none; opacity: .5;
  background: currentColor; color: var(--mmadm-muted);
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
          mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

/* ---- Listings table ---- */
.adm-mgr-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.adm-mgr-table thead th {
  text-align: left; padding: 0 12px 10px; font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--mmadm-muted);
  border-bottom: 1px solid var(--mmadm-line);
}
.adm-mgr-table thead th:last-child { text-align: right; }
.adm-mgr-table tbody td { padding: 13px 12px; border-bottom: 1px solid var(--mmadm-line); vertical-align: middle; }
.adm-mgr-table tbody tr:last-child td { border-bottom: 0; }
.adm-mgr-table tbody tr { transition: background .14s var(--mmadm-ease); }
.adm-mgr-table tbody tr:hover { background: color-mix(in srgb, var(--mmadm-accent) 4%, transparent); }
.adm-mgr-table__name { font-weight: 700; color: var(--mmadm-ink); text-decoration: none; letter-spacing: -.01em; }
.adm-mgr-table__name:hover { color: var(--mmadm-accent); text-decoration: underline; }
.adm-mgr-table__price { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--mmadm-ink); font-weight: 600; }
.adm-mgr-table__flags { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-mgr-table__actions { text-align: right; white-space: nowrap; }
.adm-mgr-table__del {
  color: var(--mmadm-danger); font-size: .85rem; font-weight: 600; text-decoration: none;
  padding: 5px 10px; border-radius: var(--mmadm-radius-sm);
  transition: background .14s var(--mmadm-ease);
}
.adm-mgr-table__del:hover { background: color-mix(in srgb, var(--mmadm-danger) 9%, transparent); }

/* ---- Badges / pills ---- */
.adm-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4;
  background: color-mix(in srgb, var(--mmadm-ink) 7%, transparent); color: var(--mmadm-muted);
  border: 1px solid transparent; white-space: nowrap;
}
.adm-badge--sreality { background: color-mix(in srgb, #3b6ea5 14%, transparent); color: #2c5680; }
.adm-badge--manual   { background: color-mix(in srgb, var(--mmadm-accent) 13%, transparent); color: var(--mmadm-accent); }
.adm-badge--pub      { background: color-mix(in srgb, #1b7f4b 14%, transparent); color: #14663b; }
.adm-badge--feat     { background: color-mix(in srgb, #b8860b 16%, transparent); color: #8a6508; }
.adm-badge--ok       { background: color-mix(in srgb, #1b7f4b 14%, transparent); color: #14663b; }
.adm-badge--warn     { background: color-mix(in srgb, #e05a00 13%, transparent); color: #b84700; }
.adm-badge--muted    { background: color-mix(in srgb, var(--mmadm-ink) 7%, transparent); color: var(--mmadm-muted); }
.adm-card__action    { font-size: .82rem; font-weight: 600; color: var(--mmadm-accent); text-decoration: none; margin-left: auto; }
.adm-card__action:hover { text-decoration: underline; }
.adm-card--flat      { box-shadow: none; border-color: var(--mmadm-line); }
.adm-empty           { color: var(--mmadm-muted); font-size: .9rem; padding: 16px 0; margin: 0; }

/* ---- Status status-cell pill (table "Stav") ---- */
.adm-mgr-status { font-weight: 600; color: var(--mmadm-ink); }

/* ---- Empty state ---- */
.adm-mgr-empty {
  text-align: center; color: var(--mmadm-muted); font-weight: 500;
  padding: 40px 20px; border: 1px dashed var(--mmadm-line); border-radius: var(--mmadm-radius);
  background: color-mix(in srgb, var(--mmadm-ink) 2%, transparent);
}

/* ---- Edit form: grids & groups ---- */
.adm-mgr-grid { display: grid; gap: 18px 20px; }
.adm-mgr-grid--2 { grid-template-columns: 1fr 1fr; }
.adm-mgr-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.adm-mgr-field { min-width: 0; }
.adm-mgr-checks { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.adm-mgr-check {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600;
  padding: 10px 14px; border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  background: color-mix(in srgb, var(--mmadm-ink) 2%, transparent);
  transition: border-color .14s var(--mmadm-ease), background .14s var(--mmadm-ease);
}
.adm-mgr-check:hover { border-color: var(--mmadm-muted); }
.adm-mgr-check input { width: auto; margin: 0; accent-color: var(--mmadm-accent); }

/* accent-tinted card variants for special groups */
.adm-card--accent {
  background: color-mix(in srgb, var(--mmadm-accent) 4%, var(--mmadm-card));
  border-color: color-mix(in srgb, var(--mmadm-accent) 22%, var(--mmadm-line));
}
.adm-card--accent .adm-card__head { border-bottom-color: color-mix(in srgb, var(--mmadm-accent) 18%, var(--mmadm-line)); }

/* ---- Row editor (specs / pois) ---- */
.adm-mgr-rows { display: flex; flex-direction: column; gap: 10px; }
.adm-mgr-row { display: flex; gap: 10px; align-items: center; }
.adm-mgr-row input { flex: 1; }
.adm-mgr-row__rm {
  flex: 0 0 auto; width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  background: var(--mmadm-card); color: var(--mmadm-muted); cursor: pointer; font-size: 1rem; line-height: 1;
  box-shadow: var(--mmadm-shadow-sm);
  transition: color .14s var(--mmadm-ease), border-color .14s var(--mmadm-ease), background .14s var(--mmadm-ease);
}
.adm-mgr-row__rm:hover { color: var(--mmadm-danger); border-color: color-mix(in srgb, var(--mmadm-danger) 50%, var(--mmadm-line)); background: color-mix(in srgb, var(--mmadm-danger) 7%, transparent); }
.adm-mgr-rows-add { margin-top: 12px; }

/* ---- Sticky save footer ---- */
.adm-mgr-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 4px; padding-top: 4px;
}
.adm-mgr-actions__spacer { flex: 1; }

/* ---- Danger / warning panels (delete confirm) ---- */
.adm-note {
  padding: 14px 16px; border-radius: var(--mmadm-radius-sm); margin-bottom: 20px;
  border: 1px solid var(--mmadm-line); border-left-width: 4px;
  background: var(--mmadm-card); font-size: .93rem; line-height: 1.55;
}
.adm-note strong { display: block; margin-bottom: 3px; }
.adm-note--danger { border-left-color: var(--mmadm-danger); background: color-mix(in srgb, var(--mmadm-danger) 5%, var(--mmadm-card)); }
.adm-note--warn { border-left-color: #b8860b; background: color-mix(in srgb, #b8860b 7%, var(--mmadm-card)); }
.adm-btn--danger {
  background: var(--mmadm-danger); border-color: var(--mmadm-danger); color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--mmadm-danger) 26%, transparent);
}
.adm-btn--danger:hover {
  background: color-mix(in srgb, var(--mmadm-danger) 88%, #000);
  border-color: color-mix(in srgb, var(--mmadm-danger) 88%, #000);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--mmadm-danger) 36%, transparent);
}
.adm-link-danger { color: var(--mmadm-danger); font-weight: 600; text-decoration: none; }
.adm-link-danger:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .adm-mgr-grid--2, .adm-mgr-grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* collapse the listings table into stacked cards */
  .adm-mgr-table, .adm-mgr-table tbody, .adm-mgr-table tr, .adm-mgr-table td { display: block; width: 100%; }
  .adm-mgr-table thead { display: none; }
  .adm-mgr-table tbody tr {
    border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
    padding: 12px 14px; margin-bottom: 12px; background: var(--mmadm-card);
  }
  .adm-mgr-table tbody td { border: 0; padding: 4px 0; }
  .adm-mgr-table tbody td::before {
    content: attr(data-label); display: block; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; color: var(--mmadm-muted); margin-bottom: 2px;
  }
  .adm-mgr-table td[data-label=""]::before { display: none; }
  .adm-mgr-table__actions { text-align: left; }
}

/* ---------- Dashboard (masonry columns: uneven-height cards pack tightly;
   full/tile widgets break out to full width) ---------- */
.adm-dash { column-count: 2; column-gap: 18px; }
.adm-dash__w { min-width: 0; break-inside: avoid; margin: 0 0 18px; }
.adm-dash__w--full, .adm-dash__w--tile { column-span: all; }
@media (max-width: 900px) { .adm-dash { column-count: 1; } }

/* ---------- Stat tiles ---------- */
.adm-tile-row {
  display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 4px;
}
.adm-tile {
  flex: 1 1 160px; min-width: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 16px; gap: 6px;
  background: var(--mmadm-card); border: 1px solid var(--mmadm-line);
  border-radius: var(--mmadm-radius); box-shadow: var(--mmadm-shadow-sm);
  text-decoration: none; color: inherit; text-align: center;
  transition: box-shadow .15s, border-color .15s;
}
.adm-tile:hover { box-shadow: var(--mmadm-shadow); border-color: var(--mmadm-accent); }
.adm-tile__num {
  font-size: 2.2rem; font-weight: 800; line-height: 1;
  color: var(--mmadm-accent);
}
.adm-tile__label {
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--mmadm-muted);
}
.adm-tile--alert { border-color: #e05a00; background: color-mix(in srgb, #e05a00 8%, var(--mmadm-card)); }
.adm-tile--alert .adm-tile__num { color: #e05a00; }
.adm-tile--alert .adm-tile__label { color: #e05a00; }

/* ---------- Quick actions ---------- */
.adm-quick-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0; }

/* ---------- Dash list (recent items widget) ---------- */
.adm-dash-list { list-style: none; margin: 0; padding: 0; }
.adm-dash-list__item { border-bottom: 1px solid var(--mmadm-line); }
.adm-dash-list__item:last-child { border-bottom: 0; }
.adm-dash-list__link {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; padding: 9px 0; text-decoration: none; color: inherit;
}
.adm-dash-list__link:hover .adm-dash-list__title { color: var(--mmadm-accent); text-decoration: underline; }
.adm-dash-list__title { font-weight: 600; font-size: .9rem; }
.adm-dash-list__meta { font-size: .78rem; color: var(--mmadm-muted); white-space: nowrap; }

/* ---------- Editor chrome ---------- */
/* editor is a focused full-width surface: hide the sidebar, keep the top bar */
.adm-body--editor .adm-app { grid-template-columns: 1fr; }
.adm-body--editor .adm-side { display: none; }
.adm-body--editor .adm-main { padding: 0; }
.adm-editor__chrome {
  display: flex; align-items: center; gap: 14px; padding: 10px 18px;
  background: color-mix(in srgb, var(--mmadm-card) 92%, transparent);
  border-bottom: 1px solid var(--mmadm-line); box-shadow: var(--mmadm-shadow-sm);
  position: sticky; top: var(--adm-top-h); z-index: 49; flex-wrap: wrap;
}
.adm-editor__back { color: var(--mmadm-accent); text-decoration: none; font-weight: 700; white-space: nowrap; }
.adm-editor__back:hover { text-decoration: underline; }
.adm-editor__switch { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--mmadm-muted); margin: 0; }
.adm-editor__switch select {
  padding: 9px 12px; border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius-sm);
  font: 600 .92rem var(--mmadm-font); background: #fff; color: var(--mmadm-ink); cursor: pointer; max-width: 40vw;
}
.adm-editor__current { color: var(--mmadm-muted); font: 500 .85rem var(--mmadm-font); padding: 5px 10px; background: color-mix(in srgb, var(--mmadm-ink) 5%, transparent); border-radius: 999px; }
.adm-editor__note { color: var(--mmadm-muted); font-size: .9rem; flex: 1; }
.adm-editor__chrome form { margin: 0; display: inline-flex; align-items: center; }
.adm-editor__chrome .adm-btn { display: inline-flex; align-items: center; line-height: 1; margin-left: auto; }
.adm-editor__frame { display: block; width: 100%; height: calc(100vh - var(--adm-top-h) - 54px); border: 0; background: #fff; }

/* ── Definition list (lead detail) ──────────────────────────────────────── */
.adm-dl { margin: 0; padding: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0; }
.adm-dl__row { display: contents; }
.adm-dl__label {
  grid-column: 1; padding: 7px 20px 7px 0;
  font-size: .83rem; font-weight: 600; color: var(--mmadm-muted); white-space: nowrap;
  border-bottom: 1px solid var(--mmadm-line);
}
.adm-dl__value {
  grid-column: 2; padding: 7px 0;
  font-size: .93rem; color: var(--mmadm-ink);
  border-bottom: 1px solid var(--mmadm-line);
}
.adm-dl__row:last-child .adm-dl__label,
.adm-dl__row:last-child .adm-dl__value { border-bottom: 0; }

/* ── Chip (amenity pills) ─────────────────────────────────────────────── */
.adm-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  background: color-mix(in srgb, var(--mmadm-accent) 10%, transparent);
  color: var(--mmadm-accent);
}
.adm-chip::before { content: "✓"; font-size: .75rem; }

/* ── Card foot ───────────────────────────────────────────────────────────── */
.adm-card__foot {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--mmadm-line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* --- user avatar menu (margin-left:auto removed: was for the old top-bar;
   in the sidebar it shoved the profile block right + shrank it) --- */
.adm-user { position: relative; }
.adm-user__trigger { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.adm-user__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: inline-flex;
  align-items: center; justify-content: center; }
.adm-user__avatar--initials { background: var(--mmadm-accent); color: #fff; font-weight: 700; font-size: 13px; }
.adm-user__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff;
  border: 1px solid rgba(0,0,0,.08); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .12s ease; z-index: 60; }
.adm-user:hover .adm-user__menu, .adm-user:focus-within .adm-user__menu, .adm-user.is-open .adm-user__menu {
  opacity: 1; visibility: visible; transform: translateY(0); }
.adm-user__head { padding: 8px 10px 10px; border-bottom: 1px solid rgba(0,0,0,.07); margin-bottom: 6px; }
.adm-user__name { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-user__sub { display: block; font-size: 12px; color: #6b7280; }
.adm-user__item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px;
  font-size: 14px; color: inherit; text-decoration: none; background: none; border: 0; cursor: pointer; }
.adm-user__item:hover { background: rgba(0,0,0,.05); }
.adm-user__logout { margin-top: 6px; border-top: 1px solid rgba(0,0,0,.07); padding-top: 6px; }
.adm-user__item--logout { color: #b91c1c; }

/* ---------- Identity hero (profile) ---------- */
.adm-idhero { display: flex; align-items: center; gap: 22px; }
.adm-idhero__photo-wrap { position: relative; flex: none; }
.adm-idhero__photo { width: 92px; height: 92px; border-radius: 20px; object-fit: cover; display: block; }
.adm-idhero__photo--initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--mmadm-accent); color: #fff; font-weight: 800; font-size: 2rem; letter-spacing: -.02em;
}
.adm-idhero__jersey {
  position: absolute; right: -8px; bottom: -8px; min-width: 30px; height: 30px; padding: 0 6px;
  border-radius: 9px; background: var(--mmadm-ink); color: #fff; font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--mmadm-card);
}
.adm-idhero__body { flex: 1; min-width: 0; }
.adm-idhero__name { margin: 0 0 8px; font-size: 1.8rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.adm-idhero__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.adm-idhero__meta { margin: 0; color: var(--mmadm-muted); font-size: .95rem; }
.adm-idhero__edit { flex: none; align-self: flex-start; }
.adm-rolechip {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  background: color-mix(in srgb, var(--mmadm-ink) 6%, transparent); color: var(--mmadm-ink);
}
.adm-rolechip--accent { background: color-mix(in srgb, var(--mmadm-accent) 14%, transparent); color: var(--mmadm-accent); }

/* ---------- Metric grid (linkable stat cards) ---------- */
.adm-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.adm-metric {
  display: flex; flex-direction: column; gap: 5px; padding: 18px 20px;
  background: var(--mmadm-card); border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius);
  box-shadow: var(--mmadm-shadow-sm); text-decoration: none; color: inherit;
  transition: transform .14s var(--mmadm-ease), box-shadow .16s var(--mmadm-ease), border-color .16s var(--mmadm-ease);
}
.adm-metric:hover { transform: translateY(-2px); box-shadow: var(--mmadm-shadow-md); border-color: var(--mmadm-accent); }
.adm-metric__value { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--mmadm-accent); }
.adm-metric__value--sm { font-size: 1.4rem; }
.adm-metric__value--muted { color: var(--mmadm-muted); }
.adm-metric__value--ok { color: #1f9d55; }
.adm-metric__unit { font-size: 1rem; font-weight: 700; }
.adm-metric__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mmadm-muted); }
.adm-metric__sub { font-size: .82rem; color: var(--mmadm-muted); }
.adm-metric--warn { border-color: #e05a00; }
.adm-metric--warn .adm-metric__value { color: #e05a00; }

/* ---------- Nav cards (section links) ---------- */
.adm-navrow { display: flex; flex-wrap: wrap; gap: 14px; }
.adm-navcard {
  flex: 1 1 220px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; background: var(--mmadm-card); border: 1px solid var(--mmadm-line);
  border-radius: var(--mmadm-radius); box-shadow: var(--mmadm-shadow-sm);
  text-decoration: none; color: inherit; font-weight: 700; font-size: .98rem;
  transition: border-color .15s var(--mmadm-ease), box-shadow .16s var(--mmadm-ease);
}
.adm-navcard:hover { border-color: var(--mmadm-accent); box-shadow: var(--mmadm-shadow-md); }
.adm-navcard::after { content: "→"; color: var(--mmadm-muted); font-weight: 700; }

/* stack the hero on narrow screens */
@media (max-width: 620px) {
  .adm-idhero { flex-wrap: wrap; }
  .adm-idhero__edit { order: 3; }
}

/* ---------- Mobile: sidebar becomes an off-canvas drawer ---------- */
@media (max-width: 900px) {
  .adm-app { grid-template-columns: 1fr; }
  .adm-side { position: fixed; top: 0; left: 0; width: min(84vw, 300px);
    transform: translateX(-100%); transition: transform .22s var(--mmadm-ease);
    box-shadow: var(--mmadm-shadow-lg); }
  .adm-app.is-side-open .adm-side { transform: translateX(0); }
  .adm-top__burger { display: inline-flex; }
}

/* ---------- Account settings (avatar edit row) ---------- */
.adm-account-photo { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.adm-account-photo__img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; flex: none; }
.adm-account-photo__img--initials {
  display: grid; place-items: center;
  background: var(--mmadm-accent); color: #fff; font-weight: 800; font-size: 1.6rem;
}
.adm-account-photo__fields { flex: 1; min-width: 0; }
.adm-account-photo__remove { margin-top: 10px; }
.adm-account-submit { margin-top: 20px; }

/* ---------- Login / password-reset card extras ---------- */
.adm-login__title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 4px; }
.adm-login__hint { color: var(--mmadm-muted); font-size: .92rem; margin: 0 0 20px; line-height: 1.5; }
.adm-login__forgot { text-align: center; margin: 16px 0 0; font-size: .9rem; }
.adm-login__forgot a { color: var(--mmadm-accent); text-decoration: none; font-weight: 600; }
.adm-login__forgot a:hover { text-decoration: underline; }

/* ---------- Editor invitations tab ---------- */
.adm-invite-form { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.adm-invite-form .adm-input { flex: 1; min-width: 220px; }
.adm-invite-form .adm-btn { white-space: nowrap; }
.adm-btn--sm { padding: 7px 13px; font-size: .85rem; }
.adm-invite-form__role { flex: 0 0 auto; width: auto; min-width: 160px; }

/* ---------- Auth-card brand (login / reset / invite) ---------- */
.adm-login__brand { text-align: center; margin-bottom: 26px; }
.adm-login__logo { width: 64px; height: 64px; object-fit: contain; border-radius: 16px; margin: 0 auto 14px; display: block; }
.adm-login__logo--mark { display: grid; place-items: center; background: var(--mmadm-accent); color: #fff; font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; }
.adm-login__site { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.adm-login__tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--mmadm-muted); margin-top: 6px; }

/* ---------- Shared primitives (reusable by every consumer) ----------
   Added for the mm_server HQ unification; a page header, an inline form row,
   and a titled section card. Client managers can use them too. */
.adm-page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.adm-page-head h1 { font-size: 1.32rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.adm-page-head__sub, .adm-page-head .sub { font-size: .85rem; color: var(--mmadm-muted); margin-top: 3px; }

.adm-form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm-form-row .adm-input { flex: 1; min-width: 180px; }

.adm-section { background: var(--mmadm-card); border: 1px solid var(--mmadm-line); border-radius: var(--mmadm-radius); box-shadow: var(--mmadm-shadow-sm); overflow: hidden; transition: box-shadow .15s var(--mmadm-ease); }
.adm-section:hover { box-shadow: var(--mmadm-shadow-md); }
.adm-section__header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px 12px; border-bottom: 1px solid var(--mmadm-line); }
.adm-section__title { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mmadm-muted); margin: 0; }
.adm-section__icon { opacity: .55; }
.adm-section__body { padding: 16px 20px 20px; }
