:root {
  --ks-bg: #07111b;
  --ks-panel: #0a1c2b;
  --ks-cyan: #36e9f4;
  --ks-white: #f6fbff;
  --ks-muted: #9fb6c7;
  --ks-green: #05e48c;
  --ks-red: #ff535c;
  --ks-gray: #64748b;
  --ks-card: rgba(6, 51, 76, 0.72);
  --ks-border: rgba(104, 239, 253, 0.28);
  --ks-pad: clamp(12px, 2.5vw, 20px);
  --ks-radius: clamp(14px, 2.5vw, 22px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  color: var(--ks-white);
  background: var(--ks-bg);
}

body.ks-shell {
  background:
    radial-gradient(ellipse at 50% 0%, #0e5470 0%, #072f46 32%, #051e30 62%, #021321 100%);
  min-height: 100dvh;
  min-height: 100vh;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
  overflow-x: hidden;
}

body.ks-shell.lc-on-call > .ks-top,
body.ks-shell.lc-on-call > .ks-main {
  visibility: hidden;
  pointer-events: none;
}

html.ks-standalone body.ks-shell,
html.ks-standalone body.ks-login {
  min-height: 100dvh;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ks-cyan);
  text-decoration: none;
}

button,
input,
select {
  max-width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Header */
.ks-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, auto) minmax(0, 1.1fr);
  align-items: center;
  gap: 12px 16px;
  padding: 12px var(--ks-pad);
  border-bottom: 1px solid rgba(104, 239, 253, 0.14);
  background: rgba(2, 19, 33, 0.55);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.ks-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ks-white);
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
  justify-self: start;
}

.ks-brand img,
.ks-brand-logo {
  display: block;
  width: auto;
  height: clamp(22px, 5vw, 28px);
  max-width: min(140px, 36vw);
  object-fit: contain;
  flex: 0 0 auto;
}

.ks-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.15;
}

.ks-brand-app {
  font-size: clamp(14px, 3.4vw, 17px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ks-white);
  white-space: nowrap;
}

.ks-brand-tag {
  font-size: clamp(10px, 2.4vw, 11px);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ks-cyan);
  white-space: nowrap;
}

.ks-top-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
}

.ks-agent-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.2;
  min-width: 0;
}

.ks-agent-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ks-muted);
}

.ks-agent-name {
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 750;
  color: var(--ks-white);
  letter-spacing: -0.02em;
  max-width: 28vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ks-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--ks-border);
  background: var(--ks-card);
  font-size: clamp(12px, 3vw, 14px);
  font-weight: 750;
  white-space: nowrap;
  color: var(--ks-white);
  font-family: inherit;
  cursor: pointer;
  user-select: none;
}

button.ks-chip:hover:not(:disabled) {
  filter: brightness(1.08);
}

button.ks-chip:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.ks-chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ks-gray);
  flex: 0 0 auto;
}

.ks-chip.is-available {
  color: #04101f;
  background: linear-gradient(135deg, #05e48c, #00b56f);
  border-color: transparent;
  box-shadow: 0 0 22px #05e48c66;
}

.ks-chip.is-available::before {
  background: #04101f;
}

.ks-chip.is-busy {
  color: #fff;
  background: linear-gradient(135deg, #ff535c, #d20f29);
  border-color: transparent;
  box-shadow: 0 0 22px #ff535c66;
}

.ks-chip.is-busy::before {
  background: #fff;
}

.ks-chip.is-offline::before {
  background: var(--ks-gray);
}

span.ks-chip {
  cursor: default;
}

.ks-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: 700 14px Outfit, sans-serif;
  cursor: pointer;
  color: #04101f;
  background: linear-gradient(135deg, #5af0ff, #24c8d8);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ks-btn-ghost {
  background: transparent;
  color: var(--ks-white);
  border: 1px solid var(--ks-border);
}

.ks-btn-danger {
  background: linear-gradient(135deg, #ff535c, #d20f29);
  color: #fff;
}

.ks-btn-green {
  background: linear-gradient(135deg, #05e48c, #008d5a);
  color: #fff;
}

.ks-btn-icon svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Nav in header */
.ks-nav {
  display: flex;
  gap: 6px;
  justify-content: center;
  justify-self: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}

.ks-nav::-webkit-scrollbar {
  display: none;
}

.ks-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ks-muted);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-weight: 650;
  font-size: 13px;
  flex: 0 0 auto;
}

.ks-nav a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.ks-nav a.is-active,
.ks-nav a:hover {
  color: var(--ks-white);
  border-color: var(--ks-border);
  background: var(--ks-card);
  box-shadow: 0 0 18px rgba(54, 233, 244, 0.12);
}

.ks-nav a.is-active {
  border-color: rgba(54, 233, 244, 0.45);
}

/* Main */
.ks-main {
  width: min(1280px, calc(100% - (var(--ks-pad) * 2)));
  margin: 12px auto calc(24px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: clamp(12px, 2.5vw, 18px);
}

.ks-dash {
  gap: 14px;
}

.ks-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 12px);
}

.ks-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 10px;
  border-radius: 14px;
  background: var(--ks-card);
  border: 1px solid var(--ks-border);
  box-shadow: 0 0 16px rgba(0, 222, 255, 0.06);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.ks-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(54, 233, 244, 0.12);
  border: 1px solid rgba(54, 233, 244, 0.22);
  flex: 0 0 auto;
  color: var(--ks-cyan);
}

.ks-stat-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.ks-stat-body {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.ks-stat-label {
  color: var(--ks-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.ks-stat strong {
  font-size: clamp(18px, 3.2vw, 24px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ks-stat-hint {
  color: var(--ks-muted);
  font-size: 10px;
  line-height: 1.25;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-stat-chev {
  color: var(--ks-muted);
  font-size: 20px;
  line-height: 1;
  opacity: 0.7;
  flex: 0 0 auto;
}

.ks-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.ks-dash-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

.ks-dash-main .ks-stage {
  height: 100%;
}

.ks-dash-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.ks-dash-side .ks-side-panel {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ks-panel {
  border-radius: var(--ks-radius);
  border: 1px solid var(--ks-border);
  background: rgba(2, 19, 33, 0.45);
  padding: clamp(14px, 2.5vw, 18px);
  min-height: 0;
}

.ks-panel-title {
  margin: 0;
  font-size: clamp(15px, 2.8vw, 17px);
  letter-spacing: -0.02em;
}

.ks-panel-lead {
  margin: 0 0 14px;
  color: var(--ks-muted);
  line-height: 1.45;
  font-size: clamp(13px, 2.8vw, 14px);
}

.ks-stage {
  background:
    linear-gradient(145deg, rgba(8, 58, 82, 0.72), rgba(2, 19, 33, 0.55));
  box-shadow: 0 0 28px rgba(54, 233, 244, 0.08);
  overflow: hidden;
}

.ks-stage.is-available {
  border-color: rgba(5, 228, 140, 0.4);
  background:
    linear-gradient(145deg, rgba(5, 228, 140, 0.16), rgba(2, 19, 33, 0.55));
  box-shadow: 0 0 28px rgba(5, 228, 140, 0.12);
}

.ks-stage.is-busy {
  border-color: rgba(255, 83, 92, 0.4);
  background:
    linear-gradient(145deg, rgba(255, 83, 92, 0.16), rgba(2, 19, 33, 0.55));
}

.ks-stage.is-ringing {
  border-color: rgba(54, 233, 244, 0.55);
  background:
    linear-gradient(160deg, rgba(10, 70, 95, 0.9), rgba(2, 19, 33, 0.78));
  box-shadow: 0 0 40px rgba(54, 233, 244, 0.22);
  animation: ks-pulse-border 1.8s ease-in-out infinite;
}

.ks-stage-idle .ks-presence {
  margin-bottom: 10px;
}

.ks-stage-idle .ks-panel-lead {
  margin-bottom: 14px;
}

.ks-presence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.ks-stage.is-available .ks-presence-art {
  box-shadow: 0 0 28px rgba(5, 228, 140, 0.28);
  border-color: rgba(5, 228, 140, 0.45);
  color: var(--ks-green);
}

.ks-stage.is-busy .ks-presence-art {
  border-color: rgba(255, 83, 92, 0.45);
  color: var(--ks-red);
}

.ks-presence-label {
  margin: 0 0 4px;
  color: var(--ks-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ks-presence-title {
  margin: 0;
  font-size: clamp(26px, 5vw, 36px);
  letter-spacing: -0.03em;
  word-break: break-word;
}

.ks-presence-name {
  margin: 4px 0 10px;
  color: var(--ks-cyan);
  font-size: clamp(14px, 3.2vw, 16px);
  font-weight: 700;
}

.ks-presence-art {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, rgba(54, 233, 244, 0.25), rgba(2, 19, 33, 0.8));
  border: 1px solid rgba(54, 233, 244, 0.35);
  color: var(--ks-cyan);
  flex: 0 0 auto;
  box-shadow: 0 0 24px rgba(54, 233, 244, 0.18);
}

.ks-presence-art svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.ks-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ks-controls .ks-btn {
  flex: 1 1 160px;
}

@keyframes ks-pulse-border {
  0%,
  100% {
    box-shadow: 0 0 24px rgba(54, 233, 244, 0.14);
  }
  50% {
    box-shadow: 0 0 40px rgba(54, 233, 244, 0.3);
  }
}

.ks-stage-call {
  display: grid;
  gap: 18px;
}

.ks-stage-call[hidden],
.ks-stage-idle[hidden] {
  display: none !important;
}

.ks-incoming-head {
  display: grid;
  gap: 4px;
}

.ks-incoming-badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ks-cyan);
}

.ks-incoming-source {
  color: var(--ks-muted);
  font-size: 13px;
}

.ks-incoming-hero {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  min-height: clamp(220px, 34vh, 320px);
  padding: 24px 16px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 35%, #0f5f7e 0%, #073147 42%, rgba(2, 19, 33, 0.35) 100%);
  border: 1px solid rgba(104, 239, 253, 0.2);
  overflow: hidden;
}

.ks-incoming-rings {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px solid rgba(54, 233, 244, 0.35);
  animation: ks-ring-pulse 2s ease-out infinite;
  pointer-events: none;
}

.ks-incoming-rings::before,
.ks-incoming-rings::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 2px solid rgba(54, 233, 244, 0.2);
  animation: ks-ring-pulse 2s ease-out infinite 0.35s;
}

.ks-incoming-rings::after {
  inset: -36px;
  animation-delay: 0.7s;
}

@keyframes ks-ring-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

.ks-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(54, 233, 244, 0.14);
  border: 1px solid rgba(54, 233, 244, 0.35);
  font-weight: 800;
  color: var(--ks-cyan);
  flex: 0 0 auto;
}

.ks-avatar-lg {
  width: 88px;
  height: 88px;
  font-size: 28px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 30px rgba(54, 233, 244, 0.35);
  background: rgba(2, 19, 33, 0.7);
}

.ks-incoming-name {
  position: relative;
  z-index: 1;
  font-size: clamp(22px, 5vw, 30px);
  letter-spacing: -0.03em;
}

.ks-incoming-summary {
  position: relative;
  z-index: 1;
  color: var(--ks-muted);
  font-size: 14px;
  max-width: 360px;
}

.ks-incoming-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(54, 233, 244, 0.12);
  border: 1px solid rgba(54, 233, 244, 0.28);
  color: var(--ks-cyan);
  font-size: 12px;
  font-weight: 700;
}

.ks-incoming-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.ks-incoming-wait {
  position: relative;
  z-index: 1;
  color: var(--ks-muted);
  font-size: 13px;
  font-weight: 650;
}

.ks-incoming-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ks-incoming-actions .ks-btn {
  flex: 1 1 140px;
  min-height: 48px;
  font-size: 15px;
}

/* Idle / hero */
.ks-idle {
  min-height: clamp(200px, 32vh, 300px);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: clamp(16px, 4vw, 24px);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 30%, #0e5470 0%, #072f46 40%, rgba(2, 19, 33, 0.2) 100%);
  border: 1px solid rgba(104, 239, 253, 0.16);
}

.ks-idle.is-available {
  border-color: rgba(5, 228, 140, 0.35);
}

.ks-coin-spin {
  perspective: 700px;
  width: clamp(96px, 18vw, 132px);
  height: clamp(96px, 18vw, 132px);
  display: grid;
  place-items: center;
}

.ks-coin-spin img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 22px #13dafa7b);
  transform-style: preserve-3d;
  animation: ks-coin-y 10s linear infinite;
  backface-visibility: visible;
}

@keyframes ks-coin-y {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ks-coin-spin img {
    animation: none;
  }
}

.ks-idle h2 {
  margin: 8px 0 0;
  font-size: clamp(18px, 4vw, 28px);
  letter-spacing: -0.03em;
}

.ks-idle p {
  margin: 0;
  color: var(--ks-muted);
  max-width: 380px;
  font-size: clamp(13px, 3vw, 15px);
}

.ks-idle .ks-btn {
  margin-top: 6px;
}

/* Side lists */
.ks-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.ks-side-link {
  font-size: 12px;
  font-weight: 700;
}

.ks-people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ks-people-empty {
  color: var(--ks-muted);
  font-size: 13px;
  padding: 10px 4px;
}

.ks-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(6, 51, 76, 0.45);
  border: 1px solid rgba(104, 239, 253, 0.16);
}

.ks-person-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ks-person-meta strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-person-meta span {
  color: var(--ks-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-person-right {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 0 0 auto;
}

.ks-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  background: rgba(100, 116, 139, 0.25);
  color: #cbd5e1;
}

.ks-tag.is-high {
  background: rgba(255, 83, 92, 0.18);
  color: #ff9aa2;
}

.ks-tag.is-mid {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
}

.ks-tag.is-ok {
  background: rgba(5, 228, 140, 0.16);
  color: #7dffc2;
}

.ks-person-time {
  color: var(--ks-muted);
  font-size: 11px;
  font-weight: 650;
}

/* Forms / tables / login (shared pages) */
.ks-table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--ks-border);
  -webkit-overflow-scrolling: touch;
}

table.ks-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

.ks-table th,
.ks-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(104, 239, 253, 0.12);
  font-size: 14px;
  vertical-align: top;
}

.ks-table th {
  color: var(--ks-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ks-form {
  display: grid;
  gap: 12px;
  max-width: min(480px, 100%);
}

.ks-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ks-muted);
  font-weight: 650;
}

.ks-form input,
.ks-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--ks-border);
  background: rgba(2, 19, 33, 0.7);
  color: var(--ks-white);
  font: 500 15px Outfit, sans-serif;
  min-height: 44px;
}

.ks-error {
  color: #ff9aa2;
  font-size: 14px;
  margin: 0;
}

.ks-ok {
  color: #7dffc2;
  font-size: 14px;
  margin: 0;
}

.ks-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at 50% 30%, #0e5470 0%, #072f46 26%, #051e30 57%, #021321 100%);
  position: relative;
  overflow: hidden;
}

.ks-login::before {
  content: "";
  position: absolute;
  inset: -10%;
  opacity: 0.45;
  background:
    repeating-linear-gradient(90deg, transparent 0 74px, #3ce9ff18 75px 76px, transparent 77px 131px),
    repeating-linear-gradient(0deg, transparent 0 89px, #20a6d111 90px 91px, transparent 92px 148px);
  transform: perspective(450px) rotateX(18deg) scale(1.1);
  pointer-events: none;
}

.ks-login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: clamp(20px, 5vw, 28px) clamp(16px, 4vw, 24px) clamp(18px, 4vw, 24px);
  border-radius: var(--ks-radius);
  border: 1px solid var(--ks-border);
  background: rgba(2, 19, 33, 0.72);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.ks-login-card img {
  width: clamp(88px, 28vw, 112px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 18px #13dafa7b);
  object-fit: cover;
}

.ks-login-card h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 7vw, 28px);
  letter-spacing: -0.03em;
}

.ks-login-card p {
  margin: 0 0 22px;
  color: var(--ks-muted);
  font-size: clamp(13px, 3.6vw, 15px);
}

.ks-login-card form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.ks-login-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--ks-border);
  background: rgba(2, 19, 33, 0.7);
  color: var(--ks-white);
  font: 500 15px Outfit, sans-serif;
  min-height: 44px;
}

.ks-login-card button {
  margin-top: 6px;
  width: 100%;
}

.ks-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ks-muted);
  font-size: 13px;
}

.ks-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ks-queue-list li {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ks-card);
  border: 1px solid var(--ks-border);
  word-break: break-word;
}

/* Responsive */
@media (max-width: 1100px) {
  .ks-top {
    grid-template-columns: 1fr auto;
  }

  .ks-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    padding-bottom: 2px;
  }
}

@media (max-width: 980px) {
  .ks-dash-grid {
    grid-template-columns: 1fr;
  }

  .ks-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ks-top {
    grid-template-columns: 1fr;
  }

  .ks-top-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .ks-agent-block {
    align-items: flex-start;
    margin-right: auto;
  }

  .ks-agent-name {
    max-width: 70vw;
  }

  .ks-presence {
    align-items: flex-start;
  }

  .ks-controls {
    flex-direction: column;
  }

  .ks-controls .ks-btn,
  .ks-incoming-actions .ks-btn {
    width: 100%;
  }

  .ks-stat-hint {
    display: none;
  }

  .ks-table-wrap {
    border: 0;
    overflow: visible;
  }

  table.ks-table,
  .ks-table thead,
  .ks-table tbody,
  .ks-table th,
  .ks-table td,
  .ks-table tr {
    display: block;
    width: 100%;
  }

  .ks-table {
    min-width: 0 !important;
  }

  .ks-table thead {
    display: none;
  }

  .ks-table tr {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--ks-border);
    background: var(--ks-card);
  }

  .ks-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(104, 239, 253, 0.1);
    font-size: 14px;
  }

  .ks-table td:last-child {
    border-bottom: 0;
  }

  .ks-table td::before {
    content: attr(data-label);
    color: var(--ks-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 0 0 38%;
  }

  .ks-table td > * {
    text-align: right;
  }
}

@media (max-width: 420px) {
  .ks-stats {
    grid-template-columns: 1fr 1fr;
  }

  .ks-brand-tag {
    display: none;
  }
}
