.delegasi-page,
.delegasi-page * {
    box-sizing: border-box;
}

.delegasi-page {
    --delegasi-ivory: #fffaf2;
    --delegasi-surface: #fffdf9;
    --delegasi-border: rgba(145, 88, 34, 0.14);
    --delegasi-shadow: 0 18px 42px rgba(72, 34, 17, 0.08);
    --delegasi-maroon: #7d2415;
    --delegasi-maroon-deep: #5d1d12;
    --delegasi-gold: #cc9c4c;
    --delegasi-text: #2c2622;
    --delegasi-muted: #786d64;
    --delegasi-panel: linear-gradient(135deg, rgba(255, 253, 249, 0.98), rgba(255, 247, 233, 0.92));
    color: var(--delegasi-text);
    margin-bottom: 42px;
}

.delegasi-hero,
.delegasi-summary-card,
.delegasi-filter-card,
.delegasi-card,
.delegasi-pagination-wrap,
.delegasi-empty,
.delegasi-modal-box {
    background: var(--delegasi-panel);
    border: 1px solid var(--delegasi-border);
    box-shadow: var(--delegasi-shadow);
}

.delegasi-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 32px 34px;
    margin-bottom: 22px;
}

.delegasi-hero::before {
    content: "";
    position: absolute;
    left: 28px;
    top: 26px;
    width: 78px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--delegasi-maroon) 0%, var(--delegasi-gold) 100%);
}

.delegasi-hero-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(210, 164, 83, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(125, 36, 21, 0.12), transparent 30%);
    pointer-events: none;
}

.delegasi-hero-content {
    position: relative;
    z-index: 1;
}

.delegasi-eyebrow,
.delegasi-section-kicker,
.delegasi-card-kicker,
.delegasi-modal-kicker {
    display: inline-block;
    color: #936229;
    font-family: "Gudea", Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.delegasi-hero h1 {
    margin: 26px 0 10px;
    color: var(--delegasi-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 31px;
    font-weight: 700;
    line-height: 1.18;
}

.delegasi-hero p {
    margin: 0;
    max-width: 720px;
    color: var(--delegasi-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 14px;
    line-height: 1.7;
}

.delegasi-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.delegasi-summary-card {
    position: relative;
    overflow: hidden;
    min-height: 96px;
    border-radius: 24px;
    border-top: 4px solid rgba(169, 106, 37, 0.94);
    padding: 18px 20px 16px;
}

.delegasi-summary-card span {
    display: block;
    color: #7e7368;
    font-family: "Gudea", Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.delegasi-summary-card strong {
    display: block;
    margin-top: 8px;
    color: var(--delegasi-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 26px;
    line-height: 1;
}

.delegasi-summary-card small {
    display: block;
    margin-top: 8px;
    color: var(--delegasi-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 12px;
}

.delegasi-filter-card {
    border-radius: 28px;
    padding: 24px 26px 22px;
    margin-bottom: 22px;
}

.delegasi-filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.delegasi-filter-head h2 {
    margin: 8px 0 6px;
    color: var(--delegasi-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 24px;
    line-height: 1.2;
}

.delegasi-filter-head p {
    margin: 0;
    max-width: 720px;
    color: var(--delegasi-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    line-height: 1.7;
}

.delegasi-result-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(207, 168, 93, 0.18), rgba(207, 168, 93, 0.1));
    border: 1px solid rgba(145, 88, 34, 0.12);
    color: #865520;
    font-family: "Gudea", Georgia, serif;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.delegasi-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.delegasi-field-wide {
    grid-column: span 3;
}

.delegasi-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.delegasi-field span {
    color: #7e7368;
    font-family: "Gudea", Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.delegasi-field input,
.delegasi-field select {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(145, 88, 34, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: var(--delegasi-text);
    font-family: "Gudea", Georgia, serif;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.delegasi-field input:focus,
.delegasi-field select:focus {
    outline: none;
    border-color: rgba(145, 88, 34, 0.35);
    box-shadow: 0 0 0 4px rgba(204, 156, 76, 0.12);
    background: #ffffff;
}

.delegasi-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.delegasi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 44px;
    padding: 0 18px;
    border-radius: 16px;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

#content .delegasi-filter-card .delegasi-btn-primary,
.delegasi-filter-card .delegasi-btn-primary,
.delegasi-filter-card button.delegasi-btn-primary {
    border: 0 !important;
    background: linear-gradient(135deg, var(--delegasi-maroon) 0%, #b16728 100%) !important;
    background-image: linear-gradient(135deg, var(--delegasi-maroon) 0%, #b16728 100%) !important;
    color: #fff7ef !important;
    font-family: "Gudea", Georgia, serif !important;
    box-shadow: 0 14px 28px rgba(125, 36, 21, 0.18) !important;
    cursor: pointer;
}

#content .delegasi-filter-card .delegasi-btn-primary:hover,
.delegasi-filter-card .delegasi-btn-primary:hover,
.delegasi-filter-card button.delegasi-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(125, 36, 21, 0.22) !important;
    color: #fff7ef !important;
}

#content .delegasi-filter-card .delegasi-btn-light,
.delegasi-filter-card .delegasi-btn-light,
.delegasi-filter-card a.delegasi-btn-light {
    border: 1px solid rgba(145, 88, 34, 0.18) !important;
    background: rgba(255, 255, 255, 0.88) !important;
    background-image: none !important;
    color: var(--delegasi-maroon) !important;
    font-family: "Gudea", Georgia, serif !important;
}

#content .delegasi-filter-card .delegasi-btn-light:hover,
.delegasi-filter-card .delegasi-btn-light:hover,
.delegasi-filter-card a.delegasi-btn-light:hover {
    background: rgba(125, 36, 21, 0.08) !important;
    color: var(--delegasi-maroon-deep) !important;
    text-decoration: none;
}

.delegasi-filter-status {
    margin-top: 16px;
    color: var(--delegasi-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
}

.delegasi-filter-status strong {
    color: var(--delegasi-maroon-deep);
}

.delegasi-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.delegasi-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 18px 20px 16px;
    border-top: 4px solid rgba(169, 106, 37, 0.94);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.delegasi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(72, 34, 17, 0.1);
}

.delegasi-card-top,
.delegasi-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.delegasi-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-family: "Gudea", Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.delegasi-status.status-success {
    background: rgba(74, 135, 99, 0.12);
    color: #276247;
}

.delegasi-status.status-warning,
.delegasi-status.status-orange {
    background: rgba(198, 122, 50, 0.14);
    color: #8e4f15;
}

.delegasi-status.status-danger {
    background: rgba(150, 56, 45, 0.12);
    color: #8a2c23;
}

.delegasi-status.status-info {
    background: rgba(164, 123, 52, 0.15);
    color: #8f6423;
}

.delegasi-status.status-pending,
.delegasi-status.status-muted {
    background: rgba(110, 96, 82, 0.12);
    color: #64574b;
}

.delegasi-card-main {
    margin-top: 10px;
}

.delegasi-card-main h3 {
    margin: 5px 0 7px;
    color: var(--delegasi-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 24px;
    line-height: 1.18;
}

.delegasi-card-main p {
    margin: 0;
    color: var(--delegasi-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 12.5px;
    line-height: 1.6;
}

.delegasi-card-meta,
.delegasi-timeline,
.delegasi-detail-grid {
    display: grid;
    gap: 12px;
}

.delegasi-card-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.delegasi-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.delegasi-card-meta > div,
.delegasi-timeline > div,
.delegasi-detail-item {
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(145, 88, 34, 0.12);
}

.delegasi-card-meta span,
.delegasi-timeline span,
.delegasi-detail-item small {
    display: block;
    margin-bottom: 5px;
    color: #7e7368;
    font-family: "Gudea", Georgia, serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delegasi-card-meta strong,
.delegasi-timeline strong,
.delegasi-detail-item strong {
    display: block;
    color: var(--delegasi-text);
    font-family: "Gudea", Georgia, serif;
    font-size: 12.5px;
    line-height: 1.42;
    word-break: break-word;
}

.delegasi-card-footer {
    margin-top: 14px;
    padding-top: 14px;
    justify-content: flex-end;
    border-top: 1px solid rgba(145, 88, 34, 0.1);
}

.delegasi-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--delegasi-maroon) 0%, #b16728 100%);
    color: #fff7ef;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(125, 36, 21, 0.16);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.delegasi-detail-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(125, 36, 21, 0.22);
}

.delegasi-empty {
    border-radius: 28px;
    padding: 34px 28px;
    text-align: center;
}

.delegasi-empty h3 {
    margin: 0 0 8px;
    color: var(--delegasi-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 24px;
}

.delegasi-empty p {
    margin: 0;
    color: var(--delegasi-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 14px;
    line-height: 1.7;
}

.delegasi-pagination-wrap {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 24px;
}

.delegasi-pagination-info {
    margin-bottom: 14px;
    text-align: center;
    color: var(--delegasi-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
}

.delegasi-pagination-info strong {
    color: var(--delegasi-maroon-deep);
}

.custom-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.custom-pagination a,
.custom-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(145, 88, 34, 0.12);
    color: var(--delegasi-text);
    font-family: "Gudea", Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.custom-pagination span.active {
    background: linear-gradient(135deg, var(--delegasi-maroon) 0%, #b16728 100%);
    border-color: transparent;
    color: #fff7ef;
}

.custom-pagination a:hover {
    background: rgba(125, 36, 21, 0.08);
    border-color: rgba(125, 36, 21, 0.24);
    color: var(--delegasi-maroon-deep);
    transform: translateY(-1px);
}

.delegasi-dataset {
    position: relative;
}

.delegasi-dataset.is-loading {
    pointer-events: none;
    opacity: 0.72;
}

.delegasi-dataset.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: rgba(255, 252, 247, 0.62);
}

.delegasi-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.delegasi-modal.is-open {
    display: flex;
}

.delegasi-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 22, 16, 0.54);
    backdrop-filter: blur(6px);
}

.delegasi-modal-box {
    position: relative;
    z-index: 1;
    width: min(960px, calc(100vw - 56px));
    max-height: min(88vh, 860px);
    overflow: hidden;
    border-radius: 30px;
}

.delegasi-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 250, 242, 0.95);
    color: var(--delegasi-maroon-deep);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(72, 34, 17, 0.12);
}

.delegasi-modal-header {
    padding: 24px 28px 18px;
    background:
        radial-gradient(circle at top right, rgba(210, 164, 83, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(125, 36, 21, 0.96) 0%, rgba(177, 103, 40, 0.92) 100%);
    color: #fff8f1;
}

.delegasi-modal-header .delegasi-modal-kicker {
    color: rgba(255, 244, 232, 0.82);
}

.delegasi-modal-header h3 {
    margin: 10px 44px 6px 0;
    color: #fffdf8;
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 26px;
    line-height: 1.18;
    text-shadow: 0 1px 10px rgba(55, 20, 9, 0.18);
}

.delegasi-modal-header p {
    margin: 0;
    color: rgba(255, 248, 241, 0.8);
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    line-height: 1.6;
}

.delegasi-modal-body {
    max-height: calc(88vh - 150px);
    overflow: auto;
    padding: 22px 24px 24px;
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 247, 233, 0.92));
    color: #44342a;
}

.delegasi-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.delegasi-detail-grid-summary {
    margin-bottom: 16px;
}

.delegasi-detail-grid-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delegasi-detail-item-wide {
    grid-column: span 2;
}

.delegasi-detail-section {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(145, 88, 34, 0.12);
}

.delegasi-detail-section h4 {
    margin: 0 0 12px;
    color: var(--delegasi-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 18px;
}

.delegasi-modal-body .delegasi-detail-item small {
    color: #8c5f2e;
}

.delegasi-modal-body .delegasi-detail-item strong {
    color: #45362d;
}

.delegasi-modal-body #modalNoPerkaraDetail {
    color: var(--delegasi-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 18px;
    line-height: 1.25;
}

.delegasi-modal-open {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .delegasi-summary-cards,
    .delegasi-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .delegasi-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .delegasi-field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 780px) {
    .delegasi-hero,
    .delegasi-filter-card,
    .delegasi-card,
    .delegasi-pagination-wrap,
    .delegasi-empty {
        border-radius: 24px;
    }

    .delegasi-hero,
    .delegasi-filter-card {
        padding: 24px 20px;
    }

    .delegasi-hero h1 {
        font-size: 27px;
    }

    .delegasi-summary-cards,
    .delegasi-card-grid,
    .delegasi-filter-grid,
    .delegasi-card-meta,
    .delegasi-timeline,
    .delegasi-detail-grid,
    .delegasi-detail-grid-meta {
        grid-template-columns: 1fr;
    }

    .delegasi-field-wide,
    .delegasi-detail-item-wide {
        grid-column: auto;
    }

    .delegasi-filter-head,
    .delegasi-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .delegasi-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .delegasi-btn,
    .delegasi-detail-btn {
        width: 100%;
    }

    .delegasi-modal {
        padding: 16px;
    }

    .delegasi-modal-box {
        width: calc(100vw - 24px);
        border-radius: 24px;
    }

    .delegasi-modal-header {
        padding: 22px 22px 16px;
    }

    .delegasi-modal-header h3 {
        font-size: 22px;
    }

    .delegasi-modal-body {
        padding: 18px;
    }
}
