/* L3 WiFi — Captive Portal — L3 Tecnologia */

:root {
  --primary:     #1a73e8;
  --primary-dark:#1557b0;
  --bg:          #f0f4ff;
  --card-bg:     #ffffff;
  --text:        #1a1a1a;
  --text-muted:  #5f6368;
  --border:      #dadce0;
  --success:     #1e7e34;
  --error:       #c62828;
  --radius:      12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 420px;
}

/* Header */

.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  border-radius: 16px;
  letter-spacing: -1px;
  margin-bottom: 0.6rem;
}

.brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Card */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 1px 12px rgba(26,115,232,0.12);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.card > p {
  text-align: center;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Screens */
.screen { display: none; }
.screen.active { display: block; }

/* Icons */

.wifi-icon, .success-icon, .error-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.wifi-icon    { background: #e8f0fe; color: var(--primary); }
.success-icon { background: #e6f4ea; color: var(--success); }
.error-icon   { background: #fce8e6; color: var(--error);   }

.wifi-icon svg, .success-icon svg, .error-icon svg {
  width: 34px;
  height: 34px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Termos */

.terms-box {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  height: 180px;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.loading { text-align: center; }
.error-text { color: var(--error); text-align: center; }

/* Form */

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

input[type="text"],
input[type="email"] {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus { border-color: var(--primary); }

/* Checkbox */

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 1px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Botões */

.btn-primary, .btn-secondary {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.1s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: #e8f0fe; }

/* Misc */

.lgpd-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.redirect-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #aaa;
}

.footer strong { color: var(--primary); }

@media (max-width: 400px) {
  .card { padding: 1.5rem 1rem; }
}
