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

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Segoe UI', sans-serif;
}

#widget {
  background: #16213e;
  border-radius: 16px;
  width: 280px;
  padding: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  color: #fff;
}

#widget-header {
  text-align: center;
  margin-bottom: 20px;
}

#widget-header h2 {
  font-size: 16px;
  letter-spacing: 1px;
  color: #a8b2c8;
  text-transform: uppercase;
}

#status-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #3a3a5c;
  color: #a8b2c8;
}
#status-badge.available { background: #1a5c3a; color: #4cde8c; }
#status-badge.busy { background: #5c1a1a; color: #de4c4c; }

#log-area {
  background: #0f1e35;
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  color: #5a8fd0;
  min-height: 70px;
  max-height: 70px;
  overflow-y: auto;
  margin-bottom: 16px;
  font-family: monospace;
}

/* Login screen */
#login-screen { text-align: center; }

#btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0f3460, #533483);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}
#btn-login:hover { opacity: 0.85; }
#btn-login:disabled { opacity: 0.4; cursor: not-allowed; }

/* Softphone controls */
#softphone-screen { display: none; }

#keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.key-btn {
  background: #1e2f50;
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 12px 0;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
}
.key-btn:hover { background: #2a3f6a; }
.key-btn:active { background: #0f3460; }

#dial-display {
  background: #0f1e35;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: 20px;
  letter-spacing: 3px;
  color: #e0e8ff;
  min-height: 44px;
  margin-bottom: 12px;
  font-family: monospace;
}

#action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  padding: 10px 6px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  letter-spacing: 0.5px;
}
.action-btn:hover { opacity: 0.85; }

#btn-mute   { background: #533483; color: #fff; }
#btn-mute.active { background: #de4c4c; }
#btn-transfer { background: #0f3460; color: #fff; }
#btn-status  { background: #1a5c3a; color: #4cde8c; }
#btn-logout  { background: #5c1a1a; color: #de4c4c; }

#btn-clear {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: #2a2a4a;
  color: #a8b2c8;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
