/* ── Highcharts styles (for dashboard & counter) ── */
.highcharts-figure,
.highcharts-data-table table {
    min-width: 360px;
    max-width: 800px;
    margin: 1em auto;
}

.highcharts-data-table table {
    font-family: Verdana, sans-serif;
    border-collapse: collapse;
    border: 2px solid #ebebeb;
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.highcharts-data-table caption {
    padding: 1em 0;
    font-size: 1.2em;
    color: #555;
}

.highcharts-data-table th {
    font-weight: 500;
    padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
    padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
    background: #f8f8f8;
}

.highcharts-data-table tr:hover {
    background: #f1f7ff;
}

.highcharts-description {
    margin: 0.3rem 10px;
}

.highcharts-data-label img {
    border-radius: 6px !important;
}

/* ── OrgChart custom styles ── */
#container {
    min-height: 500px;
    overflow: auto;
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.orgchart {
    background: #fff;
    box-sizing: border-box;
    margin: 0 auto;
}

.orgchart > .nodes > .hierarchy {
    text-align: center;
}

.orgchart .node {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: box-shadow 0.2s ease;
    width: 180px;
    border: none !important;
}

.orgchart .node:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.orgchart .node .title {
    display: none;
}

.orgchart .node .content {
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    border: none;
    background: #fff;
    line-height: 1.3;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bagan-foto {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 6px;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.bagan-jabatan {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bagan-nama {
    font-size: 11px;
    color: #777;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.orgchart .lines .downLine {
    background-color: #c0c0c0;
}

.orgchart .lines .topLine {
    border-top-color: #c0c0c0;
}

.orgchart .lines .leftLine {
    border-right-color: #c0c0c0;
}

.orgchart .lines .rightLine {
    border-left-color: #c0c0c0;
}

.orgchart .verticalBorder {
    border-left-color: #c0c0c0;
}

/* responsive */
@media screen and (max-width: 600px) {
    .orgchart .node {
        width: 140px;
    }

    .bagan-foto {
        width: 56px;
        height: 56px;
    }

    .bagan-jabatan {
        font-size: 11px;
    }

    .bagan-nama {
        font-size: 10px;
    }
}

/* Hide invisible root wrapper node (OrgChart v3 renders it because
   Object.keys() > 2 after attachRel/buildHierarchy add properties) */
.orgchart .node:not([id]) {
    display: none !important;
}

.orgchart .root-wrapper {
    display: none !important;
}

.orgchart .root-wrapper > .node {
    display: none !important;
}

.orgchart .root-wrapper::before {
    display: none !important;
}
