/* Data Induk Kemendikdasmen — responsif, selaras tema (Avada) */

.dik-wrap {
    --dik-primary: var(--awb-color4, #2563eb);
    --dik-primary-dark: var(--awb-color5, #1e40af);
    --dik-border: rgba(0, 0, 0, .1);
    --dik-muted: #6b7280;
    --dik-head-bg: #f7f8fa;
    --dik-stripe: #fafbfc;
    --dik-radius: 8px;

    font-family: inherit;
    color: inherit;
    margin: 0 0 1.5em;
}

.dik-wrap *,
.dik-wrap *::before,
.dik-wrap *::after {
    box-sizing: border-box;
}

/* ---- Ringkasan ---- */
.dik-summary {
    margin-bottom: 1.5em;
}

.dik-summary-title {
    margin: 0 0 .75em;
    font-size: 1.15em;
    font-weight: 700;
}

.dik-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.dik-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 16px;
    border: 1px solid var(--dik-border);
    border-radius: var(--dik-radius);
    background: #fff;
    border-top: 3px solid var(--dik-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.dik-card-value {
    font-size: 1.9em;
    font-weight: 800;
    line-height: 1.1;
    color: var(--dik-primary-dark);
}

.dik-card-label {
    font-size: .85em;
    color: var(--dik-muted);
}

.dik-note {
    margin: .9em 0 0;
    font-size: .82em;
    color: var(--dik-muted);
}

.dik-updated {
    display: inline-block;
    font-weight: 600;
}

/* ---- Tab kategori ---- */
.dik-tabnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 2px solid var(--dik-border);
    margin-bottom: 1em;
}

.dik-tabbtn {
    appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: var(--dik-muted);
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}

.dik-tabbtn:hover {
    color: var(--dik-primary);
}

.dik-tabbtn.is-active {
    color: var(--dik-primary-dark);
    border-bottom-color: var(--dik-primary);
}

.dik-panel[hidden] {
    display: none;
}

/* ---- Sub-tab ---- */
.dik-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1em;
}

.dik-subbtn {
    appearance: none;
    font: inherit;
    font-size: .9em;
    background: #fff;
    border: 1px solid var(--dik-border);
    border-radius: 999px;
    padding: 7px 15px;
    cursor: pointer;
    color: inherit;
    transition: background .15s, color .15s, border-color .15s;
}

.dik-subbtn:hover {
    border-color: var(--dik-primary);
    color: var(--dik-primary);
}

.dik-subbtn.is-active {
    background: var(--dik-primary);
    border-color: var(--dik-primary);
    color: #fff;
}

/* ---- Toolbar: pencarian + unduh ---- */
.dik-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.dik-search {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 260px;
    max-width: 420px;
}

.dik-search-input {
    appearance: none;
    font: inherit;
    font-size: .9em;
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--dik-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: inherit;
}

.dik-search-input:focus-visible {
    outline: 2px solid var(--dik-primary);
    outline-offset: 1px;
}

.dik-search-btn {
    appearance: none;
    font: inherit;
    font-size: .88em;
    font-weight: 600;
    cursor: pointer;
    background: var(--dik-primary);
    color: #fff;
    border: 1px solid var(--dik-primary);
    border-radius: 6px;
    padding: 8px 15px;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
}

.dik-search-btn:hover {
    background: var(--dik-primary-dark);
    border-color: var(--dik-primary-dark);
}

.dik-search-clear {
    appearance: none;
    font: inherit;
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--dik-border);
    border-radius: 6px;
    padding: 6px 11px;
    color: var(--dik-muted);
}

.dik-search-clear:hover {
    color: var(--dik-primary);
    border-color: var(--dik-primary);
}

.dik-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .88em;
    font-weight: 600;
    text-decoration: none;
    background: var(--dik-primary);
    color: #fff;
    border: 1px solid var(--dik-primary);
    border-radius: 6px;
    padding: 8px 15px;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.dik-download:hover,
.dik-download:focus {
    background: var(--dik-primary-dark);
    border-color: var(--dik-primary-dark);
    color: #fff;
}

/* ---- Dropdown filter per kolom (di header tabel) ---- */
.dik-filter-row th {
    padding-top: 6px;
    padding-bottom: 8px;
}

.dik-col-filter {
    appearance: none;
    font: inherit;
    font-size: .82em;
    font-weight: 400;
    width: 100%;
    min-width: 90px;
    max-width: 220px;
    background: #fff;
    border: 1px solid var(--dik-border);
    border-radius: 6px;
    padding: 5px 26px 5px 8px;
    cursor: pointer;
    color: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.dik-col-filter:focus-visible {
    outline: 2px solid var(--dik-primary);
    outline-offset: 1px;
}

/* ---- Tabel ---- */
.dik-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--dik-border);
    border-radius: var(--dik-radius);
}

.dik-table-scroll:focus-visible {
    outline: 2px solid var(--dik-primary);
    outline-offset: 2px;
}

.dik-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
    margin: 0;
    background: #fff;
}

.dik-table th,
.dik-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--dik-border);
    white-space: nowrap;
    vertical-align: middle;
}

.dik-table thead th {
    background: var(--dik-head-bg);
    font-weight: 700;
}

.dik-table thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.dik-table tbody tr:nth-child(even) {
    background: var(--dik-stripe);
}

.dik-table tbody tr:hover {
    background: rgba(37, 99, 235, .06);
}

.dik-table .dik-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dik-table .dik-col-no {
    text-align: right;
    color: var(--dik-muted);
    width: 1%;
}

/* ---- Paginasi ---- */
.dik-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.dik-pager button {
    appearance: none;
    font: inherit;
    font-size: .88em;
    background: #fff;
    border: 1px solid var(--dik-border);
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    color: inherit;
    transition: background .15s, border-color .15s;
}

.dik-pager button:hover:not([disabled]) {
    border-color: var(--dik-primary);
    color: var(--dik-primary);
}

.dik-pager button[disabled] {
    opacity: .45;
    cursor: default;
}

.dik-page-info {
    font-size: .85em;
    color: var(--dik-muted);
}

/* ---- Status ---- */
.dik-content {
    position: relative;
    min-height: 60px;
}

.dik-content.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38' viewBox='0 0 38 38' stroke='%232563eb'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg transform='translate(1 1)' stroke-width='3'%3E%3Ccircle stroke-opacity='.3' cx='18' cy='18' r='18'/%3E%3Cpath d='M36 18c0-9.94-8.06-18-18-18'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 18 18' to='360 18 18' dur='.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center no-repeat;
    border-radius: var(--dik-radius);
}

.dik-error {
    padding: 14px 16px;
    border: 1px solid #f5c2c7;
    background: #fff5f5;
    color: #842029;
    border-radius: var(--dik-radius);
    font-size: .9em;
}

.dik-empty {
    padding: 18px;
    text-align: center;
    color: var(--dik-muted);
}

/* ---- Responsif ---- */
@media (max-width: 640px) {
    .dik-tabbtn {
        padding: 9px 12px;
        font-size: .92em;
    }
    .dik-card-value {
        font-size: 1.5em;
    }
    .dik-table th,
    .dik-table td {
        padding: 8px 10px;
    }
    .dik-toolbar {
        align-items: stretch;
    }
    .dik-search {
        flex: 1 1 100%;
        max-width: none;
    }
    .dik-download {
        justify-content: center;
    }
}


