/* ============================================
   AUTH PAGES CUSTOM STYLES
   ============================================ */

/* Page Loading Animation */
.page-loading {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.4s 0.2s ease-in-out;
    background-color: #ffffff;
    visibility: hidden;
    z-index: 9999;
}
.page-loading.active {
    opacity: 1;
    visibility: visible;
}
.page-loading-inner {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    transform: translateY(-50%);
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}
.page-loading.active > .page-loading-inner {
    opacity: 1;
}

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    position: relative;
}

.loading-animation .circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    mix-blend-mode: overlay;
    animation: rotateCircle 1.5s linear infinite;
}

.loading-animation .circle:nth-child(1) {
    border-top-color: #2563eb;
    animation-delay: 0s;
}
.loading-animation .circle:nth-child(2) {
    border-right-color: #60a5fa;
    animation-delay: 0.2s;
}
.loading-animation .circle:nth-child(3) {
    border-bottom-color: #3b82f6;
    animation-delay: 0.4s;
}
.loading-animation .circle:nth-child(4) {
    border-left-color: #60a5fa;
    animation-delay: 0.6s;
}

.loading-animation .core {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #60a5fa, #1e40af);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    animation: pulse 1s ease-in-out infinite alternate;
}

.page-loading .text {
    color: #2563eb;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    background: linear-gradient(90deg, #1e40af, #60a5fa, #1e40af);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 2s linear infinite;
}

@keyframes rotateCircle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    from { transform: scale(0.8); opacity: 0.8; }
    to { transform: scale(1.2); opacity: 1; }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Animations */
.floating {
    animation: floating 3s ease-in-out infinite;
}
.floating-slow {
    animation: floating 6s ease-in-out infinite;
}
.floating-slower {
    animation: floating 8s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    transition: all 0.3s ease;
}
.input-wrapper:focus-within {
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 1rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}
.input-wrapper:focus-within .input-icon {
    color: #2563eb;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    background: #f9fafb;
}

/* Auth Left Side - Branding */
.auth-branding {
    display: none;
    width: 50%;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    position: relative;
    overflow: hidden;
}

.auth-branding .bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.1;
}

.auth-branding .bg-shapes .shape {
    position: absolute;
    background: white;
    border-radius: 50%;
    mix-blend-mode: overlay;
}

.auth-branding .bg-shapes .shape-1 {
    top: 25%;
    left: 25%;
    width: 16rem;
    height: 16rem;
}
.auth-branding .bg-shapes .shape-2 {
    bottom: 33%;
    right: 25%;
    width: 24rem;
    height: 24rem;
}
.auth-branding .bg-shapes .shape-3 {
    top: 66%;
    left: 33%;
    width: 10rem;
    height: 10rem;
}
.auth-branding .bg-shapes .grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.auth-branding .branding-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: white;
    padding: 3rem;
    z-index: 10;
}

.auth-branding .branding-content .logo {
    margin-bottom: 1.5rem;
    height: 4rem;
    filter: brightness(0) invert(1);
}

.auth-branding .branding-content h1 {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-branding .branding-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 28rem;
    text-align: center;
    color: rgba(255,255,255,0.8);
}

.auth-branding .branding-content .features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 28rem;
}

.auth-branding .branding-content .features-grid .feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-branding .branding-content .features-grid .feature-item .icon-box {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-branding .branding-content .features-grid .feature-item .icon-box i {
    font-size: 1.25rem;
}

/* Auth Right Side - Form */
.auth-form-side {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 3rem;
}

.auth-form-side .form-container {
    width: 100%;
    max-width: 28rem;
}

.auth-form-side .form-container .mobile-logo {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
}
.auth-form-side .form-container .mobile-logo img {
    height: 3rem;
    margin: 0 auto;
}

.auth-form-side .form-container .auth-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    overflow: hidden;
}

.auth-form-side .form-container .auth-card .card-header {
    padding: 2rem 2rem 1.5rem;
}

.auth-form-side .form-container .auth-card .card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.auth-form-side .form-container .auth-card .card-header p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.auth-form-side .form-container .auth-card .card-body {
    padding: 0 2rem 2rem;
}

.auth-form-side .form-container .auth-card .card-body .form-group {
    margin-bottom: 1.5rem;
}

.auth-form-side .form-container .auth-card .card-body .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper .relative {
    position: relative;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 1rem;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper input.is-invalid {
    border-color: #ef4444;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper .input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0.75rem;
    color: #94a3b8;
    transition: color 0.3s;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper:focus-within .input-icon {
    color: #2563eb;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper .toggle-password {
    position: absolute;
    inset-y: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding-right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper .toggle-password:hover {
    color: #4b5563;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper .toggle-password .hide-pwd {
    display: none;
}

.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper .toggle-password.show .hide-pwd {
    display: inline;
}
.auth-form-side .form-container .auth-card .card-body .form-group .input-wrapper .toggle-password.show .show-pwd {
    display: none;
}

.auth-form-side .form-container .auth-card .card-body .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-form-side .form-container .auth-card .card-body .form-options .checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
}

.auth-form-side .form-container .auth-card .card-body .form-options .checkbox-label input[type="checkbox"] {
    border-radius: 0.25rem;
    border-color: #d1d5db;
    color: #2563eb;
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
}

.auth-form-side .form-container .auth-card .card-body .form-options .forgot-link {
    font-size: 0.875rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.auth-form-side .form-container .auth-card .card-body .form-options .forgot-link:hover {
    color: #1d4ed8;
}

.auth-form-side .form-container .auth-card .card-body .btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.auth-form-side .form-container .auth-card .card-body .btn-primary:hover {
    background: #1d4ed8;
}

.auth-form-side .form-container .auth-card .card-body .btn-secondary {
    width: 100%;
    padding: 0.75rem;
    background: #f3f4f6;
    color: #1f2937;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.auth-form-side .form-container .auth-card .card-body .btn-secondary:hover {
    background: #e5e7eb;
}

.auth-form-side .form-container .auth-card .card-body .btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.auth-form-side .form-container .auth-footer {
    margin-top: 2rem;
    text-align: center;
}

.auth-form-side .form-container .auth-footer p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.auth-form-side .form-container .auth-footer p a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.auth-form-side .form-container .auth-footer p a:hover {
    color: #1d4ed8;
}

/* Alert Messages */
.auth-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert-error p {
    margin: 0;
}

/* Responsive */
@media (min-width: 1024px) {
    .auth-branding {
        display: block;
    }
    .auth-form-side .form-container .mobile-logo {
        display: none;
    }
}

@media (max-width: 767px) {
    .auth-form-side {
        padding: 1.5rem;
    }
    .auth-form-side .form-container .auth-card .card-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    .auth-form-side .form-container .auth-card .card-body {
        padding: 0 1.5rem 1.5rem;
    }
    .auth-branding .branding-content h1 {
        font-size: 1.75rem;
    }
}

/* Additional Register Page Styles */
.auth-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert-error p {
    margin: 0;
}

.auth-alert-error p:not(:last-child) {
    margin-bottom: 0.25rem;
}

/* Progress Bar */
.progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Radio Cards */
.radio-card {
    cursor: pointer;
}

.radio-card input[type="radio"] {
    display: none;
}

/* Floating Animations */
.floating {
    animation: floating 3s ease-in-out infinite;
}

.floating-slow {
    animation: floating 6s ease-in-out infinite;
}

.floating-slower {
    animation: floating 8s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* PIN Verification Styles */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.pin-display {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}