/* ============================================
   LOGIN PAGE STYLES
   Warna: Biru Dongker (#0a1a3a, #0d2b4e) 
          Orange Keemasan (#ff8c00, #ff6b00)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1a3a 0%, #0d2b4e 50%, #1a3a5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-animation .circle {
    position: absolute;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.bg-animation .circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.bg-animation .circle:nth-child(2) {
    width: 500px;
    height: 500px;
    bottom: -200px;
    right: -150px;
    animation-delay: 5s;
    animation-duration: 25s;
}

.bg-animation .circle:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 2s;
    animation-duration: 15s;
}

.bg-animation .circle:nth-child(4) {
    width: 150px;
    height: 150px;
    top: 70%;
    left: 10%;
    animation-delay: 7s;
    animation-duration: 18s;
}

.bg-animation .circle:nth-child(5) {
    width: 250px;
    height: 250px;
    top: 20%;
    right: 5%;
    animation-delay: 3s;
    animation-duration: 22s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    33% {
        transform: translateY(-50px) rotate(120deg);
        opacity: 0.6;
    }
    66% {
        transform: translateY(50px) rotate(240deg);
        opacity: 0.4;
    }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LOGIN CARD
   ============================================ */
.login-card {
    display: flex;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

/* ============================================
   LEFT SIDE - BRANDING (BIRU DONGKER)
   ============================================ */
.brand-side {
    flex: 1;
    background: linear-gradient(135deg, #0a1a3a 0%, #0d2b4e 100%);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-side::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.1) 0%, transparent 70%);
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Logo Styling */
.logo {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
    text-align: center;
}

.logo-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: bounce 2s infinite;
    overflow: hidden;
    padding: 18px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Filter untuk membuat logo menjadi putih jika logo asli berwarna gelap */
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Jika logo sudah berwarna terang, gunakan versi di bawah ini (comment filter di atas) */
/* .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
} */

.brand-side h1 {
    color: white;
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-side .tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Features Section */
.features {
    margin-top: 50px;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    animation: slideInRight 0.6s ease-out;
    animation-fill-mode: both;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.3s; }
.feature-item:nth-child(3) { animation-delay: 0.5s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 140, 0, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    background: rgba(255, 140, 0, 0.3);
    transform: scale(1.05);
}

.feature-icon i {
    font-size: 22px;
    color: #ff8c00;
}

.feature-text h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.feature-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* ============================================
   RIGHT SIDE - FORM
   ============================================ */
.form-side {
    flex: 1;
    padding: 50px;
    background: white;
}

.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-header h2 {
    color: #0a1a3a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-header p {
    color: #6b7280;
    font-size: 14px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #0a1a3a;
    font-weight: 600;
    font-size: 14px;
}

/* Input Group */
.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff8c00;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background: white;
}

.input-group input:hover {
    border-color: #ff8c00;
}

.input-group input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.input-group input:focus + i {
    color: #ff6b00;
    transform: translateY(-50%) scale(1.05);
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    transition: color 0.3s;
    z-index: 1;
}

.toggle-password:hover {
    color: #ff8c00;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #ff8c00;
}

.checkbox-label span {
    color: #6b7280;
    font-size: 14px;
}

.forgot-link {
    color: #ff8c00;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: #e67e00;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 140, 0, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.register-link p {
    color: #6b7280;
    font-size: 14px;
}

.register-link a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.register-link a:hover {
    color: #e67e00;
    text-decoration: underline;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 20px;
    margin-right: 12px;
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #ff8c00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #0a1a3a;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .login-wrapper {
        padding: 15px;
    }
    
    .brand-side,
    .form-side {
        padding: 40px 30px;
    }
    
    .logo-icon {
        width: 75px;
        height: 75px;
        padding: 15px;
    }
    
    .brand-side h1 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        border-radius: 20px;
    }
    
    .brand-side {
        padding: 40px 30px;
        text-align: center;
    }
    
    .form-side {
        padding: 40px 30px;
    }
    
    .features {
        display: none;
    }
    
    .brand-side h1 {
        font-size: 28px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .logo-icon {
        width: 65px;
        height: 65px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 10px;
    }
    
    .brand-side,
    .form-side {
        padding: 30px 20px;
    }
    
    .logo-icon {
        width: 55px;
        height: 55px;
        padding: 10px;
        border-radius: 18px;
    }
    
    .brand-side h1 {
        font-size: 24px;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
    
    .input-group input {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background: #ff8c00;
    color: white;
}

::-moz-selection {
    background: #ff8c00;
    color: white;
}