/* Auth Pages Styling */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/pertamina_login.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px 35px;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.8s ease-out;
    position: relative;
}

.auth-card.register-card {
    max-width: 600px;
    padding: 40px 35px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.auth-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px 0;
}

/* When there's only a single logo, center it properly */
.auth-logos .single-logo {
    margin: 0 auto;
}

.auth-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-logo.pertamina-logo {
    height: 50px;
    order: 1;
}

.auth-logo.psf-logo {
    height: 40px;
    order: 2;
}

.auth-logo.simoc-logo {
    height: 45px;
    order: 3;
}

.auth-logo.single-logo {
    height: 260px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.logo-divider {
    width: 2px;
    height: 35px;
    background: linear-gradient(180deg, transparent, #007bff, transparent);
    margin: 0 10px;
    order: 2;
}

.auth-title {
    color: #2c3e50;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #2c3e50, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-title-small {
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #2c3e50, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.auth-subtitle-small {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-floating {
    margin-bottom: 24px;
    position: relative;
}

.form-floating > .form-control {
    height: 60px;
    border: 2px solid rgba(233, 236, 239, 0.8);
    border-radius: 12px;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 22px 18px 8px;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-floating > .form-control:focus {
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.2);
    outline: none;
    transform: translateY(-1px);
}

.form-floating > label {
    color: #495057;
    font-weight: 600;
    padding: 18px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #007bff;
    transform: scale(0.85) translateY(-0.7rem) translateX(0.15rem);
    font-weight: 700;
}

.btn-auth {
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.4s ease;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

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

.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, #004494);
}

.btn-auth:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.auth-links {
    text-align: center;
    margin-top: 24px;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.auth-links a:hover {
    color: #0056b3;
    text-decoration: underline;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-links p {
    margin-bottom: 12px;
    color: #495057;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 12px 0;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.4);
    accent-color: #007bff;
    cursor: pointer;
}

.checkbox-container label {
    margin: 0;
    color: #495057;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

.form-floating .error-message {
    position: absolute;
    bottom: -22px;
    left: 16px;
}

.validation-summary {
    background: rgba(248, 215, 218, 0.9);
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.1);
}

.validation-summary ul {
    margin: 0;
    padding-left: 20px;
}

/* Success alert styling */
.alert-success {
    background: rgba(212, 237, 218, 0.9);
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    border-left: 4px solid #28a745;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
}

.alert-success .btn-close {
    filter: brightness(0) saturate(100%) invert(18%) sepia(25%) saturate(1347%) hue-rotate(93deg) brightness(96%) contrast(86%);
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 16px;
    }
    
    .auth-card {
        padding: 30px 24px;
        max-width: 95%;
    }
    
    .auth-card.register-card {
        max-width: 95%;
        padding: 30px 24px;
    }
    
    .auth-logos {
        gap: 15px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .auth-logo {
        height: 35px;
    }
    
    .auth-logo.pertamina-logo {
        height: 40px;
    }
    
    .auth-logo.psf-logo {
        height: 32px;
    }
    
    .auth-logo.simoc-logo {
        height: 35px;
    }
    
    .auth-logo.single-logo {
        height: 210px;
    }
    
    .auth-title-small {
        font-size: 1.4rem;
    }
    
    .auth-subtitle-small {
        font-size: 0.85rem;
    }
    
    .logo-divider {
        height: 25px;
        margin: 0 8px;
    }
    
    .auth-title {
        font-size: 2rem;
    }
    
    .auth-title-small {
        font-size: 1.4rem;
    }
    
    .auth-subtitle {
        font-size: 1rem;
    }
    
    .auth-subtitle-small {
        font-size: 0.85rem;
    }
    
    .form-floating > .form-control {
        height: 56px;
        font-size: 16px;
        padding: 20px 16px 8px;
    }
    
    .btn-auth {
        height: 56px;
        font-size: 15px;
    }
    
    .auth-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 12px;
    }
    
    .auth-card {
        padding: 25px 20px;
        max-width: 100%;
        border-radius: 16px;
    }
    
    .auth-logos {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .auth-logo.single-logo {
        height: 180px;
    }
    
    .auth-title-small {
        font-size: 1.2rem;
    }
    
    .auth-subtitle-small {
        font-size: 0.8rem;
    }
    
    .auth-logos .logo-divider {
        display: none;
    }
    
    .auth-title {
        font-size: 1.8rem;
    }
    
    .auth-title-small {
        font-size: 1.2rem;
    }
    
    .auth-subtitle-small {
        font-size: 0.8rem;
    }
    
    .form-floating > .form-control {
        height: 54px;
        font-size: 15px;
        padding: 18px 14px 8px;
    }
    
    .btn-auth {
        height: 54px;
        font-size: 14px;
    }
    
    .row .col-md-6 {
        margin-bottom: 8px;
    }
}

/* Enhanced spacing for register form */
.register-form .row {
    margin-bottom: 8px;
}

.register-form .form-floating {
    margin-bottom: 20px;
}

/* Animation for form validation */
.form-floating.has-error > .form-control {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
    background-color: #fff5f5;
}

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

/* Loading state */
.btn-auth.loading {
    pointer-events: none;
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-auth.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Password toggle button */
.btn-password-toggle {
    background: none !important;
    border: none !important;
    color: #6c757d !important;
    cursor: pointer !important;
    font-size: 14px !important;
    padding: 8px !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}

.btn-password-toggle:hover {
    color: #667eea !important;
    background-color: rgba(102, 126, 234, 0.1) !important;
}

/* Focus states */
.form-floating > .form-control:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Success state */
.form-floating.has-success > .form-control {
    border-color: #28a745;
    background-color: #f8fff9;
}

/* Custom scrollbar for smaller screens */
@media (max-height: 600px) {
    .auth-container {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* Additional responsive refinements */
@media (min-width: 768px) and (max-width: 991px) {
    .auth-card.register-card {
        max-width: 550px;
    }
}

@media (min-width: 992px) {
    .auth-card.register-card {
        max-width: 600px;
    }
}

/* Background overlay for better readability */
.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 123, 255, 0.1), rgba(0, 0, 0, 0.6));
    z-index: 0;
}

.auth-card {
    z-index: 1;
}

/* Enhanced glassmorphism effect */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    z-index: -1;
}
