/* Geri aramalar (design V5 parity: Geri-Aramalar). Sizes and colours are the design's; text without an explicit line
   height uses `normal` like the design (the app's body uses 1.4). */

/* ----------------------------------------------------------------- header: title, subline, Kurallar */
.cb2-title { min-width: 0; line-height: normal; }
.cb2-title .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Dönem (test note 11 Kas): the header's period choice, the look of Canlı İzleme's filters */
.cb2-period { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border: 1px solid var(--p-e0e0e0);
  border-radius: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.cb2-period .sel.cb2-period-sel { height: 36px; padding: 0 4px 0 0; border: 0; background: transparent; font-size: 13px; color: var(--ink); }
.cb2-period .sel.cb2-period-sel:focus-visible, .cb2-period .sel.cb2-period-sel.open { outline: none; }
.cb2-period:focus-within { outline: 2px solid var(--green); outline-offset: 1px; }
.cb2-rules-wrap { position: relative; flex-shrink: 0; }
.cb2-rules-btn { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--p-e0e0e0); border-radius: 10px;
  background: var(--card); font-size: 13px; color: var(--text); white-space: nowrap; cursor: pointer; line-height: normal; }
.cb2-rules-btn:hover { background: var(--p-fafafa); }
.cb2-rules-btn[aria-expanded="true"] { background: var(--lime-soft); border-color: var(--lime); }
.cb2-rules-btn:disabled { cursor: default; color: var(--faint); }
.cb2-rules { position: absolute; right: 0; top: calc(100% + 8px); width: 440px; max-width: calc(100vw - 32px); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px var(--shade-14); padding: 16px 18px; z-index: 30;
  display: flex; flex-direction: column; gap: 10px; line-height: normal; }
.cb2-rules h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.cb2-rules ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.cb2-rules li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 18px; color: var(--i-2e3a1c); }
.cb2-rules svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--green-ink); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }

/* ----------------------------------------------------------------- page body: KPIs, list, aside */
.cb2-body { height: calc(100vh - 64px); min-height: 560px; padding: 16px; display: flex; flex-direction: column; gap: 16px;
  line-height: normal; }
.cb2-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; flex-shrink: 0; }
.cb2-kpis-wait { min-height: 97px; }
.cb2-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column;
  gap: 2px; min-width: 0; }
/* a full title may take two lines on a narrow screen; the numbers sit at the foot of each tile, on one line across */
.cb2-kpi-l { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; font-size: 12px; line-height: 15px;
  color: var(--muted); }
.cb2-kpi-l > span:first-child { min-width: 0; overflow-wrap: break-word; }
.cb2-kpi-v { margin-top: auto; font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.cb2-kpi-s { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb2-main { flex-grow: 1; min-height: 0; display: flex; gap: 16px; }

/* the list */
.cb2-list { flex-grow: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: flex;
  flex-direction: column; overflow: hidden; }
.cb2-tabs { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; flex-shrink: 0; }
.cb2-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--p-e4e4e4);
  background: var(--card); font-size: 12.5px; font-weight: 400; color: var(--ink); cursor: pointer; white-space: nowrap; }
.cb2-tab:hover { background: var(--p-fafafa); }
.cb2-tab[aria-selected="true"] { border-color: var(--lime); background: var(--lime-soft); font-weight: 600; }
.cb2-tab span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cb2-tab.cb2-urgent { margin-left: auto; }
.cb2-tab.cb2-urgent.on { border-color: var(--p-f2c9c9); background: var(--p-fff5f5); color: var(--red-ink); font-weight: 600; }
.cb2-tab.cb2-urgent.on span { color: var(--red-ink); }
.cb2-head, .cb2-row { display: grid; grid-template-columns: 74px 138px minmax(0, 1fr) 92px 72px 86px 132px; gap: 12px; }
.cb2-head { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); font-size: 12px; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.cb2-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.cb2-row { width: 100%; flex-shrink: 0; align-items: center; min-height: 52px; padding: 7px 16px; border: 0; border-bottom: 1px solid var(--p-f4f4f4);
  background: var(--card); text-align: left; cursor: pointer; color: var(--text); }
.cb2-row:hover { background: var(--p-fafbf8); }
.cb2-row[aria-pressed="true"] { background: var(--lime-soft); }
.cb2-prio { justify-self: start; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px;
  font-weight: 700; white-space: nowrap; }
.cb2-cell { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cb2-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb2-phone { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb2-src { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; min-width: 0;
  max-width: 100%; }
.cb2-src-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; }     /* narrow screens: the label gives way, the time stays */
.cb2-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cb2-when { font-weight: 400; color: var(--muted); flex-shrink: 0; }
.cb2-detail { font-size: 12px; line-height: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb2-try, .cb2-time { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.cb2-try b, .cb2-time b { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb2-try small, .cb2-time small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb2-who { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the pill is a block (not the design's inline-flex) so a long text ends in "…"; it may use 12px of the row padding */
.cb2-pill { justify-self: start; max-width: calc(100% + 12px); display: block; height: 24px; line-height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb2-empty { margin: 0; padding: 26px 16px; text-align: center; font-size: 13px; line-height: 19px; color: var(--muted); }
.cb2-foot-bar { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.cb2-hide { display: inline-flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; white-space: nowrap; }
.cb2-hide input { accent-color: var(--green-text); width: 15px; height: 15px; margin: 0; }

/* the selected record */
.cb2-aside { width: 340px; flex-shrink: 0; min-height: 0; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.cb2-aside-empty { justify-content: center; }
.cb2-a-head { display: flex; flex-direction: column; gap: 3px; }
.cb2-a-src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.cb2-aside h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); }
.cb2-a-phone { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cb2-box { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--p-efefea); background: var(--p-fafaf7); display: flex; flex-direction: column; gap: 5px; }
.cb2-box-t { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cb2-box-s { font-size: 13px; line-height: 19px; color: var(--ink); }
.cb2-box-e { font-size: 12px; line-height: 17px; color: var(--text-2); }
.cb2-steps { display: flex; flex-direction: column; gap: 8px; }
.cb2-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.cb2-step { display: flex; gap: 10px; align-items: flex-start; }
.cb2-step-dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; flex-shrink: 0; }
.cb2-step-text { display: flex; flex-direction: column; min-width: 0; }
.cb2-step-t { font-size: 13px; color: var(--ink); }
.cb2-step-s { font-size: 11.5px; color: var(--muted); }
.cb2-step-n { font-size: 12px; line-height: 16px; color: var(--text); font-style: italic; overflow-wrap: anywhere; }
.cb2-note { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--p-fffbef); border: 1px solid var(--p-f3e3b5);
  font-size: 13px; line-height: 18px; color: var(--ink); overflow-wrap: anywhere; }
.cb2-sec { padding-top: 10px; border-top: 1px solid var(--line-soft); }
.cb2-controls { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.cb2-field { display: flex; flex-direction: column; gap: 6px; }
.cb2-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
.cb2-seg button { height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: 12.5px; font-weight: 400; cursor: pointer; }
.cb2-seg button:hover { background: var(--p-f4f4f4); }
.cb2-seg button[aria-checked="true"] { background: var(--inverse); color: var(--on-inverse); font-weight: 600; }
.cb2-select { height: 36px; border: 1px solid var(--p-e0e0e0); border-radius: 10px; padding: 0 10px; background: var(--card); font-size: 13px; font-weight: 400;
  color: var(--ink); width: 100%; }
.cb2-save { height: 42px; border: 0; border-radius: 12px; background: var(--lime); color: var(--lime-ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.cb2-save:hover { background: var(--f-a7db2e); }
.cb2-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cb2-btn { height: 36px; border: 1px solid var(--p-e0e0e0); border-radius: 10px; background: var(--card); font-size: 13px; color: var(--text); cursor: pointer; }
.cb2-btn:hover { background: var(--p-fafafa); }
.cb2-btn[aria-expanded="true"] { border-color: var(--inverse); }
.cb2-btn-out { border-color: var(--p-ebc7c7); color: var(--red-ink); }
.cb2-btn-out:hover { background: var(--p-fff5f5); }
.cb2-btn-out[aria-expanded="true"] { border-color: var(--f-b42323); }
.cb2-btn-dark { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); font-weight: 600; }
.cb2-btn-dark:hover { background: var(--inverse-strong); }
.cb2-btn-red { background: var(--f-b42323); border-color: var(--f-b42323); color: var(--on-fill); font-weight: 600; }
.cb2-btn-red:hover { background: var(--f-9e1e1e); }
.cb2-save:disabled, .cb2-btn:disabled { opacity: 0.5; cursor: default; }
.cb2-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--p-fafaf7); }
.cb2-panel-t { font-size: 12px; font-weight: 600; color: var(--text-2); }
.cb2-panel-t em { font-style: normal; font-weight: 400; color: var(--red-ink); }
.cb2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cb2-chip { height: 28px; padding: 0 10px; border: 1px solid var(--p-e4e4e4); border-radius: 999px; background: var(--card); font-size: 12px; color: var(--ink);
  cursor: pointer; white-space: nowrap; }
.cb2-chip[aria-pressed="true"] { border-color: var(--lime); background: var(--lime-soft); font-weight: 600; }
.cb2-input { height: 36px; border: 1px solid var(--p-e0e0e0); border-radius: 10px; padding: 0 10px; background: var(--card); font-size: 13px; color: var(--ink);
  width: 100%; }
.cb2-foot { font-size: 11.5px; line-height: 16px; color: var(--muted); }

/* laptops: a narrower aside and columns leave room for the reason; small screens: the aside goes under the list */
@media (max-width: 1360px) {
  .cb2-aside { width: 300px; }
  .cb2-head, .cb2-row { grid-template-columns: 66px 118px minmax(0, 1fr) 82px 60px 76px 118px; gap: 10px; }
}
@media (max-width: 980px) {
  .cb2-body { height: auto; }
  .cb2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb2-main { flex-direction: column; }
  .cb2-list { min-height: 420px; }
  .cb2-aside { width: auto; overflow: visible; }
  .cb2-title .sub { white-space: normal; }
}
