/* =================================================================
   FILE CSS LENGKAP - FANDIRR CODING PAYMENT GATEWAY
   Versi: 1.0
   Mencakup: Landing Page, Login, Registrasi, Dashboard
   ================================================================= */

/* --- 1. FONT & VARIABEL GLOBAL (TEMA WARNA) --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4338CA;      /* Indigo yang lebih gelap dan modern */
    --primary-hover: #4F46E5;      /* Indigo standar saat di-hover */
    --secondary-color: #10B981;    /* Hijau untuk tombol aksi positif */
    --secondary-hover: #059669;
    --background-color: #F8FAFC;   /* Putih keabuan yang sangat lembut, enak di mata */
    --card-bg: #FFFFFF;
    --text-color-dark: #1E293B;     /* Abu-abu gelap pekat untuk teks utama */
    --text-color-light: #64748B;    /* Abu-abu lebih terang untuk sub-teks */
    --border-color: #E2E8F0;
    --error-color: #EF4444;
    --success-color: #D1FAE5;
    --success-text: #065F46;
    --pending-color: #FEF3C7;
    --pending-text: #92400E;
    --expired-color: #FEE2E2;
    --expired-text: #991B1B;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

/* --- 2. RESET & PENGATURAN DASAR --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color-dark);
    line-height: 1.6;
}

/* --- 3. KOMPONEN UMUM (BUTTON, CARD, FORM) --- */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

button:hover, .button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
}

/* Modifier untuk membuat tombol menjadi lebih kecil */
.button.button-sm {
    width: auto; /* Agar lebar tombol sesuai teks, tidak 100% */
    padding: 0.5rem 1.25rem; /* Padding atas/bawah & kiri/kanan lebih kecil */
    font-size: 0.875rem; /* Ukuran font lebih kecil (misal: 14px) */
    font-weight: 500; /* Sedikit lebih tipis agar tidak terlalu menonjol */
}
/* Opsional: Gaya tombol outline */
.button.button-outline {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}
.button.button-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15);
}

.error, .success {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    padding: 0.75rem;
    border-radius: 8px;
}

.error {
    color: var(--error-color);
    background-color: var(--expired-color);
}

.success {
    color: var(--success-text);
    background-color: var(--success-color);
}

/* --- 4. STYLING HALAMAN LANDING PAGE (index.html) --- */
.landing-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
}

.landing-nav .logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.landing-nav .nav-links a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-color-dark);
    margin-left: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.landing-nav .nav-links a.login-btn {
    border: 1px solid var(--border-color);
}

.landing-nav .nav-links a.login-btn:hover {
    background-color: #F1F5F9;
}

.landing-nav .nav-links a.register-btn {
    background-color: var(--primary-color);
    color: white;
}

.landing-nav .nav-links a.register-btn:hover {
    background-color: var(--primary-hover);
}

.hero-section {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 5%;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

/* --- 5. STYLING HALAMAN LOGIN & REGISTRASI --- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.form-container {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
}

.form-container h2 {
    text-align: center;
    color: var(--text-color-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.switch-form {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.switch-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* --- 6. STYLING HALAMAN DASHBOARD --- */
.dashboard-container {
    width: 100%;
    max-width: 1024px;
    padding: 2rem;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.875rem;
    margin: 0;
}

#logout-button {
    width: auto;
    /*background-color: #6B7280;*/
}

#logout-button:hover {
    background-color: var(--error-color);
}

.balance-card h3 {
    margin-top: 0;
    color: var(--text-color-light);
    font-weight: 500;
}

.balance-card p {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.qris-card {
    text-align: center;
}

#qris-image {
    max-width: 250px;
    height: auto;
    margin: 1rem auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cancel-button {
    background-color: var(--error-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: auto;
    margin-top: 0.5rem;
}

.cancel-button:hover {
    background-color: #DC2626;
}

#transaction-list {
    list-style: none;
}

#transaction-list li {
    padding: 1rem 0.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#transaction-list li:last-child {
    border-bottom: none;
}

.transaction-amount {
    font-weight: 600;
}

.transaction-status {
    padding: 0.2rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-settlement { background-color: var(--success-color); color: var(--success-text); }
.status-pending { background-color: var(--pending-color); color: var(--pending-text); }
.status-expire, .status-cancel, .status-deny { background-color: var(--expired-color); color: var(--expired-text); }

/* public/css/style.css (Tambahkan kode ini) */

/* --- Styling Kartu Statistik Admin --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat-card h4 {
    margin-top: 0;
    font-weight: 500;
    color: var(--text-color-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* public/css/style.css (Tambahkan kode ini) */

/* --- Styling Notifikasi --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.notification-bell {
    position: relative;
    cursor: pointer;
    color: var(--text-color-light);
}
.notification-bell:hover {
    color: var(--text-color-dark);
}
.unread-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--error-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}
.notification-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 100%;
    max-width: 380px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    z-index: 1000;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}
.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.notification-header h3 {
    margin: 0;
}
.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item a {
    text-decoration: none;
    color: inherit;
}
.notification-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}
.notification-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-color-light);
}
.notification-item.unread {
    background-color: #f3f4f6; /* Sedikit berbeda untuk yang belum dibaca */
    border-left: 3px solid var(--primary-color);
}

/* --- 7. MEDIA QUERIES (UNTUK TAMPILAN RESPONSIf) --- */
@media (max-width: 768px) {
    body {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .landing-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .dashboard-container, .auth-container {
        padding: 1rem;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }
}

/* public/css/style.css (Tambahkan kode ini di paling bawah) */

/* --- 8. STYLING & ANIMASI LANDING PAGE VERSI 2.0 --- */

/* Keyframes untuk animasi */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes backgroundPan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Perbaikan Navigasi */
.landing-nav .nav-links a.register-btn {
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
}

/* Layout Hero Section dengan 2 kolom */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dua kolom sama besar */
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 5%;
}

.hero-text {
    text-align: left;
    /* Terapkan animasi slide-in */
    animation: slideInUp 0.8s ease-out forwards;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-text p {
    margin-bottom: 2.5rem;
}

.hero-text .cta-button {
    width: auto;
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-text .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(67, 56, 202, 0.4);
}

.hero-image {
    text-align: center;
    /* Terapkan animasi fade-in */
    animation: fadeIn 1s ease-in 0.3s forwards; /* Delay 0.3s */
    opacity: 0; /* Mulai dari transparan */
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Bagian Fitur */
.features-section {
    padding: 4rem 5%;
    text-align: center;
    background-color: #F1F5F9; /* Warna latar sedikit berbeda */
}

.features-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    opacity: 0; /* Mulai dari transparan untuk animasi */
    animation: slideInUp 0.7s ease-out forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Memberi delay animasi yang berbeda untuk setiap kartu fitur */
.feature-card:nth-child(1) { animation-delay: 0.2s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.6s; }

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(30, 41, 59, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-color-light);
}

/* Penyesuaian untuk Tampilan Mobile */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr; /* Satu kolom di layar kecil */
        text-align: center;
    }
    
    .hero-text {
        text-align: center;
    }

    .hero-image {
        margin-top: 2rem;
    }
}

/* public/css/style.css (Tambahkan kode ini) */

/* --- Styling Modal --- */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Latar belakang gelap transparan */
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideInUp 0.4s ease-out;
}
.close-btn {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-btn:hover, .close-btn:focus {
    color: black;
}