/* Login & dashboards */
.ws-auth {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 3rem 1.25rem;
	background-color: var(--ws-navy);
	background-image:
		radial-gradient(ellipse 80% 55% at 50% 0%, rgba(3, 105, 161, 0.35), transparent 70%),
		url("../images/auth-server-pattern.svg");
	background-position: center top, top left;
	background-repeat: no-repeat, repeat;
	background-size: auto, 140px 140px;
	background-attachment: fixed, fixed;
}

.ws-auth__card {
	width: 100%;
	max-width: 26rem;
	padding: 2rem;
	background: var(--ws-surface);
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius-lg);
	box-shadow: var(--ws-shadow);
}

.ws-auth__brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-bottom: 1.5rem;
}

.ws-auth__brand--image {
	gap: 0;
}

.ws-auth__brand--image .ws-logo__mark {
	width: min(100%, 12rem);
	height: 2.5rem;
	border-radius: 0;
}

.ws-auth__site {
	margin: 0;
	font-family: var(--ws-font-display);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--ws-ink);
}

.ws-auth__title {
	margin: 0 0 0.35rem;
	font-size: 1.65rem;
}

.ws-auth__lead {
	margin: 0 0 1.5rem;
	font-size: 0.98rem;
	color: var(--ws-muted);
}

.ws-auth__error {
	margin: 0 0 1rem;
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	font-size: 0.95rem;
}

.ws-auth__error--success {
	background: #ecfdf3;
	border-color: #bbf7d0;
	color: #166534;
}

.ws-auth__field {
	margin: 0 0 1rem;
}

.ws-auth__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--ws-ink);
}

.ws-auth__field input {
	width: 100%;
	min-height: 44px;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--ws-border);
	border-radius: 8px;
	font: inherit;
	box-sizing: border-box;
}

.ws-auth__field input:focus {
	outline: 2px solid var(--ws-primary);
	outline-offset: 2px;
}

.ws-auth__remember {
	margin: 0 0 1.25rem;
	font-size: 0.9rem;
}

.ws-auth__footer {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.65rem;
	margin: 1.75rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--ws-border);
	font-size: 0.92rem;
	text-align: center;
}

.ws-auth__footer a {
	display: block;
	padding: 0.35rem 0.5rem;
	text-decoration: none;
	color: var(--ws-primary);
}

.ws-auth__footer a:hover {
	text-decoration: underline;
}

.ws-auth__footer-primary {
	font-weight: 600;
}

.ws-auth__field--checkbox label {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	font-size: 0.88rem;
	line-height: 1.45;
	cursor: pointer;
}

.ws-auth__field--checkbox input {
	margin-top: 0.2rem;
	min-width: 1.125rem;
	min-height: 1.125rem;
}

.ws-auth__terms {
	margin: 1rem 0 0;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--ws-muted);
	text-align: center;
}

.ws-auth__terms a {
	color: var(--ws-primary);
}

.ws-auth__lead a {
	color: var(--ws-primary);
	font-weight: 600;
}

.ws-auth-header {
	padding: 1rem 1.25rem;
	text-align: center;
}

.ws-auth-header__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: #fff;
	font-weight: 600;
}

.ws-auth-header__logo--image {
	gap: 0;
}

.ws-auth-header__logo--image .ws-logo__mark {
	width: min(100%, 11rem);
	height: 2.25rem;
	border-radius: 0;
	box-shadow: none;
}

.ws-auth-header__name {
	font-family: var(--ws-font-display);
}

.ws-auth-footer {
	padding: 1rem 1.25rem 1.5rem;
	text-align: center;
}

.ws-auth-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.25rem;
	font-size: 0.88rem;
}

.ws-auth-footer__legal a {
	color: #94a3b8;
	text-decoration: none;
}

.ws-auth-footer__legal a:hover {
	color: #fff;
}

.ws-auth-footer__trading-as {
	margin: 0.75rem 0 0;
	max-width: 36rem;
	margin-left: auto;
	margin-right: auto;
	font-size: 0.72rem;
	line-height: 1.45;
	color: #64748b;
}

.ws-auth-footer__trading-as a {
	color: #94a3b8;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ws-auth-footer__trading-as a:hover {
	color: #cbd5e1;
}

body.ws-auth-page .ws-btn--lg {
	min-height: 48px;
}

/* Dashboard */
.ws-dashboard {
	padding: 2.5rem 0 4rem;
}

.ws-dashboard__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--ws-border);
}

.ws-dashboard__title {
	margin: 0 0 0.35rem;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.ws-dashboard__welcome {
	margin: 0;
	color: var(--ws-muted);
}

.ws-dashboard__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.ws-dashboard__card {
	padding: 1.5rem;
	background: var(--ws-surface);
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius-lg);
}

.ws-dashboard__card h2 {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
}

.ws-dashboard__card p {
	margin: 0 0 1rem;
}

.ws-dashboard__card .ws-btn {
	margin-top: auto;
}

.ws-dashboard__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

@media (max-width: 900px) {
	.ws-dashboard__grid {
		grid-template-columns: 1fr;
	}
}

/* Dual-portal modal */
body.ws-portal-modal-page .ws-header,
body.ws-portal-modal-page .ws-footer {
	display: none;
}

body.ws-portal-modal-page .ws-main {
	min-height: 100vh;
}

body.ws-login-page .ws-header,
body.ws-login-page .ws-footer {
	display: none;
}

body.ws-login-page .ws-main {
	min-height: 100vh;
}

.ws-portal-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.ws-portal-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.72);
	backdrop-filter: blur(4px);
}

.ws-portal-modal__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 44rem;
	padding: 2rem;
	background: var(--ws-surface);
	border-radius: var(--ws-radius-lg);
	box-shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
}

.ws-portal-modal__title {
	margin: 0 0 0.35rem;
	font-size: 1.5rem;
	text-align: center;
}

.ws-portal-modal__lead {
	margin: 0 0 1.5rem;
	text-align: center;
	color: var(--ws-muted);
}

.ws-portal-modal__cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.ws-portal-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 1.25rem;
	margin: 0;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: var(--ws-bg);
	text-align: left;
}

.ws-portal-card h2 {
	margin: 0 0 0.35rem;
	font-size: 1.1rem;
}

.ws-portal-card p {
	flex: 1;
	margin: 0 0 1rem;
	font-size: 0.92rem;
	color: var(--ws-muted);
}

.ws-portal-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: 0.75rem;
	border-radius: 10px;
	background: rgba(3, 105, 161, 0.1);
	color: var(--ws-primary);
}

.ws-portal-card__icon--admin {
	background: rgba(15, 23, 42, 0.08);
	color: var(--ws-navy);
}

.ws-portal-modal__signout {
	margin: 1.25rem 0 0;
	text-align: center;
	font-size: 0.9rem;
}

@media (max-width: 640px) {
	.ws-portal-modal__cards {
		grid-template-columns: 1fr;
	}
}
