/* ============================================ */
/* Techs styles — v10 (compact)                  */
/* Reuses topnav / kpi / page-header from pipeline */
/* ============================================ */

.techs-wrap {
  padding: 20px 24px;
  background: var(--page-bg);
  min-height: calc(100vh - 130px);
}
.techs-roster {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 1024px) { .techs-roster { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .techs-roster { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

/* === TECH CARD === */
.tech-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-left: 3px solid var(--slate-300);
  border-radius: var(--r);
  padding: 12px 14px;
  box-shadow: var(--card-shadow);
  transition: all .15s;
  cursor: pointer;
}
.tech-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-1px); }
.tech-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-1px); }

.tech-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}
.tech-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg,#6E6CE0,#5856D6);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.tech-id-block { flex: 1; min-width: 0; }
.tech-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tech-sub {
  font-size: 11px;
  color: var(--slate-500);
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tech-busy {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.tech-busy.b-free { background: rgba(16,185,129,.12); color: #047857; }
.tech-busy.b-busy { background: rgba(245,158,11,.15); color: #B45309; }
.tech-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  text-transform: none;
  letter-spacing: .3px;
}
.tech-status.ok      { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.tech-status.off     { background: var(--danger-light);  color: var(--danger);  border: 1px solid var(--danger-border); }
.tech-status.neutral { background: var(--slate-100);     color: var(--slate-600); border: 1px solid var(--slate-200); }

.tech-contact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--slate-600);
  font-weight: 500;
  margin-bottom: 8px;
}
.tech-contact:empty { display: none; }
.tech-contact span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tech-invite {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  margin-bottom: 9px;
}
.tech-invite.ok      { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.tech-invite.pending { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning-border); }
.tech-invite.neutral { background: var(--slate-100);     color: var(--slate-600); border: 1px solid var(--slate-200); }

/* === STATS === */
.tech-stats {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--slate-100);
  padding-top: 8px;
}
.ts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ts-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: none;
  letter-spacing: .3px;
}
.ts-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -.3px;
}

/* === RESPONSIVE === */
@media (max-width: 800px) {
  .techs-wrap { padding: 14px; }
  .techs-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ===== Add-technician button + form ===== */
.filter-pill-add { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.filter-pill-add:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.atf-field { margin-bottom: 12px; }
.atf-label { display: block; font-size: 12px; font-weight: 700; color: var(--slate-600); margin-bottom: 4px; }
.atf-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--slate-200);
  border-radius: var(--r-sm);
  background: var(--slate-50);
  outline: none;
  transition: all .12s;
}
.atf-input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12); }

/* Techs detail footer: fill equally on desktop, square icon row on mobile */
#modal-tech .adv-footer .adv-btn { flex: 1; }
@media (max-width: 768px) {
  #modal-tech .adv-lbl { display: none; }
  #modal-tech .adv-footer { justify-content: flex-end; gap: 12px; }
  #modal-tech .adv-footer .adv-btn { flex: 0 0 auto; width: 44px; height: 44px; min-width: 0; padding: 0; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Quick contact on tech cards (Call / WhatsApp) — compact square icons, card stays closed */
.tech-actions { display: flex; gap: 8px; margin-top: 10px; }
.ta-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--slate-50); border: 1px solid var(--slate-200); font-size: 17px; text-decoration: none; line-height: 1; }
.ta-btn:hover { background: var(--slate-100); border-color: var(--slate-300); }

/* compact tech cards (shorter height) */
.tech-card { padding: 10px 12px; }
.tech-card-head { margin-bottom: 7px; }

/* ════ iOS v2 — Step E: Techs structural polish (additive) ════ */
.tech-card { border-radius: var(--r-md); border-top:.5px solid var(--slate-200); border-right:.5px solid var(--slate-200); border-bottom:.5px solid var(--slate-200);
  transition: transform .12s ease, box-shadow .15s ease; }
.tech-card:active { transform: scale(.985); }
.tech-status, .tech-invite { border-radius: 999px; }
.ta-btn { border-radius: var(--r-md); transition: transform .12s ease, background .15s ease; }
.ta-btn:active { transform: scale(.94); }
.atf-input:focus { box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .15); }

/* ============================================================
   Prototype 1:1 — Techs screen (KPI pills + .tech rows)
   Scoped #page-techs. Colors = prototype literals.
   ============================================================ */
#page-techs .page-title{font-size:30px;font-weight:700;letter-spacing:-.02em}
/* KPI strip → mpill pills (keep data-tf/onclick/ids) */
#page-techs .kpi-strip{display:flex;gap:10px;overflow-x:auto;padding:2px 0 14px;scrollbar-width:none;grid-template-columns:none}
#page-techs .kpi-strip::-webkit-scrollbar{display:none}
#page-techs .kpi-tile{flex-shrink:0;background:#fff;border:1px solid #E6E8EE;border-radius:16px;padding:10px 14px;min-width:104px;box-shadow:0 1px 3px rgba(16,24,40,.06),0 1px 2px rgba(16,24,40,.04);display:flex;flex-direction:column-reverse;align-items:flex-start;gap:2px;cursor:pointer}
#page-techs .kpi-tile.active{border-color:#5856D6}
#page-techs .kpi-tile-icon{display:none}
#page-techs .kpi-tile-label{font-size:12px;color:#6B7280;font-weight:500}
#page-techs .kpi-tile-value{font-size:21px;font-weight:700;letter-spacing:-.01em;color:#0B1220}
#page-techs .kpi-tile.active .kpi-tile-value{color:#5856D6}
#page-techs #tkpi-payout{color:#B7791F}
/* Tech rows → prototype .tech */
#page-techs .techs-roster{display:flex;flex-direction:column;gap:10px}
#page-techs .tech{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid #E6E8EE;border-radius:20px;padding:14px;cursor:pointer}
#page-techs .tech .avatar{width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;font-weight:700;flex-shrink:0;letter-spacing:.02em}
#page-techs .tech-b{flex:1;min-width:0}
#page-techs .tech-n{font-size:16px;font-weight:700;color:#0B1220;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#page-techs .tech-s{font-size:12.5px;color:#6B7280;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#page-techs .tech-acts{display:flex;gap:7px;flex-shrink:0}
#page-techs .tech-acts .sm-btn{background:#F5F6FA;border:1px solid #E6E8EE;border-radius:11px;padding:8px 12px;font-size:12.5px;font-weight:600;color:#0B1220;text-decoration:none;cursor:pointer;white-space:nowrap}
#page-techs .tech-acts .sm-btn:active{transform:scale(.97)}

/* ============================================================
   STANDARD MONITOR — Э5: Techs + Assignment (PDF p8). Desktop-only.
   New block hidden by default; grid STRICTLY @media(min-width:1366px).
   ============================================================ */
.techs-aside { display:none; }

@media (min-width:1366px){
  /* KPI row wider (real pills → cards) */
  #page-techs .kpi-strip{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; overflow:visible}
  #page-techs .kpi-tile{min-width:0}
  /* 2-col: tech grid left, assignment queue right */
  .techs-wrap{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:18px; align-items:start}
  .techs-wrap #techs-area{grid-column:1; min-width:0}
  #page-techs .techs-roster{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
  .techs-wrap .techs-aside{grid-column:2; display:flex; flex-direction:column; align-self:start; background:#fff; border:1px solid #E6E8EE; border-radius:18px; padding:16px; position:sticky; top:78px}
  .techs-aside .tq-h{font-size:18px; font-weight:800; letter-spacing:-.01em; color:#0B1220; margin-bottom:4px}
  .techs-aside .tq-row{display:flex; align-items:center; gap:10px; padding:11px 0; border-top:1px solid #EEF0F4}
  .techs-aside .tq-b{flex:1; min-width:0}
  .techs-aside .tq-t{font-size:14px; font-weight:700; color:#0B1220; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
  .techs-aside .tq-s{font-size:12px; color:#6B7280}
  .techs-aside .tq-assign{flex-shrink:0; background:#5856D6; color:#fff; border:none; border-radius:999px; height:34px; padding:0 14px; font-size:13px; font-weight:700; font-family:inherit; cursor:pointer}
  .techs-aside .tq-empty{font-size:12.5px; color:#9AA1AC; padding:8px 0}
}
@media (min-width:1536px){ .techs-wrap{grid-template-columns:minmax(0,1fr) 360px} }

/* P2(d): technician invite button */
.adv-invite{background:#EEF2FF;color:#4338CA}
.adv-invite:hover{filter:brightness(.97)}
.adv-invite:disabled{opacity:.6;cursor:default}
