/* ==========================================================================
   Aplikita — shared theme
   60% primary dark blue · 30% secondary light blue · 10% calm orange accent
   White (#fafafa) is the neutral surface/text color.
   ========================================================================== */

:root {
    --primary: #00008B;
    --primary-strong: #00006A;
    --primary-soft: #E8EAF8;
    --secondary: #0193E0;
    --secondary-dark: #0077B6;
    --secondary-soft: #E6F4FD;
    --accent: #F2A541;
    --accent-strong: #DC8A2C;
    --accent-soft: #FDF0DD;
    --surface: #fafafa;
    --white: #fafafa;
    /* Surfaces and text that change in night mode (html.mode-night, end of file). */
    --card: #fafafa;
    --heading: var(--primary);
    --link: var(--secondary-dark);
    --ink: #0B1B3A;
    --muted: #5B6B85;
    --border: #D5E7F5;
    --danger: #B00020;
    --danger-bg: #FDECEF;
    --success: #0B6B3A;
    --success-bg: #E6F6EC;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(0, 0, 139, .08);
    --shadow-strong: 0 24px 60px rgba(0, 0, 139, .22);
    /* Moroccan quatrefoil trellis (mashrabiya) in #fafafa, drawn over the header, footer and /aplikasi slider. */
    --pattern-islamic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M20,20A20,20 0 0 1 60,20A20,20 0 0 1 60,60A20,20 0 0 1 20,60A20,20 0 0 1 20,20ZM31,31A9,9 0 0 1 49,31A9,9 0 0 1 49,49A9,9 0 0 1 31,49A9,9 0 0 1 31,31ZM20,20L0,0M60,20L80,0M60,60L80,80M20,60L0,80' fill='none' stroke='%23fafafa' stroke-width='1.1'/%3E%3Ccircle cx='40' cy='40' r='2' fill='%23fafafa'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--surface);
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    color: var(--heading);
    line-height: 1.2;
}

h1 { font-size: clamp(1.7rem, 3.4vw, 2.55rem); }
h2 { font-size: clamp(1.25rem, 2.3vw, 1.7rem); }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

p { margin: 0 0 1em; }

.container {
    width: min(1120px, 100% - 2rem);
    margin-inline: auto;
}

.muted {
    color: var(--muted);
    font-size: .9rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Public header / footer (60% primary) ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--primary);
    color: var(--white);
    border-bottom: 3px solid var(--accent);
    transition: box-shadow .25s ease;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .7rem 1.5rem;
    padding-block: .85rem;
    transition: padding .25s ease;
}

/* Islamic pattern on the blue bands. It stays put while the page scrolls
   (fixed to the viewport), so header, slider and footer line up. */
.site-header::before,
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--pattern-islamic) 0 0 / 52px 52px fixed;
    opacity: .1;
}

.site-footer {
    position: relative;
}

.header-inner,
.site-footer > * {
    position: relative;
}

/* Scrolled: header-shrink.js adds .is-compact */
.site-header.is-compact {
    box-shadow: 0 6px 18px rgba(0, 0, 60, .28);
}

.site-header.is-compact .header-inner {
    padding-block: .4rem;
}

.site-header.is-compact .brand-logo {
    width: 34px;
    height: 34px;
}

/* Built-in wide Aplikita logo (icon + wordmark in one image) */
.brand-wide {
    display: block;
    width: auto;
    height: 40px;
    transition: height .25s ease;
}

.site-header.is-compact .brand-wide {
    height: 30px;
}

.site-header.is-compact .brand {
    font-size: clamp(.98rem, 1.6vw, 1.12rem);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--white);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 800;
    letter-spacing: .02em;
    text-decoration: none;
}

.brand-logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    object-fit: contain;
    transition: width .25s ease, height .25s ease;
}

.brand .brand-wordmark {
    color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .header-inner,
    .brand-logo {
        transition: none;
    }
}

.brand .brand-wordmark span {
    color: var(--accent);
}

@media (max-width: 420px) {
    .brand-logo {
        width: 38px;
        height: 38px;
    }
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem .95rem;
    order: 1;
    margin-left: auto;
    font-size: .95rem;
}

/* Day/night switch and (on phones) the menu button, after the menu. */
.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    order: 2;
}

.site-nav a {
    color: var(--on-primary, #E4E8FF);
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover {
    color: var(--accent);
    text-decoration: none;
}

.site-nav a.is-active {
    color: var(--accent);
    font-weight: 700;
}

.site-nav a.is-current {
    cursor: default;
}

.site-nav .nav-cta {
    padding: .4rem .9rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
    border-bottom: 0;
}

.site-nav .nav-cta:hover {
    background: var(--accent-strong);
    color: var(--primary);
}

.site-nav a.nav-cta.is-active {
    color: var(--primary);
    border-bottom: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 42px;
    padding: .45rem .75rem;
    border: 1px solid rgba(250, 250, 250, .55);
    border-radius: 8px;
    background: transparent;
    color: var(--white);
    font: inherit;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
}

.nav-toggle:hover {
    background: rgba(250, 250, 250, .12);
}

/* Icon-only button: "Menu"/"Tutup" stays for screen readers. */
.nav-toggle {
    width: 42px;
    padding: 0;
}

.nav-toggle [data-nav-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .15s ease, opacity .15s ease;
}

.nav-toggle-bars {
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-backdrop {
    display: none;
}

body.nav-open {
    overflow: hidden;
}

body.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 25, .55);
}

.site-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(2rem, 5vw, 4rem);
}

.site-footer {
    margin-top: auto;
    background: var(--primary);
    color: var(--on-primary, #DCE3FF);
    font-size: .9rem;
    line-height: 1.6;
}

.site-footer a {
    color: var(--on-primary, #DCE3FF);
}

.site-footer a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Call-to-action strip (Pengaturan → Footer). */
.footer-cta {
    background: var(--accent);
    color: var(--ink);
}

.footer-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding-block: 1.5rem;
}

.footer-cta-title {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.footer-cta p {
    margin: .2rem 0 0;
    font-weight: 500;
}

.site-footer .footer-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 48px;
    padding: 0 1.5rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--white);
    font-weight: 700;
    transition: transform .15s ease;
}

.site-footer .footer-cta-button:hover {
    color: var(--white);
    transform: translateX(2px);
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    gap: 2.5rem 3rem;
    padding-block: 3.25rem 2.5rem;
}

/* Columns follow what is filled in: about + Layanan + Hubungi Kami. */
.footer-main--2 {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}

.footer-main--1 {
    grid-template-columns: minmax(0, 1fr);
}

.footer-about {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}

.footer-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.footer-brand img.footer-wide-logo {
    width: auto;
    height: 35px;
}

.footer-brand strong {
    color: var(--white);
    font-size: 1.1rem;
}

.footer-text {
    margin: 0;
    color: var(--on-primary-muted, #B9C3F5);
    font-size: .88rem;
    line-height: 1.65;
}

.footer-stores {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.site-footer .footer-store {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 48px;
    padding: 0 1rem;
    border: 1px solid rgba(250, 250, 250, .28);
    border-radius: 12px;
    background: rgba(250, 250, 250, .06);
    color: var(--white);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.15;
}

.site-footer .footer-store:hover {
    border-color: var(--accent);
}

.footer-store span {
    display: flex;
    flex-direction: column;
}

.footer-store small {
    color: var(--on-primary-muted, #B9C3F5);
    font-size: .65rem;
    font-weight: 500;
}

.footer-title {
    margin: 0 0 .85rem;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-col ul {
    display: grid;
    gap: .6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col li a {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}

.site-footer .footer-more {
    color: var(--white);
    font-weight: 700;
}

.footer-contact {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.footer-contact-list {
    display: grid;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-contact-list a {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}

.footer-contact svg {
    flex: none;
}

.footer-address {
    display: flex;
    gap: .6rem;
    color: var(--on-primary-muted, #B9C3F5);
}

.footer-address svg {
    margin-top: .2rem;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(250, 250, 250, .08);
    color: var(--white);
}

.site-footer .footer-social:hover {
    background: rgba(250, 250, 250, .14);
}

.footer-bottom {
    background: rgba(0, 0, 0, .22);
    color: var(--on-primary-muted, #B9C3F5);
    font-size: .82rem;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    padding-block: 1rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.5rem;
}

.site-footer .footer-legal a {
    color: var(--on-primary-muted, #B9C3F5);
}

@media (max-width: 960px) {
    .footer-main--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-main--3 .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .footer-cta-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-main,
    .footer-main--2,
    .footer-main--3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem 1.5rem;
        padding-block: 2.25rem 2rem;
    }

    .footer-stores {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .footer-col li a,
    .footer-contact-list a {
        min-height: 40px;
    }

    .footer-bottom-inner {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer .footer-cta-button {
        transition: none;
    }
}

/* ---------- Table pagination (table-pager.js) ---------- */

table[data-pager] tr[hidden] {
    display: none;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem 1rem;
    margin-top: 1rem;
    font-size: .85rem;
}

.pager[hidden] {
    display: none;
}

.pager-info {
    margin: 0;
    color: var(--muted);
}

.pager-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
}

.pager-button {
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 .55rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

a.pager-button,
span.pager-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pager-button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pager-button.is-current {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    cursor: default;
}

.pager-button:disabled:not(.is-current) {
    opacity: .4;
    cursor: default;
}

.pager-gap {
    padding: 0 .2rem;
    color: var(--muted);
}

.pager-size {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0;
    color: var(--muted);
    font-weight: 500;
}

.pager-size[hidden] {
    display: none;
}

.pager-size select {
    width: auto;
    padding: .3rem .5rem;
    font-size: .85rem;
}

/* Row numbers and sortable headers (table-pager.js) */

.col-number {
    width: 3.2rem;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.sort-button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.sort-button:hover {
    color: var(--primary);
}

.sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: .3;
}

[aria-sort="ascending"] .sort-icon {
    border-top: 0;
    border-bottom: 5px solid currentColor;
    opacity: 1;
}

[aria-sort="descending"] .sort-icon {
    opacity: 1;
}

/* Empty list (admin/partials/empty.twig) */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: 2.2rem 1rem 1.6rem;
    text-align: center;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: .35rem;
    border-radius: 50%;
    background: var(--secondary-soft);
    color: var(--secondary);
}

.empty-state-icon svg {
    width: 30px;
    height: 30px;
}

.empty-state strong {
    color: var(--primary);
    font-size: 1.05rem;
}

.empty-state p {
    max-width: 26rem;
    margin: 0 0 .6rem;
    color: var(--muted);
    font-size: .9rem;
}

/* Search/filter bar above a table (table-filter.js) */

.table-tools {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.1rem 0 .9rem;
}

.table-tools input[type="search"] {
    flex: 1 1 220px;
}

.table-tools select {
    flex: 0 1 190px;
    width: auto;
}

.table-tools input[type="search"],
.table-tools select {
    padding: .55rem .8rem;
    font-size: .9rem;
}

.table-none {
    margin: 1rem 0 0;
}

/* Wider screens: titles get room, dates/badges stay on one line. */
.table-cards td.tc-main {
    min-width: 15rem;
}

.table-cards td.tc-sub,
.table-cards td.tc-hide {
    white-space: nowrap;
}

/*
 * <table class="table-cards">: on phones each row becomes a compact card.
 * Cells: .tc-main (title), .tc-sub (small line under it), .tc-actions (right),
 * .tc-hide (hidden on phones). Numbering cells are hidden too.
 */
@media (max-width: 720px) {
    .table-cards thead {
        display: none;
    }

    .table-cards,
    .table-cards tbody {
        display: block;
    }

    .table-cards tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: .75rem;
        padding: .8rem 0;
        border-bottom: 1px solid var(--border);
    }

    .table-cards tbody tr:last-child {
        border-bottom: 0;
    }

    .table-cards td {
        display: block;
        grid-column: 1;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .table-cards td.tc-hide,
    .table-cards td.col-number {
        display: none;
    }

    .table-cards td.tc-main {
        min-width: 0;
    }

    .table-cards td.tc-sub {
        white-space: normal;
        margin-top: .2rem;
        color: var(--muted);
        font-size: .8rem;
    }

    .table-cards td.tc-actions {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
    }

    .table-cards td.tc-actions .row-actions {
        flex-wrap: nowrap;
    }

    .table-tools select {
        flex: 1 1 calc(50% - .5rem);
    }
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
    margin: 0 0 .9rem;
    font-size: .85rem;
    color: var(--muted);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    min-width: 0;
}

.breadcrumb li + li::before {
    content: "›";
    margin: 0 .5rem;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb [aria-current] {
    overflow: hidden;
    max-width: 32ch;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ---------- Cards, grids, prose ---------- */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.1rem, 2.4vw, 1.7rem);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}

.card > :last-child {
    margin-bottom: 0;
}

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    margin-bottom: 1rem;
}

.page-head h1,
.page-head h2 {
    margin-bottom: .25rem;
}

.prose {
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.prose h2,
.prose h3,
.prose h4 {
    margin: 1.6em 0 .6em;
}

.prose > :first-child {
    margin-top: 0;
}

.prose::after {
    content: "";
    display: table;
    clear: both;
}

.prose h2,
.prose h3,
.prose h4 {
    clear: both;
}

/* Images placed with the editor's image toolbar (figure.img-left / img-center / img-right). */
.prose figure {
    margin: 1.4rem 0;
}

.prose figure img {
    margin: 0;
}

.prose figure.img-center {
    text-align: center;
}

.prose figure.img-center img {
    margin-inline: auto;
}

.prose figure.img-left {
    float: left;
    max-width: 50%;
    margin: .35rem 1.4rem 1rem 0;
}

.prose figure.img-right {
    float: right;
    max-width: 50%;
    margin: .35rem 0 1rem 1.4rem;
}

/* Sizes from the image toolbar (1/3, 1/2, 1/1 of the text column). */
.prose figure[class*="img-w"] img {
    width: 100%;
}

.prose figure.img-w33 { width: 33.333%; max-width: none; }
.prose figure.img-w50 { width: 50%; max-width: none; }
.prose figure.img-w100 { width: 100%; max-width: none; }

.prose figure.img-center[class*="img-w"] {
    margin-inline: auto;
}

.prose figcaption {
    margin-top: .5rem;
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 560px) {
    .prose figure.img-left,
    .prose figure.img-right {
        float: none;
        max-width: 100%;
        margin: 1.2rem 0;
    }

    .prose figure.img-left img,
    .prose figure.img-right img {
        margin-inline: auto;
    }

    /* Phones: side images and 1/2 images use the full width; 1/3 grows to half. */
    .prose figure.img-left[class*="img-w"],
    .prose figure.img-right[class*="img-w"],
    .prose figure.img-w50 {
        width: 100%;
    }

    .prose figure.img-w33 {
        width: 50%;
        margin-inline: auto;
    }
}

.prose img {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 10px;
}

.prose blockquote {
    margin: 1.2em 0;
    padding: .25rem 0 .25rem .9rem;
    border-left: 4px solid var(--secondary);
    color: var(--muted);
}

.prose pre {
    padding: .9rem 1rem;
    border-radius: 10px;
    background: var(--primary-strong);
    color: var(--on-primary, #EEF1FF);
    overflow-x: auto;
}

.prose code {
    padding: .1rem .35rem;
    border-radius: 4px;
    background: var(--secondary-soft);
    font-size: .92em;
}

.prose pre code {
    padding: 0;
    background: transparent;
}

/* ---------- Buttons (30% secondary / 10% accent) ---------- */

.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .65rem 1.05rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    /* The darker secondary keeps white text readable (≈5:1; the plain one is ≈3:1). */
    background: var(--secondary-dark);
    color: var(--white);
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover,
.button:hover {
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
}

.btn-accent,
.button-accent {
    background: var(--accent);
    color: var(--primary);
}

.btn-accent:hover,
.button-accent:hover {
    background: var(--accent-strong);
    color: var(--primary);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(250, 250, 250, .65);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-secondary,
.button-secondary {
    background: var(--card);
    color: var(--secondary-dark);
    border-color: var(--secondary);
}

.btn-secondary:hover,
.button-secondary:hover {
    background: var(--secondary-soft);
    color: var(--secondary-dark);
}

.button-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: #F3B8C2;
}

.button-danger:hover {
    background: var(--danger);
    color: var(--white);
}

.button-danger-solid,
.button-danger-solid:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

.button-danger-solid:hover {
    filter: brightness(.92);
}

/* ---------- Confirmation popup (confirm-dialog.js) ---------- */

.confirm-dialog {
    width: min(420px, calc(100vw - 2rem));
    padding: 1.4rem 1.4rem 1.2rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 24px 60px rgba(0, 0, 40, .35);
}

.confirm-dialog::backdrop {
    background: rgba(0, 0, 25, .5);
}

.confirm-dialog-message {
    margin: 0 0 1.3rem;
    font-size: 1rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.confirm-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
}

@media (max-width: 420px) {
    .confirm-dialog-actions .button {
        flex: 1 1 0;
    }
}

/* ---------- Alerts, badges ---------- */

.alert {
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    line-height: 1.5;
}

.alert-flash {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    transition: opacity .25s ease, transform .25s ease;
}

.alert-flash.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
}

.alert-close {
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    margin: -.15rem -.3rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    opacity: .6;
    cursor: pointer;
}

.alert-close:hover {
    background: rgba(0, 0, 0, .07);
    opacity: 1;
}

.alert-error,
.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
}

.alert-info {
    background: var(--secondary-soft);
    color: var(--secondary-dark);
}

.badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-published,
.badge-administrator {
    background: var(--secondary-dark);
    color: var(--white);
}

.badge-draft,
.badge-author {
    background: var(--accent);
    color: var(--primary);
}

.badge-super_admin {
    background: var(--primary);
    color: var(--white);
}

/* ---------- Tables ---------- */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

th,
td {
    padding: .75rem .6rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------- Forms ---------- */

label {
    display: block;
    margin: 0 0 .35rem;
    font-size: .9rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: .7rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    border-color: var(--secondary);
}

.field-error {
    margin: .3rem 0 .75rem;
    color: var(--danger);
    font-size: .82rem;
}

.hint {
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .82rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
    .container {
        width: min(100% - 1.25rem, 1120px);
    }

    .header-inner {
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        order: 3;
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        padding-top: .55rem;
        border-top: 1px solid rgba(250, 250, 250, .22);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: .7rem .35rem;
        border-bottom: 1px solid rgba(250, 250, 250, .14);
    }

    .site-nav a.is-active:not(.nav-cta) {
        border-bottom-color: rgba(250, 250, 250, .14);
        box-shadow: inset 3px 0 0 var(--accent);
        padding-left: .75rem;
    }

    .site-nav .nav-cta {
        margin-top: .45rem;
        text-align: center;
        border-bottom: 0;
    }

    th,
    td {
        padding: .6rem .5rem;
        font-size: .85rem;
    }

    .button,
    .btn {
        padding: .6rem .9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Public post list / detail ---------- */

.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .95rem 0;
    border-bottom: 1px solid var(--border);
}

.post-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.post-item a {
    color: var(--primary);
    font-size: 1.02rem;
}

.post-item a:hover {
    color: var(--secondary-dark);
}

.post-thumb {
    width: 88px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.post-featured {
    display: block;
    width: 100%;
    max-height: 420px;
    margin-bottom: 1.4rem;
    border-radius: 12px;
    object-fit: cover;
}

.preview-banner {
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--primary);
    border: 1px solid var(--accent);
    font-size: .9rem;
}

.admin-edit-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .75rem;
}

.admin-edit-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent-soft);
    /* --ink follows the mode: dark on the light orange by day, light on the dark one at night. */
    color: var(--ink);
    font-size: .85rem;
    font-weight: 700;
}

.admin-edit-link:hover {
    background: var(--accent);
    color: #0B1B3A;
    text-decoration: none;
}

.preview-banner a {
    color: var(--primary);
    text-decoration: underline;
}

@media (max-width: 520px) {
    .post-thumb {
        width: 64px;
        height: 52px;
    }

    .post-item {
        gap: .7rem;
    }
}

.post-category {
    color: var(--secondary-dark);
    font-weight: 600;
}

.post-category:hover {
    color: var(--primary);
}

.page-articles {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ---------- Dokumentasi kegiatan & Galeri ---------- */

.event-docs {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.event-docs-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.event-docs-head h2 { margin: 0; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .6rem;
}

.photo-grid-item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: var(--primary-soft);
    aspect-ratio: 4 / 3;
}

.photo-grid-item[hidden] { display: none; }

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.photo-grid-item:hover img,
.photo-grid-item:focus-visible img { transform: scale(1.05); }

.photo-grid-more { margin-top: .9rem; }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.video-frame {
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.docs-drive { margin-top: 1.25rem; }

.docs-locked {
    display: grid;
    justify-items: start;
    gap: .5rem;
    padding: 1.1rem 1.25rem;
    border: 1px dashed var(--secondary);
    border-radius: var(--radius-sm);
    background: var(--secondary-soft);
    color: var(--primary);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.25rem;
}

.album-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
    color: var(--ink);
}

.album-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--primary-soft);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-cover.is-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.album-lock {
    display: grid;
    justify-items: center;
    gap: .35rem;
    color: var(--accent);
    font-weight: 700;
}

.album-count {
    position: absolute;
    right: .7rem;
    bottom: .7rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    background: rgba(0, 0, 40, .72);
    color: var(--white);
    font-size: .78rem;
    font-weight: 700;
}

.album-body {
    display: grid;
    gap: .25rem;
    padding: 1rem 1.1rem 1.15rem;
}

.album-body strong {
    color: var(--primary);
    font-size: 1.05rem;
    line-height: 1.3;
}

.album-body .muted { font-size: .85rem; }

/* Lightbox */
.lightbox[hidden] { display: none; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1rem 1.5rem;
    background: rgba(0, 0, 18, .94);
    color: var(--white);
}

.lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
}

.lightbox-caption {
    max-width: 760px;
    min-height: 1.4em;
    margin: .8rem 0 0;
    color: var(--on-primary, #DCE3FF);
    text-align: center;
}

.lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 1.2rem;
    color: var(--on-primary, #DCE3FF);
    font-size: .9rem;
}

.lightbox button {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(250, 250, 250, .12);
    color: var(--white);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox button:hover { background: rgba(250, 250, 250, .25); }
.lightbox-close { top: .7rem; right: .9rem; }
.lightbox-prev { left: .9rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .9rem; top: 50%; transform: translateY(-50%); }

body.lightbox-open { overflow: hidden; }

@media (max-width: 640px) {
    .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
    .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
}

/* Album page */
.album-page-head { display: grid; justify-items: start; gap: .5rem; margin: .8rem 0 1.4rem; }
.album-page-head h1 { margin: 0; }
.album-page-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: 0; color: var(--muted); font-size: .92rem; }
.album-page-meta span + span::before { content: "·"; margin-right: .9rem; }
.album-page-desc { max-width: 760px; margin: 0; color: var(--ink); }
.home-eyebrow { color: var(--secondary-dark); font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Night mode (html.mode-night, set in layout.twig; public pages only) ----------
   The blue bands become the homepage's night blue; page surfaces and text turn dark. */

html.mode-night {
    --surface: #070B2E;
    --card: #0E1440;
    --ink: #E3E8FA;
    --muted: #9AA4D2;
    --border: rgba(250, 250, 250, .12);
    --heading: #E6EBFF;
    --link: #6FC3F7;
    --primary-soft: #161D5C;
    --secondary-soft: #0D2552;
    --accent-soft: #3B2A12;
    --danger: #FF8A9A;
    --danger-bg: #3A1020;
    --success: #6FE0A0;
    --success-bg: #0D3020;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-strong: 0 24px 60px rgba(0, 0, 0, .5);
    --night-band: #060A2B;
    --night-band-2: #10186A;
    --on-primary: #C9D3F0;
    --on-primary-muted: #8E99CC;
    color-scheme: dark;
}

/* Night: the pattern stays a faint texture on the dark blue. */
.mode-night .site-header::before,
.mode-night .site-footer::before {
    opacity: .045;
}

.mode-night .site-header {
    background: var(--night-band);
    border-bottom-color: rgba(250, 250, 250, .08);
}

.mode-night .site-footer {
    background: var(--night-band);
    border-top: 1px solid rgba(250, 250, 250, .08);
}

.mode-night .footer-cta {
    background: color-mix(in srgb, var(--night-band-2) 70%, var(--night-band));
    color: #E6EBFF;
    border-bottom: 1px solid rgba(250, 250, 250, .08);
}

.mode-night .footer-cta p {
    color: var(--on-primary-muted);
}

.mode-night .site-footer .footer-cta-button,
.mode-night .site-footer .footer-cta-button:hover {
    background: var(--accent);
    color: #0B1B3A;
}

.mode-night .footer-bottom {
    background: rgba(0, 0, 0, .3);
}

/* Text that uses the brand blue on the page surface. */
.mode-night .breadcrumb a,
.mode-night .post-item a,
.mode-night .post-category,
.mode-night .empty-state strong,
.mode-night .empty-state-icon svg,
.mode-night .docs-locked,
.mode-night .album-body,
.mode-night .sort-button:hover,
.mode-night span.pager-button,
.mode-night .pager-button:hover:not(:disabled),
.mode-night .preview-banner a {
    color: var(--heading);
}

.mode-night .button-secondary,
.mode-night .btn-secondary:hover,
.mode-night .button-secondary:hover {
    color: var(--link);
}

.mode-night input,
.mode-night select,
.mode-night textarea {
    background: color-mix(in srgb, var(--card) 70%, #000);
}

/* Day/night switch in the header (mode-toggle.js). */
.mode-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(250, 250, 250, .28);
    border-radius: 50%;
    background: rgba(250, 250, 250, .08);
    color: var(--accent);
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease;
}

.mode-toggle:hover {
    background: rgba(250, 250, 250, .16);
    transform: rotate(-20deg);
}

.mode-toggle svg {
    width: 20px;
    height: 20px;
}

.mode-toggle .icon-moon,
.mode-night .mode-toggle .icon-sun {
    display: none;
}

.mode-night .mode-toggle .icon-moon {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .mode-toggle {
        transition: none;
    }

    .mode-toggle:hover {
        transform: none;
    }
}

/* ---------- Site search (header button + bar, search-toggle.js) ---------- */

.search-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(250, 250, 250, .28);
    border-radius: 50%;
    background: rgba(250, 250, 250, .08);
    color: var(--white);
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
    background: rgba(250, 250, 250, .16);
    color: var(--accent);
}

.search-toggle svg {
    width: 20px;
    height: 20px;
}

.header-search {
    position: relative;
    border-top: 1px solid rgba(250, 250, 250, .12);
}

.header-search-inner {
    display: flex;
    gap: .5rem;
    padding-block: .7rem;
}

.header-search-inner input {
    flex: 1;
    min-width: 0;
    border-color: transparent;
    background: #fafafa;
    color: #0B1B3A;
}

.mode-night .header-search-inner input {
    background: #fafafa;
}

/* Suggestions under a search field while typing (live-search.js). */
.has-suggest {
    position: relative;
}

.suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: .4rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
    box-shadow: var(--shadow-strong);
    text-align: left;
}

.suggest-group {
    margin: .5rem .6rem .25rem;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 44px;
    padding: .4rem .6rem;
    border-radius: 8px;
    color: var(--ink);
}

.suggest-item img {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.suggest-item span {
    display: grid;
    min-width: 0;
}

.suggest-item strong {
    overflow: hidden;
    font-size: .92rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-item small {
    color: var(--muted);
    font-size: .75rem;
}

.suggest-item:hover,
.suggest-item[aria-selected="true"],
.suggest-all:hover,
.suggest-all[aria-selected="true"] {
    background: var(--primary-soft);
    color: var(--ink);
    text-decoration: none;
}

.suggest mark {
    padding: 0 .08em;
    border-radius: 3px;
    background: color-mix(in srgb, var(--accent) 38%, transparent);
    color: var(--ink);
}

.suggest-all {
    display: block;
    margin-top: .3rem;
    padding: .6rem;
    border-top: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    color: var(--link);
    font-weight: 700;
}

.suggest-empty {
    margin: 0;
    padding: .7rem .6rem;
    color: var(--muted);
    font-size: .9rem;
}
