/* Tutor Sathi Auth UI
   Premium centralized auth design system
   Single source of truth for auth screens
*/

:root{
	--ts-primary: #2360EB;
	--ts-primary-dark: #1C54D1;
	--ts-primary-soft: #EAF1FF;
	--ts-primary-border: #C9D9FF;
	--ts-accent: #5C8FFF;

	--ts-pink-soft: #FFF4F9;
	--ts-pink-soft-2: #FFF8FC;
	--ts-pink-field-bg: #FFF8FC;
	--ts-pink-border: #F5C5DA;
	--ts-pink-border-strong: #EEA6C8;
	--ts-pink-shadow: rgba(236, 72, 153, 0.10);
	--ts-pink-shadow-strong: rgba(236, 72, 153, 0.16);

	--ts-text: #0F172A;
	--ts-text-soft: #1E293B;
	--ts-text-muted: #64748B;
	--ts-placeholder: #94A3B8;

	--ts-border: #D9E2F1;
	--ts-border-soft: #E9EFFA;
	--ts-bg: #F6F9FF;
	--ts-bg-soft: #FBFDFF;
	--ts-white: #FFFFFF;

	--ts-success-bg: #ECFDF5;
	--ts-success-text: #065F46;
	--ts-success-border: #A7F3D0;

	--ts-error-bg: #FEF2F2;
	--ts-error-text: #991B1B;
	--ts-error-border: #FECACA;

	--ts-warning-bg: #FFF7ED;
	--ts-warning-text: #C2410C;
	--ts-warning-border: #FED7AA;

	--ts-info-bg: #EFF6FF;
	--ts-info-text: #1D4ED8;
	--ts-info-border: #BFDBFE;

	--ts-btn-main-1: #EF4444;
	--ts-btn-main-2: #DC2626;
	--ts-btn-main-hover-1: #DC2626;
	--ts-btn-main-hover-2: #B91C1C;

	--ts-btn-soft-bg: #FDF4FA;
	--ts-btn-soft-text: #BE185D;
	--ts-btn-soft-border: #F5B6D2;
	--ts-btn-soft-hover: #FBCFE8;

	--ts-btn-warm-1: #F97316;
	--ts-btn-warm-2: #EA580C;
	--ts-btn-warm-hover-1: #EA580C;
	--ts-btn-warm-hover-2: #C2410C;

	--ts-radius-xs: 10px;
	--ts-radius-sm: 14px;
	--ts-radius-md: 20px;
	--ts-radius-lg: 28px;
	--ts-radius-xl: 34px;

	--ts-shadow-xs: 0 2px 6px rgba(15, 23, 42, 0.04);
	--ts-shadow-sm: 0 10px 26px rgba(35, 96, 235, 0.08);
	--ts-shadow-md: 0 16px 42px rgba(35, 96, 235, 0.12);
	--ts-shadow-lg: 0 24px 58px rgba(15, 23, 42, 0.14);
}

/* Base reset */
.ts-auth-wrap,
.ts-auth-wrap *{
	box-sizing: border-box;
}

.ts-auth-wrap a{
	text-decoration: none;
}

/* Main wrapper */
.ts-auth-wrap{
	max-width: 980px;
	margin: 28px auto;
	padding: 0 14px;
	position: relative;
}

.ts-auth-shell{
	background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,250,253,0.98) 100%);
	border: 1px solid var(--ts-pink-border);
	border-radius: var(--ts-radius-lg);
	box-shadow: var(--ts-shadow-lg);
	overflow: hidden;
	position: relative;
}

.ts-auth-shell::before{
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.ts-auth-header{
	position: relative;
	background:
		radial-gradient(circle at top right, rgba(255,255,255,0.16) 0, rgba(255,255,255,0.02) 34%, transparent 35%),
		radial-gradient(circle at bottom left, rgba(255,255,255,0.10) 0, rgba(255,255,255,0.02) 28%, transparent 29%),
		linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-accent) 100%);
	padding: 30px 26px;
	color: var(--ts-white);
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ts-auth-header::after{
	content: "";
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
}

.ts-auth-title{
	margin: 0 0 8px;
	font-size: 32px;
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--ts-white);
	text-wrap: balance;
}

.ts-auth-subtitle{
	margin: 0;
	font-size: 15px;
	line-height: 1.75;
	color: rgba(255,255,255,0.94);
	max-width: 760px;
}

.ts-auth-body{
	padding: 24px;
	background: linear-gradient(180deg, rgba(255,248,252,0.88) 0%, rgba(255,255,255,1) 100%);
}

/* Notices */
.ts-auth-notice{
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: 16px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.65;
	border: 1px solid transparent;
	box-shadow: var(--ts-shadow-xs);
}

.ts-auth-notice.is-success{
	background: var(--ts-success-bg);
	color: var(--ts-success-text);
	border-color: var(--ts-success-border);
}

.ts-auth-notice.is-error{
	background: var(--ts-error-bg);
	color: var(--ts-error-text);
	border-color: var(--ts-error-border);
}

.ts-auth-notice.is-info{
	background: var(--ts-info-bg);
	color: var(--ts-info-text);
	border-color: var(--ts-info-border);
}

#ts-register-notice{
	scroll-margin-top: 24px;
}

/* Forms */
.ts-auth-form{
	display: block;
}

/* Sections */
.ts-auth-section{
	background: linear-gradient(180deg, var(--ts-pink-soft) 0%, #FFFFFF 42%, var(--ts-pink-soft-2) 100%);
	border: 1px solid var(--ts-pink-border);
	border-radius: var(--ts-radius-md);
	padding: 20px;
	margin-bottom: 18px;
	box-shadow:
		var(--ts-shadow-sm),
		0 0 0 1px rgba(255,255,255,0.55) inset;
	position: relative;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ts-auth-section:hover{
	transform: translateY(-1px);
	box-shadow:
		var(--ts-shadow-md),
		0 10px 28px var(--ts-pink-shadow);
	border-color: var(--ts-pink-border-strong);
}

.ts-auth-section::before{
	content: "";
	position: absolute;
	left: 14px;
	top: 0;
	width: 74px;
	height: 2px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ts-primary) 0%, #9F67FF 52%, #EC4899 100%);
	opacity: 0.92;
}

.ts-auth-section-title{
	margin: 0 0 12px;
	font-size: 19px;
	line-height: 1.32;
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--ts-text);
}

.ts-auth-section-note{
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.75;
	color: var(--ts-text-muted);
}

.ts-auth-mini-card{
	background: linear-gradient(180deg, #FFFFFF 0%, var(--ts-pink-soft-2) 100%);
	border: 1px solid var(--ts-pink-border);
	border-radius: 18px;
	padding: 16px;
	box-shadow:
		var(--ts-shadow-sm),
		0 6px 18px rgba(236, 72, 153, 0.05);
	position: relative;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ts-auth-mini-card:hover{
	transform: translateY(-1px);
	box-shadow:
		var(--ts-shadow-md),
		0 10px 24px var(--ts-pink-shadow);
	border-color: var(--ts-pink-border-strong);
}

.ts-auth-mini-card .ts-auth-section-title{
	font-size: 17px;
	margin-bottom: 10px;
}

.ts-auth-mini-card .ts-auth-section-note{
	margin-top: 4px;
}

/* Grids */
.ts-auth-grid{
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.ts-auth-grid-1{
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

.ts-auth-grid-3{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.ts-auth-split{
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

/* Fields */
.ts-auth-field{
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
}

.ts-auth-label{
	font-size: 14px;
	font-weight: 800;
	color: var(--ts-text-soft);
	letter-spacing: 0;
}

.ts-auth-required{
	color: #E11D48;
	margin-left: 3px;
	font-weight: 800;
}

.ts-auth-help{
	font-size: 12px;
	line-height: 1.65;
	color: var(--ts-text-muted);
}

.ts-auth-help:empty{
	display: none;
}

#ts-mobile-status,
#ts-password-strength,
#ts-confirm-password-status{
	display: block;
	min-height: 18px;
	margin-top: 2px;
	padding-left: 2px;
	font-size: 12px;
	line-height: 1.6;
	font-weight: 700;
}

/* Inputs */
.ts-auth-input,
.ts-auth-select,
.ts-auth-textarea{
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid var(--ts-pink-border);
	border-radius: var(--ts-radius-sm);
	background: linear-gradient(180deg, var(--ts-pink-field-bg) 0%, #FFFFFF 100%);
	color: var(--ts-text);
	font-size: 14px;
	line-height: 1.5;
	outline: none;
	appearance: none;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.03),
		0 3px 10px rgba(236, 72, 153, 0.03);
}

.ts-auth-textarea{
	min-height: 100px;
	resize: vertical;
	padding-top: 13px;
	padding-bottom: 13px;
}

.ts-auth-input::placeholder,
.ts-auth-textarea::placeholder{
	color: var(--ts-placeholder);
}

.ts-auth-input:hover,
.ts-auth-select:hover,
.ts-auth-textarea:hover{
	border-color: var(--ts-pink-border-strong);
	box-shadow:
		0 4px 14px rgba(236, 72, 153, 0.07),
		0 2px 8px rgba(15, 23, 42, 0.04);
}

.ts-auth-input:focus,
.ts-auth-select:focus,
.ts-auth-textarea:focus{
	border-color: #EC4899;
	box-shadow:
		0 0 0 4px rgba(236, 72, 153, 0.10),
		0 8px 18px rgba(236, 72, 153, 0.10);
	background: #FFFFFF;
}

.ts-auth-input:focus-visible,
.ts-auth-select:focus-visible,
.ts-auth-textarea:focus-visible,
.ts-auth-btn:focus-visible{
	outline: none;
}

.ts-auth-input[readonly],
.ts-auth-select[readonly]{
	background: #F8FAFC;
	color: #64748B;
	cursor: not-allowed;
}

.ts-auth-input:invalid:not(:placeholder-shown),
.ts-auth-select:invalid:not(:placeholder-shown),
.ts-auth-textarea:invalid:not(:placeholder-shown){
	border-color: #FCA5A5;
	box-shadow:
		0 0 0 4px rgba(239, 68, 68, 0.08),
		0 6px 16px rgba(239, 68, 68, 0.06);
}

.ts-auth-input:valid:not(:placeholder-shown),
.ts-auth-select:valid:not(:placeholder-shown),
.ts-auth-textarea:valid:not(:placeholder-shown){
	border-color: #86EFAC;
	box-shadow:
		0 0 0 4px rgba(34, 197, 94, 0.07),
		0 6px 16px rgba(34, 197, 94, 0.05);
}

.ts-auth-select{
	background-image:
		linear-gradient(45deg, transparent 50%, #64748B 50%),
		linear-gradient(135deg, #64748B 50%, transparent 50%);
	background-position:
		calc(100% - 20px) calc(50% - 2px),
		calc(100% - 14px) calc(50% - 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 40px;
}

/* Class fee rows */
.ts-class-fee-list{
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ts-class-fee-row{
	display: grid;
	grid-template-columns: minmax(0, 1fr) 180px;
	gap: 12px;
	align-items: start;
}

.ts-class-fee-item{
	width: 100%;
}

.ts-class-fee-list .ts-auth-mini-card{
	padding: 16px;
}

.ts-remove-class-row{
	min-width: 150px;
}

/* Buttons */
.ts-auth-actions{
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 18px;
}

.ts-auth-btn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 13px 24px;
	border: 1px solid transparent;
	border-radius: 14px;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition:
		transform .18s ease,
		box-shadow .18s ease,
		background .18s ease,
		color .18s ease,
		border-color .18s ease,
		filter .18s ease;
	-webkit-appearance: none;
	appearance: none;
	white-space: nowrap;
}

.ts-auth-btn:hover{
	transform: translateY(-1px);
	filter: saturate(1.04);
}

.ts-auth-btn:active{
	transform: translateY(0);
}

.ts-auth-btn:focus{
	outline: none;
	box-shadow: 0 0 0 4px rgba(35, 96, 235, 0.12);
}

.ts-auth-btn-primary{
	background: linear-gradient(135deg, var(--ts-btn-main-1) 0%, var(--ts-btn-main-2) 100%);
	color: #ffffff !important;
	border-color: rgba(220, 38, 38, 0.28);
	box-shadow: 0 12px 24px rgba(220, 38, 38, 0.20);
}

.ts-auth-btn-primary:hover{
	background: linear-gradient(135deg, var(--ts-btn-main-hover-1) 0%, var(--ts-btn-main-hover-2) 100%);
	color: #ffffff !important;
}

.ts-auth-btn-primary:visited,
.ts-auth-btn-secondary:visited,
.ts-auth-btn-warm:visited{
	color: inherit;
}

.ts-auth-btn-secondary{
	background: linear-gradient(180deg, #FDF4FA 0%, #FCE7F3 100%);
	color: #BE185D !important;
	border-color: #F5B6D2;
	box-shadow: 0 8px 18px rgba(236, 72, 153, 0.10);
}

.ts-auth-btn-secondary:hover{
	background: linear-gradient(180deg, #FCE7F3 0%, #FBCFE8 100%);
	color: #9D174D !important;
}

.ts-auth-btn-warm{
	background: linear-gradient(135deg, var(--ts-btn-warm-1) 0%, var(--ts-btn-warm-2) 100%);
	color: #ffffff !important;
	border-color: rgba(234, 88, 12, 0.22);
	box-shadow: 0 12px 24px rgba(234, 88, 12, 0.18);
}

.ts-auth-btn-warm:hover{
	background: linear-gradient(135deg, var(--ts-btn-warm-hover-1) 0%, var(--ts-btn-warm-hover-2) 100%);
	color: #ffffff !important;
}

.ts-auth-btn-block{
	width: 100%;
}

/* Utility */
.ts-auth-muted{
	color: var(--ts-text-muted);
}

.ts-auth-divider{
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, var(--ts-border) 20%, #F3C8DB 50%, var(--ts-border) 80%, transparent 100%);
	margin: 18px 0;
}

.ts-auth-code-box{
	font-size: 24px;
	font-weight: 900;
	letter-spacing: 4px;
	color: var(--ts-primary-dark);
	line-height: 1.1;
}

.ts-auth-link-row{
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
}

.ts-auth-link-row a{
	color: var(--ts-primary-dark);
	font-weight: 700;
}

.ts-auth-link-row a:hover{
	color: var(--ts-primary);
}

/* Compact login page */
.ts-auth-wrap--login{
	max-width: 760px;
}

.ts-auth-login-layout{
	max-width: 640px;
	margin: 0 auto;
}

.ts-auth-login-layout .ts-auth-notice{
	margin-bottom: 16px;
}

.ts-auth-login-card{
	padding: 24px;
	margin-bottom: 0;
}

.ts-auth-login-main-title{
	margin: 0 0 18px;
	text-align: center;
	font-size: 32px;
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #E91E63;
}

.ts-auth-inline-links{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.ts-auth-inline-link{
	font-size: 14px;
	font-weight: 700;
	color: var(--ts-text-soft);
}

.ts-auth-inline-link:hover{
	color: var(--ts-primary-dark);
}

.ts-auth-inline-link--accent{
	color: #E91E63;
}

.ts-auth-inline-link--accent:hover{
	color: #C2185B;
}

.ts-auth-or-row{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 20px 0 22px;
	color: var(--ts-text-muted);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.ts-auth-or-row::before,
.ts-auth-or-row::after{
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, #E5E7EB 100%);
}

.ts-auth-or-row::after{
	background: linear-gradient(90deg, #E5E7EB 0%, transparent 100%);
}

.ts-auth-otp-block{
	margin-top: 4px;
}

.ts-auth-otp-title{
	margin: 0 0 10px;
	text-align: center;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 700;
	color: #E91E63;
}

.ts-auth-otp-note{
	margin: 0 0 18px;
	text-align: center;
	font-size: 13px;
	line-height: 1.8;
	color: var(--ts-text-muted);
}

.ts-auth-password-wrap{
	position: relative;
}

.ts-auth-password-wrap .ts-auth-input{
	padding-right: 52px;
}

.ts-auth-password-toggle{
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	color: var(--ts-text-muted);
}

.ts-auth-password-toggle:hover{
	color: var(--ts-primary-dark);
}

.ts-auth-password-toggle:focus{
	outline: none;
	box-shadow: none;
}

.ts-auth-login-card .ts-auth-actions{
	margin-top: 16px;
}

.ts-auth-login-card .ts-auth-btn{
	width: 100%;
}

.ts-auth-verify-box{
	margin-top: 18px;
	padding: 16px;
	border: 1px solid var(--ts-pink-border);
	border-radius: 18px;
	background: linear-gradient(180deg, #FFF8FC 0%, #FFFFFF 100%);
	box-shadow: 0 8px 20px rgba(236, 72, 153, 0.06);
}

.ts-auth-otp-help{
	text-align: center;
	margin-top: 8px;
}

.ts-auth-otp-info-card{
	margin-top: 20px;
	text-align: center;
}

.ts-auth-otp-info-card .ts-auth-section-note{
	margin: 0;
	font-size: 13px;
	line-height: 1.8;
}

/* Medium */
@media (max-width: 991px){
	.ts-auth-wrap{
		max-width: 940px;
	}

	.ts-auth-title{
		font-size: 28px;
	}

	.ts-auth-body{
		padding: 20px;
	}

	.ts-auth-section{
		padding: 18px;
	}
}

/* Mobile */
@media (max-width: 767px){
	.ts-auth-wrap{
		margin: 18px auto;
		padding: 0 10px;
	}

	.ts-auth-shell{
		border-radius: 22px;
	}

	.ts-auth-header{
		padding: 22px 18px;
	}

	.ts-auth-title{
		font-size: 24px;
		line-height: 1.18;
	}

	.ts-auth-subtitle{
		font-size: 14px;
		line-height: 1.7;
	}

	.ts-auth-body{
		padding: 16px;
	}

	.ts-auth-section{
		padding: 16px;
		border-radius: 18px;
	}

	.ts-auth-mini-card{
		padding: 14px;
		border-radius: 16px;
	}

	.ts-auth-grid,
	.ts-auth-grid-3,
	.ts-auth-split{
		grid-template-columns: 1fr;
	}

	.ts-class-fee-row{
		grid-template-columns: 1fr;
	}

	.ts-auth-actions{
		flex-direction: column;
	}

	.ts-auth-btn{
		width: 100%;
		min-height: 48px;
	}

	.ts-auth-code-box{
		font-size: 22px;
		letter-spacing: 3px;
	}

	.ts-auth-login-card{
		padding: 18px;
	}

	.ts-auth-login-main-title{
		font-size: 24px;
		margin-bottom: 16px;
	}

	.ts-auth-otp-title{
		font-size: 22px;
	}

	.ts-auth-inline-links{
		flex-direction: row;
		justify-content: space-between;
		gap: 10px;
	}

	.ts-auth-inline-link{
		font-size: 13px;
	}

	.ts-auth-verify-box{
		padding: 14px;
	}
}

/* Small mobile */
@media (max-width: 479px){
	.ts-auth-wrap{
		padding: 0 8px;
	}

	.ts-auth-header{
		padding: 20px 16px;
	}

	.ts-auth-body{
		padding: 14px;
	}

	.ts-auth-title{
		font-size: 22px;
	}

	.ts-auth-section-title{
		font-size: 17px;
	}

	.ts-auth-label{
		font-size: 13px;
	}

	.ts-auth-input,
	.ts-auth-select,
	.ts-auth-textarea{
		font-size: 14px;
		min-height: 48px;
	}

	.ts-auth-inline-links{
		flex-direction: column;
		align-items: flex-start;
	}

	.ts-auth-login-main-title{
		font-size: 22px;
	}

	.ts-auth-otp-title{
		font-size: 20px;
	}
}