* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0e1a;
  color: #e0e0e0;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ===== CALL BAR ===== */
.call-bar {
  background: #1a1f35;
  border-bottom: 1px solid #2a3050;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.call-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.call-bar-icon {
  font-size: 20px;
}

.call-bar-label {
  font-size: 12px;
  color: #8890a0;
}

.call-bar-number {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.call-bar-timer {
  font-size: 12px;
  color: #8890a0;
}

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

.call-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a3050;
  color: #e0e0e0;
  transition: background 0.2s;
}

.call-btn:hover {
  background: #3a4060;
}

.call-btn.hangup {
  background: #e53935;
  color: white;
}

.call-btn.hangup:hover {
  background: #c62828;
}

.call-btn.active {
  background: #e53935;
  color: white;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

/* ===== CARD ===== */
.card {
  background: #141829;
  border: 1px solid #1e2340;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #8890a0;
  margin-bottom: 8px;
}

/* Operator selector */
.operator-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.op-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #2a3050;
  background: #1a1f35;
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.op-btn:hover {
  background: #2a3050;
  border-color: #4a5080;
}

.op-btn.selected {
  background: #3b5bdb;
  border-color: #3b5bdb;
  color: white;
}

/* Phone input */
.phone-input {
  display: flex;
  align-items: center;
  background: #1a1f35;
  border: 1px solid #2a3050;
  border-radius: 8px;
  overflow: hidden;
}

.phone-prefix {
  padding: 10px 14px;
  background: #1e2340;
  color: #8890a0;
  font-size: 14px;
  border-right: 1px solid #2a3050;
  white-space: nowrap;
}

.phone-input input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
}

/* Address input */
.address-input {
  display: flex;
  align-items: center;
  background: #1a1f35;
  border: 1px solid #2a3050;
  border-radius: 8px;
  overflow: hidden;
}

.search-icon {
  padding: 10px 14px;
  color: #8890a0;
}

.address-input input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
}

/* Primary button */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: #1a1f35;
  border: 1px solid #2a3050;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #2a3050;
}

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.status-dot.online {
  background: #4caf50;
}

.status-text {
  font-size: 14px;
  font-weight: 600;
}

/* Toggle */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8890a0;
  cursor: pointer;
}

.toggle-input {
  display: none;
}

.toggle-slider {
  width: 40px;
  height: 22px;
  background: #2a3050;
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
}

.toggle-slider::after {
  content: '';
  width: 18px;
  height: 18px;
  background: #8890a0;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.toggle-input:checked + .toggle-slider {
  background: #3b5bdb;
}

.toggle-input:checked + .toggle-slider::after {
  transform: translateX(18px);
  background: white;
}

/* Active channels */
.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8890a0;
}

.active-channels {
  display: flex;
  gap: 6px;
}

.channel-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #4caf50;
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== QUEUE ===== */
.queue-section {
  margin-top: 8px;
}

.queue-header {
  display: grid;
  grid-template-columns: 1fr 100px 100px 50px;
  padding: 8px 16px;
  font-size: 13px;
  color: #8890a0;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr 100px 100px 50px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
}

.queue-item:nth-child(odd) {
  background: #1a1f35;
}

.queue-item:nth-child(even) {
  background: #141829;
  border: 1px solid #1e2340;
}

.queue-item-number {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 500;
}

.queue-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #8890a0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.queue-play:hover {
  color: #fff;
}

.queue-status {
  color: #8890a0;
}

.queue-time {
  color: #8890a0;
}

.queue-answer {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #4caf50;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.queue-answer:hover {
  background: #388e3c;
}

/* ===== FAB PHONE BUTTON ===== */
.fab-phone {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #3b5bdb;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59, 91, 219, 0.4);
  transition: transform 0.2s;
  z-index: 100;
}

.fab-phone:hover {
  transform: scale(1.1);
}

/* ===== DIALER POPUP ===== */
.dialer-popup {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 280px;
  background: #141829;
  border: 1px solid #1e2340;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 101;
}

.dialer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #1a1f35;
}

.dialer-title {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.dialer-close {
  background: none;
  border: none;
  color: #8890a0;
  font-size: 22px;
  cursor: pointer;
}

.dialer-close:hover {
  color: #fff;
}

.dialer-display {
  text-align: center;
  font-size: 22px;
  font-weight: 300;
  color: #e0e0e0;
  padding: 20px 18px;
  min-height: 70px;
  word-break: break-all;
}

.dialer-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 24px 16px;
}

.dial-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #2a3050;
  color: #e0e0e0;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin: 0 auto;
}

.dial-btn:hover {
  background: #3a4060;
}

.dial-btn.backspace {
  font-size: 18px;
}

.dial-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 48px);
  margin: 8px 24px 16px;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: #4caf50;
  color: white;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s;
}

.dial-call-btn:hover {
  background: #388e3c;
}

.dialer-tabs {
  display: flex;
  border-top: 1px solid #1e2340;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  color: #8890a0;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.tab-btn.active {
  color: #fff;
}

.tab-btn:hover {
  color: #bbb;
}

/* ===== AUDIO ELEMENT ===== */
#remote-audio {
  display: none;
}
