/* =========================================================
   ADMIN COMPETENCIES
   DASHBOARD KOMPETENSI
========================================================= */

.competencies-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 0 50px;
}


/* =========================================================
   HERO / HEADER
========================================================= */

.competencies-page .page-header {
    position: relative;

    min-height: 190px;
    height: auto !important;
    max-height: none !important;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 34px 40px;
    margin-bottom: 24px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(37, 99, 235, 0.28),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #020617 0%,
            #071b4d 55%,
            #0b2e73 100%
        ) !important;

    border: 1px solid rgba(59, 130, 246, 0.35) !important;

    border-radius: 18px;

    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.18);
}


/* HAPUS SEMUA ORNAMEN DARI MASTER CSS */

.competencies-page .page-header::before {
    display: none !important;
    content: none !important;
}

.competencies-page .page-header::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -70px;
    top: -85px;

    border-radius: 50%;

    background: rgba(37, 99, 235, 0.18);

    pointer-events: none;
}


/* =========================================================
   HEADER CONTENT
========================================================= */

.competencies-page .page-header > div:first-child {
    position: relative;
    z-index: 2;
}


/* =========================================================
   EYEBROW
========================================================= */

.competencies-page .page-eyebrow {
    display: inline-flex;
    align-items: center;

    padding: 7px 12px;
    margin-bottom: 10px;

    border-radius: 7px;

    background: rgba(37, 99, 235, 0.18);

    border: 1px solid rgba(96, 165, 250, 0.30);

    color: #60a5fa !important;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1px;

    text-transform: uppercase;
}


/* =========================================================
   TITLE
========================================================= */

.competencies-page .page-header h2 {
    position: relative;
    z-index: 2;

    margin: 0 0 8px;

    color: #ffffff !important;

    font-size: 30px;
    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -0.5px;
}


.competencies-page .page-header p {
    position: relative;
    z-index: 2;

    max-width: 700px;

    margin: 0;

    color: #bfdbfe !important;

    font-size: 13px;

    line-height: 1.6;
}


/* =========================================================
   BUTTON TAMBAH
========================================================= */

.competencies-page .page-actions {
    position: relative;
    z-index: 5;

    flex-shrink: 0;
}


.competencies-page .primary-button {
    min-height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    border-radius: 9px;

    background: #2563eb !important;

    border: 1px solid #3b82f6 !important;

    color: #ffffff !important;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.22);

    transition: all .2s ease;
}


.competencies-page .primary-button:hover {
    background: #1d4ed8 !important;

    border-color: #60a5fa !important;

    transform: translateY(-1px);
}


/* =========================================================
   SUMMARY
========================================================= */

.competencies-page .summary-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 24px;
}


.competencies-page .summary-card {
    position: relative;

    min-height: 135px;

    padding: 22px 24px 22px 28px;

    background: #ffffff !important;

    border: 1px solid #e4eaf2;

    border-radius: 15px;

    box-shadow:
        0 6px 20px rgba(15, 23, 42, 0.045);

    overflow: hidden;
}


/* ACCENT SUMMARY */

.competencies-page .summary-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 4px;
    height: 100%;

    background: #2563eb;
}


.competencies-page .summary-card:nth-child(2)::before {
    background: #10b981;
}


.competencies-page .summary-card:nth-child(3)::before {
    background: #94a3b8;
}


.competencies-page .summary-label {
    margin-bottom: 9px;

    color: #64748b;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .8px;

    text-transform: uppercase;
}


.competencies-page .summary-value {
    margin-bottom: 5px;

    color: #172033;

    font-size: 28px;

    line-height: 1;

    font-weight: 800;
}


.competencies-page .summary-description {
    color: #8b96a7;

    font-size: 11px;
}


/* =========================================================
   TABLE CARD
========================================================= */

.competencies-page .table-card {
    width: 100%;

    background: #ffffff !important;

    border: 1px solid #e3e9f1;

    border-radius: 17px;

    overflow: hidden;

    box-shadow:
        0 7px 24px rgba(15, 23, 42, 0.05);
}


/* =========================================================
   TABLE HEADER
========================================================= */

.competencies-page .table-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 23px 28px;

    border-bottom: 1px solid #edf1f5;
}


.competencies-page .table-card-header h3 {
    margin: 0 0 5px;

    color: #172033;

    font-size: 17px;

    font-weight: 800;
}


.competencies-page .table-card-header p {
    margin: 0;

    color: #8a94a6;

    font-size: 11px;
}


/* =========================================================
   TABLE
========================================================= */

.competencies-page .table-wrapper {
    width: 100%;
    overflow-x: auto;
}


.competencies-page table {
    width: 100%;

    min-width: 760px;

    border-collapse: collapse;

    table-layout: fixed;
}


.competencies-page thead {
    background: #f1f5f9 !important;
}


.competencies-page th {
    height: 52px;

    padding: 0 18px;

    border-bottom: 1px solid #dfe7f1;

    color: #475569 !important;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .8px;

    text-align: left;

    white-space: nowrap;
}


.competencies-page td {
    height: 68px;

    padding: 17px 18px;

    border-bottom: 1px solid #edf1f5;

    color: #596579;

    font-size: 12px;

    vertical-align: middle;
}


.competencies-page tbody tr:hover {
    background: #f8fbff;
}


.competencies-page tbody tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   ATUR LEBAR KOLOM
========================================================= */

.competencies-page th:nth-child(1),
.competencies-page td:nth-child(1) {
    width: 65px;
}


.competencies-page th:nth-child(2),
.competencies-page td:nth-child(2) {
    width: 24%;
}


.competencies-page th:nth-child(3),
.competencies-page td:nth-child(3) {
    width: auto;
}


.competencies-page th:nth-child(4),
.competencies-page td:nth-child(4) {
    width: 130px;
}


.competencies-page th:nth-child(5),
.competencies-page td:nth-child(5) {
    width: 120px;

    text-align: center !important;
}


/* =========================================================
   NAMA KOMPETENSI
========================================================= */

.competencies-page td strong {
    display: block;

    color: #263248;

    font-size: 13px;

    font-weight: 700;
}


.competencies-page td:nth-child(3) {
    color: #697589;

    line-height: 1.5;
}


/* =========================================================
   STATUS
========================================================= */

.competencies-page .status-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 27px;

    padding: 0 10px;

    border-radius: 999px;

    font-size: 10px;

    font-weight: 700;

    white-space: nowrap;
}


.competencies-page .status-badge.active {
    background: #ecfdf5 !important;

    border: 1px solid #bbf7d0;

    color: #047857 !important;
}


.competencies-page .status-badge.inactive {
    background: #f1f5f9 !important;

    border: 1px solid #e2e8f0;

    color: #64748b !important;
}


/* =========================================================
   AKSI
========================================================= */

.competencies-page .table-actions {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;
}


.competencies-page .action-icon {
    width: 34px;
    height: 34px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 34px;

    border-radius: 8px;

    background: #f5f7fb !important;

    border: 1px solid #e1e7ef;

    color: #64748b !important;

    text-decoration: none;

    font-size: 13px;

    transition: all .2s ease;
}


.competencies-page .action-icon:hover {
    background: #eef4ff !important;

    border-color: #c9dcff;

    color: #2563eb !important;

    transform: translateY(-1px);
}


.competencies-page .action-icon.edit {
    color: #2563eb !important;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .competencies-page .page-header {
        padding: 30px;
    }

    .competencies-page .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .competencies-page .page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        padding: 24px 20px !important;
        overflow: hidden !important;
    }

    .competencies-page .page-header h2 {
        font-size: 22px !important;
    }

    .competencies-page .page-header p {
        font-size: 12px !important;
    }

    .competencies-page .page-actions {
        width: 100% !important;
        margin-top: 4px !important;
    }

    .competencies-page .primary-button {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }

    .competencies-page .summary-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   DARK MODE OVERRIDES - DASHBOARD KOMPETENSI
   ========================================================= */

html.theme-dark .competencies-page {
    color: #cbd5e1;
}

html.theme-dark .competencies-page .page-header {
    background: linear-gradient(135deg, #070d19 0%, #0d1b38 52%, #13234e 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4) !important;
}

html.theme-dark .competencies-page .page-header h2 {
    color: #ffffff !important;
}

html.theme-dark .competencies-page .page-header p {
    color: #94a3b8 !important;
}

html.theme-dark .competencies-page .page-eyebrow {
    background: rgba(37, 99, 235, 0.25) !important;
    border: 1px solid rgba(96, 165, 250, 0.35) !important;
    color: #60a5fa !important;
    display: inline-flex !important;
    width: fit-content !important;
}

html.theme-dark .competencies-page .primary-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

html.theme-dark .competencies-page .primary-button:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important;
    color: #ffffff !important;
}

/* Summary Stat Cards */
html.theme-dark .competencies-page .summary-card {
    background: #0d172e !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

html.theme-dark .competencies-page .summary-label {
    color: #94a3b8 !important;
}

html.theme-dark .competencies-page .summary-value {
    color: #f8fafc !important;
}

html.theme-dark .competencies-page .summary-description {
    color: #64748b !important;
}

/* Table Card Container */
html.theme-dark .competencies-page .table-card {
    background: #0d172e !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

html.theme-dark .competencies-page .table-card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.theme-dark .competencies-page .table-card-header h3 {
    color: #f8fafc !important;
}

html.theme-dark .competencies-page .table-card-header p {
    color: #94a3b8 !important;
}

/* Table Elements */
html.theme-dark .competencies-page thead,
html.theme-dark .competencies-page th {
    background: #0a1122 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #818cf8 !important;
}

html.theme-dark .competencies-page td {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

html.theme-dark .competencies-page tbody tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.4) !important;
}

html.theme-dark .competencies-page tbody tr:hover,
html.theme-dark .competencies-page tbody tr:hover td {
    background: rgba(30, 41, 59, 0.6) !important;
    color: #ffffff !important;
}

html.theme-dark .competencies-page td strong {
    color: #f8fafc !important;
}

/* Status Badges */
html.theme-dark .competencies-page .status-badge.active {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
}

html.theme-dark .competencies-page .status-badge.inactive {
    background: rgba(148, 163, 184, 0.15) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    color: #94a3b8 !important;
}

/* Action Icons */
html.theme-dark .competencies-page .action-icon {
    background: #172033 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

html.theme-dark .competencies-page .action-icon:hover {
    background: #2563eb !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

html.theme-dark .competencies-page .action-icon.edit {
    color: #60a5fa !important;
}

html.theme-dark .competencies-page .action-icon.edit:hover {
    color: #ffffff !important;
}