/* 
================================================
LOGIN PAGE STYLES
================================================
Sistem Informasi Arsip Digital
CSS untuk halaman login dengan desain modern
dan responsive design
================================================
*/

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

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: auto;
    color: #29343d;
}

/* ==================
   LAYOUT CONTAINERS
   ================== */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: none;
}

/* ================
   LEFT SECTION 
   ================ */

.left-section {
    flex: 1.3;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 1;
}

.left-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    width: 100%;
    max-width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: max-content;
    width: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.logo {
    width: 300px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo.fallback {
    font-size: 32px;
    font-weight: bold;
}

.main-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
    white-space: nowrap;
    text-align: center;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 35px;
    line-height: 1.4;
    text-align: center;
    max-width: 100%;
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: nowrap;
    min-height: 50px;
    align-items: center;
}

.social-links:empty {
    display: none;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 24px;
    flex-shrink: 0;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.social-icon.facebook:hover {
    background: #1877F2;
}

.social-icon.twitter:hover {
    background: #000000;
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.youtube:hover {
    background: #FF0000;
}

.social-icon.tiktok:hover {
    background: #000000;
}

/* ================
   RIGHT SECTION
   ================ */

.right-section {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
}

.login-form {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

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

.login-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #29343d;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-input.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.password-wrapper {
    position: relative;
}

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

.password-toggle:hover {
    background: rgba(44, 90, 160, 0.1);
    color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-label {
    font-size: 14px;
    color: #666;
}

.login-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alert Styles */
.alert {
    padding: 16px 18px;
    border-radius: 12px;
    color: #29343d;
    box-shadow: none;
    margin-bottom: 1rem;
    border: none;
}

.alert-success {
    color: #36c76c;
    background-color: #ebfaf0;
    border-left: 4px solid #36c76c;
}

.alert-danger {
    color: #ff6692;
    background-color: #ffccdb;
    border-left: 4px solid #ff6692;
}

.alert-info {
    color: #17a2b8;
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* CAPTCHA Styles */
.captcha-row {
    display: none;
}
.captcha-row.show {
    display: block;
}

/* Text color untuk primary */
.text-primary {
    color: var(--primary-color) !important;
}

/* Bootstrap alert override */
.alert {
    border: none;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert .btn-close {
    margin-left: auto;
}

/* Auto clear input when CAPTCHA is shown */
.captcha-row.show input[name="captcha"] {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================
   RESPONSIVE DESIGN
   ================ */
@media (max-width: 1400px) {
    .main-title {
        font-size: 26px;
    }
    
    .logo-section {
        padding: 45px;
    }
}

@media (max-width: 1200px) {
    .main-title {
        font-size: 24px;
    }
    
    .logo-section {
        padding: 40px;
    }
    
    .left-section {
        padding: 30px;
    }
}

@media (max-width: 1024px) {
    .main-title {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 15px;
    }
    
    .logo-section {
        padding: 35px;
    }
}

@media (max-width: 900px) {
    .main-title {
        white-space: normal;
        line-height: 1.2;
        font-size: 20px;
    }
    
    .logo-section {
        padding: 30px;
    }
    
    .social-links {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .login-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .left-section {
        display: none;
    }
    
    .right-section {
        flex: none;
        min-height: 100vh;
        padding: 20px;
    }
    
    .login-form {
        padding: 30px 20px;
        margin: 0;
        border-radius: 15px;
    }

    .login-title {
        font-size: 20px;
    }

    .form-input {
        padding: 12px 16px;
    }

    .login-btn {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .right-section {
        padding: 15px;
    }

    .login-form {
        padding: 25px 15px;
    }

    .login-header {
        margin-bottom: 30px;
    }

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

/* Untuk layar sangat lebar */
@media (min-width: 1600px) {
    .main-title {
        font-size: 32px;
    }
    
    .logo-section {
        padding: 60px;
    }
    
    .subtitle {
        font-size: 18px;
    }
}

/* Untuk layar sangat tinggi */
@media (min-height: 900px) {
    .logo-section {
        padding: 60px 50px;
    }
}