:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #d9e0e7;
  --accent: #2563eb;
  --accent-2: #0f766e;
  --danger: #b91c1c;
  --ok: #15803d;
  --warn: #a16207;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.ghost {
  background: #e8eef7;
  color: var(--ink);
}

button.danger {
  background: var(--danger);
}

button.small {
  min-height: 32px;
  padding: 0 10px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
}

.shell {
  min-height: 100vh;
  padding: 24px;
}

.topbar,
.workspace,
.login-panel {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
}

h2 {
  margin-bottom: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 7px 10px;
  min-width: 72px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.pill.ok {
  color: var(--ok);
  border-color: #86efac;
  background: #f0fdf4;
}

.pill.warn {
  color: var(--warn);
  border-color: #fde68a;
  background: #fffbeb;
}

.pill.bad {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}

.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

label span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--danger);
}

.workspace {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 18px;
}

.side,
.main-panel,
.panel,
.call-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.side {
  padding: 18px;
}

.operator-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.status-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fbfcfd;
}

.status-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.status-card strong {
  word-break: break-word;
}

.softphone-actions,
.dial-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.dial-row {
  grid-template-columns: 1fr auto;
}

.main-panel {
  padding: 18px;
}

.call-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.call-strip p {
  color: var(--muted);
  margin-bottom: 0;
}

.call-actions {
  display: flex;
  gap: 10px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  padding: 16px;
  min-height: 360px;
}

.admin-panel {
  margin-top: 18px;
  min-height: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.list,
.activity-list {
  display: grid;
  gap: 8px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-output {
  min-height: 280px;
  max-height: 520px;
  overflow: auto;
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfd;
}

.item small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .shell {
    padding: 14px;
  }

  .topbar,
  .call-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace,
  .columns,
  .login-form,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .call-actions {
    width: 100%;
  }

  .call-actions button {
    flex: 1;
  }
}
