/* Shared screen palette. Print layouts keep their paper colours. */
@media screen {
  :root {
    --red: #c21b34;
    --red-dark: #921429;
    --gold: #bea174;
    --ink: #f0edef;
    --muted: #b8afb5;
    --line: #373037;
    --paper: #1a191e;
    --canvas: #0e0e11;
    --surface: #151519;
    --raised: #232127;
    --link: #ff9baa;
    --shadow: 0 12px 32px #00000030;
    color-scheme: dark;
    accent-color: var(--red);
  }
  body.pdsm-portal {
    background: radial-gradient(ellipse at 100% 0, #40121f24, transparent 42rem), var(--canvas);
    color: var(--ink);
  }
  .pdsm-portal ::selection { background: #9f243a; color: #fff; }
  .pdsm-portal a:hover { color: var(--link); }
  .pdsm-card { border-color: var(--line); background: var(--paper); }
  .pdsm-header {
    background: linear-gradient(120deg, #350e18, #861529 58%, #a7162d);
    border-bottom-color: #421c28;
    box-shadow: 0 5px 20px #0005;
  }
  .pdsm-desktop-nav { background: #120d12a6; border-top: 1px solid #ffffff0c; }
  .pdsm-desktop-nav a:hover { color: #ffbdc8; }
  .pdsm-drawer, .pdsm-search-dialog, .pdsm-access-dialog {
    color: var(--ink); background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 22px 70px #0009;
  }
  .pdsm-drawer-top strong, .pdsm-dialog-heading h2 { color: var(--ink); }
  .pdsm-drawer-top, .pdsm-drawer-bottom { border-color: var(--line); }
  .pdsm-close { color: #e1d9de; background: var(--raised); }
  .pdsm-close:hover { color: #fff; background: #4a1b29; }
  .pdsm-submenu { border-color: #6a2639; }
  .pdsm-submenu a { color: #c9bec6; }
  .pdsm-drawer-nav summary:hover, .pdsm-drawer-nav>a:hover, .pdsm-submenu a:hover { color: var(--link); }
  .pdsm-button, .pdsm-search-form button {
    background: linear-gradient(135deg, #b91b32, #8e1228); color: #fff; border-color: #b62b42;
  }
  .pdsm-button:hover, .pdsm-search-form button:hover { background: #cd2440; color: #fff; }
  .pdsm-button-outline { background: var(--raised); color: #eee4e9; border-color: #59414a; }
  .pdsm-button-outline:hover { background: #3b1a26; color: #fff; }
  .pdsm-portal :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]), textarea, select) {
    color: var(--ink); background: #111115; border: 1px solid #51434d;
    border-radius: 8px; max-width: 100%;
  }
  .pdsm-portal :is(input, textarea)::placeholder { color: #aaa0a7; opacity: 1; }
  .pdsm-portal :is(input, textarea, select):disabled { color: #a298a0; background: #262329; }
  .pdsm-search-form { border-color: #51434d; background: #111115; }
  .pdsm-search-form input { border: 0!important; border-radius: 0!important; }
  .pdsm-access-options button { background: var(--raised); border-color: #51434d; color: var(--ink); }
  .pdsm-access-options button[aria-pressed=true] { background: var(--red); border-color: #ec566b; color: #fff; }
  .pdsm-access-toggle { border-color: #f6dce1; box-shadow: 0 4px 14px #0006; }
  .pdsm-skip:focus { background: var(--raised); color: #fff; }

  /* Homepage and shared portal components. */
  .pdsm-ticker { background: #191318; border-color: #4a2531; color: #e0cdd5; }
  .pdsm-ticker-label { color: #ff9baa; }
  .pdsm-ticker-toggle { background: #281820; border-color: #663043; color: #ffb2bf; }
  .pdsm-population { background: linear-gradient(#111114, #1d1b20); }
  .pdsm-pop-card, .pdsm-stat-links a { background: #ffffff06; border-color: #ffffff14; }
  .pdsm-population .pdsm-badge { background: #9b1d34; box-shadow: 0 4px 16px #9b1d3426; }
  .pdsm-number-total, .pdsm-number-male, .pdsm-number-female { color: #f4b1be; }
  .pdsm-pop-card div>span, .pdsm-stat-links a { color: #c8bec5; }
  .pdsm-stat-links .pdsm-icon { color: #db909f; }
  .pdsm-data-note { color: #b9aeb6; }
  .pdsm-greeting { border-color: var(--line); box-shadow: var(--shadow); }
  .pdsm-chief-panel { background: linear-gradient(145deg, #87182c, #41121e); }
  .pdsm-chief-photo { background: linear-gradient(130deg, #bfa378, #4e2532, #b37d89); box-shadow: 0 10px 24px #0003; }
  .pdsm-greeting-copy { background: radial-gradient(ellipse at bottom right, #791b2d2b, transparent 70%), var(--paper); }
  .pdsm-greeting-copy h2 { color: #f3bac5; }
  .pdsm-greeting-copy h2 span:before { background: linear-gradient(90deg, #cf526a, transparent); }
  .pdsm-greeting-copy>p, .pdsm-greeting-copy>div>p { color: #d1c7ce; }
  .pdsm-section-title { color: #f3eff1; }
  .pdsm-section-subtitle, .pdsm-lapak-intro { color: var(--muted); }
  .pdsm-chips a { background: #201d23; border-color: #3f343d; color: #d8cdd4; }
  .pdsm-chips a.is-active { background: #ad1c34; border-color: #d44a61; color: #fff; }
  .pdsm-news-card, .pdsm-product-card { background: var(--paper); border-color: var(--line); }
  .pdsm-news-body h3, .pdsm-product-info h3 { color: var(--ink); }
  .pdsm-category, .pdsm-product-category { color: #ef91a3; }
  .pdsm-category .pdsm-icon { fill: #bf6073; stroke: #bf6073; }
  .pdsm-excerpt, .pdsm-product-seller, .pdsm-product-price { color: #bfb3bc; }
  .pdsm-news-meta { border-color: #383038; }
  .pdsm-news-meta time, .pdsm-article-list time, .pdsm-post-date { color: #b6aab3; }
  .pdsm-news-meta>a, .pdsm-product-contact, .pdsm-lapak-register { color: var(--link); }
  .pdsm-view-count { background: #3b1b28; color: #f3aab9; }
  .pdsm-product-image { background: #242026; }
  .pdsm-tabs { background: #131216; border-color: var(--line); }
  .pdsm-tabs button { color: #b4a8b1; }
  .pdsm-tabs button[aria-selected=true] { color: #ffb1bf; background: #311720; border-color: #ba8693; }
  .pdsm-popular-note { color: #b6aab2; }
  .pdsm-article-list li+li { border-color: #383038; }
  .pdsm-list-number { color: #dca5b1; border-color: #57404d; background: #281b23; }
  .pdsm-article-list a>.pdsm-icon { color: #b394a2; }
  .pdsm-empty { color: #c3b7c0; }
  .pdsm-empty a { color: var(--link); }
  .pdsm-pagination { color: var(--muted); }
  .pdsm-pagination .page-numbers { color: #e0d5dc; border-color: #493944; background: #211c23; }
  .pdsm-pagination .page-numbers.current { color: #fff; border-color: #c94760; background: #a71c34; }
  .pdsm-pagination .dots { background: transparent; }
  .pdsm-visitor-grid>div+div:before { background: var(--line); }
  .pdsm-visitor-grid i, .pdsm-visitor-grid>div:nth-child(2) i, .pdsm-visitor-grid>div:nth-child(3) i { background: #351b26; color: #e997aa; }
  .pdsm-visitor-grid strong, .pdsm-visitor-grid>div:nth-child(2) strong, .pdsm-visitor-grid>div:nth-child(3) strong { color: #f0b5c2; }
  .pdsm-visitor-grid span, .pdsm-visitor-note { color: #b4a6b0; }
  .pdsm-visitor-note { border-color: var(--line); }
  .pdsm-hours tr+tr, .pdsm-hours-note, .pdsm-staff-heading { border-color: var(--line); }
  .pdsm-hours tr.pdsm-today { background: #351923; }
  .pdsm-time-in { color: #f0c4ce; background: #3c2330; }
  .pdsm-time-out { color: #f1b4c1; background: #4a1f2d; }
  .pdsm-time-off { color: #bcabb7; background: #2c2630; }
  .pdsm-hours tr:nth-last-child(-n+2), .pdsm-hours-note { color: #aea2ad; }
  .pdsm-hours-note a, .pdsm-staff-all { color: var(--link); }
  .pdsm-staff { background: linear-gradient(#1a191e, #21171d); }
  .pdsm-staff-heading p { color: var(--muted); }
  .pdsm-staff-prev, .pdsm-staff-next { color: #ffa1b2; background: #2c202a; border: 1px solid #784253; }
  .pdsm-staff-dots button:after { background: #66505d; }
  .pdsm-staff-dots button[aria-current=true]:after { background: #df627a; }
  .pdsm-budget { background: #141216; }
  .pdsm-budget-banner { background: radial-gradient(ellipse at right, #76122999, transparent 75%), linear-gradient(130deg, #171116, #39121e); }
  .pdsm-budget-card { background: #201b22; border-color: #49313d; }
  .pdsm-budget-card>i { background: #411f2d; color: #f4a1b4; }
  .pdsm-budget-card span, .pdsm-budget-card small, .pdsm-budget-note { color: #bcaeb8; }
  .pdsm-budget-card strong, .pdsm-budget-note a { color: #f0a6b8; }
  .pdsm-section-jumps a { background: #231a22; border-color: #5e2b3d; color: #f3afbf; }
  .pdsm-footer { background: linear-gradient(180deg, #171217f5, #09090bf7), url('foto_sampul_tajam-1536x1152.jpg') center/cover; color: #c0b4be; }
  .pdsm-footer-brand small, .pdsm-footer-map small, .pdsm-footer-bottom { color: #b1a2ad; }
  .pdsm-footer-contact>p>.pdsm-icon, .pdsm-contact-line>.pdsm-icon, .pdsm-footer-menu a>.pdsm-icon, .pdsm-footer-map>a .pdsm-icon { color: #d96e87; }
  .pdsm-footer-map iframe { background: #252128; }

  /* Article pages, search, archives and common WordPress content. */
  .pdsm-document { border-color: #3d2d38; background: linear-gradient(135deg, #21171d55, transparent 40%), var(--paper); }
  .pdsm-breadcrumb { color: #b6a7b3; }
  .pdsm-breadcrumb a, .pdsm-post-nav { color: var(--link); }
  .pdsm-post-nav { border-color: var(--line); }
  .pdsm-legacy { color: #ddd4db; line-height: 1.8; }
  .pdsm-legacy :is(h1,h2,h3,h4,h5,h6) { color: #f6eff3; }
  .pdsm-legacy a { color: var(--link); }
  .pdsm-legacy :is(hr, fieldset) { border-color: #51404b; }
  .pdsm-legacy :is(pre, code, kbd) { background: #101014; color: #edc3cf; border-color: #4e3544; }
  .pdsm-legacy pre { padding: 16px; overflow: auto; border-radius: 8px; }
  .pdsm-legacy blockquote { color: #e5b4c2!important; background: #321b2570; border-color: #b34360!important; }
  .pdsm-legacy :is(figcaption, .wp-element-caption) { color: #c3b3bf; }
  .pdsm-legacy :is(.has-white-background-color,.has-very-light-gray-background-color,.has-cyan-bluish-gray-background-color) { background-color: #241f27!important; }
  .pdsm-legacy :is(.has-black-color,.has-very-dark-gray-color) { color: #e9dce6!important; }
  .pdsm-legacy .wp-block-cover { background-color: #271a24; }
  .pdsm-legacy .wp-block-file__button, .pdsm-legacy .wp-block-button__link { color: #fff; background: #a91c35; }
  .pdsm-legacy :is(.pds-public,.pdx) { color: #ddd4db!important; }
  .pdsm-legacy :is(.pds-intro,.ps-pita) { background: linear-gradient(115deg, #351923, #1d171f); border-color: #6e2b40; color: #dfccd7; }
  .pdsm-legacy .pds-intro { padding: 18px 20px; border-left: 3px solid #a82d49; border-radius: 0 12px 12px 0; }
  .pdsm-legacy :is(.pds-panel,.ps-kartu,.pds-link-card,.pds-detail,details) { background: #211c24!important; color: #ddd3dc!important; border-color: #4a3542!important; }
  .pdsm-legacy .pds-link-card:hover { background: #321c28!important; border-color: #a14a63!important; }
  .pdsm-legacy .pds-link-card span { color: #c1b1bd; }
  .pdsm-legacy .pds-stat-grid>div { background: #321b28; border: 1px solid #613448; color: #e8d6e2; }
  .pdsm-legacy .pds-stat-grid strong { color: #f3a3b9; }
  .pdsm-legacy :is(.pds-note,.note,.pds-jb__galat) { background: #32232c!important; border-color: #a14b66!important; color: #e3c2d0!important; }
  .pdsm-legacy :is(.pds-button,.pds-button--light,.pdx .btn,.ld-dl) { background: linear-gradient(130deg, #ac1e39, #7e152c)!important; color: #fff!important; border-color: #be3c58!important; }
  .pdsm-legacy .pds-button--light { background: #30212d!important; border: 1px solid #754157; color: #ffc1d1!important; }
  .pdsm-legacy :is(table, .pds-jb__wrap, .pdx .tbl) { background: #19171d!important; border-color: #4b3745!important; color: #e3d6df!important; }
  .pdsm-legacy :is(th, .pds-jb__wrap th, .pdx th) { background: #401a2a!important; color: #f8e9f1!important; border-color: #604052!important; }
  .pdsm-legacy :is(td, .pds-jb__wrap td, .pdx td) { background: #1d1921; color: #ded2dc!important; border-color: #40303c!important; }
  .pdsm-legacy tbody tr:nth-child(even)>td { background: #261f29; }
  .pdsm-legacy tbody tr:hover>td { background: #34232f; }
  .pdsm-legacy :is(.pds-jb__wrap tr.hari-ini td,.pdx td.rw) { background: #4a2133!important; color: #ffd8e4!important; }
  .pdsm-legacy :is(.pds-jb__pita,.pdx .hero,.pdx .dus) { background: linear-gradient(115deg, #59172b, #2a131f)!important; color: #fff!important; }
  .pdsm-legacy :is(.pds-jb__ket,.pds-jb__muat) { color: #c0acba; }
  .pdsm-legacy .pds-jb__pita p { color: #dcc1ce; }
  .pdsm-legacy .pds-bars .pds-bar { color: #e4d4df; }
  .pdsm-legacy .pds-bar i { background: linear-gradient(90deg, #8e1e39, #db5f7f); }
  .pdsm-legacy :is(.pdx .produk-card,.pdx .empty,.pdx .step,.pdx .adv li,.pdx .goal) { background: #231c26!important; color: #e4d6e0!important; border-color: #583747!important; box-shadow: 0 8px 24px #0002; }
  .pdsm-legacy .pdx :is(h2.sec,.empty h2,.step h3,.produk-card h3,.produk-card .harga) { color: #f3b0c6!important; }
  .pdsm-legacy .pdx :is(.empty p,.step p,.produk-card .desk,.produk-card .penjual) { color: #c6b3c1!important; }
  .pdsm-legacy .pdx :is(.produk-card .kat,.sum span,.goal b) { background: #492136!important; color: #f4b5ce!important; border-color: #78415d!important; }
  .pdsm-legacy .pdx .bnr.info { background: #311f2c!important; color: #e5c8d9!important; border-color: #914563!important; }
  .pdsm-legacy .pdx .back { color: #f4a8c1; }
  .pdsm-legacy .pdx span[style*="background" i] { background: #30232e!important; color: #e2d1df!important; }
  .pdsm-legacy .pdx span[style*="#0e6b38" i] { background: #a52240!important; color: #fff!important; }
  .pdsm-legacy :is(p,span,strong,em,h1,h2,h3,h4,h5,h6,figcaption)[style*="color" i] { color: #e9d4e2!important; }
  .pdsm-legacy [style*="background:#e3ece7" i] { background: #39303c!important; }
  .pdsm-legacy [style*="background:#178a4c" i] { background: linear-gradient(90deg, #8b1c38, #dc6586)!important; }

  /* Village institutions retain their own layouts and data. */
  .pdsm-legacy .ld-wrap { --ld-ink: #e7dbe3; background: transparent!important; color: #e7dbe3; }
  .pdsm-legacy .ld-sec {
    --acc: #9d2240!important; --acc-soft: #351c2c!important;
    --acc-line: #704057!important; --acc-dark: #f2b2cd!important;
    background: #211b24!important; border-color: #4b3445!important;
  }
  .pdsm-legacy .ld-head { background: linear-gradient(100deg, #3c2032, #211b24 85%)!important; border-color: #58384b!important; }
  .pdsm-legacy :is(.ld-title,.ld-name,.ld-subhead,.ld-rwname,.ld-rtname,.ld-kv dd) { color: #eee1e9!important; }
  .pdsm-legacy :is(.ld-title small,.ld-role,.ld-lead,.ld-kv dt,.ld-rwlabel) { color: #c4afbe!important; }
  .pdsm-legacy :is(.ld-person,.ld-unit,.ld-rt,.ld-rwrow,.ld-pokja) { background: #2a202e!important; color: #e6d5e0!important; border-color: #563a4e!important; }
  .pdsm-legacy .ld-person.main { background: linear-gradient(#3e2335, #281e2c)!important; }
  .pdsm-legacy .ld-rtno { color: #f2b2cd!important; }
  .pdsm-legacy .ld-pokja { --pj: #cf6388!important; }
  .pdsm-legacy .ld-kv>div { border-color: #614353; }
  .pdsm-legacy .ld-chip { background: #342330!important; color: #edb2ce!important; border-color: #764660!important; }
  .pdsm-legacy .ld-ava { background: #50243d!important; color: #f1b6d0!important; }
  .pdsm-legacy .ld-note { background: #322433!important; border-color: #754761!important; color: #e0bfd3!important; }
  .pdsm-legacy :is(.ld-unithead,.ld-dusunchip,.ld-rwchip) { background: #64213f!important; color: #fff!important; }
  .pdsm-legacy .apd-card { background: #761b35!important; }
  .pdsm-legacy .apd-arrow { background: #2c1e2c!important; color: #f3b3ce!important; border: 1px solid #76465e; }
  .pdsm-legacy .apd-dot { background: #6b4b60; }
  .pdsm-legacy .apd-dot.apd-active { background: #d06183!important; }
  .pdsm-legacy .ppd-browser-bridge iframe { background: #161219!important; color-scheme: dark; }

  /* Optional higher contrast stays within the same dark palette. */
  html.pdsm-contrast { --canvas: #050507; --paper: #111114; --muted: #eee; }
  html.pdsm-contrast .pdsm-card { border-color: #a78b9e; }
  html.pdsm-contrast .pdsm-legacy, html.pdsm-contrast .pdsm-greeting-copy p { color: #fff; }
}
