/* ═══════════════════════════════════════════
   DEPOSIT PAGE — Redesign
═══════════════════════════════════════════ */

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

body {
    font-family: var(--font-family);
    background: #f1f5f9;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ── Hero ── */






.dep-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 9px;
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
}

.dep-balance-pill strong { font-weight: 800; }

/* ── Page container ── */
.dep-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    animation: fadeUp 0.35s ease;
}

/* ── Alert ── */
.dep-alert-wrap { margin-bottom: 16px; }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-info    { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }

/* ── 2-col layout ── */
.dep-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ── Card ── */
.dep-card,
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
}

.dep-card:hover,
.card:hover { box-shadow: var(--shadow-md); }

.dep-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dep-card-head h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.dep-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* card-title used by JS (maintenanceCard) */
.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
}

/* ── Form ── */
.dep-field-group { margin-bottom: 16px; }

.dep-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.dep-label-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

.dep-input,
.form-input {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
}

.dep-input:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* ── Quick amounts ── */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.amount-btn {
    padding: 10px 8px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    background: #f9fafb;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.amount-btn:hover {
    border-color: var(--primary);
    background: #eef2ff;
    color: var(--primary);
    transform: translateY(-1px);
}

.amount-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

/* ── Create button ── */
.dep-create-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 14px;
    margin-bottom: 18px;
}

/* ── How to pay box ── */
.dep-how-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}

.dep-how-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dep-how-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dep-how-list li {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── QRIS container ── */
.qris-container {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 14px;
}

.qris-code {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin: 8px 0;
}

.qris-code img {
    max-width: 260px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* ── QRIS info rows ── */
.qris-info {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 14px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Total row special styling */
.dep-total-row {
    border-top: 2px solid var(--border) !important;
    padding-top: 12px !important;
    margin-top: 2px;
}

.dep-total-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.dep-total-value {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
}

/* Transaction ID */
.dep-tx-id {
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

/* ── Status badge ── */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending  { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.status-paid     { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.status-expired  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.status-cancelled { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

/* ── Countdown ── */
.countdown {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* ── QRIS action buttons ── */
.dep-qris-actions {
    display: flex;
    gap: 10px;
}

.dep-action-btn {
    flex: 1;
    justify-content: center;
    padding: 11px 16px;
    font-size: 13.5px;
}

/* ── Buttons (also used by JS) ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-success {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(22,163,74,0.2);
}
.btn-success:hover:not(:disabled) { background: #15803d; }

.btn-danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 2px 8px rgba(220,38,38,0.2);
}
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

/* ── Spinner (used by JS) ── */
.spinner {
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
    display: block;
}

/* ── Loading ── */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    font-size: 13.5px;
    color: var(--text-muted);
    gap: 8px;
}

/* ── History card ── */
.dep-history-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
}

/* ── History items (rendered by JS) ── */
.history-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.history-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.history-item:last-child { margin-bottom: 0; }

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.history-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.history-date {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.4;
    display: block;
}

/* ── Pulse animation (used by JS) ── */
.pulse { animation: pulse 2s ease-in-out infinite; }

/* ── Footer ── */
.dep-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
}

.dep-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.dep-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.dep-footer-links a:hover { color: var(--text-primary); }

.dep-footer-copy { font-size: 12px; color: var(--text-muted); margin: 0; }

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Virtual Account Display ── */
.va-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 4px;
    gap: 10px;
    text-align: center;
}

.va-bank-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.va-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.va-number {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 14px 24px;
    width: 100%;
    box-sizing: border-box;
    word-break: break-all;
}

.va-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s;
}
.va-copy-btn:hover { background: #4f46e5; }

.va-instruction {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.va-instruction strong { color: var(--text-primary); }
.va-instruction ol { margin: 6px 0 0 16px; padding: 0; }
.va-instruction li { margin-bottom: 3px; }

/* ── Payment Method Selector ── */
.dep-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.dep-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
    font-family: var(--font-family);
}

.dep-method-btn:hover {
    border-color: #6366f1;
    background: #eef2ff;
}

.dep-method-btn.active {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.dep-method-icon {
    font-size: 24px;
    line-height: 1;
}

.dep-method-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .dep-main { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .dep-page { padding: 16px 16px 40px; }
    .quick-amounts { grid-template-columns: repeat(2, 1fr); }
    .dep-qris-actions { flex-direction: column; }
    .dep-action-btn { width: 100%; }
    .dep-method-grid { grid-template-columns: repeat(2, 1fr); }
}
