/* Partner login (index.php) */
:root {
	--brand-900: #0b4f4a;
	--brand-700: #0f766e;
	--brand-600: #0d9488;
	--brand-400: #3eb991;
	--ink: #0f172a;
	--ink-2: #475569;
	--muted: #94a3b8;
	--line: #dbe3ea;
	--field: #f8fafc;
	--danger: #b91c1c;
	--danger-bg: #fef2f2;
	--danger-line: #fecaca;
	--ok: #047857;
	--ok-bg: #ecfdf5;
	--ok-line: #a7f3d0;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	/* system fonts: connect.php's CSP blocks Google Fonts */
	font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth { display: flex; min-height: 100vh; }

/* Brand panel */
.auth-brand {
	position: relative;
	flex: 1 1 52%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 40px 56px;
	color: #fff;
	overflow: hidden;
	background:
		radial-gradient(circle at 85% 8%, rgba(255,255,255,.16) 0, rgba(255,255,255,0) 38%),
		radial-gradient(circle at 8% 92%, rgba(62,185,145,.5) 0, rgba(62,185,145,0) 45%),
		linear-gradient(145deg, var(--brand-900) 0%, var(--brand-700) 48%, var(--brand-600) 100%);
}
.auth-brand::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
	background-size: 22px 22px;
	pointer-events: none;
}
.auth-brand > * { position: relative; }
.brand-head { display: flex; align-items: center; gap: 12px; }
.brand-logo {
	width: 46px;
	height: 46px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.brand-logo img { max-width: 34px; max-height: 34px; object-fit: contain; }
.brand-name { font-size: 18px; font-weight: 700; line-height: 1.25; }
.brand-tag { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.brand-body { max-width: 520px; margin: 36px 0; }
.brand-body h1 { margin: 0 0 12px; font-size: 34px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; }
.brand-body p { margin: 0 0 28px; font-size: 16px; color: rgba(255,255,255,.86); }
.brand-figure {
	max-width: 440px;
	margin: 0;
	padding: 14px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 48px rgba(4,47,46,.35);
}
.brand-figure img { display: block; width: 100%; max-height: 250px; object-fit: contain; border-radius: 8px; }
.brand-features { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.brand-features li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(255,255,255,.92); }
.brand-features .fa {
	width: 32px;
	height: 32px;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: rgba(255,255,255,.15);
	font-size: 14px;
}
.brand-foot { font-size: 13px; color: rgba(255,255,255,.72); }

/* Form panel */
.auth-main { flex: 1 1 48%; display: flex; flex-direction: column; padding: 40px 24px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; margin: auto; }
.auth-card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
.auth-sub { margin: 0 0 28px; color: var(--ink-2); }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; }
.control { position: relative; }
.control > .fa {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	color: var(--muted);
	pointer-events: none;
	transition: color .15s;
}
.control input {
	width: 100%;
	height: 48px;
	padding: 0 14px 0 42px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--field);
	font: inherit;
	color: var(--ink);
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.control input.has-toggle { padding-right: 48px; }
.control input::placeholder { color: var(--muted); }
.control input:focus { outline: none; border-color: var(--brand-600); background: #fff; box-shadow: 0 0 0 4px rgba(13,148,136,.15); }
.control:focus-within > .fa { color: var(--brand-600); }
.pass-toggle {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--muted);
	font-size: 16px;
	cursor: pointer;
}
.pass-toggle:hover { color: var(--ink-2); background: #eef2f6; }
.pass-toggle:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 1px; }

.auth-alert { display: none; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 500; }
.auth-alert .fa { margin-top: 3px; }
.auth-alert.is-error { display: flex; background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.auth-alert.is-success { display: flex; background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }

.btn-login {
	width: 100%;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
	color: #fff;
	font: inherit;
	font-size: 15.5px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(13,148,136,.28);
	transition: filter .15s, box-shadow .15s, transform .1s;
}
.btn-login:hover { filter: brightness(1.07); box-shadow: 0 10px 24px rgba(13,148,136,.34); }
.btn-login:active { transform: translateY(1px); }
.btn-login:focus-visible { outline: 3px solid rgba(13,148,136,.35); outline-offset: 2px; }
.btn-login[disabled] { cursor: progress; opacity: .85; }
.btn-login .fa-spinner, .btn-login.is-loading .fa-arrow-right { display: none; }
.btn-login.is-loading .fa-spinner { display: inline-block; }

.auth-secure { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-secure .fa { margin-right: 4px; }
.auth-foot { margin-top: 32px; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-foot a { color: var(--ink-2); font-weight: 600; }

@media (max-width: 1199px) {
	.auth-brand { padding: 36px 40px; }
	.brand-body h1 { font-size: 30px; }
}
@media (max-height: 820px) and (min-width: 992px) {
	.brand-body { margin: 24px 0; }
	.brand-body p { margin-bottom: 20px; }
	.brand-figure img { max-height: 170px; }
	.brand-features { margin-top: 20px; gap: 8px; }
}

/* Tablet and phone: brand becomes a header band, the form a card over it */
@media (max-width: 991px) {
	body { background: #f1f5f9; }
	.auth { flex-direction: column; }
	.auth-brand { flex: none; padding: 28px 16px 84px; }
	.brand-head { justify-content: center; }
	.brand-body, .brand-foot { display: none; }
	.auth-main { position: relative; z-index: 1; flex: 1 0 auto; margin-top: -56px; padding: 0 16px 20px; background: transparent; }
	.auth-card { margin: 0 auto; padding: 28px 22px; border-radius: 16px; background: #fff; box-shadow: 0 12px 32px rgba(15,23,42,.12); }
	.auth-card h2 { font-size: 22px; }
	.auth-sub { margin-bottom: 22px; font-size: 14px; }
	.auth-foot { margin-top: 24px; }
}
