/* Login page (layout "access"), same look as the new Dashboard login.
   Colours are the Dashboard theme tokens (Dashboard/app/globals.css) as hex. No Bootstrap/AdminLTE needed. */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.login-page {
	background: #f0f2f5;            /* --background */
	color: #111b21;                 /* --foreground */
	font-family: "Segoe UI", "Helvetica Neue", Helvetica, "Lucida Grande", Arial, Ubuntu, Cantarell, "Fira Sans", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.login-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	padding: 40px 16px;
}

/* ---- card ---- */
.login-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1024px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e9edef;      /* --border */
	border-radius: 35px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .1), 0 8px 10px -1px rgba(0, 0, 0, .1);
	animation: login-in .35s ease-out both;
}

@keyframes login-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

/* brand panel: Colección Fiesta photo (square, 1100 x 1100); the cream behind it is the photo's own background,
   shown while it loads. To change the photo, replace img/login-side.jpg (square works best). On phones the panel
   is a short band showing the "Colección Fiesta" title and the bag. The logo is dark (#1f1a17) for this light photo. */
.login-panel {
	position: relative;
	height: 160px;
	background: #dcd4cc url(../img/login-side.jpg) center 3% / cover no-repeat;
}

.login-logo {
	position: absolute;
	z-index: 1;
	top: 16px;                      /* phones: small, top-left, clear of the centred title */
	left: 16px;
	width: auto;
	height: 20px;
}

/* ---- form ---- */
.login-form {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 40px 24px 64px;
}

.login-title {
	margin: 0;
	font-size: 30px;
	line-height: 36px;
	font-weight: 600;
	letter-spacing: -.025em;
}

.login-subtitle {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 20px;
	color: #667781;                 /* --muted-foreground */
}

.login-fields { margin-top: 32px; }

.login-field {
	display: flex;
	flex-direction: column;
	padding: 12px 16px 8px;
	background: #f7f9fa;            /* --muted at 50 % on white */
	border: 1px solid #e9edef;
	border-radius: 22px;
	cursor: text;
	transition: border-color .15s, box-shadow .15s;
}

.login-field + .login-field { margin-top: 16px; }

.login-field:focus-within {
	border-color: #25d366;          /* --ring */
	box-shadow: 0 0 0 3px rgba(37, 211, 102, .3);
}

.login-field-label {
	margin-bottom: 2px;
	font-size: 12px;
	line-height: 16px;
	color: #667781;
}

.login-field-row {
	display: flex;
	align-items: center;
}

.login-field input {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 16px;                /* 16px: iOS doesn't zoom on focus */
	line-height: 24px;
	box-shadow: none;
}

.login-field input::placeholder { color: rgba(102, 119, 129, .6); }

/* Chrome autofill: keep the box colour instead of the yellow/blue fill */
.login-field input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 40px #f7f9fa inset;
	-webkit-text-fill-color: #111b21;
}

.login-eye {
	display: inline-flex;
	flex-shrink: 0;
	margin-left: 8px;
	padding: 4px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #667781;
	cursor: pointer;
}

.login-eye:hover { color: #111b21; }
.login-eye:focus-visible { outline: 2px solid #25d366; outline-offset: 1px; }

svg { flex-shrink: 0; }

.login-eye svg,
.login-submit svg,
.login-flash svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.login-eye .icon-eye-off { display: none; }
.login-eye.is-showing .icon-eye { display: none; }
.login-eye.is-showing .icon-eye-off { display: block; }

/* ---- error (Session->flash: flash_fail / flash_success elements) ---- */
.login-flash {
	display: flex;
	align-items: center;
	margin-top: 16px;
	padding: 8px 12px;
	border: 1px solid rgba(234, 67, 53, .3);
	border-radius: 22px;
	background: rgba(234, 67, 53, .1);
	color: #ea4335;                 /* --destructive */
	font-size: 14px;
	line-height: 20px;
}

.login-flash > svg { margin-right: 8px; }

/* the shared flash elements bring Bootstrap markup: keep only the message */
.login-flash .alert,
.login-flash .message {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
}

.login-flash .close,
.login-flash .alert-heading { display: none; }

/* ---- submit ---- */
.login-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	margin-top: 24px;
	padding: 0 10px 0 8px;
	border: 0;
	border-radius: 16px;
	background: #075e54;            /* --primary */
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s;
}

.login-submit:hover { background: rgba(7, 94, 84, .8); }
.login-submit:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(37, 211, 102, .5); }
.login-submit:disabled { opacity: .5; cursor: default; }

.login-submit svg,
.login-spinner { margin-right: 6px; }

.login-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: login-spin .7s linear infinite;
}

.login-submit.is-loading .icon-login { display: none; }
.login-submit.is-loading .login-spinner { display: inline-block; }

@keyframes login-spin { to { transform: rotate(360deg); } }

/* ---- footer bits ---- */
.login-version {
	position: absolute;
	right: 24px;
	bottom: 20px;
	left: 24px;
	margin: 0;
	text-align: right;
	font-size: 12px;
	line-height: 16px;
	color: #667781;
	font-variant-numeric: tabular-nums;
}

.login-copy {
	margin: 32px 0 0;
	font-size: 12px;
	line-height: 16px;
	color: #667781;
	text-align: center;
}

/* very narrow phones: keep the logo clear of the photo's title */
@media (max-width: 379.98px) {
	.login-logo { height: 16px; }
}

/* ---- wider screens ---- */
@media (min-width: 640px) {
	.login-form { padding-right: 40px; padding-left: 40px; }
	.login-version { right: 40px; left: 40px; }
}

@media (min-width: 768px) {
	.login-card { flex-direction: row; min-height: 560px; }
	/* same split as the Dashboard grid (1.15fr / 1fr) */
	.login-panel { flex: 0 0 53.49%; height: auto; background-position: center; }
	/* bottom-left: empty cream in the photo, clear of the title and the shoes */
	.login-logo { top: auto; bottom: 28px; left: 32px; height: 28px; }
	.login-form { flex: 1 1 auto; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.login-card { animation: none; }
	.login-field, .login-submit { transition: none; }
}
