/* Team Board (Kanban), Shift Reports, Permissions center, toasts */
#tab-board.active, #tab-reports.active { display: flex; flex-direction: column; }
#tab-board.active { height: var(--kb-h, calc(100dvh - 120px)); min-height: 380px; }

.kb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.kb-toolbar .form-input, .kb-toolbar .form-select { padding: 7px 10px; font-size: 12.5px; }
.kb-toolbar .kb-spacer { flex: 1; }
.kb-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); }
.kb-live i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; display: inline-block; }
.kb-live.on i { background: #22c55e; box-shadow: 0 0 8px #22c55e; }

.kb-board { flex: 1; min-height: 0; display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.kb-col { flex: 0 0 min(340px, 86vw); display: flex; flex-direction: column; max-height: 100%; background: rgba(17,24,39,.72); border: 1px solid var(--border-subtle); border-radius: 12px; scroll-snap-align: start; }
.kb-col.drop-target { outline: 2px dashed #38bdf8; outline-offset: -3px; }
.kb-col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); position: sticky; top: 0; }
.kb-col-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kb-col-name { font-weight: 700; font-size: 13.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-count { background: rgba(255,255,255,.08); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 700; }
.kb-icon-btn { background: transparent; border: 0; color: var(--text-muted); cursor: pointer; font-size: 15px; padding: 2px 6px; border-radius: 6px; }
.kb-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.kb-col-body { flex: 1; min-height: 60px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.kb-empty { color: var(--text-dim); font-size: 12px; text-align: center; padding: 18px 6px; }
.kb-more { text-align: center; color: var(--text-muted); font-size: 11.5px; padding: 6px; }

.kb-card { position: relative; background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-left: 4px solid var(--kb-prio, #64748b); border-radius: 10px; padding: 9px 10px 8px; cursor: grab; user-select: none; transition: transform .12s, box-shadow .12s; }
.kb-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.35); transform: translateY(-1px); }
.kb-card.dragging { opacity: .35; }
.kb-card.flash { animation: kbflash 1.4s ease-out; }
@keyframes kbflash { 0% { box-shadow: 0 0 0 3px #38bdf8; } 100% { box-shadow: 0 0 0 0 rgba(56,189,248,0); } }
.kb-card-title { font-weight: 600; font-size: 13px; line-height: 1.3; word-break: break-word; }
.kb-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; font-size: 10.5px; color: var(--text-muted); align-items: center; }
.kb-chip { background: rgba(255,255,255,.08); border-radius: 6px; padding: 1px 7px; }
.kb-chip.cat { background: rgba(56,189,248,.16); color: #7dd3fc; }
.kb-chip.overdue { background: rgba(239,68,68,.2); color: #fca5a5; }
.kb-prio-urgent { --kb-prio: #ef4444; } .kb-prio-high { --kb-prio: #f59e0b; } .kb-prio-normal { --kb-prio: #38bdf8; } .kb-prio-low { --kb-prio: #64748b; }
.kb-card-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 10.5px; color: var(--text-dim); }
.kb-drop-line { height: 3px; background: #38bdf8; border-radius: 2px; flex: none; }
.kb-add-col { flex: 0 0 200px; align-self: flex-start; border: 2px dashed var(--border-subtle); border-radius: 12px; background: transparent; color: var(--text-muted); padding: 14px; cursor: pointer; font-weight: 600; }
.kb-add-col:hover { color: #fff; border-color: #38bdf8; }

/* modal internals */
.kb-modal .modal-content { max-width: 940px; width: 96vw; max-height: 92vh; display: flex; flex-direction: column; }
.kb-modal .modal-body { overflow-y: auto; }
.kb-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .kb-grid { grid-template-columns: 1fr; } }
.kb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kb-fields .full { grid-column: 1 / -1; }
.kb-fields label { font-size: 11.5px; color: var(--text-muted); display: block; margin-bottom: 3px; }
.kb-fields textarea { min-height: 96px; resize: vertical; }
.kb-timeline { border-left: 2px solid var(--border-subtle); margin-left: 6px; padding-left: 14px; max-height: 46vh; overflow-y: auto; }
.kb-ev { position: relative; margin-bottom: 12px; font-size: 12.5px; }
.kb-ev::before { content: ''; position: absolute; left: -20px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #38bdf8; }
.kb-ev.comment::before { background: #22c55e; } .kb-ev.moved::before { background: #f59e0b; } .kb-ev.deleted::before { background: #ef4444; }
.kb-ev small { color: var(--text-dim); display: block; }
.kb-ev .diff { color: var(--text-muted); font-size: 11.5px; }
.kb-comment-box { display: flex; gap: 8px; margin-top: 10px; }
.kb-comment-box textarea { flex: 1; min-height: 54px; }

/* toasts */
#kbToasts { position: fixed; right: 14px; top: 14px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; width: min(360px, 92vw); pointer-events: none; }
.kb-toast { pointer-events: auto; background: #0f172a; border: 1px solid #38bdf8; border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); display: flex; gap: 10px; cursor: pointer; animation: kbin .25s ease-out; }
.kb-toast b { display: block; font-size: 13px; } .kb-toast span { font-size: 12px; color: var(--text-muted); }
@keyframes kbin { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* shift reports */
.rp-grid {
  display: grid;
  grid-template-columns: 410px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
  width: 100%;
}
@media (max-width: 1180px) {
  .rp-grid {
    grid-template-columns: 1fr;
  }
}
.rp-main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.rp-form {
  background: linear-gradient(160deg, rgba(26, 36, 56, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  min-width: 0;
}
.rp-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.rp-nums > div {
  min-width: 0;
  width: 100%;
}
.rp-form label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rp-form textarea.form-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  resize: vertical;
  background: rgba(11, 17, 33, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
  transition: all 0.2s ease;
}
.rp-form textarea.form-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(11, 17, 33, 0.95);
}
.btn-submit-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-submit-report:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}
.btn-submit-report:active {
  transform: translateY(0);
}
.btn-submit-report:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* right side toolbar & filters */
.rp-filter-card {
  background: linear-gradient(160deg, rgba(26, 36, 56, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}
.rp-control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: rgba(11, 17, 33, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.rp-control-bar .form-select,
.rp-control-bar .form-input {
  width: auto;
  min-width: 130px;
  flex: 1;
}
.rp-export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rp-export-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-export-csv {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}
.btn-export-csv:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}
.btn-export-xls {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}
.btn-export-xls:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #4ade80;
}
.btn-export-pdf {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.25);
}
.btn-export-pdf:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: #fb7185;
}

/* Stat Cards */
.rp-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 6px;
}
@media (max-width: 1450px) {
  .rp-cards { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .rp-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .rp-cards { grid-template-columns: 1fr; }
}
.rp-stat {
  position: relative;
  background: linear-gradient(145deg, rgba(22, 30, 49, 0.75), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.rp-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.rp-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.rp-stat-ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.06);
}
.rp-stat-val {
  font-size: 22px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.rp-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.rp-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.rp-shift-pill.shift-morning,
.rp-shift-pill[class*="9_00"],
.rp-shift-pill[class*="9_9_30"] {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.rp-shift-pill.shift-day,
.rp-shift-pill[class*="11_00"],
.rp-shift-pill[class*="1_00"],
.rp-shift-pill[class*="2_00"] {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.rp-shift-pill.shift-evening,
.rp-shift-pill[class*="5_00"],
.rp-shift-pill[class*="5_5_30"] {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.rp-shift-pill.shift-night,
.rp-shift-pill[class*="11_00_pm"],
.rp-shift-pill[class*="11pm"] {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Blinking Lunch Alert & Pill */
@keyframes rpLunchBlink {
  0%, 100% {
    opacity: 1;
    border-color: #f59e0b;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.18);
  }
  50% {
    opacity: 0.72;
    border-color: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.12);
  }
}

.rp-lunch-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  color: #fef08a;
  margin-bottom: 14px;
  animation: rpLunchBlink 1.8s infinite ease-in-out;
}

.rp-lunch-alert strong {
  color: #fbbf24;
  font-size: 13px;
  display: block;
  letter-spacing: 0.02em;
}

.rp-lunch-alert p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #fef9c3;
  line-height: 1.4;
}

.rp-lunch-pulse {
  font-size: 24px;
  display: inline-block;
}

.rp-shift-pill.rp-lunch-pill-blink {
  animation: rpLunchBlink 2s infinite ease-in-out;
  border: 1px solid #f59e0b;
}

.rp-num-badge {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.rp-gmeet-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
}
.rp-gmeet-stat .done { color: #4ade80; }
.rp-gmeet-stat .sched { color: #94a3b8; }

.rp-table-wrap {
  overflow: auto;
  max-height: 54vh;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
}
.rp-table-wrap table {
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}
.rp-table-wrap th {
  position: sticky;
  top: 0;
  background: rgba(22, 30, 49, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.rp-table-wrap td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.rp-table-wrap tbody tr {
  transition: background-color 0.15s ease;
}
.rp-table-wrap tbody tr:hover {
  background: rgba(56, 189, 248, 0.06);
}
.rp-table-wrap tfoot td {
  position: sticky;
  bottom: 0;
  background: rgba(26, 38, 64, 0.98);
  backdrop-filter: blur(10px);
  font-weight: 700;
  color: #fff;
  border-top: 2px solid #38bdf8;
  padding: 10px 12px;
  z-index: 2;
}
.rp-clip {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.4;
}

/* Responsive Shift Report Pagination & Controls */
.rp-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 8px 4px;
}
.rp-pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.rp-pagination .pg-btn {
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 30, 49, 0.85);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.rp-pagination .pg-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  color: #fff;
  background: rgba(56, 189, 248, 0.15);
  transform: translateY(-1px);
}
.rp-pagination .pg-btn.on {
  background: #38bdf8;
  color: #04212e;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}
.rp-pagination .pg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.rp-pagination .pg-gap {
  padding: 0 4px;
  color: #64748b;
  font-weight: 700;
  user-select: none;
}
@media (max-width: 768px) {
  .rp-pagination-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .rp-pagination {
    justify-content: center;
  }
}

/* permissions center */
.pm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pm-table td, .pm-table th { padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.pm-table th { text-align: left; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: #111827; }
.pm-st { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; }
.pm-st.granted { background: rgba(34,197,94,.18); color: #4ade80; } .pm-st.denied { background: rgba(239,68,68,.18); color: #f87171; }
.pm-st.prompt { background: rgba(245,158,11,.18); color: #fbbf24; } .pm-st.na { background: rgba(148,163,184,.15); color: #94a3b8; }
.pm-scroll { max-height: 48vh; overflow: auto; border: 1px solid var(--border-subtle); border-radius: 10px; }
.pm-note { font-size: 11px; color: var(--text-dim); }

/* ── Special extensions (Internal Team Directory, on top) ───────────────────────────────── */
.sx-wrap { margin-bottom: 16px; }
.sx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 0 2px 10px; }
.sx-head h3 { margin: 0; font-size: 15px; }
.sx-head span { color: var(--text-muted); font-size: 12px; }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.sx-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, rgba(31,41,61,.85), rgba(17,24,39,.85)); transition: transform .15s, border-color .15s; }
.sx-card:hover { transform: translateY(-2px); border-color: rgba(56,189,248,.5); }
.sx-card.sx-off { opacity: .72; }
.sx-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px;
  background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.sx-body { flex: 1; min-width: 0; }
.sx-body b { display: block; font-size: 14px; }
.sx-body small { display: block; color: var(--text-muted); font-size: 11.5px; line-height: 1.4; margin: 3px 0 8px; }
.sx-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-num { font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255,255,255,.08); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 5px 9px; letter-spacing: .04em; }
.sx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sx-st { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.sx-st.live { background: rgba(34,197,94,.18); color: #4ade80; }
.sx-st.off { background: rgba(148,163,184,.18); color: #94a3b8; }
@media (max-width: 520px) { .sx-card { flex-wrap: wrap; } .sx-side { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; } }

/* ── New / edit requirement (responsive sheet) ──────────────────────────────────────────── */
.kb-modal .modal-content { border-radius: 18px; }
.kb-modal .modal-header { position: sticky; top: 0; z-index: 2; background: inherit; }
.kb-form-sec { margin-bottom: 18px; }
.kb-form-sec > h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.kb-form-sec > h4 i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: #38bdf8; color: #06202e; font-size: 11px; display: inline-grid; place-items: center; font-weight: 800; }
.kb-form input.form-input, .kb-form select.form-select, .kb-form textarea.form-input { width: 100%; box-sizing: border-box; }
.kb-form textarea.form-input { min-height: 110px; resize: vertical; }
.kb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kb-tile { border: 2px solid var(--border-subtle); background: var(--bg-tertiary); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left; color: inherit; font: inherit; display: flex; gap: 10px; align-items: center; transition: border-color .12s, background .12s, transform .12s; }
.kb-tile:hover { transform: translateY(-1px); }
.kb-tile .t-ico { font-size: 24px; }
.kb-tile b { display: block; font-size: 13px; } .kb-tile small { color: var(--text-muted); font-size: 11px; }
.kb-tile.on { border-color: var(--tc, #38bdf8); background: color-mix(in srgb, var(--tc, #38bdf8) 16%, var(--bg-tertiary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc, #38bdf8) 25%, transparent); }
.kb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kb-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-seg label { cursor: pointer; }
.kb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.kb-seg span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--bg-tertiary); font-size: 12.5px; font-weight: 600; }
.kb-seg input:checked + span { color: #06202e; border-color: transparent; background: var(--pc, #38bdf8); }
.kb-seg input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.kb-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kb-quick button { border: 1px solid var(--border-subtle); background: rgba(255,255,255,.05); color: var(--text-main); border-radius: 999px; padding: 4px 11px; font-size: 11.5px; cursor: pointer; }
.kb-quick button:hover { border-color: #38bdf8; }
.kb-help { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.kb-foot { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--border-subtle); background: #111827; border-radius: 0 0 18px 18px; }
.kb-foot .grow { flex: 1; font-size: 12px; color: var(--text-muted); }
.kb-more-opts summary { cursor: pointer; font-size: 12px; color: var(--text-muted); margin: 4px 0 10px; }
@media (max-width: 640px) {
  .kb-modal .modal-content { width: 100vw !important; max-width: 100vw !important; height: 100dvh; max-height: 100dvh !important; border-radius: 0; }
  .kb-two { grid-template-columns: 1fr; }
  .kb-foot { border-radius: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .kb-tiles { grid-template-columns: 1fr; }
}

/* ── Big always-visible scrollbars (custom: work on phones too) ─────────────────────────── */
.kb-board { scrollbar-width: none; } .kb-board::-webkit-scrollbar { display: none; }
.kb-col-body { scrollbar-width: none; padding-right: 24px; } .kb-col-body::-webkit-scrollbar { display: none; }
.kb-hbar { display: flex; align-items: center; gap: 8px; margin: 4px 0; flex: none; }
.kb-arrow { flex: none; width: 34px; height: 26px; border-radius: 8px; border: 1px solid rgba(56,189,248,.5); background: rgba(56,189,248,.12); color: #7dd3fc; cursor: pointer; font-size: 12px; }
.kb-arrow:hover { background: rgba(56,189,248,.28); }
.kb-track { position: relative; flex: 1; height: 16px; border-radius: 10px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.08); }
.kb-thumb { position: absolute; top: 0; left: 0; height: 100%; min-width: 48px; border-radius: 10px; background: linear-gradient(180deg, #38bdf8, #0284c7); box-shadow: 0 0 10px rgba(56,189,248,.45); cursor: grab; touch-action: none; }
.kb-thumb:active { cursor: grabbing; filter: brightness(1.15); }
.kb-vbar { position: absolute; right: 5px; top: 54px; bottom: 8px; width: 14px; border-radius: 10px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.08); z-index: 3; }
.kb-vbar .kb-thumb { width: 100%; height: auto; min-height: 44px; min-width: 0; background: linear-gradient(90deg, #38bdf8, #0284c7); }
.kb-hbar.no-overflow .kb-thumb, .kb-vbar.no-overflow .kb-thumb { display: none; }
.kb-vbar.no-overflow { opacity: .35; }
@media (max-width: 760px) {
  .kb-arrow { width: 44px; height: 34px; font-size: 15px; }
  .kb-track { height: 22px; }
  .kb-vbar { width: 18px; right: 4px; }
  .kb-col-body { padding-right: 28px; }
}

/* ── Card detail (read, answer, audit) ─────────────────────────────────────────────────── */
.kb-modal.kd .modal-content { max-width: 1120px; width: 97vw; }
.kd-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.kd-title { font-size: 19px; font-weight: 800; line-height: 1.25; margin: 0; word-break: break-word; }
.kd-pill { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--pc, #38bdf8) 22%, transparent); color: var(--pc, #38bdf8); border: 1px solid color-mix(in srgb, var(--pc, #38bdf8) 55%, transparent); }
.kd-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .kd-grid { grid-template-columns: 1fr; } }
.kd-box { background: rgba(255,255,255,.035); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.kd-box > h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.kd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }
.kd-fact small { display: block; font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.kd-fact b { font-size: 13px; word-break: break-word; }
.kd-desc { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; line-height: 1.55; }
.kd-status { display: flex; flex-wrap: wrap; gap: 8px; }
.kd-status button { border: 1px solid var(--border-subtle); background: var(--bg-tertiary); color: var(--text-main); border-radius: 10px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.kd-status button:hover { border-color: var(--sc); }
.kd-status button.on { background: var(--sc); color: #06202e; border-color: transparent; }
.kd-durs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.kd-durs .seg { background: rgba(255,255,255,.07); border-radius: 8px; padding: 3px 9px; }
.kd-durs .seg.cur { background: rgba(56,189,248,.2); color: #7dd3fc; font-weight: 700; }
.kd-thread { max-height: 44vh; overflow-y: auto; padding: 4px 4px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.kd-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; background: var(--bg-tertiary); align-self: flex-start; border-top-left-radius: 4px; }
.kd-msg.me { align-self: flex-end; background: rgba(14,165,233,.28); border-top-left-radius: 14px; border-top-right-radius: 4px; }
.kd-msg .who { font-size: 11.5px; font-weight: 700; color: #7dd3fc; } .kd-msg.me .who { color: #bae6fd; }
.kd-msg .txt { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; margin-top: 2px; }
.kd-msg time { display: block; font-size: 10.5px; color: var(--text-dim); margin-top: 4px; }
.kd-sys { align-self: center; text-align: center; font-size: 11.5px; color: var(--text-muted); background: rgba(255,255,255,.05); border-radius: 999px; padding: 3px 12px; max-width: 96%; }
.kd-reply { margin-top: 10px; }
.kd-reply textarea { width: 100%; box-sizing: border-box; min-height: 74px; resize: vertical; }
.kd-reply .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.kd-audit-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.kd-audit-bar button { border: 1px solid var(--border-subtle); background: rgba(255,255,255,.05); color: var(--text-main); border-radius: 999px; padding: 3px 11px; font-size: 11.5px; cursor: pointer; }
.kd-audit-bar button.on { background: #38bdf8; color: #06202e; border-color: transparent; font-weight: 700; }
.kd-audit-wrap { overflow: auto; max-height: 46vh; border: 1px solid var(--border-subtle); border-radius: 10px; }
.kd-audit { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 520px; }
.kd-audit th { position: sticky; top: 0; background: #111827; text-align: left; padding: 7px 9px; color: var(--text-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.kd-audit td { padding: 7px 9px; border-top: 1px solid var(--border-subtle); vertical-align: top; }
.kd-audit .tm { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kd-act { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; background: rgba(56,189,248,.18); color: #7dd3fc; }
.kd-act.comment { background: rgba(34,197,94,.18); color: #4ade80; } .kd-act.moved { background: rgba(245,158,11,.18); color: #fbbf24; } .kd-act.deleted { background: rgba(239,68,68,.2); color: #fca5a5; }
.kd-diff s { color: #f87171; } .kd-diff ins { color: #4ade80; text-decoration: none; }
@media (max-width: 640px) { .kd-msg { max-width: 96%; } .kd-title { font-size: 17px; } }

/* Forensic AI Report Audit & Anti-Cheat Styles */
.ai-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.ai-score-pill.excellent { background: rgba(34, 197, 94, 0.18); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.ai-score-pill.good { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.ai-score-pill.warning { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.ai-score-pill.danger { background: rgba(239, 68, 68, 0.22); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.45); }

.ai-anticheat-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.ai-anticheat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 8px;
}
.ai-anticheat-flag {
  font-size: 12px;
  color: #fecaca;
  margin-bottom: 4px;
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}
.ai-anticheat-flag::before {
  content: "⚠";
  position: absolute;
  left: 0;
  color: #f87171;
}

.ai-eval-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 768px) {
  .ai-eval-split { grid-template-columns: 1fr; }
}

.ai-pos-box {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 12px;
  padding: 12px;
}
.ai-pos-box h5 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-pos-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: #dcfce7;
  line-height: 1.5;
}

.ai-neg-box {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 12px;
}
.ai-neg-box h5 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-neg-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: #fee2e2;
  line-height: 1.5;
}

.ai-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.ai-plan-col {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}
.ai-plan-col h6 {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ai-plan-col ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.ai-talk-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.ai-talk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 600;
  color: #e2e8f0;
}

/* AI Leads Board */
#tab-ai-leads-board.active { display: flex; flex-direction: column; height: var(--kb-h, calc(100dvh - 120px)); min-height: 380px; }
.lb-col { flex-basis: min(300px, 82vw); }
.lb-card .kb-card-title { display: flex; gap: 6px; align-items: flex-start; justify-content: space-between; }
.lb-mv { background: transparent; border: 0; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 0 4px; border-radius: 5px; flex: none; opacity: .55; }
.lb-mv:hover { opacity: 1; background: rgba(255,255,255,.08); color: #fff; }
.lb-line { font-size: 11.5px; margin-top: 4px; word-break: break-word; }
.lb-line.dim { color: var(--text-muted); }
.lb-tag { background: rgba(255,255,255,.08); border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 700; }
.lb-tag.ai { background: rgba(56,189,248,.15); color: #38bdf8; }
.lb-tag.call { background: rgba(167,139,250,.15); color: #a78bfa; }
.lb-tag.miss { background: rgba(239,68,68,.15); color: #f87171; }
.lb-menu { position: fixed; z-index: 100000; background: var(--bg-secondary, #0f172a); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); display: flex; flex-direction: column; min-width: 170px; }
.lb-menu button { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; color: #e2e8f0; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; text-align: left; }
.lb-menu button:hover { background: rgba(255,255,255,.08); }
.lb-menu i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lb-col { position: relative; }
.lb-col.lb-wide { flex: 1 1 100%; max-width: 100%; }
.lb-kpi { margin-bottom: 8px; }
#tab-ai-leads-board .kb-board { min-height: 0; }

/* AI Leads + AI Leads Board: the five figures sit on ONE slim line (scrolls sideways on a very small screen instead of wrapping) */
#ldKpi, #lbKpi { display: flex !important; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; padding-bottom: 2px; }
#ldKpi::-webkit-scrollbar, #lbKpi::-webkit-scrollbar { display: none; }
#ldKpi .rp-stat, #lbKpi .rp-stat { flex: 1 1 0; min-width: 120px; display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 7px 12px; white-space: nowrap; }
#ldKpi .rp-stat b, #lbKpi .rp-stat b { font-size: 18px; line-height: 1; }
#ldKpi .rp-stat span, #lbKpi .rp-stat span { font-size: 12px; color: var(--text-muted); }

/* filter rows: status buttons, search and selects on ONE line (scrolls sideways when the screen is narrow) */
.lb-oneline, #tab-ai-leads .kb-toolbar { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; align-items: center; }
.lb-oneline::-webkit-scrollbar, #tab-ai-leads .kb-toolbar::-webkit-scrollbar { display: none; }
.lb-oneline > *, #tab-ai-leads .kb-toolbar > * { flex: none; }
.lb-oneline .dir-pills-bar, #tab-ai-leads .dir-pills-bar { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; }
.lb-oneline .dir-pill, #tab-ai-leads .dir-pill { white-space: nowrap; padding: 5px 12px; font-size: 12px; }
.lb-oneline #lbSearch, #tab-ai-leads #ldSearch { flex: 1 1 200px; min-width: 200px; width: auto; max-width: 340px; }
.lb-oneline .form-select, #tab-ai-leads .kb-toolbar .form-select { width: auto; }

/* tidy filter line: compact, aligned, nothing stretches full width */
.lb-oneline { gap: 8px; padding: 2px 0 4px; }
.lb-oneline #lbSearch { flex: 1 1 260px; min-width: 220px; max-width: 420px; height: 34px; }
.lb-oneline .dir-pill { height: 30px; display: inline-flex; align-items: center; }
.lb-oneline .btn { height: 34px; padding: 0 12px; flex: none; }
.lb-oneline .kb-live { margin-left: auto; }
#tab-ai-leads .kb-toolbar select.form-select { width: auto !important; min-width: 140px; max-width: 200px; flex: none; }

/* ═══ Missed Calls & Voicemail (Call-Back Hub): page, Kanban board, table ═══ */
#tab-missed-calls.active.mc-boardmode { display: flex; flex-direction: column; height: var(--kb-h, calc(100dvh - 120px)); min-height: 440px; }
.mc-boardmode .mc-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mc-boardmode .mc-boardview { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 16px 10px; }
.mc-boardmode .mc-boardview .kb-board { flex: 1; min-height: 0; }
.mc-head { flex-wrap: wrap; gap: 12px; align-items: center; }
.mc-sub { font-size: 12px; font-weight: 700; color: #38bdf8; background: rgba(56,189,248,.12); border-radius: 999px; padding: 2px 10px; margin-left: 8px; vertical-align: middle; }
.mc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mc-actions .btn { height: 34px; padding: 0 12px; }
.mc-seg { display: inline-flex; border: 1px solid var(--border-subtle); border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.04); }
.mc-seg button { background: transparent; border: 0; color: var(--text-muted); padding: 0 14px; height: 34px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.mc-seg button.on { background: rgba(56,189,248,.18); color: #7dd3fc; }
.mc-seg button:not(.on):hover { background: rgba(255,255,255,.07); color: #fff; }
#mcKpi { display: flex !important; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 16px 10px; padding-bottom: 2px; }
#mcKpi::-webkit-scrollbar { display: none; }
#mcKpi .rp-stat { flex: 1 1 0; min-width: 130px; display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 7px 12px; white-space: nowrap; }
#mcKpi .rp-stat b { font-size: 18px; line-height: 1; } #mcKpi .rp-stat span { font-size: 12px; color: var(--text-muted); }
.mc-oneline { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; align-items: center; gap: 8px; }
.mc-oneline::-webkit-scrollbar { display: none; }
.mc-oneline > * { flex: none; }
.mc-oneline .dir-pills-bar { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; }
.mc-oneline .dir-pill, .lb-oneline .dir-pill { white-space: nowrap; }
.mc-oneline .form-select { width: auto !important; min-width: 130px; max-width: 180px; }
.mc-oneline #mcSearch { flex: 1 1 220px; min-width: 200px; max-width: 360px; height: 34px; }
.lb-oneline #mbSearch { flex: 1 1 260px; min-width: 220px; max-width: 420px; height: 34px; }
#mbBoard .lb-col { flex-basis: min(300px, 82vw); }
.mc-msg { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-cb { padding: 3px 10px !important; font-size: 11.5px !important; height: 26px; }
.lb-card .kb-card-foot { align-items: center; }
.mc-wrap { border-radius: 12px; }
.mc-table thead th { position: sticky; top: 0; background: var(--bg-tertiary); z-index: 1; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.mc-table tbody tr:hover { background: rgba(255,255,255,.035); }
.mc-table td { vertical-align: middle; }

/* secret fields with an eye, OTP gateway editor */
.secret-wrap { position: relative; display: block; width: 100%; }
.secret-wrap > input { width: 100%; padding-right: 40px; }
.secret-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; cursor: pointer; font-size: 15px; opacity: .75; padding: 4px 6px; border-radius: 6px; }
.secret-eye:hover { opacity: 1; background: rgba(255,255,255,.08); }
.otp-gw { border: 1px solid var(--border-subtle); border-radius: 12px; padding: 12px; margin-top: 12px; background: rgba(255,255,255,.02); }
.otp-gw-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.otp-gw-head .btn { height: 30px; padding: 0 10px; font-size: 12px; }
.otp-on { font-size: 12px; display: inline-flex; gap: 5px; align-items: center; color: var(--text-muted); }
.otp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.otp-grid label { font-size: 11.5px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }

/* Coaching & improvement plan */
.co-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); margin: 2px 0 6px; overflow: hidden; } .co-bar i { display: block; height: 100%; border-radius: 4px; }
.co-detail { padding: 14px; background: rgba(255,255,255,.02); border-top: 1px solid var(--border-subtle); }
.co-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.co-box, .co-plan { border: 1px solid var(--border-subtle); border-radius: 12px; padding: 12px; } .co-plan { margin-bottom: 12px; border-color: rgba(56,189,248,.35); background: rgba(56,189,248,.05); }
.co-box h5, .co-plan h4 { margin: 0 0 8px; font-size: 12.5px; } .co-plan h4 { font-size: 14px; }
.co-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; } .co-li { font-size: 12.5px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.04); margin: 4px 0; }
.co-li.good { border-left: 3px solid #22c55e; } .co-li.miss { border-left: 3px solid #f59e0b; } .co-li.tip { border-left: 3px solid #38bdf8; }
.co-call { display: block; font-size: 12px; padding: 4px 0; text-decoration: none; color: inherit; }

/* ── shift report: PBX facts, live compare, own AI review ─────────────────── */
.rp-facts { margin: 10px 0 14px; padding: 0; }
.rp-facts:empty { display: none; }
.rp-facts-card {
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.05);
  border-radius: 12px;
  font-size: 13px;
  overflow: hidden;
  transition: all 0.2s ease;
}
details.rp-facts-collapsible {
  padding: 0;
}
details.rp-facts-collapsible summary.rp-facts-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
  background: rgba(56, 189, 248, 0.08);
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
details.rp-facts-collapsible summary.rp-facts-summary::-webkit-details-marker {
  display: none;
}
details.rp-facts-collapsible summary.rp-facts-summary:hover {
  background: rgba(56, 189, 248, 0.14);
}
details.rp-facts-collapsible[open] summary.rp-facts-summary {
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.12);
}
.rp-facts-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rp-facts-summary-left b {
  font-size: 13px;
  color: #f1f5f9;
}
.rp-facts-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.rp-facts-summary-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
details.rp-facts-collapsible .rp-hint-open { display: none; }
details.rp-facts-collapsible .rp-hint-closed { display: inline; }
details.rp-facts-collapsible[open] .rp-hint-open { display: inline; }
details.rp-facts-collapsible[open] .rp-hint-closed { display: none; }
details.rp-facts-collapsible .rp-expand-hint {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
}
.rp-facts-content {
  padding: 12px 14px;
  animation: rmFadeIn 0.2s ease;
}
.rp-facts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.rp-fact-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.rp-fact { background: rgba(255,255,255,.04); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.rp-fact b { font-size: 18px; line-height: 1.1; }
.rp-fact span { font-size: 11px; color: var(--text-muted); }
.rp-compare { margin-top: 10px; font-size: 12.5px; font-weight: 600; }
.rp-hint { margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }
.rp-missed { margin-top: 10px; font-size: 12.5px; }
.rp-missed summary { cursor: pointer; font-weight: 600; }
.rp-review:empty { display: none; }
.rp-review { margin-top: 14px; margin-bottom: 12px; }
.rp-review-card {
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.06);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
  transition: all 0.2s ease;
}
details.rp-review-collapsible {
  padding: 0;
}
details.rp-review-collapsible summary.rp-review-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
  background: rgba(167, 139, 250, 0.08);
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
details.rp-review-collapsible summary.rp-review-summary::-webkit-details-marker {
  display: none;
}
details.rp-review-collapsible summary.rp-review-summary:hover {
  background: rgba(167, 139, 250, 0.14);
}
details.rp-review-collapsible[open] summary.rp-review-summary {
  border-bottom: 1px solid rgba(167, 139, 250, 0.25);
  background: rgba(167, 139, 250, 0.12);
}
.rp-review-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rp-review-summary-left b {
  font-size: 13px;
  color: #f1f5f9;
}
.rp-expand-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: #c4b5fd;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
details.rp-review-collapsible .rp-hint-open { display: none; }
details.rp-review-collapsible .rp-hint-closed { display: inline; }
details.rp-review-collapsible[open] .rp-hint-open { display: inline; }
details.rp-review-collapsible[open] .rp-hint-closed { display: none; }

.rp-review-content {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  animation: rmFadeIn 0.2s ease;
}
.rp-review-card ul { margin: 4px 0 8px 18px; padding: 0; }
.rp-sec { margin-top: 10px; font-weight: 700; font-size: 12px; letter-spacing: .02em; color: #c4b5fd; }
.rp-score { font-weight: 700; font-size: 12px; padding: 2px 8px; border: 1px solid; border-radius: 999px; }
.rp-pr { margin: 6px 0; padding: 8px 10px; background: rgba(255,255,255,.04); border-radius: 8px; }
.rp-pr a { font-size: 11.5px; color: #38bdf8; }
@media (max-width: 640px) { .rp-fact-row { grid-template-columns: repeat(2, 1fr); } }

/* ── Reminders & Banner Alerts ── */
@keyframes rmFadeIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rmBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ── Deep UI Polish for Daily / Shift Reports & Audit Exports ── */
.rp-table-wrap {
  position: relative;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rp-table-wrap table {
  width: 100%;
  min-width: 980px;
}
.rp-table-wrap th {
  user-select: none;
  white-space: nowrap;
}
.rp-table-wrap td {
  font-size: 13px;
  color: #e2e8f0;
}
.rp-num-badge {
  display: inline-block;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.rp-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.rp-shift-pill.rp-lunch-pill-blink {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  animation: rmBlink 2s infinite ease-in-out;
}

/* Mobile & PC responsive adaptations */
@media (max-width: 768px) {
  .rp-control-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .rp-control-bar .form-select,
  .rp-control-bar .form-input {
    width: 100%;
    min-width: 0;
  }
  .rp-export-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .rp-export-btns {
    width: 100%;
    justify-content: flex-start;
  }
  .rp-pagination-bar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .rp-nums {
    grid-template-columns: 1fr;
  }
}

