/* =====================================================================
   AMANAH CMS — gaya dasar (di atas Bootstrap 5.3)
   ===================================================================== */
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('../fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('../fonts/poppins-700.woff2') format('woff2'); }

:root {
    /* ---- Palet AMANAH: hijau zamrud masjid + emas + teal ---- */
    --amanah-green: #0b7a4b;        /* hijau masjid (utama) */
    --amanah-green-dark: #075a37;
    --amanah-green-deep: #043822;
    --amanah-green-light: #e5f4ec;
    --amanah-gold: #d4a72c;         /* aksen emas */
    --amanah-gold-dark: #b0861a;
    --amanah-gold-light: #fbf3dc;
    --amanah-teal: #14a38b;         /* sekunder */
    --amanah-cream: #f7f5ee;        /* latar lembut */
    --amanah-ink: #1b2a22;

    --brand: var(--amanah-green);
    --brand-dark: var(--amanah-green-dark);
    --brand-light: var(--amanah-green-light);
    --sidebar-w: 250px;
    --bs-primary: #0b7a4b;
    --bs-primary-rgb: 11, 122, 75;
    --bs-success: #0b7a4b;
    --bs-success-rgb: 11, 122, 75;
    --bs-warning: #d4a72c;
    --bs-warning-rgb: 212, 167, 44;
    --bs-link-color: #0b7a4b;
    --bs-link-color-rgb: 11, 122, 75;
    --bs-link-hover-color: #075a37;
    --bs-link-hover-color-rgb: 7, 90, 55;
    --bs-primary-text-emphasis: #043822;
    --bs-primary-bg-subtle: #e5f4ec;
    --bs-primary-border-subtle: #a9d8bf;
    --bs-warning-text-emphasis: #6b5210;
    --bs-warning-bg-subtle: #fbf3dc;
    --bs-warning-border-subtle: #ecd796;
    --bs-focus-ring-color: rgba(11, 122, 75, .25);
    --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body.admin-body { background: var(--amanah-cream); font-size: .9rem; color: var(--amanah-ink); font-family: var(--bs-body-font-family); }

.btn-success, .btn-primary {
    --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark);
    --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-outline-success, .btn-outline-primary {
    --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand);
}
.btn-success, .btn-primary, .btn-outline-success, .btn-outline-primary { --bs-btn-focus-shadow-rgb: 11, 122, 75; }
.btn-outline-warning {
    --bs-btn-color: var(--amanah-gold-dark); --bs-btn-border-color: var(--amanah-gold);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--amanah-gold); --bs-btn-hover-border-color: var(--amanah-gold);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--amanah-gold-dark); --bs-btn-active-border-color: var(--amanah-gold-dark);
    --bs-btn-disabled-color: var(--amanah-gold-dark); --bs-btn-disabled-border-color: var(--amanah-gold);
    --bs-btn-focus-shadow-rgb: 212, 167, 44;
}
.btn-close { --bs-btn-close-focus-shadow: 0 0 0 .2rem rgba(11, 122, 75, .25); }

/* Komponen Bootstrap yang warnanya hard-coded biru (#0d6efd / #86b7fe) → palet AMANAH */
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate { background-color: var(--brand); border-color: var(--brand); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #6fbf98; box-shadow: 0 0 0 .2rem rgba(11, 122, 75, .15); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%236fbf98'/%3e%3c/svg%3e"); }
.form-range::-webkit-slider-thumb { background-color: var(--brand); }
.form-range::-moz-range-thumb { background-color: var(--brand); }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(11, 122, 75, .25); }
.form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(11, 122, 75, .25); }
.pagination {
    --bs-pagination-color: var(--brand); --bs-pagination-hover-color: var(--brand-dark); --bs-pagination-hover-bg: var(--brand-light);
    --bs-pagination-focus-color: var(--brand-dark); --bs-pagination-focus-bg: var(--brand-light);
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(11, 122, 75, .2);
    --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand);
}
.dropdown-menu { --bs-dropdown-link-active-bg: var(--brand); --bs-dropdown-link-active-color: #fff; --bs-dropdown-link-hover-bg: var(--brand-light); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand); }
.nav-link:focus-visible { box-shadow: 0 0 0 .2rem rgba(11, 122, 75, .25); }
.list-group { --bs-list-group-active-bg: var(--brand); --bs-list-group-active-border-color: var(--brand); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--brand); }
.accordion { --bs-accordion-active-color: var(--amanah-green-deep); --bs-accordion-active-bg: var(--brand-light); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(11, 122, 75, .25); }
.text-brand { color: var(--brand) !important; }
.text-teal { color: var(--amanah-teal, #14a38b) !important; }
.bg-brand { background: var(--brand) !important; color: #fff; }
.bg-brand-light { background: var(--brand-light) !important; }

/* ---------- Layout ---------- */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: var(--sidebar-w); flex-shrink: 0; background: linear-gradient(180deg, var(--amanah-green-dark) 0%, var(--amanah-green-deep) 100%);
    color: #e3efe6; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1040; transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.25rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand:hover { color: #fff; }
.brand-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--amanah-gold), var(--amanah-gold-dark)); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.brand-text { font-weight: 700; font-size: 1.05rem; line-height: 1.2; letter-spacing: .06em; }
.brand-tagline { display: block; font-weight: 400; font-size: .62rem; letter-spacing: 0; color: rgba(255,255,255,.65); margin-top: 2px; line-height: 1.3; }
.sidebar-nav { padding: .75rem .75rem 2rem; }
.sidebar-group-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.45); padding: 1rem .75rem .35rem; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: .6rem; color: rgba(255,255,255,.82); text-decoration: none; margin-bottom: 2px; font-size: .88rem; }
.sidebar-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.active { background: #fff; color: var(--brand); border-left: 3px solid var(--amanah-gold); font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.15); }

.admin-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid #e3e9e5; display: flex; align-items: center; padding: .65rem 1.5rem; min-height: 60px; }
.topbar-title { font-weight: 600; color: #4a5a52; }
.avatar-circle { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .85rem; }
.admin-content { padding: 1.5rem; flex: 1; }
.admin-footer { padding: 1rem 1.5rem; font-size: .78rem; color: #8a988f; border-top: 1px solid #e3e9e5; background: #fff; }
.page-title { font-size: 1.35rem; font-weight: 600; color: #1d2b23; }
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    body.sidebar-open .admin-sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
    .admin-content { padding: 1rem; }
}

/* ---------- Komponen ---------- */
.card { border: 0; border-radius: .9rem; box-shadow: 0 1px 3px rgba(16, 40, 24, .06), 0 4px 16px rgba(16, 40, 24, .04); }
.card-header { background: #fff; border-bottom: 1px solid #eef2ef; font-weight: 600; border-radius: .9rem .9rem 0 0 !important; padding: .9rem 1.25rem; }
.table > :not(caption) > * > * { padding: .7rem .85rem; vertical-align: middle; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7a72; background: #f7faf8; border-bottom-width: 1px; white-space: nowrap; }
.table-hover tbody tr:hover { background: #f8fbf9; }

.stat-card { padding: 1.15rem 1.25rem; display: flex; gap: 1rem; align-items: center; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .8rem; color: #6b7a72; }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }
.status-dot.online { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse-dot 1.8s infinite; }
.status-dot.offline { background: #ef4444; }
.status-dot.never { background: #adb5bd; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.badge-soft-success { background: #dcfce7; color: #166534; }
.badge-soft-danger  { background: #fee2e2; color: #991b1b; }
.badge-soft-secondary { background: #eef1f0; color: #4b5563; }
.badge-soft-warning { background: #fef3c7; color: #92400e; }
.badge-soft-info { background: #e3f6f2; color: #0e7c69; }

.magic-link-group .form-control { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; background: #f7faf8; }

.empty-state { text-align: center; padding: 3rem 1rem; color: #8a988f; }
.empty-state i { font-size: 2.6rem; display: block; margin-bottom: .5rem; color: #b6c4bb; }

.media-thumb { width: 96px; height: 54px; object-fit: cover; border-radius: .4rem; background: #e9efeb; }
.logo-thumb { width: 48px; height: 48px; object-fit: contain; border-radius: .5rem; background: #f3f6f4; }

.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }

/* ---------- Login ---------- */
.guest-wrapper { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
    background: radial-gradient(circle at 15% 20%, rgba(20,163,139,.28), transparent 40%), radial-gradient(circle at 85% 80%, rgba(212,167,44,.22), transparent 40%), linear-gradient(135deg, var(--amanah-green), var(--amanah-green-deep)); }
.login-card { width: 100%; max-width: 410px; border-radius: 1.1rem; }
.login-logo { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--amanah-gold), var(--amanah-gold-dark)); color: #fff; display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 1rem; }

/* ---------- Matriks hak akses (roles.php) ---------- */
.perm-table .form-check-input { width: 1.15em; height: 1.15em; cursor: pointer; }
.perm-table .form-check-input:disabled { cursor: not-allowed; }
.perm-table .perm-group-row td { background: #f7faf8; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #6b7a72; padding-top: .45rem; padding-bottom: .45rem; }
.perm-table.is-full-access tbody tr[data-menu] { opacity: .6; }
.perm-table .form-check-input:indeterminate { background-color: var(--brand); border-color: var(--brand); }

/* ---------- Aksen emas & versi ---------- */
.btn-warning {
    --bs-btn-bg: var(--amanah-gold); --bs-btn-border-color: var(--amanah-gold); --bs-btn-hover-bg: var(--amanah-gold-dark); --bs-btn-hover-border-color: var(--amanah-gold-dark); --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--amanah-gold-dark); --bs-btn-active-border-color: var(--amanah-gold-dark);
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--amanah-gold); --bs-btn-disabled-border-color: var(--amanah-gold);
    --bs-btn-focus-shadow-rgb: 212, 167, 44;
}
.page-title::after { content: ''; display: block; width: 36px; height: 3px; border-radius: 3px; background: var(--amanah-gold); margin-top: .35rem; }
.app-version { font-size: .7rem; color: #8a988f; letter-spacing: .02em; }
.guest-version { position: fixed; left: 0; right: 0; bottom: .75rem; text-align: center; font-size: .7rem; color: rgba(255,255,255,.6); }
a.app-version { text-decoration: none; }
a.app-version:hover, a.app-version:focus { color: var(--brand); text-decoration: underline; }

/* ---------- Riwayat Versi (changelog.php, render CHANGELOG.md) ---------- */
.changelog-version { scroll-margin-top: 1rem; }
.changelog-version.is-current { border: 1px solid var(--amanah-gold); box-shadow: 0 0 0 3px var(--amanah-gold-light); }
.changelog-version .card-header h2 a { color: inherit; text-decoration: none; }
.changelog-body h3 { font-size: .95rem; font-weight: 600; color: var(--brand-dark); margin: 1rem 0 .4rem; }
.changelog-body h3:first-child { margin-top: 0; }
.changelog-body ul { padding-left: 1.2rem; margin-bottom: .75rem; }
.changelog-body li { margin-bottom: .25rem; }
.changelog-body p:last-child, .changelog-body ul:last-child, .changelog-body .table-responsive:last-child .table { margin-bottom: 0; }
.changelog-body code { color: var(--brand-dark); background: var(--amanah-green-light); padding: .05rem .3rem; border-radius: .25rem; font-size: .85em; }
.changelog-body .md-table { font-size: .85rem; }
.changelog-body hr { display: none; }

/* ---------- Pilihan preset warna tema masjid (mosques.php) ---------- */
.theme-picker-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.15rem; }
.theme-picker-head > div { flex: 1 1 16rem; }
.theme-picker-title { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: .92rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #111827; }
.theme-picker-title i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-light); color: var(--brand); font-size: 1rem; letter-spacing: 0; }
.theme-picker-sub { margin-top: .3rem; font-size: .8rem; color: #6b7280; }
.theme-live-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .9rem; border-radius: 999px; background: #111827; color: #fff; font-size: .75rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.theme-live-pill i { color: #fbbf24; }
.theme-live-pill.is-muted { background: #eef1f0; color: #4b5563; }
.theme-live-pill.is-muted i { color: inherit; }

.theme-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
@media (min-width: 768px) { .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Kartu: border 1px + padding 3px (belum dipilih) = border 4px (dipilih) → ukuran tidak bergeser */
.theme-option { position: relative; display: flex; flex-direction: column; border: 1px solid #e5e7eb; padding: 3px; border-radius: 16px; background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .15s ease; }
.theme-option:hover { border-color: #9ca3af; box-shadow: 0 6px 18px rgba(17, 24, 39, .08); transform: translateY(-1px); }
.theme-option.is-selected { border: 4px solid #111827; padding: 0; background: #f8fafc; box-shadow: 0 6px 20px rgba(17, 24, 39, .1); transform: none; }
.theme-option.is-disabled { opacity: .55; }
.theme-option.is-disabled.is-selected { opacity: 1; }
.theme-option.is-disabled:hover { transform: none; box-shadow: none; border-color: #e5e7eb; }
.theme-option.is-disabled.is-selected:hover { border-color: #111827; }

.theme-radio { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; opacity: 0; }
.theme-card { display: block; flex: 1 1 auto; margin: 0; padding: .85rem .95rem 1rem; border-radius: 12px; cursor: pointer; font-family: var(--bs-body-font-family); }
.theme-option.is-disabled .theme-card { cursor: not-allowed; }
.theme-radio:focus-visible + .theme-card { outline: 3px solid rgba(11, 122, 75, .55); outline-offset: 2px; }
.theme-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; }
.theme-swatch { position: relative; flex: none; width: 56px; height: 56px; border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 -10px 18px rgba(255, 255, 255, .06), 0 2px 6px rgba(17, 24, 39, .18); }
.theme-swatch::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(17, 24, 39, .12); pointer-events: none; }
.theme-swatch-accent { position: absolute; left: 9px; right: 9px; bottom: 8px; height: 4px; border-radius: 4px; }
.theme-swatch-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); color: rgba(255, 255, 255, .9); font-size: 1.1rem; }
.theme-check { position: absolute; right: -7px; bottom: -7px; width: 24px; height: 24px; border-radius: 50%; background: #111827; color: #fff; border: 2px solid #fff;
    display: none; align-items: center; justify-content: center; font-size: .85rem; line-height: 1; z-index: 1; }
.theme-option.is-selected .theme-check { display: flex; }
.theme-saving { position: absolute; inset: 0; border-radius: inherit; background: rgba(17, 24, 39, .45); color: #fff; display: none; align-items: center; justify-content: center; z-index: 2; }
.theme-option.is-saving .theme-saving { display: flex; }
.theme-option.is-saving .theme-check { display: none; }
.theme-badge { flex: none; max-width: 100%; white-space: nowrap; overflow: visible; padding: .26rem .65rem; border-radius: 999px; color: #fff; font-size: .68rem; font-weight: 600; line-height: 1.25; letter-spacing: .02em; }
.theme-text { display: block; min-width: 0; }
.theme-name { display: block; font-size: .95rem; font-weight: 700; line-height: 1.3; color: #111827; }
.theme-subtitle { display: block; margin-top: .15rem; font-size: .78rem; line-height: 1.4; color: #6b7280; }

/* Ponsel: 1 kolom, kartu mendatar (swatch | nama | badge) agar daftar tidak terlalu panjang */
@media (max-width: 767.98px) {
    .theme-card { display: flex; align-items: center; gap: .85rem; padding: .75rem .85rem; }
    .theme-card-top { display: contents; }
    .theme-swatch { width: 48px; height: 48px; border-radius: 12px; }
    .theme-text { flex: 1 1 auto; order: 1; }
    .theme-badge { order: 2; align-self: flex-start; }
    .theme-custom-controls { padding: 0 .85rem .85rem; }
}

/* Kartu "Kustom": color picker + kode hex muncul saat dipilih (tanpa JS pun lewat :checked) */
.theme-custom-controls { display: none; align-items: center; gap: .5rem; padding: 0 .95rem 1rem; }
.theme-option.is-selected .theme-custom-controls, .theme-radio:checked ~ .theme-custom-controls { display: flex; }
.theme-custom-controls .form-control-color { width: 2.75rem; height: 2.1rem; padding: .2rem; flex: none; }
.theme-custom-controls [data-theme-hex] { max-width: 8rem; }
.theme-custom-note { flex: 1 1 100%; font-size: .72rem; line-height: 1.35; color: #6b7280; }
.theme-custom-controls { flex-wrap: wrap; }
/* 3 kolom: 9 preset genap 3 baris, kartu Kustom melebar satu baris penuh (tidak menyendiri) */
@media (min-width: 992px) {
    .theme-option.is-custom { grid-column: 1 / -1; flex-direction: row; align-items: center; }
    .theme-option.is-custom .theme-card { display: flex; align-items: center; gap: 1rem; }
    .theme-option.is-custom .theme-card-top { margin-bottom: 0; }
    .theme-option.is-custom .theme-name, .theme-option.is-custom .theme-subtitle { margin-top: 0; }
    .theme-option.is-custom .theme-custom-controls { padding: 0 1.1rem 0 0; flex: 0 1 19rem; justify-content: flex-end; }
    .theme-option.is-custom .theme-custom-note { text-align: right; }
}

/* Pratinjau mini layar TV — semua ukuran dalam em; font-size dasar diatur JS dari lebar (cadangan 11px) */
.theme-preview-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; margin-top: 1.25rem; padding: 1rem; border-radius: 14px; background: #f5f7f6; border: 1px solid #e8ece9; }
@media (min-width: 992px) { .theme-preview-wrap { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.theme-preview-label { margin-bottom: .5rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; }
.theme-preview-label strong { color: #111827; text-transform: none; letter-spacing: 0; font-size: .85rem; }
.tv-mock { position: relative; width: 100%; padding-top: 56.25%; border-radius: 10px; overflow: hidden; font-size: 11px; background: #fff;
    box-shadow: 0 0 0 5px #1f2937, 0 10px 24px rgba(17, 24, 39, .22); margin: 5px 0 10px; font-family: var(--bs-body-font-family); }
.tv-mock-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.tv-head { height: 18%; display: flex; align-items: center; gap: .9em; padding: 0 3%; background: #fff; }
.tv-clock { flex: none; padding: .1em .45em; border: 1px solid #e5e7eb; border-radius: .45em; box-shadow: 0 .15em .4em rgba(0, 0, 0, .06); font-size: 2.1em; font-weight: 800; line-height: 1.15; color: var(--tp-primary); }
.tv-clock span { color: inherit; } /* titik dua jam = primary, sama seperti .hd-colon di layar */
.tv-date { flex: none; display: flex; flex-direction: column; line-height: 1.25; font-size: .62em; color: var(--tp-primary); }
.tv-date b { font-size: 1.3em; color: var(--tp-primary); }
.tv-sep { flex: none; width: 2px; height: 55%; background: var(--tp-dark); opacity: .85; border-radius: 2px; } /* = .hd-divider */
.tv-logo { flex: none; width: 2.7em; height: 2.7em; border-radius: .55em; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1em;
    background: linear-gradient(135deg, var(--tp-accent-light), var(--tp-accent-dark)); box-shadow: 0 .2em .5em rgba(0, 0, 0, .15); }
.tv-name { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.tv-name b { font-size: 1.45em; font-weight: 700; color: var(--tp-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-name span { font-size: .6em; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-banner { position: relative; height: 57%; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 25% 15%, var(--tp-primary) 0%, transparent 60%), linear-gradient(160deg, var(--tp-dark) 0%, var(--tp-deep) 100%); }
.tv-next { position: absolute; top: 6%; left: 0; padding: .3em 1.1em .3em .9em; border-radius: 0 999px 999px 0; background: var(--tp-secondary); color: #fff; font-size: .95em; font-weight: 700; box-shadow: 0 .2em .5em rgba(0, 0, 0, .2); }
.tv-banner-body { display: flex; flex-direction: column; align-items: center; gap: .2em; max-width: 80%; text-align: center; }
.tv-banner-body i { width: 2.4em; height: 2.4em; border-radius: .5em; display: flex; align-items: center; justify-content: center; font-size: 1.3em; line-height: 1; color: #fff;
    background: linear-gradient(135deg, var(--tp-accent-light), var(--tp-accent-dark)); box-shadow: 0 .2em .6em rgba(0, 0, 0, .25); margin-bottom: .2em; }
.tv-banner-body b { max-width: 100%; font-size: 1.5em; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-band { height: 17%; display: flex; align-items: center; gap: 2%; padding: 0 3%; background: var(--tp-light); }
.tv-card { position: relative; flex: 1 1 0; min-width: 0; height: 74%; border-radius: .5em; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
    background: linear-gradient(180deg, var(--tp-primary), var(--tp-dark)); color: #fff; box-shadow: 0 .15em .4em rgba(0, 0, 0, .12); }
.tv-card span { font-size: .7em; opacity: .95; }
.tv-card b { font-size: 1.35em; font-weight: 800; }
.tv-card.is-next { height: 86%; background: linear-gradient(180deg, var(--tp-accent-light), var(--tp-accent-dark)); color: var(--tp-deep); box-shadow: 0 0 0 .2em rgba(255, 255, 255, .7), 0 .3em .6em rgba(0, 0, 0, .18); }
.tv-card em { position: absolute; top: -.6em; left: 50%; transform: translateX(-50%); padding: .1em .6em; border-radius: 999px; background: #fff; color: var(--tp-deep);
    font-size: .48em; font-style: normal; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
.tv-ticker { height: 8%; display: flex; align-items: center; background: #fff; overflow: hidden; }
.tv-ticker-badge { flex: none; width: 2.6em; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--tp-dark); color: var(--tp-accent); font-size: .85em; }
.tv-ticker-text { padding-left: .9em; font-size: .7em; font-weight: 700; color: #374151; white-space: nowrap; letter-spacing: .02em; }

.theme-palette { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.theme-palette li { display: flex; align-items: center; gap: .6rem; font-size: .8rem; }
.theme-palette-chip { flex: none; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .14); }
.theme-palette-text { flex: 1 1 auto; min-width: 0; color: #374151; }
.theme-palette code { flex: none; font-size: .74rem; color: #6b7280; }

/* Kotak tema kecil di daftar & detail masjid */
.theme-dot { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 5px; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .15); }
.theme-dot.sm { width: 14px; height: 14px; border-radius: 4px; }
.theme-custom-note code { color: #111827; font-size: .95em; }
