/**
 * GuiStock App SPA — Styles
 *
 * Page de connexion SPA full-page avec hash-routing.
 * Design system : Plus Jakarta Sans, bleu #2563EB, vert #73ED7C.
 *
 * @package GuiStock_Hub
 * @since   2.17.1
 */

/* ─── Layout ─────────────────────────────────────────── */
.gs-app {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	background: #F8FAFC;
	overflow: hidden;
}

/* ─── Background Decoration ──────────────────────────── */
.gs-app__bg {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}
.gs-app__bg-circle {
	position: absolute;
	border-radius: 50%;
	opacity: 0.07;
}
.gs-app__bg-circle--1 {
	width: 600px; height: 600px;
	background: #2563EB;
	top: -200px; right: -150px;
}
.gs-app__bg-circle--2 {
	width: 400px; height: 400px;
	background: #73ED7C;
	bottom: -100px; left: -100px;
}

/* ─── Screens ────────────────────────────────────────── */
.gs-app__screen {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	z-index: 1;
	padding: 20px;
}
.gs-app__screen--active {
	display: flex;
	animation: gsAppFadeIn 0.3s ease-out;
}

@keyframes gsAppFadeIn {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ─── Card ───────────────────────────────────────────── */
.gs-app__card {
	width: 100%;
	max-width: 400px;
	background: #fff;
	border-radius: 16px;
	padding: 36px 32px 28px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
	position: relative;
}

/* ─── Logo ───────────────────────────────────────────── */
.gs-app__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}

.gs-app__icon-circle {
	width: 56px; height: 56px;
	background: #EFF6FF;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

/* ─── Typography ─────────────────────────────────────── */
.gs-app__title {
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 6px;
	text-align: center;
	letter-spacing: -0.3px;
}
.gs-app__subtitle {
	font-size: 14px;
	color: #6B7280;
	margin: 0 0 24px;
	text-align: center;
	line-height: 1.5;
}

/* ─── Form ───────────────────────────────────────────── */
.gs-app__form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.gs-app__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.gs-app__label {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
}
.gs-app__label-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.gs-app__forgot {
	font-size: 12px;
	color: #2563EB;
	text-decoration: none;
	font-weight: 500;
}
.gs-app__forgot:hover { text-decoration: underline; }

/* ─── Inputs ─────────────────────────────────────────── */
.gs-app__input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid #D1D5DB;
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	color: #111827;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
	outline: none;
}
.gs-app__input:focus {
	border-color: #2563EB;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.gs-app__input::placeholder {
	color: #9CA3AF;
}

/* Phone group */
.gs-app__phone-group {
	display: flex;
	align-items: stretch;
}
.gs-app__phone-prefix {
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: #F3F4F6;
	border: 1.5px solid #D1D5DB;
	border-right: 0;
	border-radius: 10px 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: #6B7280;
	white-space: nowrap;
}
.gs-app__input--phone {
	border-radius: 0 10px 10px 0;
}

/* Password group */
.gs-app__password-group {
	position: relative;
}
.gs-app__password-group .gs-app__input {
	padding-right: 44px;
}
.gs-app__password-toggle {
	position: absolute;
	right: 10px; top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #9CA3AF;
	padding: 4px;
	display: flex;
}
.gs-app__password-toggle:hover { color: #6B7280; }

/* OTP input */
.gs-app__input--otp {
	width: 200px;
	padding: 14px;
	font-size: 24px;
	font-weight: 700;
	text-align: center;
	letter-spacing: 8px;
	margin: 4px auto;
	display: block;
}

/* ─── Buttons ────────────────────────────────────────── */
.gs-app__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px 20px;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}
.gs-app__btn:active { transform: scale(0.98); }
.gs-app__btn--primary {
	background: #2563EB;
	color: #fff;
}
.gs-app__btn--primary:hover { background: #1D4ED8; }
.gs-app__btn--primary:disabled {
	background: #93C5FD;
	cursor: not-allowed;
	transform: none;
}

.gs-app__btn-loader {
	animation: gsAppSpin 1s linear infinite;
}
@keyframes gsAppSpin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

/* Link buttons */
.gs-app__link-btn {
	background: none;
	border: none;
	color: #6B7280;
	font-size: 13px;
	cursor: pointer;
	text-decoration: underline;
	font-family: inherit;
	padding: 4px;
}
.gs-app__link-btn:hover { color: #374151; }
.gs-app__link-btn--muted {
	color: #9CA3AF;
	text-decoration: none;
	font-size: 12px;
}
.gs-app__link-btn--muted:hover { color: #6B7280; }

.gs-app__otp-actions {
	text-align: center;
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
}

/* ─── Alerts ─────────────────────────────────────────── */
.gs-app__alert {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 16px;
	text-align: center;
}
.gs-app__alert--error {
	background: #FEF2F2;
	color: #991B1B;
	border: 1px solid #FECACA;
}
.gs-app__alert--success {
	background: #ECFDF5;
	color: #065F46;
	border: 1px solid #A7F3D0;
}
.gs-app__alert--info {
	background: #EFF6FF;
	color: #1D4ED8;
	border: 1px solid #BFDBFE;
}

/* ─── Footer ─────────────────────────────────────────── */
.gs-app__footer {
	text-align: center;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #F3F4F6;
}
.gs-app__footer p {
	font-size: 13px;
	color: #6B7280;
	margin: 0;
}
.gs-app__footer a {
	color: #2563EB;
	font-weight: 600;
	text-decoration: none;
}
.gs-app__footer a:hover { text-decoration: underline; }

/* Brand footer */
.gs-app__brand-footer {
	position: fixed;
	bottom: 20px;
	left: 0; right: 0;
	text-align: center;
	font-size: 12px;
	color: #9CA3AF;
	z-index: 0;
}
.gs-app__brand-footer strong {
	color: #6B7280;
	font-weight: 600;
}

/* ─── Login Method Toggle ────────────────────────────── */
.gs-app__method-toggle {
	display: flex;
	background: #F1F5F9;
	border-radius: 10px;
	padding: 4px;
	margin-bottom: 20px;
	gap: 4px;
}
.gs-app__method-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 12px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #64748B;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}
.gs-app__method-btn:hover {
	color: #334155;
}
.gs-app__method-btn--active {
	background: #FFFFFF;
	color: #042A2D;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.gs-app__method-btn svg {
	flex-shrink: 0;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
	.gs-app__card {
		padding: 28px 20px 24px;
		border-radius: 12px;
		box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	}
	.gs-app__title { font-size: 20px; }
	.gs-app__bg-circle--1 { width: 300px; height: 300px; top: -100px; right: -80px; }
	.gs-app__bg-circle--2 { width: 200px; height: 200px; bottom: -50px; left: -50px; }
}

@media (max-height: 640px) {
	.gs-app__brand-footer { display: none; }
}

/* ─── DARK MODE (v3.2.0) ────────────────────────────── */
[data-theme="dark"] .gs-app {
	background: #111127;
}
[data-theme="dark"] .gs-app__card {
	background: #1e1e34;
	box-shadow: 0 4px 24px rgba(0,0,0,0.4);
	color: #e4e4e7;
}
[data-theme="dark"] .gs-app__title {
	color: #f4f4f5;
}
[data-theme="dark"] .gs-app__subtitle {
	color: #a1a1aa;
}
[data-theme="dark"] .gs-app__input {
	background: #2d2d44;
	border-color: #3d3d54;
	color: #e4e4e7;
}
[data-theme="dark"] .gs-app__input:focus {
	border-color: #01b5ba;
	box-shadow: 0 0 0 3px rgba(1,181,186,0.15);
}
[data-theme="dark"] .gs-app__input::placeholder {
	color: #6b7280;
}
[data-theme="dark"] .gs-app__link {
	color: #01b5ba;
}
[data-theme="dark"] .gs-app__bg-circle--1 {
	background: #01b5ba;
}
[data-theme="dark"] .gs-app__bg-circle--2 {
	background: #4ade80;
}
