:root {
  --home-bg: #4b2f16;
  --home-text: #f5f5f5;
  --home-card-bg: #3b2613;
  --home-input-bg: #2b1a0d;
  --home-input-text: #f5f5f5;
  --home-input-placeholder: #b39b82;
  --home-btn-primary-bg: #00c72c; /* Updated default to green */
  --home-btn-primary-text: #ffffff;
  --home-btn-outline-bg: #000000;
  --home-btn-outline-text: #f5f5f5;
  --home-border: #333333;
  --accent-green: #00c72c; /* Theme green */
}

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--home-bg);
  color: var(--home-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  text-align: center;
}

.auth-card {
  /* No visible card bg in the new design if we want to match exactly, 
     but we'll keep it transparent or match body to let it blend. */
  background: transparent;
  padding: 10px 10px 30px;
  position: relative;
  overflow: hidden;
}

.logo {
  margin-bottom: 30px;
}

.logo img {
  width: 140px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.form-block {
  display: none;
}

.form-block.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

.form-title {
  margin-bottom: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.form-title h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-title.login-title {
  align-items: center;
  text-align: center;
}

.form-title.login-title h1 {
  color: var(--accent-green);
}

.form-title.register-title h1 {
  color: #fff;
}

.form-title p {
  font-size: 14px;
  color: #a0a0a0;
}

.field-group {
  position: relative;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 8px;
  border: 1px solid var(--home-border);
  padding: 0 16px;
  transition: border-color 0.2s ease;
}

.field-group:focus-within {
  border-color: var(--accent-green);
}

.field-icon {
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.field-icon svg {
  width: 22px;
  height: 22px;
}

.field-icon.right {
  margin-right: 0;
  margin-left: 12px;
}

.field-group input {
  flex: 1;
  width: 100%;
  padding: 16px 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--home-input-text);
  font-size: 15px;
}

.field-group input::placeholder {
  color: var(--home-input-placeholder);
}

.field-group input:-webkit-autofill,
.field-group input:-webkit-autofill:hover, 
.field-group input:-webkit-autofill:focus, 
.field-group input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--home-input-text) !important;
  transition: background-color 5000s ease-in-out 0s;
  background-color: transparent !important;
}

.helper-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
  margin-bottom: 16px;
}

.helper-row a {
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.helper-row a:hover {
  text-decoration: underline;
}

.btn {
  width: 100%;
  border-radius: 8px;
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--home-btn-primary-bg);
  color: var(--home-btn-primary-text);
  box-shadow: 0 4px 12px rgba(0, 199, 44, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 199, 44, 0.3);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid var(--home-border);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 13px;
  color: #fff;
  font-weight: 600;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--home-border);
}

.features-row {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 24px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: #fff;
  flex: 1;
  gap: 6px;
}

.feature-item .f-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  margin-bottom: 4px;
}

.feature-item span.highlight {
  color: var(--accent-green);
  font-weight: 600;
}

.support-card {
  display: flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--home-border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 64px;
  text-decoration: none;
  text-align: left;
  position: relative;
}

.support-card .s-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-right: 16px;
  flex-shrink: 0;
}

.support-card .s-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.support-card .s-content .s-title {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.support-card .s-content .s-subtitle {
  color: var(--accent-green);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 2px;
}

.support-card .s-content .s-desc {
  color: #a0a0a0;
  font-size: 10px;
}

.support-card .s-arrow {
  color: var(--accent-green);
  font-weight: bold;
}

.btn-back {
  background: none;
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 16px;
}

.footer-responsible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  color: #a0a0a0;
  font-size: 10px;
}

.footer-responsible .age-badge {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-weight: bold;
  font-size: 10px;
}

.alerts {
  margin-bottom: 16px;
  text-align: left;
  font-size: 13px;
}

.alert-error {
  background: rgba(255, 79, 79, 0.12);
  border-left: 3px solid #ff4f4f;
  color: #ff4f4f;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.alert-success {
  background: rgba(66, 194, 96, 0.14);
  border-left: 3px solid #42c260;
  color: #42c260;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.afiliado-info {
  font-size: 13px;
  text-align: center;
  margin-bottom: 16px;
  color: var(--home-text);
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 8px;
}

/* Radio buttons for confirmation */
.radio-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #f5f5f5;
}

@media (max-width: 480px) {
  .page-wrapper {
    padding: 16px;
  }
  .logo img {
    width: 120px;
  }
}
