/* =========================================================================
   KLF Full-Page Auth Form CSS
   Mobile-first, modern design
   ========================================================================= */

:root {
	--klf-accent: #1677FF;
	--klf-accent-dark: #0d47a1;
	--klf-bg: #f5f7fa;
	--klf-surface: #ffffff;
	--klf-border: #d9d9d9;
	--klf-text: #333333;
	--klf-text-muted: #888888;
	--klf-text-light: #aeb8c7;
	--klf-error: #ff4d4f;
	--klf-success: #16c72e;
	--klf-dark-section: #0f172a;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	background: var(--klf-bg);
	color: var(--klf-text);
	line-height: 1.6;
}

body {
	overflow-x: hidden;
}

/* =========================================================================
   PAGE WRAPPER & HERO
   ========================================================================= */

.klf-page-wrapper {
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.klf-hero-banner {
	width: 100%;
	height: auto;
	overflow: hidden;
	background: linear-gradient(135deg, var(--klf-accent), #06b6d4);
}

.klf-hero-banner img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* =========================================================================
   AUTH CONTAINER
   ========================================================================= */

.klf-auth-container {
	flex: 1;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

/* =========================================================================
   TABS
   ========================================================================= */

.klf-tabs {
	display: flex;
	background: var(--klf-surface);
	border: 1px solid var(--klf-border);
	border-radius: 12px 12px 0 0;
	margin-bottom: 0;
	overflow: hidden;
}

.klf-tab-btn {
	flex: 1;
	padding: 1rem;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	color: var(--klf-text-muted);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.klf-tab-btn:hover {
	background: rgba(22, 119, 255, 0.04);
	color: var(--klf-text);
}

.klf-tab-btn.klf-tab-active {
	color: var(--klf-accent);
	border-bottom-color: var(--klf-accent);
}

.klf-icon {
	font-size: 1rem;
}

/* =========================================================================
   FORMS
   ========================================================================= */

.klf-form {
	background: var(--klf-surface);
	padding: 2rem 1.5rem;
	border: 1px solid var(--klf-border);
	border-top: none;
	border-radius: 0 0 12px 12px;
	margin-bottom: 1.5rem;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0.9;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.klf-form-notice {
	margin: 0 0 1.5rem 0;
	font-size: 0.9rem;
	color: var(--klf-text-muted);
	padding: 0.75rem 1rem;
	background: rgba(22, 119, 255, 0.05);
	border-left: 3px solid var(--klf-accent);
	border-radius: 4px;
}

.klf-form-group {
	margin-bottom: 1.5rem;
}

.klf-form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--klf-text);
}

.klf-req {
	color: var(--klf-error);
	margin-left: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid var(--klf-border);
	border-radius: 10px;
	font-size: 1rem;
	color: var(--klf-text);
	background: var(--klf-surface);
	font-family: inherit;
	transition: all 0.3s ease;
	appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus {
	outline: none;
	border-color: var(--klf-accent);
	box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

input::placeholder {
	color: var(--klf-text-muted);
}

/* =========================================================================
   PASSWORD INPUT
   ========================================================================= */

.klf-password-input {
	position: relative;
	display: flex;
	align-items: center;
}

.klf-password-input input {
	flex: 1;
	padding-right: 2.75rem;
}

.klf-eye-btn {
	position: absolute;
	right: 1rem;
	background: none;
	border: none;
	font-size: 1.25rem;
	cursor: pointer;
	padding: 0.5rem;
	color: var(--klf-text-muted);
	transition: color 0.2s;
}

.klf-eye-btn:hover {
	color: var(--klf-accent);
}

/* =========================================================================
   PHONE INPUT
   ========================================================================= */

.klf-phone-input {
	display: flex;
	gap: 0.75rem;
	align-items: stretch;
}

.klf-country-select {
	flex: 0 0 120px;
	padding: 0.875rem 0.75rem !important;
	min-width: 0;
	background: var(--klf-surface);
}

.klf-phone-input input {
	flex: 1;
}

/* =========================================================================
   PASSWORD STRENGTH
   ========================================================================= */

.klf-password-strength {
	margin-bottom: 1.5rem;
}

.klf-password-strength label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	color: var(--klf-text);
}

.klf-strength-bar {
	width: 100%;
	height: 6px;
	background: #e8e8e8;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.klf-strength-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--klf-error), var(--klf-success));
	transition: width 0.3s ease;
	border-radius: 3px;
}

.klf-strength-text {
	font-size: 0.85rem;
	color: var(--klf-text-muted);
	display: inline-block;
}

/* =========================================================================
   CHECKBOX
   ========================================================================= */

.klf-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
	cursor: pointer;
	font-size: 0.95rem;
	color: var(--klf-text-muted);
}

.klf-checkbox input[type="checkbox"] {
	width: 22px;
	height: 22px;
	min-width: 22px;
	margin-top: 0.125rem;
	cursor: pointer;
	accent-color: var(--klf-accent);
}

.klf-checkbox a {
	color: var(--klf-accent);
	text-decoration: none;
}

.klf-checkbox a:hover {
	text-decoration: underline;
}

.klf-checkbox span {
	flex: 1;
	line-height: 1.5;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */

.klf-btn {
	width: 100%;
	padding: 1rem;
	border: none;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-family: inherit;
}

.klf-btn-primary {
	background: linear-gradient(135deg, var(--klf-accent), var(--klf-accent-dark));
	color: white;
	box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
	margin-bottom: 1.5rem;
}

.klf-btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4);
}

.klf-btn-primary:active {
	transform: translateY(0);
}

.klf-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* =========================================================================
   ACTION LINKS
   ========================================================================= */

.klf-action-links {
	display: flex;
	justify-content: space-around;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.klf-action-links a {
	color: var(--klf-accent);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	padding: 0.5rem;
	flex: 1;
	text-align: center;
	min-width: 90px;
	transition: all 0.2s;
}

.klf-action-links a:hover {
	color: var(--klf-accent-dark);
	text-decoration: underline;
}

/* =========================================================================
   ERROR MESSAGES
   ========================================================================= */

.klf-error {
	padding: 0.875rem;
	background: rgba(255, 77, 79, 0.1);
	border: 1px solid var(--klf-error);
	border-radius: 8px;
	color: var(--klf-error);
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
	animation: slideDown 0.3s ease;
}

.klf-error.klf-hidden {
	display: none;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* =========================================================================
   SUCCESS MESSAGE
   ========================================================================= */

.klf-done {
	text-align: center;
	padding: 2rem 1rem;
	animation: fadeIn 0.5s ease;
}

.klf-done b {
	display: block;
	font-size: 1.25rem;
	color: var(--klf-success);
	margin-bottom: 0.5rem;
	font-weight: 700;
}

.klf-done span {
	display: block;
	color: var(--klf-text-muted);
	font-size: 0.95rem;
}

/* =========================================================================
   DIRECT CONTACT SECTION
   ========================================================================= */

.klf-direct-contact {
	background: var(--klf-dark-section);
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding: 2rem 1.5rem;
	border-radius: 0 0 12px 12px;
	text-align: center;
	animation: fadeIn 0.3s ease;
}

.klf-direct-contact p {
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 1rem 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.klf-contact-buttons {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.klf-contact-btn {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.25rem;
	color: white;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	border: none;
}

.klf-zalo {
	background: #0084ff;
}

.klf-zalo:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 132, 255, 0.4);
}

.klf-telegram {
	background: #0088cc;
}

.klf-telegram:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 136, 204, 0.4);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (min-width: 768px) {
	.klf-auth-container {
		padding: 3rem 1.5rem;
		max-width: 560px;
	}

	.klf-form {
		padding: 2.5rem 2rem;
	}

	.klf-btn-primary {
		padding: 1.125rem;
		font-size: 1.05rem;
	}

	.klf-direct-contact {
		padding: 2.5rem 2rem;
	}
}

@media (min-width: 1024px) {
	.klf-auth-container {
		padding: 4rem 2rem;
		max-width: 600px;
	}

	.klf-form {
		padding: 3rem 2.5rem;
	}

	.klf-action-links {
		gap: 1.5rem;
	}

	.klf-action-links a {
		min-width: 120px;
	}
}

/* =========================================================================
   UTILITIES
   ========================================================================= */

.klf-hidden {
	display: none !important;
}

.klf-form-active {
	display: block !important;
}
