* { box-sizing: border-box; }
html, body { height: 100%; }
body.kmc-auth-body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }

.kmc-auth-brand-name,
.kmc-auth-badge,
.kmc-auth-brand-mid h1,
.kmc-auth-card-head h2,
.kmc-btn-primary,
.kmc-field label {
	font-family: 'Poppins', 'Inter', sans-serif;
}

/* Transparent so the fixed full-window background (.kmc-auth-bg) shows through
   the left & right parts and around the centered card. */
.kmc-auth { position: relative; z-index: 1; display: flex; min-height: 100vh; width: 100%; background: transparent; }

/* ---------- Full-window background (image + maroon overlay + carousel) ---------- */
/* Fixed backdrop covering the whole window on every side, like a body
   background; the three-part row sits on top of it. */
.kmc-auth-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background-image: url('../../cldassets/assets/images/media/bg-1.jpg');
	background-size: cover;
	background-position: center;
}
/* Maroon overlay tint over the background image / carousel. */
.kmc-auth-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(150deg, rgba(74,4,10,.90) 0%, rgba(107,15,26,.85) 55%, rgba(128,0,0,.80) 100%);
}

/* Left & right parts: nothing but the background image showing through. */
.kmc-auth-side { background: transparent; }

/* ---------- Background image carousel (DB-driven, cross-fades) ---------- */
/* Sits below the ::before gradient tint (z-index 1) and above the .kmc-auth-brand
   fallback background-image, so a slow/failed fetch never leaves a blank panel. */
.kmc-auth-brand-slides { position: absolute; inset: 0; z-index: 0; }
.kmc-auth-brand-slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 1.4s ease;
}
.kmc-auth-brand-slide.is-active { opacity: 1; }

.kmc-auth-brand-top { display: flex; align-items: center; gap: 12px; }
.kmc-auth-brand-logo { width: 52px; height: 52px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.kmc-auth-brand-name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.kmc-auth-brand-name small { display: block; font-size: 11px; font-weight: 400; opacity: .8; letter-spacing: .3px; }

.kmc-auth-brand-mid { margin: auto 0; padding: 40px 0; }
.kmc-auth-badge { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; background: #ffc107; border: 1px solid #ffc107; color: #664d03; backdrop-filter: blur(2px); font-size: 11.5px; font-weight: 600; letter-spacing: .3px; padding: 12px 18px; border-radius: 14px; margin-bottom: 22px; }
.kmc-auth-badge i { font-size: 20px; }
.kmc-auth-brand-mid h1 { font-size: 32px; font-weight: 800; line-height: 1.25; margin: 0 0 14px; }
.kmc-auth-brand-mid p { font-size: 14px; line-height: 1.7; opacity: .88; max-width: 380px; margin: 0 0 26px; }

.kmc-auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.kmc-auth-features li { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; opacity: .95; }
.kmc-auth-features li i { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; background: #ffc107; color: #664d03; display: flex; align-items: center; justify-content: center; font-size: 11px; }

.kmc-auth-brand-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; opacity: .75; }
.kmc-auth-brand-bottom img { opacity: .9; border-radius: 4px; }

/* ---------- Center part: complete sign-in process (col-md-6) ---------- */
/* A small top/bottom gap keeps the tall card a rounded box (corners visible). */
.kmc-auth-panel { position: relative; z-index: 2; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 20px; background: transparent; }
/* Near-full-height rounded white sign-in card; content vertically centered inside. */
/* Auto height: the card grows/shrinks to fit its content (the slide viewport's
   height is animated by login.js as panes change), staying centered by the panel. */
.kmc-auth-card { width: 100%; max-width: 560px; background: #fff; border-radius: 18px; padding: 44px 40px; box-shadow: 0 18px 55px rgba(0,0,0,.38); }
.kmc-auth-card-head { text-align: center; margin-bottom: 28px; }
.kmc-auth-card-head img { width: 62px; height: 62px; margin-bottom: 14px; }
.kmc-auth-card-head h2 { font-size: 23px; font-weight: 800; color: #2a1013; margin: 0 0 6px; }
.kmc-auth-card-head p { font-size: 13px; color: #8b7f81; margin: 0; }

/* ---------- Sliding Sign In / Reset Password / Forgot Password track ---------- */
/* overflow-anchor:none stops Chromium's scroll-anchoring heuristic from nudging
   this overflow:hidden viewport's scrollLeft when the panes' content height
   changes between panes, which would desync it from the slide transform and
   clip most of the active pane out of view. */
.kmc-slide-viewport { overflow: hidden; width: 100%; transition: height .45s cubic-bezier(.65,0,.35,1); overflow-anchor: none; }
.kmc-slide-track {
	--kmc-slide-index: 0;
	display: flex;
	align-items: flex-start;
	width: 300%;
	transition: transform .45s cubic-bezier(.65,0,.35,1);
	/* Exact thirds (calc 100%/3) so the active pane is exactly viewport-wide and
	   no sliver of the adjacent pane bleeds in at the right edge. */
	transform: translateX(calc(var(--kmc-slide-index) * -100% / 3));
	overflow-anchor: none;
}
.kmc-slide-pane { flex: 0 0 calc(100% / 3); width: calc(100% / 3); box-sizing: border-box; padding-right: 4px; overflow-anchor: none; }

.kmc-hint { font-size: 11px; color: #8b7f81; margin-top: 6px; line-height: 1.4; }

.kmc-input-wrap select { width: 100%; height: 46px; padding: 0 15px 0 42px; border-radius: 9px; border: 1px solid #e6dcdd; background: #faf6f6; font-size: 13.5px; color: #2a1013; transition: border-color .15s, box-shadow .15s, background .15s; }
.kmc-input-wrap select:focus { outline: none; border-color: #8a1c2b; background: #fff; box-shadow: 0 0 0 .18rem rgba(138,28,43,.15); }
.kmc-input-wrap select:disabled { color: #b0a6a7; }

.kmc-date-row { display: flex; gap: 8px; }
.kmc-date-row select { flex: 1 1 0; width: 100%; height: 46px; padding: 0 6px; border-radius: 9px; border: 1px solid #e6dcdd; background: #faf6f6; font-size: 12.5px; color: #2a1013; text-align: center; transition: border-color .15s, box-shadow .15s, background .15s; }
.kmc-date-row select:focus { outline: none; border-color: #8a1c2b; background: #fff; box-shadow: 0 0 0 .18rem rgba(138,28,43,.15); }

.kmc-btn-secondary-outline { width: 100%; height: 47px; border: 1px solid #e6dcdd; border-radius: 9px; background: #fff; color: #402226; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; transition: background .15s; }
.kmc-btn-secondary-outline:hover { background: #f7f1f1; color: #402226; }
.kmc-btn-back-to-login { margin-top: 12px; background: #f6eeef; border-color: #ecdfe1; color: #402226; }
.kmc-btn-back-to-login:hover { background: #efe3e5; }

.kmc-field { margin-bottom: 18px; }
.kmc-field label { display: block; font-size: 12.5px; font-weight: 700; color: #402226; margin-bottom: 7px; }
.kmc-input-wrap { position: relative; }
.kmc-input-wrap > i.kmc-input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #ab9a9c; font-size: 15px; pointer-events: none; }
.kmc-input-wrap input { width: 100%; height: 46px; padding: 0 15px 0 42px; border-radius: 9px; border: 1px solid #e6dcdd; background: #faf6f6; font-size: 14px; color: #2a1013; transition: border-color .15s, box-shadow .15s, background .15s; }
.kmc-input-wrap input::placeholder { color: #b0a6a7; }
.kmc-input-wrap input:focus { outline: none; border-color: #8a1c2b; background: #fff; box-shadow: 0 0 0 .18rem rgba(138,28,43,.15); }
.kmc-toggle-pass { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #ab9a9c; cursor: pointer; font-size: 14px; }
.kmc-toggle-pass:hover { color: #8a1c2b; }

.kmc-field-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 4px 0 22px; font-size: 12.5px; }
.kmc-field-links a { color: #8a1c2b; font-weight: 600; text-decoration: none; cursor: pointer; }
.kmc-field-links a:hover { text-decoration: underline; }

.kmc-btn-primary { width: 100%; height: 47px; border: none; border-radius: 9px; background: linear-gradient(135deg, #a02234, #6b0f1a); color: #fff; font-weight: 700; font-size: 14.5px; letter-spacing: .2px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: opacity .2s, transform .15s; }
.kmc-btn-primary:hover { opacity: .93; transform: translateY(-1px); color: #fff; }
.kmc-btn-primary:active { transform: translateY(0); }
.kmc-btn-primary:disabled { opacity: .7; cursor: default; transform: none; }

.kmc-auth-note { display: flex; align-items: flex-start; gap: 9px; background: #fff8e1; border: 1px solid #f0d98c; color: #5a3e00; border-radius: 9px; padding: 11px 13px; font-size: 11.5px; line-height: 1.5; margin-top: 22px; }
.kmc-auth-note i { margin-top: 1px; }
.kmc-auth-note a { color: #5a3e00; font-weight: 700; text-decoration: underline; }

.kmc-auth-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid #f1e9ea; }
.kmc-auth-footer .kmc-home-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #402226; text-decoration: none; padding: 8px 16px; border-radius: 30px; border: 1px solid #e6dcdd; transition: background .15s; }
.kmc-auth-footer .kmc-home-link:hover { background: #f7f1f1; }
.kmc-auth-footer .kmc-sitelock { opacity: .7; }

/* ---------- Alerts ---------- */
.kmc-alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 10px; font-size: 15.5px; font-weight: 500; line-height: 1.55; margin-bottom: 18px; text-align: left; border: 1px solid transparent; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.kmc-alert .kmc-alert-icon { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; margin-top: 1px; }
.kmc-alert .kmc-alert-body { flex: 1 1 auto; }
.kmc-alert .kmc-alert-body ul { margin: 0; padding-left: 16px; }
.kmc-alert .kmc-alert-body ul li + li { margin-top: 2px; }
.kmc-alert-close { flex: 0 0 auto; border: none; background: transparent; font-size: 12px; line-height: 1; cursor: pointer; opacity: .5; padding: 2px; margin-top: 2px; }
.kmc-alert-close:hover { opacity: 1; }
.kmc-alert-danger { background: #fdecea; border-color: #f6c6c1; color: #8a2118; }
.kmc-alert-danger .kmc-alert-icon { background: #e5493c; }
.kmc-alert-warning { background: #fff8e1; border-color: #f0d98c; color: #5a3e00; }
.kmc-alert-warning .kmc-alert-icon { background: #f0a500; }
.kmc-alert-success { background: #eaf7ec; border-color: #bfe3c4; color: #1c5e2c; }
.kmc-alert-success .kmc-alert-icon { background: #3ba55c; }

/* ---------- Social login (Continue with Google) ---------- */
.kmc-social-row { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.kmc-social-btn { width: 100%; height: 46px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.kmc-social-btn:hover { transform: translateY(-1px); }
.kmc-social-google { background: #fff; border: 1px solid #e6dcdd; color: #3c4043; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kmc-social-google:hover { background: #faf6f6; color: #3c4043; box-shadow: 0 2px 6px rgba(0,0,0,.1); }

@media (max-width: 991px) {
	.kmc-auth-panel { padding: 34px 22px; }
}
@media (max-width: 576px) {
	.kmc-auth-panel { padding: 26px 16px; }
	.kmc-auth-card { padding: 28px 22px; }
}
