/* =========================================================================
   COMPONENTS — reusable, token-driven UI primitives
   ========================================================================= */

/* ---------- Button ---------------------------------------------------- */
/* ---------- Surface button (toolbar: Filter, Sort, Customize Widget…) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  height: var(--btn-height);
  padding: 0 var(--btn-pad-x);
  border-radius: var(--btn-radius);
  font-size: var(--text-md);
  font-weight: var(--fw-medium);
  color: var(--btn-fg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--btn-shadow);
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn svg { width: var(--btn-icon-size); height: var(--btn-icon-size); color: var(--btn-fg); transition: color var(--dur) var(--ease); }
/* hover only on real pointers — on touch :hover latches after a tap (stuck highlight) */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--gray-50); border-color: var(--border-strong); }
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:disabled:hover { background: var(--surface); border-color: var(--border); }
}

/* Ghost / low-emphasis — flat, no shadow */
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { background: var(--gray-100); border-color: transparent; }
}

/* Primary CTA (Exports) */
.btn-primary {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: var(--on-primary);
  box-shadow: var(--primary-glow);
}
.btn-primary svg { color: var(--on-primary); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--primary-700); border-color: var(--primary-700); }
}
.btn-primary:focus-visible { box-shadow: 0 0 0 3px var(--primary-200); }

/* Solid destructive button — red fill, white text */
.btn-danger {
  background: var(--danger-600);
  border-color: var(--danger-600);
  color: var(--text-invert);
  box-shadow: 0 1px 2px rgba(180, 35, 40, 0.28), inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn-danger svg { color: rgba(255,255,255,0.92); }
@media (hover: hover) and (pointer: fine) {
  .btn-danger:hover { background: #d23b40; border-color: #d23b40; }
}
.btn-danger:focus-visible { box-shadow: 0 0 0 3px var(--danger-bg); }
.btn-danger:disabled, .btn-danger.is-loading { opacity: 0.6; cursor: default; }

.btn-sm { height: 34px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.btn-icon { width: var(--btn-height); height: var(--btn-height); padding: 0; }
.btn-icon.btn-sm { width: 34px; height: 34px; }

/* Split surface button: one shared shell shadow, short centred divider */
.btn-split {
  display: inline-flex; align-items: stretch;
  border-radius: var(--btn-radius);
  box-shadow: var(--btn-shadow);
}
.btn-split > .btn { box-shadow: none; }
.btn-split > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: none; }
.btn-split > .btn-caret {
  position: relative;
  border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: none;
  padding: 0 var(--space-2); width: 32px;
}
.btn-split > .btn-caret::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: var(--split-divider-h); background: var(--split-divider);
}
.btn-split > .btn-caret.btn-primary::before { background: rgba(255,255,255,0.30); }

/* (the old standalone .icon-btn — a near-duplicate of `.btn.btn-icon` that
   differed only in word order — is gone; icon-only buttons use `btn btn-icon`) */

/* ---------- App toast (shared/lib/toast.js — the app-wide ephemeral toast) */
.app-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); z-index: var(--z-popover); padding: 10px 16px; border-radius: var(--radius-lg); background: var(--overlay-dark); color: #fff; border: 1px solid var(--border); font-size: var(--text-sm); font-weight: var(--fw-medium); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Card-action button (inside cards: On Google Meet, View more) */
.btn-card {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--btn-card-fg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--btn-shadow-card);
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-card svg { width: 14px; height: 14px; color: var(--btn-card-fg); }
@media (hover: hover) and (pointer: fine) {
  .btn-card:hover { background: var(--gray-50); border-color: var(--border-strong); }
}

/* shared disabled state (no app button is disabled today; additive only) */
.btn:disabled, .btn-card:disabled, .icon-btn:disabled, .kebab:disabled {
  opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn:disabled:hover, .btn-card:disabled:hover, .icon-btn:disabled:hover, .kebab:disabled:hover {
    background: var(--surface); border-color: var(--border);
  }
  .btn-primary:disabled:hover { background: var(--primary-600); border-color: var(--primary-600); }
  .btn-ghost:disabled:hover { background: transparent; }
}

/* ---------- Badge / pill --------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: var(--radius-xs);
  font-size: var(--text-2xs); font-weight: var(--fw-semibold);
  line-height: 1; white-space: nowrap; letter-spacing: 0.01em;
}
.badge-priority-high   { color: var(--pri-high-fg); background: var(--pri-high-bg); }
.badge-priority-medium { color: var(--pri-medium-fg); background: var(--pri-medium-bg); }
.badge-priority-low    { color: var(--pri-low-fg); background: var(--pri-low-bg); }
.badge-cat-dashboard   { color: var(--primary-600); background: var(--primary-50); }
.badge-cat-landing     { color: var(--info-600); background: var(--info-bg); }
.badge-cat-mobile      { color: var(--cat-mobile-fg); background: var(--cat-mobile-bg); }
.badge-neutral         { color: var(--text-muted); background: var(--gray-100); }
.badge-success         { color: var(--metric-up-fg); background: var(--metric-up-bg); }
.badge-danger          { color: var(--danger-600); background: var(--metric-down-bg); }
.badge svg { width: 13px; height: 13px; }

/* count chip used in sidebar / kanban headers */
.chip-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-muted); background: var(--gray-100);
  border-radius: var(--radius-xs);
}

/* ---------- Stage indicator ------------------------------------------ */
.stage { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--fw-medium); color: var(--text); white-space: nowrap; }
.stage .dot { width: 7px; height: 7px; border-radius: 50%; }
.stage[data-stage="Leads"]     .dot { background: var(--stage-leads); }
.stage[data-stage="Discovery"] .dot { background: var(--stage-discovery); }
.stage[data-stage="Demo"]      .dot { background: var(--stage-demo); }
.stage[data-stage="Won"]       .dot { background: var(--stage-won); }
.stage[data-stage="Lead"]      .dot { background: var(--stage-leads); }
.stage[data-stage="Follow Up"] .dot { background: var(--stage-discovery); }
.stage[data-stage="Consult"]   .dot { background: var(--stage-demo); }
.stage[data-stage="Closed"]    .dot { background: var(--stage-won); }
.stage[data-stage="Dead"]      .dot { background: var(--danger-600); }

/* ---------- Checkbox -------------------------------------------------- */
.checkbox {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-xs);
  background: var(--surface);
  display: inline-grid; place-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
/* press squish + the check springing in with a small overshoot. Transitions
   (not keyframes) on purpose: a re-rendered row inserts already-checked boxes
   with NO replay — the bounce only plays on a real state change. */
.checkbox:active { transform: scale(0.85); }
.checkbox::after {
  content: ""; width: 10px; height: 10px;
  transform: scale(0) rotate(-12deg);
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--on-primary);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
          mask: var(--icon-check) center / contain no-repeat;
}
@media (hover: hover) and (pointer: fine) {
  .checkbox:hover { border-color: var(--primary-400); }
}
.checkbox:checked { background: var(--primary-600); border-color: var(--primary-600); }
.checkbox:checked::after { transform: scale(1) rotate(0deg); }
/* popCheck() (tasksHelpers) adds this class on a REAL check only — a plain
   :checked keyframe would replay every time a re-render inserts an
   already-checked box. Squish → overshoot bounce + an expanding halo ring. */
.checkbox--pop { animation: checkbox-pop 360ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes checkbox-pop {
  0%   { transform: scale(0.8);  box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-600) 45%, transparent); }
  45%  { transform: scale(1.18); }
  100% { transform: scale(1);    box-shadow: 0 0 0 12px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .checkbox, .checkbox::after { transition-duration: 0.01ms; }
  .checkbox--pop { animation: none; }
}
.checkbox:disabled { opacity: 0.45; cursor: not-allowed; }
:root { --icon-check: 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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

/* ---------- Avatar / logo monogram ----------------------------------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: var(--text-xs); font-weight: var(--fw-bold); color: #fff;
  flex-shrink: 0; overflow: hidden; letter-spacing: 0;
}
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---- skeleton loading blocks (reusable across views) ----
   A grey placeholder with a sweeping shimmer. Size it with inline width/height;
   .skel-circle rounds it fully. Pairs with per-view skeleton markup that mirrors
   the real layout so content swaps in without a jump. */
.skel { position: relative; overflow: hidden; display: inline-block; vertical-align: middle; background: var(--gray-200); border-radius: 4px; }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: skel-shimmer 1.5s ease-in-out infinite;
}
html[data-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent); }
.skel-circle { border-radius: 50%; }
@keyframes skel-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }

/* company square logo */
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--fw-bold); color: #fff;
  flex-shrink: 0;
}
.logo-round { border-radius: 50%; }

/* ---------- Input / select / textarea -------------------------------- */
.input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text);
  font-size: var(--text-md); font-family: inherit;
  box-shadow: var(--btn-shadow);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-soft); }
.input:focus { outline: none; border-color: var(--primary-400); box-shadow: var(--ring-primary); }
select.input {
  cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
textarea.input { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; line-height: var(--leading-snug); }

/* Checkbox — the NATIVE input restyled (appearance:none), not a span+JS
   stand-in, so label clicks, Space/Tab, :checked and form semantics all keep
   working for free. 16px box with a 4px radius (--radius-xs at 6px reads too
   round at this size) and the lucide check baked in as a mask-free data URI,
   matching the select.input chevron convention above. */
.checkbox {
  appearance: none; -webkit-appearance: none;
  flex-shrink: 0; width: 16px; height: 16px; margin: 0;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--surface); cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.checkbox:hover:not(:disabled):not(:checked) { border-color: var(--border-strong); }
.checkbox:checked {
  background-color: var(--primary-600); border-color: var(--primary-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 14px;
}
.checkbox:focus-visible { outline: none; box-shadow: var(--ring-primary); }
.checkbox:disabled { opacity: .5; cursor: default; }

/* inline editable field — borderless until hover/focus (for edit-in-place) */
.input-inline {
  width: 100%; height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--radius-md); outline: 0;
  background: transparent; color: var(--text);
  font: inherit; font-size: var(--text-md);
  box-shadow: inset 0 0 0 1px transparent;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; appearance: none;
}
.input-inline::placeholder { color: var(--text-soft); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .input-inline:hover:not(:disabled):not([readonly]) { background: var(--surface-hover); }
}
.input-inline:focus { background: transparent; box-shadow: 0 0 0 1px var(--primary-400), var(--ring-primary); }
.input-inline:disabled { color: var(--text-soft); cursor: default; }
/* inline editable text area variant */
textarea.input-inline { height: auto; min-height: 56px; padding: 8px 12px; white-space: pre-wrap; overflow: auto; resize: vertical; line-height: var(--leading-snug); }
/* forced states (for the design-system reference) */
.input-inline.is-hovered { background: var(--surface-hover); }
.input-inline.is-focused { background: transparent; box-shadow: 0 0 0 1px var(--primary-400), var(--ring-primary); }

/* ---------- Filter dropdown ------------------------------------------ */
.filter-dd { position: relative; }
.filter-dd #filterTrigger svg:last-child { width: 15px; height: 15px; }
.filter-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: var(--z-popover);
  min-width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px;
  animation: popIn var(--dur) var(--ease);
}
.filter-menu[hidden] { display: none; }
.filter-opt {
  display: flex; align-items: center; gap: var(--space-2);
  height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
  font-size: var(--text-md); font-weight: var(--fw-medium); color: var(--text);
  transition: background var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .filter-opt:hover { background: var(--nav-hover-bg); }
}
.filter-opt > span:first-child { color: var(--text); }
.filter-opt svg { width: 16px; height: 16px; margin-left: auto; color: var(--primary-600); }
/* separates the special "Dead" status (hidden by default) from the live stages */
.filter-opt-sep { height: 1px; margin: 4px 8px; background: var(--border-faint); flex-shrink: 0; }

/* ---------- Date (sort) dropdown ------------------------------------- */
.sort-dd { position: relative; }
.sort-dd #sortTrigger svg:last-child { width: 15px; height: 15px; }
.sort-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: var(--z-popover);
  width: 300px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  animation: popIn var(--dur) var(--ease);
}
.sort-menu[hidden] { display: none; }

/* ---------- Shared popover-menu surface ------------------------------
   ONE surface recipe for every anchored menu/popover (the .filter-menu
   look): card surface, hairline border, pop shadow, popIn entrance. The
   per-view rules keep ONLY positioning/sizing/padding. Menus whose markup
   already carries .filter-menu (account/note/rt/cfile menus) need nothing
   here. Two radius tiers exist: md (compact menus) and lg (larger
   popovers). New menus: prefer .filter-menu in markup; else add the class
   to the matching tier below. */
.status-menu, .nc-dd-menu, .td-due-menu, .td-pri-menu,
.compose-fmt-pop, .compose-thumb-pop, .imed-shape-menu, .ne-fmt {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  animation: popIn var(--dur) var(--ease);
}
.slash-menu, .ne-ai-menu, .ne-style-menu, .cal-evt-pop, .cal-filt-pop {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: popIn var(--dur) var(--ease);
}
.sort-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 8px; }
.sort-presets .filter-opt { height: 34px; }
.sort-cal-wrap { border-top: 1px solid var(--border); padding-top: 10px; }
.sort-cal-head { margin-bottom: 6px; }
.sort-cal-head .month { font-size: var(--text-sm); }
.sort-cal { gap: 2px; }
.sort-cal .dow { font-size: 10px; padding: 2px 0; }
.sort-cal .day {
  width: 100%; height: auto; margin: 0; aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm); background: transparent;
  color: var(--text); font-weight: var(--fw-medium); font-size: var(--text-sm); position: relative;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .sort-cal .day:hover { background: var(--gray-100); }
}
.sort-cal .day.other { background: transparent; color: var(--text-soft); opacity: 0.4; pointer-events: none; }
.sort-cal .day.has-lead::after { content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--primary-500); }
.sort-cal .day.active { background: var(--primary-600); color: var(--on-primary); }
.sort-cal .day.in-range { background: var(--primary-50); color: var(--primary-700); }
.sort-cal .day.in-range.has-lead::after { background: var(--primary-500); }
.sort-cal .day.active.has-lead::after { background: var(--on-primary); }
.sort-cal-hint { font-size: var(--text-xs); color: var(--text-soft); text-align: center; margin-bottom: 8px; }

/* table empty state */
.table-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 24px; color: var(--text-soft); }
.table-empty svg { width: 26px; height: 26px; }
.table-empty span { font-size: var(--text-md); }

/* ---------- Search field --------------------------------------------- */
.search {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 38px; padding: 0 var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text-soft);
  min-width: 232px;
  box-shadow: var(--btn-shadow);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.search:focus-within { border-color: var(--border); box-shadow: none; }
.search svg { width: 19px; height: 19px; color: var(--primary-500); }
.search input {
  border: none; outline: none; background: none;
  font-size: var(--text-md); color: var(--text); width: 100%;
}
.search input::placeholder { color: var(--text-soft); }
.search input:focus, .search input:focus-visible { outline: none; box-shadow: none; border: none; }

/* ---------- Segmented control ---------------------------------------- */
.segmented {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; background: var(--seg-track);
  border-radius: var(--radius-md);
}
.segmented button {
  height: 31px; padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--text-soft);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .segmented button:hover { color: var(--text); }
}
.segmented button.active {
  background: var(--seg-active); color: var(--text-strong);
  box-shadow: var(--seg-active-shadow);
  border: 1px solid var(--seg-active-border);
}
/* full-width segmented control (e.g. dashboard widget tabs) */
.seg-full { display: flex; width: 100%; }
.seg-full button { flex: 1; }

/* tabs (text underline style) */
.tabs { display: inline-flex; gap: var(--space-5); }
.tabs button {
  position: relative; padding: 6px 0;
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--text-soft); transition: color var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tabs button:hover { color: var(--text); }
}
.tabs button.active { color: var(--text-strong); }
.tabs button.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--text-strong); border-radius: 2px;
}

/* ---------- Card ------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--space-5); }

/* ---------- Kebab / square icon button (small surface variant) ------- */
.kebab {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--btn-shadow);
  color: var(--btn-fg);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .kebab:hover { background: var(--gray-50); border-color: var(--border-strong); }
}
.kebab svg { width: 16px; height: 16px; }

/* link-style copy field (LinkedIn cell) */
.link-cell {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 30px; padding: 0 4px 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--info-600);
  font-size: var(--text-sm); max-width: 190px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .link-cell:hover { border-color: var(--primary-300); background: var(--primary-50); }
}
.link-cell .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-cell .copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: var(--radius-xs);
  color: var(--text-soft);
}
@media (hover: hover) and (pointer: fine) {
  .link-cell .copy:hover { background: var(--primary-100); color: var(--primary-600); }
}
.link-cell .copy svg { width: 14px; height: 14px; }

/* ---- Toolbar load-error chip -------------------------------------------
   The quiet in-toolbar replacement for the old full-width .load-error-banner:
   a <button> styled as a status chip (alert icon + short message) in danger
   red. Carries the surface's retry attribute (data-data-retry on Dashboard,
   data-cal-retry on Calendar) — the shells' delegated handlers re-run the
   right loader; is-loading is set by those handlers while a retry is in
   flight. [hidden] needs the explicit rule: display:flex would beat the UA
   [hidden]{display:none} at equal specificity. */
.load-error-chip { display: flex; align-items: center; gap: var(--space-2); color: var(--danger-600); font-family: inherit; font-size: var(--text-md); font-weight: var(--fw-medium); background: none; border: 0; padding: 0; cursor: pointer; }
.load-error-chip svg { width: 18px; height: 18px; flex: 0 0 auto; }
.load-error-chip.is-loading { opacity: 0.6; cursor: default; }
.load-error-chip[hidden] { display: none; }
/* On phones the chips are relocated into the crowded topbar
   (applyMobileLeadTools) — collapse them to icon-only (the title/aria-label
   keep the message reachable). */
@media (max-width: 640px) { .load-error-chip span { display: none; } }
