/* TravNex Softphone — telephony UI */
.sp-shell {
  --sp-bg: #0f1c24;
  --sp-panel: #16262f;
  --sp-accent: #1f9d7a;
  --sp-accent-2: #f0b429;
  --sp-text: #e8f1f4;
  --sp-muted: #8aa0ab;
  --sp-danger: #e35d6a;
  --sp-border: rgba(255,255,255,.08);
  color: var(--sp-text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.sp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(145deg, #1f9d7a, #147a5c);
  color: #fff;
  box-shadow: 0 10px 30px rgba(20, 80, 60, .45);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.sp-fab--ring {
  animation: sp-pulse 1.2s ease-in-out infinite;
}

@keyframes sp-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(31,157,122,.55); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(31,157,122,0); }
}

.sp-drawer {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  width: min(920px, calc(100vw - 1.5rem));
  max-height: min(720px, calc(100vh - 6rem));
  z-index: 1201;
  background: linear-gradient(160deg, #122029 0%, #0c171d 55%, #14252e 100%);
  border: 1px solid var(--sp-border);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.sp-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--sp-border);
  background: rgba(255,255,255,.02);
}

.sp-drawer__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: .02em;
}

.sp-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  color: var(--sp-muted);
}

.sp-status__dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #6b7c86;
}
.sp-status__dot--online { background: #2ecc71; }
.sp-status__dot--busy { background: var(--sp-accent-2); }
.sp-status__dot--call { background: #3498db; }
.sp-status__dot--offline { background: #95a5a6; }

.sp-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 0;
}

@media (max-width: 760px) {
  .sp-body { grid-template-columns: 1fr; }
  .sp-drawer { right: .5rem; left: .5rem; width: auto; bottom: 4.5rem; }
}

.sp-pad {
  padding: 1rem;
  border-right: 1px solid var(--sp-border);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  background: rgba(0,0,0,.15);
}

.sp-display {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: .75rem .9rem;
  font-size: 1.35rem;
  letter-spacing: .06em;
  min-height: 3rem;
  word-break: break-all;
}

.sp-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .45rem;
}

.sp-key {
  border: 1px solid var(--sp-border);
  background: rgba(255,255,255,.04);
  color: var(--sp-text);
  border-radius: 12px;
  padding: .7rem 0;
  font-size: 1.1rem;
  cursor: pointer;
}
.sp-key:hover { background: rgba(255,255,255,.08); }
.sp-key small { display: block; font-size: .55rem; color: var(--sp-muted); letter-spacing: .12em; }

.sp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

.sp-btn {
  border: none;
  border-radius: 12px;
  padding: .7rem .5rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
}
.sp-btn--call { background: var(--sp-accent); }
.sp-btn--hang { background: var(--sp-danger); }
.sp-btn--ghost {
  background: transparent;
  border: 1px solid var(--sp-border);
  color: var(--sp-text);
}
.sp-btn:disabled { opacity: .45; cursor: not-allowed; }

.sp-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.sp-chip {
  border: 1px solid var(--sp-border);
  background: rgba(255,255,255,.03);
  color: var(--sp-muted);
  border-radius: 999px;
  padding: .3rem .7rem;
  font-size: .75rem;
  cursor: pointer;
}
.sp-chip--on { color: #fff; background: rgba(31,157,122,.35); border-color: rgba(31,157,122,.55); }

.sp-side {
  padding: 1rem;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.sp-toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: nowrap;
  min-width: 0;
}
.sp-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: .3rem;
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
}
.sp-tab {
  border: 1px solid var(--sp-border);
  background: transparent;
  color: var(--sp-muted);
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .72rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.sp-tab--active { color: #fff; background: rgba(255,255,255,.08); }

.sp-search {
  flex: 1 1 8rem;
  min-width: 7rem;
  width: auto;
  border-radius: 10px;
  border: 1px solid var(--sp-border);
  background: rgba(255,255,255,.04);
  color: var(--sp-text);
  padding: .45rem .7rem;
  font-size: .8rem;
}

.sp-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: .4rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  vertical-align: middle;
}

.tp-filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: .65rem;
  min-width: 0;
}
.tp-filter-row .bk-field {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}
.tp-filter-row .bk-field--search {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.tp-filter-row .bk-field span {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: .25rem;
}
.tp-filter-row .bk-select,
.tp-filter-row .bk-input {
  min-height: 2.35rem;
}
.tp-filter-row__btn {
  flex: 0 0 auto;
  margin-bottom: 1px;
}
.tp-call-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-left: .4rem;
  padding: 0 .4rem;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}
@media (max-width: 900px) {
  .tp-filter-row {
    flex-wrap: wrap;
  }
  .tp-filter-row .bk-field--search {
    flex: 1 1 100%;
  }
}

.sp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.sp-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .65rem;
  align-items: center;
  padding: .65rem .7rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.03);
  cursor: pointer;
}
.sp-item:hover { border-color: var(--sp-border); background: rgba(255,255,255,.06); }
.sp-item__icon {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06);
  font-size: .9rem;
}
.sp-item__icon--in { color: #5dade2; }
.sp-item__icon--out { color: #58d68d; }
.sp-item__icon--miss { color: #e74c3c; }
.sp-item__meta { font-size: .72rem; color: var(--sp-muted); }
.sp-item__title { font-size: .9rem; font-weight: 600; }

.sp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 1.1rem;
  border-top: 1px solid var(--sp-border);
  font-size: .78rem;
  color: var(--sp-muted);
  background: rgba(0,0,0,.2);
}

.sp-timer { font-variant-numeric: tabular-nums; color: #fff; font-weight: 650; }
.sp-rec {
  display: inline-flex; align-items: center; gap: .35rem;
}
.sp-rec__dot {
  width: .45rem; height: .45rem; border-radius: 50%; background: #e74c3c;
  animation: sp-blink 1s step-end infinite;
}
@keyframes sp-blink { 50% { opacity: 0; } }

.sp-incoming {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 1300;
  width: min(360px, calc(100vw - 2rem));
  background: #16262f;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
  color: var(--sp-text);
}
.sp-incoming h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.sp-incoming p { margin: 0 0 .85rem; color: var(--sp-muted); font-size: .85rem; }
.sp-incoming__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.sp-clickcall {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: none;
  background: transparent;
  color: #147a5c;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.sp-clickcall:hover { color: #0f5e47; text-decoration: underline; }

.tp-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .85rem;
  margin-bottom: 1.25rem;
}
.tp-stat {
  background: #fff;
  border: 1px solid #e6ebea;
  border-radius: 14px;
  padding: .9rem 1rem;
}
.tp-stat__label { margin: 0; color: #6b7c86; font-size: .78rem; }
.tp-stat__value { margin: .2rem 0 0; font-size: 1.35rem; font-weight: 700; color: #122029; }

/* —— Softphone command center (page) —— */
.tp-hub {
  --tp-ink: #122029;
  --tp-muted: #5f7380;
  --tp-line: #e4ece9;
  --tp-teal: #147a5c;
  --tp-teal-bright: #1f9d7a;
  --tp-surface: #f4f8f7;
  --tp-card: #ffffff;
}

.tp-hub__header {
  align-items: flex-start;
  gap: 1rem;
}

.tp-hub__header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.tp-hub .bk-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.tp-hero {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 1.25rem;
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(20, 122, 92, .12);
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(31, 157, 122, .18), transparent 55%),
    linear-gradient(135deg, #0f1c24 0%, #163038 48%, #1a3d34 100%);
  color: #e8f1f4;
  overflow: hidden;
}

.tp-hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .85rem;
}

.tp-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #c5d5dc;
}

.tp-pill__dot {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #95a5a6;
}

.tp-pill--ok {
  background: rgba(46, 204, 113, .15);
  border-color: rgba(46, 204, 113, .35);
  color: #a8f0c6;
}
.tp-pill--ok .tp-pill__dot { background: #2ecc71; }

.tp-pill--warn {
  background: rgba(240, 180, 41, .16);
  border-color: rgba(240, 180, 41, .35);
  color: #f6d98a;
}
.tp-pill--warn .tp-pill__dot { background: #f0b429; }

.tp-pill--live {
  background: rgba(31, 157, 122, .22);
  border-color: rgba(31, 157, 122, .4);
  color: #9fe8cf;
}

.tp-hero__title {
  margin: 0 0 .4rem;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}

.tp-hero__copy {
  margin: 0 0 1.1rem;
  max-width: 38rem;
  color: #a9bdc7;
  font-size: .95rem;
  line-height: 1.5;
}

.tp-hero__copy strong { color: #fff; font-weight: 650; }

.tp-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.tp-hero__cta .bk-btn--ghost {
  color: #e8f1f4;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
}

.tp-hero__cta .bk-btn--ghost:hover {
  background: rgba(255, 255, 255, .12);
}

.tp-hero__side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .08);
}

.tp-hero__metric-label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8aa0ab;
}

.tp-hero__metric-value {
  display: block;
  font-size: 2.4rem;
  font-weight: 750;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.tp-hero__metric-sub {
  font-size: .8rem;
  color: #8aa0ab;
}

.tp-hero__metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}

.tp-hero__metric-row > div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.tp-hero__metric-row span {
  font-size: .68rem;
  color: #8aa0ab;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tp-hero__metric-row strong {
  font-size: 1rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.tp-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: 1.15rem;
}

.tp-stat-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .95rem 1rem;
  background: var(--tp-card);
  border: 1px solid var(--tp-line);
  border-radius: 14px;
  min-width: 0;
}

.tp-stat-card__icon {
  flex: 0 0 auto;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.tp-stat-card__icon--teal { background: #ccfbf1; color: #0f766e; }
.tp-stat-card__icon--blue { background: #dbeafe; color: #1d4ed8; }
.tp-stat-card__icon--rose { background: #ffe4e6; color: #be123c; }
.tp-stat-card__icon--amber { background: #fef3c7; color: #b45309; }
.tp-stat-card__icon--slate { background: #e2e8f0; color: #334155; }
.tp-stat-card__icon--emerald { background: #d1fae5; color: #047857; }

.tp-stat-card__label {
  margin: 0;
  font-size: .75rem;
  color: var(--tp-muted);
}

.tp-stat-card__value {
  margin: .1rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tp-ink);
  font-variant-numeric: tabular-nums;
}

.tp-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tp-grid--secondary {
  grid-template-columns: 1fr 1fr;
}

.tp-panel {
  background: var(--tp-card);
  border: 1px solid var(--tp-line);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
}

.tp-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--tp-line);
  background: linear-gradient(180deg, #fafcfb, #fff);
}

.tp-panel__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tp-ink);
}

.tp-panel__link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--tp-teal);
  text-decoration: none;
}
.tp-panel__link:hover { text-decoration: underline; }

.tp-panel__meta {
  font-size: .78rem;
  color: var(--tp-muted);
}

.tp-panel__body {
  padding: 1rem 1.1rem 1.15rem;
}

.tp-panel__body--flush {
  padding: 0;
}

.tp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.tp-action {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  text-align: left;
  padding: .85rem .8rem;
  border-radius: 12px;
  border: 1px solid var(--tp-line);
  background: var(--tp-surface);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}

.tp-action:hover {
  border-color: rgba(20, 122, 92, .35);
  background: #eef8f4;
  transform: translateY(-1px);
}

.tp-action:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.tp-action__icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--tp-line);
  color: var(--tp-teal);
  flex: 0 0 auto;
}

.tp-action__text {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.tp-action__text strong {
  font-size: .88rem;
  color: var(--tp-ink);
}

.tp-action__text small {
  font-size: .72rem;
  color: var(--tp-muted);
  line-height: 1.35;
}

.tp-checklist {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #fff8eb;
  border: 1px solid #f5e0b8;
}

.tp-checklist h3 {
  margin: 0 0 .55rem;
  font-size: .9rem;
  color: #8a5a10;
}

.tp-checklist ul {
  margin: 0 0 .9rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .35rem;
}

.tp-check {
  position: relative;
  padding-left: 1.4rem;
  font-size: .82rem;
  color: #8a5a10;
}

.tp-check::before {
  content: "";
  position: absolute;
  left: 0;
  top: .25rem;
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  border: 1.5px solid #d4a24a;
  background: #fff;
}

.tp-check--done {
  color: #147a5c;
}

.tp-check--done::before {
  border-color: #147a5c;
  background: #147a5c;
  box-shadow: inset 0 0 0 2px #fff;
}

.tp-call-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tp-call-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .75rem;
  align-items: center;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--tp-line);
}

.tp-call-item:last-child { border-bottom: none; }

.tp-call-item__icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f4;
  color: #5f7380;
  font-size: .9rem;
}

.tp-call-item__icon--in { background: #e0f2fe; color: #0369a1; }
.tp-call-item__icon--out { background: #d1fae5; color: #047857; }
.tp-call-item__icon--miss { background: #ffe4e6; color: #be123c; }

.tp-call-item__top {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: baseline;
}

.tp-call-item__top strong {
  font-size: .9rem;
  color: var(--tp-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-call-item__top time {
  flex: 0 0 auto;
  font-size: .72rem;
  color: var(--tp-muted);
}

.tp-call-item__meta {
  font-size: .75rem;
  color: var(--tp-muted);
  margin-top: .15rem;
}

.tp-call-item__btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid var(--tp-line);
  background: #fff;
  color: var(--tp-teal);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.tp-call-item__btn:hover {
  background: #eef8f4;
  border-color: rgba(20, 122, 92, .35);
}

.tp-call-item__btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.tp-empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: .35rem;
  padding: 2.25rem 1.25rem;
  color: var(--tp-muted);
}

.tp-empty i {
  font-size: 1.6rem;
  color: #9eb0ba;
  margin-bottom: .25rem;
}

.tp-empty p {
  margin: 0;
  font-weight: 650;
  color: var(--tp-ink);
}

.tp-empty span {
  font-size: .82rem;
}

.tp-empty--sm {
  padding: 1.5rem 1rem;
}

.tp-table-wrap {
  overflow-x: auto;
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.tp-table th,
.tp-table td {
  text-align: left;
  padding: .55rem .25rem;
  border-bottom: 1px solid var(--tp-line);
}

.tp-table th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--tp-muted);
  font-weight: 650;
}

.tp-table td {
  color: var(--tp-ink);
  font-variant-numeric: tabular-nums;
}

.tp-table tr:last-child td { border-bottom: none; }

@media (max-width: 1100px) {
  .tp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .tp-hero { grid-template-columns: 1fr; }
  .tp-grid,
  .tp-grid--secondary { grid-template-columns: 1fr; }
  .tp-actions { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-hero { padding: 1.1rem; }
  .tp-hero__metric-row { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 420px) {
  .tp-stats { grid-template-columns: 1fr; }
}

