/* style.css - Warna Utama #FF667C */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 25px;
}

.header .logo {
    font-size: 32px;
    margin-bottom: 5px;
}

.header h1 {
    font-size: 22px;
    color: #1a1a2e;
    font-weight: 700;
}

.header p {
    color: #888;
    font-size: 14px;
    margin-top: 3px;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    outline: none;
}

.form-group input:focus {
    border-color: #FF667C;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 102, 124, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Button */
.btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.btn-primary {
    background: #FF667C;
}

.btn-primary:hover {
    background: #e5556b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 124, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e8ecf1;
    color: #333;
}

.btn-secondary:hover {
    background: #d5d9e0;
}

.btn-success {
    background: #34a853;
}

.btn-success:hover {
    background: #2d9248;
}

.btn-danger {
    background: #ea4335;
}

.btn-danger:hover {
    background: #d33426;
}

/* Link */
.link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #666;
}

.link a {
    color: #FF667C;
    text-decoration: none;
    font-weight: 600;
}

.link a:hover {
    text-decoration: underline;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-success {
    background: #e6f7e6;
    color: #1e7e34;
    border: 1px solid #b8e6b8;
}

.alert-error {
    background: #fde8e8;
    color: #c62828;
    border: 1px solid #f5c6c6;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

/* Saldo Display */
.saldo-display {
    background: linear-gradient(135deg, #FF667C, #e5556b);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    color: #fff;
    margin-bottom: 25px;
}

.saldo-display .label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.saldo-display .amount {
    font-size: 36px;
    font-weight: 800;
    margin-top: 5px;
    letter-spacing: 1px;
}

.saldo-display .amount .currency {
    font-size: 20px;
    margin-right: 3px;
}

/* QRIS Section */
.qris-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 16px;
}

.qris-section .title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    flex-direction: column;
}

#qrcode canvas {
    max-width: 100%;
    height: auto;
}

#qrcode .qr-label {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #FF667C;
}

#qrcode .qr-placeholder {
    color: #aaa;
    font-size: 14px;
    text-align: center;
}

.qris-info {
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
    border: 1px dashed #ddd;
}

/* History */
.history-list {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.history-item .left {
    display: flex;
    flex-direction: column;
}

.history-item .amount {
    font-weight: 700;
    font-size: 15px;
}

.history-item .amount.credit {
    color: #34a853;
}

.history-item .amount.debit {
    color: #ea4335;
}

.history-item .date {
    font-size: 11px;
    color: #999;
}

.history-item .status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.status-success {
    background: #e6f7e6;
    color: #1e7e34;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-expired {
    background: #fde8e8;
    color: #c62828;
}

.status-failed {
    background: #fde8e8;
    color: #c62828;
}

/* Animasi */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 20px 15px;
    }
    
    .saldo-display .amount {
        font-size: 28px;
    }
    
    .form-group input {
        padding: 10px 12px;
    }
}

/* Countdown */
#countdown {
    font-weight: bold;
    color: #FF667C;
}

/* Tambahan untuk QRIS */
#qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    width: 100%;
}

#qr-container #qr-canvas {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qr-container canvas,
#qr-container img {
    max-width: 100%;
    height: auto;
}