/* The admin page (admin/index.html): a menu down the left on computers,
   behind the ☰ button on phones. Uses the main site's style.css underneath. */

.adm { min-height: 100vh; display: flex; flex-direction: column; }
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.adm-brand { display: flex; align-items: center; gap: 12px; }
.adm-brand .logo img { height: 26px; }
.adm-market { font-size: 0.85rem; color: var(--muted); white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); }
.adm-market:hover { color: var(--text); }
.adm-tag { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.adm-top-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-who { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-menu-btn { display: none; }
.adm .lang-toggle { position: static; }

/* The alerts bell next to the language button, and its dropdown. */
.adm-bell { position: relative; }
.adm-bell-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 0.9rem; line-height: 1.2; color: var(--text); cursor: pointer;
}
.adm-bell-btn:hover, .adm-bell-btn[aria-expanded="true"] { border-color: var(--text); }
.adm-bell-btn .badge { margin-left: 0; }
.adm-bell-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 340px; max-height: 70vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 6px 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow);
}
.adm-bell-panel[hidden] { display: none; }
.bell-head { margin: 8px 16px 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.bell-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.bell-item:hover { background: var(--surface); color: var(--text); }
.bell-item .eyebrow { margin: 0; }
.bell-item strong { font-size: 0.95rem; font-weight: 500; }
.bell-item .muted { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-empty { padding: 10px 16px; margin: 0; }
.bell-all { padding: 10px 16px 6px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
/* Admin header shortcuts (Users, Businesses, Ads, Reports) and the signed-in person's
   initials with their own dropdown, like the Microsoft 365 admin centre. */
.adm-shortcuts { flex: 1 1 auto; display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.adm-shortcuts::-webkit-scrollbar { display: none; }
.adm-shortcuts[hidden] { display: none; }
.adm-shortcuts a {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 12px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-size: 0.9rem; border: 1px solid transparent;
}
.adm-shortcuts a:hover { background: var(--surface); }
.adm-shortcuts a.on { border-color: var(--text); font-weight: 600; }
.adm-shortcuts .count { background: var(--tint-accent); color: var(--accent); border-radius: 10px; padding: 0 7px; font-size: 0.75rem; font-weight: 600; }
.adm-me { position: relative; }
.adm-me[hidden] { display: none; }
.adm-me-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--bg);
  font: inherit; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; cursor: pointer;
}
.adm-me-btn[aria-expanded="true"] { outline: 2px solid var(--text); outline-offset: 2px; }
.adm-me-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 300px; display: flex; flex-direction: column;
  padding: 6px 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow);
}
.adm-me-panel[hidden] { display: none; }
.me-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px 14px; }
.me-head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-head .muted { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-big { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg); font-weight: 600; }
.me-link, .me-logout { padding: 11px 16px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 0.92rem; text-align: left; text-decoration: none; color: var(--text); cursor: pointer; }
.me-link:hover, .me-logout:hover { background: var(--surface); }
.me-logout { color: var(--danger); }
@media (max-width: 760px) {
  /* Phones and small tablets: the shortcuts get their own row under the logo. */
  .adm-top { flex-wrap: wrap; row-gap: 10px; }
  .adm-shortcuts { order: 3; flex-basis: 100%; margin: 0 -4px; }
  .adm-shortcuts a { border-color: var(--line); background: var(--card); font-size: 0.85rem; padding: 5px 11px; }
  .adm-shortcuts a.on { border-color: var(--text); }
}
@media (max-width: 480px) {
  .adm-me { position: static; }
  .adm-me-panel { left: 12px; right: 12px; top: calc(100% + 4px); width: auto; }
  .adm-me-btn { width: 30px; height: 30px; font-size: 0.72rem; }
}
@media (max-width: 480px) {
  .adm-bell { position: static; }
  .adm-top { position: relative; }
  .adm-bell-panel { left: 12px; right: 12px; top: calc(100% + 4px); width: auto; }
  .adm-bell-btn { padding: 4px 8px; font-size: 0.8rem; }
}

.adm-wrap { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.adm-side { border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.adm-side:empty { display: none; }
.adm-side a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: var(--radius); text-decoration: none; font-size: 0.95rem; }
.adm-side a:hover { background: var(--surface); }
.adm-side a.on { background: var(--text); color: var(--bg); }
.adm-side .count { background: var(--tint-accent); color: var(--accent); border-radius: 10px; padding: 0 8px; font-size: 0.8rem; font-weight: 600; }
.adm-side a.on .count { background: var(--bg); }
.side-logout { margin-top: 16px; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; font-size: 0.9rem; color: var(--danger); cursor: pointer; }
.adm-main { padding: 24px 32px 48px; max-width: 900px; width: 100%; }
.adm-foot { padding: 16px 24px; border-top: 1px solid var(--line); font-size: 0.88rem; }
.adm-foot a { color: var(--muted); text-decoration: none; }

/* Login code */
.adm-gate { max-width: 400px; margin: 24px auto; text-align: center; display: grid; gap: 14px; justify-items: center; }
.adm-gate h1 { font-size: 1.5rem; margin: 0; }
.adm-gate p { margin: 0; }
.adm-wide { width: 100%; }
.adm-steps { text-align: left; margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.92rem; }
.adm-qr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; line-height: 0; }
.adm-qr img { width: 180px; height: 180px; }
.adm-qr span { display: grid; place-items: center; width: 180px; height: 180px; line-height: 1; color: var(--muted); }
.adm-secret { font-size: 0.88rem; }
.adm-secret summary { cursor: pointer; color: var(--muted); }
.adm-secret code { display: block; margin-top: 6px; word-break: break-all; font-size: 0.95rem; }
.code-row { display: flex; gap: 8px; justify-content: center; }
.code-box { width: 44px; height: 54px; text-align: center; font-size: 1.4rem; font-weight: 600; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.code-box:focus { outline: 2px solid var(--text); outline-offset: 1px; }
.code-row-long { gap: 6px; }
.code-row-long .code-box { width: 36px; height: 50px; font-size: 1.25rem; }
.adm-field input[readonly] { background: var(--surface); color: var(--muted); }
.adm-step { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.adm-field { width: 100%; text-align: left; display: grid; gap: 6px; font-weight: 500; }
.adm-field input { width: 100%; }
.adm-remember { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 0.92rem; cursor: pointer; }
.adm-remember input { margin-top: 3px; flex: none; }
.adm-remember small { display: block; margin-top: 2px; }

/* Overview */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 20px; }
.adm-card { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; }
.adm-card:hover { border-color: var(--text); }
.adm-card strong { font-family: var(--serif); font-size: 2rem; font-weight: 400; line-height: 1.1; }
.adm-card span { color: var(--muted); font-size: 0.9rem; }

/* Edit shop */
.adm-photo { display: grid; gap: 6px; font-weight: 500; font-size: 0.88rem; }
.adm-photo .muted { font-weight: 400; }
.adm-photo .previews { display: grid; justify-items: start; gap: 6px; }
.adm-photo .check-line { display: flex; align-items: center; }
.photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-buttons label { display: inline-flex; align-items: center; gap: 6px; }
/* A computer has no phone camera to open, so only the picker is offered there. */
@media (hover: hover) and (pointer: fine) { .photo-buttons .take-photo { display: none; } }

@media (max-width: 760px) {
  .adm-top { padding: 12px 16px; }
  .adm-who { display: none; }
  .adm-menu-btn:not([hidden]) { display: inline-flex; }
  .adm-wrap { grid-template-columns: minmax(0, 1fr); position: relative; }
  .adm-side { display: none; position: absolute; z-index: 20; top: 0; left: 0; right: 0; background: var(--bg); border-right: 0; border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px var(--shadow); }
  .adm-side.open { display: flex; }
  .adm-main { padding: 16px 16px 40px; }
  .adm-foot { padding: 14px 16px; }
}

/* Product pictures */
.pic-step { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.pic-step h2 { font-size: 1.1rem; margin: 0 0 6px; }
.pic-picks { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.pic-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; display: block; }
.pic-table td { vertical-align: middle; }
.pic-also { display: block; font-size: 0.82rem; margin-top: 2px; }
.pic-bad td { background: var(--tint-danger); }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 10px; }
.pic-card { display: grid; gap: 4px; align-content: start; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.88rem; }
.pic-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--surface); }
.pic-card .muted { font-size: 0.8rem; overflow-wrap: anywhere; }
.pic-card button { justify-self: start; margin-top: 4px; }

/* Shop portal (shop/index.html): the same layout, with the shop's name over its pages. */
.side-head { margin: 14px 12px 4px; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.side-head:first-child { margin-top: 0; }
.adm-side a.here { font-weight: 600; }
.side-shop { margin: 0 12px 8px; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.shop-portal .side-head { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.shop-portal .adm-side a.side-view { color: var(--accent); }
.adm-quick { display: flex; align-items: center; gap: 12px; }
.adm-quick a.on { color: var(--text); font-weight: 600; text-decoration: none; }
.shop-portal .adm-menu-btn { gap: 6px; padding: 6px 12px; font-size: 0.9rem; }
.shop-portal .shop-tabs { display: none; }
.shop-portal .adm-menu-btn { position: relative; }
.shop-portal .adm-menu-btn .badge { position: absolute; top: -6px; right: -8px; margin: 0; }
.top-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.top-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.ov-state { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 0.88rem; }
.shop-portal .order-list { max-width: none; }

/* Reports (shop portal) and Sales (admin page): js/reports.js */
.rp-head { margin-bottom: 12px; }
.rp-head h1 a { text-decoration: none; }
.rp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.rp-chips { flex-wrap: wrap; overflow: visible; margin: 0; }
.rp-buttons { margin: 0; }
.rp-dates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 10px 0 0; }
.rp-dates label { display: grid; gap: 2px; font-size: 0.85rem; margin: 0; }
.rp-dates input { width: auto; }
.rp-when { margin: 8px 0 0; }
.rp-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 12px; }
.rp-card strong { font-size: 1.6rem; }
.rp-card em { font-style: normal; font-size: 0.8rem; }
.rp-up { color: var(--accent); }
.rp-down { color: var(--danger); }
.rp-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 16px; margin: 0 0 16px; min-width: 0; }
.rp-box h2 { font-size: 1.15rem; margin: 0 0 4px; }
.rp-box > .muted { margin: 0 0 12px; }
.rp-box .rp-after { margin: 10px 0 0; }
.rp-box .rp-sub { margin-top: 18px; }
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.rp-grid .rp-box { margin: 0; }
.rp-bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; height: 170px; }
.rp-col { display: grid; grid-template-rows: 16px 1fr auto; height: 100%; min-width: 0; text-align: center; }
.rp-col i { align-self: end; justify-self: center; width: min(72%, 44px); background: var(--accent); border-radius: 2px 2px 0 0; }
.rp-val, .rp-lab { font-size: 0.72rem; line-height: 16px; white-space: nowrap; overflow: visible; }
.rp-val { align-self: end; }
.rp-lab { color: var(--muted); border-top: 1px solid var(--line); padding-top: 2px; white-space: pre-line; min-height: 18px; }
.rp-scroll { margin: 0; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.rp-table th, .rp-table td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rp-table th { font-weight: 600; font-size: 0.8rem; color: var(--muted); }
.rp-table .n { text-align: right; }
.rp-table tr:last-child td { border-bottom: 0; }
.rp-table td a { color: inherit; }
.rp-sort { color: inherit; text-decoration: none; }
.rp-sort.on { color: var(--text); }
.funnel { display: grid; gap: 8px; }
.funnel div { display: grid; grid-template-columns: 110px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 0.88rem; }
.funnel i { display: block; height: 22px; min-width: 2px; background: var(--accent); border-radius: 3px; }
.funnel b { text-align: right; font-weight: 600; }
.split { display: flex; height: 28px; border-radius: 4px; overflow: hidden; font-size: 0.8rem; color: var(--on-accent); }
.split span { display: flex; align-items: center; padding: 0 8px; background: var(--accent); white-space: nowrap; min-width: 0; }
.split .split-b { background: #8aa897; }
.rp-look-title { font-size: 1.3rem; margin: 8px 0 10px; }
.flag { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.flag li { padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--radius); background: var(--card); font-size: 0.9rem; }
.adm-main:has(.rp-bar) { max-width: 1040px; }

/* Team: a tick box per role */
.team-role-boxes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 4px; }
.team-role-boxes label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; font-size: 0.92rem; }
.team-role-boxes input { width: auto; margin: 0; }

@media (max-width: 760px) {
  .rp-grid { grid-template-columns: minmax(0, 1fr); }
  .rp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-bars { height: 150px; }
  .funnel div { grid-template-columns: 96px minmax(0, 1fr) 44px; }
}

/* Phones: room for the logo, the SHOP or ADMIN tag, Go to locala.in and the language button. */
@media (max-width: 480px) {
  .adm-brand { gap: 8px; }
  .adm-brand .logo img { height: 20px; }
  .adm-tag { font-size: 0.7rem; letter-spacing: 0.06em; }
  .adm-market { font-size: 0.78rem; padding-left: 8px; }
  .adm .lang-toggle { padding: 5px 9px; font-size: 0.75rem; }
  .adm-top { gap: 8px; }
}
/* Phones: the shop's page on locala.in is in the menu instead. */
@media (max-width: 480px) {
  .shop-portal .adm-tag, .shop-portal #market-link { display: none; }
  .shop-portal .adm-quick a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--card); color: var(--text); text-decoration: none; font-size: 0.85rem; }
  .shop-portal .adm-menu-btn .menu-label { display: inline; }
}
@media (max-width: 400px) {
  .shop-portal .adm-brand { gap: 6px; }
  .shop-portal .adm-brand .logo img { height: 16px; }
  .shop-portal .adm-menu-btn, .shop-portal .adm-quick a { padding: 5px 9px; font-size: 0.8rem; }
  .adm-tag { display: none; }
  .adm-market { border-left: 0; padding-left: 0; }
}

/* Shops: a table with search and sort; on phones each row is a short stacked card. */
.shop-tools { display: flex; gap: 8px; margin: 4px 0 6px; }
.shop-tools input { flex: 1 1 auto; min-width: 0; }
.shop-tools select { width: auto; flex: 0 0 auto; }
.shop-tools .btn { flex: 0 0 auto; white-space: nowrap; }
.shop-count { margin: 0 0 8px; font-size: 0.85rem; }
.shop-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shop-table th, .shop-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.shop-table th { font-weight: 600; font-size: 0.8rem; color: var(--muted); background: var(--bg); }
.shop-table tbody tr { cursor: pointer; }
.shop-table tbody tr:hover, .shop-table tbody tr:focus { background: var(--hover); outline: none; }
.shop-table tbody tr:last-child td { border-bottom: 0; }
.shop-table td a { color: inherit; font-weight: 600; text-decoration: none; }
.shop-table td small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.shop-table .shop-email { overflow-wrap: anywhere; }
.shop-table .shop-date { white-space: nowrap; color: var(--muted); }
.shop-facts th { width: 110px; color: var(--muted); font-weight: 500; }
/* Excel-style column menus on table headings (on phones, a row of the same buttons above the cards). */
.col-head {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit;
  color: inherit; cursor: pointer; text-align: left;
}
.col-head span { font-size: 0.7em; opacity: 0.7; }
.col-head:hover, .col-head.on { color: var(--text); }
.col-head.on { text-decoration: underline; text-underline-offset: 3px; }
.col-head.on span { opacity: 1; color: var(--accent); }
.col-chips { display: none; }
.col-pop {
  position: fixed; z-index: 70; max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 6px 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow);
  font-size: 0.9rem; font-weight: 400; color: var(--text); text-align: left; text-transform: none; letter-spacing: 0;
}
.col-pop > button { padding: 8px 14px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.col-pop > button:hover { background: var(--surface); }
.col-filter { border-top: 1px solid var(--line); margin-top: 4px; padding: 8px 14px 4px; display: flex; flex-direction: column; gap: 6px; }
.col-pop-head { margin: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.col-filter label { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.col-filter input[type="search"] { width: 100%; }
.col-values { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.col-values span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-values small { color: var(--muted); }
.col-all { padding-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 600; }
.col-pop-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
#col-clear { margin-left: 8px; font-size: 0.85rem; }
@media (max-width: 760px) {
  .col-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
  .col-chips .col-head { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 0.82rem; color: var(--muted); }
  .col-chips .col-head.on { border-color: var(--text); color: var(--text); text-decoration: none; }
}
@media (max-width: 760px) {
  .shop-tools { flex-wrap: wrap; }
  .shop-tools input { flex-basis: 100%; }
  .shop-tools select { flex: 1 1 auto; }
  .shop-table thead { display: none; }
  .shop-table, .shop-table tbody, .shop-table tr, .shop-table td { display: block; }
  .shop-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .shop-table tbody tr:last-child { border-bottom: 0; }
  .shop-table td { padding: 0; border: 0; grid-column: 1 / -1; font-size: 0.85rem; }
  .shop-table td:first-child { grid-column: 1; grid-row: 1; font-size: 0.9rem; }
  .shop-table .shop-date { grid-column: 2; grid-row: 1; font-size: 0.8rem; text-align: right; }
  .shop-table .shop-email { color: var(--muted); }
}

/* Users & shops: tabs under the heading, the Users table and a person's panel beside it. */
.page-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a { flex: none; padding: 8px 0; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.page-tabs a:hover { color: var(--text); }
.page-tabs a.on { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.page-tabs .count { background: var(--tint-accent); color: var(--accent); border-radius: 10px; padding: 0 7px; font-size: 0.75rem; font-weight: 600; margin-left: 5px; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface); margin: 0 2px 2px 0; white-space: nowrap; }
.tag-team { background: #e8e6f4; color: #3d3670; }
@media (prefers-color-scheme: dark) { .tag-team { background: #2a2742; color: #c9c3f0; } .split .split-b { background: #4f6b5c; color: var(--text); } }
.tag-shop { background: var(--tint-accent); color: var(--accent); }
.tag-ban { background: var(--tint-danger); color: var(--danger); }
.shop-table tbody tr.on { background: var(--hover); }
.user-table strong { font-weight: 600; }
.us-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.us-wrap.with-panel { grid-template-columns: minmax(0, 1fr) 320px; }
.us-list { min-width: 0; }
.us-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px;
  box-shadow: 0 6px 20px var(--shadow); position: sticky; top: 16px; min-width: 0; }
.us-panel h2 { margin: 0; font-size: 1.25rem; padding-right: 28px; overflow-wrap: anywhere; }
.us-panel h3 { margin: 4px 0 0; font-size: 0.95rem; font-family: var(--sans); }
.us-panel-head { position: relative; }
.us-panel-head p { margin: 4px 0 0; font-size: 0.85rem; }
.us-close { position: absolute; top: 0; right: 0; text-decoration: none; color: var(--muted); font-size: 1.05rem; line-height: 1; padding: 4px; }
.us-back { display: none; font-size: 0.9rem; margin-bottom: 8px; color: var(--muted); }
.us-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 10px; margin: 0; font-size: 0.88rem; }
.us-facts dt { color: var(--muted); }
.us-facts dd { margin: 0; overflow-wrap: anywhere; }
.us-shops, .us-logs { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.88rem; }
.us-shops li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.us-logs small { display: block; color: var(--muted); font-size: 0.78rem; }
.us-panel .team-role-boxes { display: grid; gap: 4px; }
.us-panel .row-buttons { margin: 0; }
.log-table .log-note { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) {
  .us-wrap.with-panel { grid-template-columns: minmax(0, 1fr) 290px; }
  .us-wrap.with-panel .user-table .user-status, .us-wrap.with-panel .user-table th:nth-child(5) { display: none; }
}
@media (max-width: 900px) {
  /* Not enough room for both: the person gets the screen, with a way back. */
  .us-wrap.with-panel { grid-template-columns: minmax(0, 1fr); }
  .us-wrap.with-panel .us-list { display: none; }
  .us-panel { position: static; box-shadow: none; }
  .us-back { display: inline-block; }
  .us-close { display: none; }
}
@media (max-width: 760px) {
  .page-tabs { gap: 18px; }
  .user-table .user-tags, .user-table .user-status, .user-table .user-signup { grid-column: 1 / -1; }
}
.adm-main:has(.us-wrap), .adm-main:has(.log-table) { max-width: 1180px; }
.log-table .log-who { min-width: 120px; }

/* Shop portal: "Check it's you", the owner's emailed code. */
.shop-code .sc-step { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.shop-code .sc-note { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--card); text-align: left; font-size: 0.92rem; width: 100%; }
.shop-code .sc-small { font-size: 0.88rem; }
.shop-code .sc-skip { display: grid; gap: 4px; width: 100%; }

/* Messages from the team */
.tm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tm-head h1 { margin-bottom: 4px; }
.tm-chips { margin: 14px 0 10px; }
.tm-list { margin-top: 6px; }
.tm-who { font-size: 0.78rem; color: var(--muted); }
.tag.tm-replied { background: var(--tint-warn); color: #8a5d0c; margin-left: 6px; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .tag.tm-replied { color: var(--warn); } }
.bubble.mine.tm-sent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tm-by { display: block; font-size: 0.72rem; font-weight: 600; opacity: 0.8; margin-bottom: 2px; }
.tm-note { background: var(--tint-warn); border: 1px solid var(--warn); padding: 8px 12px; border-radius: var(--radius); font-size: 0.84rem; }
.tm-form { display: grid; gap: 8px; max-width: 680px; }
.tm-form > label, .tm-label { font-weight: 500; font-size: 0.92rem; margin: 10px 0 0; }
.tm-form .chips { margin: 0; }
.tm-results { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.tm-results button, .tm-picked {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.tm-results button:last-child { border-bottom: 0; }
.tm-results button:hover { background: var(--surface); }
.tm-results p { margin: 0; padding: 10px 12px; }
.tm-picked { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: default; }
.tm-picked .link-btn { margin-left: auto; }

/* Team notes: on a user, a shop or a listing (team_notes). */
.adm-sub { font-size: 1.1rem; margin: 24px 0 6px; }
.adm-sub .count { background: var(--tint-accent); color: var(--accent); border-radius: 10px; padding: 0 7px; font-size: 0.75rem; font-weight: 600; font-family: var(--sans); vertical-align: middle; }
.notes-box { border-top: 1px solid var(--line); margin-top: 20px; }
.notes-box > .muted { margin: 0 0 10px; font-size: 0.85rem; }
.us-panel .notes-box { margin-top: 0; }
.us-panel .notes-box .adm-sub { font-size: 0.95rem; margin-top: 12px; font-family: var(--sans); }
.notes { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 8px; }
.note { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font-size: 0.9rem; display: grid; gap: 4px; }
.note.pinned { background: var(--tint-warn); border-color: var(--warn); }
.note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note small { color: var(--muted); font-size: 0.78rem; }
.note-buttons { display: flex; gap: 14px; }
.note-buttons .link-btn { font-size: 0.8rem; }
.link-btn.danger { color: var(--danger); }
.note-form { display: grid; gap: 8px; }
.note-form textarea { width: 100%; }
.note-form-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-form-row .check-line { margin: 0; font-size: 0.88rem; }
.note-mark { font-size: 0.8rem; margin-left: 4px; white-space: nowrap; font-weight: 400; }

/* Change owner */
.adm-choice { display: grid; gap: 8px; margin: 4px 0; }
.adm-choice label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; font-weight: 400; margin: 0; }
.adm-choice label:has(input:checked) { border-color: var(--text); }
.adm-choice input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.adm-choice small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.adm-history { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.9rem; }
.adm-history li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow-wrap: anywhere; }
.adm-history small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.adm-waiting { border-left: 3px solid var(--warn); background: var(--tint-warn); }
.tr-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border-left: 3px solid var(--warn); background: var(--tint-warn); margin: 0 0 16px; }

/* Delete and the Deleted tab */
.adm-delete { display: grid; gap: 10px; }
.adm-delete-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 0.92rem; }
.adm-delete .notice { margin: 0; }
.adm-export { display: grid; gap: 4px; justify-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.adm-export p { margin: 0; font-size: 0.85rem; }
.adm-deleted-note { border-left: 3px solid var(--danger); background: var(--tint-danger); }
.del-item p { margin: 2px 0; }
.del-left { color: var(--danger); font-weight: 600; font-size: 0.9rem; }
.admin-shop-photo.adm-qr-thumb { width: 120px; aspect-ratio: 1; object-fit: contain; background: #fff; }

/* Listings tab and a listing's page */
.lt-title { display: flex; gap: 10px; align-items: flex-start; }
.lt-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; flex: none; background: var(--surface); }
.listing-table td.lt-price { white-space: nowrap; }
.adm-listing-photos { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0; padding-bottom: 4px; }
.adm-listing-photos img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius); display: block; background: var(--surface); }
.adm-photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.adm-photo-pick { display: grid; gap: 4px; font-weight: 400; margin: 0; }
.adm-photo-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.adm-photo-pick:has(input:checked) img { opacity: 0.4; outline: 2px solid var(--danger); }
.adm-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-main:has(.listing-table) { max-width: 1180px; }

/* A waiting shop whose name is close to another shop's in its place. */
.shop-table td small.adm-copy { color: var(--text); font-weight: 600; }
.adm-copy::before { content: '⚠ '; color: var(--warn); }
.adm-copy-notice { border-left: 3px solid var(--warn); background: var(--tint-warn); }
.user-table td.user-signup { white-space: nowrap; color: var(--muted); }

/* The business portal's header: Products, Orders and Messages as buttons between
   two dividers, then View my business (computers only; it's in the ☰ menu on phones). */
.biz-shortcuts { gap: 12px; }
.biz-buttons { display: flex; align-items: center; gap: 4px; padding-left: 12px; border-left: 1px solid var(--line); }
.biz-buttons[hidden] { display: none; }
.biz-shortcuts a.adm-market { border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 4px 0 4px 12px; color: var(--muted); font-size: 0.85rem; }
.biz-shortcuts a.adm-market:hover { background: none; color: var(--text); }
.bell-item.unread strong { font-weight: 600; }
@media (max-width: 760px) {
  .biz-shortcuts .adm-market { display: none; }
  .biz-buttons { padding-left: 0; border-left: 0; }
}

/* Business portal: the bar while an admin edits a business's products. */
.team-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0; border-radius: 0; padding: 10px 24px; }
@media (max-width: 760px) { .team-banner { padding: 10px 16px; } }
