/* Traffic Bot — refined editorial-tech light theme.
   Shared by index.php (via header.php) and login.php. */

:root {
  --paper:        #FBFBF8;
  --paper-2:      #F4F4EF;
  --card:         #FFFFFF;
  --ink:          #1A1A17;
  --muted:        #6C6C63;
  --faint:        #9A9A8F;
  --line:         #E9E8E0;
  --line-strong:  #DCDBD1;
  --accent:       #0E7C6B;
  --accent-deep:  #0B5F52;
  --accent-bright:#14B8A6;
  --accent-soft:  rgba(20, 184, 166, 0.12);
  --ok-bg:        rgba(20, 184, 166, 0.10);
  --ok-fg:        #0B6657;
  --ok-line:      rgba(20, 184, 166, 0.32);
  --err-bg:       rgba(225, 76, 96, 0.08);
  --err-fg:       #B23047;
  --err-line:     rgba(225, 76, 96, 0.26);
  --r-card:       22px;
  --r-field:      13px;
  --shadow-card:
    0 1px 2px rgba(26, 26, 23, 0.04),
    0 6px 14px -8px rgba(26, 26, 23, 0.10),
    0 22px 48px -20px rgba(26, 26, 23, 0.16);
  --shadow-btn:   0 10px 22px -10px rgba(11, 95, 82, 0.65);
  --shadow-btn-h: 0 16px 30px -10px rgba(11, 95, 82, 0.72);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--paper);
  background-image:
    radial-gradient(58rem 58rem at 8% -12%, rgba(20, 184, 166, 0.13), transparent 60%),
    radial-gradient(46rem 46rem at 104% 2%, rgba(99, 102, 241, 0.07), transparent 56%),
    radial-gradient(40rem 40rem at 50% 118%, rgba(20, 184, 166, 0.06), transparent 60%);
  background-attachment: fixed;
}

/* Fine grain overlay for paper texture. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.38;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* ---------- Top navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 248, 0.72);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 64rem;
  margin: 0 auto;
  height: 64px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(160deg, var(--accent-bright), var(--accent-deep));
  box-shadow: 0 6px 14px -6px rgba(11, 95, 82, 0.6);
}
.brand-mark svg { display: block; }
.nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  border-radius: 9px;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--ink); background: var(--paper-2); }

/* ---------- Centering shell ---------- */
.shell {
  min-height: calc(100dvh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 3.5rem;
}
.shell--bare { min-height: 100dvh; }

/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 27rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 2.1rem 2rem 2rem;
}
.card-head { margin-bottom: 1.6rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
.title {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.85rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 1.15rem; }
.field-group { display: flex; flex-direction: column; gap: 0.42rem; }
.label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.field {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  padding: 0.74rem 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.field::placeholder { color: var(--faint); }
.field:hover { border-color: #CFCEC3; }
.field:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
select.field {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236C6C63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

/* ---------- Button ---------- */
.btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: -0.005em;
  color: #fff;
  background: linear-gradient(180deg, #17A492, var(--accent));
  border: 1px solid var(--accent-deep);
  border-radius: var(--r-field);
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-btn-h); filter: saturate(1.06) brightness(1.02); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-btn); }
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.btn:disabled { cursor: progress; filter: saturate(0.7) opacity(0.8); transform: none; box-shadow: var(--shadow-btn); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn:disabled .arrow { display: none; }

.foot-link {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--faint);
}

/* ---------- Alert (success / error) ---------- */
.alert {
  display: none;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 1.15rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--r-field);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}
.alert.is-visible { display: flex; animation: rise 0.4s ease both; }
.alert svg { flex: none; margin-top: 1px; }
.alert-ok  { background: var(--ok-bg);  color: var(--ok-fg);  border: 1px solid var(--ok-line); }
.alert-err { background: var(--err-bg); color: var(--err-fg); border: 1px solid var(--err-line); }

/* ---------- Motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50%      { box-shadow: 0 0 0 5px rgba(20, 184, 166, 0.04); }
}
.reveal { opacity: 0; animation: rise 0.62s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.r1 { animation-delay: 0.04s; }
.r2 { animation-delay: 0.10s; }
.r3 { animation-delay: 0.16s; }
.r4 { animation-delay: 0.22s; }
.r5 { animation-delay: 0.28s; }
.r6 { animation-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .alert.is-visible { animation: none; }
  .reveal { opacity: 1; }
  .eyebrow .dot { animation: none; }
  .btn, .field, .nav-link { transition: none; }
}

@media (max-width: 480px) {
  .card { padding: 1.6rem 1.35rem; border-radius: 18px; }
  .title { font-size: 1.6rem; }
  .nav-inner { padding: 0 1rem; }
}
