/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --accent-blue: #0ea5e9;
    --dark-blue: #1e40af;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --success: #10b981;
    --btn-red: #dc2626;
    --gradient-blue: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-blue);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 750px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* Branding Section (Left) - UPDATED dengan Water Wave */
.branding-section {
    background: var(--gradient-blue);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Water Wave Container - NEW */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    overflow: hidden;
    z-index: 1;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: 50% 100%;
    background-repeat: repeat-x;
    opacity: 0.3;
}

.wave-1 {
    animation: wave-animation 15s linear infinite;
    opacity: 0.2;
}

.wave-2 {
    animation: wave-animation 20s linear infinite reverse;
    opacity: 0.15;
    bottom: 10px;
}

.wave-3 {
    animation: wave-animation 25s linear infinite;
    opacity: 0.1;
    bottom: 20px;
}

@keyframes wave-animation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Water Ripple Effect - NEW */
.branding-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: ripple 8s ease-out infinite;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.branding-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    max-width: 450px;
    position: relative;
}

/* Logo Container Left - UPDATED dengan Transparent Effect */
.logo-container-left {
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
    position: relative;
    display: inline-block;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.logo-large {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    padding: 10px;
    position: relative;
    z-index: 2;
    /* Membuat logo transparan */
    opacity: 0.95;
    mix-blend-mode: normal;
}

/* Efek tambahan untuk logo transparan */
.logo-large.transparent {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.branding-content h1 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.branding-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.tagline {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 10px;
    opacity: 0.95;
}

.motto {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.85;
    font-style: italic;
    margin-bottom: 30px;
}

/* Institution Info */
.institution-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.info-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-box i {
    font-size: 20px;
}

.info-box span {
    font-size: 13px;
    font-weight: 500;
}

/* Decorative Elements */
.decorative-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: float-circle 8s ease-in-out infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation: float-circle 10s ease-in-out infinite reverse;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float-circle 12s ease-in-out infinite;
}

@keyframes float-circle {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* Login Section (Right) */
.login-section {
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    overflow-y: auto;
    max-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 480px;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 15px;
}

/* QR Code Section */
.qr-section {
    margin-bottom: 25px;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.qr-code-wrapper {
    position: relative;
    padding: 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.15);
    border: 3px solid var(--gray-200);
    transition: all 0.3s ease;
}

.qr-code-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(30, 58, 138, 0.2);
    border-color: var(--secondary-blue);
}

.qr-code {
    width: 200px;
    height: 200px;
    display: block;
    border-radius: 12px;
}

.qr-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-code-wrapper:hover .qr-overlay {
    opacity: 0.9;
}

.qr-overlay i {
    color: var(--white);
    font-size: 28px;
}

.qr-refresh {
    margin-top: 16px;
}

.btn-refresh {
    background: transparent;
    border: 2px solid var(--secondary-blue);
    color: var(--secondary-blue);
    padding: 10px 24px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh:hover {
    background: var(--secondary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-refresh i {
    transition: transform 0.5s ease;
}

.btn-refresh:hover i {
    transform: rotate(180deg);
}

/* QR Info */
.qr-info {
    background: var(--gray-100);
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--gray-600);
    font-size: 14px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    color: var(--secondary-blue);
    font-size: 16px;
    width: 20px;
}

/* ATM BTN Section */
.atm-btn-section {
    margin: 25px 0;
}

.atm-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.atm-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.atm-divider span {
    background: var(--white);
    padding: 0 15px;
    color: var(--gray-600);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.atm-content {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
}

.atm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--btn-red);
}

.atm-header i {
    font-size: 28px;
}

.atm-header h4 {
    font-size: 18px;
    font-weight: 600;
}

.bank-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-logo {
    width: 120px;
    height: auto;
    margin-bottom: 8px;
}

.bank-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--btn-red);
    margin: 0;
}

.atm-instructions {
    background: var(--white);
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    border-left: 4px solid var(--btn-red);
}

.atm-instructions p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
}

.atm-instructions i {
    color: var(--btn-red);
    margin-right: 6px;
}

.atm-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-800);
}

.feature-item i {
    color: var(--success);
    font-size: 16px;
}

.btn-atm-info {
    width: 100%;
    background: var(--btn-red);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-atm-info:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

/* Download Section */
.download-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 2px dashed var(--light-blue);
}

.download-text {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
}

.download-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-800);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 160px;
    justify-content: center;
}

.btn-download:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-download i {
    font-size: 24px;
}

.download-info {
    text-align: left;
}

.download-info span {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

.download-info strong {
    font-size: 15px;
    font-weight: 600;
}

/* Help Section */
.help-section {
    text-align: center;
    margin-bottom: 16px;
}

.help-section p {
    color: var(--gray-600);
    font-size: 14px;
}

.help-link {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.help-link:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    color: var(--gray-600);
    font-size: 12px;
    margin-bottom: 4px;
}

.footer-small {
    font-size: 11px;
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.4s ease;
}

.atm-modal {
    max-width: 500px;
    text-align: left;
    padding: 0;
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-blue);
    color: var(--white);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.atm-location {
    background: var(--gray-100);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid var(--secondary-blue);
}

.atm-location h4 {
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-size: 15px;
}

.atm-location p {
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.atm-location p:last-child {
    margin-bottom: 0;
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
}

.modal-icon.success {
    background: #d1fae5;
    color: var(--success);
}

.modal-content h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 24px;
}

.modal-content p {
    color: var(--gray-600);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .branding-section {
        padding: 40px 30px;
        min-height: auto;
    }

    .logo-large {
        width: 140px;
        height: 140px;
    }

    .logo-glow {
        width: 160px;
        height: 160px;
    }

    .branding-content h1 {
        font-size: 22px;
    }

    .branding-content h2 {
        font-size: 26px;
    }

    .institution-info {
        flex-direction: column;
        align-items: center;
    }

    .login-section {
        padding: 40px 30px;
    }

    .download-buttons {
        flex-direction: column;
    }

    .btn-download {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .login-section {
        padding: 30px 20px;
    }

    .branding-section {
        padding: 30px 20px;
    }

    .logo-large {
        width: 120px;
        height: 120px;
    }

    .logo-glow {
        width: 140px;
        height: 140px;
    }

    .qr-code {
        width: 180px;
        height: 180px;
    }

    .login-header h3 {
        font-size: 22px;
    }

    .branding-content h1 {
        font-size: 20px;
    }

    .branding-content h2 {
        font-size: 22px;
    }

    .atm-content {
        padding: 18px;
    }

    .btn-logo {
        width: 100px;
    }

    .wave-container {
        height: 100px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar Styling */
.login-section::-webkit-scrollbar {
    width: 6px;
}

.login-section::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.login-section::-webkit-scrollbar-thumb {
    background: var(--secondary-blue);
    border-radius: 3px;
}

.login-section::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}