/* Admin → Today (app/pages/admin/dashboard.php), owner-approved mock-up Oct 2026 */
.td { display: flex; flex-direction: column; }

/* status strip: small chips in one row, each a link to its switch */
.td-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.td-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-2); font-size: 13px; text-decoration: none; white-space: nowrap; }
.td-chip b { font-weight: 600; color: var(--text); }
.td-chip:hover { border-color: var(--gold-line); color: var(--text); }
.td-chip-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.td-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.td-dot.off { background: var(--err); } .td-dot.warn { background: var(--warn); } .td-dot.idle { background: var(--text-3); }
.td-up { color: var(--gold); font-weight: 600; padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--border); }
.td-strip-line { display: none; }

/* tiles are links */
.td-tiles { margin-bottom: 26px; }
.td-tile { position: relative; display: block; color: var(--text); text-decoration: none; transition: border-color .15s; }
.td-tile:hover { border-color: var(--gold-line); }
.td-go { position: absolute; top: 16px; right: 16px; color: var(--text-3); opacity: .7; display: flex; }

/* two columns: 2/3 to do, 1/3 latest */
.td-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.td-sec-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; min-height: 22px; }
.td-sec-h h2 { margin: 0; font: 700 15px/1.3 var(--head); }
.td-sec-h a { margin-left: auto; font-size: 13px; }
.td-gap { margin-top: 24px; }

/* the To do box: grouped rows, columns line up */
.td-todo { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.td-todo-h { padding: 12px 18px 8px; font: 700 11px/1.4 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); border-top: 1px solid var(--border); background: var(--surface-2); }
.td-todo-h:first-child { border-top: 0; }
.td-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) 128px 112px; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--border); }
.td-row .m { display: grid; gap: 3px; min-width: 0; }
.td-row .m b, .td-row .m span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-row .m b { font-size: 14px; font-weight: 600; color: var(--text); }
.td-row .m span { font-size: 12.5px; color: var(--text-3); }
.td-row .d { display: grid; gap: 2px; border-left: 1px solid var(--border); padding-left: 14px; font-variant-numeric: tabular-nums; }
.td-row .d b { font-size: 13.5px; font-weight: 600; }
.td-row .d span { font-size: 12.5px; color: var(--text-3); }
.td-row .d.soon b, .td-row .d.soon span { color: var(--ui-amber, #F2A84A); }
.td-row .d.soon span { font-weight: 600; }
.td-row .act .btn { width: 100%; }
.td-more { display: block; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.td-empty { display: flex; flex-direction: column; gap: 4px; padding: 26px 18px; text-align: center; }
.td-empty b { font-weight: 600; } .td-empty span { font-size: 13px; color: var(--text-3); }

/* right column lists, date column behind a divider like the To do box */
.td .td-orders > li, .td .td-members > li { position: relative; padding: 11px 16px; gap: 12px; }
.td-orders > li { grid-template-columns: minmax(0, 1fr) auto 82px; }
.td-members > li { grid-template-columns: minmax(0, 1fr) 82px; }
.td-orders .m, .td-members .m { display: grid; gap: 2px; min-width: 0; }
.td-orders .m b, .td-members .m b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.td-orders .m b a, .td-members .m b a { color: var(--text); }
.td-orders .m span, .td-members .m span { font-size: 12.5px; color: var(--text-3); }
.td-orders .pc { display: flex; position: relative; z-index: 1; }
.td-orders .w, .td-members .w { border-left: 1px solid var(--border); padding-left: 12px; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.td-orders .w b, .td-members .w b { font-size: 13px; } .td-orders .w span, .td-members .w span { font-size: 12px; color: var(--text-3); }
.td-orders > li:hover, .td-members > li:hover { background: var(--gold-soft); }
.td-sum { margin: -4px 0 10px; font-size: 13px; color: var(--text-3); line-height: 1.5; }
.td-sum span { display: block; }
.td-phone-more { display: none; }

@media (max-width: 1180px) {
  .td-row { grid-template-columns: 104px minmax(0, 1fr) 112px 100px; gap: 10px; padding: 12px 14px; }
}
@media (max-width: 1024px) {
  .td-cols { grid-template-columns: minmax(0, 1fr); }
}
/* phones: header, To do, tiles 2 per row, strip as one grey line, link */
@media (max-width: 640px) {
  .td .ui-head-acts { display: none; }
  .td-cols { display: contents; }
  .td-left { order: 1; margin-bottom: 18px; }
  .td-tiles { order: 2; margin-bottom: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-go { display: none; }
  .td-tile { display: flex; flex-direction: column; }
  .td-tile .lbl { font-size: 10.5px; letter-spacing: .04em; margin-bottom: auto; }
  .td-strip { display: none; }
  .td-strip-line { display: block; order: 3; margin: 0 0 16px; font-size: 13px; line-height: 1.55; color: var(--text-3); }
  .td-strip-line .td-w { color: var(--warn); }
  .td-right { display: none; }
  .td-phone-more { order: 4; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
  .td-todo-h { padding: 11px 14px 7px; }
  .td-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "b pl" "s s" "d act"; gap: 3px 12px; padding: 13px 14px; }
  .td-row .m { display: contents; }
  .td-row .m b { grid-area: b; }
  .td-row .m span { grid-area: s; white-space: normal; overflow: visible; overflow-wrap: anywhere; }   /* a long Bitcoin reference wraps instead of running off */
  .td-row .pl { grid-area: pl; justify-self: end; }
  .td-row .d { grid-area: d; display: flex; gap: 6px; align-items: baseline; border: 0; padding: 0; margin-top: 8px; }
  .td-row .d b { font-size: 12.5px; }
  .td-row .d span::before { content: "· "; }
  .td-row .act { grid-area: act; margin-top: 8px; }
  .td-row .act .btn { width: 108px; }
}
