/* Authentication Pages Specific Styles */

/* Login Hero Section */

.login-hero {
    min-height: 100vh;
    background: linear-gradient(
        135deg,
        var(--color-dominant-tertiary) 0%,
        var(--border-medium) 100%
    );
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgb(52 73 94 / 5%) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.login-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgb(108 117 125 / 5%) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Hero Content */

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    color: var(--dark);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgb(234 139 44 / 10%);
    color: var(--orange);
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
    border: 1px solid rgb(234 139 44 / 20%);
}

.hero-badge i {
    font-size: 1.1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-features .feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgb(0 0 0 / 10%);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.hero-features .feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgb(234 139 44 / 15%);
}

.hero-features .feature-item i {
    color: var(--orange);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.hero-features .feature-item span {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

/* Auth Container */

.auth-container {
    position: relative;
    z-index: 2;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgb(0 0 0 / 10%);
    padding: 40px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgb(255 255 255 / 20%);
    backdrop-filter: blur(10px);
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgb(0 0 0 / 15%);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: var(--color-dominant-tertiary);
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--text-muted-dark);
    font-size: 2rem;
    box-shadow: 0 10px 30px rgb(0 0 0 / 10%);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
}

/* Form Styles */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border: 2px solid var(--border-medium);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-clip: padding-box;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
    width: 100%;
}

.form-control:focus {
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border-color: #86b7fe; /* Bootstrap blue focus - keep for form focus */
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
}

.form-control.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 0.2rem rgb(220 53 69 / 25%);
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    background-color: var(--color-dominant-tertiary);
    border: 2px solid var(--border-medium);
    border-right: none;
    color: var(--text-muted-dark);
    padding: 12px 16px;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    transition: all 0.15s ease-in-out;
    font-size: 1rem;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0;
    flex: 1;
    border: 2px solid var(--border-medium);
}

/* Password input with toggle button - rounded edges */
.input-group .form-control.password-input {
    border-left: none;
    border-right: 2px solid var(--border-medium) !important;
    border-top: 2px solid var(--border-medium);
    border-bottom: 2px solid var(--border-medium);
    border-radius: 0;
}

/* Ensure input-group-text has rounded left edge */

.input-group-text:first-child {
    border-radius: 8px 0 0 8px;
}

/* Ensure password toggle button has rounded right edge */

.input-group .password-toggle:last-child {
    border-radius: 0 8px 8px 0;
}

.input-group .form-control:focus {
    border-left: none;
    border-right: 2px solid #86b7fe;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
    border-color: #86b7fe; /* Bootstrap blue focus - keep for form focus */
}

.input-group .form-control.password-input:focus {
    border-right: 2px solid #86b7fe;
}

.input-group:focus-within .input-group-text {
    border-color: #86b7fe; /* Bootstrap blue focus - keep for form focus */
    background-color: #e7f1ff; /* Bootstrap blue tint - keep for form focus */
    color: #0a58ca; /* Bootstrap blue - keep for form focus */
}

.input-group:focus-within .form-control.password-input {
    border-right: 2px solid #86b7fe !important;
}

.password-toggle {
    background: none;
    border: 2px solid var(--border-medium);
    border-left: none;
    color: var(--text-muted-dark);
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    transition: all 0.15s ease-in-out;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.password-toggle:hover {
    color: #0a58ca; /* Bootstrap blue - keep for form focus */
    border-color: #86b7fe; /* Bootstrap blue focus - keep for form focus */
    background-color: #e7f1ff;
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
    border-color: #86b7fe; /* Bootstrap blue focus - keep for form focus */
    color: #0a58ca; /* Bootstrap blue - keep for form focus */
}

.form-text {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 5px;
}

/* Password Strength Container - Repositioned */

.password-strength-container {
    margin-top: 10px;
    margin-bottom: 20px;
}

.password-requirement-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.password-strength-indicator {
    margin-top: 10px;
}

.password-strength-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-fill.weak {
    width: 33%;
    background-color: var(--color-danger);
}

.password-strength-fill.medium {
    width: 66%;
    background-color: var(--color-warning);
}

.password-strength-fill.strong {
    width: 100%;
    background-color: var(--color-success);
}

.password-strength-text {
    font-size: 0.8rem;
    font-weight: 500;
    display: block;
}

.password-strength-text.weak {
    color: var(--color-danger);
}

.password-strength-text.medium {
    color: var(--color-warning);
}

.password-strength-text.strong {
    color: var(--color-success);
}

/* Form Checkboxes */

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.form-check-input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-dark);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--orange);
    border-color: var(--orange);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgb(234 139 44 / 25%);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--dark);
    line-height: 1.4;
    cursor: pointer;
}

.form-check-label a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Buttons */

.btn {
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-orange {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-lighter));
    color: var(--text-white);
    box-shadow: 0 4px 15px rgb(234 139 44 / 30%);
}

.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(234 139 44 / 40%);
    color: var(--text-white);
}

.btn-orange:active {
    transform: translateY(0);
}

.btn-orange:focus {
    box-shadow: 0 0 0 0.2rem rgb(234 139 44 / 50%);
}

.btn-outline-orange {
    background: transparent;
    color: var(--orange);
    border: 2px solid var(--orange);
}

.btn-outline-orange:hover {
    background: var(--orange);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn.w-100 {
    width: 100%;
}

/* Divider - Hidden for now */

.divider {
    display: none;
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-dark);
}

.divider span {
    background: var(--bg-primary);
    padding: 0 15px;
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Social Login - Hidden for now */

.social-login {
    display: none;
    border: 2px solid var(--border-light);
    color: var(--dark);
    background: var(--bg-primary);
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-login:hover {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgb(0 0 0 / 10%);
}

.social-login i {
    font-size: 1.1rem;
}

/* Auth Switch */

.auth-switch {
    text-align: center;
    margin-top: 20px;
}

.auth-switch p {
    margin: 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: var(--color-accent-lighter);
    text-decoration: underline;
}

/* Password Strength Indicator */

.password-strength {
    display: block;
    font-weight: 500;
    margin-top: 5px;
}

/* Form States */

.form-control:disabled {
    background-color: var(--color-dominant-tertiary);
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive Design */
@media (width <= 991.98px) {

    .login-hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-features {
        margin-top: 30px;
    }

    .auth-container {
        margin-top: 40px;
        max-width: 100%;
        padding: 0 20px;
    }

    .auth-card {
        padding: 35px 30px;
        margin-bottom: 20px;
    }
}

@media (width <= 768px) {

    .login-hero {
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 2.2rem;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        margin-bottom: 40px;
    }

    .hero-features {
        gap: 15px;
    }

    .hero-features .feature-item {
        padding: 15px;
    }

    .auth-container {
        padding: 0 15px;
    }

    .auth-card {
        padding: 30px 25px;
        margin-bottom: 20px;
    }

    .auth-header h2 {
        font-size: 1.8rem;
    }

    .auth-header p {
        font-size: 0.95rem;
    }

    .auth-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        background: var(--color-dominant-tertiary);
        border: 2px solid var(--border-medium);
        color: var(--text-muted-dark);
    }

    .form-control {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .input-group-text {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .password-toggle {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

@media (width <= 575.98px) {

    .login-hero {
        padding: 70px 0 30px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-features .feature-item {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .hero-features .feature-item i {
        margin-bottom: 5px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .auth-header h2 {
        font-size: 1.6rem;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        background: var(--color-dominant-tertiary);
        border: 2px solid var(--border-medium);
        color: var(--text-muted-dark);
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .input-group-text {
        padding: 10px 12px;
        min-width: 44px;
        font-size: 0.9rem;
    }

    .password-toggle {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .form-check {
        gap: 8px;
    }

    .form-check-input {
        width: 16px;
        height: 16px;
    }

    .form-check-label {
        font-size: 0.85rem;
    }
}

/* Enhanced Mobile Layout */
@media (width <= 767.98px) {

    .login-hero .row {
        flex-direction: column-reverse;
    }

    .login-hero .col-lg-6 {
        margin-bottom: 30px;
    }

    .hero-badge {
        display: inline-flex;
        margin: 0 auto 20px;
    }
}

/* Animation Enhancements */

.auth-card {
    animation: slideInUp 0.6s ease-out;
}

.hero-features .feature-item {
    animation: fadeInScale 0.4s ease-out;
}

.hero-features .feature-item:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-features .feature-item:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-features .feature-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideInUp {

    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {

    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced Button Styling */

.btn-orange {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    border: none;
    color: var(--text-white);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 8px 25px rgb(234 139 44 / 30%);
    position: relative;
    overflow: hidden;
}

.btn-orange::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 20%), transparent);
    transition: left 0.5s;
}

.btn-orange:hover::before {
    left: 100%;
}

.btn-orange:hover {
    background: linear-gradient(135deg, var(--color-accent-hover), var(--color-accent-light));
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgb(234 139 44 / 40%);
    color: var(--text-white);
}

.btn-orange:active {
    transform: translateY(0);
}

.btn-orange:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgb(234 139 44 / 25%);
}

/* Social Login Button Enhancement */

.social-login {
    border: 2px solid var(--border-light);
    color: var(--dark);
    background: var(--bg-primary);
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
}

.social-login:hover {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 0 0 / 10%);
}

.social-login i {
    font-size: 1.1rem;
    margin-right: 10px;
}

/* Form Enhancement */

.form-control:focus {
    border-color: #86b7fe; /* Bootstrap blue focus - keep for form focus */
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
    outline: none;
    transform: translateY(-1px);
}

/* Alert Styling */

.alert {
    border-radius: 15px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert-danger {
    background: rgb(220 53 69 / 10%);
    color: var(--color-danger-text);
    border-left: 4px solid var(--color-danger);
}

.alert-success {
    background: rgb(40 167 69 / 10%);
    color: var(--color-success-text);
    border-left: 4px solid var(--color-success);
}

/* Accessibility Improvements */

.auth-card:focus-within {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.form-control:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* RTL Support */

[dir="rtl"] .input-group-text {
    border-right: 2px solid var(--border-medium);
    border-left: none;
    border-radius: 0 8px 8px 0;
}

[dir="rtl"] .input-group .form-control {
    border-right: none;
    border-left: 2px solid var(--border-medium);
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .password-toggle {
    border-left: 2px solid var(--border-medium);
    border-right: none;
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .input-group .form-control:focus {
    border-right: none;
    border-left: none;
}

/* Animation Enhancements */

.login-card {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {

    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {

    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading States */

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentcolor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {

    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Accessibility Improvements */

.form-control:focus {
    outline: 2px solid #0d6efd; /* Bootstrap blue - keep for accessibility focus */
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid #0d6efd; /* Bootstrap blue - keep for accessibility focus */
    outline-offset: 2px;
}

.form-check-input:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* Print Styles */
@media print {

    .login-page {
        background: var(--bg-primary);
        padding: 20px;
    }

    .login-card {
        box-shadow: none;
        border: 1px solid var(--border-darker);
        page-break-inside: avoid;
    }

    .btn {
        display: none !important;
    }

    .password-toggle {
        display: none !important;
    }
}
