/* Crextio Warm Bento effect layer.
   Loaded last on every page; removing its <link> in base.html restores the previous look.
   Colours already follow the Crextio palette in the other stylesheets; this file adds
   radius, capsule controls, frosted glass, hatched textures and micro-interactions. */

/* Plus Jakarta Sans, self-hosted (CSP font-src 'self'); SIL OFL 1.1, see fonts/plus-jakarta-sans-OFL.txt */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-variable.6b68a2205325.ttf") format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-italic-variable.2845d500918e.ttf") format('truetype');
}

:root {
  --heading-font: 'Plus Jakarta Sans', 'Manrope', 'DM Sans', Arial, sans-serif;
  --ui-font: 'Plus Jakarta Sans', 'DM Sans', Arial, sans-serif;
  --cx-primary: #1e1e1e;
  --cx-primary-hover: #2e2e2e;
  --cx-accent: #fcd34d;
  --cx-accent-strong: #facc15;
  --cx-text: #171717;
  --cx-text-2: #737373;
  --cx-border: #e5e5e0;
  --cx-chip: #f9f9f6;
  --cx-card: rgba(255, 255, 255, .82);
  --cx-glass: rgba(255, 255, 255, .45);
  --cx-frost: blur(20px) saturate(160%);
  --cx-r-md: 16px;
  --cx-r-lg: 24px;
  --cx-r-xl: 28px;
  --cx-pill: 9999px;
  --cx-shadow: 0 4px 20px -2px rgba(23, 23, 23, .03), 0 1px 3px 0 rgba(23, 23, 23, .02);
  --cx-shadow-pill: 0 2px 12px -1px rgba(23, 23, 23, .04);
  --cx-shadow-dark: 0 12px 32px -4px rgba(0, 0, 0, .18);
  --cx-glow: 0 4px 16px -2px rgba(250, 204, 21, .35);
  --cx-edge: inset 0 1px 0 rgba(255, 255, 255, .9);
  --cx-ease: cubic-bezier(.16, 1, .3, 1);
  --cx-hatch: repeating-linear-gradient(-45deg, transparent, transparent 4px, #e5e5e0 4px, #e5e5e0 5.5px);
  --cx-hatch-yellow: repeating-linear-gradient(-45deg, rgba(252, 211, 77, .08), rgba(252, 211, 77, .08) 4px, rgba(234, 179, 8, .28) 4px, rgba(234, 179, 8, .28) 5.5px);
}

/* Plus Jakarta Sans is wider than Manrope; the old -.04em tracking crushed word gaps */
h1, h2, h3, .fkdi-brand, .brand { letter-spacing: -.02em; }

/* ---------- Ambient canvas: warm light orbs behind the frosted surfaces ---------- */
body { position: relative; }
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  animation: cx-drift 24s ease-in-out infinite alternate;
}
body::before {
  width: 520px; height: 520px; right: -140px; top: 60px;
  background: radial-gradient(circle at 35% 35%, rgba(252, 211, 77, .75), rgba(250, 204, 21, .35) 45%, rgba(250, 204, 21, 0) 70%);
}
body::after {
  width: 440px; height: 440px; left: -160px; bottom: 6%;
  background: radial-gradient(circle, rgba(253, 186, 116, .55), rgba(253, 186, 116, 0) 68%);
  animation-duration: 30s;
}
@keyframes cx-drift { to { transform: translate3d(-50px, 40px, 0) scale(1.1); } }

/* ---------- Environment ribbon: hatched yellow ---------- */
.environment {
  background: var(--cx-hatch-yellow), #fdf6d8;
  color: var(--cx-text);
  font-weight: 500;
}

/* ---------- Capsule controls ---------- */
.button,
.rd-actions .button {
  border-radius: var(--cx-pill);
  min-height: 44px;
  transition: background-color 200ms var(--cx-ease), transform 200ms var(--cx-ease), box-shadow 200ms var(--cx-ease);
}
.public-nav .button, .fkdi-account .button { white-space: nowrap; }
.button:hover { background: var(--cx-primary-hover); border-color: var(--cx-primary-hover); }
.button.outline:hover { background: rgba(30, 30, 30, .06); color: var(--cx-text); }
.button.gold:hover { background: var(--cx-accent-strong); border-color: var(--cx-accent-strong); color: var(--cx-text); box-shadow: var(--cx-glow); }
.button:active { transform: scale(.98); }

input:not([type=checkbox]):not([type=radio]):not([type=file]),
select,
.finance-select,
.service-form select, .service-search select, .service-tools select {
  border-radius: var(--cx-pill);
  border-color: var(--cx-border);
  padding-inline: 18px;
  min-height: 44px;
  background-color: #fff;
  transition: border-color 200ms var(--cx-ease), box-shadow 200ms var(--cx-ease);
}
textarea { border-radius: var(--cx-r-lg); border-color: var(--cx-border); padding: 14px 18px; }
input:focus, select:focus, textarea:focus { border-color: var(--cx-primary); box-shadow: 0 0 0 4px rgba(252, 211, 77, .35); outline: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--cx-primary); }

.pill, .community-badge, .nav-status, .fkdi-availability, .rd-feature-badge,
.kta-card-header > span, .category-preview > span, .community-tag > span, .kta-status {
  border-radius: var(--cx-pill);
}
.pill { padding: 5px 12px; }

/* ---------- Cards: pillowy radius, frosted, whisper shadow ---------- */
.card, .portal-content .card, .stat-tile, .service-card, .account-card,
.announcement-card, .membership-row, .topic-row, .reply-card, .module-empty, .empty-panel,
.fkdi-panel, .fkdi-link-card, .fkdi-membership-summary, .fkdi-benefit-grid article,
.table-wrap, .kta-card, .scene-note, .rd-community-list {
  border-radius: var(--cx-r-xl);
  border-color: rgba(255, 255, 255, .7);
  background-color: var(--cx-card);
  -webkit-backdrop-filter: var(--cx-frost);
  backdrop-filter: var(--cx-frost);
  box-shadow: var(--cx-edge), var(--cx-shadow);
}
.stat-tile, .membership-row, .topic-row, .reply-card { border-radius: var(--cx-r-lg); }
.notice { border-radius: var(--cx-r-md); }
.card, .service-card, .fkdi-link-card, .announcement-card, .topic-row, .stat-tile {
  transition: transform 200ms var(--cx-ease), box-shadow 200ms var(--cx-ease);
}
a.card:hover, .service-card:hover, .fkdi-link-card:hover, a.announcement-card:hover, .topic-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--cx-edge), 0 10px 28px -8px rgba(23, 23, 23, .10);
}

/* Empty states ("belum ada …") are an invitation, not a blocked area:
   plain frosted card with a soft dashed outline; hatching is kept for unopened communities only. */
.empty, .fkdi-empty, .module-empty, .empty-panel,
.portal-content .card.empty-panel, .portal-content .card.module-empty {
  border: 1.5px dashed #d4d4ce;
  background: var(--cx-card);
  box-shadow: none;
}
.empty-panel .empty-icon {
  border-radius: 50%;
  background: #fef3c7;
  color: #92400e;
}

/* Dark anchor cards */
.hero-note { border-radius: var(--cx-r-xl); }
.member-welcome {
  background-color: var(--cx-primary);
  background-image: radial-gradient(circle at 92% 10%, rgba(252, 211, 77, .28), rgba(252, 211, 77, 0) 42%);
}
.rd-feature, .fkdi-dues, .kta-card-header, .member-welcome {
  border-radius: var(--cx-r-xl);
  box-shadow: var(--cx-shadow-dark);
}
.kta-card-header { border-radius: 0; box-shadow: none; }

/* Icon tiles become round */
.brand-mark, .community-icon, .module-symbol, .empty-panel .empty-icon, .rd-feature-seal {
  border-radius: 50%;
}
.fkdi-brand img, .rd-feature-identity img, .community-logo img { border-radius: var(--cx-r-md); }

/* ---------- Tables: rows turn into a yellow capsule on hover ---------- */
table { border-collapse: separate; border-spacing: 0; }
th { background: transparent; color: var(--cx-text-2); font-weight: 500; font-size: 12px; }
tbody tr td { transition: background-color 200ms var(--cx-ease); }
tbody tr:hover td { background: var(--cx-accent); border-top-color: transparent; }
tbody tr:hover + tr td { border-top-color: transparent; }
tbody tr:hover td:first-child { border-radius: var(--cx-r-md) 0 0 var(--cx-r-md); }
tbody tr:hover td:last-child { border-radius: 0 var(--cx-r-md) var(--cx-r-md) 0; }

/* ---------- Public header: sticky frosted bar ---------- */
.public-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 243, 236, .6);
  -webkit-backdrop-filter: var(--cx-frost);
  backdrop-filter: var(--cx-frost);
  border-bottom-color: rgba(229, 229, 224, .7);
}
.public-links > a:not(.button) { padding: 8px 14px; border-radius: var(--cx-pill); transition: background-color 250ms ease-out; }
.public-links > a:not(.button):hover { background: rgba(30, 30, 30, .06); color: var(--cx-text); }

/* ---------- Homepage sections ---------- */
.rd-community-list { padding: 8px; border-top: 0; }
.rd-community-row {
  border-radius: var(--cx-r-lg);
  border-color: transparent !important;
  transition: background-color 200ms var(--cx-ease), box-shadow 200ms var(--cx-ease);
}
.rd-community-row + .rd-community-row { margin-top: 4px; }
/* Unopened communities: softer white card + status capsule instead of hatching */
.rd-community-row:not(.rd-community-featured) { background: rgba(255, 255, 255, .5); }
.rd-community-row:not(.rd-community-featured) h3 { color: #525252; }
.rd-community-row:not(.rd-community-featured) .rd-row-arrow { color: #a3a3a3; }
.rd-community-row:not(.rd-community-featured) .rd-row-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  width: max-content;
  padding: 4px 12px;
  border-radius: var(--cx-pill);
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 500;
}
.rd-community-row:not(.rd-community-featured) .rd-row-status::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.rd-community-row:not(.rd-community-featured):hover h3,
.rd-community-row:not(.rd-community-featured):hover .rd-row-arrow { color: var(--cx-text); }
.rd-community-row:not(.rd-community-featured):hover .rd-row-status { background: rgba(255, 255, 255, .7); color: #404040; }
@media (min-width: 561px) and (max-width: 1050px) {
  /* status column is hidden at this width; keep the capsule visible under the description */
  .rd-community-row:not(.rd-community-featured) .rd-row-status { grid-column: 3; justify-self: start; margin-top: -10px; }
  .rd-community-row:not(.rd-community-featured) .rd-row-arrow { grid-column: 4; grid-row: 1; }
}
@media (max-width: 560px) {
  .rd-community-row:not(.rd-community-featured) .rd-row-status { justify-self: start; }
}
.rd-community-featured { background: #fff; box-shadow: var(--cx-shadow); }
.rd-community-row:hover { background: var(--cx-accent); box-shadow: var(--cx-glow); }
.rd-community-row:hover .rd-row-status { color: #404040; }
.rd-row-arrow {
  display: grid; place-items: center; justify-self: end;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cx-chip); font-size: 18px;
  transition: transform 200ms var(--cx-ease), background-color 200ms var(--cx-ease);
}
.rd-community-row:hover .rd-row-arrow { transform: scale(1.06); background: #fff; }
.rd-how {
  background: var(--cx-glass);
  -webkit-backdrop-filter: var(--cx-frost);
  backdrop-filter: var(--cx-frost);
  border-block: 1px solid rgba(255, 255, 255, .7);
}
.rd-faq details, .home-faq details, .fkdi-faq details {
  border-bottom: 0;
  padding: 0;
  margin-bottom: 8px;
  border-radius: var(--cx-r-lg);
  background: var(--cx-card);
  box-shadow: var(--cx-edge), var(--cx-shadow);
  transition: background-color 200ms var(--cx-ease), box-shadow 200ms var(--cx-ease);
}
.rd-faq summary, .home-faq summary, .fkdi-faq summary { padding: 18px 22px; }
.rd-faq details > :not(summary), .home-faq details > :not(summary), .fkdi-faq details > :not(summary) { padding: 0 22px 18px; }
.rd-faq details[open], .home-faq details[open], .fkdi-faq details[open] { background: var(--cx-accent); box-shadow: var(--cx-glow); }

/* ---------- FKDI site: hero as a rounded dark anchor card ---------- */
.fkdi-hero {
  margin: 16px clamp(12px, 2.5vw, 40px) 0;
  border-radius: 36px;
  box-shadow: var(--cx-shadow-dark);
  background-image: radial-gradient(circle at 90% 0%, rgba(252, 211, 77, .22), rgba(252, 211, 77, 0) 40%);
}

/* ---------- FKDI site navigation ---------- */
.fkdi-nav-wrap {
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: var(--cx-frost);
  backdrop-filter: var(--cx-frost);
}
.fkdi-nav { gap: 6px; padding-block: 8px; }
.fkdi-nav a { padding: 8px 16px; border-bottom: 0; border-radius: var(--cx-pill); transition: background-color 250ms ease-out, color 250ms ease-out; }
.fkdi-nav a:hover { background: rgba(30, 30, 30, .06); color: var(--cx-text); }
.fkdi-nav a[aria-current=page] { background: var(--cx-primary); color: #fff; }

/* ---------- Member / admin shell: light glass sidebar, charcoal active pill ---------- */
.portal-sidebar {
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: var(--cx-frost);
  backdrop-filter: var(--cx-frost);
  color: var(--cx-text);
  border-right: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--cx-edge), var(--cx-shadow-pill);
  scrollbar-color: #d4d4ce transparent;
}
.portal-sidebar > .brand { color: var(--cx-text); }
.portal-sidebar .brand small, .side-caption { color: var(--cx-text-2); }
.side-nav a { color: #404040; border-radius: var(--cx-pill); transition: background-color 250ms ease-out, color 250ms ease-out; }
.side-nav a:hover { background: rgba(30, 30, 30, .06); color: var(--cx-text); }
.side-nav a.active { background: var(--cx-primary); color: #fff; box-shadow: none; }
.nav-status { background: #fef3c7; color: #92400e; }
.side-nav a.active .nav-status { background: var(--cx-accent); color: var(--cx-text); }
.side-note { background: var(--cx-hatch-yellow), rgba(255, 255, 255, .6); border-color: rgba(234, 179, 8, .35); color: #404040; border-radius: var(--cx-r-lg); }
.side-note strong { color: var(--cx-text); }
.side-note a { color: #92400e; font-weight: 600; }
.side-account { border-top: 0; padding: 10px; border-radius: var(--cx-pill); background: #fff; box-shadow: var(--cx-shadow-pill); }
.side-account small { color: var(--cx-text-2); }
.side-account .user-avatar { background: var(--cx-accent); color: var(--cx-text); }
.side-logout button { color: #404040; border-radius: var(--cx-pill); }
.side-logout button:hover { background: rgba(30, 30, 30, .06); color: var(--cx-text); }
@media (max-width: 760px) {
  .sidebar-close { color: var(--cx-text); border-radius: var(--cx-pill); border-color: var(--cx-border); }
  .portal-sidebar { background: rgba(250, 249, 245, .92); }
}
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 243, 236, .6);
  -webkit-backdrop-filter: var(--cx-frost);
  backdrop-filter: var(--cx-frost);
  border-bottom-color: rgba(229, 229, 224, .7);
}
.sidebar-toggle { border-radius: var(--cx-pill); }

/* ---------- KTA ---------- */
.kta-card { overflow: hidden; }
.kta-card-header { position: relative; background-image: radial-gradient(circle at 92% 0%, rgba(252, 211, 77, .35), rgba(252, 211, 77, 0) 45%); }
.kta-card-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: repeating-linear-gradient(-45deg, rgba(252, 211, 77, .15), rgba(252, 211, 77, .15) 4px, rgba(252, 211, 77, .55) 4px, rgba(252, 211, 77, .55) 5.5px);
}

/* ---------- Definition lists: dotted leader lines between label and value ---------- */
.kta-card-body dt { border-bottom: 1.5px dotted #d4d4ce; padding-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  .button, .card, .service-card, .fkdi-link-card, .rd-community-row, .rd-row-arrow, tbody tr td { transition: none; }
}

/* ---------- Forum: tombol aksi balasan kecil + judul topik lengket ---------- */
.reply-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 14px; }
.reply-actions:empty { display: none; }
.chip-button {
  display: inline-flex; align-items: center; list-style: none; cursor: pointer;
  padding: 4px 12px; font-size: 12px; font-weight: 600; line-height: 1.5; text-decoration: none;
  color: var(--cx-text); background: rgba(255, 255, 255, .7);
  border: 1px solid var(--cx-border); border-radius: var(--cx-pill);
}
.chip-button::-webkit-details-marker { display: none; }
.chip-button:hover { background: rgba(30, 30, 30, .06); }
.reply-actions .service-tools { border: 0; margin: 0; padding: 0; }
.reply-actions .service-tools[open] { flex: 1 1 100%; }
.reply-actions .service-tools form { margin-top: 12px; }
.service-list .card .reply-actions .chip-button { margin-top: 0; }

.topic-sticky {
  position: sticky; top: 78px; z-index: 25;
  margin: 8px 0 -4px; padding: 10px 18px;
  font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(245, 243, 236, .85);
  -webkit-backdrop-filter: var(--cx-frost); backdrop-filter: var(--cx-frost);
  border: 1px solid var(--cx-border); border-radius: var(--cx-pill);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.topic-sticky.is-visible { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 760px) { .topic-sticky { top: 68px; } }
@media (prefers-reduced-motion: reduce) { .topic-sticky { transition: none; } }

/* ---------- Keamanan pengurus (MFA): kartu ringkas di tengah ---------- */
.mfa-shell { display: flex; justify-content: center; padding-block: 48px; }
.mfa-card { width: 100%; max-width: 460px; padding: 34px 32px; text-align: center; }
.mfa-icon {
  display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px;
  border-radius: var(--cx-pill); background: rgba(252, 211, 77, .35); color: var(--cx-text);
}
.mfa-card .eyebrow { margin: 0 0 8px; color: var(--cx-muted, #737373); }
.mfa-card h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.03em; margin: 0 0 10px; }
.mfa-lead { font-size: 13px; line-height: 1.7; color: var(--cx-muted, #737373); margin: 0 0 24px; }
.mfa-note { font-size: 13px; line-height: 1.7; color: var(--cx-muted, #737373); margin: 0 0 18px; }
.mfa-card form { text-align: left; display: grid; gap: 4px; }
.mfa-card form p { margin: 0 0 14px; }
.mfa-card label { font-size: 13px; margin-bottom: 6px; }
.mfa-card input { padding: 11px 16px; font-size: 14px; }
.mfa-card .button { width: 100%; margin-top: 6px; padding: 11px 20px; font-size: 14px; }
.mfa-card .helptext { font-size: 12px; }
.mfa-error { font-size: 13px; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 10px 14px; margin: 0 0 18px; }
.mfa-qr { display: inline-block; padding: 12px; margin-bottom: 14px; background: #fff; border: 1px solid var(--cx-border); border-radius: 18px; }
.mfa-qr img { display: block; }
.mfa-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.mfa-codes code, .mfa-note code { font-size: 13px; padding: 7px 10px; background: rgba(30, 30, 30, .05); border-radius: 10px; overflow-wrap: anywhere; }
.mfa-back { display: inline-block; margin-top: 18px; font-size: 13px; }
@media (max-width: 480px) { .mfa-shell { padding-block: 24px; } .mfa-card { padding: 26px 20px; } }

/* ---------- MFA: kartu profil + kartu authenticator ---------- */
.mfa-layout { display: grid; grid-template-columns: 300px minmax(0, 460px); gap: 20px; align-items: start; justify-content: center; width: 100%; }
.mfa-layout .mfa-card { max-width: none; }
.mfa-profile { padding: 28px 24px; text-align: center; position: relative; overflow: hidden; }
.mfa-profile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 84px; background: radial-gradient(circle at 80% 0%, rgba(252, 211, 77, .55), rgba(252, 211, 77, 0) 70%); }
.mfa-avatar {
  position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 12px;
  border-radius: var(--cx-pill); background: var(--cx-text, #1e1e1e); color: #fcd34d; font-size: 24px; font-weight: 700;
}
.mfa-profile h2 { position: relative; font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.mfa-email, .mfa-inst { font-size: 12px; color: var(--cx-muted, #737373); margin: 4px 0 0; overflow-wrap: anywhere; }
.mfa-profile dl { margin: 20px 0 0; text-align: left; display: grid; gap: 12px; }
.mfa-profile dl > div { border-top: 1px solid var(--cx-border); padding-top: 10px; }
.mfa-profile dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--cx-muted, #737373); margin-bottom: 4px; }
.mfa-profile dd { margin: 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.mfa-profile .pill { font-size: 11px; padding: 3px 10px; border-radius: var(--cx-pill); }
.mfa-profile .mfa-ok { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
@media (max-width: 860px) { .mfa-layout { grid-template-columns: minmax(0, 460px); } .mfa-layout .mfa-card { order: -1; } }

/* ---------- MFA: dua kartu setara (override) ---------- */
.mfa-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; margin-inline: auto; align-items: stretch; gap: 20px; }
.mfa-layout > .card { padding: 32px 30px; border-radius: var(--cx-r-lg, 28px); }
.mfa-layout .mfa-card { display: flex; flex-direction: column; justify-content: center; }
.mfa-profile { display: flex; flex-direction: column; justify-content: center; }
.mfa-profile dl { margin-top: 22px; }
.mfa-roles { flex-direction: column; flex-wrap: nowrap; gap: 8px !important; }
.mfa-role { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; background: rgba(30, 30, 30, .04); border-radius: 12px; }
.mfa-role strong { font-size: 13px; }
.mfa-role small { font-size: 11px; line-height: 1.5; color: var(--cx-muted, #737373); }
.mfa-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mfa-profile dl > .mfa-pair { border-top: 0; padding-top: 0; }
.mfa-pair > div { border-top: 1px solid var(--cx-border); padding-top: 10px; }
.mfa-pair dd { font-size: 12px; }
@media (max-width: 860px) { .mfa-layout { grid-template-columns: minmax(0, 460px); } }

/* MFA: ikon dan avatar di tengah kartu flex */
.mfa-icon, .mfa-avatar { align-self: center; }

/* ---------- Foto profil + halaman profil ---------- */
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.user-avatar:has(.avatar-img), .mfa-avatar:has(.avatar-img) { overflow: hidden; padding: 0; background: transparent; }
.portal-content .profile-page { max-width: 1100px; }
.profile-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 24px; }
.profile-photo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-photo .user-avatar.large { height: 112px; width: 112px; font-size: 40px; margin-bottom: 14px; }
.profile-photo h2 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.profile-email { font-size: 12px; color: var(--cx-muted, #737373); margin: 4px 0 14px; overflow-wrap: anywhere; }
.profile-photo p.muted { font-size: 12px; line-height: 1.6; margin: 0 0 14px; }
.profile-photo form { width: 100%; }
.profile-photo input[type=file] { font-size: 12px; padding: 8px 12px; margin-bottom: 10px; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 10px; padding: 5px 12px; border: 1px solid var(--cx-border); border-radius: var(--cx-pill); background: #fff; cursor: pointer; }
.profile-photo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.profile-photo-actions .button { padding: 8px 16px; font-size: 13px; }
.profile-form h2 { font-size: 18px; margin: 0 0 18px; }
.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.profile-form > h2, .profile-form > .button, .profile-form > .errorlist { grid-column: 1 / -1; }
.profile-form p { margin: 0 0 16px; }
.profile-form .button { justify-self: start; }
.profile-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.profile-links a.card { display: block; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.profile-links a.card:hover { transform: translateY(-2px); }
.profile-links strong { display: block; font-size: 15px; }
.profile-links span { display: block; font-size: 12px; color: var(--cx-muted, #737373); margin-top: 4px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } .profile-form { grid-template-columns: 1fr; } }

/* Header publik beranda: pita buram sampai ujung layar, isi tetap sejajar konten */
.home-redesign .public-nav {
  width: 100%;
  margin-inline: 0;
  padding-inline: max(var(--rd-gutter), calc((100% - var(--rd-max)) / 2));
}

/* Halaman profil: garis tepi kartu terlihat jelas */
.profile-page .card { border: 1px solid #d6d4cc; box-shadow: 0 1px 2px rgba(23, 23, 23, .04), 0 6px 18px -8px rgba(23, 23, 23, .10); }
.profile-page a.card:hover { border-color: #b9b6ab; }

/* ---------- Logo: OC kuning di atas kotak hitam ---------- */
.brand .brand-mark { display: grid; place-items: center; width: 42px; height: 42px; background: #000; color: #ffe900; border-radius: 14px; flex-shrink: 0; overflow: hidden; }
.brand .brand-mark img { width: 30px; height: auto; display: block; }
@media (max-width: 560px) { .brand .brand-mark { width: 36px; height: 36px; border-radius: 12px; } .brand .brand-mark img { width: 24px; } }

/* Profil: kolom setara tinggi, kartu sedikit transparan */
.profile-grid { align-items: stretch; }
.profile-side { display: flex; }
.profile-side .profile-photo { flex: 1; justify-content: center; }
.profile-main { display: flex; flex-direction: column; }
.profile-main .profile-form { flex: 1; align-content: start; }
.profile-page .card { background-color: rgba(255, 255, 255, .55); }
@media (max-width: 900px) { .profile-main .profile-form { flex: none; } }

/* ---------- Sidebar pengelolaan: satu dropdown per komunitas ---------- */
.side-group { border-radius: var(--cx-r-md, 16px); }
.side-group > summary {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none;
  border-radius: var(--cx-pill); font-size: 12px; font-weight: 650; color: var(--cx-text);
}
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; opacity: .6; }
.side-group[open] > summary::after { transform: rotate(-135deg) translate(-1px, -1px); }
.side-group > summary:hover { background: rgba(30, 30, 30, .06); }
.side-group > summary:focus-visible { outline: 3px solid #b45309; outline-offset: -3px; }
.side-group-links { display: grid; gap: 2px; margin: 2px 0 8px 22px; padding-left: 10px; border-left: 1.5px solid var(--cx-border); }
.side-group-links a { padding: 8px 12px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .side-group > summary::after { transition: none; } }
