/* ==========================================================================
   S1Edit Auth Experience (Přihlášení, 2FA, Registrace)
   Samostatné vyladěné styly bez vlivu na vnitřní editor dokumentů.
   ========================================================================== */

.auth-page {
	width: 100%;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: 0 clamp(1.25rem, 4vw, 4rem);
	box-sizing: border-box;
	background-color: var(--bg);
	background-image:
		radial-gradient(circle at 12% 15%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 45%),
		radial-gradient(circle at 88% 85%, rgba(56, 189, 248, 0.08), transparent 45%),
		radial-gradient(ellipse 60% 50% at 50% 50%, color-mix(in srgb, var(--primary) 5%, transparent), transparent 70%);
	position: relative;
}

/* Jemná mřížka na pozadí pro hloubku a zaplnění prostoru */
.auth-page::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	background-image: radial-gradient(color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px);
	background-size: 32px 32px;
	mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 40%, transparent 100%);
	opacity: 0.7;
	z-index: 0;
}

.auth-header,
.auth-experience,
.auth-footer {
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   Záhlaví (Header)
   -------------------------------------------------------------------------- */
.auth-header {
	width: min(100%, 1280px);
	min-height: 88px;
	padding-block: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.auth-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	color: var(--text);
	font-size: 1.3rem;
	font-weight: 750;
	text-decoration: none;
	letter-spacing: -0.035em;
	transition: opacity 0.15s ease;
}

.auth-brand:hover {
	color: var(--text);
	text-decoration: none;
	opacity: 0.9;
}

.auth-brand .auth-card__logo {
	position: relative;
	width: 44px;
	height: 44px;
	border-radius: 13px;
	font-size: 1.15rem;
	font-weight: 800;
	background: var(--primary);
	color: var(--on-primary);
	display: grid;
	place-items: center;
	box-shadow: 0 4px 16px var(--primary-glow);
}

.auth-brand__dot {
	position: absolute;
	right: 7px;
	top: 8px;
	width: 6px;
	height: 6px;
	background: #38bdf8;
	border-radius: 50%;
	box-shadow: 0 0 6px #38bdf8;
}

.auth-brand small {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--text-muted);
}

.auth-nav {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.auth-nav > a {
	color: var(--text-muted);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease;
}

.auth-nav > a:hover {
	color: var(--primary);
}

.auth-nav__home {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

/* --------------------------------------------------------------------------
   Hlavní panel (Experience Grid)
   -------------------------------------------------------------------------- */
.auth-experience {
	width: min(100%, 1280px);
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	margin-block: auto;
	border: 1px solid var(--border-strong);
	border-radius: 28px;
	box-shadow: 0 28px 80px -15px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.04);
	background: var(--surface);
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Levý sloupec (Story & Showcase)
   -------------------------------------------------------------------------- */
.auth-story {
	position: relative;
	min-width: 0;
	padding: clamp(2.25rem, 3.5vw, 3.75rem);
	overflow: hidden;
	color: #f0f5ff;
	background:
		radial-gradient(ellipse at 95% 65%, rgba(35, 76, 114, 0.95) 0%, transparent 60%),
		linear-gradient(145deg, #152744 0%, #0d192d 65%);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.auth-story::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.14;
	background-image:
		linear-gradient(#7099be 1px, transparent 1px),
		linear-gradient(90deg, #7099be 1px, transparent 1px);
	background-size: 40px 40px;
	mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 30%, transparent 100%);
}

.auth-story > * {
	position: relative;
	z-index: 1;
}

.auth-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.72rem;
	font-weight: 750;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 0 0 1rem;
}

.auth-story .auth-eyebrow {
	color: #93c5fd;
}

.auth-eyebrow > span {
	width: 7px;
	height: 7px;
	background: #34d399;
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

.auth-story h2 {
	font-size: clamp(2rem, 2.9vw, 2.85rem);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.04em;
	margin: 0;
}

.auth-story h2 > span {
	color: #60a5fa;
}

.auth-story__intro {
	max-width: 32rem;
	color: #b8c9df;
	font-size: 0.96rem;
	line-height: 1.7;
	margin: 1.25rem 0 1.75rem;
}

/* Interaktivní ukázka editoru a dokumentu */
.auth-preview {
	border: 1px solid rgba(119, 151, 187, 0.28);
	border-radius: 14px;
	background: rgba(13, 26, 44, 0.75);
	backdrop-filter: blur(8px);
	box-shadow: 0 20px 45px rgba(6, 18, 37, 0.45);
	margin-block: 0.5rem;
}

.auth-preview__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 1.15rem;
	border-bottom: 1px solid rgba(119, 151, 187, 0.2);
	color: #94a3b8;
	font-size: 0.72rem;
	font-weight: 600;
}

.auth-preview__dots {
	color: #475569;
	font-size: 0.55rem;
	letter-spacing: 0.15em;
}

.auth-preview__canvas {
	position: relative;
	padding: 1.5rem 2.25rem 0 4.25rem;
	height: 250px;
	overflow: hidden;
	border-radius: 0 0 14px 14px;
}

.auth-preview__rail {
	position: absolute;
	top: 1.5rem;
	left: 0.85rem;
	display: grid;
	gap: 0.45rem;
	color: #94a3b8;
}

.auth-preview__rail span {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	font-size: 0.95rem;
	border-radius: 7px;
	background: rgba(255, 255, 255, 0.04);
}

.auth-preview__rail span:first-child {
	color: #93c5fd;
	background: rgba(59, 130, 246, 0.25);
}

.auth-paper {
	max-width: 340px;
	min-height: 290px;
	margin-inline: auto;
	padding: 1.6rem 1.9rem;
	color: #1e293b;
	background: #ffffff;
	border: 1px solid #ffffff;
	border-radius: 6px 6px 0 0;
	transform: rotate(-2.5deg);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.auth-paper__top,
.auth-paper__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #64748b;
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}

.auth-paper__monogram {
	font-size: 0.8rem;
	font-weight: 800;
	color: #2563eb;
}

.auth-paper__title {
	margin-top: 1.35rem;
	font-size: 1.22rem;
	font-weight: 750;
	letter-spacing: -0.03em;
	color: #0f172a;
}

.auth-paper__subtitle {
	font-size: 0.7rem;
	margin-top: 0.3rem;
	color: #64748b;
}

.auth-paper__rule {
	height: 3px;
	width: 36px;
	background: #3b82f6;
	margin: 0.9rem 0;
	border-radius: 2px;
}

.auth-paper__line {
	height: 4px;
	border-radius: 2px;
	background: #e2e8f0;
	margin-top: 8px;
}

.auth-paper__line--short {
	width: 65%;
}

.auth-paper__table {
	display: grid;
	grid-template-columns: 1.8fr 1fr;
	gap: 1px;
	margin: 1rem 0;
	background: #cbd5e1;
	border: 1px solid #cbd5e1;
	border-radius: 3px;
	overflow: hidden;
}

.auth-paper__table span {
	height: 18px;
	background: #f8fafc;
}

.auth-paper__table span:nth-child(-n+2) {
	background: #edf2f7;
}

.auth-preview__note {
	position: absolute;
	right: 1rem;
	bottom: 1.25rem;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.65rem 0.9rem;
	color: #d1fae5;
	background: rgba(6, 78, 59, 0.9);
	border: 1px solid rgba(52, 211, 153, 0.4);
	border-radius: 9px;
	font-size: 0.72rem;
	font-weight: 650;
	box-shadow: 0 8px 25px rgba(4, 30, 24, 0.5);
}

.auth-preview__note > span {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	background: rgba(52, 211, 153, 0.25);
	color: #6ee7b7;
	border-radius: 50%;
	font-size: 0.75rem;
}

.auth-benefits {
	list-style: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	padding: 0;
	margin: 1.75rem 0 0;
}

.auth-benefits li {
	display: flex;
	gap: 0.75rem;
}

.auth-benefits li > span {
	color: #93c5fd;
	font-size: 0.7rem;
	font-weight: 700;
	padding-top: 0.15rem;
	font-family: var(--font-mono);
}

.auth-benefits strong {
	display: block;
	font-size: 0.85rem;
	font-weight: 650;
	color: #f8fafc;
}

.auth-benefits p {
	color: #94a3b8;
	font-size: 0.76rem;
	line-height: 1.6;
	margin: 0.25rem 0 0;
}

/* --------------------------------------------------------------------------
   Pravý sloupec (Formulář / Vstup)
   -------------------------------------------------------------------------- */
.auth-entry {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: clamp(2rem, 3.5vw, 3.75rem);
	background: var(--surface);
}

.auth-page .auth-shell {
	width: 100%;
	max-width: 420px;
	margin: auto;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.auth-page .auth-card {
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
}

.auth-card__heading {
	margin-bottom: 2rem;
}

.auth-entry__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-bottom: 1.5rem;
	background: var(--primary-soft);
	border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
	color: var(--primary);
	font-size: 1.4rem;
	font-weight: 700;
	border-radius: 14px;
	box-shadow: 0 4px 12px var(--primary-glow);
}

.auth-entry .auth-eyebrow {
	color: var(--text-muted);
	font-size: 0.7rem;
	margin-bottom: 0.6rem;
}

.auth-page .auth-card__title {
	font-size: clamp(1.75rem, 2.2vw, 2.15rem);
	letter-spacing: -0.04em;
	font-weight: 750;
	line-height: 1.2;
	margin: 0 0 0.65rem;
	color: var(--text);
}

.auth-page .auth-card__subtitle {
	font-size: 0.92rem;
	color: var(--text-muted);
	line-height: 1.6;
	margin: 0;
}

/* Formulářové prvky */
.auth-page .auth-form {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

.auth-page .auth-form .field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.auth-page .auth-form .field__label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--text);
}

.auth-page .auth-form .input,
.auth-page .auth-form select {
	min-height: 46px;
	border-radius: 10px;
	background: var(--bg);
	border: 1px solid var(--border-strong);
	color: var(--text);
	padding: 0.65rem 0.95rem;
	font-size: 0.92rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-page .auth-form .input:focus,
.auth-page .auth-form select:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-glow);
	outline: none;
}

.auth-page .auth-form .field__hint {
	color: var(--text-muted);
	font-size: 0.75rem;
	line-height: 1.55;
	margin: 0.2rem 0 0;
}

.auth-page .auth-form .checkbox {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--text-muted);
	font-size: 0.84rem;
	cursor: pointer;
	user-select: none;
}

.auth-page .auth-form .btn {
	min-height: 48px;
	border-radius: 10px;
	font-size: 0.92rem;
	font-weight: 650;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 0.35rem;
	cursor: pointer;
	box-shadow: 0 4px 14px var(--primary-glow);
	transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.auth-page .auth-form .btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px var(--primary-glow);
}

.auth-page .auth-form .btn:active {
	transform: translateY(0);
}

.auth-page .auth-card__hint {
	padding-top: 1.5rem;
	margin-top: 1.5rem;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 0.84rem;
	line-height: 1.6;
}

.auth-page .auth-card__hint a {
	color: var(--primary);
	font-weight: 650;
	text-decoration: none;
}

.auth-page .auth-card__hint a:hover {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Oznámení a Flashes (např. odhlášení)
   -------------------------------------------------------------------------- */
.auth-page .flashes {
	margin: 0 0 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.auth-page .flashes .alert {
	margin: 0;
	border-radius: 12px;
	font-size: 0.88rem;
	font-weight: 550;
	padding: 0.85rem 1.15rem;
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.auth-page .flashes .alert--success {
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.35);
	color: #10b981;
}

.auth-page .flashes .alert--success::before {
	content: '✓';
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	background: rgba(16, 185, 129, 0.2);
	border-radius: 50%;
	font-size: 0.8rem;
	font-weight: 700;
	flex-shrink: 0;
}

.auth-page .flashes .alert--error {
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.35);
	color: #ef4444;
}

/* --------------------------------------------------------------------------
   Zápatí (Footer)
   -------------------------------------------------------------------------- */
.auth-footer {
	width: min(100%, 1280px);
	padding-block: 1.5rem;
	min-height: 88px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.auth-footer__caption {
	color: var(--text-muted);
	font-size: 0.78rem;
	margin: 0;
}

.auth-footer__caption > span {
	margin-inline: 0.6rem;
	color: var(--border-strong);
}

.auth-footer__side {
	display: inline-flex;
	align-items: center;
	gap: 1.25rem;
}

/* Dropdown přepínače jazyků v patičce se otevírá směrem NAHORU */
.auth-footer .locale-switcher__dropdown {
	top: auto;
	bottom: calc(100% + 8px);
}

.auth-page .footer__partner-link {
	box-shadow: none;
}

/* --------------------------------------------------------------------------
   Responzivita a široké monitory
   -------------------------------------------------------------------------- */
@media (min-width: 1800px) {
	.auth-header,
	.auth-footer {
		width: min(100%, 1440px);
	}
	.auth-experience {
		width: min(85vw, 1440px);
	}
	.auth-story {
		padding: 4.25rem;
	}
	.auth-story h2 {
		font-size: 3.2rem;
	}
	.auth-preview__canvas {
		height: 290px;
	}
	.auth-paper {
		min-height: 320px;
		max-width: 380px;
		padding: 2rem 2.25rem;
	}
	.auth-story__intro {
		max-width: 34rem;
		font-size: 1.05rem;
	}
	.auth-page .auth-shell {
		max-width: 450px;
	}
}

@media (max-width: 1024px) {
	.auth-nav {
		gap: 1rem;
	}
	.auth-nav > a:first-child {
		display: none;
	}
	.auth-story {
		padding: 2.25rem 2rem;
	}
	.auth-preview__canvas {
		padding-left: 3.25rem;
		padding-right: 1rem;
	}
	.auth-paper {
		padding: 1.5rem;
	}
	.auth-benefits {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}

@media (max-width: 768px) {
	.auth-page {
		padding-inline: 1rem;
	}
	.auth-header {
		min-height: 72px;
		gap: 1rem;
	}
	.auth-brand small,
	.auth-nav__home {
		display: none;
	}
	.auth-experience {
		display: flex;
		flex-direction: column;
		border-radius: 20px;
		margin-block: 0.75rem;
	}
	.auth-entry {
		padding: 2rem 1.5rem;
	}
	.auth-story {
		padding: 2rem 1.5rem;
		border-radius: 0 0 20px 20px;
	}
	.auth-story h2 {
		font-size: 2rem;
	}
	.auth-story__intro {
		max-width: 100%;
	}
	.auth-preview {
		display: none;
	}
	.auth-benefits {
		grid-template-columns: 1fr;
	}
	.auth-entry__icon {
		display: none;
	}
	.auth-card__heading {
		margin-bottom: 1.5rem;
	}
	.auth-footer {
		flex-direction: column;
		justify-content: center;
		text-align: center;
		gap: 1rem;
		padding-block: 1.5rem;
	}
	.auth-footer__caption {
		text-align: center;
	}
	.auth-footer__side {
		flex-wrap: wrap;
		justify-content: center;
	}
}
