/* ============================================================
   Kerit Cloud — login / sign-up clone
   Values copied from billing.kerit.cloud/login (inline <style>)
   ============================================================ */

/* ---------- fonts (local variable Outfit, no CDN) ---------- */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- page shell ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #09090b;
  background-image: radial-gradient(at 0% 0%, rgba(2, 62, 138, 0.25) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(2, 62, 138, 0.12) 0px, transparent 50%);
  color: #f4f4f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---------- auth card ---------- */
.auth-modal-card {
  width: 100%;
  max-width: 1050px;
  min-height: min(760px, calc(100vh - 48px));
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  transition: all 0.6s ease-in-out;
  overflow: hidden;
}

.sign-up-container {
  right: 0;
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}
.auth-modal-card.right-panel-active .sign-up-container { transform: translateX(-20%); opacity: 0; z-index: 1; }

.sign-in-container {
  left: 0;
  z-index: 1;
  opacity: 0;
  transform: translateX(-20%);
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}
.auth-modal-card.right-panel-active .sign-in-container { opacity: 1; z-index: 5; transform: translateX(0); }

/* ---------- sliding artwork half ---------- */
.overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out, border-radius 0.6s ease-in-out;
  z-index: 100;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}
.auth-modal-card.right-panel-active .overlay-container {
  transform: translateX(100%);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.overlay {
  background-image: url('img/auth-overlay.png');
  background-size: cover;
  background-position: 50% -10px;
  background-repeat: no-repeat;
  color: #ffffff;
  position: relative;
  left: 0;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out, border-radius 0.6s ease-in-out;
  overflow: hidden;
}
.auth-modal-card.right-panel-active .overlay { transform: translateX(-50%); }

.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out, border-radius 0.6s ease-in-out;
  gap: 24px;
  overflow: hidden;
}
.overlay-left { left: 0; transform: translateX(0); }
.auth-modal-card.right-panel-active .overlay-left { transform: translateX(-20%); }
.overlay-right { right: 0; transform: translateX(20%); }
.auth-modal-card.right-panel-active .overlay-right { transform: translateX(0); }

/* rotating infra icons behind the artwork */
.infra-bg-marquee {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  transform: rotate(-35deg);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  opacity: 0.38;
}
.infra-row-wrap { width: 100%; overflow: hidden; display: flex; }
.infra-track { display: flex; gap: 36px; width: max-content; }
.infra-row-wrap.dir-normal .infra-track { animation: marqueeOuro 22s linear infinite; }
.infra-row-wrap.dir-reverse .infra-track { animation: marqueeOuroRev 26s linear infinite; }
.infra-track svg {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  color: #caf0f8;
  flex-shrink: 0;
}
@keyframes marqueeOuro { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes marqueeOuroRev { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* ---------- form panels ---------- */
.form-panel-dark {
  padding: 32px 36px;
  background: #09090b;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  min-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ---------- mobile tab switch ---------- */
.mobile-tab-switch {
  display: none;
  position: relative;
  background: #141417;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid #27272a;
}
.mobile-tab-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.auth-modal-card.right-panel-active .mobile-tab-pill { transform: translateX(100%); }
.mobile-tab-btn {
  flex: 1;
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  color: #a1a1aa;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}
.mobile-tab-btn.active { color: #09090b; }

/* ---------- single column under 992px ---------- */
@media (max-width: 992px) {
  body { padding: 16px 12px; }
  .auth-modal-card {
    width: 100% !important;
    max-width: 480px !important;
    min-height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  .form-container {
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    transition: opacity 0.3s ease-in-out !important;
  }
  .sign-up-container {
    position: relative !important;
    top: auto !important;
    left: 0 !important;
    right: auto !important;
    opacity: 1 !important;
    z-index: 2 !important;
    pointer-events: auto !important;
  }
  .auth-modal-card.right-panel-active .sign-up-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    opacity: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }
  .sign-in-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    opacity: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }
  .auth-modal-card.right-panel-active .sign-in-container {
    position: relative !important;
    top: auto !important;
    left: 0 !important;
    opacity: 1 !important;
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .overlay-container { display: none !important; }
  .mobile-tab-switch { display: flex !important; }
  .form-panel-dark { padding: 24px 20px !important; }
}

/* ---------- overlay hero copy ---------- */
.hero-content-top { position: relative; z-index: 2; }
.hero-title {
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hero-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
  max-width: 320px;
}
.hero-action-box { margin-top: 8px; position: relative; z-index: 2; }
.hero-btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 36px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 200 !important;
  pointer-events: auto !important;
}
.hero-btn-outline:hover {
  background: #ffffff;
  color: #023e8a;
  border-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* second declaration block — same order as the live sheet */
.form-panel-dark {
  padding: 24px 36px;
  background: #09090b;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-header { margin-bottom: 12px; }
.auth-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.auth-header p { font-size: 13px; color: #a1a1aa; }

.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 12px; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  background: #141417;
  border: none;
  box-shadow: 0 0 0 2px #3f3f46;
  border-radius: 10px;
  padding: 0 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.social-btn:hover { background: #1a1a1e; box-shadow: 0 0 0 2px #52525b; }
.social-btn svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0 !important;
  display: block !important;
}

.divider { display: flex; align-items: center; margin: 14px 0 12px 0; color: #71717a; font-size: 12px; font-weight: 400; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08); }
.divider span { padding: 0 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kerit-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; width: fit-content; text-decoration: none; }
.kerit-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 4px 14px rgba(0, 0, 0, .4);
}
.kerit-brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.03em; color: #fafafa; }
.kerit-brand-name b { color: #38bdf8; }
@media (max-width: 992px) { .kerit-brand { margin-bottom: 14px; } }

.form-panel-dark.tfa-active .tfa-hide { display: none !important; }

/* ---------- fields ---------- */
.form-wrap { display: flex; flex-direction: column; gap: 14px; }
.input-group { display: flex; flex-direction: column; gap: 4px; }
.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}
.input-group label .req { color: #ef4444; margin-left: -1px; }
.input-group label a { margin-left: auto; }

.input-wrapper { position: relative; display: flex; align-items: center; width: 100%; margin: 2px 0; }
.input-icon-left {
  position: absolute;
  left: 14px;
  color: #71717a;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  transition: color 0.15s ease;
}
.input-icon-left svg { width: 15px; height: 15px; }

.auth-input {
  width: 100%;
  height: 44px;
  background: #141417;
  border: 1px solid #27272a;
  box-shadow: none !important;
  border-radius: 10px;
  padding: 0 14px 0 40px;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  outline: none !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.auth-input:focus { background: #18181c; border-color: #ffffff; box-shadow: none !important; }
.input-wrapper:focus-within .input-icon-left { color: #ffffff; }
.auth-input::placeholder { color: #71717a; }

.field-hint { font-size: 11px; color: #71717a; margin-top: 2px; line-height: 1.3; }

.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #a1a1aa;
  margin: 2px 0 6px;
  cursor: pointer;
  user-select: none;
}
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.auth-check .check-box {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #141417;
  border: 1.5px solid #3a3a40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-check .check-box svg {
  width: 12px;
  height: 12px;
  stroke: #09090b;
  stroke-width: 3.2;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.auth-check:hover .check-box { border-color: #52525b; }
.auth-check input:focus-visible + .check-box { border-color: #ffffff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
.auth-check input:checked + .check-box { background: #ffffff; border-color: #ffffff; }
.auth-check input:checked + .check-box svg { opacity: 1; transform: scale(1); }
.auth-check .check-label { line-height: 1.3; }

.eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.eye-btn:hover { color: #ffffff; }

.pw-strength { height: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 1px; overflow: hidden; margin-top: 4px; }
.pw-strength-fill { height: 100%; width: 0%; transition: width 0.3s ease, background-color 0.3s ease; }

.auth-btn-primary {
  width: 100%;
  height: 50px;
  background: #ffffff;
  color: #09090b;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-top: 8px;
}
.auth-btn-primary:hover { background: #f4f4f5; }
.auth-btn-primary:active { transform: scale(0.99); }
.auth-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-banner { padding: 12px 14px; border-radius: 10px; font-size: 13px; display: none; line-height: 1.4; }
.auth-banner.error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: #f87171; }
.auth-banner.success { background: rgba(0, 180, 216, 0.1); border: 1px solid rgba(0, 180, 216, 0.2); color: #38bdf8; }

.auth-footer { margin-top: 24px; text-align: center; font-size: 14px; color: #a1a1aa; }
.auth-footer a { color: #ffffff; font-weight: 600; text-decoration: underline; margin-left: 4px; cursor: pointer; }
.auth-footer a:hover { color: #00b4d8; }

/* ---------- toasts ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #18181b;
  border: 1px solid #27272a;
  padding: 12px 18px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.toast .dot { width: 8px; height: 8px; background: #00b4d8; border-radius: 50%; }

.kc-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  translate: -50% -140%;
  background: #141417;
  border: 1px solid #27272a;
  color: #fafafa;
  padding: 11px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
  z-index: 2000;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -.01em;
  max-width: min(90vw, 400px);
  opacity: 0;
  pointer-events: none;
  transition: translate .4s cubic-bezier(.34, 1.3, .64, 1), opacity .3s ease;
}
.kc-toast.show { translate: -50% 0; opacity: 1; }
.kc-toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .16);
}

.hidden-tabs { display: none !important; }
.auth-modal-card.no-anim, .auth-modal-card.no-anim * { transition: none !important; }

/* ---------- forgot + migration modals ---------- */
.forgot-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 15, .72);
  backdrop-filter: blur(6px);
}
.forgot-overlay.open { display: flex; }

.mig-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 15, .78);
  backdrop-filter: blur(7px);
}
.mig-overlay.open { display: flex; }
.mig-modal {
  width: 100%;
  max-width: 400px;
  background: #0c111d;
  border: 1px solid rgba(99, 102, 241, .28);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  text-align: center;
}
.mig-icon { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.mig-title { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 6px; }
.mig-p { font-size: 13px; line-height: 1.7; color: #a5b4fc; margin: 8px 0 18px; }
.mig-p strong { color: #e0e7ff; font-weight: 700; word-break: break-all; }
.mig-resend {
  margin-top: 12px;
  background: none;
  border: none;
  color: #8b93c9;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mig-resend:disabled { opacity: .55; cursor: default; text-decoration: none; }

.forgot-modal {
  position: relative;
  width: 100%;
  max-width: 390px;
  background: #0e0e11;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 30px 26px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
  text-align: center;
  animation: forgotPop .32s cubic-bezier(.22, 1, .36, 1);
}
@keyframes forgotPop {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.forgot-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, #27272a, #141417);
  border: 1px solid #3f3f46;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .4);
}
.forgot-modal-head { font-size: 18px; font-weight: 700; color: #fafafa; letter-spacing: -.02em; }
.forgot-x {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #71717a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
  transition: color .15s ease, background-color .15s ease;
}
.forgot-x:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.forgot-p { font-size: 13px; line-height: 1.6; color: #a1a1aa; margin: 8px 0 18px; }
.forgot-modal .input-group { text-align: left; }

.btn-spinner { animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.forgot-msg { min-height: 16px; font-size: 12.5px; font-weight: 600; margin-top: 14px; text-align: center; line-height: 1.4; }
.forgot-msg.ok { color: #4ade80; }
.forgot-msg.err { color: #f87171; }
