/**
 * True Deal System - Auth Pages Styles
 * Complete styles for login, register, password-reset, profile pages.
 * Includes password visibility toggle styling.
 *
 * Design Tokens:
 *   Ink:      #0B0B0E
 *   Surface:  #111116
 *   Gold:     #D4AF37
 *   Red:      #E63946
 */

/* =========================================================
   1. WRAPPER
   ========================================================= */
.tds-auth-wrapper {
	max-width: 480px;
	margin: 48px auto;
	padding: 0 24px;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #9A9AA6;
	line-height: 1.65;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	direction: ltr;
}

.tds-auth-wrapper *,
.tds-auth-wrapper *::before,
.tds-auth-wrapper *::after {
	box-sizing: border-box;
}

/* =========================================================
   2. CARD
   ========================================================= */
.tds-auth-card {
	background: linear-gradient(170deg, #16161D 0%, #111116 60%, #0E0E13 100%);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 22px;
	padding: 44px 42px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.tds-auth-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 20%;
	right: 20%;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.7), transparent);
}

.tds-auth-card::after {
	content: "";
	position: absolute;
	top: -40%;
	right: -20%;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(212, 175, 55, 0.07) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
}

/* =========================================================
   3. HEADING
   ========================================================= */
.tds-auth-card h1 {
	color: #EDEDF2;
	font-size: 25px;
	font-weight: 800;
	text-align: center;
	margin: 0 0 8px;
	letter-spacing: -0.02em;
}

.tds-auth-card .subtitle {
	color: #9A9AA6;
	text-align: center;
	font-size: 14px;
	margin: 0 0 30px;
	position: relative;
	padding-bottom: 22px;
}

.tds-auth-card .subtitle::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 56px;
	height: 2px;
	background: linear-gradient(90deg, transparent, #D4AF37, transparent);
	border-radius: 2px;
}

/* =========================================================
   4. FORM GROUPS
   ========================================================= */
.tds-auth-card .form-group {
	margin-bottom: 20px;
	position: relative;
	z-index: 1;
}

.tds-auth-card .form-group label {
	display: block;
	color: #D4AF37;
	font-weight: 600;
	margin-bottom: 7px;
	font-size: 13px;
	letter-spacing: 0.02em;
}

/* =========================================================
   5. INPUTS
   ========================================================= */
.tds-auth-card .form-group input[type="text"],
.tds-auth-card .form-group input[type="email"],
.tds-auth-card .form-group input[type="tel"],
.tds-auth-card .form-group input[type="password"],
.tds-auth-card .form-group input[type="url"],
.tds-auth-card .form-group input[type="number"] {
	width: 100%;
	padding: 13px 17px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	color: #EDEDF2;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.6;
	min-height: 50px;
	color-scheme: dark;
	outline: none;
	transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.tds-auth-card .form-group input::placeholder {
	color: #565661;
}

.tds-auth-card .form-group input:hover {
	border-color: rgba(212, 175, 55, 0.3);
}

.tds-auth-card .form-group input:focus {
	border-color: #D4AF37;
	background: rgba(212, 175, 55, 0.04);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.tds-auth-card .form-group input.error {
	border-color: #E63946;
	box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.tds-auth-card .form-group input.success {
	border-color: #2ECC71;
	box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.12);
}

.tds-auth-card .form-group input:disabled {
	opacity: 0.55;
}

/* =========================================================
   6. PASSWORD FIELD WITH TOGGLE
   ========================================================= */
.tds-password-wrap {
	position: relative;
	display: block;
	width: 100%;
}

.tds-password-wrap input[type="password"],
.tds-password-wrap input[type="text"] {
	padding-right: 50px !important;
}

.tds-toggle-password {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 9px;
	color: #565661;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.25s ease, background 0.25s ease;
	outline: none;
	z-index: 2;
}

.tds-toggle-password:hover {
	color: #D4AF37;
	background: rgba(212, 175, 55, 0.08);
}

.tds-toggle-password:focus-visible {
	color: #D4AF37;
	background: rgba(212, 175, 55, 0.1);
	box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.tds-toggle-password svg {
	width: 18px;
	height: 18px;
	display: block;
	pointer-events: none;
}

.tds-toggle-password .icon-eye-off {
	display: none;
}

.tds-toggle-password.is-visible {
	color: #D4AF37;
}

.tds-toggle-password.is-visible .icon-eye {
	display: none;
}

.tds-toggle-password.is-visible .icon-eye-off {
	display: block;
}

/* =========================================================
   7. HINTS
   ========================================================= */
.tds-auth-card .form-group .hint {
	font-size: 12px;
	color: #9A9AA6;
	margin-top: 7px;
	line-height: 1.6;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tds-auth-card .form-group .hint::before {
	content: "ⓘ";
	font-size: 12px;
	color: #D4AF37;
	opacity: 0.75;
}

.tds-auth-card .form-group .hint.error {
	color: #FF8A93;
}

.tds-auth-card .form-group .hint.error::before {
	content: "✕";
	color: #E63946;
	opacity: 1;
}

.tds-auth-card .form-group .hint.success {
	color: #4ADE80;
}

.tds-auth-card .form-group .hint.success::before {
	content: "✓";
	color: #2ECC71;
	opacity: 1;
}

/* =========================================================
   8. CHECKBOX
   ========================================================= */
.tds-auth-card .form-group input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #D4AF37;
	cursor: pointer;
	flex-shrink: 0;
}

/* =========================================================
   9. BUTTON PRIMARY
   ========================================================= */
.tds-auth-card .btn-primary {
	width: 100%;
	padding: 15px;
	background: linear-gradient(135deg, #E63946 0%, #B91F2E 100%);
	color: #ffffff;
	border: none;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	box-shadow: 0 8px 24px rgba(230, 57, 70, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
	margin-top: 8px;
	position: relative;
	z-index: 1;
}

.tds-auth-card .btn-primary:hover {
	transform: translateY(-2px);
	background: linear-gradient(135deg, #F04552 0%, #D62637 100%);
	box-shadow: 0 12px 32px rgba(230, 57, 70, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tds-auth-card .btn-primary:active {
	transform: translateY(0);
}

.tds-auth-card .btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* =========================================================
   10. AUTH LINKS
   ========================================================= */
.tds-auth-card .auth-links {
	text-align: center;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 14px;
	color: #9A9AA6;
	position: relative;
	z-index: 1;
}

.tds-auth-card .auth-links a {
	color: #D4AF37;
	text-decoration: none;
	font-weight: 700;
	position: relative;
	display: inline-block;
	transition: color 0.3s;
}

.tds-auth-card .auth-links a::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 1px;
	background: #F5DE8F;
	transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.tds-auth-card .auth-links a:hover {
	color: #F5DE8F;
}

.tds-auth-card .auth-links a:hover::after {
	width: 100%;
}

/* =========================================================
   11. MESSAGES
   ========================================================= */
.tds-auth-card .message {
	padding: 14px 18px 14px 48px;
	border-radius: 12px;
	margin-bottom: 22px;
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.6;
	display: none;
	position: relative;
	z-index: 1;
}

.tds-auth-card .message::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	border-radius: 3px 0 0 3px;
}

.tds-auth-card .message::after {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
}

.tds-auth-card .message.error {
	display: block;
	background: rgba(230, 57, 70, 0.08);
	border: 1px solid rgba(230, 57, 70, 0.28);
	color: #FF8A93;
}

.tds-auth-card .message.error::before {
	background: #E63946;
}

.tds-auth-card .message.error::after {
	content: "!";
	background: rgba(230, 57, 70, 0.15);
	color: #FF8A93;
}

.tds-auth-card .message.success {
	display: block;
	background: rgba(46, 204, 113, 0.08);
	border: 1px solid rgba(46, 204, 113, 0.28);
	color: #4ADE80;
}

.tds-auth-card .message.success::before {
	background: #2ECC71;
}

.tds-auth-card .message.success::after {
	content: "✓";
	background: rgba(46, 204, 113, 0.15);
	color: #4ADE80;
}

/* =========================================================
   12. PROFILE AVATAR
   ========================================================= */
.tds-auth-card .profile-avatar {
	text-align: center;
	margin-bottom: 26px;
	position: relative;
	z-index: 1;
}

.tds-auth-card .profile-avatar .avatar {
	width: 88px;
	height: 88px;
	border-radius: 24px;
	background: linear-gradient(145deg, #F5DE8F, #B8912A);
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	font-weight: 800;
	color: #14100A;
	box-shadow: 0 12px 32px rgba(212, 175, 55, 0.3);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	overflow: hidden;
}

.tds-auth-card .profile-avatar .avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	display: block;
}

.tds-auth-card .profile-avatar .avatar:hover {
	transform: scale(1.05) rotate(-2deg);
	box-shadow: 0 16px 40px rgba(212, 175, 55, 0.4);
}

/* =========================================================
   13. PROFILE GRID
   ========================================================= */
.tds-profile-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	position: relative;
	z-index: 1;
}

/* =========================================================
   14. DIVIDER
   ========================================================= */
.tds-auth-card hr {
	border: none;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.25), transparent);
	margin: 30px 0;
	position: relative;
	z-index: 1;
}

/* =========================================================
   15. RESPONSIVE
   ========================================================= */
@media (max-width: 480px) {
	.tds-auth-wrapper {
		margin: 28px auto;
		padding: 0 16px;
	}

	.tds-auth-card {
		padding: 30px 24px;
		border-radius: 18px;
	}

	.tds-auth-card h1 {
		font-size: 21px;
	}

	.tds-auth-card .subtitle {
		font-size: 13px;
		margin-bottom: 24px;
	}

	.tds-auth-card .form-group {
		margin-bottom: 16px;
	}

	.tds-auth-card .form-group input[type="text"],
	.tds-auth-card .form-group input[type="email"],
	.tds-auth-card .form-group input[type="tel"],
	.tds-auth-card .form-group input[type="password"],
	.tds-auth-card .form-group input[type="url"],
	.tds-auth-card .form-group input[type="number"] {
		padding: 12px 15px;
		min-height: 46px;
	}

	.tds-password-wrap input[type="password"],
	.tds-password-wrap input[type="text"] {
		padding-right: 46px !important;
	}

	.tds-toggle-password {
		right: 6px;
		width: 32px;
		height: 32px;
	}

	.tds-toggle-password svg {
		width: 16px;
		height: 16px;
	}

	.tds-auth-card .btn-primary {
		padding: 14px;
	}

	.tds-profile-grid {
		grid-template-columns: 1fr;
	}

	.tds-auth-card .profile-avatar .avatar {
		width: 72px;
		height: 72px;
		font-size: 30px;
		border-radius: 20px;
	}
}