/*
 * Deposit History V3
 */

.page-content:has(.dep-history-v3) nav[aria-label="breadcrumb"],
.page-content:has(.dep-history-v3) .page-header {
    display: none;
}

.dep-history-v3 {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.dh-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: 18px;
    padding: 26px 30px;
    position: relative;
    overflow: hidden;
}

.dh-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.dh-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 12px;
}

.dh-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dh-title i { font-size: 20px; opacity: 0.9; }

.dh-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.dh-topup-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    color: #059669;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dh-topup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    color: #059669;
}

/* Filters */
.dh-filters {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dh-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dh-filter-group { flex: 1; min-width: 140px; }

.dh-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 12px;
    transition: all 0.2s ease;
}

.dh-search-box:focus-within {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.dh-search-box i { color: #9ca3af; font-size: 13px; }

.dh-search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    background: transparent;
}

.dh-search-box input::placeholder { color: #9ca3af; }

.dh-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: auto;
}

.dh-select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.dh-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dh-filter-btn:hover { background: #047857; }

.dh-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fee2e2;
    color: #dc2626;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.dh-reset-btn:hover { background: #fecaca; color: #dc2626; }

/* Table */
.dh-table-wrapper {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.dh-table-container { overflow-x: auto; }

.dh-table {
    width: 100%;
    border-collapse: collapse;
}

.dh-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.dh-table thead th {
    padding: 13px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    text-align: left;
    white-space: nowrap;
}

.dh-row td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    vertical-align: middle;
}

.dh-row:hover { background: #f0fdf4; }

.dh-td-id { font-weight: 700; color: #059669; font-family: monospace; }

.dh-td-method .dh-method-name {
    font-weight: 600;
    color: #1f2937;
}

.dh-td-amount { font-weight: 700; color: #1f2937; white-space: nowrap; }
.dh-td-balance { font-weight: 700; color: #059669; white-space: nowrap; }
.dh-td-date { color: #6b7280; font-size: 12px; white-space: nowrap; }

/* Status */
.dh-status-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.dh-status-pending { background: #fef3c7; color: #d97706; }
.dh-status-success { background: #dcfce7; color: #16a34a; }
.dh-status-canceled { background: #fee2e2; color: #dc2626; }

/* Actions */
.dh-action-group {
    display: flex;
    gap: 6px;
}

.dh-btn-detail, .dh-btn-pay, .dh-btn-cancel {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-decoration: none;
}

.dh-btn-detail {
    background: #eef2ff;
    color: #6366f1;
    border: 1px solid #e0e7ff;
}

.dh-btn-detail:hover { background: #6366f1; color: #fff; }

.dh-btn-pay {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.dh-btn-pay:hover { background: #16a34a; color: #fff; }

.dh-btn-cancel {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.dh-btn-cancel:hover { background: #dc2626; color: #fff; }

/* Footer */
.dh-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    flex-wrap: wrap;
    gap: 10px;
}

.dh-result-info { font-size: 13px; color: #6b7280; }
.dh-result-info strong { color: #059669; }

.dh-pagination .pagination {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dh-pagination .pagination li a,
.dh-pagination .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.dh-pagination .pagination li a:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.dh-pagination .pagination li.active span,
.dh-pagination .pagination li.active a {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

/* Dark Theme */
.dark-theme .dh-filters, .dark-theme .dh-table-wrapper { background: #1e293b; border-color: #334155; }
.dark-theme .dh-search-box { border-color: #334155; }
.dark-theme .dh-search-box input { color: #f1f5f9; }
.dark-theme .dh-select { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.dark-theme .dh-table thead, .dark-theme .dh-table thead th { background: #0f172a; color: #94a3b8; border-color: #334155; }
.dark-theme .dh-row td { border-color: #334155; }
.dark-theme .dh-row:hover { background: #334155; }
.dark-theme .dh-td-method .dh-method-name { color: #f1f5f9; }
.dark-theme .dh-td-amount { color: #f1f5f9; }
.dark-theme .dh-table-footer { background: #0f172a; border-color: #334155; }
.dark-theme .dh-pagination .pagination li a { background: #334155; border-color: #475569; color: #e2e8f0; }
.dark-theme .dh-header { background: linear-gradient(135deg, #047857 0%, #059669 100%); }

/* Responsive */
@media (max-width: 768px) {
    .dh-header { padding: 22px 20px; border-radius: 14px; }
    .dh-title { font-size: 20px; }
    .dh-filter-form { flex-direction: column; }
    .dh-filter-group { width: 100%; min-width: auto; }
    .dh-filter-btn { width: 100%; justify-content: center; }
    .dh-table-footer { flex-direction: column; align-items: center; }
}
