/* ═══════════════════════════════════════════════════════════
   portal.css — lynxresort WiFi captive portal
   Palette mirrors css/styles.css from the main lynxresort.com site
   ═══════════════════════════════════════════════════════════ */

:root {
  --night:    #0a0f0d;
  --cream:    #f5f0e8;
  --copper:   #c17f3e;
  --copper-d: #a86932;
  --forest:   #1e3a2f;
  --sage:     #8aab7f;
  --moss:     #4a6741;
  --field-bg:     rgba(10, 15, 13, 0.55);
  --field-border: rgba(138, 171, 127, 0.28);
  --field-focus:  rgba(193, 127, 62, 0.55);
  --error-color:  #e07070;
}

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

html { height: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--night);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Google Font ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ══════════════════════════════════════════════════════════
   SPLASH PAGE
   ══════════════════════════════════════════════════════════ */

.splash-wrap {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 1.25rem 2.5rem;
}

/* Background image + overlay */
.splash-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.splash-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 15, 13, 0.78) 0%,
    rgba(10, 15, 13, 0.62) 40%,
    rgba(10, 15, 13, 0.78) 100%
  );
}

.splash-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo */
.splash-logo {
  margin-top: 2.5rem;
  width: 100px;
  height: auto;
  opacity: 0.95;
}

/* Divider line */
.splash-rule {
  width: 3rem;
  height: 1px;
  background: rgba(138, 171, 127, 0.45);
  margin: 1.5rem 0 1.25rem;
}

/* Headline */
.splash-headline {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--cream);
  line-height: 1.25;
}

.splash-sub {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.72);
  text-align: center;
  line-height: 1.55;
}

/* Card */
.splash-card {
  margin-top: 1.75rem;
  width: 100%;
  background: rgba(10, 15, 13, 0.62);
  border: 1px solid rgba(138, 171, 127, 0.18);
  border-radius: 1rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.5rem 1.5rem 1.75rem;
}

/* Form groups */
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.form-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(138, 171, 127, 0.85);
}

.form-input {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 0.5rem;
  color: var(--cream);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.875rem;
  outline: none;
  transition: border-color 160ms, background 160ms;
  -webkit-appearance: none;
}
.form-input::placeholder { color: rgba(245, 240, 232, 0.35); }
.form-input:focus {
  border-color: var(--field-focus);
  background: rgba(10, 15, 13, 0.7);
}
.form-input.error { border-color: var(--error-color); }

/* Phone row */
.phone-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--field-border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--field-bg);
  transition: border-color 160ms;
}
.phone-wrap:focus-within { border-color: var(--field-focus); }
.phone-wrap.error         { border-color: var(--error-color); }

.phone-flag {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.75rem;
  border-right: 1px solid var(--field-border);
  color: rgba(245, 240, 232, 0.7);
  font-size: 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.phone-flag .flag { font-size: 1.1rem; line-height: 1; }

.phone-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.875rem 0.7rem 0.5rem;
  outline: none;
  -webkit-appearance: none;
  min-width: 0;
}
.phone-input::placeholder { color: rgba(245, 240, 232, 0.35); }

/* Inline error */
.field-error {
  font-size: 0.75rem;
  color: var(--error-color);
  margin-top: 0.15rem;
  display: none;
}
.field-error.visible { display: block; }

/* Checkboxes */
.check-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: rgba(245, 240, 232, 0.68);
  line-height: 1.45;
}

.check-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  border: 1.5px solid var(--field-border);
  border-radius: 0.25rem;
  background: var(--field-bg);
  margin-top: 0.05rem;
  cursor: pointer;
  position: relative;
  transition: background 150ms, border-color 150ms;
}
.check-label input[type="checkbox"]:checked {
  background: var(--copper);
  border-color: var(--copper);
}
.check-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 0.22rem;
  top: 0.06rem;
  width: 0.42rem;
  height: 0.65rem;
  border: 2px solid #0a0f0d;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Separator in card */
.card-sep {
  height: 1px;
  background: rgba(138, 171, 127, 0.14);
  margin: 1.1rem 0;
}

/* CTA button */
.btn-connect {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--copper);
  color: var(--night);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 160ms, transform 80ms;
  margin-top: 1.25rem;
  position: relative;
}
.btn-connect:hover   { background: var(--copper-d); }
.btn-connect:active  { transform: scale(0.98); }
.btn-connect:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-connect .btn-spinner {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(10,15,13,0.3);
  border-top-color: var(--night);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}
.btn-connect.loading .btn-spinner { display: block; }

@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* Global error banner */
.form-banner {
  display: none;
  background: rgba(224, 112, 112, 0.15);
  border: 1px solid rgba(224, 112, 112, 0.4);
  border-radius: 0.5rem;
  padding: 0.65rem 0.875rem;
  font-size: 0.8125rem;
  color: #f0a0a0;
  margin-top: 0.75rem;
  text-align: center;
}
.form-banner.visible { display: block; }

/* Fallback "connected" message */
.fallback-msg {
  display: none;
  text-align: center;
  padding: 1rem 0 0.5rem;
  font-size: 0.875rem;
  color: rgba(245, 240, 232, 0.7);
}
.fallback-msg strong { color: var(--sage); }

/* Footer */
.splash-footer {
  position: relative;
  z-index: 1;
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(245, 240, 232, 0.35);
  letter-spacing: 0.03em;
}
.splash-footer a {
  color: rgba(245, 240, 232, 0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════
   WELCOME PAGE
   ══════════════════════════════════════════════════════════ */

.welcome-wrap {
  min-height: 100dvh;
  background: var(--night);
  display: flex;
  flex-direction: column;
}

/* Header strip */
.welcome-header {
  background: linear-gradient(135deg, #0d1a14 0%, #142212 100%);
  border-bottom: 1px solid rgba(138, 171, 127, 0.15);
  padding: 2rem 1.25rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.welcome-logo {
  width: 56px;
  opacity: 0.9;
}

.connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(74, 103, 65, 0.35);
  border: 1px solid rgba(138, 171, 127, 0.3);
  border-radius: 9999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage);
}

.connected-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.welcome-title {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.welcome-prop {
  font-size: 0.8125rem;
  color: rgba(138, 171, 127, 0.75);
  letter-spacing: 0.03em;
}

/* Card grid */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1.25rem;
  flex: 1;
}

.wcard {
  background: #0e1912;
  border: 1px solid rgba(138, 171, 127, 0.13);
  border-radius: 0.875rem;
  padding: 1.25rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  transition: background 160ms, border-color 160ms, transform 80ms;
  text-decoration: none;
  color: inherit;
}
.wcard:active   { transform: scale(0.97); }
.wcard:hover    { background: #111f17; border-color: rgba(138,171,127,0.25); }

.wcard-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--copper);
}
.wcard-icon svg { width: 1.35rem; height: 1.35rem; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.wcard-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}

.wcard-sub {
  font-size: 0.75rem;
  color: rgba(138, 171, 127, 0.7);
  line-height: 1.4;
}

/* Welcome footer */
.welcome-footer {
  padding: 1.25rem;
  text-align: center;
  border-top: 1px solid rgba(138, 171, 127, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.welcome-footer-ig {
  font-size: 0.8125rem;
  color: rgba(138, 171, 127, 0.75);
  font-weight: 500;
}
.welcome-footer-ig a { color: var(--sage); }
.welcome-footer-ig a:hover { color: var(--cream); }

.welcome-footer-legal {
  font-size: 0.7rem;
  color: rgba(245, 240, 232, 0.3);
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.welcome-footer-legal a {
  color: rgba(245, 240, 232, 0.4);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════
   ADMIN PAGE
   ══════════════════════════════════════════════════════════ */

.admin-wrap {
  min-height: 100vh;
  background: var(--night);
  color: var(--cream);
  font-family: inherit;
  padding: 2rem 1.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
}

.admin-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--field-border);
  font-size: 0.8125rem;
  cursor: pointer;
  color: rgba(245,240,232,0.7);
  background: transparent;
  font-family: inherit;
  transition: background 140ms, border-color 140ms;
  text-decoration: none;
}
.admin-pill:hover,
.admin-pill.active {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--cream);
}

.admin-csv {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--copper);
  color: var(--night);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 140ms;
}
.admin-csv:hover { background: var(--copper-d); }

.admin-count {
  font-size: 0.8125rem;
  color: rgba(138,171,127,0.7);
  margin-bottom: 0.75rem;
}

.admin-table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

thead th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(138,171,127,0.2);
  color: rgba(138,171,127,0.8);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid rgba(138,171,127,0.07); }
tbody tr:hover { background: rgba(30,58,47,0.15); }

tbody td {
  padding: 0.6rem 0.75rem;
  color: rgba(245,240,232,0.8);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-wpb   { background: rgba(74,103,65,0.3);  color: var(--sage);  border: 1px solid rgba(74,103,65,0.4); }
.badge-miami { background: rgba(193,127,62,0.2);  color: var(--copper); border: 1px solid rgba(193,127,62,0.35); }
.badge-yes   { background: rgba(74,103,65,0.25);  color: #9ecf93; border: 1px solid rgba(74,103,65,0.35); }
.badge-no    { background: rgba(224,112,112,0.15); color: #e09090; border: 1px solid rgba(224,112,112,0.3); }

.admin-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(245,240,232,0.35);
  font-size: 0.9rem;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (min-width: 480px) {
  .splash-headline { font-size: 1.85rem; }
  .welcome-grid    { gap: 1rem; padding: 1.5rem; }
  .wcard           { padding: 1.4rem 1.25rem 1.25rem; }
  .wcard-title     { font-size: 0.95rem; }
  .wcard-sub       { font-size: 0.78rem; }
}

@media (min-width: 640px) {
  .welcome-grid { grid-template-columns: repeat(3, 1fr); }
}
