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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: left;
  margin-bottom: 32px;
}
.brand img {
  max-height: 256px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  user-select: none;
  -webkit-user-drag: none;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}
.header p { font-size: 1.1rem; opacity: 0.9; }

.content { padding: 40px; }

.section {
  background: #f8f9ff;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  border-left: 5px solid #4facfe;
}
.section h2 {
  color: #2d3748;
  font-size: 1.5rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; }
.form-group label {
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.form-group input, .form-group select {
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.hourly-rate {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  margin-top: 20px;
}
.hourly-rate h3 { font-size: 1.2rem; margin-bottom: 10px; }
.hourly-rate .rate { font-size: 2rem; font-weight: bold; }

.task-item {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
}
.task-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 20px;
}
.task-number {
  background: #4facfe;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
}
.remove-task {
  background: #e53e3e;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.remove-task:hover { background: #c53030; transform: translateY(-2px); }

.frequency-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}
.frequency-option { display: flex; align-items: center; gap: 8px; }
.frequency-option input[type="radio"] { width: 18px; height: 18px; }

.task-results {
  background: #f0fff4;
  border: 2px solid #68d391;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.task-result { text-align: center; }
.task-result .label {
  font-size: 0.9rem;
  color: #2f855a;
  font-weight: 600;
}
.task-result .value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1a202c;
}

.add-task-btn {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px auto;
}
.add-task-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}
.result-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border-top: 4px solid #4facfe;
}
.result-card h3 {
  color: #2d3748;
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 600;
}
.result-card .value {
  font-size: 2rem;
  font-weight: bold;
  color: #4facfe;
}

.automation-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-left: none;
}
.automation-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.automation-card {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.automation-card h4 { font-size: 0.9rem; margin-bottom: 10px; opacity: 0.9; }
.automation-card .value { font-size: 1.8rem; font-weight: bold; }

.charts-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}
.chart-container {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.chart-container h3 {
  text-align: center;
  color: #2d3748;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .charts-container { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .frequency-options { grid-template-columns: 1fr; }
  .task-results { grid-template-columns: 1fr; }
}

.empty-state { text-align: center; padding: 40px; color: #718096; }
.empty-state .icon { font-size: 4rem; margin-bottom: 20px; }

.footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 22px 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}
.footer-left { font-size: 0.95rem; line-height: 1.4; }
.footer-left strong { display: block; margin-bottom: 4px; color: #f8fafc; }
.footer-right { text-align: right; font-size: 0.9rem; opacity: 0.9; }
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-right { text-align: left; }
}

html, body { overflow-x: hidden; }
canvas {
  display: block;
  max-width: 100% !important;
  height: auto !important;
}
.section,
.chart-container,
.results-grid,
.automation-results,
.form-grid {
  max-width: 100%;
}
@media (max-width: 480px) {
  .content { padding: 20px; }
  .section { padding: 20px; }
  .chart-container { padding: 16px; overflow: hidden; border-radius: 15px; }
}

.whatsapp-btn {
  width: 100%;
  background: #22c55e;
  color: #0f172a;
  border: none;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  display: block;
  margin-top: 16px;
}
.whatsapp-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(34,197,94,0.35); }
.whatsapp-btn:disabled { opacity: .6; cursor: not-allowed; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(2,6,23,0.55);
  z-index: 50;
  padding: 16px;
}
.modal.show { display: grid; }
.modal__dialog {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  position: relative;
}
.modal__close {
  position: absolute;
  top: 10px; right: 10px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #334155;
}
.modal__subtitle { color: #475569; margin: 6px 0 16px; }
.modal__submit {
  width: 100%;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.modal__submit:disabled { opacity: .7; cursor: not-allowed; }
.form-consent { margin-top: 6px; }
.checkbox { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: #334155; }
.hint { color: #64748b; font-size: .8rem; margin-top: 4px; }
.modal__note { margin-top: 10px; font-size: .85rem; color: #475569; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(100%);
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 60;
  transition: transform .25s ease;
  max-width: 92%;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
