.dashboard-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.85rem;
  padding:
    calc(0.85rem + env(safe-area-inset-top))
    calc(0.85rem + env(safe-area-inset-right))
    calc(0.85rem + env(safe-area-inset-bottom))
    calc(0.85rem + env(safe-area-inset-left));
  background:
    radial-gradient(circle at top left, rgba(91, 140, 255, 0.12), transparent 35%),
    radial-gradient(circle at bottom right, rgba(245, 197, 66, 0.06), transparent 30%),
    var(--bg);
}

.topbar {
  display: grid;
  gap: 0.75rem;
  background: rgba(23, 26, 34, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.9rem 1rem;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 92, 92, 0.15);
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(62, 207, 142, 0.18);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.btn-ghost:hover {
  background: #272d3d;
}

.btn-ghost:active {
  transform: scale(0.97);
}

.browser-bar {
  display: grid;
  gap: 0.65rem;
  background: rgba(23, 26, 34, 0.75);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.85rem 1rem;
}

.browser-bar label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.browser-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.browser-controls select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  outline: none;
}

.browser-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.disposition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
  min-height: 0;
}

.disposition-btn {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 28px;
  color: #fff;
  font-size: clamp(1.05rem, 3.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  padding: 1rem;
  min-height: 28vh;
  box-shadow: var(--shadow);
  transition: transform 0.14s ease, filter 0.14s ease, opacity 0.14s ease;
  touch-action: manipulation;
  overflow: hidden;
}

.disposition-btn span.subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
}

.disposition-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.disposition-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.disposition-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.disposition-btn.loading::after {
  content: "";
  position: absolute;
  width: 1.4rem;
  height: 1.4rem;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  bottom: 1rem;
  right: 1rem;
}

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

.btn-geen-interesse {
  background: linear-gradient(160deg, #ff5c5c, #d63b3b);
}

.btn-voicemail {
  background: linear-gradient(160deg, #5b8cff, #3a62d8);
}

.btn-geen-gehoor {
  background: linear-gradient(160deg, #f5c542, #d6a016);
  color: #1a1400;
}

.btn-foutief-nummer {
  background: linear-gradient(160deg, #3ecf8e, #249a64);
}

.bottom-panel {
  display: grid;
  gap: 0.75rem;
}

.panel {
  background: rgba(23, 26, 34, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.9rem 1rem;
}

.panel h2 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

.history-list {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  max-height: 180px;
  overflow: auto;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 0.82rem;
}

.history-item .meta {
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.pending,
.badge.sent {
  background: rgba(91, 140, 255, 0.18);
  color: #9cbcff;
}

.badge.completed {
  background: rgba(62, 207, 142, 0.18);
  color: #8ef0c0;
}

.badge.failed {
  background: rgba(255, 92, 92, 0.18);
  color: #ffb0b0;
}

.history-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  place-items: center;
  padding: 1rem;
  z-index: 50;
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  width: min(100%, 420px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.modal h2 {
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .disposition-btn {
    min-height: 22vh;
    border-radius: 22px;
    font-size: 1.05rem;
  }

  .browser-controls {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .dashboard-page {
    max-width: 980px;
    margin: 0 auto;
  }

  .disposition-btn {
    min-height: 240px;
  }
}
