.sp-wrap,
.sp-wrap * {
    box-sizing: border-box;
}

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

.sp-hero,
.sp-filter-panel,
.sp-card,
.sp-panel,
.sp-note,
.sp-formula-note,
.sp-alert {
    background: var(--sp-panel);
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow);
}

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

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

.sp-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;
}

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

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

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

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

.sp-filter-panel {
    border-radius: 28px;
    padding: 22px 26px 24px;
    margin-bottom: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(243, 199, 86, 0.14) 0%, rgba(243, 199, 86, 0) 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(252, 248, 241, 0.98) 52%, rgba(247, 239, 228, 0.97) 100%);
}

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

.sp-filter-title > div {
    min-width: 0;
}

.sp-section-kicker {
    min-height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(183, 133, 33, 0.14);
    background: linear-gradient(180deg, rgba(255, 250, 241, 0.92) 0%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow: 0 12px 22px rgba(93, 60, 36, 0.09);
    letter-spacing: 0.18em;
    line-height: 34px;
}

.sp-filter-title strong {
    display: block;
    margin: 10px 0 4px;
    color: var(--sp-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
}

.sp-filter-title > div > span:last-child {
    display: block;
    color: var(--sp-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    line-height: 1.7;
}

.sp-filter-aside {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sp-result-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(183, 133, 33, 0.14);
    background: linear-gradient(180deg, rgba(255, 250, 241, 0.92) 0%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow: 0 12px 22px rgba(93, 60, 36, 0.09);
    color: #865520;
    font-family: "Gudea", Georgia, serif;
    font-size: 12px;
    font-weight: 700;
}

.sp-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 220px) auto;
    gap: 14px 16px;
    align-items: end;
}

.sp-field {
    min-width: 0;
}

.sp-field label {
    display: block;
    margin-bottom: 8px;
    color: #7b675a;
    font-family: "Gudea", Georgia, serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.sp-field select {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid rgba(183, 133, 33, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: #3f342d;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.sp-field select:focus {
    outline: 0;
    border-color: rgba(154, 51, 23, 0.42);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(154, 51, 23, 0.08);
}

.sp-filter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.sp-filter-submit {
    min-height: 48px;
    min-width: 152px;
    padding: 0 20px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #9a3317 0%, #7f2711 52%, #c79136 100%);
    color: #fff8ed;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(123, 41, 20, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    font-weight: 700;
}

.sp-filter-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(123, 41, 20, 0.22);
    filter: saturate(1.04);
}

.sp-button-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sp-button-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sp-filter-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(183, 133, 33, 0.12);
    color: #6a5b50;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    line-height: 1.55;
}

.sp-filter-status strong {
    color: #8b3014;
    font-size: 15px;
    font-weight: 800;
}

.sp-filter-status small {
    color: #8b7467;
    font-size: 12px;
    line-height: 1.5;
}

.sp-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

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

.sp-card-icon {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 24px;
    height: 24px;
    color: rgba(125, 36, 21, 0.18);
}

.sp-card-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

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

.sp-card strong {
    display: block;
    margin-top: 10px;
    color: var(--sp-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 27px;
    line-height: 1.05;
}

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

.sp-card-masuk { border-top-color: #c79136; }
.sp-card-putus { border-top-color: #7d2415; }
.sp-card-proses { border-top-color: #9a5d26; }
.sp-card-sisa { border-top-color: #5d1d12; }
.sp-card-persen { border-top-color: #b87c2c; }

.sp-formula-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: -2px 0 16px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #7c5c3a;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    line-height: 1.55;
}

.sp-formula-icon {
    width: 18px;
    height: 18px;
    color: #9a6427;
    flex: 0 0 auto;
}

.sp-formula-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sp-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 16px;
}

.sp-panel {
    border-radius: 24px;
    padding: 20px;
    min-width: 0;
}

.sp-panel-full {
    margin-top: 16px;
}

.sp-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.sp-panel-head h2 {
    margin: 0;
    color: var(--sp-maroon-deep);
    font-family: "Play", "Trebuchet MS", sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}

.sp-panel-head p {
    margin: 5px 0 0;
    color: var(--sp-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    line-height: 1.55;
}

.sp-chart-box {
    position: relative;
    width: 100%;
    min-height: 320px;
}

.sp-chart-box canvas {
    display: block;
    max-width: 100%;
}

.sp-legend {
    color: #6c5f56;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    padding-top: 4px;
}

.sp-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px 0 12px;
}

.sp-dot:first-child {
    margin-left: 0;
}

.sp-dot.masuk {
    background: #c79136;
}

.sp-dot.putus {
    background: #7d2415;
}

.sp-type-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.sp-type-list-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 13px;
}

.sp-type-row {
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(145, 88, 34, 0.1);
}

.sp-type-row div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.sp-type-row strong {
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    color: var(--sp-text);
    line-height: 1.45;
}

.sp-type-row span {
    font-family: "Gudea", Georgia, serif;
    font-size: 12px;
    color: var(--sp-muted);
    font-weight: 700;
    white-space: nowrap;
}

.sp-type-row em {
    display: block;
    height: 7px;
    background: linear-gradient(90deg, #7d2415, #c79136);
    border-radius: 99px;
    margin-top: 8px;
}

.sp-empty {
    color: var(--sp-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 14px;
}

.sp-note {
    margin-top: 16px;
    border-radius: 18px;
    padding: 13px 16px;
    color: var(--sp-muted);
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    line-height: 1.55;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.sp-note strong {
    color: var(--sp-maroon-deep);
}

.sp-note-icon {
    width: 18px;
    height: 18px;
    color: #9a6427;
    flex: 0 0 auto;
}

.sp-note-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sp-alert {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    color: #9a3412;
    font-family: "Gudea", Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

@media (max-width: 1180px) {
    .sp-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .sp-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .sp-type-list-two {
        grid-template-columns: 1fr;
    }

    .sp-filter-panel {
        padding: 20px 18px 22px;
    }

    .sp-filter-title,
    .sp-filter-status,
    .sp-panel-head {
        display: block;
    }

    .sp-filter-aside {
        align-items: flex-start;
        margin-top: 12px;
    }

    .sp-filter-grid {
        grid-template-columns: 1fr;
    }

    .sp-filter-actions {
        justify-content: stretch;
    }

    .sp-filter-submit {
        width: 100%;
    }

    .sp-filter-status small {
        display: block;
        margin-top: 12px;
    }

    .sp-legend {
        white-space: normal;
        margin-top: 8px;
    }
}

@media (max-width: 520px) {
    .sp-hero,
    .sp-filter-panel,
    .sp-panel,
    .sp-card,
    .sp-note,
    .sp-formula-note,
    .sp-alert {
        border-radius: 22px;
    }

    .sp-hero,
    .sp-filter-panel {
        padding: 24px 20px;
    }

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

    .sp-cards {
        grid-template-columns: 1fr;
    }

    .sp-panel {
        padding: 16px;
    }

    .sp-chart-box {
        overflow-x: auto;
    }

    .sp-chart-box canvas {
        min-width: 560px;
    }
}
