/* ══ MOTION TOKENS (Motion Lab, finding #1) — one system, strong curves ══ */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 140ms;
  --dur-fast: 160ms;
  --dur-ui: 200ms;
  --dur-modal: 240ms;
}
/* signitur — dashboard styling (loads AFTER app.css; shares its tokens) */

/* the dashboard page scrolls normally — undo the editor's app-shell lock.
 * html is the ONE scroll container (body must stay overflow:visible or
 * position:sticky on the topbar breaks — verified live) */
html { overflow: auto; }
body.dash { overflow: visible; height: auto; min-height: 100%; }

/* "coming soon" placeholder — replaces the analytics mock-ups so the app
 * never implies a feature that doesn't exist yet */
.soon-card { display: flex; align-items: center; justify-content: center; padding: 34px 22px; }
.soon-page { min-height: 52vh; }
.soon-inner { text-align: center; max-width: 460px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.soon-ic { font-size: 30px; }
.soon-inner b { font-size: 16px; }
.soon-inner span { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.soon-chip {
  margin-top: 6px; background: #eef2f8; color: #475569; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px 12px; font-size: 11px !important; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}

body.dash { font-size: 14px; }
.hidden { display: none !important; }

/* ============ top bar ============ */
#topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 10px 22px;
}
#topbar .brand { padding: 0; text-decoration: none; color: var(--ink); }
#mainNav { display: flex; gap: 6px; margin: 0 auto; }
.nav-tab {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-sm); background: none;
  padding: 9px 14px; color: var(--ink-2); font-weight: 600; font-size: 13.5px;
}
.nav-tab:hover { background: #f7f9fd; }
.nav-tab.active { border-color: #cfe1ff; background: #f3f8ff; color: var(--ink); }
.nav-tab.active svg { color: var(--blue); }

.ws-wrap { position: relative; }
.ws-chip {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
  padding: 5px 10px 5px 6px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ws-avatar {
  width: 30px; height: 30px; border-radius: var(--r-xs); background: var(--grad);
  color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.ws-txt { text-align: left; line-height: 1.15; }
.ws-txt b { display: block; font-size: 12.5px; }
.ws-txt small { color: var(--ink-2); font-size: 10.5px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ============ dropdown menus ============ */
.dropdown { position: relative; display: inline-flex; }
.menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 210px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: 0 14px 40px rgba(15, 23, 42, .14);
  padding: 6px; display: flex; flex-direction: column;
}
.menu-item {
  border: 0; background: none; text-align: left;
  padding: 9px 12px; border-radius: var(--r-xs); font-weight: 500; color: var(--ink);
}
.menu-item:hover { background: #f3f8ff; color: var(--accent-strong); }
.menu-item.danger:hover { background: #fef2f2; color: #dc2626; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 8px; }
.menu-upgrade {
  background: var(--grad); color: #fff !important; font-weight: 700;
  border-radius: var(--r-xs); margin: 2px 4px;
  box-shadow: 0 5px 14px rgba(47, 125, 246, .35);
}
.menu-upgrade:hover { background: var(--grad); filter: brightness(1.06); }

/* ============ layout ============ */
.view { padding: 18px 22px 44px; max-width: 2000px; margin: 0 auto; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.card-head h3 { font-size: 16px; font-weight: 700; }
.kebab {
  border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm);
  width: 30px; height: 30px; color: var(--ink-2); font-size: 15px; line-height: 1;
}
.kebab:hover { background: #f7f9fd; }

.dash-grid {
  display: grid; grid-template-columns: minmax(520px, 1.05fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px; align-items: stretch; margin-bottom: 16px;
}
.col-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---- greeting / logo-animation banner ---- */
.hello-card {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(150deg, rgba(47,125,246,.13), rgba(255,255,255,.03) 62%);
  border-color: #cfe1ff;
}
.hello-l { min-width: 0; }
.hello-card h2 { font-size: 19px; font-weight: 800; margin-bottom: 2px; }
.hello-sub { color: var(--ink-2); font-size: 12.5px; }
.prog-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; }
.prog { flex: 1; max-width: 220px; height: 6px; border-radius: var(--r-pill); background: #dbe3f0; overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--grad); }
.prog-days { font-size: 11.5px; color: var(--ink-2); }
.hello-note { font-size: 11.5px; color: var(--ink-2); }
.hello-note a { color: var(--accent-strong); font-weight: 600; }
.hello-r { display: flex; flex-direction: column; align-items: center; gap: 9px; flex: 0 0 auto; }
.logo-thumb {
  position: relative; width: 128px; height: 58px; border-radius: var(--r-sm);
  background: #fff; border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.logo-thumb img { max-width: 84%; max-height: 82%; object-fit: contain; }
.logo-thumb .shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(120, 170, 255, .35) 48%, transparent 62%);
  /* #8: was infinite — perpetual attention-grab competing with the signature
   * previews, and it read as a stuck loader. Two sweeps, then still. */
  animation: shim 2.4s linear 2;
}
@keyframes shim { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.sm-primary { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 12.5px; border-radius: var(--r-pill); }

/* ---- master signature ---- */
.master-card { flex: 1; display: flex; flex-direction: column; padding-bottom: 16px; }
.master-frame {
  position: relative; margin: 18px 16px 0; flex: 1;
  border: 2px solid var(--blue); border-radius: var(--r-md);
  min-height: 210px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(47, 125, 246, .1);
}
.master-frame.empty { border-style: dashed; border-color: #b9cff5; box-shadow: none; }
.crown-badge {
  position: absolute; top: -17px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
}
.no-master { color: var(--ink-2); font-size: 12.5px; padding: 20px; text-align: center; }

/* shared signature slots (master + library cards) */
.sig-slot {
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 12px; pointer-events: none;
}
.sig-inner { display: block; transform-origin: center center; }

/* ---- analytics placeholder cards ---- */
.ana-card { position: relative; overflow: hidden; min-height: 320px; display: flex; }
.ana-blur {
  flex: 1; filter: blur(5px) saturate(.9); opacity: .55; pointer-events: none;
  user-select: none; display: flex; flex-direction: column; padding-bottom: 14px;
}
.ana-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 20px;
}
.ana-overlay b { font-size: 16.5px; }
.ana-overlay span { color: var(--ink-2); font-size: 12.5px; }
.ana-overlay .sm-primary { margin-top: 8px; }
.stat-row { display: flex; gap: 10px; padding: 6px 18px; flex-wrap: wrap; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px;
  color: var(--ink-2); font-size: 11px;
}
.stat-chip b { display: block; color: var(--ink); font-size: 13px; }
.chart-meta { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 2px; font-size: 13px; font-weight: 700; }
.chart-meta small { font-weight: 400; color: var(--ink-3); }
.sel-chip { border: 1px solid var(--line); border-radius: var(--r-xs); padding: 6px 10px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.line-chart { width: 100%; height: 150px; margin-top: auto; }
.line-chart.tall { height: 300px; }
.legend { display: flex; gap: 14px; justify-content: center; padding: 10px 0 2px; font-size: 11.5px; color: var(--ink-2); }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }

.bar-chart { flex: 1; display: flex; align-items: flex-end; justify-content: space-evenly; gap: 12px; padding: 24px 18px 12px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; flex: 1; max-width: 84px; }
.bar-col i { width: 34px; border-radius: var(--r-sm); background: linear-gradient(180deg, #7cb0ff, #3b82f6); }
.bar-col:nth-child(2) i { background: linear-gradient(180deg, #93c5fd, var(--accent-strong)); }
.bar-col:nth-child(4) i { background: linear-gradient(180deg, #bfdbfe, #60a5fa); }
.bar-face { width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; }
.bar-col small { font-size: 10px; color: var(--ink-3); text-align: center; }

/* ---- library ---- */
.lib { padding: 0 0 18px; }
.lib-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.search-wrap {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px;
  color: var(--ink-3); background: #fff;
}
.search-wrap input { border: 0; outline: none; padding: 9px 0; font: inherit; width: 170px; color: var(--ink); }
.count-pill {
  border: 1px solid #cfe1ff; border-radius: var(--r-sm); padding: 8px 12px;
  font-size: 12.5px; color: var(--ink-2);
}
.count-pill b { color: var(--ink); }
.lib-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lib-btn { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.lib-actions .primary { padding: 9px 16px; font-size: 13.5px; }

.sig-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 16px; padding: 16px 18px 4px;
}
.sig-card { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; min-width: 0; }
.sig-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 12px; color: var(--ink-2);
}
.stat { display: inline-flex; align-items: center; gap: 5px; }
.head-r { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.master-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #cfe1ff; background: #f3f8ff; color: var(--accent-strong);
  border-radius: var(--r-pill); padding: 4px 11px; font-weight: 700; font-size: 11.5px;
}
.use-mini {
  border: 1px solid var(--line); background: #eef1f6; border-radius: var(--r-xs);
  padding: 5px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-2);
}
.use-mini:hover { background: var(--blue-soft); color: var(--accent-strong); border-color: #cfe1ff; }
.sig-card .kebab { border: 0; width: 26px; height: 26px; }

.sig-body { position: relative; height: 205px; }
.hover-veil {
  position: absolute; inset: 0; z-index: 2; border-radius: 0 0 14px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(255, 255, 255, .45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.sig-body:hover .hover-veil, .sig-body:focus-within .hover-veil { opacity: 1; pointer-events: auto; }
.veil-icons { display: flex; gap: 10px; }
.veil-icons button {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}
.veil-icons button:hover { background: var(--blue-soft); color: var(--accent-strong); border-color: #cfe1ff; }
.veil-icons button[title="Delete"]:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.use-big { border-radius: var(--r-pill); padding: 10px 22px; }

.upgrade-tile {
  border: 1px solid var(--line); border-radius: var(--r-md); background: #f8fafc;
  min-height: 258px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 18px;
}
.upgrade-tile .plus-circle {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--blue);
  color: var(--blue); font-size: 22px; line-height: 37px;
}
.upgrade-tile p { color: var(--ink-2); font-size: 13px; margin: 0; }

/* ---- subscription preview states ---- */
body.sub-on .when-off { display: none !important; }
body.sub-off .when-on { display: none !important; }
.sub-toggle { font-size: 12px; color: var(--ink-2); }

/* analytics state (profile toggle / Enable buttons): live only when the plan
 * is active AND analytics is enabled — body gets .alive or .adark */
body.alive .ana-off { display: none !important; }
body.adark .ana-on { display: none !important; }

/* menu items and nav tabs are <a> on the account pages */
a.menu-item { text-decoration: none; display: block; }
a.nav-tab { text-decoration: none; }

.ana-live { flex: 1; display: flex; flex-direction: column; padding-bottom: 12px; min-width: 0; }
.line-chart.flatline { height: 130px; margin-top: auto; }
.date-axis {
  display: flex; justify-content: space-between; align-items: center;
  height: 34px; min-width: 0; padding: 0 16px; overflow: hidden;
}
.date-axis span {
  font-size: 8.5px; color: var(--ink-2); white-space: nowrap;
  transform: rotate(-40deg); transform-origin: center;
}

.tp-wrap { position: relative; flex: 1; margin: 14px 18px 10px; display: flex; flex-direction: column; justify-content: space-between; }
.tp-row { display: flex; align-items: center; gap: 10px; }
.tp-row small { width: 12px; text-align: right; color: var(--ink-3); font-size: 10.5px; }
.tp-row i { flex: 1; border-top: 1px solid #eef1f6; }
.tp-msg {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  color: var(--ink-2); font-size: 12px;
}
.tp-face {
  width: 28px; height: 28px; border-radius: 50%; background: #e8edf5; color: #94a3b8;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---- analytics overview (active plan) ---- */
.ana-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 16px; }
.ana-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.date-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 13px; font-size: 12.5px; color: var(--ink); font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 18px; }
.sc-txt { font-size: 12.5px; color: var(--ink-2); }
.sc-txt b { display: block; color: var(--ink); font-size: 21px; margin-top: 6px; }
.sc-ic {
  width: 34px; height: 34px; border-radius: 50%; background: #f1f5fb; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.ana-tables { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.table-card { padding: 6px 0 4px; display: flex; flex-direction: column; }
.table-card table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table-card th {
  background: #edf1f8; color: var(--ink); font-weight: 700; text-align: left;
  padding: 10px 18px; font-size: 12.5px;
}
.table-card th:first-child { border-radius: var(--r-xs) 0 0 8px; }
.table-card th:last-child { border-radius: 0 8px 8px 0; }
.table-card thead tr { border: 0; }
.table-card td { padding: 11px 18px; border-top: 1px solid #f0f3f9; color: var(--ink); }
.table-card tr td:not(:first-child), .table-card tr th:not(:first-child) { width: 15%; }
.no-records {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 20px; color: var(--ink-2); font-size: 13px;
}
.ana-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.chart-card, .popday-card { padding: 16px 18px; display: flex; flex-direction: column; min-height: 300px; min-width: 0; }
.chart-card h3, .popday-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.chart-card .line-chart.flatline { height: 190px; }
.pd-legend { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.pd-legend > span { display: inline-flex; align-items: center; gap: 10px; }
.sw { width: 26px; height: 26px; border-radius: var(--r-xs); display: inline-block; }
.sw.solid { background: #dbeafe; }
.sw.hatch { background: repeating-linear-gradient(45deg, rgba(47,125,246,.22) 0 3px, rgba(255,255,255,.04) 3px 6px); border: 1px solid #dbeafe; }
.pd-num { font-size: 11.5px; color: var(--ink-2); }
.pd-num b { display: block; color: var(--ink); font-size: 15px; }
.pd-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pd-ctr { color: var(--accent); font-size: 25px; font-weight: 800; }
.pd-ctr small { display: block; color: var(--ink-2); font-size: 11px; font-weight: 400; margin-top: 2px; }
.pd-days { display: flex; gap: 14px; }
.pd-days i { font-style: normal; font-size: 11px; color: var(--ink-2); }

/* ---- integrations ---- */
.int-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 620px)); gap: 16px; }
.int-card { padding: 20px 22px; display: flex; flex-direction: column; }
.int-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.int-head h3 { font-size: 17px; }
.int-logo {
  width: 46px; height: 46px; border-radius: var(--r-sm); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; background: #fff;
}
.int-card p { color: var(--ink-2); font-size: 13px; line-height: 1.6; margin: 0 0 14px; }
.feat-title { font-size: 13px; margin-bottom: 8px; }
.feat-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.feat-list li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink); }
.feat-list li::before {
  content: ''; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E"); background-size: 66%; background-position: center; background-repeat: no-repeat; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}
.connect-btn {
  margin-top: auto; border: 0; border-radius: var(--r-pill); padding: 12px;
  background: linear-gradient(90deg, #38bdf8, var(--accent-strong));
  color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
}
.connect-btn:hover { filter: brightness(1.06); }

/* ---- tutorial ---- */
.tut-card { max-width: 720px; padding: 22px 26px; }
.tut-card h3 { margin-bottom: 8px; }
.tut-card p { color: var(--ink-2); }
.tut-card ol { color: var(--ink-2); line-height: 1.9; padding-left: 20px; }

/* ============ responsive ============ */
@media (max-width: 1420px) {
  /* two columns: the left stack spans both rows, analytics cards fill col 2 */
  .dash-grid { grid-template-columns: minmax(440px, 1.1fr) minmax(0, 1fr); }
  .col-left { grid-row: 1 / 3; }
}
@media (max-width: 1060px) {
  .dash-grid { grid-template-columns: 1fr; }
  .col-left { grid-row: auto; }
  #mainNav { gap: 2px; }
  .nav-tab { padding: 8px 10px; font-size: 12.5px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .ana-tables, .ana-bottom { grid-template-columns: 1fr; }
}

/* the editor's narrow-sidebar rules in app.css must not restyle the dashboard
 * topbar brand (they hide .brand-name and stack .brand vertically) */
@media (max-width: 1080px) {
  body.dash .brand-name { display: inline; }
  body.dash .brand { flex-direction: row; padding: 0; gap: 9px; justify-content: flex-start; }
  body.dash .brand-mark { font-size: 24px; }
}
@media (max-width: 740px) {
  /* CE mobile: logo left + avatar-only chip right, nav tabs wrap below with
   * their full labels, cards stack full-width */
  #topbar { flex-wrap: wrap; padding: 10px 12px; gap: 10px; }
  #mainNav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
  .ws-wrap { margin-left: auto; }
  .ws-chip { padding: 4px; }
  .ws-txt, .ws-chip > svg { display: none; }
  .view { padding: 12px 12px 40px; }
  .sig-grid { grid-template-columns: 1fr; padding: 12px; }
  .master-frame { min-height: 240px; }

  .hello-card { flex-direction: column; align-items: stretch; }
  .prog { max-width: none; }
  .hello-r { width: 100%; }
  .logo-thumb { margin: 0 auto; }
  #upgradeAnim { width: 100%; justify-content: center; }

  .lib-bar { gap: 10px; }
  .search-wrap { flex: 1; min-width: 0; }
  .search-wrap input { width: 100%; min-width: 60px; }
  .lib-actions { margin-left: 0; width: 100%; }
  #createBtn { width: 100%; justify-content: center; order: 3; }

  /* the editor's mobile toast offset (clears its bottom nav) doesn't apply
   * here — the dashboard has no bottom nav */
  body.dash .toast { bottom: 22px; }

  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ana-head { flex-wrap: wrap; gap: 10px; }
  .date-axis span { font-size: 7px; }
  .pd-days { gap: 8px; }
  .table-card { overflow-x: auto; }
}

/* ---- extra analytics modules (countries / platforms & devices) ---- */
.geo-blob {
  flex: 1; min-height: 130px; border-radius: var(--r-sm); margin-top: 8px;
  background:
    radial-gradient(90px 55px at 22% 42%, #cfe0f7 60%, transparent 61%),
    radial-gradient(60px 40px at 38% 68%, #cfe0f7 60%, transparent 61%),
    radial-gradient(120px 60px at 62% 38%, #dbe7f8 60%, transparent 61%),
    radial-gradient(70px 45px at 82% 60%, #dbe7f8 60%, transparent 61%),
    #f6f9fd;
}
.dev-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.dev-row { font-size: 12px; color: var(--ink-2); }
.dev-row b { float: right; color: var(--ink); }
.dev-row i {
  display: block; height: 9px; border-radius: var(--r-pill); margin-top: 6px;
  background: var(--grad); min-width: 0;
}
.dev-row:nth-child(n+2) i { background: #dbe7f8; min-width: 24%; }

/* ══ #5: every pressable element confirms the press (scale .97) ══ */
button:where(:not(:disabled)) { transition: transform var(--dur-press) var(--ease-out); }
button:where(:not(:disabled)):active { transform: scale(0.97); }

/* ══ #6: trigger-anchored menus scale in from their trigger ══ */
.menu {
  transform-origin: top right;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
@starting-style { .menu:not(.hidden) { opacity: 0; transform: scale(0.95) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  @starting-style { .menu:not(.hidden) { transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .logo-thumb .shimmer { animation: none; }
}

/* ══ opportunity: the hand-animated logo delivery gets a real arrival ══ */
@keyframes mlArrive {
  0% { box-shadow: 0 0 0 0 rgba(47, 125, 246, 0.45); }
  100% { box-shadow: 0 0 0 22px rgba(47, 125, 246, 0); }
}
.master-frame.celebrate { animation: mlArrive 900ms var(--ease-out) 2; }
@media (prefers-reduced-motion: reduce) { .master-frame.celebrate { animation: none; } }
