:root {
  --ink: #17201b;
  --muted: #637169;
  --line: #d9e1dc;
  --paper: #f7faf8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --sun: #f2b84b;
  --danger: #b42318;
  --shadow: 0 18px 60px rgba(23, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.kiosk-screen {
  overflow: hidden;
  background: linear-gradient(135deg, #fbfdfb 0%, #eef7f3 56%, #e2f0ee 100%);
}

.kiosk-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(24px, 5vw, 72px);
  align-items: stretch;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px);
}

.content-stage {
  display: flex;
  min-height: calc(100vh - clamp(56px, 10vw, 144px));
  flex-direction: column;
  justify-content: space-between;
}

.brand-row {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #98a29d;
}

.status-dot.online {
  background: #20a46b;
  box-shadow: 0 0 0 5px rgba(32, 164, 107, 0.14);
}

.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(180, 35, 24, 0.12);
}

.hero-copy {
  max-width: 860px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(64px, 10vw, 148px);
  line-height: 0.92;
  font-weight: 800;
}

.hero-copy p {
  margin: 28px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.16;
  font-weight: 520;
}

.idle-list {
  display: grid;
  max-width: 920px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.idle-list li {
  min-height: 112px;
  border: 1px solid rgba(23, 32, 27, 0.09);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: #334039;
  font-size: 17px;
  line-height: 1.32;
  font-weight: 650;
}

.action-panel {
  display: flex;
  min-height: calc(100vh - clamp(56px, 10vw, 144px));
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  border: 1px solid rgba(23, 32, 27, 0.08);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.clock {
  color: var(--accent-strong);
  font-size: clamp(48px, 7vw, 82px);
  line-height: 1;
  font-weight: 760;
  text-align: center;
}

.call-button {
  display: flex;
  min-height: 172px;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  border-radius: 8px;
  padding: 24px;
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 30px rgba(15, 118, 110, 0.22);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.08;
  text-align: left;
}

.call-button:active {
  transform: translateY(1px);
}

.call-button[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.call-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 54%, white 54% 66%, transparent 66%),
    linear-gradient(white, white);
  background-size:
    100% 100%,
    60% 52%;
  background-position:
    center,
    18% center;
  background-repeat: no-repeat;
}

.system-message {
  min-height: 56px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
}

.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #101816;
  color: white;
}

.call-overlay.is-hidden {
  display: none;
}

.call-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 20px;
}

.call-topbar strong,
.call-topbar span {
  display: block;
}

.call-topbar span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.call-frame {
  min-height: 0;
}

.call-frame iframe,
#jitsiContainer,
#dailyContainer {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.mock-call {
  display: flex;
  height: 100%;
  min-height: 420px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  text-align: center;
}

.mock-call h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 62px);
}

.mock-call p {
  margin: 0;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  line-height: 1.35;
}

.avatar-ring {
  width: 140px;
  height: 140px;
  border: 18px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--sun);
  border-radius: 50%;
  animation: rotate 1.4s linear infinite;
}

.secondary-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  background: white;
  color: var(--ink);
  font-weight: 750;
}

.secondary-button.danger {
  border-color: rgba(180, 35, 24, 0.4);
  background: var(--danger);
  color: white;
}

.agent-screen {
  background: #f2f6f3;
}

.agent-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.agent-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.agent-header h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
}

.agent-header p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.agent-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.agent-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.agent-controls input {
  width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}

.agent-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  gap: 18px;
}

.agent-notice {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 750;
}

.panel {
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 42px rgba(23, 32, 27, 0.08);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.panel-header span {
  color: var(--muted);
  font-weight: 750;
}

.list {
  display: grid;
  gap: 0;
}

.row {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #edf1ee;
  padding: 16px 20px;
}

.row:last-child {
  border-bottom: 0;
}

.row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: 800;
}

.row-meta {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.row-debug {
  border-left: 3px solid var(--sun);
  padding-left: 10px;
  color: #684a00;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf1ee;
  color: #516159;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.online {
  background: rgba(32, 164, 107, 0.12);
  color: #087443;
}

.badge.ringing {
  background: rgba(242, 184, 75, 0.2);
  color: #855c02;
}

.badge.accepted {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-strong);
}

.badge.accepting {
  background: rgba(242, 184, 75, 0.2);
  color: #855c02;
}

.badge.ended {
  background: #eef0f2;
  color: #606a72;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.row-status {
  display: inline-flex;
  align-items: center;
  min-height: 43px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.empty {
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 920px) {
  .kiosk-shell,
  .agent-grid,
  .agent-header {
    grid-template-columns: 1fr;
  }

  .kiosk-shell {
    min-height: 100svh;
    padding: 22px;
    gap: 18px;
  }

  .content-stage,
  .action-panel {
    min-height: auto;
  }

  .content-stage {
    gap: 22px;
  }

  .idle-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-copy h1 {
    font-size: 58px;
  }

  .hero-copy p {
    margin-top: 18px;
    font-size: 23px;
  }

  .idle-list li {
    min-height: 82px;
    padding: 14px 18px;
  }

  .action-panel {
    gap: 14px;
    padding: 16px 18px;
  }

  .clock {
    font-size: 44px;
  }

  .call-button {
    min-height: 108px;
    padding: 18px;
    font-size: 24px;
  }

  .call-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .system-message {
    min-height: 38px;
    font-size: 16px;
  }

  .agent-header {
    align-items: stretch;
  }

  .agent-controls {
    align-items: stretch;
  }

  .agent-controls,
  .agent-controls input,
  .secondary-button {
    width: 100%;
  }
}
