#sidb-keb-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #333;
}

.sidb-keb-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sidb-keb-controls input,
.sidb-keb-controls select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.sidb-keb-controls input {
    flex: 1;
    min-width: 200px;
}

.sidb-keb-controls input:focus,
.sidb-keb-controls select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.sidb-keb-chart-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    max-height: 360px;
}

.sidb-keb-chart-wrap canvas {
    max-height: 320px;
}

.sidb-keb-table-wrap {
    overflow-x: auto;
}

#sidb-keb-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

#sidb-keb-table thead th {
    background: #f8fafc;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

#sidb-keb-table th.col-sortable {
    cursor: pointer;
    user-select: none;
}

#sidb-keb-table th.col-sortable:hover {
    background: #f1f5f9;
}

#sidb-keb-table th .sort-icon {
    color: #9ca3af;
    font-size: 11px;
    margin-left: 4px;
}

#sidb-keb-table th.sort-asc .sort-icon::after { content: '↑'; }
#sidb-keb-table th.sort-desc .sort-icon::after { content: '↓'; }
#sidb-keb-table th.sort-asc .sort-icon,
#sidb-keb-table th.sort-desc .sort-icon { color: #6366f1; }

#sidb-keb-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

#sidb-keb-table tbody tr:last-child {
    border-bottom: none;
}

#sidb-keb-table tbody tr:hover {
    background: #f8fafc;
}

#sidb-keb-table td {
    padding: 11px 14px;
    color: #4b5563;
    vertical-align: middle;
}

#sidb-keb-table td.col-no {
    color: #9ca3af;
    font-size: 12px;
    width: 40px;
    text-align: center;
}

.sidb-keb-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #ede9fe;
    color: #5b21b6;
    white-space: nowrap;
}

.sidb-keb-loading {
    text-align: center;
    color: #9ca3af;
    padding: 40px !important;
}

.sidb-keb-empty {
    text-align: center;
    color: #9ca3af;
    padding: 40px !important;
}

.sidb-keb-error {
    text-align: center;
    color: #dc2626;
    padding: 40px !important;
}

.sidb-keb-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.sidb-keb-pagination button {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.15s;
    min-width: 36px;
}

.sidb-keb-pagination button:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #6366f1;
}

.sidb-keb-pagination button.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.sidb-keb-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.sidb-keb-bulk-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 6px;
    background: #6366f1;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.sidb-keb-bulk-btn:hover {
    background: #4f46e5;
    color: #fff;
}

#sidb-keb-table td.col-legalitas {
    text-align: center;
    position: relative;
}

.sidb-keb-legalitas-empty {
    color: #9ca3af;
}

.sidb-keb-legalitas {
    position: relative;
    display: inline-block;
}

.sidb-keb-legalitas-toggle {
    padding: 4px 10px;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.sidb-keb-legalitas-toggle:hover {
    background: #e0e7ff;
}

.sidb-keb-legalitas-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    max-width: 300px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 10px;
    z-index: 20;
    text-align: left;
}

.sidb-keb-legalitas.open .sidb-keb-legalitas-menu {
    display: block;
}

.sidb-keb-legalitas-menu ul {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
}

.sidb-keb-legalitas-menu li {
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
}

.sidb-keb-legalitas-menu li:last-child {
    border-bottom: none;
}

.sidb-keb-legalitas-menu li a {
    color: #4338ca;
    text-decoration: none;
    font-size: 13px;
    word-break: break-word;
}

.sidb-keb-legalitas-menu li a:hover {
    text-decoration: underline;
}

.sidb-keb-legalitas-all {
    display: block;
    text-align: center;
    padding: 7px 10px;
    border-radius: 6px;
    background: #6366f1;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.sidb-keb-legalitas-all:hover {
    background: #4f46e5;
    color: #fff;
}

.sidb-keb-info {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 8px;
}

.sidb-keb-export-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sidb-keb-export-btn {
    padding: 8px 14px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.sidb-keb-export-btn:hover {
    background: #4f46e5;
}

.sidb-keb-export-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}