/*
 * Halaman mandiri (A5): login, daftar, akun (hapus akun & kebijakan privasi), halaman galat CodeIgniter.
 * Acuan: cornerinstitute-mobile/lib/features/auth/login_screen.dart & register_screen.dart.
 *
 * Dimuat sebelum tema.css (tema_kepala() tetap paling akhir), memakai token --fc-* dari tema.css.
 * Semua aturan berawalan kelas body (.fc-mandiri, .fc-akun, .fc-galat), jadi tidak berlaku di layout lain.
 *   1. Bersama: tombol, isian berikon, banner, pemisah, spinner, SweetAlert v1
 *   2. Login & daftar (.fc-masuk): kepala navy + lembar putih; di layar lebar dua kolom
 *   3. Akun (.fc-akun)
 *   4. Halaman galat (.fc-galat)
 */

/* 1. Bersama ------------------------------------------------------------------------------------------------------ */
.fc-mandiri, .fc-akun, .fc-galat {
	margin: 0;
	min-height: 100vh;
	font-family: var(--fc-font);
	color: var(--fc-body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
.fc-mandiri *, .fc-akun *, .fc-galat * { box-sizing: border-box; }

/* Lencana logo: logo bulat di lingkaran putih (seperti layar login aplikasi). */
.fc-lencana {
	display: inline-flex;
	flex: none;
	width: 76px;
	height: 76px;
	padding: 5px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.fc-lencana img { display: block; width: 100%; height: 100%; }
.fc-lencana--kecil { width: 44px; height: 44px; padding: 3px; box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }

/* Tombol: tinggi 54, sudut 16 (AppTheme mobile). */
.fc-tombol {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: var(--fc-tinggi-tombol);
	padding: 0 20px;
	border: 0;
	border-radius: var(--fc-r-tombol);
	font: 700 15px/1 var(--fc-font);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s;
}
.fc-tombol:hover, .fc-tombol:focus { text-decoration: none; }
.fc-tombol:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(18, 41, 77, .25); }
.fc-tombol:disabled { opacity: .7; cursor: not-allowed; }
.fc-tombol--utama { background: var(--fc-ink); color: #fff; box-shadow: 0 10px 22px rgba(18, 41, 77, .22); }
.fc-tombol--utama:hover, .fc-tombol--utama:focus { background: var(--fc-ink-soft); color: #fff; }
.fc-tombol--garis { background: #fff; color: var(--fc-ink); border: 1.5px solid var(--fc-line); }
.fc-tombol--garis:hover, .fc-tombol--garis:focus { border-color: var(--fc-ink); color: var(--fc-ink); }
.fc-tombol svg { width: 18px; height: 18px; flex: none; }

/* Isian berikon: ikon di kiri, tombol lihat password di kanan. */
.fc-isian { position: relative; margin-bottom: 14px; }
.fc-isian__ikon {
	position: absolute;
	left: 16px;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	color: var(--fc-muted);
	pointer-events: none;
	transition: color .15s;
}
.fc-isian input {
	display: block;
	width: 100%;
	height: var(--fc-tinggi-tombol);
	margin: 0;
	padding: 0 16px 0 48px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-r-isian);
	background: var(--fc-field);
	box-shadow: none;
	font: 600 15px var(--fc-font);
	color: var(--fc-ink);
	outline: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.fc-isian input::placeholder { color: var(--fc-muted); font-weight: 500; opacity: 1; }
.fc-isian input:focus { border-color: var(--fc-mint-deep); background: #fff; box-shadow: 0 0 0 3px rgba(85, 183, 156, .22); }
.fc-isian:focus-within .fc-isian__ikon { color: var(--fc-mint-deep); }
.fc-isian--mata input { padding-right: 54px; }
.fc-isian__mata {
	position: absolute;
	right: 6px;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-top: -21px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--fc-muted);
	cursor: pointer;
}
.fc-isian__mata:hover { background: rgba(18, 41, 77, .06); color: var(--fc-ink); }
.fc-isian__mata:focus { outline: none; }
.fc-isian__mata:focus-visible { box-shadow: 0 0 0 3px rgba(18, 41, 77, .2); }
.fc-isian__mata svg { width: 20px; height: 20px; }
.fc-isian__mata .fc-ikon-tutup,
.fc-isian__mata[aria-pressed="true"] .fc-ikon-buka { display: none; }
.fc-isian__mata[aria-pressed="true"] .fc-ikon-tutup { display: block; }

/* InfoBanner nada "cukup" (amber); teks amber gelap agar kontras ≥ 4,5. */
.fc-banner {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: var(--fc-r-isian);
	background: var(--fc-amber-soft);
	color: #7A4A06;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.45;
}
.fc-banner svg { flex: none; width: 20px; height: 20px; color: var(--fc-amber-deep); }

/* Pemisah bertulisan ("Belum punya akun?"). */
.fc-pemisah {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 22px 0 14px;
	color: var(--fc-muted);
	font-size: .88rem;
	font-weight: 600;
}
.fc-pemisah::before, .fc-pemisah::after { content: ""; flex: 1; height: 1px; background: var(--fc-line); }

/* Overlay loading (daftar): spinner bertema, sama dengan layout utama (kerangka.css). */
.fc-mandiri .modal2 {
	display: none;
	position: fixed;
	z-index: 9999;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(241, 244, 248, .72);
}
.fc-mandiri .modal2::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border-radius: 50%;
	border: 4px solid var(--fc-mint-soft);
	border-top-color: var(--fc-mint-deep);
	border-right-color: var(--fc-ink);
	animation: fc-putar .8s linear infinite;
}
.fc-mandiri.loading { overflow: hidden; }
.fc-mandiri.loading .modal2 { display: block; }
@keyframes fc-putar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fc-mandiri .modal2::after { animation-duration: 2.4s; } }

/* SweetAlert v1 (daftar). Sama dengan komponen.css bagian 10, yang hanya dimuat layout utama. */
.fc-mandiri .sweet-overlay { background-color: rgba(10, 26, 53, .5); }
.fc-mandiri .sweet-alert {
	font-family: var(--fc-font);
	border-radius: var(--fc-r-dialog);
	box-shadow: var(--fc-bayang-naik);
	padding: 22px 22px 18px;
}
.fc-mandiri .sweet-alert h2 { color: var(--fc-ink); font-weight: 800; font-size: 26px; letter-spacing: -.01em; }
.fc-mandiri .sweet-alert p { color: var(--fc-body); font-weight: 500; }
.fc-mandiri .sweet-alert button {
	font-family: var(--fc-font);
	font-weight: 700;
	font-size: 15px;
	border-radius: 14px;
	padding: 11px 30px;
	margin: 22px 5px 0;
}
.fc-mandiri .sweet-alert button.confirm { background-color: var(--fc-ink) !important; box-shadow: none !important; color: #fff; }
.fc-mandiri .sweet-alert button.confirm:focus { box-shadow: 0 0 0 3px rgba(18, 41, 77, .25) !important; }
.fc-mandiri .sweet-alert .sa-icon.sa-warning { border-color: var(--fc-amber); }
.fc-mandiri .sweet-alert .sa-icon.sa-warning .sa-body,
.fc-mandiri .sweet-alert .sa-icon.sa-warning .sa-dot { background-color: var(--fc-amber); }
.fc-mandiri .sweet-alert .sa-icon.sa-success { border-color: var(--fc-mint); }
.fc-mandiri .sweet-alert .sa-icon.sa-success .sa-line { background-color: var(--fc-mint); }
.fc-mandiri .sweet-alert .sa-icon.sa-success .sa-placeholder { border-color: rgba(85, 183, 156, .25); }
@media (max-width: 575.98px) {
	.fc-mandiri .sweet-alert { width: auto; left: 16px; right: 16px; margin-left: 0; }
	.fc-mandiri .sweet-alert button { padding: 11px 22px; }
}

/* 2. Login & daftar --------------------------------------------------------------------------------------------- */
.fc-mandiri { background: var(--fc-ink); }
.fc-masuk {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}
.fc-masuk__hero {
	position: relative;
	overflow: hidden;
	/* Bawahnya +32px: ditindih sudut lembar putih, agar di balik sudut tampak gradasi hero, bukan latar body polos. */
	padding: 28px 24px 66px;
	background-position: right -180px top -200px, 0 0;
}
.fc-masuk__isi-hero { position: relative; z-index: 1; }
.fc-masuk__sapa {
	margin: 22px 0 8px;
	color: #fff;
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -.02em;
}
.fc-masuk__tagline { max-width: 36ch; margin: 0; color: rgba(255, 255, 255, .74); font-size: .95rem; line-height: 1.55; }
.fc-masuk__lembar {
	display: flex;
	justify-content: center;
	flex: 1 0 auto;
	position: relative;
	z-index: 2;
	margin-top: -32px;
	padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
	border-radius: 32px 32px 0 0;
	background: var(--fc-surface);
}
.fc-masuk__kartu { width: 100%; max-width: 400px; }
.fc-masuk__judul {
	margin: 0 0 6px;
	color: var(--fc-ink);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -.02em;
}
.fc-masuk__ket { margin: 0 0 20px; color: var(--fc-muted); font-size: .92rem; line-height: 1.5; }
.fc-masuk__kirim { margin-top: 22px; }

@media (min-width: 576px) {
	.fc-masuk__hero { padding: 40px 40px 76px; }
	.fc-masuk__lembar { padding: 36px 40px 40px; }
}

/* Layar lebar: kepala navy jadi kolom kiri, lembar putih menindih tepinya dengan sudut membulat. */
@media (min-width: 992px) {
	.fc-masuk { flex-direction: row; }
	.fc-masuk__hero {
		display: flex;
		flex-direction: column;
		justify-content: center;
		flex: 0 0 46%;
		padding: 64px calc(36px + clamp(32px, 5vw, 88px)) 64px clamp(48px, 6vw, 104px);
		background-position: right -230px top -250px, 0 0;
		background-size: 620px 620px, 100% 100%;
	}
	/* Motif kedua di kiri bawah, agar kolom navy tidak kosong. */
	.fc-masuk__hero::after {
		content: "";
		position: absolute;
		left: -200px;
		bottom: -230px;
		width: 560px;
		height: 560px;
		background: var(--fc-motif) no-repeat center / contain;
		opacity: .6;
		transform: rotate(16deg);
		pointer-events: none;
	}
	.fc-masuk .fc-lencana { width: 92px; height: 92px; padding: 6px; }
	.fc-masuk__sapa { margin-top: 28px; font-size: clamp(2.1rem, 3vw, 2.75rem); }
	.fc-masuk__tagline { font-size: 1.05rem; }
	.fc-masuk__lembar {
		position: relative;
		z-index: 2;
		align-items: center;
		flex: 1 1 auto;
		margin-top: 0;
		margin-left: -36px;
		padding: 48px 56px;
		border-radius: 36px 0 0 36px;
		box-shadow: -18px 0 40px rgba(10, 26, 53, .18);
	}
	.fc-masuk__judul { font-size: 1.75rem; }
}

/* 3. Akun (hapus akun & kebijakan privasi; ditautkan dari Play Store/App Store) ---------------------------------- */
.fc-akun { background: var(--fc-bg); font-size: 16px; line-height: 1.65; }
.fc-akun__kepala { padding: 18px 20px 70px; background-position: right -200px top -230px, 0 0; }
.fc-akun .fc-akun__kepala a {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 760px;
	margin: 0 auto;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: -.01em;
	text-decoration: none;
}
.fc-akun main { max-width: 792px; margin: -46px auto 0; padding: 0 16px 40px; }
.fc-akun .kartu {
	padding: 28px;
	border-radius: var(--fc-r-kartu);
	background: var(--fc-surface);
	box-shadow: var(--fc-bayang-kartu);
}
.fc-akun h1 { margin: 0 0 4px; color: var(--fc-ink); font-size: 1.6rem; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.fc-akun h2 { margin: 28px 0 6px; color: var(--fc-ink); font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.fc-akun .kecil { color: var(--fc-muted); font-size: .9rem; }
.fc-akun ul, .fc-akun ol { padding-left: 22px; }
.fc-akun li + li { margin-top: 4px; }
.fc-akun strong { color: var(--fc-ink); }
.fc-akun a { color: var(--fc-sky); font-weight: 600; }
.fc-akun label { display: block; margin: 16px 0 6px; color: var(--fc-ink); font-weight: 700; }
.fc-akun input[type=text], .fc-akun input[type=password] {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-r-isian);
	background: var(--fc-field);
	font: 600 15px var(--fc-font);
	color: var(--fc-ink);
	outline: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.fc-akun input[type=text]:focus, .fc-akun input[type=password]:focus {
	border-color: var(--fc-mint-deep);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(85, 183, 156, .22);
}
.fc-akun .cek {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 18px;
	padding: 12px 14px;
	border-radius: var(--fc-r-isian);
	background: var(--fc-coral-soft);
	color: var(--fc-body);
	font-weight: 600;
	line-height: 1.5;
}
.fc-akun .cek input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fc-coral); }
.fc-akun button {
	width: 100%;
	height: var(--fc-tinggi-tombol);
	margin-top: 20px;
	border: 0;
	border-radius: var(--fc-r-tombol);
	background: #B3362F; /* (A7) coral tua: teks putih 6,0:1 (coral #DE4F47 hanya 4,0:1) */
	color: #fff;
	font: 700 15px var(--fc-font);
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(222, 79, 71, .22);
}
.fc-akun button:hover { background: #9C2D27; }
.fc-akun button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(222, 79, 71, .3); }
.fc-akun .pesan { margin: 16px 0; padding: 12px 14px; border-radius: var(--fc-r-isian); font-weight: 600; }
.fc-akun .pesan.galat { background: var(--fc-coral-soft); color: #8C2620; }
.fc-akun .pesan.sukses { background: var(--fc-mint-soft); color: #145F4F; }
.fc-akun footer { padding: 0 16px 32px; color: var(--fc-muted); font-size: .85rem; text-align: center; }
.fc-akun footer a { color: var(--fc-ink); }
@media (max-width: 575.98px) {
	.fc-akun .kartu { padding: 22px 18px; }
	.fc-akun h1 { font-size: 1.4rem; }
}

/* 4. Halaman galat (application/views/errors/html: 404, galat umum termasuk "Permintaan Ditolak", galat DB) ------- */
.fc-galat {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: var(--fc-bg);
	font-size: 15px;
	line-height: 1.6;
}
.fc-galat__kartu {
	width: 100%;
	max-width: 560px;
	overflow: hidden;
	border-radius: var(--fc-r-dialog);
	background: var(--fc-surface);
	box-shadow: var(--fc-bayang-naik);
}
.fc-galat__kepala {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px 24px 52px;
	background-position: right -220px top -240px, 0 0;
}
.fc-galat #container { margin: -26px 0 0; padding: 0 28px; text-align: center; }
.fc-galat .fc-galat__ikon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--fc-coral-soft);
	color: var(--fc-coral);
	box-shadow: 0 0 0 6px #fff;
}
.fc-galat .fc-galat__ikon svg { width: 26px; height: 26px; }
.fc-galat h1 {
	margin: 14px 0 6px;
	color: var(--fc-ink);
	font-size: 1.45rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -.02em;
}
.fc-galat p { margin: 0 0 8px; color: var(--fc-body); }
.fc-galat code {
	display: block;
	margin: 12px 0;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--fc-field);
	color: var(--fc-ink);
	font: 13px/1.5 Consolas, Monaco, "Courier New", monospace;
	text-align: left;
	word-break: break-word;
}
.fc-galat__aksi { padding: 18px 28px 28px; }
.fc-galat__aksi .fc-tombol { width: auto; min-width: 220px; margin: 0 auto; display: inline-flex; }
.fc-galat__aksi { text-align: center; }
