/* ==========================================================================
   auth-v26.css - V26 skin for the login and signup pages
   --------------------------------------------------------------------------
   EVERY rule is scoped to body[data-skin="v26"], which the server stamps only
   when WORKSPACE_V26_ENABLED is on AND the hostname's tenant opts in
   (see workspaceEnabled() in src/routes/gnpt.pages.js). PillaiCenter, the
   Dr Pillai mobile-app host, and every flag-off deployment are untouched.

   No markup or script changes: the split layout is built by turning the
   existing .container into a two-column grid and placing .chat-intro in the
   first column. That keeps login.js, the SSO bootstrap and the PWA install
   button working exactly as they do today.

   Light only. The V26 auth design has no dark variant, so the rules below
   also neutralise the page's own .dark-theme class.
   ========================================================================== */

body[data-skin="v26"] {
  --a-forest: #073d32;
  --a-dark-forest: #042a24;
  --a-cream: #fbf7ee;
  --a-paper: #fffdf8;
  --a-gold: #d6a84b;
  --a-gold-dark: #9b6c19;
  --a-ink: #182a25;
  --a-muted: #65736d;
  --a-line: #ded6c7;
  --a-sage: #e7efe7;
  /* Newsreader, as the workspace (loaded by login.html), then Georgia. */
  --a-serif: Newsreader, Georgia, "Times New Roman", serif;
  --a-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  margin: 0;
  min-height: 100vh;
  background: var(--a-cream);
  color: var(--a-ink);
  font-family: var(--a-sans);
}

/* The page ships a dark-theme class; this design is light only. */
body[data-skin="v26"].dark-theme {
  background: var(--a-cream);
  color: var(--a-ink);
}

body[data-skin="v26"] .login-center-wrapper {
  display: block;
  min-height: 100vh;
  padding: 0;
  background: var(--a-cream);
}

/* --------------------------------------------------------------------------
   The split. .chat-intro is the forest panel in column one; every other child
   of .container stacks in column two, in source order.
   -------------------------------------------------------------------------- */
body[data-skin="v26"] .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

body[data-skin="v26"] .container > * {
  min-width: 0;
}

/* -- Brand panel -------------------------------------------------------- */
body[data-skin="v26"] .chat-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 2.25rem 1.5rem;
  background: var(--a-forest);
  color: #f4efe2;
  text-align: left;
}

/* auth.css centres these; the V26 panel is left-aligned like the workspace. */
body[data-skin="v26"] .chat-intro > * {
  text-align: left;
  align-self: flex-start;
  margin-left: 0;
  margin-right: 0;
}

body[data-skin="v26"] .chat-intro .avatar {
  width: 54px;
  height: 54px;
  margin: 0 0 0.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--a-gold);
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
}

body[data-skin="v26"] .chat-intro .avatar img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

body[data-skin="v26"] .chat-intro .title {
  font-family: var(--a-serif);
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #ffffff;
}

body[data-skin="v26"] .chat-intro .author {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--a-gold);
}

body[data-skin="v26"] .chat-intro .subtitle {
  max-width: 26rem;
  margin-top: 0.6rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #cddcd6;
}

/* The product tagline (owner, 2026-10-08: "Know Your Time. Navigate Your
   Life."), under the subtitle: the line a new customer remembers. */
body[data-skin="v26"] .chat-intro .tagline {
  max-width: 26rem;
  margin-top: 1rem;
  font-family: var(--a-serif);
  font-size: 1.15rem;
  line-height: 1.35;
  color: #ffffff;
}

/* -- The story panel (owner, 2026-10-08, panel A; refined 2026-10-09) ---
   login.html builds it when the product brand is sent: the brand header at
   the top, the story in the middle. 2026-10-09: the white-disc logo, the
   tinted icon tiles and the footer went ("not good and unprofessional"); the
   panel now fits a 1366x768 laptop without scrolling. */
body[data-skin="v26"] .chat-intro.has-story {
  position: relative;
  overflow: hidden;
  gap: 2rem;
}
/* Depth, not decoration: a warm gold glow, low right. */
body[data-skin="v26"] .chat-intro.has-story::before {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 168, 75, 0.12), rgba(214, 168, 75, 0) 65%);
  pointer-events: none;
}
body[data-skin="v26"] .chat-intro.has-story > * { position: relative; }
body[data-skin="v26"] .chat-intro.has-story .rt-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
/* The gold mark itself: no disc, no ring (the disc read as a profile photo). */
body[data-skin="v26"] .chat-intro.has-story .avatar {
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
}
body[data-skin="v26"] .chat-intro.has-story .avatar img {
  display: block;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  object-fit: contain;
  background: none;
  box-shadow: none; /* auth.css frames the classic photo logo */
}
body[data-skin="v26"] .chat-intro.has-story .rt-lockup .title {
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.01em;
}
body[data-skin="v26"] .chat-intro.has-story .rt-lockup .author {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}
/* "Your Personal AI Vedic Astrologer": the line that says what it is (and
   keeps the AI visible), above the headline. */
body[data-skin="v26"] .rt-eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a9c4bb;
}
body[data-skin="v26"] .rt-headline {
  margin: 0 0 1.1rem;
  font-family: var(--a-serif);
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: #ffffff;
}
body[data-skin="v26"] .rt-headline span { display: block; }
body[data-skin="v26"] .rt-lead {
  max-width: 28rem;
  margin: 0 0 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #cddcd6;
}
body[data-skin="v26"] .rt-benefits {
  display: grid;
  gap: 1.1rem;
  max-width: 28rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
body[data-skin="v26"] .rt-benefits li { display: flex; align-items: flex-start; gap: 0.8rem; }
/* A plain gold line icon, aligned to the title's first line - no tile. */
body[data-skin="v26"] .rt-ico {
  flex: 0 0 auto;
  display: block;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
body[data-skin="v26"] .rt-ico svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--a-gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-skin="v26"] .rt-benefits b { display: block; margin-bottom: 0.15rem; font-size: 0.95rem; font-weight: 600; color: #ffffff; }
body[data-skin="v26"] .rt-benefits span span { font-size: 0.88rem; line-height: 1.5; color: #b9cdc6; }
/* Phones: the brand header, the AI line and the headline above the form; the
   rest would push sign-in below the fold. */
@media (max-width: 799px) {
  body[data-skin="v26"] .rt-lead, body[data-skin="v26"] .rt-benefits { display: none; }
  body[data-skin="v26"] .rt-headline { margin: 0; font-size: 1.75rem; }
  body[data-skin="v26"] .rt-eyebrow { margin-bottom: 0.6rem; }
}
/* -- Form side ---------------------------------------------------------- */
body[data-skin="v26"] .welcome-text {
  margin: 2rem 1.25rem 0;
  font-family: var(--a-serif);
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--a-ink);
}

body[data-skin="v26"] #loginForm,
body[data-skin="v26"] #signupForm {
  margin: 1rem 1.25rem 0;
  padding: 1.35rem;
  border: 1px solid var(--a-line);
  border-top: 4px solid var(--a-gold);
  border-radius: 12px;
  background: var(--a-paper);
  box-shadow: 0 20px 55px rgba(33, 48, 42, 0.13), 0 3px 10px rgba(33, 48, 42, 0.05);
}

body[data-skin="v26"] .form-control {
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--a-line);
  border-radius: 5px;
  background: var(--a-paper);
  color: var(--a-ink);
  font-family: var(--a-sans);
  font-size: 1rem;
}

body[data-skin="v26"] .form-control::placeholder {
  color: var(--a-muted);
}

body[data-skin="v26"] .form-control:focus {
  border-color: var(--a-gold);
  outline: 2px solid rgba(214, 168, 75, 0.35);
  outline-offset: 1px;
  box-shadow: none;
}

body[data-skin="v26"] .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

body[data-skin="v26"] #togglePassword {
  border: 1px solid var(--a-line);
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: var(--a-paper);
  color: var(--a-muted);
}

body[data-skin="v26"] #loginBtn,
body[data-skin="v26"] #signupBtn,
body[data-skin="v26"] .btn-success {
  min-height: 3rem;
  border: 1px solid var(--a-gold);
  border-radius: 5px;
  background: var(--a-gold);
  color: #17342b;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-skin="v26"] #loginBtn:hover,
body[data-skin="v26"] #signupBtn:hover,
body[data-skin="v26"] .btn-success:hover {
  background: #c99a3d;
  border-color: #c99a3d;
  color: #17342b;
}

body[data-skin="v26"] #pwaInstallBtn,
body[data-skin="v26"] .btn-primary {
  margin: 0.75rem 1.25rem 0;
  min-height: 2.75rem;
  border: 1px solid var(--a-line);
  border-radius: 5px;
  background: transparent;
  color: var(--a-forest);
  font-weight: 600;
}

/* Logged-out and session-expired notices. login.js already writes into
   #errorMsg and swaps text-danger for text-muted when the redirect carried
   reason=session_expired, so the two tones are styled here and nothing about
   that behaviour changes. */
body[data-skin="v26"] #errorMsg {
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

body[data-skin="v26"] #errorMsg:not(:empty) {
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--a-gold);
  border-radius: 5px;
  background: var(--a-sage);
}

body[data-skin="v26"] #errorMsg.text-danger:not(:empty) {
  border-left-color: #743b42;
  background: #f6ecec;
  color: #743b42 !important;
}

body[data-skin="v26"] #errorMsg.text-muted:not(:empty) {
  color: var(--a-ink) !important;
}

body[data-skin="v26"] #forgotPasswordRow,
body[data-skin="v26"] #signupRow,
body[data-skin="v26"] #loginRow {
  margin: 0.9rem 1.25rem 0 !important;
  color: var(--a-muted) !important;
  font-size: 0.86rem !important;
  text-align: center;
}

body[data-skin="v26"] #forgotPasswordRow a,
body[data-skin="v26"] #signupRow a,
body[data-skin="v26"] #loginRow a {
  color: var(--a-gold-dark) !important;
  font-weight: 600;
  text-decoration: underline;
}

/* AstroVed has no self-serve signup: /gnpt/signup redirects to /gnpt/login,
   so the invitation would be a dead end. */
body[data-skin="v26"] #signupRow {
  display: none;
}

body[data-skin="v26"] .container > *:last-child {
  margin-bottom: 2rem;
}

/* === Desktop: two columns ==============================================
   The full-height forest panel is PAINTED ON THE WRAPPER rather than sized by
   the grid. Making .chat-intro span every implicit row is fragile: the row
   track heights are driven by the form column, so the panel either fell short
   of the viewport or stretched the page past it. A half-and-half background
   is exact at any content height, and .chat-intro then only has to centre its
   own text inside column one.
   -------------------------------------------------------------------------- */
@media (min-width: 800px) {
  body[data-skin="v26"] .login-center-wrapper {
    background: linear-gradient(
      to right,
      var(--a-forest) 0,
      var(--a-forest) 50%,
      var(--a-cream) 50%,
      var(--a-cream) 100%
    );
  }

  body[data-skin="v26"] .container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: center;
    grid-auto-rows: min-content;
    padding-block: 3rem;
  }

  body[data-skin="v26"] .chat-intro {
    grid-column: 1;
    grid-row: 1 / span 30; /* every implicit row the form column creates */
    align-self: center;
    padding: 0 3rem;
    background: none; /* the wrapper paints it, full height */
  }

  /* The story panel fills the column's height: header at the top, story in
     the middle, promise at the bottom (the container pads 3rem each side). */
  body[data-skin="v26"] .chat-intro.has-story {
    align-self: stretch;
    min-height: calc(100vh - 6rem);
    justify-content: space-between;
    padding: 0 3.25rem;
  }

  body[data-skin="v26"] .container > *:not(.chat-intro) {
    grid-column: 2;
    max-width: 24rem;
    width: 100%;
    justify-self: center;
  }

  body[data-skin="v26"] .welcome-text {
    margin: 0 0 0.25rem;
    text-align: left;
  }

  body[data-skin="v26"] .container > *:last-child {
    margin-bottom: 0;
  }
}

/* === Small phones ====================================================== */
@media (max-width: 480px) {
  body[data-skin="v26"] .chat-intro {
    padding: 1.75rem 1.1rem;
  }
  body[data-skin="v26"] .welcome-text,
  body[data-skin="v26"] #loginForm,
  body[data-skin="v26"] #signupForm,
  body[data-skin="v26"] #forgotPasswordRow,
  body[data-skin="v26"] #signupRow,
  body[data-skin="v26"] #pwaInstallBtn {
    margin-left: 0.9rem;
    margin-right: 0.9rem;
  }
  /* Full width PLUS those margins ran 7px past a 390px screen and the page
     scrolled sideways (bootstrap's .w-100 is width:100% !important). */
  body[data-skin="v26"] #loginForm,
  body[data-skin="v26"] #signupForm,
  body[data-skin="v26"] #pwaInstallBtn {
    width: auto !important;
  }
}

/* ==========================================================================
   The refined split (owner, 2026-10-09: "the logo, design, formatting and
   presentation is not good and unprofessional"). login.js-safe: login.html
   only moves the form-side elements into .rt-form and marks the container
   .rt-split; every id and handler is unchanged. Without the product brand
   (no .rt-split) the rules above still lay the page out.
   ========================================================================== */
/* Phones: the panel, then the form, packed at the top. */
body[data-skin="v26"] .container.rt-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  min-height: 100vh;
  padding: 0;
}
body[data-skin="v26"] .rt-split .chat-intro {
  align-self: stretch;
  background: var(--a-forest);
}
body[data-skin="v26"] .rt-form {
  width: 100%;
  max-width: 25rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}
/* The children's own side margins (from the fallback rules) give way to the
   column's padding. */
body[data-skin="v26"] .rt-form > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* -- Heading: a plain "Sign in", not a sentence ------------------------- */
body[data-skin="v26"] .rt-form .welcome-text {
  margin: 0 0 1.75rem;
  font-family: var(--a-sans);
  font-size: 1rem;
}
body[data-skin="v26"] .rt-signin-title {
  margin: 0;
  font-family: var(--a-serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--a-ink);
}
body[data-skin="v26"] .rt-signin-sub {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--a-muted);
}

/* -- The form: no card, labelled fields --------------------------------- */
body[data-skin="v26"] .rt-form,
body[data-skin="v26"] .rt-form #loginForm {
  text-align: left; /* auth.css centres the classic page */
}
body[data-skin="v26"] .rt-form #loginForm > * { align-self: stretch; }
body[data-skin="v26"] .rt-form #loginForm {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
/* The labels the classic page hides (bootstrap .visually-hidden is all
   !important, so these must be too). */
body[data-skin="v26"] .rt-form #loginForm label.visually-hidden {
  position: static !important;
  display: block;
  width: auto !important;
  height: auto !important;
  margin: 0 0 0.4rem !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--a-ink);
}
body[data-skin="v26"] .rt-form #email { margin-bottom: 1.1rem !important; }
body[data-skin="v26"] .rt-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
body[data-skin="v26"] .rt-label-row a {
  display: inline-block;
  margin-bottom: 0.15rem;
  padding: 0.25rem 0; /* a 24px+ tap target (WCAG 2.5.8) */
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--a-forest) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Field edge at 3:1 on the paper (as the workspace question box). */
body[data-skin="v26"] .rt-form .form-control {
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #7a8a82;
  border-radius: 8px !important;
  background: #ffffff;
  color: var(--a-ink);
  font-size: 1rem;
}
body[data-skin="v26"] .rt-form .form-control:focus {
  border-color: var(--a-forest);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(7, 61, 50, 0.18);
}
/* Chrome's autofill paints the field pale blue; keep it white. */
body[data-skin="v26"] .rt-form .form-control:-webkit-autofill,
body[data-skin="v26"] .rt-form .form-control:-webkit-autofill:hover,
body[data-skin="v26"] .rt-form .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: var(--a-ink);
  caret-color: var(--a-ink);
}
body[data-skin="v26"] .rt-form .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(7, 61, 50, 0.18);
}
/* The eye sits inside the field, not in a box of its own. */
body[data-skin="v26"] .rt-form .input-group { position: relative; margin-bottom: 0 !important; }
body[data-skin="v26"] .rt-form #password { padding-right: 3.25rem; }
body[data-skin="v26"] .rt-form #togglePassword {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--a-muted);
}
body[data-skin="v26"] .rt-form #togglePassword:hover { color: var(--a-ink); background: transparent; }
body[data-skin="v26"] .rt-form #togglePassword:focus-visible { outline: 2px solid var(--a-forest); outline-offset: -4px; box-shadow: none; }
body[data-skin="v26"] .rt-form #togglePassword .material-icons { font-size: 20px; }

body[data-skin="v26"] .rt-form #errorMsg { margin: 0.9rem 0 0 !important; }
body[data-skin="v26"] .rt-form #errorMsg:empty { margin: 0 !important; }

/* Log in: the product's primary colour (Ask is forest too), one gold-free
   action on the page. */
body[data-skin="v26"] .rt-form #loginBtn {
  margin-top: 1.5rem;
  min-height: 3rem;
  border: 1px solid var(--a-forest);
  border-radius: 8px;
  background: var(--a-forest);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}
body[data-skin="v26"] .rt-form #loginBtn:hover { border-color: var(--a-dark-forest); background: var(--a-dark-forest); color: #ffffff; }
body[data-skin="v26"] .rt-form #loginBtn:focus-visible { outline: 3px solid rgba(214, 168, 75, 0.7); outline-offset: 2px; box-shadow: none; }
body[data-skin="v26"] .rt-form #loginBtn:disabled { opacity: 0.75; }

/* Install: a quiet link under the form, not a second big button. */
body[data-skin="v26"] .rt-form #pwaInstallBtn {
  /* Full width is safe here (the column zeroes the side margins the 480px
     overflow fix guards against), so the link centres. */
  width: 100% !important;
  margin-top: 1.75rem !important;
  text-align: center;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 0;
  background: none;
  color: var(--a-forest);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body[data-skin="v26"] .rt-form #pwaInstallBtn:hover { background: none; color: var(--a-dark-forest); }
body[data-skin="v26"] .rt-form #pwaInstallBtn .material-icons { font-size: 18px; vertical-align: -4px !important; }

/* Desktop: the panel and the form side by side, each centred in its half. */
@media (min-width: 800px) {
  body[data-skin="v26"] .login-center-wrapper:has(.rt-split) { background: var(--a-cream); }
  body[data-skin="v26"] .container.rt-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: auto;
    align-content: stretch;
  }
  body[data-skin="v26"] .rt-split .chat-intro.has-story {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    min-height: 100vh;
    justify-content: flex-start;
    padding: 2.75rem clamp(2.5rem, 5vw, 4.5rem);
  }
  /* The story centred in the space under the lockup. */
  body[data-skin="v26"] .rt-split .rt-story { margin-block: auto; padding-bottom: 2.75rem; }
  body[data-skin="v26"] .rt-split .rt-form {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    max-width: 25rem;
    padding: 3rem 0;
  }
  body[data-skin="v26"] .container.rt-split > *:not(.chat-intro) { width: min(25rem, 100% - 4rem); }
}
/* Short desktop windows (800x600): the lead folds so nothing scrolls. */
@media (min-width: 800px) and (max-height: 660px) {
  body[data-skin="v26"] .rt-split .rt-lead { display: none; }
}