/* ============================================
   InsightHub Auth Pages — Styles
   ============================================ */

:root {
	--ih-primary: #0F2A42;
	--ih-primary-hover: #1A3C5E;
	--ih-accent: #00C896;
	--ih-accent-hover: #00B385;
	--ih-text: #1A1A18;
	--ih-text-muted: #6B6960;
	--ih-text-hint: #9A9789;
	--ih-bg: #FFFFFF;
	--ih-bg-alt: #FAFAF8;
	--ih-bg-page: #FAFAF8;
	--ih-border: #E5E2DB;
	--ih-border-focus: #0F2A42;
	--ih-error: #EF4444;
	--ih-error-bg: rgba(239, 68, 68, 0.06);
	--ih-success: #10B981;
	--ih-success-bg: rgba(16, 185, 129, 0.06);
	--ih-radius: 10px;
	--ih-radius-lg: 14px;
	--ih-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	--ih-transition: 0.15s ease;
	--ih-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   Page Layout
   ============================================ */

.ih-auth-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 200px);
	background-color: var(--ih-bg-page);
	padding: 40px 0;
	font-family: var(--ih-font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.ih-auth-container {
	max-width: 440px;
	width: 100%;
	padding: 40px 20px;
}

.ih-auth-card {
	background: var(--ih-bg);
	padding: 40px;
	border-radius: var(--ih-radius-lg);
	box-shadow: var(--ih-shadow);
	border: 1px solid var(--ih-border);
}

/* ============================================
   Header / Branding
   ============================================ */

.ih-auth-header {
	text-align: center;
	margin-bottom: 32px;
}

.ih-auth-logo {
	max-height: 48px;
	width: auto;
	margin-bottom: 20px;
}

.ih-auth-site-name {
	font-family: var(--ih-font);
	font-size: 20px;
	font-weight: 700;
	color: var(--ih-primary);
	margin: 0 0 20px 0;
}

.ih-auth-title {
	font-family: var(--ih-font);
	font-size: 24px;
	font-weight: 700;
	color: var(--ih-text);
	margin: 0 0 8px 0;
	line-height: 1.3;
}

.ih-auth-subtitle {
	font-size: 14px;
	color: var(--ih-text-muted);
	line-height: 1.5;
	margin: 0;
}

/* ============================================
   Form Elements
   ============================================ */

.ih-auth-form {
	width: 100%;
}

.ih-form-group {
	margin-bottom: 20px;
}

.ih-form-label {
	display: block;
	font-family: var(--ih-font);
	font-size: 13px;
	font-weight: 600;
	color: var(--ih-text);
	margin-bottom: 6px;
}

.ih-required {
	color: var(--ih-error);
}

.ih-input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	font-family: var(--ih-font);
	font-size: 14px;
	border: 1px solid var(--ih-border);
	border-radius: var(--ih-radius);
	outline: none;
	transition: border var(--ih-transition), box-shadow var(--ih-transition);
	box-sizing: border-box;
	background: var(--ih-bg);
	color: var(--ih-text);
}

.ih-input::placeholder {
	color: var(--ih-text-hint);
}

.ih-input:focus {
	border-color: var(--ih-border-focus);
	box-shadow: 0 0 0 3px rgba(15, 42, 66, 0.08);
}

.ih-input.ih-input-error {
	border-color: var(--ih-error);
}

.ih-input-disabled {
	background: var(--ih-bg-alt);
	color: var(--ih-text-muted);
	cursor: not-allowed;
}

.ih-input-short {
	max-width: 120px;
}

.ih-select {
	appearance: auto;
}

/* ============================================
   Password Field
   ============================================ */

.ih-password-wrapper {
	position: relative;
}

.ih-password-wrapper .ih-input {
	padding-right: 44px;
}

.ih-password-toggle {
	position: absolute;
	right: 1px;
	top: 1px;
	bottom: 1px;
	width: 42px;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ih-text-muted);
	padding: 0;
	border-radius: 0 var(--ih-radius) var(--ih-radius) 0;
	transition: color var(--ih-transition);
}

.ih-password-toggle:hover {
	color: var(--ih-text);
}

/* ============================================
   Form Row (Remember Me / Forgot Password)
   ============================================ */

.ih-form-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ih-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--ih-text);
	cursor: pointer;
}

.ih-checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--ih-primary);
}

.ih-form-link {
	font-size: 14px;
	color: var(--ih-text-muted);
	text-decoration: none;
	transition: color var(--ih-transition);
}

.ih-form-link:hover {
	color: var(--ih-primary);
	text-decoration: underline;
}

.ih-form-link-primary {
	color: var(--ih-primary);
	font-weight: 600;
}

.ih-form-hint {
	font-size: 12px;
	color: var(--ih-text-hint);
	margin: 4px 0 0 0;
}

/* ============================================
   Buttons
   ============================================ */

.ih-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	border: none;
	border-radius: var(--ih-radius);
	font-family: var(--ih-font);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--ih-transition);
	text-decoration: none;
	gap: 0;
}

.ih-btn:hover {
	transform: scale(1.01);
}

.ih-btn-primary {
	background: var(--ih-primary);
	color: #ffffff;
}

.ih-btn-primary:hover:not(:disabled) {
	background: var(--ih-primary-hover);
}

.ih-btn-accent {
	background: var(--ih-accent);
	color: #ffffff;
}

.ih-btn-accent:hover:not(:disabled) {
	background: var(--ih-accent-hover);
}

.ih-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.ih-btn-google {
	background: #ffffff;
	color: #444444;
	border: 1px solid var(--ih-border);
	gap: 10px;
}

.ih-btn-google:hover:not(:disabled) {
	background: var(--ih-bg-alt);
	border-color: #bbbbbb;
}

.ih-btn-spinner {
	display: inline-flex;
	align-items: center;
}

/* ============================================
   Messages
   ============================================ */

.ih-error-message {
	padding: 12px 16px;
	background: var(--ih-error-bg);
	color: var(--ih-error);
	border-radius: var(--ih-radius);
	font-size: 14px;
	margin-bottom: 16px;
	animation: ih-fadeIn 0.3s ease;
	line-height: 1.4;
}

.ih-success-message {
	padding: 12px 16px;
	background: var(--ih-success-bg);
	color: var(--ih-success);
	border-radius: var(--ih-radius);
	font-size: 14px;
	margin-bottom: 16px;
	line-height: 1.4;
}

/* ============================================
   Divider
   ============================================ */

.ih-auth-divider {
	display: flex;
	align-items: center;
	margin: 24px 0;
	gap: 16px;
}

.ih-auth-divider::before,
.ih-auth-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--ih-border);
}

.ih-auth-divider span {
	font-size: 13px;
	color: var(--ih-text-hint);
	flex-shrink: 0;
}

/* ============================================
   Footer
   ============================================ */

.ih-auth-footer {
	text-align: center;
	margin-top: 24px;
	font-size: 14px;
	color: var(--ih-text-muted);
}

.ih-auth-footer p {
	margin: 0;
}

/* ============================================
   Step Indicator
   ============================================ */

.ih-steps-indicator {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin-bottom: 32px;
}

.ih-step {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ih-step-number {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ih-font);
	font-size: 13px;
	font-weight: 700;
	background: var(--ih-bg-alt);
	color: var(--ih-text-muted);
	border: 2px solid var(--ih-border);
	flex-shrink: 0;
	transition: all 0.3s ease;
}

.ih-step-active .ih-step-number {
	background: var(--ih-primary);
	color: #ffffff;
	border-color: var(--ih-primary);
}

.ih-step-done .ih-step-number {
	background: var(--ih-success);
	color: #ffffff;
	border-color: var(--ih-success);
}

.ih-step-label {
	font-size: 13px;
	color: var(--ih-text-muted);
}

.ih-step-active .ih-step-label {
	color: var(--ih-text);
	font-weight: 600;
}

.ih-step-connector {
	width: 40px;
	height: 2px;
	background: var(--ih-border);
	margin: 0 12px;
	flex-shrink: 0;
}

.ih-step-connector-active {
	background: var(--ih-success);
}

/* ============================================
   Password Strength Indicator
   ============================================ */

.ih-password-strength {
	margin-top: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.ih-strength-bar {
	flex: 1;
	height: 4px;
	background: var(--ih-bg-alt);
	border-radius: 2px;
	overflow: hidden;
}

.ih-strength-fill {
	height: 100%;
	border-radius: 2px;
	transition: width 0.3s ease, background-color 0.3s ease;
	width: 0;
}

.ih-strength-weak {
	background-color: var(--ih-error);
}

.ih-strength-fair {
	background-color: #F59E0B;
}

.ih-strength-good {
	background-color: var(--ih-success);
}

.ih-strength-strong {
	background-color: var(--ih-success);
}

.ih-strength-text {
	font-size: 12px;
	min-width: 50px;
}

.ih-strength-text-weak {
	color: var(--ih-error);
}

.ih-strength-text-fair {
	color: #F59E0B;
}

.ih-strength-text-good {
	color: var(--ih-success);
}

.ih-strength-text-strong {
	color: var(--ih-success);
}

/* ============================================
   Animation
   ============================================ */

@keyframes ih-fadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 480px) {
	.ih-auth-card {
		padding: 28px 20px;
	}

	.ih-auth-container {
		padding: 20px 12px;
	}

	.ih-form-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.ih-auth-title {
		font-size: 20px;
	}

	.ih-step-label {
		font-size: 12px;
	}

	.ih-step-connector {
		width: 28px;
		margin: 0 8px;
	}
}
