/* Desk, hub, companion, phone — control kit.
   Load LAST, after css/house.css and after css/house-showcase.css.
   Beats the radius-0 agency skin and the 4px fallback at house-showcase.css:949.
   Dark colours stay the honeycomb desk. This file changes shape, size, and air. */

html[data-skin="agency"] body,
html[data-skin="parlour"] body {
  background-color: var(--bg) !important;
  background-image: none;
}

/* ——— day / night toggle ——— */
.daytog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 84px;
  padding: 0 16px;
  border-radius: var(--r-chip);
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.daytog:hover { border-color: var(--acc); }
.daytog:focus-visible { outline: none; box-shadow: var(--focus); }
.daytog:disabled { opacity: 0.45; cursor: not-allowed; }
.mtop .daytog { margin-left: auto; }
html.day #mwm {
  background: #060309;
  border-radius: 20px;
  padding: 8px 12px;
  display: inline-flex;
}

/* ——— dominant group tabs (Shift Messages People Money House) ——— */
.groups {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.groups button {
  flex: 1 0 108px;
  scroll-snap-align: start;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--r-btn) !important;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}
.groups button.on {
  background: var(--acc);
  color: var(--acc-ink);
  border-color: transparent;
  box-shadow: none;
}
.groups button:hover { border-color: var(--acc); }
.groups button.on:hover { border-color: transparent; }
.groups button:focus-visible { outline: none; box-shadow: var(--focus); }
.groups button:disabled { opacity: 0.45; cursor: not-allowed; }

@media (min-width: 1280px) {
  .groups { gap: 12px; overflow: visible; }
  .groups button {
    flex: 1 1 0;
    min-width: 0;
    min-height: var(--tab-h);
    font-size: 18px;
    font-weight: 700;
  }
}

/* bottom tabs, same language, never square */
.tabs button {
  min-height: 52px;
  border-radius: 14px !important;
  font-weight: 700;
}
.tabs button.on {
  background: var(--acc);
  color: var(--acc-ink);
  border-color: transparent;
}

/* ——— buttons ——— */
.b, .btn, button.nv, .door, .eh-tile, .seg button, .pad .b, .help {
  border-radius: var(--r-btn) !important;
}
.b, .btn {
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}
.b.pri, .btn.pri, .b.on {
  background: var(--acc);
  color: var(--acc-ink);
  border-color: transparent;
}
.b.xl { min-height: 64px; border-radius: 22px !important; font-size: 1.2rem; }
.b:hover, .btn:hover { border-color: var(--acc); }
.b.pri:hover, .btn.pri:hover { filter: brightness(1.05); }
.b:focus-visible, .btn:focus-visible, .door:focus-visible, .eh-tile:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.b:disabled, .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.b.busy { opacity: 0.7; pointer-events: none; }

/* hub tiles — the homepage she shows people */
.door, a.door, .eh-tile {
  border-radius: var(--r-tile) !important;
  min-height: 160px;
  padding: 28px;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: none;
}
.door h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; }
.seg { border-radius: var(--r-chip) !important; padding: 4px; }
.seg button { border-radius: var(--r-chip) !important; min-height: 44px; font-weight: 700; }
.seg button.on { background: var(--acc); color: var(--acc-ink); border-color: transparent; }

/* ——— inputs, selects, chips ——— */
.in, .sel, textarea.in, select, input[type="text"], input[type="number"], input[type="tel"], input[type="date"], input[type="time"] {
  min-height: 48px;
  border-radius: var(--r-ctrl) !important;
  border: 1px solid var(--line);
  background: var(--glass2);
  color: var(--ink);
  padding: 12px 14px;
  box-shadow: none;
}
textarea.in { min-height: 120px; padding: 14px; }
.in:focus, .sel:focus, textarea.in:focus, .in:focus-visible, .sel:focus-visible {
  outline: none;
  border-color: var(--acc);
  box-shadow: var(--focus);
}
.in[disabled], .sel[disabled] { opacity: 0.45; }
.bk-card, .card, .main, .groups, .chips { min-width: 0; max-width: 100%; }
.chip, button.chip {
  max-width: 100%;
  border-radius: var(--r-chip) !important;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-weight: 650;
  box-shadow: none;
}
.chip.on {
  background: var(--acc);
  color: var(--acc-ink);
  border-color: transparent;
}
.chip:focus-visible { outline: none; box-shadow: var(--focus); }

/* ——— forms get air. No hairline cyan cage. ——— */
.bk-card, .card, .f, details.fold, .banner, .toast, .modal > .card, .palette .pb, .blk, .canvas, .dropend, .eh-pay {
  border-radius: var(--r-card) !important;
  border-width: 1px;
  box-shadow: none;
}
.bk-card {
  padding: 24px;
  gap: 16px;
  background: var(--glass);
  border: 1px solid var(--line);
}
.f { margin: 0 0 16px; }
.f > span, .k, .lbl {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (min-width: 1280px) {
  .bk-card { padding: 28px 32px; }
  .book-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
}
.book-rail {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--glass);
  padding: 20px;
  position: sticky;
  top: 16px;
}
.book-rail .sum { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.book-rail .b { width: 100%; min-height: 52px; margin-top: 16px; }

/* wide booking rows were forced square */
.eh-books .bk-card { border-radius: var(--r-card) !important; border: 1px solid var(--line); background: var(--glass); }

/* ——— side nav ——— */
.nav a, .nav button.nv {
  border-radius: 16px !important;
  min-height: 48px;
  font-weight: 650;
}
.nav a.on, .nav button.nv.on {
  background: var(--glass2);
  box-shadow: inset 3px 0 0 var(--acc);
}

/* ——— messages ——— */
.msg-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 70vh;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--glass);
}
.msg-lanes {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.msg-lanes button {
  flex: 1;
  min-height: 44px;
  border-radius: var(--r-chip) !important;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.msg-lanes button.on { background: var(--acc); color: var(--acc-ink); border-color: transparent; }
.msg-lanes button:focus-visible { outline: none; box-shadow: var(--focus); }
.inbox { border: 0; border-radius: 0; box-shadow: none; min-height: 0; }
.th { min-height: 72px; padding: 14px 16px; }
.th .av, .lane .girl .av, .dot, .pinrow i, .cnt {
  border-radius: 999px !important;
}
.bub { border-radius: var(--r-bubble) !important; max-width: 75%; }
.bub.client { border-bottom-left-radius: var(--r-tail) !important; }
.bub.bot, .bub.staff { border-bottom-right-radius: var(--r-tail) !important; }
.composer .in { border-radius: 22px !important; }
.client-history {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: var(--glass2);
}
.client-history h3 { margin: 0 0 8px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }

@media (min-width: 768px) {
  .msg-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .msg-lanes { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--line); }
  .msg-lanes button { flex: 0 0 auto; text-align: left; border-radius: 14px !important; }
}
/* Three children only: lanes, .inbox (list + thread), history.
   A fourth column steals the thread. At 1280 the desk shell is ~930px,
   so history sits under the thread. Thread column never under 360px. */
@media (min-width: 1280px) {
  .msg-shell.has-history {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .msg-shell.has-history .msg-lanes { grid-row: 1 / span 2; }
  .msg-shell.has-history .inbox {
    display: grid;
    grid-column: 2;
    grid-template-columns: minmax(220px, 300px) minmax(360px, 1fr);
    min-width: 0;
  }
  .msg-shell.has-history .client-history {
    grid-column: 2;
    border-top: 1px solid var(--line);
    border-left: 0;
    max-height: 240px;
    overflow: auto;
  }
  .inbox { grid-template-columns: minmax(220px, 300px) minmax(360px, 1fr); }
}
@media (min-width: 1600px) {
  .msg-shell.has-history {
    grid-template-columns: 200px minmax(0, 1fr) 280px;
  }
  .msg-shell.has-history .client-history {
    grid-column: 3;
    grid-row: 1 / span 2;
    max-height: none;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .msg-shell.has-history .inbox { grid-column: 2; }
}

/* circles stay circles even when the old pack squares every radius */
.mark, .lock .mark { border-radius: 999px !important; }

@media (max-width: 767px) {
  .bk-card { padding: 16px; }
  .chips { flex-wrap: wrap; }
  .chip, button.chip { flex: 1 1 100%; }
}

.chip input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0 6px 0 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--glass2);
  vertical-align: middle;
}
.chip input[type="checkbox"]:checked {
  background: var(--acc);
  border-color: transparent;
}
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0 6px 0 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--glass2);
  vertical-align: middle;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--acc);
  border-color: transparent;
}
