/* PA Survei Pelayanan Masyarakat (SKM, SPKP & SPAK) - Clean Quarterly Cards */
.pa-srv-app {
    --sv-p: var(--pa-primary, #056e4f);
    --sv-pd: var(--pa-primary-dark, #034d37);
    --sv-pl: var(--pa-primary-light, #e7f4f0);
    --sv-s: var(--pa-secondary, #ff9900);
    --sv-surface: var(--pa-surface, #ffffff);
    --sv-text: var(--pa-text, #1b2420);
    --sv-muted: var(--pa-muted, #64748b);
    --sv-border: var(--pa-border, #e2e8f0);
    margin: 1rem 0 2.25rem;
    color: var(--sv-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Hero Banner */
.pa-srv-hero-banner {
    background: linear-gradient(135deg, #065f46 0%, #056e4f 52%, #034d37 100%);
    color: #ffffff;
    border-radius: 14px;
    border-bottom: 5px solid var(--sv-s);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: 0 8px 24px rgba(3, 77, 55, 0.16);
}
.pa-srv-hero-text { flex: 1 1 520px; min-width: 0; }
.pa-srv-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.82rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffee00;
    background: rgba(255, 153, 0, 0.18);
    border: 1px solid rgba(255, 180, 0, 0.45);
    margin-bottom: 0.7rem;
}
.pa-srv-hero-title {
    margin: 0 0 0.55rem;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.22;
    color: #ffffff;
}
.pa-srv-hero-sub {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #d9f2ea;
    max-width: 660px;
}
.pa-srv-hero-cta { flex-shrink: 0; }
.pa-srv-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.88rem 1.5rem;
    border-radius: 10px;
    background: var(--sv-s);
    color: #111a16 !important;
    font-size: 0.93rem;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transition: transform 0.16s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.pa-srv-cta-btn:hover {
    background: #ffad33;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

/* Section Toolbar */
.pa-srv-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}
.pa-srv-sec-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.pa-srv-accent-bar {
    width: 4px;
    height: 22px;
    border-radius: 4px;
    background: var(--sv-s);
    display: inline-block;
    flex-shrink: 0;
}
.pa-srv-sec-title h3 {
    margin: 0;
    font-size: 1.14rem;
    font-weight: 800;
    color: #064e3b;
}
.pa-srv-year-picker {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #1e293b;
}
.pa-srv-year-picker select {
    padding: 0.42rem 0.9rem;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

/* 4-Column Quarterly Grid */
.pa-srv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.05rem;
}
.pa-srv-card {
    background: var(--sv-surface);
    border: 1.5px solid var(--sv-border);
    border-radius: 14px;
    padding: 1.1rem 1.05rem 1.05rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pa-srv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(5, 110, 79, 0.11);
}
.pa-srv-card.is-highlight {
    border: 2px solid var(--sv-p);
    box-shadow: 0 8px 22px rgba(5, 110, 79, 0.14);
}
.pa-srv-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f6;
}
.pa-srv-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}
.pa-srv-card.is-highlight .pa-srv-card-title { color: #056e4f; }
.pa-srv-q-pill {
    padding: 0.22rem 0.68rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffffff;
    white-space: nowrap;
}
.pa-srv-q-pill.q1 { background: #056e4f; }
.pa-srv-q-pill.q2 { background: #1d72b8; }
.pa-srv-q-pill.q3 { background: #7c3aed; }
.pa-srv-q-pill.q4 { background: #c2410c; }

/* SKM Primary Box */
.pa-srv-skm-box {
    background: #f8faf9;
    border: 1px solid #edf2f0;
    border-radius: 10px;
    padding: 0.88rem 0.75rem;
    text-align: center;
}
.pa-srv-lbl {
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.28rem;
}
.pa-srv-skm-val {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    color: #056e4f;
    margin-bottom: 0.45rem;
}
.pa-srv-skm-grade {
    display: inline-block;
    padding: 0.18rem 0.72rem;
    border-radius: 999px;
    background: #d1fae5;
    color: #065f46;
    font-size: 0.73rem;
    font-weight: 800;
}

/* SPKP & SPAK Dual Row */
.pa-srv-sub-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}
.pa-srv-sub-box {
    background: #f8faf9;
    border: 1px solid #edf2f0;
    border-radius: 10px;
    padding: 0.65rem 0.45rem;
    text-align: center;
}
.pa-srv-sub-val {
    font-size: 1.24rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 0.22rem;
}
.pa-srv-sub-grade {
    font-size: 0.7rem;
    font-weight: 800;
    color: #056e4f;
}

/* Respondents Row */
.pa-srv-resp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #64748b;
    padding-top: 0.25rem;
    border-top: 1px solid #f1f5f9;
}
.pa-srv-resp-left {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    color: #475569;
}

/* PDF Button */
.pa-srv-pdf-btn {
    margin-top: auto;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    padding: 0.56rem 0.85rem;
    border-radius: 9px;
    border: 1.5px solid #475569;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.pa-srv-pdf-btn:hover:not(:disabled) {
    background: var(--sv-p);
    border-color: var(--sv-p);
    color: #ffffff;
}
.pa-srv-pdf-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    border-color: #cbd5e1;
    color: #64748b;
}

/* Modal PDF Preview */
.pa-srv-modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.pa-srv-modal-bg.is-open { display: flex; }
.pa-srv-modal {
    background: #ffffff;
    border: 2px solid var(--sv-p);
    border-radius: 12px;
    width: 100%;
    max-width: 960px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}
.pa-srv-modal-head {
    background: var(--sv-p);
    color: #ffffff;
    padding: 0.8rem 1.15rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
}
.pa-srv-modal-head h3 { margin: 0; font-size: 1rem; color: #ffee00; }
.pa-srv-modal-head small { color: #e7f4f0; font-size: 0.78rem; }
.pa-srv-mbtn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.36rem 0.78rem; border-radius: 7px; border: none;
    font-size: 0.79rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.pa-srv-mbtn-accent { background: var(--sv-s); color: #111a16; }
.pa-srv-mbtn-light { background: rgba(255,255,255,0.16); color: #ffffff; border: 1px solid rgba(255,255,255,0.4); }
.pa-srv-modal-body { flex: 1; background: #1e2925; display: flex; align-items: center; justify-content: center; }
.pa-srv-modal-body iframe { width: 100%; height: 100%; border: 0; background: #ffffff; }

/* High Contrast WCAG */
body.pa-high-contrast .pa-srv-hero-banner {
    background: #000000 !important; color: #ffff00 !important; border: 2px solid #ffff00 !important;
}
body.pa-high-contrast .pa-srv-card,
body.pa-high-contrast .pa-srv-skm-box,
body.pa-high-contrast .pa-srv-sub-box {
    background: #000000 !important; color: #ffffff !important; border-color: #ffff00 !important;
}
body.pa-high-contrast .pa-srv-skm-val,
body.pa-high-contrast .pa-srv-card-title { color: #ffff00 !important; }

@media (max-width: 1060px) {
    .pa-srv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .pa-srv-grid { grid-template-columns: 1fr; }
    .pa-srv-hero-banner { padding: 1.35rem 1.25rem; }
    .pa-srv-hero-title { font-size: 1.38rem; }
}
@media print {
    .no-print { display: none !important; }
    .pa-srv-hero-banner, .pa-srv-q-pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
