/* =====================================================================
   SPOM look and feel, aligned with gkiswjabar-dlp (app_shell.css +
   app_modern.css): same tokens, top bar, sign-in card and components,
   rewritten for the Bootstrap 5 (Bootswatch Simplex) markup SPOM uses.

   <body class="app-modern">              signed-in pages (view_header.php)
   <body class="app-modern auth-page ...">  sign-in, scan QR, 404

   Mukta is used in 400 and 700 only (assets/fonts/Mukta).
   ===================================================================== */

:root {
	--brand-primary: #2563eb;
	--brand-primary-rgb: 37, 99, 235;
	--brand-primary-dark: #1d4ed8;
	--brand-primary-soft: #eef4ff;
	--brand-primary-border: #c7d7fb;
	--brand-primary-ink: #1e40af;

	--topbar-height: 60px;
	--topbar-bg: #ffffff;
	--topbar-border: #e3e8ef;
	--topbar-text: #1f2a37;
	--topbar-muted: #6b7a90;
	--topbar-hover-bg: #f1f4f9;

	--app-bg: #f3f5f8;
	--app-font: 'Mukta', 'Helvetica Neue', Helvetica, Arial, sans-serif;

	/* Bootstrap 5 / Simplex: blue instead of Simplex red */
	--bs-primary: #2563eb;
	--bs-primary-rgb: 37, 99, 235;
	--bs-body-bg: #f3f5f8;
	--bs-body-font-family: var(--app-font);
}

.app-modern {
	--am-accent: var(--brand-primary);
	--am-accent-dark: var(--brand-primary-dark);
	--am-accent-rgb: var(--brand-primary-rgb);
	--am-accent-soft: var(--brand-primary-soft);
	--am-card: #ffffff;
	--am-border: #e4e7ec;
	--am-border-soft: #eef0f3;
	--am-text: #1f2430;
	--am-muted: #667085;
	--am-faint: #98a2b3;
	--am-danger: #d92d20;
	--am-success: #027a48;
	--am-radius-card: 12px;
	--am-radius-btn: 8px;
	--am-shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
	color: var(--am-text);
}

body.app-modern {
	margin: 0;
	background-color: var(--app-bg);
	font-family: var(--app-font);
	font-size: 16px;
	line-height: 1.5;
}

.app-modern :where(a) { color: var(--am-accent); text-decoration: none; }
.app-modern :where(a:hover, a:focus) { color: var(--am-accent-dark); text-decoration: underline; }
.app-modern :where(h1, h2, h3, h4, h5, h6) { color: var(--am-text); font-family: var(--app-font); font-weight: 700; }

/* Inline SVG icons (stroke style, same as DLP's app_icon_svg()) */
.app-icon {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

/* The app's mark: the GKI logo on a white tile */
.brand-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	padding: 3px;
	overflow: hidden;
	border-radius: 9px;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--topbar-border);
}

.brand-logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply; /* the JPEG's white background disappears into the tile */
}

/* =====================================================================
   TOP BAR (signed-in pages)
   ===================================================================== */
.app-topbar {
	position: sticky;
	top: 0;
	z-index: 998;
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--topbar-height);
	padding: 0 24px;
	background: var(--topbar-bg);
	border-bottom: 1px solid var(--topbar-border);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

.app-modern .topbar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	color: var(--topbar-text);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.app-modern .topbar-brand:hover,
.app-modern .topbar-brand:focus {
	color: var(--brand-primary);
	text-decoration: none;
}

.topbar-brand-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-top: 2px; /* Mukta sits high in its line box */
}

.topbar-right {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-left: auto;
}

/* ---- Account ---- */
.topbar-account { position: relative; }

.topbar-account-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 300px;
	padding: 4px 8px 4px 4px;
	border: none;
	border-radius: 10px;
	background: none;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s ease;
}

.topbar-account-toggle:hover,
.topbar-account-toggle[aria-expanded="true"] {
	background: var(--topbar-hover-bg);
}

.topbar-account-toggle:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.25);
}

.topbar-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--brand-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.03em;
	line-height: 1;
	padding-top: 2px;
}

.topbar-avatar--lg {
	width: 42px;
	height: 42px;
	font-size: 15px;
}

.topbar-account-name {
	min-width: 0;
	color: var(--topbar-text);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topbar-account-caret {
	width: 16px;
	height: 16px;
	color: var(--topbar-muted);
}

.topbar-account-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 1100;
	width: 280px;
	max-width: calc(100vw - 24px);
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--topbar-border);
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
}

.topbar-account-menu[hidden] { display: none; }

.topbar-account-menu__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border-bottom: 1px solid #eef0f2;
}

.topbar-account-head-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.topbar-account-head-name {
	color: var(--topbar-text);
	font-size: 15px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.topbar-account-head-sub {
	color: var(--topbar-muted);
	font-size: 13px;
}

.topbar-account-menu__links { padding: 6px; }

.app-modern .topbar-menu-link {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 10px;
	border-radius: 8px;
	color: #45536a;
	font-size: 14.5px;
	text-decoration: none;
	transition: background 0.12s ease, color 0.12s ease;
}

.app-modern .topbar-menu-link:hover,
.app-modern .topbar-menu-link:focus {
	background: var(--topbar-hover-bg);
	color: var(--topbar-text);
	text-decoration: none;
}

.app-modern .topbar-menu-link.is-logout,
.app-modern .topbar-menu-link.is-logout .app-icon { color: #c0392b; }

.app-modern .topbar-menu-link.is-logout:hover,
.app-modern .topbar-menu-link.is-logout:focus {
	background: #fdecea;
	color: #a5281b;
}

@media (max-width: 575.98px) {
	.app-topbar { padding: 0 12px; }
	.topbar-account-name,
	.topbar-account-caret { display: none; }
	.topbar-account-toggle { padding: 4px; }
}

@media (max-width: 400px) {
	.topbar-account-menu {
		position: fixed;
		top: calc(var(--topbar-height) + 8px);
		left: 12px;
		right: 12px;
		width: auto;
	}
}

/* =====================================================================
   PAGE LAYOUT (signed-in pages)
   One narrow column: SPOM is used on a phone, right after scanning a QR.
   ===================================================================== */
.app-main {
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	padding: 28px 16px 24px;
}

.app-footer {
	padding: 8px 16px 32px;
	color: var(--am-faint);
	font-size: 13px;
	text-align: center;
}

/* ---- Page header ---- */
.app-modern .page-header { margin: 0 0 22px; }

.app-modern .page-header h1 {
	margin: 0;
	font-size: 28px;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.app-modern .page-header p {
	margin: 6px 0 0;
	color: var(--am-muted);
	font-size: 15px;
}

/* "Selamat datang," above the member's name */
.app-modern .page-header .page-eyebrow {
	margin: 0 0 2px;
	color: var(--am-muted);
	font-size: 15px;
}

.app-modern .page-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 12px -4px;
	color: var(--am-muted);
	font-size: 14px;
	font-weight: 700;
}

.app-modern .page-back .app-icon { width: 18px; height: 18px; }
.app-modern .page-back:hover,
.app-modern .page-back:focus { color: var(--am-accent); text-decoration: none; }

/* Section label above a card */
.app-modern .section-title {
	margin: 26px 0 10px;
	color: #475467;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* =====================================================================
   COMPONENTS
   ===================================================================== */

/* ---- Cards ---- */
.app-modern .card {
	margin-bottom: 16px;
	background: var(--am-card);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	box-shadow: var(--am-shadow-card);
}

.app-modern .card-body { padding: 20px; }

.app-modern .card-title {
	margin: 0 0 4px;
	font-size: 18px;
	line-height: 1.3;
}

.app-modern .card-text {
	margin: 0;
	color: var(--am-muted);
	font-size: 15px;
}

/* ---- Lists of tappable rows (kegiatan, dokumen, warta, profil, keluarga) ---- */
.app-modern .item-list {
	padding: 6px;
	overflow: hidden;
}

.app-modern .list-item {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: none;
	color: inherit;
	font-family: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background .12s ease, border-color .12s ease;
}

.app-modern .list-item + .list-item { margin-top: 2px; }

.app-modern .list-item:hover,
.app-modern .list-item:focus {
	background: #f5f8ff;
	color: inherit;
	text-decoration: none;
}

.app-modern .list-item:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(var(--am-accent-rgb), .2);
}

.list-item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 11px;
	background: var(--brand-primary-soft);
	color: var(--brand-primary);
}

.list-item-icon .app-icon { width: 22px; height: 22px; }

.list-item-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.list-item-title {
	color: var(--am-text);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.list-item-desc {
	color: var(--am-muted);
	font-size: 14px;
	line-height: 1.4;
}

.list-item-arrow {
	width: 20px;
	height: 20px;
	color: var(--am-faint);
	transition: color .12s ease, transform .12s ease;
}

.app-modern .list-item:hover .list-item-arrow { color: var(--am-accent); transform: translateX(2px); }

.list-item-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px 0;
	border-radius: 999px;
	background: #ecfdf3;
	color: #067647;
	font-size: 12px;
	font-weight: 700;
	vertical-align: 2px;
}

/* One line of guidance at the top of a list */
.app-modern .item-list-intro {
	margin: 0;
	padding: 8px 12px 6px;
	color: var(--am-muted);
	font-size: 14.5px;
}

.list-item-desc { overflow-wrap: anywhere; }

/* Icon + text, not tappable (e.g. above a button in a card) */
.media-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}

/* Small text link under a list ("warta minggu-minggu sebelumnya") */
.app-modern .item-list-more {
	display: block;
	margin: 2px 6px 4px;
	padding: 10px 12px 8px;
	border-top: 1px solid var(--am-border-soft);
	font-size: 14px;
	font-weight: 700;
}

/* ---- Family members: tap a row to mark present ---- */
.member-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #f2f4f7;
	color: #475467;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	padding-top: 2px;
	transition: background .12s ease, color .12s ease;
}

.family-member-status-area {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 28px;
	height: 28px;
	border: 2px solid #d0d5dd;
	border-radius: 50%;
	background: #fff;
	transition: background .12s ease, border-color .12s ease;
}

.family-member-status-area svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: #fff;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.family-member .member-hint-present { display: none; }

.app-modern .family-member.present,
.app-modern .family-member.present:hover {
	background: #ecfdf3;
	border-color: #abefc6;
}

.app-modern .family-member + .family-member.present,
.app-modern .family-member.present + .family-member { margin-top: 4px; }

.family-member.present .member-avatar { background: #dcfae6; color: #067647; }
.family-member.present .family-member-status-area { background: #12b76a; border-color: #12b76a; }
.family-member.present .list-item-desc { color: #067647; }
.family-member.present .member-hint-absent { display: none; }
.family-member.present .member-hint-present { display: inline; }

/* ---- Status hero: "Kehadiran tercatat", "Presensi belum dibuka", ... ---- */
.app-modern .status-hero {
	align-items: center; /* .card is a flex column in Bootstrap 5 */
	padding: 30px 22px 24px;
	text-align: center;
}

.status-hero-actions { align-self: stretch; }

.status-hero-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin-bottom: 14px;
	border-radius: 50%;
	background: var(--brand-primary-soft);
	color: var(--brand-primary);
	box-shadow: 0 0 0 8px rgba(var(--brand-primary-rgb), .06);
}

.status-hero-icon .app-icon { width: 34px; height: 34px; stroke-width: 2; }

.status-hero--success .status-hero-icon { background: #dcfae6; color: #079455; box-shadow: 0 0 0 8px rgba(18, 183, 106, .08); }
.status-hero--warning .status-hero-icon { background: #fef0c7; color: #b54708; box-shadow: 0 0 0 8px rgba(247, 144, 9, .08); }
.status-hero--muted   .status-hero-icon { background: #f2f4f7; color: #475467; box-shadow: 0 0 0 8px rgba(16, 24, 40, .04); }

.status-hero-label {
	margin: 0 0 4px;
	color: var(--am-muted);
	font-size: 15px;
}

.status-hero-title {
	margin: 0;
	font-size: 22px;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.status-hero-label--after { margin: 4px 0 0; }

.status-hero-text {
	max-width: 440px;
	margin: 12px auto 0;
	color: #475467;
	font-size: 15px;
}

.status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 14px;
	padding: 3px 12px 2px;
	border-radius: 999px;
	background: #dcfae6;
	color: #067647;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.status-pill::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.status-hero-actions {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--am-border-soft);
}

/* "Batalkan kehadiran": quiet, but clearly a destructive action */
.app-modern .link-danger-quiet {
	color: var(--am-muted);
	font-size: 14px;
}

.app-modern .link-danger-quiet:hover,
.app-modern .link-danger-quiet:focus { color: var(--am-danger); }

/* ---- Empty state ---- */
.empty-state {
	padding: 30px 22px;
	color: var(--am-muted);
	font-size: 15px;
	text-align: center;
}

.empty-state .app-icon {
	display: block;
	width: 36px;
	height: 36px;
	margin: 0 auto 10px;
	color: var(--am-faint);
}

.empty-state strong {
	display: block;
	margin-bottom: 4px;
	color: var(--am-text);
	font-size: 16px;
}

/* ---- Buttons ---- */
.app-modern .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-btn);
	background: #fff;
	color: var(--am-text);
	padding: 8px 16px 7px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	box-shadow: none;
	text-shadow: none;
	text-transform: none;
	transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease;
}

.app-modern .btn:hover,
.app-modern .btn:focus { background: #f2f4f7; color: var(--am-text); text-decoration: none; outline: none; }
.app-modern .btn:focus-visible { box-shadow: 0 0 0 3px rgba(var(--am-accent-rgb), .22); }
.app-modern .btn .app-icon { width: 18px; height: 18px; }

.app-modern .btn-primary,
.app-modern .btn-primary:focus { background: var(--am-accent); border-color: var(--am-accent); color: #fff; }
.app-modern .btn-primary:hover,
.app-modern .btn-primary:active { background: var(--am-accent-dark); border-color: var(--am-accent-dark); color: #fff; }

.app-modern .btn-default,
.app-modern .btn-secondary,
.app-modern .btn-default:focus,
.app-modern .btn-secondary:focus { background: #fff; border-color: var(--am-border); color: var(--am-text); }
.app-modern .btn-default:hover,
.app-modern .btn-secondary:hover { background: #f2f4f7; border-color: #d0d5dd; color: var(--am-text); }

.app-modern .btn-lg { padding: 11px 20px 10px; font-size: 16px; border-radius: 10px; }
.app-modern .btn-block { display: flex; width: 100%; }
.app-modern .btn.disabled,
.app-modern .btn[disabled] { opacity: .55; box-shadow: none; }

/* ---- Forms ---- */
.app-modern .form-group { margin-bottom: 18px; }

.app-modern .form-label,
.app-modern .control-label {
	display: block;
	margin-bottom: 6px;
	color: #344054;
	font-size: 14px;
	font-weight: 700;
}

.app-modern .form-control,
.app-modern .form-select {
	min-height: 42px;
	padding: 8px 12px 7px;
	border: 1px solid #d0d5dd;
	border-radius: var(--am-radius-btn);
	background-color: #fff;
	color: var(--am-text);
	font-family: inherit;
	font-size: 16px; /* 16px keeps iOS from zooming in on focus */
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	transition: border-color .12s ease, box-shadow .12s ease;
}

.app-modern .form-control:focus,
.app-modern .form-select:focus {
	outline: none;
	border-color: var(--am-accent);
	box-shadow: 0 0 0 3px rgba(var(--am-accent-rgb), .14);
}

.app-modern .form-control::placeholder { color: var(--am-faint); }

/* The one big field on a sign-in step (WhatsApp number, OTP code) */
.app-modern .form-control-hero {
	min-height: 56px;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: .04em;
	text-align: center;
}

.app-modern .form-control-hero::placeholder { font-weight: 400; letter-spacing: 0; }

.app-modern .help-block,
.app-modern .form-text {
	display: block;
	margin-top: 5px;
	color: var(--am-muted);
	font-size: 13.5px;
}

.app-modern .help-block:empty { display: none; }
.app-modern .help-block.is-error,
.app-modern .form-group .help-block[id$="-help-block"] { color: var(--am-danger); }

.app-modern .form-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-height: 0;
	margin: 0 0 18px;
	padding-left: 0;
}

.app-modern .form-check .form-check-input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	float: none;
	border: 1.5px solid #d0d5dd;
	border-radius: 6px;
	cursor: pointer;
}

.app-modern .form-check-input:checked { background-color: var(--am-accent); border-color: var(--am-accent); }
.app-modern .form-check-input:focus { border-color: var(--am-accent); box-shadow: 0 0 0 3px rgba(var(--am-accent-rgb), .18); }

.app-modern .form-check-label { color: #344054; font-size: 15px; line-height: 1.4; cursor: pointer; }
.app-modern .form-check-label small { display: block; margin-top: 2px; color: var(--am-muted); font-size: 13.5px; overflow-wrap: anywhere; }
.app-modern .card-body > .form-check:last-child,
.app-modern .form-group--last { margin-bottom: 0; }

/* Read-only value in a form (e.g. data wajib on the "bagikan data" page) */
.app-modern .form-static { color: var(--am-text); font-size: 16px; overflow-wrap: anywhere; }

.app-modern .form-text--intro { margin: 0 0 16px; }
.app-modern .form-text--note { margin: 0 4px 16px; }

/* Stacked full-width buttons at the end of a form */
.app-modern .form-actions { display: grid; gap: 10px; }
.app-modern .form-actions .help-block { margin: 0; }

.app-modern .form-actions--section { margin: 0 0 20px; }

/* Status pill variants (default: success) */
.status-pill--warning { background: #fef0c7; color: #b54708; }
.status-pill--danger { background: #fee4e2; color: #b42318; }
.status-pill--muted { background: #f2f4f7; color: #475467; }
.app-modern .card-body > .status-pill:first-child { margin-top: 0; }

/* Label/value list (Data saya) */
.app-modern .data-list { margin: 0; padding: 4px 16px; }
.app-modern .card-body .data-list { padding: 0; margin: 12px 0; }
.app-modern .data-list-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--am-border-soft); }
.app-modern .data-list-row:first-child { border-top: 0; }
.app-modern .data-list dt { color: var(--am-muted); font-size: 14px; font-weight: 500; }
.app-modern .data-list dd { margin: 0; color: var(--am-text); font-size: 15px; overflow-wrap: anywhere; }
.app-modern .data-list--perubahan .nilai-lama { color: var(--am-muted); text-decoration: line-through; }
.app-modern .data-kosong { color: var(--am-faint); font-style: italic; text-decoration: none; }

/* Person switcher (Data saya: diri sendiri / anggota keluarga) */
.app-modern .chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.app-modern .chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--am-border); border-radius: 999px; background: var(--am-card); color: var(--am-text); font-size: 14px; font-weight: 600; text-decoration: none; }
.app-modern .chip:hover, .app-modern .chip:focus { border-color: var(--am-accent); color: var(--am-accent); text-decoration: none; }
.app-modern .chip.is-active { border-color: var(--am-accent); background: var(--am-accent); color: #fff; }

/* Request history */
.app-modern .riwayat-list { margin: 0; padding: 12px 0 0; border-top: 1px solid var(--am-border-soft); list-style: none; color: var(--am-muted); font-size: 13.5px; }
.app-modern .riwayat-list li + li { margin-top: 6px; }
.app-modern .riwayat-list strong { color: var(--am-text); }
.app-modern .riwayat-catatan { display: block; margin-top: 2px; color: var(--am-text); }

/* Pemulihan akun lama (layar Buat Profil Baru) */
.auth-recover { padding: 16px; border: 1px solid var(--am-border); border-radius: 12px; background: #f9fafb; }
.auth-recover-title { margin: 0 0 4px; color: var(--am-text); font-size: 15px; font-weight: 700; }
.auth-recover-text { margin: 0 0 12px; color: var(--am-muted); font-size: 14px; line-height: 1.5; }
.auth-recover #form-pemulihan { display: grid; gap: 10px; }
.auth-recover .form-group { margin-bottom: 0; }
.auth-recover-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--am-faint); font-size: 13px; }
.auth-recover-divider::before, .auth-recover-divider::after { content: ''; flex: 1; height: 1px; background: var(--am-border); }

/* Steps shown one at a time (e.g. email verification / data baru on the "bagikan data" page) */
.app-modern [hidden] { display: none !important; }
.app-modern .card-body > .form-actions + form { margin-top: 20px; }

/* ---- Modals ---- */
.app-modern .modal-content {
	border: none;
	border-radius: 14px;
	box-shadow: 0 20px 48px rgba(16, 24, 40, .28);
}

.app-modern .modal-header { padding: 16px 20px; border-bottom: 1px solid var(--am-border-soft); }
.app-modern .modal-title { font-size: 18px; font-weight: 700; color: var(--am-text); }
.app-modern .modal-body { padding: 18px 20px; color: #344054; font-size: 15px; }
.app-modern .modal-footer { padding: 14px 20px; border-top: 1px solid var(--am-border-soft); }

/* ---- Alerts ---- */
.app-modern .alert { border: 1px solid transparent; border-radius: 10px; font-size: 15px; }
.app-modern .alert-success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.app-modern .alert-danger  { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.app-modern .alert-warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.app-modern .alert-info    { background: var(--am-accent-soft); border-color: var(--brand-primary-border); color: var(--brand-primary-ink); }

/* =====================================================================
   SIGN-IN PAGES (login, scan QR, 404)
   <body class="app-modern auth-page auth-page--public">
   + .auth-shell > .auth-brand + .auth-card
   ===================================================================== */
/* Faint Christian motifs (img/bg_pattern.svg, shared with DLP) tiled over a
   soft blue glow. Bump ?v= when img/bg_pattern.svg changes. */
body.auth-page--public {
	background-image:
		url('img/bg_pattern.svg?v=2'),
		radial-gradient(circle at 12% 8%, rgba(var(--brand-primary-rgb), 0.10), transparent 42%),
		radial-gradient(circle at 88% 92%, rgba(var(--brand-primary-rgb), 0.08), transparent 45%);
	background-size: 360px 360px, auto, auto;
	background-attachment: fixed;
}

body.auth-page {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 32px 16px;
}

.auth-shell {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.auth-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-bottom: clamp(20px, 4vw, 28px);
	text-align: center;
}

.auth-brand .brand-logo {
	width: clamp(64px, 14vw, 76px);
	height: clamp(64px, 14vw, 76px);
	padding: 6px;
	border-radius: clamp(16px, 3.4vw, 20px);
	box-shadow: inset 0 0 0 1px var(--topbar-border), 0 6px 16px rgba(16, 24, 40, 0.10);
}

.auth-brand-name {
	margin: 0;
	color: var(--topbar-text);
	font-size: clamp(26px, 6vw, 32px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.auth-brand-church {
	margin: -6px 0 0;
	color: var(--topbar-muted);
	font-size: 16px;
}

.auth-card {
	width: 100%;
	max-width: 440px;
	padding: 30px 32px 28px;
	background: #fff;
	border: 1px solid #e6e8eb;
	border-radius: 16px;
	box-shadow: 0 4px 32px rgba(16, 24, 40, 0.08);
}

.auth-card--wide { max-width: 520px; }

.auth-card-title {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.25;
	text-align: center;
}

.auth-card-lead {
	margin: 0 0 22px;
	color: var(--am-muted);
	font-size: 15px;
	text-align: center;
}

/* A sign-in step that replaces the first one (choose profile, create profile) */
.auth-step-title {
	margin: 0 0 4px;
	font-size: 19px;
	line-height: 1.3;
}

.auth-step-lead {
	margin: 0 0 18px;
	color: var(--am-muted);
	font-size: 15px;
}

.app-modern .auth-card .btn-primary { width: 100%; }

/* Choose-profile rows: each one a bordered option, as DLP's .tfa-option */
.app-modern .auth-card .item-list { padding: 0; }
.app-modern .auth-card .list-item { border-color: var(--am-border); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.app-modern .auth-card .list-item + .list-item { margin-top: 10px; }
.app-modern .auth-card .list-item:hover,
.app-modern .auth-card .list-item:focus-visible { border-color: var(--am-accent); background: #fbfcff; box-shadow: 0 0 0 3px rgba(var(--am-accent-rgb), .12); }

.app-modern .form-group > .form-check { margin-bottom: 0; }

.auth-links {
	margin: 18px 0 0;
	color: var(--am-muted);
	font-size: 14px;
	text-align: center;
}

.auth-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	border-radius: 16px;
	background: var(--brand-primary-soft);
	color: var(--brand-primary);
}

.auth-card-icon .app-icon { width: 28px; height: 28px; }

.auth-footer {
	margin-top: 20px;
	color: var(--topbar-muted);
	font-size: 13px;
	text-align: center;
}

@media (max-width: 480px) {
	body.auth-page { justify-content: flex-start; padding-top: 28px; }
	.auth-card { padding: 24px 20px; border-radius: 14px; }
}

/* ---- QR scanner (camera + BarcodeDetector / jsQR, same engine as DLP Presensi) ---- */
.scan-view { position: relative; overflow: hidden; aspect-ratio: 1 / 1; max-height: 60vh; margin: 4px auto 0; border-radius: 14px; background: #0b1220; }
.scan-view video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; pointer-events: none; }
.scan-frame i { position: absolute; width: 22%; height: 22%; border: 4px solid rgba(255, 255, 255, .9); }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scan-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scan-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scan-view.is-ok .scan-frame i { border-color: #32d583; }
.scan-view.is-error .scan-frame i { border-color: #f97066; }
.scan-start { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.app-modern .auth-card .scan-start .btn { display: inline-flex; align-items: center; gap: 8px; width: auto; }
.scan-start .app-icon { width: 22px; height: 22px; }
.scan-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(11, 18, 32, .72); color: #fff; font-size: 14px; line-height: 1.35; text-align: center; }
.scan-msg:empty { display: none; }
.scan-result { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding: 12px 14px; border: 1px solid #fecdca; border-radius: 12px; background: #fef3f2; line-height: 1.35; }
.scan-result strong { color: #b42318; font-size: 16px; }
.scan-result span { color: var(--am-muted); font-size: 14px; }
.scan-tools { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.scan-start[hidden], .scan-result[hidden], .scan-tools[hidden], .scan-tools .btn[hidden] { display: none; }

/* ---- QR presensi pribadi lewat nomor handphone & tanggal lahir (belum terverifikasi) ---- */
.auth-card + .auth-card { margin-top: 16px; }
.qrp-hasil:focus { outline: none; }
.qrp-status { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #fedf89; border-radius: 12px; background: #fffaeb; color: #93370d; font-size: 14px; line-height: 1.45; }
.qrp-status p { margin: 6px 0 0; }
.qrp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 1px; border-radius: 99px; background: #fef0c7; color: #93370d; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.qrp-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.qrp-item { padding: 18px 16px 16px; border: 1px solid var(--am-border); border-radius: 14px; text-align: center; }
.qrp-item + .qrp-item { margin-top: 12px; }
.qrp-church { margin: 0; color: var(--am-muted); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.qrp-name { margin: 4px 0 14px; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.qrp-qr { width: min(100%, 280px); margin: 0 auto; padding: 12px; border: 1px solid var(--am-border); border-radius: 12px; background: #fff; }
.qrp-qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.qrp-note { margin: 12px 0; color: var(--am-muted); font-size: 14px; line-height: 1.45; }
.app-modern .auth-card .qrp-ulang { width: 100%; margin-top: 16px; }

/* =====================================================================
   PRINT / MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
	.app-modern .list-item,
	.app-modern .list-item-arrow,
	.app-modern .btn { transition: none; }
}

@media print {
	.app-topbar { display: none !important; }
	body.app-modern { background: #fff; }
}
