/* PA Laporan LHKPN & LHKASN - Clean Frontend Styles (#056e4f & #ff9900) */
.pa-lh-app {
    --lh-p: var(--pa-primary, #056e4f);
    --lh-pd: var(--pa-primary-dark, #034d37);
    --lh-pl: var(--pa-primary-light, #e7f4f0);
    --lh-s: var(--pa-secondary, #ff9900);
    --lh-sd: var(--pa-secondary-dark, #d47f00);
    --lh-surface: var(--pa-surface, #ffffff);
    --lh-bg: var(--pa-bg, #f6f8f7);
    --lh-text: var(--pa-text, #1b2420);
    --lh-muted: var(--pa-muted, #52615b);
    --lh-border: var(--pa-border, #d7e2dd);
    margin: 1rem 0 2rem;
    color: var(--lh-text);
}

.pa-lh-header {
    background: linear-gradient(135deg, var(--lh-p) 0%, var(--lh-pd) 100%);
    color: #ffffff;
    border-bottom: 4px solid var(--lh-s);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.pa-lh-badge {
    display: inline-block;
    background: var(--lh-s);
    color: #111a16;
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.16rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.4rem;
}
.pa-lh-title { margin: 0 0 0.2rem; font-size: 1.35rem; color: #ffee00; line-height: 1.25; }
.pa-lh-sub { margin: 0; font-size: 0.86rem; color: #e7f4f0; }

.pa-lh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    padding: 0.48rem 0.95rem; border-radius: 7px; border: none; font-weight: 700; font-size: 0.83rem;
    cursor: pointer; text-decoration: none; transition: transform 0.15s ease, background 0.2s ease;
}
.pa-lh-btn:hover { transform: translateY(-1px); text-decoration: none; }
.pa-lh-btn-primary { background: var(--lh-p); color: #ffffff; }
.pa-lh-btn-primary:hover { background: var(--lh-pd); color: #ffffff; }
.pa-lh-btn-secondary { background: var(--lh-s); color: #111a16; }
.pa-lh-btn-secondary:hover { background: #ffad33; color: #111a16; }
.pa-lh-btn-outline { background: transparent; color: var(--lh-p); border: 1.5px solid var(--lh-p); }
.pa-lh-btn-outline:hover { background: var(--lh-p); color: #ffffff; }
.pa-lh-btn-light { background: rgba(255,255,255,0.16); color: #ffffff; border: 1px solid rgba(255,255,255,0.4); }
.pa-lh-btn-light:hover { background: #ffffff; color: var(--lh-pd); }
.pa-lh-btn-sm { padding: 0.32rem 0.68rem; font-size: 0.78rem; }

.pa-lh-controls {
    background: var(--lh-surface); border: 1px solid var(--lh-border); border-radius: 10px;
    padding: 0.85rem 1rem; margin-bottom: 1rem; box-shadow: 0 3px 12px rgba(5,110,79,0.05);
}
.pa-lh-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.75rem; }
.pa-lh-tab {
    background: var(--lh-bg); border: 1.5px solid var(--lh-border); color: var(--lh-text);
    border-radius: 999px; padding: 0.36rem 0.92rem; font-size: 0.83rem; font-weight: 700; cursor: pointer;
}
.pa-lh-tab.is-active, .pa-lh-tab:hover { background: var(--lh-p); border-color: var(--lh-p); color: #ffffff; }

.pa-lh-filters { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.pa-lh-input {
    padding: 0.45rem 0.75rem; border: 1.5px solid var(--lh-border); border-radius: 7px;
    font-size: 0.86rem; background: var(--lh-surface); color: var(--lh-text);
}
.pa-lh-input[type="search"] { flex: 1 1 220px; }
.pa-lh-avatar-toggle { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.83rem; font-weight: 600; cursor: pointer; }
.pa-lh-view-switch { display: inline-flex; gap: 0.3rem; margin-left: auto; }
.pa-lh-mini-btn {
    background: var(--lh-bg); border: 1px solid var(--lh-border); color: var(--lh-text);
    border-radius: 6px; padding: 0.38rem 0.72rem; font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.pa-lh-mini-btn.is-active, .pa-lh-mini-btn:hover { background: var(--lh-s); border-color: var(--lh-s); color: #111a16; }

.pa-lh-table-wrap {
    overflow-x: auto; background: var(--lh-surface); border: 1px solid var(--lh-border);
    border-radius: 10px; box-shadow: 0 3px 12px rgba(5,110,79,0.06);
}
.pa-lh-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.pa-lh-table th {
    background: var(--lh-p); color: #ffffff; text-align: left;
    padding: 0.75rem 0.85rem; font-weight: 700; white-space: nowrap;
}
.pa-lh-table td { padding: 0.72rem 0.85rem; border-bottom: 1px solid var(--lh-border); vertical-align: middle; }
.pa-lh-table tbody tr:nth-child(even) { background: rgba(5, 110, 79, 0.03); }
.pa-lh-table tbody tr:hover { background: #fff4e5; }

.pa-lh-person { display: flex; align-items: center; gap: 0.65rem; }
.pa-lh-avatar {
    width: 38px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
    background: var(--lh-pl); border: 1.5px solid var(--lh-s);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 800; color: var(--lh-pd);
}
.pa-lh-app.hide-avatars .pa-lh-avatar { display: none; }

.pa-lh-chip { display: inline-block; padding: 0.15rem 0.58rem; border-radius: 999px; font-size: 0.73rem; font-weight: 800; }
.pa-lh-chip-lhkpn  { background: #e7f4f0; color: #034d37; }
.pa-lh-chip-lhkasn { background: #fff4e5; color: #9a5b00; }
.pa-lh-chip-rekap  { background: #e0f2fe; color: #075985; }
.pa-lh-st-ok       { display: inline-block; font-size: 0.74rem; font-weight: 700; color: #166534; margin-top: 3px; }
.pa-lh-st-wait     { display: inline-block; font-size: 0.74rem; font-weight: 700; color: #b45309; margin-top: 3px; }
.pa-lh-actions     { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.pa-lh-cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pa-lh-card-item {
    background: var(--lh-surface); border: 1px solid var(--lh-border); border-top: 4px solid var(--lh-p);
    border-radius: 10px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.55rem;
    box-shadow: 0 3px 12px rgba(5,110,79,0.06);
}
.pa-lh-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }

.pa-lh-modal-bg {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.68);
    z-index: 9999; align-items: center; justify-content: center; padding: 1rem;
}
.pa-lh-modal-bg.is-open { display: flex; }
.pa-lh-modal {
    background: var(--lh-surface); border: 2px solid var(--lh-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.4);
}
.pa-lh-modal-head {
    background: var(--lh-p); color: #ffffff; padding: 0.8rem 1.15rem;
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.65rem;
}
.pa-lh-modal-head h3 { margin: 0; font-size: 1rem; color: #ffee00; }
.pa-lh-modal-head small { color: #e7f4f0; font-size: 0.78rem; }
.pa-lh-modal-body { flex: 1; background: #1e2925; display: flex; align-items: center; justify-content: center; }
.pa-lh-modal-body iframe { width: 100%; height: 100%; border: 0; background: #ffffff; }

body.pa-high-contrast .pa-lh-header,
body.pa-high-contrast .pa-lh-table th {
    background: #000000 !important; color: #ffff00 !important; border-bottom: 2px solid #ffff00 !important;
}
body.pa-high-contrast .pa-lh-controls,
body.pa-high-contrast .pa-lh-table-wrap,
body.pa-high-contrast .pa-lh-card-item {
    background: #000000 !important; color: #ffffff !important; border-color: #ffff00 !important;
}

@media (max-width: 960px) { .pa-lh-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pa-lh-cards-grid { grid-template-columns: 1fr; } }
@media print {
    .no-print, .site-header, .site-footer, .top-utility-bar, .pa-float-stack { display: none !important; }
    .pa-lh-header, .pa-lh-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
