/**
 * FIA — Shared stylesheet for ChatBoy
 * Contains all universal FIA design system elements:
 * palette, typography, page background, header, buttons, forms, cards.
 * Page-specific styling lives in each page's own <style> block.
 */

:root {
  --charcoal: #454545;
  --light-grey: #E0E0E0;
  --red: #E42638;
  --orange: #EB7F36;
  --lime: #B2BF56;
  --teal: #65AC90;
  --blue: #4C85AE;
  --purple: #A05EC2;
  --pink: #E487B7;
  --black: #000000;
  --page-bg: #FAF8F5;
  --card-bg: #FFFFFF;
}

/* ============================================
   RESET AND BASE
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-size: 20px;
  line-height: 1.55;
  color: var(--black);
  background: var(--page-bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: var(--black);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ============================================
   PAGE BACKGROUND BLOBS
   Universal FIA background: soft blobs
   drifting behind all content.
   ============================================ */
.page-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.page-blobs .pblob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.pblob-1 {
  width: 500px;
  height: 500px;
  background: var(--pink);
  top: -120px;
  right: -100px;
  opacity: 0.30;
}
.pblob-2 {
  width: 420px;
  height: 420px;
  background: var(--orange);
  top: 30%;
  left: -140px;
  opacity: 0.25;
}
.pblob-3 {
  width: 360px;
  height: 360px;
  background: var(--lime);
  bottom: 10%;
  right: -80px;
  opacity: 0.22;
}
.pblob-4 {
  width: 320px;
  height: 320px;
  background: var(--purple);
  bottom: -80px;
  left: 20%;
  opacity: 0.18;
}

/* ============================================
   LAYOUT — WRAP CONTAINER
   ============================================ */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 32px 80px;
  position: relative;
  z-index: 1;
}

/* Utility: Eyebrow labels */
.eyebrow {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink);
}

/* ============================================
   SITE HEADER
   Brand mark left, optional nav center, FIA tag right.
   ============================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 40px;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--black);
}
.chatboy-logo {
  height: 60px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Optional nav (only shown on logged-in app pages) */
.site-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.site-nav a {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--black);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.site-nav a:hover { border-color: var(--pink); }
.site-nav a.active { border-color: var(--pink); }
.site-nav .nav-logout { color: var(--black); font-weight: 500; }
.site-nav .nav-logout:hover { color: var(--red); border-color: transparent; }

/* FIA tag on the right of every page */
.fia-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.fia-tag-logo {
  height: 40px;
  width: auto;
  display: block;
}
.fia-tag-text {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: var(--black);
  line-height: 1.3;
  text-align: right;
  max-width: 180px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: var(--black);
  box-shadow: 0 4px 14px rgba(228, 135, 183, 0.4);
  font-size: 16px;
  padding: 16px 22px;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(235, 127, 54, 0.5);
}
.btn-secondary {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn-secondary:hover {
  background: var(--black);
  color: var(--card-bg);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   FORM FIELDS
   ============================================ */
.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--black);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--light-grey);
  border-radius: 12px;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--black);
  background: var(--card-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 20%, transparent);
}

/* ============================================
   MESSAGES
   ============================================ */
.message-ok, .message-err {
  padding: 12px 14px;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 14px;
  margin: 12px 0;
}
.message-ok {
  background: color-mix(in srgb, var(--teal) 15%, white);
  border: 1px solid color-mix(in srgb, var(--teal) 35%, white);
  color: color-mix(in srgb, var(--teal) 80%, black);
}
.message-err {
  background: color-mix(in srgb, var(--red) 12%, white);
  border: 1px solid color-mix(in srgb, var(--red) 30%, white);
  color: color-mix(in srgb, var(--red) 80%, black);
}

/* ============================================
   CARDS
   Standard white card container.
   Page-specific card variants extend this.
   ============================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--light-grey);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(69, 69, 69, 0.08);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 700px) {
  .wrap {
    padding: 20px 20px 60px;
  }
  .site-header {
    padding-bottom: 24px;
  }
  .btn {
    min-width: auto;
  }
  body {
    font-size: 18px;
  }
}
