/* =============================================================================
   DASHTAR AUTH - Authentication Pages Styles
   Login, Register, Forgot Password
   ============================================================================= */

body.auth-page {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* -----------------------------------------------------------------------------
   SPLIT LAYOUT
   ----------------------------------------------------------------------------- */
.auth-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Left Side: Branding */
.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(80px);
}

.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    filter: blur(80px);
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
}

.brand-content h1 {
    font-weight: 800;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.brand-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.brand-img {
    margin-top: 3rem;
    width: 80%;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
}

/* Right Side: Form */
.auth-form-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-card);
    padding: 2rem;
    position: relative;
    transition: background-color var(--transition-speed);
}

.form-card {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-logo a {
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-logo i {
    color: var(--primary-color);
}

/* Auth Form Controls */
.auth-page .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.auth-page .form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    border-radius: 0.5rem;
}

.auth-page .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.auth-page .btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    padding: 0.8rem;
    font-weight: 600;
    width: 100%;
    border-radius: 0.5rem;
    transition: 0.2s;
    color: white;
}

.auth-page .btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: white;
}

.social-btn {
    width: 100%;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    transition: 0.2s;
    margin-bottom: 0.75rem;
}

.social-btn:hover {
    background-color: var(--input-bg);
    border-color: var(--text-muted);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 10px;
}

.toggle-link {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.toggle-link:hover {
    text-decoration: underline;
}

/* Dark Mode Toggle Position */
.theme-switch {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: 0.2s;
}

.theme-switch:hover {
    background-color: var(--border-color);
}

/* View Switching logic */
.view-section {
    display: none;
    animation: authFadeIn 0.4s ease-in-out;
}

.view-section.active {
    display: block;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -----------------------------------------------------------------------------
   FORGOT PASSWORD CENTERED CARD
   ----------------------------------------------------------------------------- */
body.auth-centered {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    text-align: center;
    transition: background-color var(--transition-speed);
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem auto;
}

.back-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1.5rem;
    display: inline-block;
    transition: 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Background Pattern */
.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* -----------------------------------------------------------------------------
   ERROR PAGES (404 / Access Denied)
   ----------------------------------------------------------------------------- */
body.error-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.error-container {
    max-width: 600px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.error-code {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    user-select: none;
}

.error-illustration {
    font-size: 8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
    animation: errorFloat 3s ease-in-out infinite;
}

@keyframes errorFloat {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.error-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.error-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Responsive Auth */
@media (max-width: 992px) {
    .auth-brand {
        display: none;
    }

    .auth-form-wrapper {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .error-code {
        font-size: 6rem;
    }

    .error-title {
        font-size: 1.8rem;
    }

    .btn-outline-custom {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
        width: 100%;
    }

    .btn-primary-custom {
        width: 100%;
        justify-content: center;
    }
}
