/**
 * SWF Core — table_report.css
 * Canonical Location: assets/css/components/table_report.css
 *
 * Dedicated Stylesheet untuk Komponen Table Report SAP Fiori Horizon:
 * - Table card container, sticky headers, dan responsive scroll
 * - Toolbar lengkap (Search box, sort button, density toggle, export, copy, dll)
 * - Interaktif Header (Sorting indicator ASC/DESC, hover effects)
 * - Table Density Modes (Compact vs Comfortable)
 * - Empty States (Data Tidak Ditemukan / Siap Menjalankan)
 * - Table Footer (Statistik data & SAP Table badge)
 */

/* ========================================================
   TABLE CARD CONTAINER
   ======================================================== */
.swf-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-top: 20px;
    margin-bottom: 24px;
    overflow: hidden;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

.swf-table-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ========================================================
   TOOLBAR HEADER & ACTION BUTTONS
   ======================================================== */
.swf-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
    flex-wrap: wrap;
}

.swf-table-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swf-table-icon-badge {
    width: 32px;
    height: 32px;
    background: #eff6ff;
    color: #0070f2;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    flex-shrink: 0;
}

.swf-table-title {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.swf-table-count-badge {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.swf-table-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Live Search Input */
.swf-table-search {
    position: relative;
    display: flex;
    align-items: center;
}

.swf-table-search i.fa-magnifying-glass {
    position: absolute;
    left: 11px;
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.swf-table-search input {
    height: 34px;
    padding: 0 28px 0 32px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    width: 220px;
    outline: none;
    background: #ffffff;
    color: #1e293b;
    box-sizing: border-box;
    transition: all 0.18s ease;
    font-family: inherit;
}

.swf-table-search input:focus {
    border-color: #0070f2;
    box-shadow: 0 0 0 3px rgba(0, 112, 242, 0.12);
    width: 260px;
}

.swf-search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s;
}

.swf-search-clear-btn:hover {
    color: #ef4444;
}

/* Action Buttons */
.swf-btn-table-action {
    height: 34px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    user-select: none;
}

.swf-btn-table-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

.swf-btn-table-action:active {
    transform: translateY(0);
    background: #f1f5f9;
}

.swf-btn-table-action.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #0070f2;
}

.swf-btn-table-action .text-success {
    color: #10b981 !important;
}

.swf-btn-table-action .text-danger {
    color: #ef4444 !important;
}

/* ========================================================
   TABLE SCROLL CONTAINER & CORE REPORT TABLE
   ======================================================== */
.select-scroll-container {
    width: 100%;
    overflow-x: auto;
    max-height: none;
    overflow-y: visible;
}

.swf-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background-color: #ffffff;
    font-family: var(--font-family-base);
}

/* Sticky Header */
.swf-report-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 11px 16px;
    border-bottom: 2px solid #e2e8f0;
    border-top: 1px solid #f1f5f9;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Interactive Sortable Header */
.swf-th-sortable {
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.swf-th-sortable:hover {
    background-color: #eff6ff !important;
    color: #0070f2 !important;
}

/* Specific Hover for Semantic Header Colors */
th.swf-col-color-blue.swf-th-sortable:hover {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}
th.swf-col-color-green.swf-th-sortable:hover {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}
th.swf-col-color-amber.swf-th-sortable:hover {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}
th.swf-col-color-purple.swf-th-sortable:hover {
    background-color: #f3e8ff !important;
    color: #6b21a8 !important;
}
th.swf-col-color-cyan.swf-th-sortable:hover {
    background-color: #cffafe !important;
    color: #155e75 !important;
}
th.swf-col-color-red.swf-th-sortable:hover {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.swf-th-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.swf-th-left .swf-th-content {
    justify-content: flex-start;
    width: 100%;
}

.swf-th-right .swf-th-content {
    justify-content: flex-end;
    width: 100%;
}

.swf-th-center .swf-th-content {
    justify-content: center;
    width: 100%;
}

td.swf-text-left,
.swf-text-left {
    text-align: left !important;
}

td.swf-text-center,
.swf-text-center {
    text-align: center !important;
}

td.swf-text-right,
.swf-text-right {
    text-align: right !important;
}

.swf-col-nowrap {
    white-space: nowrap !important;
}

.swf-cell-truncate {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.swf-sort-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 10.5px;
    transition: color 0.15s ease, transform 0.15s ease;
    margin-left: 2px;
}

.swf-th-sortable:hover .swf-sort-indicator {
    color: #0070f2;
}

th.swf-sorted-asc,
th.swf-sorted-desc {
    background-color: #eff6ff !important;
    color: #0070f2 !important;
}

th.swf-sorted-asc .swf-sort-indicator i,
th.swf-sorted-desc .swf-sort-indicator i {
    color: #0070f2 !important;
    font-weight: 900;
}

/* Column Badges */
.swf-th-badge {
    display: inline-block;
    font-family: var(--font-family-mono);
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
}

th.swf-sorted-asc .swf-th-badge,
th.swf-sorted-desc .swf-th-badge {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Body Rows & Cells */
.swf-report-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.swf-report-table tbody tr {
    transition: background-color 0.12s ease;
}

.swf-report-table tbody tr:not(.swf-empty-row):nth-child(even) {
    background-color: #fafbfc;
}

.swf-report-table tbody tr:not(.swf-empty-row):hover {
    background-color: #f0f7ff !important;
}

.swf-report-table tbody tr:not(.swf-empty-row):hover td:not([class*="swf-col-color-"]) {
    background-color: #f0f7ff !important;
}

.swf-col-idx {
    width: 44px;
    text-align: center;
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 11.5px;
    background-color: inherit;
}

.swf-col-price {
    font-family: var(--font-family-mono);
    text-align: right;
    font-weight: 600;
    color: #0f172a;
}

.swf-col-price.swf-num-negative,
.swf-num-negative {
    color: #dc2626 !important;
}

.swf-col-year {
    font-family: var(--font-family-mono);
    text-align: center;
    color: #334155;
}

.swf-badge-currency {
    background: #eff6ff;
    color: #0070f2;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11.5px;
    font-family: var(--font-family-mono);
    font-weight: 700;
    border: 1px solid #dbeafe;
}

/* ========================================================
   HOTSPOT DRILLDOWN LINKS (SAP FIORI HOTSPOT)
   ======================================================== */
.swf-table-link {
    color: #0070f2;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 4px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.swf-table-link:hover {
    color: #0051b3;
    text-decoration: underline;
    background-color: rgba(0, 112, 242, 0.1);
}

.swf-table-link .swf-link-icon {
    font-size: 10px;
    opacity: 0.55;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.swf-table-link:hover .swf-link-icon {
    opacity: 1;
    transform: translate(1px, -1px);
}

/* ========================================================
   FIORI STATUS PILL BADGES (FORMATTER BADGE)
   ======================================================== */
.swf-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: transform 0.1s ease;
}

.swf-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Success / Positive */
.swf-status-pill-success,
.swf-status-pill-positive {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.swf-status-pill-success .swf-status-dot,
.swf-status-pill-positive .swf-status-dot {
    background-color: #16a34a;
}

/* Warning / Critical */
.swf-status-pill-warning,
.swf-status-pill-critical {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.swf-status-pill-warning .swf-status-dot,
.swf-status-pill-critical .swf-status-dot {
    background-color: #d97706;
}

/* Danger / Negative / Error */
.swf-status-pill-danger,
.swf-status-pill-negative,
.swf-status-pill-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.swf-status-pill-danger .swf-status-dot,
.swf-status-pill-negative .swf-status-dot,
.swf-status-pill-error .swf-status-dot {
    background-color: #dc2626;
}

/* Info / Information */
.swf-status-pill-info,
.swf-status-pill-information {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.swf-status-pill-info .swf-status-dot,
.swf-status-pill-information .swf-status-dot {
    background-color: #0284c7;
}

/* Purple */
.swf-status-pill-purple {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}
.swf-status-pill-purple .swf-status-dot {
    background-color: #9333ea;
}

/* Neutral */
.swf-status-pill-neutral {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.swf-status-pill-neutral .swf-status-dot {
    background-color: #94a3b8;
}

/* ========================================================
   SEMANTIC COLUMN COLOR THEMES (SAP FIORI HORIZON)
   Harmonized Tinted Zebra: Kolom berwarna memiliki latar
   transparan lembut yang menyatu serasi dengan zebra baris.
   ======================================================== */
/* Blue Theme / Primary Key (e.g. MATNR, VBELN, EBELN) */
th.swf-col-color-blue {
    background-color: #f0f7ff !important;
    border-bottom: 2px solid #0070f2 !important;
    color: #0051b3 !important;
}
th.swf-col-color-blue .swf-th-badge {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}
td.swf-col-color-blue {
    background-color: rgba(0, 112, 242, 0.045);
    color: #0f172a;
    font-weight: 600;
}
tbody tr:nth-child(even) td.swf-col-color-blue {
    background-color: rgba(0, 112, 242, 0.085);
}
tbody tr:hover td.swf-col-color-blue {
    background-color: rgba(0, 112, 242, 0.13) !important;
}

/* Green Theme / Financial, Amount, Success (e.g. NETWR, DMBTR) */
th.swf-col-color-green {
    background-color: #f0fdf4 !important;
    border-bottom: 2px solid #16a34a !important;
    color: #15803d !important;
}
th.swf-col-color-green .swf-th-badge {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
}
td.swf-col-color-green {
    background-color: rgba(22, 163, 74, 0.045);
    color: #15803d;
    font-weight: 600;
}
tbody tr:nth-child(even) td.swf-col-color-green {
    background-color: rgba(22, 163, 74, 0.085);
}
tbody tr:hover td.swf-col-color-green {
    background-color: rgba(22, 163, 74, 0.13) !important;
}

/* Amber Theme / Dates, Change Log, Warning (e.g. LAEDA, ERDAT, BEDAT) */
th.swf-col-color-amber {
    background-color: #fffbeb !important;
    border-bottom: 2px solid #d97706 !important;
    color: #b45309 !important;
}
th.swf-col-color-amber .swf-th-badge {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}
td.swf-col-color-amber {
    background-color: rgba(245, 158, 11, 0.05);
    color: #92400e;
}
tbody tr:nth-child(even) td.swf-col-color-amber {
    background-color: rgba(245, 158, 11, 0.095);
}
tbody tr:hover td.swf-col-color-amber {
    background-color: rgba(245, 158, 11, 0.14) !important;
}

/* Purple Theme / Category, Org, Material Group (e.g. MATKL, VKORG) */
th.swf-col-color-purple {
    background-color: #faf5ff !important;
    border-bottom: 2px solid #9333ea !important;
    color: #7e22ce !important;
}
th.swf-col-color-purple .swf-th-badge {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
    border-color: #e9d5ff !important;
}
td.swf-col-color-purple {
    background-color: rgba(147, 51, 234, 0.045);
    color: #6b21a8;
}
tbody tr:nth-child(even) td.swf-col-color-purple {
    background-color: rgba(147, 51, 234, 0.085);
}
tbody tr:hover td.swf-col-color-purple {
    background-color: rgba(147, 51, 234, 0.13) !important;
}

/* Cyan Theme / Partners, Vendors, Customers (e.g. KUNNR, LIFNR) */
th.swf-col-color-cyan {
    background-color: #ecfeff !important;
    border-bottom: 2px solid #0891b2 !important;
    color: #0e7490 !important;
}
th.swf-col-color-cyan .swf-th-badge {
    background: #cffafe !important;
    color: #155e75 !important;
    border-color: #a5f3fc !important;
}
td.swf-col-color-cyan {
    background-color: rgba(8, 145, 178, 0.045);
    color: #155e75;
}
tbody tr:nth-child(even) td.swf-col-color-cyan {
    background-color: rgba(8, 145, 178, 0.085);
}
tbody tr:hover td.swf-col-color-cyan {
    background-color: rgba(8, 145, 178, 0.13) !important;
}

/* Red Theme / Danger, Deletion, Critical (e.g. LOEKZ, LVORM) */
th.swf-col-color-red {
    background-color: #fef2f2 !important;
    border-bottom: 2px solid #dc2626 !important;
    color: #b91c1c !important;
}
th.swf-col-color-red .swf-th-badge {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #fecaca !important;
}
td.swf-col-color-red {
    background-color: rgba(220, 38, 38, 0.045);
    color: #dc2626;
    font-weight: 600;
}
tbody tr:nth-child(even) td.swf-col-color-red {
    background-color: rgba(220, 38, 38, 0.085);
}
tbody tr:hover td.swf-col-color-red {
    background-color: rgba(220, 38, 38, 0.13) !important;
}

/* ========================================================
   TABLE DENSITY MODES
   ======================================================== */
/* Compact View Mode */
.swf-table-compact .swf-report-table thead th {
    padding: 7px 12px !important;
    font-size: 10.5px !important;
}

.swf-table-compact .swf-report-table td {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* ========================================================
   EMPTY STATES
   ======================================================== */
.swf-empty-row,
.swf-empty-row:hover,
.swf-report-table tbody tr.swf-empty-row,
.swf-report-table tbody tr.swf-empty-row:hover {
    background-color: #ffffff !important;
    background: #ffffff !important;
    cursor: default !important;
}

.swf-empty-row td,
.swf-empty-row:hover td,
.swf-report-table tbody tr.swf-empty-row td,
.swf-report-table tbody tr.swf-empty-row:hover td {
    padding: 48px 20px !important;
    text-align: center !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    cursor: default !important;
}

.swf-empty-state-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 420px;
    margin: 0 auto;
}

.swf-empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.swf-empty-icon-amber {
    background-color: #fef3c7;
    color: #d97706;
    border: 2px solid #fde68a;
}

.swf-empty-icon-blue {
    background-color: #e0f2fe;
    color: #0070f2;
    border: 2px solid #bae6fd;
}

.swf-empty-state-title {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.swf-empty-state-desc {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    text-align: center;
}

/* ========================================================
   TABLE FOOTER SUMMARY BAR & PAGINATION
   ======================================================== */
.swf-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 12.5px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 12px;
}

.swf-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #475569;
}

.swf-footer-left strong {
    color: #0f172a;
    font-weight: 700;
}

/* ========================================================
   PAGINATION CONTROLS (SAP FIORI HORIZON)
   ======================================================== */
.swf-pagination-wrap {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.swf-pagination-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.swf-page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.swf-page-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.swf-page-btn:hover:not(:disabled):not(.swf-page-btn-active) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.swf-page-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.swf-page-btn.swf-page-btn-active {
    background: #0070f2 !important;
    border-color: #0070f2 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 5px rgba(0, 112, 242, 0.25);
    cursor: default;
}

.swf-page-btn:disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

.swf-page-ellipsis {
    min-width: 24px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    user-select: none;
}

.swf-page-size-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
}

.swf-page-size-label {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
}

.swf-select-page-size {
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.swf-select-page-size:hover {
    border-color: #94a3b8;
}

.swf-select-page-size:focus {
    border-color: #0070f2;
    box-shadow: 0 0 0 2px rgba(0, 112, 242, 0.15);
}

.swf-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.swf-footer-table-info {
    font-size: 11.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.swf-footer-table-info strong {
    color: #0070f2;
    font-family: var(--font-family-mono);
}

.swf-btn-scroll-top {
    width: 28px;
    height: 28px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 4px;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.15s ease;
}

.swf-btn-scroll-top:hover {
    background: #eff6ff;
    color: #0070f2;
    border-color: #bfdbfe;
}

@media (max-width: 860px) {
    .swf-table-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .swf-pagination-wrap {
        width: 100%;
        justify-content: center;
    }

    .swf-footer-left,
    .swf-footer-right {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================================
   ALV SUMMARY FOOTER (BARIS TOTAL OTOMATIS)
   ======================================================== */
.swf-report-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.swf-summary-row td {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background-color: #f8fafc;
    border-top: 2px solid #cbd5e1 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-weight: 700 !important;
    color: #0f172a;
    font-size: 13px;
    padding: 10px 14px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}

.swf-summary-row:hover td {
    background-color: #f1f5f9 !important;
}

.swf-summary-title-cell {
    text-align: center;
    background-color: #f1f5f9 !important;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.swf-summary-sigma {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-mono);
    font-size: 13px;
    font-weight: 900;
    color: #0070f2;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 5px;
    vertical-align: middle;
    line-height: 1;
}

.swf-summary-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #334155;
    vertical-align: middle;
}

.swf-summary-cell {
    font-weight: 700 !important;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.swf-summary-cell.swf-col-price {
    font-family: var(--font-family-mono);
    font-weight: 700 !important;
}

/* ========================================================
   COLUMN VISIBILITY (SEMBUNYIKAN / TAMPILKAN KOLOM)
   ======================================================== */
.swf-col-hidden,
th.swf-col-hidden,
td.swf-col-hidden {
    display: none !important;
}

/* Modal Column Chooser Dialog */
.swf-col-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    border: 1px solid transparent;
}

.swf-col-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.swf-col-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0070f2;
    cursor: pointer;
}

.swf-col-item-label {
    flex: 1;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swf-col-item-badge {
    font-size: 10.5px;
    font-family: var(--font-family-mono);
    background: #e2e8f0;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}


