@media (max-width: 768px) {
    #history-view .content-card,
    .bank-support-container,
    .provider-support-container {
        margin: 15px 0 0 0 !important;
        padding: 15px 5px !important;
        border-radius: 0 !important;
        border: 1px solid var(--primary-color) !important;
        border-left: none !important;
        border-right: none !important;
    }

    #history-view .sim-table td,
    #history-view .sim-table th,
    #history-view .sim-table td strong {
        font-weight: normal !important;
    }

    #history-view .history-tab-content {
        padding: 10px 5px 20px 5px !important;
    }

    #history-view .sim-table-responsive {
        margin-bottom: 20px !important;
    }
}

.security-history-intro {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 10px 0;
    padding: 9px 11px;
    color: #cbd5e1;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.45;
}

.security-history-intro i { color: #60a5fa; }
.security-event-title { color: #e2e8f0; font-weight: 700; }
.security-actor-badge {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.28);
    font-size: 0.72rem;
    font-weight: 700;
}
.security-event-detail { margin-top: 5px; color: #94a3b8; font-size: 0.7rem; }
.security-event-detail summary { color: #facc15; cursor: pointer; user-select: none; }
.security-event-detail-grid {
    display: grid;
    gap: 3px;
    margin-top: 5px;
    padding: 7px;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 4px;
    white-space: normal;
}
.security-ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }

/* Permanent round codes stay readable; legacy references retain truncation. */
#historyTransaksi .history-ticket[data-permanent="true"] {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 768px) {
    .security-history-intro { margin: 5px 5px 0; }
    .security-history-table { min-width: 720px; }
}

.history-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 15px}.history-filters[hidden]{display:none}.history-filters label{min-width:0}.history-filters select{width:100%;height:42px;padding:0 12px;border:1px solid #29476e;border-radius:7px;background:#0a1d35;color:#f8fafc;font:inherit;font-size:.8rem}.history-ticket{display:inline-block;max-width:11ch;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.history-copy-ticket{padding:4px;border:0;background:transparent;color:#dbeafe;cursor:pointer;vertical-align:middle}.history-type-badge,.history-status{display:inline-flex;align-items:center;justify-content:center;min-width:48px;padding:5px 8px;border-radius:5px;font-size:.66rem;font-weight:900}.history-type-bet{background:linear-gradient(135deg,#ef4444,#be123c);color:#fff}.history-type-win,.history-type-deposit,.history-type-bonus{background:linear-gradient(135deg,#10b981,#047857);color:#fff}.history-type-withdraw,.history-type-adjustment,.history-type-bonus-reversal,.history-type-game-refund{background:linear-gradient(135deg,#f59e0b,#b45309);color:#111827}.history-status-berhasil{background:rgba(16,185,129,.2);color:#34d399}.history-status-pending{background:rgba(245,158,11,.2);color:#fbbf24}.history-status-ditolak{background:rgba(239,68,68,.2);color:#f87171}.history-status-refund{background:rgba(56,189,248,.18);color:#7dd3fc}.history-type-description{display:block;max-width:18ch;margin-top:3px;overflow:hidden;color:#7dd3fc;font-size:.55rem;text-overflow:ellipsis;white-space:nowrap}.history-money{text-align:right!important;font-variant-numeric:tabular-nums}.history-money.nominal.negative{color:#ff4d5e}.history-money.nominal.positive{color:#00e69a}.history-money.nominal.neutral{color:#f8fafc}.history-money.balance{color:#f8fafc}.history-empty{padding:24px 10px!important;color:var(--text-muted);text-align:center!important}.history-empty.error{color:#ff6b6b}#history-view .pagination-container{display:grid;gap:10px;margin-top:14px}.history-page-summary{color:#b9c8dc;font-size:.72rem}.history-page-buttons{display:flex;align-items:center;justify-content:center;gap:7px}.history-page-ellipsis{color:#dbeafe;font-weight:900}.history-page-buttons .page-btn{min-width:34px;height:34px;padding:0 8px}

@media(max-width:768px){#history-view .history-tabs{gap:7px!important}#history-view .history-tab-btn{min-width:0;padding:9px 6px;font-size:.68rem;line-height:1.25}#history-view .history-filters{gap:8px;margin:0 5px 12px}#history-view .history-filters select{height:40px;padding:0 8px;font-size:.7rem}#historyTransaksi .sim-table-responsive{width:100%;overflow-x:hidden}#historyTransaksi .sim-table{width:100%;min-width:0!important;table-layout:fixed}#historyTransaksi .sim-table th,#historyTransaksi .sim-table td{padding:8px 2px!important;font-size:.54rem!important;overflow:hidden}#historyTransaksi .sim-table th:nth-child(1){width:19%}#historyTransaksi .sim-table th:nth-child(2){width:20%}#historyTransaksi .sim-table th:nth-child(3){width:18%}#historyTransaksi .sim-table th:nth-child(4){width:14%}#historyTransaksi .sim-table th:nth-child(5){width:14%}#historyTransaksi .sim-table th:nth-child(6){width:15%}#historyTransaksi .history-type-badge,#historyTransaksi .history-status{min-width:0;width:100%;padding:5px 1px;font-size:.46rem;white-space:nowrap}#historyTransaksi .history-ticket{max-width:calc(100% - 18px)}#historyTransaksi .history-copy-ticket{width:16px;padding:1px}#historyTransaksi .history-type-description{display:none}#history-view .history-page-summary{text-align:left}#history-view .history-page-buttons{justify-content:space-between;gap:5px}#history-view .history-page-buttons .page-btn{min-width:32px;height:36px;padding:0 7px}}
