/* V2.37 (Change Request Batch 21): sign-in concepts (core/login21.js) and the module background system (core/bg21.js) */

/* ---------- sign-in: the concept canvas replaces the Batch 20 drawing; the glass card, ripple and shake stay */
html[data-ui="3"] #kx-gate.l21 .l20-bldg, html[data-ui="3"] #kx-gate.l21 .l20-grid { display: none; }
.l21-host { position: absolute; inset: 0; }
.l21-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
html[data-ui="3"] #kx-gate.l21-city .l20-glow { display: none; }
html[data-ui="3"] #kx-gate.l21-city .l20-cap { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
html[data-ui="3"] #kx-gate.l21-city .kx-slider { background: rgba(6,12,28,.48); }
html[data-ui="3"] #kx-gate.l21 .l20-cap { z-index: 2; }
/* the card: refined type, a soft border light that follows the pointer, a slow breathing glow */
html[data-ui="3"] #kx-gate.l21 .kx-gate-card { position: relative; isolation: isolate; }
html[data-ui="3"] #kx-gate.l21 .kx-gate-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.2px; pointer-events: none; z-index: 0;
  background: radial-gradient(280px 220px at var(--l21x, 78%) var(--l21y, 0%), rgba(80,216,144,.95), rgba(79,152,202,.55) 42%, rgba(255,255,255,.12) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
html[data-ui="3"] #kx-gate.l21 .kx-gate-card::after { content: ''; position: absolute; inset: -18px; border-radius: 28px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(80,216,144,.22), transparent); animation: l21-breathe 7s ease-in-out infinite; }
@keyframes l21-breathe { 50% { opacity: .45; transform: scale(.985); } }
html[data-ui="3"] #kx-gate.l21 .kx-gate-title { font-weight: 800; letter-spacing: .34em; font-size: 18px; }
html[data-ui="3"] #kx-gate.l21 .kx-gate-card .f > span, html[data-ui="3"] #kx-gate.l21 .kx-gate-card label > span { letter-spacing: .02em; font-weight: 600; }
html[data-ui="3"] #kx-gate.l21 .kx-gate-card .f input:focus { box-shadow: 0 0 0 4px rgba(80,216,144,.26), 0 0 22px rgba(80,216,144,.30); }
html[data-ui="3"] #kx-gate.l21 .kx-gate-btn.btn-primary { background-image: linear-gradient(120deg, #2f66e0, #3d8be0 55%, #2fae7a); background-size: 180% 100%; transition: background-position .5s ease, transform .12s ease, box-shadow .2s ease; }
html[data-ui="3"] #kx-gate.l21 .kx-gate-btn.btn-primary:not(:disabled):hover { background-position: 100% 0; }
/* the way into the application */
#kx-gate-leaving { position: fixed; inset: 0; z-index: 9999; }
#kx-gate-leaving.l21-out { animation: l21-out .7s cubic-bezier(.55,.05,.35,1) forwards; }
#kx-gate-leaving.l21-out .kx-gate-card { animation: l21-card .7s cubic-bezier(.55,.05,.35,1) forwards !important; }
#kx-gate-leaving.l21-out .l20-scene { animation: l21-zoom .7s cubic-bezier(.55,.05,.35,1) forwards; }
@keyframes l21-out { 60% { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@keyframes l21-card { 30% { transform: scale(1.015); box-shadow: 0 0 0 6px rgba(80,216,144,.35), 0 30px 80px rgba(3,10,30,.45); } to { transform: translateY(-12px) scale(.96); opacity: 0; } }
@keyframes l21-zoom { to { transform: scale(1.12); filter: blur(6px) brightness(1.25); } }
@media (max-width: 860px) { html[data-ui="3"] #kx-gate.l21 .l21-host { opacity: .5; } html[data-ui="3"] #kx-gate.l21-city .l21-host { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { html[data-ui="3"] #kx-gate.l21 .kx-gate-card::after { animation: none; } #kx-gate-leaving.l21-out, #kx-gate-leaving.l21-out * { animation: none !important; } }

/* ---------- module backgrounds: the canvas theme drawn over the Batch 20 colour fields */
#kx-bg20 canvas.bg21 { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease; }
html.bg20.bg21-on:not(.bg20-off) #kx-bg20 canvas.bg21 { opacity: 1; }
html.bg20-off #kx-bg20 canvas.bg21 { display: none; }
@media print { #kx-bg20 canvas.bg21 { display: none !important; } }

/* ---------- Admin Settings: the sign-in concept chooser */
.l21-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.l21-opt { position: relative; border: 1px solid var(--border, #d9ece5); border-radius: 12px; overflow: hidden; cursor: pointer; background: #081427; color: #fff; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; }
.l21-opt.on { outline: 3px solid #50d890; outline-offset: 1px; }
.l21-opt .l21-prev { position: absolute; inset: 0; }
.l21-opt .l21-lbl { position: relative; z-index: 1; padding: 8px 10px; background: linear-gradient(transparent, rgba(4,10,24,.85)); font-weight: 700; font-size: 13px; }
.l21-opt .l21-lbl small { display: block; font-weight: 400; opacity: .85; font-size: 11.5px; }
.l21-opt input { position: absolute; top: 8px; left: 8px; z-index: 2; }
