/*
 * login.css — TISSA Custom Login Page
 * Additive to main.css. Uses --tissa-* tokens.
 * Extracted from Login.html design export.
 * Typography: Playfair Display (wordmark/greet) · Source Serif 4 (body) · Geist Mono (labels/fine).
 */

.tissa-login-page {
  min-height: 100vh;
  background: var(--tissa-offwhite);
  color: var(--tissa-carbon);
  font-family: var(--font-source-serif);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  position: relative;
  overflow-x: hidden;
}

/* Vertical gold hairline centered */
.tl-hairline {
  position: fixed; top: 0; bottom: 0; left: 50%; width: 1px;
  transform: translateX(-.5px);
  background: linear-gradient(to bottom, transparent 0, rgba(37,38,40,.25) 12%, rgba(37,38,40,.25) 88%, transparent 100%);
  z-index: 0; pointer-events: none;
}

/* Corner captions */
.tl-corner {
  position: fixed; z-index: 0;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--tissa-carbon-muted); letter-spacing: .14em; text-transform: uppercase; line-height: 1.6;
}
.tl-corner.bl { bottom: 24px; left: 28px; }
.tl-corner.br { bottom: 24px; right: 28px; text-align: right; }
.tl-corner b   { color: var(--tissa-carbon); font-weight: 700; }
.tl-corner .tls { display: inline-flex; align-items: center; gap: 6px; }
.tl-corner .tls::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--tissa-green); display: inline-block;
}

/* Card */
.tl-card {
  position: relative; z-index: 2; width: 480px; max-width: 100%;
  background: var(--tissa-white); border: 1px solid var(--tissa-border);
  border-radius: 4px; padding: 60px;
  box-shadow:
    0 1px 2px rgba(37,38,40,.04),
    0 24px 60px -24px rgba(37,38,40,.1),
    0 8px 24px -12px rgba(37,38,40,.05);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .5s ease, box-shadow .5s ease;
}
.tl-card.success { animation: tl-pulse-success 1.4s ease-out forwards; }
@keyframes tl-pulse-success {
  0%  { box-shadow: 0 1px 2px rgba(37,38,40,.04), 0 24px 60px -24px rgba(37,38,40,.1); }
  40% { box-shadow: 0 0 0 3px var(--tissa-accent, #252628), 0 0 0 10px rgba(37,38,40,.08), 0 24px 60px -16px rgba(37,38,40,.3); transform: translateY(-2px); }
  100%{ box-shadow: 0 0 0 0 transparent; opacity: 0; transform: translateY(-8px); }
}

/* Brand seal — replaces the wordmark. Centered inside the card via flex + auto margins. */
.tl-wm {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 4px;
}
.tl-wm img {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto;
}

/* Gold rule */
.tl-rule {
  width: 36px; height: 1px; background: var(--tissa-accent, #252628);
  margin: 20px auto 16px;
}

/* Console label */
.tl-console-lbl {
  text-align: center; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: var(--tissa-carbon-muted); letter-spacing: .3em; text-transform: uppercase;
}

/* Greeting */
.tl-greet {
  text-align: center; font-family: var(--font-playfair); font-style: italic;
  font-weight: 500; font-size: 28px; color: var(--tissa-carbon);
  margin-top: 18px; letter-spacing: -.005em; line-height: 1.1;
}

/* Form */
.tl-form { margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }

.tl-field { display: flex; flex-direction: column; gap: 5px; position: relative; }
.tl-field-row { display: flex; justify-content: space-between; align-items: baseline; }
.tl-field label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  color: var(--tissa-carbon-muted); letter-spacing: .22em; text-transform: uppercase;
}
/* .tl-field .forgot — Forgot-password link removed. Credentials are issued
   by TISSA after first payment, so password-reset self-service is off. */

.tl-field input {
  -webkit-appearance: none; appearance: none;
  background: transparent; border: none;
  border-bottom: 1px solid var(--tissa-carbon);
  height: 48px; padding: 0 2px;
  font-family: var(--font-source-serif); font-size: 16px; font-weight: 400;
  color: var(--tissa-carbon); outline: none;
  transition: border-color .2s, border-width .2s; width: 100%;
}
.tl-field input::placeholder  { color: var(--tissa-carbon-muted); }
.tl-field input:focus         { border-bottom: 2px solid var(--tissa-accent, #252628); padding-bottom: 0; }
.tl-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--tissa-carbon);
  -webkit-box-shadow: 0 0 0 40px var(--tissa-white) inset;
  box-shadow: 0 0 0 40px var(--tissa-white) inset;
  transition: background-color 5000s;
}
.tl-field.error input { border-bottom: 2px solid var(--tissa-red); color: var(--tissa-red); }
.tl-field.error { animation: tl-shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes tl-shake {
  10%,90%{ transform: translateX(-1px); }
  20%,80%{ transform: translateX(2px); }
  30%,50%,70%{ transform: translateX(-4px); }
  40%,60%{ transform: translateX(4px); }
}
.tl-field .err-msg {
  display: none; font-family: var(--font-source-serif); font-style: italic;
  font-size: 13px; color: var(--tissa-red); margin-top: 2px; line-height: 1.4;
}
.tl-field.error .err-msg { display: block; }

/* Primary button — matches site CTA style exactly */
.tl-btn-primary {
  margin-top: 8px; width: 100%; height: 52px;
  background: var(--tissa-carbon); color: #fff;
  border: 1px solid var(--tissa-carbon);
  font-family: var(--font-source-serif); font-size: 13px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; position: relative; transition: background .2s, color .2s;
  overflow: hidden; border-radius: 3px;
}
.tl-btn-primary::after {
  content: ""; position: absolute; left: 50%; bottom: 11px;
  width: 0; height: 1px; background: var(--tissa-accent, #252628);
  transform: translateX(-50%); transition: width .3s cubic-bezier(.2,.8,.2,1);
}
.tl-btn-primary:hover         { background: var(--tissa-carbon-light); }
.tl-btn-primary:hover::after  { width: 68%; }
.tl-btn-primary:active        { transform: translateY(1px); }
.tl-btn-primary.loading       { pointer-events: none; color: transparent; }
.tl-btn-primary.loading::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 1.5px solid rgba(255,255,255,.25);
  border-top-color: var(--tissa-accent, #252628);
  border-radius: 50%; animation: tl-spin .75s linear infinite;
}
.tl-btn-primary.loading::after { display: none; }
@keyframes tl-spin { to { transform: rotate(360deg); } }

/* Separator */
.tl-sep {
  display: flex; align-items: center; gap: 14px; margin: 16px 0 0;
}
.tl-sep::before, .tl-sep::after { content: ""; flex: 1; height: 1px; background: var(--tissa-border); }
.tl-sep span { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--tissa-carbon-muted); letter-spacing: .26em; text-transform: uppercase; }

/* Google button (ghost, matches site secondary button) */
.tl-btn-google {
  width: 100%; height: 52px; background: transparent; color: var(--tissa-carbon);
  border: 1px solid var(--tissa-carbon); border-radius: 3px;
  font-family: var(--font-source-serif); font-size: 13px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: background .2s, color .2s;
}
.tl-btn-google:hover          { background: var(--tissa-carbon); color: #fff; }
.tl-btn-google:hover .g-logo  { filter: brightness(0) invert(1); }
.g-logo { width: 16px; height: 16px; flex-shrink: 0; }

/* Fine print */
.tl-fine {
  text-align: center; font-family: var(--font-source-serif); font-size: 12px;
  font-weight: 400; color: var(--tissa-carbon-muted); margin-top: 26px; line-height: 1.6;
}

/* Below-card nav */
.tl-below {
  margin-top: 26px; display: flex; justify-content: center;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  color: var(--tissa-carbon-muted); letter-spacing: .18em; text-transform: uppercase;
  position: relative; z-index: 2;
}
.tl-below a { padding: 0 14px; transition: color .15s; border-right: 1px solid var(--tissa-border); }
.tl-below a:last-child { border-right: none; }
.tl-below a:hover      { color: var(--tissa-accent, #252628); }

/* Redirect overlay */
.tl-redirect {
  position: fixed; inset: 0; display: none;
  place-items: center; z-index: 3; pointer-events: none;
}
.tl-redirect.on { display: grid; }
.tl-redirect .msg {
  font-family: var(--font-playfair); font-style: italic; font-weight: 500;
  font-size: 26px; color: var(--tissa-carbon); text-align: center;
  animation: tl-fade-in .6s ease-out .6s both;
}
.tl-redirect .msg .dot { display: inline-block; color: var(--tissa-accent, #252628); animation: tl-dots 1.4s infinite; }
.tl-redirect .redirect-sub { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--tissa-carbon-muted); letter-spacing: .2em; text-transform: uppercase; margin-top: 10px; }
@keyframes tl-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tl-dots    { 0%,20%{ opacity: 0; } 50%{ opacity: 1; } 100%{ opacity: 0; } }

/* Responsive */
@media (max-width: 560px) {
  .tissa-login-page { padding: 24px 16px 80px; align-items: flex-start; padding-top: 8vh; }
  .tl-card { padding: 40px 24px 34px; width: 100%; }
  .tl-wm   { font-size: 32px; }
  .tl-greet{ font-size: 22px; }
  .tl-btn-primary, .tl-btn-google { height: 54px; }
  .tl-corner.bl, .tl-corner.br { font-size: 9px; max-width: 45vw; bottom: 16px; }
  .tl-corner.bl { left: 14px; }
  .tl-corner.br { right: 14px; }
  .tl-hairline { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
  .tissa-login-page *, .tissa-login-page *::before, .tissa-login-page *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
