/* ============================================================
   caller.css — Log-Karten, Steckbrief, Kalender (Caller-Ansicht)
   ============================================================ */

/* --- Kopf --- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-grid-compact { grid-template-columns: repeat(5, minmax(84px, 1fr)); max-width: 560px; }
@media (max-width: 720px) { .stat-grid-compact { grid-template-columns: repeat(3, 1fr); } }

/* --- Split: Liste + Steckbrief --- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.split-rail { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 96px); overflow-y: auto; }
@media (max-width: 1100px) { .split-rail { position: static; max-height: none; order: -1; } }

/* --- Filter --- */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar .input { flex: 1; min-width: 200px; }
.result-line { font-size: 13.5px; color: var(--text-2); margin: 4px 0 12px; }
.result-line b { color: var(--text); }

/* --- Log-Karte --- */
.log-list { display: flex; flex-direction: column; gap: 12px; }
.log-card {
  background: var(--surface); border-radius: var(--radius-l);
  box-shadow: var(--shadow); padding: 16px 18px;
  border: 1.5px solid transparent;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  cursor: pointer;
}
.log-card:hover { box-shadow: var(--shadow-l); }
.log-card.selected { border-color: var(--accent); }

.log-head { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 13px; }
.log-title { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-right: 3px; }
.log-id { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-pos { font-size: 12.5px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quelle { font-size: 11px; padding: 3px 8px; }
.quelle-panel { background: var(--accent-soft); color: var(--accent); }
.quelle-tg { background: rgba(142,142,147,.16); color: var(--text-2); }

.log-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 20px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface-2);
}
.lf { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lf-label { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.lf-value { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }
.lf.mono .lf-value { font-size: 14px; font-weight: 600; }

.btn-icon {
  appearance: none; border: 0; background: transparent; color: var(--text-3);
  cursor: pointer; padding: 0; width: 18px; height: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  align-self: flex-start; transition: color .15s;
}
.btn-icon:hover { color: var(--accent); }
.lf .btn-icon { align-self: flex-end; margin-top: -16px; }

/* Logins */
.logins { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.login-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border-radius: 10px; padding: 9px 12px;
  font-variant-numeric: tabular-nums;
}
.login-row.ok { box-shadow: inset 3px 0 0 var(--ok); }
.login-row.half { box-shadow: inset 3px 0 0 var(--warn); }
.login-index { font-size: 11px; font-weight: 700; color: var(--text-3); width: 54px; flex: none; text-transform: uppercase; letter-spacing: .04em; }
.login-user, .login-pass {
  flex: 1; text-align: left; overflow-wrap: anywhere;
  border: 0; background: transparent; color: var(--text);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14.5px; font-weight: 650; cursor: pointer;
  padding: 3px 6px; border-radius: 7px; transition: background .15s, color .15s;
}
.login-user:hover, .login-pass:hover { background: var(--accent-soft); color: var(--accent); }
.login-pass { color: var(--text-2); font-weight: 600; }
.login-none { margin-top: 12px; font-size: 14px; color: var(--warn); font-weight: 650; }
.login-edit {
  align-self: flex-start; margin-top: 4px; border: 0; background: transparent;
  color: var(--text-3); font-family: inherit; font-size: 12.5px; font-weight: 650;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 3px 0;
}
.login-edit:hover { color: var(--accent); }
.login-edit-list { display: flex; flex-direction: column; gap: 10px; }
.login-edit-row { display: flex; align-items: center; gap: 10px; }
.login-edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; }
.login-edit-fields .input { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }

.log-note { margin-top: 10px; font-size: 13px; color: var(--text-2); border-left: 3px solid var(--accent); padding-left: 10px; }

/* Notizfeld an jeder Karte */
.note-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.note-input { background: var(--surface-2); font-size: 14px; }
.note-row .btn { flex: none; }

/* Aktionen */
.log-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.act { background: var(--surface-2); font-size: 14px; padding: 8px 15px; }
.act.active { background: var(--accent); color: #fff; }
.act-mailbox.active { background: var(--warn); }
.act-cashed.active { background: var(--ok); }
.act-dead.active { background: var(--danger); }
.act-skeptical.active { background: #bf5af2; }

/* Admin-Zeile in der Karte */
.log-admin { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.select-xs { width: auto; min-width: 150px; padding: 6px 10px; font-size: 13px; }

/* --- Steckbrief --- */
.rail-card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 16px; }
.rail-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.rail-name { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.rail-meta { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.rail-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.rail-line span { color: var(--text-3); }
.rail-line b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.rail-note { margin-top: 10px; font-size: 12.5px; color: var(--text-2); border-left: 3px solid var(--accent); padding-left: 8px; }
.rail-recall {
  appearance: none; border: 0; background: var(--surface-2); cursor: pointer;
  width: 100%; text-align: left; border-radius: 10px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px;
  font-family: inherit; color: var(--text);
}
.rail-recall:hover { background: var(--accent-soft); }
.rail-recall-name { font-weight: 700; font-size: 13px; }
.rail-recall-time { font-size: 12px; color: var(--accent); font-weight: 600; }
.rail-recall-rel { font-size: 11px; color: var(--text-3); }

/* --- Kalender --- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-3); padding: 4px 0; }
.cal-month { flex: 1; text-align: center; font-weight: 800; font-size: 15px; }
.cal-day {
  appearance: none; border: 0; cursor: pointer; aspect-ratio: 1;
  border-radius: 9px; background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 600;
  transition: background .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
}
.cal-day:hover { background: var(--accent-soft); color: var(--accent); }
.cal-day.sel { background: var(--accent); color: #fff; }

/* --- Filter-Dialog --- */
.ftiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .ftiles { grid-template-columns: 1fr; } }
.ftile { background: var(--surface-2); border-radius: var(--radius); padding: 12px; }
.ftile-title { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.ftile-opts { display: flex; flex-wrap: wrap; gap: 5px; }
.ftile-opts .chip { font-size: 12.5px; padding: 5px 10px; background: var(--surface); }
.ftile-opts .chip-active { background: var(--accent); color: #fff; }
.ftile .select { background: var(--surface); }

/* --- Mehrfachauswahl --- */
.pick { display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick-box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; transition: all .15s var(--ease);
}
.pick input:checked + .pick-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.log-card.picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.bulkbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(140%);
  z-index: 120; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg-elev); backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-l); padding: 10px 14px; max-width: calc(100vw - 24px);
  transition: transform .28s var(--ease); pointer-events: none;
}
.bulkbar.show { transform: translateX(-50%) translateY(0); pointer-events: auto; }
.bulk-count { font-weight: 800; font-size: 13px; white-space: nowrap; }

/* --- Banner (Admin sieht Caller) --- */
.view-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
  font-weight: 700; font-size: 13.5px;
}
.rowbtn-line { background: transparent; border: 0; font-family: inherit; width: 100%; cursor: pointer; text-align: left; color: var(--text); }
.rowbtn-line:hover { background: var(--surface-2); border-radius: 8px; }
.rowbtn { cursor: pointer; }
.rowbtn:hover { background: var(--surface-2); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.line { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.line:last-child { border-bottom: 0; }
.mini-v { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.mini-l { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.bar { flex: 1; background: var(--accent); opacity: .75; border-radius: 4px 4px 0 0; min-height: 4px; }
.accent { color: var(--accent); }
.ok { color: var(--ok); }
.danger { color: var(--danger); }
