/* ============================================================
   Neotribe — Design System
   Futuriste · Minimaliste · Coloré
   ============================================================ */

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

:root {
  /* Brand */
  --mint: #A8D8D8;
  --mint-dark: #7EC8C8;
  --mint-deep: #5BB5B5;
  --mint-light: #D4EDED;
  --mint-ghost: #F0FAFA;

  /* Affinity colors */
  --blue: #0984E3;
  --green: #00B894;
  --pink: #E84393;
  --orange: #F39C12;
  --gold: #FDCB6E;
  --violet: #6C5CE7;
  --cyan: #00CECE;
  --coral: #FF6B6B;

  /* Neutrals */
  --black: #1A1A2E;
  --gray-900: #2D2D44;
  --gray-700: #4A4A6A;
  --gray-500: #8888A8;
  --gray-300: #C4C4D4;
  --gray-100: #ECECF2;
  --white: #FAFCFC;
  --pure-white: #FFFFFF;

  /* Semantic aliases */
  --text: var(--black);
  --sub: var(--gray-500);
  --mint-dim: var(--mint-light);

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26,26,46,0.06);
  --shadow-md: 0 4px 12px rgba(26,26,46,0.08);
  --shadow-lg: 0 8px 24px rgba(26,26,46,0.10);
  --shadow-mint: 0 4px 16px rgba(168,216,216,0.3);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms var(--ease);
  --t-normal: 200ms var(--ease);
  --t-slow: 300ms var(--ease);
}

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

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  transition: background var(--t-slow);
}

*, *::before, *::after {
  transition-timing-function: var(--ease);
}

a { color: var(--mint-deep); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--mint-dark); }

/* ============================================================
   Typography
   ============================================================ */
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
p { font-size: 0.938rem; line-height: 1.6; color: var(--gray-700); }
small { font-size: 0.813rem; color: var(--gray-500); }

/* ============================================================
   Header
   ============================================================ */
.nt-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  min-height: 52px;
}

.nt-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--black);
  line-height: 1;
}
.nt-logo-icon {
  width: 32px; height: 32px; position: relative; flex-shrink: 0;
}
.nt-logo-icon svg { width: 100%; height: 100%; }
.nt-logo-text {
  display: flex; flex-direction: column;
}
.nt-logo-name {
  font-size: 20px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A8D8D8;
  -webkit-text-fill-color: #A8D8D8;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
.nt-logo-tagline {
  font-size: 10px; font-weight: 400; letter-spacing: 0.02em;
  color: #86868b; margin-top: 1px;
}

.nt-header-actions {
  display: flex; align-items: center; gap: var(--sp-md);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  font-family: inherit; font-size: 0.875rem; font-weight: 500;
  border: none; border-radius: var(--r-full); cursor: pointer;
  transition: all var(--t-normal);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--mint-deep), var(--mint));
  color: var(--pure-white);
  box-shadow: var(--shadow-mint);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(168,216,216,0.4);
}
.btn-secondary {
  background: var(--pure-white);
  color: var(--black);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--mint); background: var(--mint-ghost); }

.btn-ghost {
  background: transparent; color: var(--gray-700);
  padding: var(--sp-sm) var(--sp-md);
}
.btn-ghost:hover { color: var(--mint-deep); background: var(--mint-ghost); }

.btn-lg { padding: 14px 32px; font-size: 1rem; font-weight: 600; }
.btn-sm { padding: 6px 16px; font-size: 0.813rem; }

.btn-whatsapp {
  background: #25D366;
  color: var(--pure-white);
  box-shadow: 0 4px 16px rgba(37,211,102,0.25);
}
.btn-whatsapp:hover {
  background: #1EBE57;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.35);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--pure-white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  transition: all var(--t-normal);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--mint-light); }

.card-mint {
  background: linear-gradient(135deg, var(--mint-ghost), var(--pure-white));
  border-color: var(--mint-light);
}

/* ============================================================
   Inputs
   ============================================================ */
.input {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit; font-size: 0.938rem;
  color: var(--black);
  background: var(--pure-white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(168,216,216,0.2);
}
.input::placeholder { color: var(--gray-300); }

.label {
  display: block;
  font-size: 0.813rem; font-weight: 500; color: var(--gray-700);
  margin-bottom: var(--sp-xs);
}

/* ============================================================
   Pills / Chips
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px;
  font-size: 0.75rem; font-weight: 500;
  border-radius: var(--r-full);
  background: var(--mint-ghost);
  color: var(--mint-deep);
  border: 1px solid var(--mint-light);
}
.pill-blue { background: #E8F4FD; color: var(--blue); border-color: #C4E0F4; }
.pill-green { background: #E6F9F3; color: var(--green); border-color: #B8EDD8; }
.pill-pink { background: #FDE8F3; color: var(--pink); border-color: #F4C0DB; }
.pill-orange { background: #FEF3E0; color: var(--orange); border-color: #F4D9A8; }
.pill-gold { background: #FEF9E7; color: #B7950B; border-color: #F4E8A8; }
.pill-violet { background: #EDEBFD; color: var(--violet); border-color: #D0CBF4; }

/* ============================================================
   Bottom Nav
   ============================================================ */
.nt-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-around;
  padding: var(--sp-sm) 0 calc(var(--sp-sm) + env(safe-area-inset-bottom, 0px));
  background: rgba(250,252,252,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--gray-100);
}

.nt-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 0.625rem; font-weight: 500; color: var(--gray-500);
  text-decoration: none; transition: color var(--t-fast);
  padding: var(--sp-xs) var(--sp-sm);
}
.nt-nav a.active { color: var(--mint-deep); }
.nt-nav a:hover { color: var(--mint-dark); }

.nt-nav svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nt-nav a.active svg { stroke: var(--mint-deep); }

/* ============================================================
   Page container
   ============================================================ */
.nt-page {
  max-width: 600px; margin: 0 auto;
  padding: var(--sp-lg) var(--sp-md) calc(80px + var(--sp-lg));
}

.nt-page-wide { max-width: 960px; }

/* ============================================================
   Affinity bars
   ============================================================ */
.affinity-bar {
  height: 6px; border-radius: 3px; background: var(--gray-100);
  overflow: hidden;
}
.affinity-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width var(--t-slow);
}

/* ============================================================
   Avatar
   ============================================================ */
.avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 600;
  background: linear-gradient(135deg, var(--mint), var(--mint-light));
  color: var(--pure-white);
  flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.75rem; }

/* ============================================================
   Utilities
   ============================================================ */
.text-center { text-align: center; }
.text-mint { color: var(--mint-deep); }
.text-gray { color: var(--gray-500); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.w-full { width: 100%; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fadeUp { animation: fadeUp 0.4s var(--ease) both; }
.animate-fadeIn { animation: fadeIn 0.3s var(--ease) both; }

/* Stagger children */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(7) { animation-delay: 360ms; }
.stagger > *:nth-child(8) { animation-delay: 420ms; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================================
   Auth pages (login / signup)
   ============================================================ */
@keyframes bgShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #f0fafa 0%, #e4f4f4 30%, #f8fffe 60%, #e8f6f6 100%);
  background-size: 300% 300%;
  animation: bgShift 12s ease infinite;
}

.auth-card {
  background: var(--pure-white);
  border-radius: var(--r-xl);
  padding: 44px 40px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 32px rgba(91, 181, 181, 0.10), 0 1px 4px rgba(0,0,0,0.04);
  animation: fadeUp 0.5s var(--ease) both;
}

.auth-logo {
  text-align: center;
  margin-bottom: 4px;
}
.auth-logo a {
  text-decoration: none;
  display: inline-block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--mint) 0%, var(--mint-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.auth-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--sub);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
}
.auth-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

/* OAuth buttons */
.oauth-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 13px 20px;
  border-radius: 14px;
  border: 1.5px solid var(--gray-100);
  background: var(--pure-white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.oauth-btn:hover {
  border-color: var(--mint);
  background: var(--mint-ghost);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 216, 216, 0.22);
}
.oauth-btn svg { flex-shrink: 0; }

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: var(--gray-100);
}
.divider-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-300);
  white-space: nowrap;
}

/* Auth form fields */
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 7px;
}
.field .input {
  background: var(--mint-ghost);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--r-md);
}
.field .input:focus {
  border-color: var(--mint-deep);
  background: var(--pure-white);
  box-shadow: 0 0 0 3px rgba(91, 181, 181, 0.13);
}

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 18px;
  margin-bottom: 4px;
}
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; min-width: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--gray-100);
  border-radius: 5px;
  background: var(--mint-ghost);
  accent-color: var(--mint-deep);
  cursor: pointer;
}
.checkbox-row label {
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1.45;
}
.checkbox-row label a { color: var(--mint-deep); font-weight: 600; }
.checkbox-row label a:hover { color: var(--mint-dark); }

/* Error */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #c53030;
  line-height: 1.45;
}
.auth-error svg { flex-shrink: 0; margin-top: 1px; }

/* Trial note */
.trial-note {
  text-align: center;
  margin-top: 11px;
  font-size: 12px;
  color: var(--gray-300);
  letter-spacing: 0.01em;
}

/* Switch link */
.auth-switch {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--sub);
}
.auth-switch a {
  color: var(--mint-deep);
  font-weight: 600;
}
.auth-switch a:hover { color: var(--mint-dark); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .nt-page { padding: var(--sp-md) var(--sp-md) calc(80px + var(--sp-md)); }
  .btn-lg { padding: 12px 24px; font-size: 0.938rem; }
  .auth-card { padding: 32px 24px 28px; border-radius: 20px; }
  .auth-logo a { font-size: 26px; }
  .auth-tagline { margin-bottom: 24px; }
}
