/**
 * Modern Login Page Styles
 * Reg-Online UNDIP - Version 2.0
 */

/* ==================== Variables ==================== */
:root {
    --primary-color: #000352;
    --primary-dark: #000228;
    --primary-light: #1a4d8f;
    --secondary-color: #fbbf24;
    --accent-gold: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --undip-blue-1: #000352;
    --undip-blue-2: #000228;
    --undip-blue-3: #1a4d8f;
    --undip-blue-4: #2d5da1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #000352 0%, #000228 50%, #1a4d8f 100%);
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ==================== Loader ==================== */
.modern-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #000352 0%, #000228 50%, #1a4d8f 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.modern-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Background Decorations ==================== */
.bg-decoration {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(26, 77, 143, 0.4);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(0, 3, 82, 0.35);
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.bg-shape-3 {
    width: 250px;
    height: 250px;
    background: rgba(0, 2, 40, 0.4);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ==================== Main Container ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Grid Layout ==================== */
.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

@media (max-width: 968px) {
    .login-grid {
        grid-template-columns: 1fr;
    }
    
    .login-info {
        display: none;
    }
}

/* ==================== Login Form Section ==================== */
.login-form-section {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-header {
    margin-bottom: 40px;
}

.login-logo {
    width: 75px;
    height: 80px;
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.login-subtitle {
    font-size: 16px;
    color: var(--text-light);
    animation: fadeIn 0.6s ease-out 0.4s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Form Styles ==================== */
.modern-form {
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 20px;
    height: 20px;
    pointer-events: none;
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 3, 82, 0.15);
}

.form-control:focus + .input-icon {
    color: var(--primary-color);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* ==================== Button Styles ==================== */
.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 20px;
}

/* ==================== Alert Messages ==================== */
.alert-modern {
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-icon {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* ==================== Info Section ==================== */
.login-info {
    background: linear-gradient(135deg, #1a4d8f 0%, #0d3768 100%);
    color: var(--white);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ==================== Language Switcher ==================== */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.login-form-section .language-switcher {
    top: 20px;
    right: 30px;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 50px;
}

.lang-btn:hover {
    background: #e5e7eb;
    border-color: var(--primary-color);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 3, 82, 0.3);
    color: var(--white);
    font-weight: 700;
    transform: scale(1.05);
}

.info-decoration {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, white 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, white 1px, transparent 1px);
    background-size: 50px 50px;
}

.info-content {
    position: relative;
    z-index: 1;
}

.info-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.info-text {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
}

.info-features {
    list-style: none;
}

.info-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 15px;
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==================== Info Cards ==================== */
.info-card {
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

.info-card .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-card .card-icon svg {
    width: 20px;
    height: 20px;
}

.info-card .card-content {
    flex: 1;
}

.info-card .card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--white);
}

.info-card .card-text {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    opacity: 0.95;
}

/* Warning Card (Red) */
.card-warning {
    background: rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
}

.card-warning .card-icon {
    background: rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

/* Info Card (Blue) */
.card-info {
    background: rgba(59, 130, 246, 0.2);
    border-left: 4px solid #3b82f6;
}

.card-info .card-icon {
    background: rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
}

/* ==================== Help Section ==================== */
.help-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.help-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.btn-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-help:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.help-text-bottom {
    font-size: 12px;
    line-height: 1.6;
    opacity: 0.85;
    margin-top: 12px;
    color: var(--white);
    font-style: italic;
}

/* ==================== Footer ==================== */
.login-footer {
    padding: 20px 50px;
    background: var(--bg-light);
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-light);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-link i {
    font-size: 14px;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* ==================== Responsive ==================== */
@media (max-width: 968px) {
    .language-switcher {
        position: absolute;
        top: 15px;
        right: 15px;
        justify-content: flex-end;
    }
    
    .login-form-section .language-switcher {
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 768px) {
    .login-form-section {
        padding: 40px 30px;
    }
    
    .login-title {
        font-size: 26px;
    }
    
    .login-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .footer-link {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 22px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .form-control {
        padding: 12px 12px 12px 44px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
    
    .info-card {
        padding: 12px;
        gap: 10px;
    }
    
    .info-card .card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .info-card .card-title {
        font-size: 14px;
    }
    
    .info-card .card-text {
        font-size: 12px;
    }
}

/* ==================== Additional Elements ==================== */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--text-light);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 16px;
}

.sso-button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.sso-button:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.sso-icon {
    width: 24px;
    height: 24px;
}
