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

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

.tela {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tela.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
}

.container-wide {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.subtitle {
  color: #888;
  margin-bottom: 32px;
}

/* DROP ZONE */
.drop-zone {
  border: 2px dashed #333;
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.05);
}

.drop-icon {
  font-size: 48px;
  color: #25d366;
  margin-bottom: 16px;
  font-weight: 300;
}

.drop-zone p {
  color: #aaa;
  margin-bottom: 4px;
}

.drop-zone .small {
  font-size: 13px;
  color: #666;
}

/* STATUS */
.status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.status.loading {
  background: rgba(37, 211, 102, 0.1);
  color: #25d366;
}

.status.error {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}

.hidden {
  display: none !important;
}

/* LOGIN */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.login-box h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.login-box .subtitle {
  margin-bottom: 28px;
}

.login-box .form-group {
  text-align: left;
  margin-bottom: 16px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
  border-color: #25d366;
}

.btn-login {
  width: 100%;
  margin-top: 8px;
}

/* WEBHOOK MANAGE */
.webhook-manage {
  margin-top: 16px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
}

.webhook-manage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  flex-wrap: wrap;
  gap: 8px;
}

.webhook-manage-header span {
  font-size: 13px;
  color: #888;
}

.webhook-manage-actions {
  display: flex;
  gap: 8px;
}

.btn-danger {
  color: #ff3b30 !important;
  border-color: #ff3b30 !important;
}

.btn-danger:hover {
  background: rgba(255, 59, 48, 0.1) !important;
}

.btn-danger:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.webhook-preview-list {
  max-height: 300px;
  overflow-y: auto;
}

.webhook-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.webhook-preview-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.webhook-preview-item:last-child {
  border-bottom: none;
}

.webhook-preview-item input[type="checkbox"] {
  accent-color: #25d366;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.webhook-preview-item .wp-name {
  color: #fff;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.webhook-preview-item .wp-details {
  color: #666;
  flex-shrink: 0;
}

/* DIVIDER */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #333;
}

.divider span {
  color: #666;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* WEBHOOK BUTTON */
.btn-webhook {
  width: 100%;
  padding: 16px 24px;
  background: #1a1a1a;
  color: #e0e0e0;
  border: 1px solid #333;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-webhook:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.05);
}

.btn-webhook-sub {
  font-size: 12px;
  font-weight: 400;
  color: #25d366;
}

/* CARDS */
.resumo-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.card-number {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.card-label {
  font-size: 13px;
  color: #888;
}

.card-97 {
  border-color: #f5a623;
}

.card-97 .card-number {
  color: #f5a623;
}

.card-10 {
  border-color: #25d366;
}

.card-10 .card-number {
  color: #25d366;
}

/* FORM */
.config-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ccc;
}

.hint {
  font-weight: 400;
  color: #666;
  font-size: 12px;
}

input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

input[type="number"]:focus {
  border-color: #25d366;
}

textarea {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}

textarea:focus {
  border-color: #25d366;
}

.radio-group {
  display: flex;
  gap: 16px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 20px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  transition: all 0.2s;
}

.radio-option:has(input:checked) {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.1);
}

.radio-option input {
  accent-color: #25d366;
}

.radio-option span {
  font-weight: 600;
}

/* BUTTONS */
.btn-primary {
  padding: 14px 32px;
  background: #25d366;
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #1fb855;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 10px 24px;
  background: transparent;
  color: #888;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  color: #fff;
  border-color: #555;
}

.btn-small {
  padding: 6px 14px;
  font-size: 12px;
}

/* DISPAROS */
.disparos-header {
  margin-bottom: 24px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: #1a1a1a;
  border-radius: 3px;
  margin: 16px 0 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #25d366;
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  color: #888;
  margin-bottom: 12px;
}

/* LEADS LIST */
.leads-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lead-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  transition: all 0.2s;
}

.lead-item.current {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.08);
}

.lead-item.sent {
  opacity: 0.45;
}

.lead-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  transition: all 0.2s;
}

.lead-item.sent .lead-check {
  background: #25d366;
  border-color: #25d366;
  color: #000;
}

.lead-info {
  flex: 1;
  min-width: 0;
}

.lead-name {
  font-weight: 600;
  color: #fff;
  font-size: 15px;
}

.lead-item.sent .lead-name {
  text-decoration: line-through;
  color: #888;
}

.lead-details {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.lead-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.lead-tag.tag-97 {
  background: rgba(245, 166, 35, 0.15);
  color: #f5a623;
}

.lead-tag.tag-10 {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
}

.lead-actions {
  flex-shrink: 0;
}

.btn-whatsapp {
  padding: 8px 16px;
  background: #25d366;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-whatsapp:hover {
  background: #1fb855;
}

.btn-whatsapp:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
