/* Team panel (/equipo). Builds on app.css tokens. Desktop: list left, lead card right. Phone: the card opens as a sheet. */
.eq-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 24px; background: rgb(9 9 10 / .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.eq-top .sp { flex: 1; }
.eq-top .brand .tag { margin-left: 4px; }
.eq-me { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.eq { max-width: 1440px; margin: 0 auto; padding: 24px; }
.eq-loading { padding: 64px 0; text-align: center; color: var(--muted); }

/* sign-in */
.eq-auth { min-height: calc(100dvh - 160px); display: grid; place-items: center; }
.eq-auth .card { width: min(400px, 100%); display: grid; gap: 16px; padding: 32px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.eq-auth h1 { font-size: 24px; letter-spacing: -.02em; }
.eq-auth .stack { display: grid; gap: 12px; }
.eq-auth .row { display: flex; justify-content: space-between; gap: 8px; }
.eq-auth .code { text-align: center; font: 600 24px var(--mono); letter-spacing: .4em; }

/* today tiles */
.eq-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { display: grid; gap: 4px; padding: 16px 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.tile small { color: var(--muted); font-size: 13px; font-weight: 600; }
.tile > b { font-size: 32px; line-height: 1.1; }
.tile > span { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--faint); }
.tile > span i { font-style: normal; color: var(--muted); }
.tile.yes > b { color: var(--lime); }

/* stage chips (click to filter) */
.eq-pipe { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.st { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.st b { margin-left: 4px; color: var(--text); }
.st:hover, .st.on { color: var(--text); border-color: var(--faint); background: var(--card-2); }
.tag.st-noanswer, span.st-noanswer { color: var(--muted); }
.tag.st-called, .tag.st-visited, span.st-called, span.st-visited { background: rgba(75,72,238,.2); color: #b3b1ff; }
.tag.st-demo, span.st-demo { background: rgba(242,194,48,.16); color: #f2c230; }
.tag.st-paying, span.st-paying { background: var(--lime); color: #121218; }
.tag.st-no, span.st-no { background: rgba(247,107,94,.15); color: #ff8f84; }

/* list + card */
.eq-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.eq-list, .eq-detail { border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.eq-list { overflow: hidden; }
.eq-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.eq-tabs button { flex: 1; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; }
.eq-tabs [aria-selected="true"] { background: var(--card-3); color: var(--text); }
.eq-filters { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.eq-filters .in { height: 40px; font-size: 16px; padding: 0 12px; border-radius: 12px; }
.eq-filters #q { grid-column: 1 / -1; }
.eq-mine { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.eq-rows { list-style: none; margin: 0; padding: 0; max-height: calc(100dvh - 380px); min-height: 320px; overflow: auto; }
.eq-rows li { display: grid; grid-template-columns: 1fr auto auto auto; grid-template-areas: "nm tag due own" "meta tag due own"; column-gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.eq-rows li:hover, .eq-rows li.on { background: var(--card-2); }
.eq-rows li.none { display: block; color: var(--faint); cursor: default; text-align: center; padding: 32px 16px; }
.eq-rows .nm { grid-area: nm; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-rows .meta { grid-area: meta; font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-rows .tag { grid-area: tag; }
.eq-rows .due { grid-area: due; font: 600 12px var(--mono); color: var(--muted); }
.eq-rows .due.late { color: #ff8f84; }
.eq-rows .own { grid-area: own; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--card-3); font-size: 12px; font-weight: 700; }

.eq-detail { padding: 24px; display: grid; gap: 16px; position: sticky; top: 80px; max-height: calc(100dvh - 96px); overflow: auto; }
.eq-empty { padding: 48px 0; text-align: center; }
.eq-back { display: none; justify-self: start; }
.eq-head { display: grid; gap: 4px; }
.eq-head h2 { font-size: 24px; letter-spacing: -.02em; outline: none; }
.meta { color: var(--muted); font-size: 14px; }
.eq-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; font-size: 14px; }
.eq-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.warn { padding: 12px 16px; border-radius: 12px; background: rgba(242,194,48,.1); color: #f2c230; font-size: 14px; }
.eq-need, .eq-note { padding: 12px 16px; border-radius: 12px; background: var(--bg-2); font-size: 14px; color: var(--muted); }
.eq-need small { display: block; color: var(--faint); font-weight: 600; margin-bottom: 4px; }
.eq-log { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.eq-log fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.eq-log legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label > span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; cursor: pointer; background: transparent; }
.seg input:checked + span { outline: 2px solid var(--text); outline-offset: 1px; }
.seg input:focus-visible + span { outline: 2px solid var(--accent-hi); }
.eq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eq-grid label.f input, .eq-grid label.f select { height: 44px; }
.eq-hist { display: grid; gap: 8px; }
.eq-hist h3 { font-size: 14px; color: var(--muted); }
.eq-hist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.eq-hist li { display: grid; gap: 4px; justify-items: start; font-size: 14px; }

@media (max-width: 1023px) {
  .eq-stats { grid-template-columns: repeat(2, 1fr); }
  .eq-body { grid-template-columns: 1fr; }
  .eq-detail { display: none; }
  .eq-sheet .eq-detail { display: grid; position: fixed; inset: 64px 0 0; max-height: none; border-radius: 0; z-index: 4;
    overscroll-behavior: contain; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .eq-back { display: inline-flex; }
  .eq-rows { max-height: none; }
}
@media (max-width: 599px) {
  .eq { padding: 16px; } .eq-top { padding: 0 16px; } .eq-me > span { display: none; }
  /* On a phone the queue comes first: tiles and stage chips shrink to one swipeable row each. */
  .eq-stats { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .tile { flex: none; padding: 12px 16px; } .tile > b { font-size: 24px; } .tile > span { display: none; }
  .eq-pipe { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px 0; }
  .st { flex: none; }
  .eq-rows li { grid-template-columns: 1fr auto; grid-template-areas: "nm tag" "meta due"; }
  .eq-rows .own { display: none; }
  .eq-grid { grid-template-columns: 1fr; }
}
.seg label > span.st-paying { background: transparent; color: var(--lime); border-color: rgba(217,246,106,.4); }
.seg label { position: relative; }
.eq-filters #tier { min-width: 104px; }
