/* [kcu-login] Ku Creatives portal login look for LibreChat's /login page.
   Every rule hangs off html[data-kcu-auth], which kcu-login.v2.js sets only on /login once it has found the form,
   so the rest of the app (and a login page whose markup changed) keeps LibreChat's own styles. */
@font-face { font-family: "KCU Black Han Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/kcu-black-han-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "KCU Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/kcu-montserrat-latin.woff2") format("woff2"); }

html[data-kcu-auth] {
  --kcu-navy: #151c51;
  --kcu-pink: #f7768a;
  --kcu-off-white: #f5f5f5;
  --kcu-line: rgba(0, 0, 0, 0.12);
  --kcu-heading: "KCU Black Han Sans", "Black Han Sans", system-ui, sans-serif;
  --kcu-body: "KCU Montserrat", Montserrat, system-ui, sans-serif;
  color-scheme: light;
}
html[data-kcu-auth], html[data-kcu-auth] body, html[data-kcu-auth] [data-kcu="shell"] { background: var(--kcu-off-white) !important; }
html[data-kcu-auth] [data-kcu="shell"] { font-family: var(--kcu-body); color: var(--kcu-navy); }

/* LibreChat's own top logo and the theme / contrast toggles are replaced by the brand block. */
html[data-kcu-auth] [data-kcu="lc-logo"], html[data-kcu-auth] [data-kcu="lc-toggles"] { display: none !important; }

/* The brand block and page footer are siblings of the card inside <main>; React's own nodes are never moved. */
html[data-kcu-auth] [data-kcu="main"] { flex-direction: column; padding: 48px 24px; }
html[data-kcu-auth] [data-kcu="main"] > .kcu-brand, html[data-kcu-auth] [data-kcu="main"] > [data-kcu="card"], html[data-kcu-auth] [data-kcu="main"] > .kcu-page-foot {
  width: 100%; max-width: 372px; box-sizing: border-box; animation: kcu-fade-up 0.45s ease-out both;
}
@keyframes kcu-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html[data-kcu-auth] [data-kcu="main"] > * { animation: none !important; } }

html[data-kcu-auth] .kcu-brand { text-align: center; margin-bottom: 32px; }
html[data-kcu-auth] .kcu-brand img { display: block; width: 48px; height: 48px; margin: 0 auto 12px; }
html[data-kcu-auth] .kcu-brand-name { font-family: var(--kcu-heading); font-size: 18px; line-height: 28px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--kcu-navy); margin: 0; font-weight: 400; }

html[data-kcu-auth] [data-kcu="card"] {
  width: 100% !important; max-width: 372px !important; box-sizing: border-box;
  background: #fff !important; border: 2px solid var(--kcu-line); border-radius: 20px !important;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.04); padding: 36px 32px !important; overflow: visible;
}
html[data-kcu-auth] [data-kcu="card"] h1 {
  font-family: var(--kcu-heading); font-size: 24px; line-height: 32px; font-weight: 400; letter-spacing: 0.02em;
  text-transform: uppercase; text-align: left; color: var(--kcu-navy) !important; margin: 0 0 4px; user-select: none;
}
html[data-kcu-auth] .kcu-sub { font-size: 13px; line-height: 19.5px; font-weight: 500; color: #444; margin: 0 0 28px; }
html[data-kcu-auth] [data-kcu="card"] form { margin-top: 0 !important; }
html[data-kcu-auth] [data-kcu="card"] form > div.mb-4 { margin-bottom: 18px !important; }
html[data-kcu-auth] [data-kcu="card"] form > div.mb-2 { margin-bottom: 0 !important; }

/* Static uppercase labels above the fields; LibreChat's floating labels stay in the DOM for its own logic only. */
html[data-kcu-auth] .kcu-label { display: block; font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--kcu-navy); margin: 0 0 8px; }
html[data-kcu-auth] [data-kcu="card"] form input + label { display: none !important; }

html[data-kcu-auth] [data-kcu="card"] form input#email,
html[data-kcu-auth] [data-kcu="card"] form input#password,
html[data-kcu-auth] [data-kcu="card"] form input[name="token"] {
  height: 48px !important; box-sizing: border-box; padding: 12px 14px !important; border-radius: 10px !important;
  border: 2px solid var(--kcu-line) !important; background: var(--kcu-off-white) !important; color: var(--kcu-navy) !important;
  font-family: var(--kcu-body); font-size: 14px; line-height: 20px; font-weight: 500; box-shadow: none !important; outline: none !important;
  transition: border-color 0.15s; -webkit-text-fill-color: var(--kcu-navy) !important; caret-color: var(--kcu-navy);
}
html[data-kcu-auth] [data-kcu="card"] form input#password { padding-right: 44px !important; }
/* LibreChat's webkit-dark-styles sets -webkit-text-fill-color for dark mode, which hides text on the light field. */
html[data-kcu-auth] [data-kcu="card"] form input::placeholder { color: #888 !important; -webkit-text-fill-color: #888 !important; font-weight: 400; opacity: 1; }
html[data-kcu-auth] [data-kcu="card"] form input:focus { border-color: var(--kcu-navy) !important; --tw-ring-shadow: 0 0 #0000; }
html[data-kcu-auth] [data-kcu="card"] form input[aria-invalid="true"] { border-color: var(--kcu-pink) !important; }
html[data-kcu-auth] [data-kcu="card"] form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px var(--kcu-off-white) inset !important; -webkit-text-fill-color: var(--kcu-navy) !important; caret-color: var(--kcu-navy);
}
html[data-kcu-auth] [data-kcu="card"] form button[aria-label="Show secret"],
html[data-kcu-auth] [data-kcu="card"] form button[aria-label="Hide secret"] { color: #888 !important; background: transparent !important; }

/* Field errors and the login error banner, in the portal's pink. */
html[data-kcu-auth] [data-kcu="card"] form span[role="alert"], html[data-kcu-auth] [data-kcu="card"] form [id$="-error"] { color: var(--kcu-pink) !important; font-size: 12px; font-weight: 600; }
html[data-kcu-auth] [data-kcu="card"] > div[role="alert"], html[data-kcu-auth] [data-kcu="card"] > div:not(.kcu-sub):not(.kcu-foot) {
  font-family: var(--kcu-body); font-size: 12px; font-weight: 600; color: #b4233c !important;
  background: #fff1f3 !important; border: 2px solid rgba(247, 118, 138, 0.45) !important; border-radius: 10px !important;
}

html[data-kcu-auth] [data-kcu="card"] form button[type="submit"] {
  position: relative; width: 100%; height: 56px; margin-top: 6px; padding: 14px 28px;
  background: var(--kcu-pink) !important; color: #fff !important; border: 2px solid rgba(0, 0, 0, 0.15) !important; border-radius: 9999px !important;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1); font-family: var(--kcu-heading); font-size: 0 !important; font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase; transition: transform 0.15s, box-shadow 0.15s; opacity: 1;
}
html[data-kcu-auth] [data-kcu="card"] form button[type="submit"]::after { content: "Log in"; font-size: 16px; line-height: 24px; }
html[data-kcu-auth] [data-kcu="card"] form button[type="submit"]:hover:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1); }
html[data-kcu-auth] [data-kcu="card"] form button[type="submit"]:disabled { opacity: 0.6; }
html[data-kcu-auth] [data-kcu="card"] form button[type="submit"]:focus-visible { outline: 2px solid var(--kcu-navy); outline-offset: 2px; }
html[data-kcu-auth] [data-kcu="card"] form div.mt-6:has(> button[type="submit"]) { margin-top: 18px !important; }

html[data-kcu-auth] .kcu-foot { margin-top: 20px; text-align: center; font-size: 12px; line-height: 18px; color: #888; }
html[data-kcu-auth] .kcu-foot a, html[data-kcu-auth] .kcu-page-foot a { text-decoration: none; }
html[data-kcu-auth] .kcu-foot a { color: var(--kcu-pink); font-weight: 600; }
html[data-kcu-auth] .kcu-foot a:hover { text-decoration: underline; }
html[data-kcu-auth] .kcu-page-foot { margin-top: 40px; text-align: center; font-size: 11px; line-height: 16.5px; color: #888; }
html[data-kcu-auth] .kcu-page-foot a { color: #444; }
html[data-kcu-auth] .kcu-page-foot a:hover { color: var(--kcu-navy); }

@media (max-width: 420px) {
  html[data-kcu-auth] [data-kcu="main"] { padding: 40px 16px; }
  html[data-kcu-auth] [data-kcu="card"] { padding: 32px 24px !important; }
}

/* v2: the error banner keeps LibreChat's mt-6 and px-6/py-4, which crowds the heading and the EMAIL label. */
html[data-kcu-auth] [data-kcu="card"] > div[role="alert"] { margin: 0 0 20px !important; padding: 12px 16px !important; }
