/* Modern Login CSS - Enterprise Design */

/* CSS Custom Properties - DAPEN BTN Theme */
:root {
    --login-primary-color: #1E40AF;
    --login-primary-color-rgb: 30, 64, 175;
    --login-secondary-color: #22C55E; /* disamakan accent (tanpa kuning) */
    --login-accent-color: #22C55E;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
    overflow-x: hidden;
    overflow-y: auto;
}

body.login-page {
    height: 100vh;
    overflow: hidden;
}

/* Login Container - muat 1 halaman tanpa scroll */
.login-container {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Background Section - Full Hijau DAPEN BTN */
.login-background {
    flex: 1;
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: 
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 70% 90% at 95% 95%, rgba(34, 197, 94, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse 60% 70% at 5% 90%, rgba(5, 150, 105, 0.4) 0%, transparent 55%),
        linear-gradient(165deg, #065f46 0%, #047857 0%, #059669 30%, #22C55E 60%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pola Diamond DAPEN BTN - Garis Biru & Kuning */
.background-pattern-dapen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.35;
    background-image: 
        linear-gradient(45deg, rgba(30, 64, 175, 0.2) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(34, 197, 94, 0.18) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(30, 64, 175, 0.12) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(34, 197, 94, 0.15) 75%);
    background-size: 280px 280px;
    background-position: 0 0, 70px 140px, 210px -70px, -140px 70px;
    animation: patternShift 30s linear infinite;
}

.background-svg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.55;
    background-size: 1200px;
    background-repeat: repeat;
}

@keyframes patternShift {
    0% { background-position: 0 0, 70px 140px, 210px -70px, -140px 70px; }
    100% { background-position: 280px 0, 350px 140px, 490px -70px, 140px 70px; }
}

/* Floating Diamond Shapes */
.dapen-diamonds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

.diamond {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    animation: diamondFloat 25s ease-in-out infinite;
}

.diamond-1 {
    top: 18%;
    left: 12%;
    border-width: 0 18px 31px 18px;
    border-color: transparent transparent rgba(30, 64, 175, 0.35) transparent;
    animation-delay: 0s;
}

.diamond-2 {
    top: 60%;
    left: 78%;
    border-width: 0 22px 38px 22px;
    border-color: transparent transparent rgba(34, 197, 94, 0.4) transparent;
    animation-delay: 4s;
}

.diamond-3 {
    top: 38%;
    left: 82%;
    border-width: 0 14px 24px 14px;
    border-color: transparent transparent rgba(30, 64, 175, 0.3) transparent;
    animation-delay: 8s;
}

.diamond-4 {
    top: 78%;
    left: 22%;
    border-width: 0 20px 35px 20px;
    border-color: transparent transparent rgba(34, 197, 94, 0.38) transparent;
    animation-delay: 12s;
}

.diamond-5 {
    top: 12%;
    left: 58%;
    border-width: 0 12px 21px 12px;
    border-color: transparent transparent rgba(30, 64, 175, 0.32) transparent;
    animation-delay: 16s;
}

.diamond-6 {
    top: 72%;
    left: 48%;
    border-width: 0 16px 28px 16px;
    border-color: transparent transparent rgba(34, 197, 94, 0.35) transparent;
    animation-delay: 20s;
}

@keyframes diamondFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-25px) translateX(15px) rotate(90deg);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-45px) translateX(-15px) rotate(180deg);
        opacity: 0.7;
    }
    75% {
        transform: translateY(-20px) translateX(20px) rotate(270deg);
        opacity: 0.8;
    }
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 100% 100% at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.15) 100%),
        linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.08) 100%);
    z-index: 1;
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--login-accent-color) 0%, var(--login-primary-color) 100%);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
    animation: float 14s ease-in-out infinite;
}

.particle-1 {
    width: 8px;
    height: 8px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle-2 {
    width: 12px;
    height: 12px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 18s;
    background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    box-shadow: 0 0 20px rgba(30, 64, 175, 0.4);
}

.particle-3 {
    width: 6px;
    height: 6px;
    top: 30%;
    left: 70%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle-4 {
    width: 10px;
    height: 10px;
    top: 80%;
    left: 20%;
    animation-delay: 6s;
    animation-duration: 16s;
    background: linear-gradient(135deg, var(--login-accent-color) 0%, var(--login-primary-color) 100%);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.5);
}

.particle-5 {
    width: 14px;
    height: 14px;
    top: 10%;
    left: 50%;
    animation-delay: 8s;
    animation-duration: 20s;
    background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    box-shadow: 0 0 20px rgba(30, 64, 175, 0.4);
}

.particle-6 {
    width: 11px;
    height: 11px;
    top: 90%;
    left: 90%;
    animation-delay: 14s;
    animation-duration: 19s;
    background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    box-shadow: 0 0 20px rgba(30, 64, 175, 0.4);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-40px) translateX(-10px) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-20px) translateX(15px) rotate(270deg);
        opacity: 0.8;
    }
}

/* Wave Effects */
.wave-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(34, 197, 94, 0.25) 25%, 
        rgba(30, 64, 175, 0.3) 50%, 
        rgba(34, 197, 94, 0.15) 75%, 
        transparent 100%);
    border-radius: 50% 50% 0 0;
    animation: waveMove 10s ease-in-out infinite;
}

.wave-1 {
    animation-delay: 0s;
    height: 80px;
    opacity: 0.6;
}

.wave-2 {
    animation-delay: 2s;
    height: 60px;
    opacity: 0.55;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(30, 64, 175, 0.28) 25%, 
        rgba(34, 197, 94, 0.22) 50%, 
        rgba(30, 64, 175, 0.2) 75%, 
        transparent 100%);
}

.wave-3 {
    animation-delay: 4s;
    height: 40px;
    opacity: 0.45;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(34, 197, 94, 0.2) 25%, 
        rgba(30, 64, 175, 0.2) 50%, 
        rgba(34, 197, 94, 0.12) 75%, 
        transparent 100%);
}

@keyframes waveMove {
    0% {
        transform: translateX(-50%) translateY(0px);
    }
    50% {
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        transform: translateX(-50%) translateY(0px);
    }
}

/* Background Content - muat dalam viewport, tanpa scroll */
.background-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem 1.5rem;
    max-width: 480px;
    margin: 0 auto;
    max-height: 100%;
    min-height: 0;
    flex: 1 1 auto;
}

.brand-logo {
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    animation: fadeInUp 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(145deg, #1e40af 0%, #1e3a8a 50%, #059669 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    box-shadow: 
        0 12px 28px -8px rgba(30, 64, 175, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 0 40px -10px rgba(34, 197, 94, 0.25);
    position: relative;
    overflow: hidden;
}

.brand-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(34, 197, 94, 0.2) 50%, transparent 70%);
    animation: shimmer 4s ease-in-out infinite;
}

.brand-icon i {
    font-size: 48px;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.brand-logo-img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.brand-icon::after {
    display: none;
}

.brand-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.4;
    max-width: 380px;
    text-align: center;
}

/* Brand Illustration - muat dalam 1 layar */
.brand-illustration {
    margin-bottom: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Gambar ilustrasi login - batas tinggi agar muat tanpa scroll */
.brand-illustration-img-wrap {
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-illustration-img {
    width: 100%;
    height: auto;
    max-height: min(38vh, 320px);
    object-fit: contain;
    object-position: center;
}

.illustration-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-illustration {
    position: relative;
    z-index: 2;
}

.illustration-circle {
    width: 90px;
    height: 90px;
    background: linear-gradient(145deg, rgba(30, 64, 175, 0.18) 0%, rgba(34, 197, 94, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(34, 197, 94, 0.4);
    backdrop-filter: blur(8px);
    animation: illustrationPulse 4s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.2), inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.illustration-icon {
    font-size: 36px;
    color: var(--login-accent-color);
    animation: iconRotate 8s linear infinite;
}

@keyframes illustrationPulse {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.04); opacity: 1; }
}

@keyframes iconRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.illustration-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.illustration-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--login-accent-color);
    border-radius: 50%;
    animation: particleFloat 5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.illustration-particles .particle-1 {
    top: 15%;
    left: 20%;
    animation-delay: 0s;
}

.illustration-particles .particle-2 {
    top: 25%;
    right: 15%;
    animation-delay: 1.2s;
}

.illustration-particles .particle-3 {
    bottom: 30%;
    left: 25%;
    animation-delay: 2.4s;
}

.illustration-particles .particle-4 {
    bottom: 25%;
    right: 20%;
    animation-delay: 3.6s;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0.5; transform: translateY(0) scale(1); }
    50% { opacity: 1; transform: translateY(-12px) scale(1.15); }
}

/* Brand Tagline */
.brand-tagline {
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    animation: fadeInUp 1s ease-out 0.5s both;
    text-align: center;
}

.brand-tagline h3 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFCC00 0%, #fde047 50%, #facc15 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.brand-tagline p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto;
}

/* System Advantages - kompak */
.system-advantages {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.5rem;
    animation: fadeInUp 1s ease-out 0.7s both;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.advantage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 204, 0, 0.35);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 0;
    max-width: 110px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.advantage-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 204, 0, 0.35);
    border-color: rgba(255, 204, 0, 0.5);
}

.advantage-item i {
    font-size: 18px;
    color: #FFCC00;
    margin-bottom: 0;
    filter: drop-shadow(0 0 8px rgba(255, 204, 0, 0.5));
}

.advantage-item span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.02em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Login Form Container - muat dalam 1 layar */
.login-form-container {
    width: 100%;
    max-width: 480px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
    overflow-y: auto;
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
}

.login-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(34, 197, 94, 0.04) 50%, transparent 100%);
    pointer-events: none;
}

/* Header Section */
.login-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.system-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.system-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
    max-width: 280px;
    text-align: center;
}

/* Form Styles */
.login-form {
    width: 100%;
    position: relative;
}

.login-form::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.25);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-label i {
    font-size: 16px;
    color: var(--login-primary-color);
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--login-primary-color);
    box-shadow: 0 0 0 3px rgba(var(--login-primary-color-rgb), 0.1);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Select Input Styling */
select.form-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    font-size: 16px;
    cursor: pointer;
}

select.form-input option {
    font-size: 16px;
    padding: 0.5rem;
}

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

.password-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #374151;
}

.password-toggle:focus {
    outline: none;
    color: #b71c1c;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: var(--login-primary-color);
    border-color: var(--login-primary-color);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--login-primary-color);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--login-accent-color);
    text-decoration: underline;
}

/* Login Button - Hijau DAPEN BTN */
.login-button {
    width: 100%;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #059669 0%, var(--login-accent-color) 50%, #16a34a 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-button:hover::before {
    opacity: 1;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ef4444;
    font-size: 14px;
    margin-top: 0.5rem;
    font-weight: 500;
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    font-weight: 500;
}

.alert-error,
.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-danger i,
.alert-error i {
    color: #dc2626;
    flex-shrink: 0;
}

/* MFA modal error - tampil jelas sebagai peringatan */
.mfa-error-box {
    margin-bottom: 1rem;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.alert-warning i {
    color: #d97706;
    flex-shrink: 0;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    position: relative;
}

.login-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    border-radius: 1px;
}

.login-footer p {
    color: #9ca3af;
    font-size: 11px;
    margin-bottom: 0;
}

/* Forgot Password Modal - Premium centering di tengah layar penuh */
.forgot-password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.forgot-password-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
    z-index: 99999;
}

.forgot-password-modal-container {
    position: relative;
    z-index: 100000;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    min-width: 360px;
    max-width: 440px;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

.forgot-password-modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
}

.forgot-password-modal-header {
    padding: 1.75rem 2rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.forgot-password-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.forgot-password-modal-icon i {
    font-size: 1.25rem;
    color: var(--login-primary-color);
}

.forgot-password-modal-title {
    flex: 1;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
}

.forgot-password-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #9ca3af;
    padding: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.forgot-password-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.forgot-password-modal-body {
    padding: 0 2rem 1.5rem;
}

.forgot-password-modal-body p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.forgot-password-modal-footer {
    padding: 0 2rem 2rem;
}

.forgot-password-modal-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.forgot-password-modal-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Modal Styles */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    min-width: 400px;
    max-width: 500px;
    position: relative;
    z-index: 100000;
    animation: modalFadeIn 0.3s ease-out;
    margin: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
}

.modal-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(34, 197, 94, 0.04) 50%, transparent 100%);
    pointer-events: none;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem 2rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    color: #1a202c;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    border-radius: 1px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 2rem;
}

.modal-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-footer {
    padding: 0 2rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.btn-submit {
    padding: 0.75rem 1.5rem;
    border: none;
    background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-submit:hover::before {
    opacity: 1;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(var(--login-primary-color-rgb), 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-background {
        display: none;
    }
    
    .login-form-container {
        max-width: 100%;
        min-height: 100vh;
        box-shadow: none;
        background: linear-gradient(165deg, #0f172a 0%, #1e3a8a 20%, #1e40af 40%, #059669 70%, #047857 100%);
        position: relative;
        overflow: hidden;
    }
    
    .login-form-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('/images/dapen-bg.svg');
        background-size: 300px;
        background-repeat: repeat;
        opacity: 0.4;
        z-index: 1;
    }
    
    .login-card {
        position: relative;
        z-index: 2;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    }
    
    /* Mobile Pattern - DAPEN BTN */
    .mobile-pattern {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        pointer-events: none;
    }
    
    .mobile-diamond {
        position: absolute;
        width: 0;
        height: 0;
        border-style: solid;
        animation: mobileDiamondFloat 20s ease-in-out infinite;
    }
    
    .mobile-diamond-1 {
        top: 20%;
        left: 20%;
        border-width: 0 12px 21px 12px;
        border-color: transparent transparent rgba(255, 255, 255, 0.12) transparent;
        animation-delay: 0s;
    }
    
    .mobile-diamond-2 {
        top: 70%;
        left: 70%;
        border-width: 0 15px 26px 15px;
        border-color: transparent transparent rgba(34, 197, 94, 0.15) transparent;
        animation-delay: 5s;
    }
    
    @keyframes mobileDiamondFloat {
        0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
        50% { transform: translateY(-20px) rotate(180deg); opacity: 0.9; }
    }
    
    .mobile-pattern .mobile-particle {
        position: absolute;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
        box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
        animation: mobileFloat 15s ease-in-out infinite;
    }
    
    .mobile-pattern .mobile-particle-1 {
        width: 6px;
        height: 6px;
        top: 30%;
        left: 80%;
        animation-delay: 0s;
    }
    
    .mobile-pattern .mobile-particle-2 {
        width: 8px;
        height: 8px;
        top: 60%;
        left: 15%;
        animation-delay: 5s;
        background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-accent-color) 100%);
    }
    
    .mobile-pattern .mobile-particle-3 {
        width: 5px;
        height: 5px;
        top: 85%;
        left: 60%;
        animation-delay: 10s;
    }
    
    @keyframes mobileFloat {
        0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
        50% { transform: translateY(-15px) rotate(180deg); opacity: 0.9; }
    }
}

@media (max-width: 768px) {
    .login-form-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .modal-container {
        min-width: 320px;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .mobile-pattern {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.25rem;
    }
    
    .system-title {
        font-size: 18px;
    }
    
    .system-subtitle {
        font-size: 11px;
    }
    
    .form-input {
        font-size: 14px;
    }
    
    .modal-container {
        min-width: 280px;
        margin: 0.5rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
