/* ===========================
   Enhanced Auth Page Styles
   =========================== */

:root {
    --primary: #2962FF;
    --primary-dark: #0039CB;
    --secondary: #00C853;
    --error: #D32F2F;
    --success: #00C853;
    --warning: #FF6D00;
    --surface: #FFFFFF;
    --background: #F5F7FA;
    --text-primary: #212121;
    --text-secondary: #757575;
    --divider: #E0E0E0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.auth-card {
	width: 100%;
	max-width: 460px;
	background: var(--surface);
	border-radius: 24px;
	padding: 23px 30px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
	position: relative;
	z-index: 1;
	animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
	margin-bottom: 0;
}

.auth-logo .material-icons-round {
    color: var(--primary);
    filter: drop-shadow(0 4px 8px rgba(41, 98, 255, 0.3));
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

/* Enhanced Input with Icons */
.input-material {
	position: relative;
	margin-bottom: 12px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
    pointer-events: none;
}

.input-icon .material-icons-round {
    font-size: 22px;
}

.input-material input {
    width: 100%;
    padding: 14px 16px 14px 52px;
    border: 2px solid var(--divider);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: var(--surface);
    color: var(--text-primary);
}

.input-material input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.1);
}

.input-material label {
    position: absolute;
    left: 52px;
    top: 14px;
    font-size: 15px;
    color: var(--text-secondary);
    transition: all 0.3s;
    pointer-events: none;
    background: var(--surface);
    padding: 0 4px;
}

.input-material input:focus + label,
.input-material input:not(:placeholder-shown) + label {
    top: -10px;
    left: 48px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
    z-index: 2;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--primary);
}

.password-toggle .material-icons-round {
    font-size: 22px;
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: var(--divider);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    display: none;
}

.password-strength.active {
    display: block;
}

.password-strength::before {
    content: '';
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s;
}

.password-strength.weak::before {
    width: 33%;
    background: var(--error);
}

.password-strength.medium::before {
    width: 66%;
    background: var(--warning);
}

.password-strength.strong::before {
    width: 100%;
    background: var(--success);
}

/* Password Requirements */
.password-requirements {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.req-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.req-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.req-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.req-list li .material-icons-round {
    font-size: 18px;
    color: var(--error);
}

.req-list li.valid .material-icons-round {
    color: var(--success);
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--divider);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.custom-checkbox input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn-material {
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary-material {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(41, 98, 255, 0.3);
}

.btn-primary-material:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(41, 98, 255, 0.4);
    transform: translateY(-2px);
}

.w-100 {
    width: 100%;
}

/* Divider */
.auth-divider {
	position: relative;
	text-align: center;
	margin: 0 0 10px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--divider);
}

.auth-divider span {
    position: relative;
    background: var(--surface);
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

/* Links */
.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Alerts */
.alert-material {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border: none;
}

.alert-material .material-icons-round {
    font-size: 22px;
}

.alert-danger {
    background: rgba(211, 47, 47, 0.1);
    color: var(--error);
}

.alert-success {
    background: rgba(0, 200, 83, 0.1);
    color: var(--success);
}

/* Footer */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 576px) {
    .auth-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #fff;
	padding: 0;
	position: relative;
	overflow: hidden;
}
.auth-card {
	padding: 32px 24px;
	box-shadow: none;
	border-radius: 0;
}
    
    .auth-title {
        font-size: 24px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Loading State */
.btn-material.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-material.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}