/* ============================================
   Log Transaksi - Pink Magenta Theme
   ============================================ */

.tx-page {
    padding: 0;
    background: #f5f5f5;
    min-height: 100%;
}

/* ── Header ───────────────────────────────── */
.tx-header {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.25);
}

.tx-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tx-header-total {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.tx-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tx-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    backdrop-filter: blur(4px);
}

.tx-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
}

.tx-btn-primary {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.4);
}

.tx-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.6);
    transform: translateY(-1px);
}

.tx-btn-danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.tx-btn-danger:hover {
    background: #c82333;
}

/* ── Toolbar ──────────────────────────────── */
.tx-toolbar {
    background: #1A1A2E;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tx-search-wrap {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.tx-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
}

.tx-search {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    background: #0f172a;
    color: #fff;
    transition: all .2s;
}

.tx-search::placeholder {
    color: #64748b;
}

.tx-search:focus {
    border-color: #E91E63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

.tx-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Period nav arrows */
.tx-filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 3px;
}

.tx-nav-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all .15s;
}

.tx-nav-btn:hover {
    background: rgba(233, 30, 99, 0.2);
    color: #fff;
}

.tx-period-label {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    padding: 0 10px;
    min-width: 70px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dropdown selects */
.tx-filter-select {
    padding: 8px 12px;
    border: 1px solid rgba(233, 30, 99, 0.3);
    border-radius: 20px;
    font-size: 12px;
    background: #0f172a;
    color: #fff;
    outline: none;
    cursor: pointer;
    font-weight: 500;
    transition: all .2s;
}

.tx-filter-select:hover {
    border-color: #E91E63;
    background: rgba(233, 30, 99, 0.08);
}

.tx-filter-select:focus {
    border-color: #E91E63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

.tx-filter-select option {
    background: #1A1A2E;
    color: #fff;
    padding: 8px;
}

/* ── List ─────────────────────────────────── */
.tx-list {
    background: #fff;
    margin: 16px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tx-row {
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background .1s;
    position: relative;
}

.tx-row:hover {
    background: #f8f9fa;
}

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

.tx-row-main {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
}

.tx-col-date {
    width: 140px;
    flex-shrink: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.tx-col-date .tx-time {
    color: #999;
    font-size: 12px;
}

.tx-col-invoice {
    flex: 1;
    min-width: 0;
}

.tx-invoice-id {
    font-size: 14px;
    font-weight: 600;
    color: #9C27B0;
}

.tx-invoice-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.tx-col-total {
    width: 140px;
    text-align: right;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.tx-col-diskon {
    width: 100px;
    text-align: right;
    flex-shrink: 0;
    font-size: 13px;
}

.tx-diskon {
    color: #dc3545;
    font-weight: 600;
}

.tx-diskon-zero {
    color: #ccc;
    font-size: 12px;
}

.tx-col-payment {
    width: 90px;
    text-align: right;
    flex-shrink: 0;
}

.tx-col-status {
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.tx-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.tx-badge-paid {
    background: #d4edda;
    color: #155724;
}

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

.tx-badge-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Payment method badges */
.tx-badge-pay-cash {
    background: #e8f5e9;
    color: #2e7d32;
}

.tx-badge-pay-transfer {
    background: #e3f2fd;
    color: #1565c0;
}

.tx-badge-pay-qris {
    background: #fff3e0;
    color: #e65100;
}

/* Expandable Detail */
.tx-detail {
    background: #fafafa;
    border-top: 1px solid #eee;
    padding: 16px;
    display: none;
}

.tx-detail.open {
    display: block;
}

.tx-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tx-detail-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    color: #666;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.tx-detail-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.tx-detail-table tr:last-child td {
    border-bottom: none;
}

.tx-detail-total {
    margin-top: 12px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

/* Pagination */
.tx-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
}

.tx-pag-btns {
    display: flex;
    gap: 4px;
}

.tx-pag-btn {
    padding: 5px 12px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    transition: all .15s;
}

.tx-pag-btn:hover {
    background: #f5f5f5;
    border-color: #E91E63;
    color: #E91E63;
}

.tx-pag-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    border-color: #e0e0e0;
    color: #ccc;
}

.tx-pag-btn.active {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

/* Empty */
.tx-empty {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .tx-row-main {
        flex-wrap: wrap;
        gap: 8px;
    }
    .tx-col-date {
        width: 100%;
    }
    .tx-col-total {
        width: auto;
        flex: 1;
        text-align: left;
    }
    .tx-col-status {
        width: auto;
    }
    .tx-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .tx-filters {
        justify-content: center;
    }
}
