/* =========================================================
   ADMIN POSITIONS
   MASTER DATA - POSISI
   ========================================================= */

.positions-page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: #172554;
}


/* =========================================================
   HERO
   ========================================================= */

.positions-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    min-height: 220px;
    padding: 42px 46px;

    margin-bottom: 28px;

    border-radius: 24px;

    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(37, 99, 235, 0.22),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #020617 0%,
            #071536 55%,
            #0b1f52 100%
        );

    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.16);

    overflow: hidden;
}


/* decorative glow */

.positions-hero::after {
    content: "";
    position: absolute;

    width: 260px;
    height: 260px;

    right: -90px;
    bottom: -130px;

    border-radius: 50%;

    background: rgba(37, 99, 235, 0.16);

    filter: blur(4px);
}


.positions-hero-content {
    position: relative;
    z-index: 2;
}


.positions-eyebrow {
    margin-bottom: 10px;

    color: #60a5fa;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.7px;
    text-transform: uppercase;
}


.positions-hero h1 {
    margin: 0;

    color: #ffffff;

    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;

    letter-spacing: -0.7px;
}


.positions-hero p {
    max-width: 700px;

    margin: 12px 0 0;

    color: #bfdbfe;

    font-size: 14px;
    line-height: 1.7;
}


.positions-hero-action {
    position: relative;
    z-index: 3;

    flex-shrink: 0;
}


/* =========================================================
   PRIMARY BUTTON
   ========================================================= */

.positions-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 44px;

    padding: 0 18px;

    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff !important;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none !important;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.28);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.positions-primary-button:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #3b82f6,
            #2563eb
        );

    box-shadow:
        0 12px 26px rgba(37, 99, 235, 0.34);
}


.positions-primary-button .button-icon {
    font-size: 17px;
    line-height: 1;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.positions-summary {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;

    margin-bottom: 28px;
}


.positions-summary-card {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 135px;

    padding: 24px;

    border: 1px solid #e5e7eb;
    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.06);

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.positions-summary-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 13px 30px rgba(15, 23, 42, 0.09);
}


/* left accent */

.positions-summary-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 18px;
    bottom: 18px;

    width: 4px;

    border-radius: 0 5px 5px 0;

    background: #2563eb;
}


.positions-summary-card.active::before {
    background: #10b981;
}


.positions-summary-card.inactive::before {
    background: #64748b;
}


/* =========================================================
   SUMMARY ICON
   ========================================================= */

.summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 48px;
    height: 48px;

    margin-right: 17px;

    border-radius: 14px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 20px;
    font-weight: 800;
}


.summary-icon.active {
    background: #ecfdf5;
    color: #059669;
}


.summary-icon.inactive {
    background: #f1f5f9;
    color: #64748b;
}


.summary-content {
    min-width: 0;
}


.summary-label {
    display: block;

    margin-bottom: 5px;

    color: #64748b;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.2px;
}


.summary-content strong {
    display: block;

    margin-bottom: 3px;

    color: #172554;

    font-size: 30px;
    line-height: 1;

    font-weight: 800;
}


.summary-content small {
    display: block;

    color: #94a3b8;

    font-size: 12px;
}


/* =========================================================
   TABLE CARD
   ========================================================= */

.positions-table-card {
    width: 100%;

    border: 1px solid #e5e7eb;
    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 8px 28px rgba(15, 23, 42, 0.055);

    overflow: hidden;
}


/* =========================================================
   TABLE HEADER
   ========================================================= */

.positions-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 27px 30px;

    border-bottom: 1px solid #eef2f7;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fafc 100%
        );
}


.positions-section-label {
    display: block;

    margin-bottom: 7px;

    color: #2563eb;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}


.positions-table-header h2 {
    margin: 0;

    color: #172554;

    font-size: 21px;
    font-weight: 800;
}


.positions-table-header p {
    margin: 7px 0 0;

    color: #64748b;

    font-size: 13px;
}


.positions-table-count {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 14px;

    border: 1px solid #dbeafe;
    border-radius: 10px;

    background: #eff6ff;

    color: #2563eb;

    white-space: nowrap;
}


.positions-table-count strong {
    font-size: 16px;
}


.positions-table-count span {
    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   TABLE
   ========================================================= */

.positions-table-wrapper {
    width: 100%;

    overflow-x: auto;
}


.positions-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.positions-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    table-layout: auto;
}


.positions-table thead th {
    height: 52px;

    padding: 0 20px;

    background: #f8fafc;

    border-bottom: 1px solid #e2e8f0;

    color: #64748b;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1px;

    text-align: left;

    white-space: nowrap;
}


.positions-table tbody tr {
    border-bottom: 1px solid #eef2f7;

    transition:
        background 0.18s ease;
}


.positions-table tbody tr:last-child {
    border-bottom: none;
}


.positions-table tbody tr:hover {
    background: #f8fbff;
}


.positions-table tbody td {
    padding: 19px 20px;

    color: #334155;

    font-size: 13px;

    vertical-align: middle;
}


/* =========================================================
   COLUMN WIDTH
   ========================================================= */

.positions-table .col-number {
    width: 70px;
}


.positions-table .col-status {
    width: 135px;
}


.positions-table .col-action {
    width: 155px;
}


/* =========================================================
   NUMBER
   ========================================================= */

.position-number {
    color: #94a3b8 !important;

    font-size: 12px !important;
    font-weight: 700;
}


/* =========================================================
   POSITION NAME
   ========================================================= */

.position-name {
    display: flex;
    align-items: center;

    gap: 12px;
}


.position-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 39px;
    height: 39px;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #dbeafe,
            #eff6ff
        );

    color: #2563eb;

    font-size: 13px;
    font-weight: 800;

    text-transform: uppercase;
}


.position-name strong {
    display: block;

    color: #172554;

    font-size: 13px;
    font-weight: 750;
}


.position-name span {
    display: block;

    margin-top: 3px;

    color: #94a3b8;

    font-size: 10px;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.position-description {
    max-width: 480px;

    color: #64748b;

    font-size: 12px;
    line-height: 1.6;
}


.description-empty {
    color: #cbd5e1;
}


/* =========================================================
   STATUS
   ========================================================= */

.position-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 10px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
}


.position-status.active {
    background: #ecfdf5;

    color: #047857;
}


.position-status.inactive {
    background: #f1f5f9;

    color: #64748b;
}


.status-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: currentColor;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.position-actions {
    display: flex;
    align-items: center;

    gap: 7px;
}


.position-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border: 1px solid #e2e8f0;
    border-radius: 9px;

    background: #ffffff;

    color: #64748b !important;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none !important;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


.position-action:hover {
    transform: translateY(-1px);
}


.position-action.mapping:hover {
    border-color: #bfdbfe;

    background: #eff6ff;

    color: #2563eb !important;
}


.position-action.edit:hover {
    border-color: #c7d2fe;

    background: #eef2ff;

    color: #4f46e5 !important;
}


.position-action.status:hover {
    border-color: #bbf7d0;

    background: #f0fdf4;

    color: #16a34a !important;
}


/* =========================================================
   EMPTY
   ========================================================= */

.positions-empty-cell {
    padding: 0 !important;
}


.positions-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 300px;

    padding: 40px 20px;

    text-align: center;
}


.positions-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    margin-bottom: 15px;

    border-radius: 16px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 25px;
    font-weight: 400;
}


.positions-empty h3 {
    margin: 0;

    color: #172554;

    font-size: 17px;
    font-weight: 800;
}


.positions-empty p {
    max-width: 380px;

    margin: 8px 0 20px;

    color: #94a3b8;

    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .positions-hero {
        padding: 34px;
    }

    .positions-hero h1 {
        font-size: 30px;
    }

    .positions-summary {
        gap: 14px;
    }

}


@media (max-width: 850px) {

    .positions-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .positions-hero-action {
        width: 100%;
    }

    .positions-primary-button {
        width: 100%;
    }

    .positions-summary {
        grid-template-columns: 1fr;
    }

    .positions-table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .positions-table-count {
        align-self: flex-start;
    }

}


@media (max-width: 600px) {

    .positions-hero {
        min-height: auto;
        padding: 28px 22px;
        border-radius: 18px;
    }

    .positions-hero h1 {
        font-size: 26px;
    }

    .positions-hero p {
        font-size: 12px;
    }

    .positions-summary-card {
        min-height: 115px;
        padding: 19px;
    }

    .positions-table-header {
        padding: 22px 20px;
    }

    .positions-table-wrapper {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        display: block;
    }

    .positions-table {
        min-width: 640px !important;
    }

    .positions-table tbody td,
    .positions-table thead th {
        padding-left: 12px;
        padding-right: 12px;
        white-space: nowrap;
    }

    .positions-table .position-name {
        min-width: 140px;
        white-space: normal;
    }

    .positions-table .position-description {
        min-width: 180px;
        max-width: 250px;
        white-space: normal;
    }

}


/* =========================================================
   DARK MODE OVERRIDES - MASTER DATA POSISI
   ========================================================= */

html.theme-dark .positions-page {
    color: #cbd5e1;
}

html.theme-dark .positions-hero {
    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 .positions-hero h1 {
    color: #ffffff !important;
}

html.theme-dark .positions-hero p {
    color: #94a3b8 !important;
}

html.theme-dark .positions-eyebrow {
    color: #60a5fa !important;
}

html.theme-dark .positions-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 .positions-primary-button:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important;
    color: #ffffff !important;
}

/* Summary Stat Cards */
html.theme-dark .positions-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 .summary-icon {
    background: rgba(30, 41, 59, 0.8) !important;
    color: #60a5fa !important;
}

html.theme-dark .summary-icon.active {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}

html.theme-dark .summary-icon.inactive {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
}

html.theme-dark .summary-label {
    color: #94a3b8 !important;
}

html.theme-dark .summary-content strong {
    color: #f8fafc !important;
}

html.theme-dark .summary-content small {
    color: #64748b !important;
}

/* Table Card Container */
html.theme-dark .positions-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 .positions-table-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.theme-dark .positions-section-label {
    color: #60a5fa !important;
}

html.theme-dark .positions-table-header h2 {
    color: #f8fafc !important;
}

html.theme-dark .positions-table-header p {
    color: #94a3b8 !important;
}

html.theme-dark .positions-table-count {
    background: #172554 !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #818cf8 !important;
}

/* Table Elements */
html.theme-dark .positions-table thead th {
    background: #0a1122 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #818cf8 !important;
}

html.theme-dark .positions-table tbody td {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

html.theme-dark .positions-table tbody tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.4) !important;
}

html.theme-dark .positions-table tbody tr:hover,
html.theme-dark .positions-table tbody tr:hover td {
    background: rgba(30, 41, 59, 0.6) !important;
    color: #ffffff !important;
}

html.theme-dark .position-avatar {
    background: #172554 !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
}

html.theme-dark .position-name strong {
    color: #f8fafc !important;
}

html.theme-dark .position-name span {
    color: #64748b !important;
}

html.theme-dark .position-description {
    color: #cbd5e1 !important;
}

/* Status Badges */
html.theme-dark .position-status.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 .position-status.inactive {
    background: rgba(148, 163, 184, 0.15) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    color: #94a3b8 !important;
}

/* Action Buttons */
html.theme-dark .position-action {
    background: #172033 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

html.theme-dark .position-action:hover {
    background: #2563eb !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

html.theme-dark .positions-empty h3 {
    color: #f8fafc !important;
}

html.theme-dark .positions-empty p {
    color: #94a3b8 !important;
} 