* { 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;
}

.kmc-auth { display: flex; min-height: 100vh; width: 100%; background: #fff; }

/* ---------- Left branding panel (col-md-9) ---------- */
.kmc-auth-brand {
	position: relative;
	flex: 0 0 75%;
	max-width: 75%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 48px 46px;
	overflow: hidden;
	background-image: url('../../cldassets/assets/images/media/bg-1.jpg');
	background-size: cover;
	background-position: center;
	color: #fff;
}
.kmc-auth-brand::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(150deg, rgba(9,17,64,.88) 0%, rgba(24,52,148,.82) 55%, rgba(59,91,219,.76) 100%);
}
.kmc-auth-brand > *:not(.kmc-auth-brand-slides) { position: relative; z-index: 2; }

/* ---------- 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; }

/* ---------- Right form panel (col-md-3) ---------- */
.kmc-auth-panel { flex: 0 0 25%; max-width: 25%; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: #fff; }
.kmc-auth-card { width: 100%; max-width: 360px; }
.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: #1c2b2a; margin: 0 0 6px; }
.kmc-auth-card-head p { font-size: 13px; color: #8b93a1; 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);
	transform: translateX(calc(var(--kmc-slide-index) * -33.3334%));
	overflow-anchor: none;
}
.kmc-slide-pane { flex: 0 0 33.3334%; width: 33.3334%; box-sizing: border-box; padding-right: 4px; overflow-anchor: none; }

.kmc-hint { font-size: 11px; color: #8b93a1; 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 #e2e6e5; background: #f8f9fa; font-size: 13.5px; color: #1c2b2a; transition: border-color .15s, box-shadow .15s, background .15s; }
.kmc-input-wrap select:focus { outline: none; border-color: #3b5bdb; background: #fff; box-shadow: 0 0 0 .18rem rgba(59,91,219,.15); }
.kmc-input-wrap select:disabled { color: #a7aeae; }

.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 #e2e6e5; background: #f8f9fa; font-size: 12.5px; color: #1c2b2a; text-align: center; transition: border-color .15s, box-shadow .15s, background .15s; }
.kmc-date-row select:focus { outline: none; border-color: #3b5bdb; background: #fff; box-shadow: 0 0 0 .18rem rgba(59,91,219,.15); }

.kmc-btn-secondary-outline { width: 100%; height: 47px; border: 1px solid #e2e6e5; border-radius: 9px; background: #fff; color: #33403e; 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: #f4f6f5; color: #33403e; }
.kmc-btn-back-to-login { margin-top: 12px; background: #eef1f6; border-color: #dde2ea; color: #33403e; }
.kmc-btn-back-to-login:hover { background: #e3e7ee; }

.kmc-field { margin-bottom: 18px; }
.kmc-field label { display: block; font-size: 12.5px; font-weight: 700; color: #33403e; 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: #9aa5a3; 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 #e2e6e5; background: #f8f9fa; font-size: 14px; color: #1c2b2a; transition: border-color .15s, box-shadow .15s, background .15s; }
.kmc-input-wrap input::placeholder { color: #a7aeae; }
.kmc-input-wrap input:focus { outline: none; border-color: #3b5bdb; background: #fff; box-shadow: 0 0 0 .18rem rgba(59,91,219,.15); }
.kmc-toggle-pass { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #9aa5a3; cursor: pointer; font-size: 14px; }
.kmc-toggle-pass:hover { color: #3b5bdb; }

.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: #2b46c4; 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, #3b5bdb, #1e3799); 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 #eef0ef; }
.kmc-auth-footer .kmc-home-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #33403e; text-decoration: none; padding: 8px 16px; border-radius: 30px; border: 1px solid #e2e6e5; transition: background .15s; }
.kmc-auth-footer .kmc-home-link:hover { background: #f4f6f5; }
.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 #e2e6e5; color: #3c4043; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kmc-social-google:hover { background: #f8f9fa; color: #3c4043; box-shadow: 0 2px 6px rgba(0,0,0,.1); }

@media (max-width: 991px) {
	.kmc-auth { flex-direction: column; }
	.kmc-auth-brand, .kmc-auth-panel { flex: 0 0 auto; width: 100%; max-width: 100%; }
	.kmc-auth-brand { padding: 32px 30px; }
	.kmc-auth-brand-mid { padding: 22px 0; margin: 0; }
	.kmc-auth-brand-mid h1 { font-size: 24px; }
	.kmc-auth-features { display: none; }
	.kmc-auth-panel { padding: 34px 22px; }
}
@media (max-width: 576px) {
	.kmc-auth-brand { padding: 26px 22px; }
	.kmc-auth-brand-mid p { display: none; }
}
