/* 
 * Auth Pages Stylesheet
 * Login and Register pages styling
 * Benih Crowdfunding Platform
 */

/* === CUSTOM FONT === */
@font-face {
    font-family: 'Lilita One';
    src: url('../fonts/LILITAONE-REGULAR.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Lilita One', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1570B2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* === AUTH CONTAINER === */
.auth-container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === LOGO SECTION === */
.auth-logo {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

/* Logo Badge - Fixed at Top Left Corner */
.logo-badge-fixed {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
}

.logo-badge-fixed img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

/* Old logo-badge class (keep for backward compatibility) */
.logo-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    width: 60px;
    height: 60px;
    z-index: 10;
}

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.logo-main {
    margin-top: 20px;
}

.logo-main img {
    width: 240px;
    max-width: 75%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* === FORM WRAPPER === */
.auth-form-wrapper {
    /* NO background, NO card, NO shadow */
    padding: 0;
    margin-top: 100px;
}

/* === FORM STYLES === */
.auth-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 6px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-control {
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    border: none;
    border-radius: 30px;
    background: #FFFFFF;
    color: #333333;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-control:focus {
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #999999;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #1976D2;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #CCCCCC;
    margin-top: 5px;
    text-align: center;
}

/* === FORM OPTIONS === */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    cursor: pointer;
    accent-color: #1976D2;
}

.forgot-password {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.forgot-password:hover {
    opacity: 0.8;
}

/* === SUBMIT BUTTON === */
.btn-submit {
    width: 70%;
    display: block;
    margin: 0 auto 18px;
    padding: 11px 20px;
    font-size: 25.88px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    color: #1570B2;
    background: #FFFFFF;
    border: none;
    border-bottom: 8px solid #000000be;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    text-align: center;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #F8F9FA;
    border-bottom-color: #0d4a7a;
}

.btn-submit:active {
    transform: translateY(1px);
    border-bottom-width: 2px;
}

/* === AUTH FOOTER === */
.auth-footer {
    text-align: center;
    font-size: 13px;
    color: #FFFFFF;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-link {
    color: #FFFFFF;
    font-weight: 700;
    text-decoration: none;
    margin-left: 5px;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* === ERROR MESSAGES === */
.auth-error {
    background: rgba(255, 255, 255, 0.95);
    color: #D32F2F;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #D32F2F;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-error i {
    margin-right: 8px;
}

.auth-error div {
    margin-bottom: 5px;
}

.auth-error div:last-child {
    margin-bottom: 0;
}

/* === SUCCESS MESSAGES === */
.auth-success {
    background: rgba(255, 255, 255, 0.95);
    color: #388E3C;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #388E3C;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-success i {
    margin-right: 8px;
}

/* === RESPONSIVE DESIGN === */

/* Mobile (Small screens) */
@media (max-width: 480px) {
    body.auth-page {
        padding: 15px;
    }
    
    .auth-form-wrapper {
        padding: 0;
        margin-top: 100px;
    }
    
    .logo-badge {
        width: 50px;
        height: 50px;
        left: 15px;
    }
    
    .logo-main img {
        width: 240px;
    }
    
    .form-group label {
        font-size: 18.5px;
    }
    
    .form-control {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .btn-submit {
        font-size: 25.88px;
        padding: 12px 18px;
    }
    
    .auth-footer {
        font-size: 14px;
    }
}

/* Tablet and Up */
@media (min-width: 768px) {
    .auth-container {
        max-width: 480px;
    }
    
    .auth-form-wrapper {
        padding: 0;
        margin-top: 50px;
    }
    
    .logo-badge {
        width: 70px;
        height: 70px;
        left: 30px;
    }
    
    .logo-main img {
        width: 320px;
    }
}

/* === LOADING STATE === */
.btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid #1976D2;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* === ADDITIONAL UTILITIES === */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* === ACCESSIBILITY === */
.form-control:focus-visible {
    outline: 3px solid rgba(25, 118, 210, 0.3);
    outline-offset: 2px;
}

.btn-submit:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
