/* ============================================
   LOGIN PAGE STYLES
   Portal Mahasiswa Polindo
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f3f4f6;
    --text: #1f2937;
    --text-muted: #6b7280;
    --danger: #ef4444;
    --success: #10b981;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body {
    height: 100%;
    overflow: hidden; /* Mencegah scroll */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ============================================
   LOGIN WRAPPER
   ============================================ */

.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px); /* Sesuaikan dengan padding body */
    overflow-y: auto; /* Scroll hanya jika benar-benar perlu di layar sangat kecil */
}

/* Sembunyikan scrollbar tapi tetap bisa scroll jika perlu */
.login-wrapper::-webkit-scrollbar {
    width: 0;
    display: none;
}

.login-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   LOGIN CARD
   ============================================ */

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
    flex-shrink: 0; /* Mencegah card mengecil */
}

/* ============================================
   LOGIN HEADER
   ============================================ */

.login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 28px 24px;
    text-align: center;
    color: white;
}

.login-logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 26px;
}

.login-header h1 { 
    font-size: 21px; 
    font-weight: 700; 
    margin-bottom: 4px; 
}

.login-header p { 
    font-size: 13px; 
    opacity: 0.9; 
}

/* ============================================
   LOGIN BODY
   ============================================ */

.login-body { 
    padding: 28px 24px; 
}

/* ============================================
   ALERT / FLASH MESSAGE
   ============================================ */

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error { 
    background: #fef2f2; 
    color: var(--danger); 
    border: 1px solid #fecaca; 
}

.alert-success { 
    background: #f0fdf4; 
    color: var(--success); 
    border: 1px solid #bbf7d0; 
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group { 
    margin-bottom: 18px; 
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 11px 11px 11px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   BUTTON
   ============================================ */

.btn-login {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover { 
    background: var(--primary-dark); 
}

.btn-login:active { 
    transform: scale(0.98); 
}

/* ============================================
   FOOTER & LINKS
   ============================================ */

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-footer a:hover { 
    color: var(--primary); 
}

/* ============================================
   SECURITY BADGE
   ============================================ */

.security-badge {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    
    .login-wrapper {
        max-height: calc(100vh - 24px);
    }
    
    .login-header {
        padding: 22px 18px;
    }
    
    .login-body {
        padding: 22px 18px;
    }
    
    .login-header h1 {
        font-size: 19px;
    }
    
    .login-logo {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
    
    .form-control {
        padding: 10px 10px 10px 38px;
        font-size: 13px;
    }
    
    .btn-login {
        padding: 12px;
        font-size: 13px;
    }
}

/* Untuk layar sangat kecil (portrait mobile) */
@media (max-height: 600px) {
    .login-header {
        padding: 18px 20px;
    }
    
    .login-body {
        padding: 18px 20px;
    }
    
    .login-logo {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .login-header h1 {
        font-size: 18px;
    }
    
    .login-header p {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .security-badge {
        margin-top: 12px;
        font-size: 10px;
    }
}