/* BRAWNET Hotspot Captive Portal Styles */
:root {
  --primary-color: #0055ff;
  --primary-hover: #0044cc;
  --bg-color: #f4f6f9;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.portal-container {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

/* Header */
.portal-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #002b80 100%);
  color: white;
  padding: 28px 24px;
  text-align: center;
  position: relative;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.portal-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.portal-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: 4px;
}

.hotspot-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Body Content */
.portal-body {
  padding: 24px;
}

.view {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.view.active {
  display: block;
}

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

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  margin-top: 12px;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  margin-top: 12px;
}

.btn-social-disabled {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  cursor: not-allowed;
  margin-top: 10px;
  font-size: 0.875rem;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 18px 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider::before { margin-right: 10px; }
.divider::after { margin-left: 10px; }

/* Forms */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.15);
}

/* Checkboxes */
.checkbox-group {
  margin-top: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
}

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

.link-terms {
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
}

/* Success Card */
.success-box {
  text-align: center;
  padding: 12px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  color: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.speed-info {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  margin: 16px 0;
  display: flex;
  justify-content: space-around;
}

.speed-item {
  text-align: center;
}

.speed-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.speed-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Alert Box */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-body {
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 16px;
}

/* Spinner */
.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.footer-text {
  text-align: center;
  padding: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
}
