.fap-portal {
	max-width: 480px;
	margin: 0 auto;
	padding: 32px;
	border: 1px solid #e2e4e8;
	border-radius: 10px;
	background: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}
.fap-portal * { box-sizing: border-box; }

.fap-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	border-bottom: 1px solid #e2e4e8;
}
.fap-tab {
	flex: 1;
	padding: 10px 0;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	font-size: 15px;
	font-weight: 600;
	color: #6b7280;
	cursor: pointer;
}
.fap-tab.is-active {
	color: #1f4e5c;
	border-bottom-color: #1f4e5c;
}

.fap-panel { display: none; }
.fap-panel.is-active { display: block; }

.fap-alert {
	padding: 12px 14px;
	border-radius: 6px;
	margin-bottom: 18px;
	font-size: 14px;
	line-height: 1.5;
}
.fap-alert.fap-alert-success {
	background: #e7f6ec;
	color: #146c2e;
	border: 1px solid #b7e4c7;
}
.fap-alert.fap-alert-error {
	background: #fdecec;
	color: #9b1c1c;
	border: 1px solid #f5b5b5;
}

.fap-field { margin-bottom: 16px; }
.fap-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
}
.fap-field input[type="text"],
.fap-field input[type="email"],
.fap-field input[type="password"],
.fap-field input[type="url"],
.fap-field select,
.fap-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
}
.fap-field input:focus,
.fap-field select:focus,
.fap-field textarea:focus {
	outline: none;
	border-color: #1f4e5c;
	box-shadow: 0 0 0 3px rgba(31, 78, 92, 0.12);
}
.fap-field-inline label {
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: 6px;
}

.fap-divider {
	border: none;
	border-top: 1px solid #e2e4e8;
	margin: 20px 0;
}

/* Scoped to .fap-portal (the logged-out auth card) so the full-width
   button style does not leak into the dashboard, where buttons must size
   to their content. */
.fap-portal .fap-btn {
	display: inline-block;
	width: 100%;
	padding: 12px 16px;
	border-radius: 6px;
	border: none;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
}
.fap-portal .fap-btn-primary {
	background: #1f4e5c;
	color: #ffffff;
}
.fap-portal .fap-btn-primary:hover { background: #173943; }
.fap-portal .fap-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.fap-portal .fap-btn-secondary {
	background: #f3f4f6;
	color: #1f2937;
}

.fap-note {
	margin-top: 12px;
	font-size: 12px;
	color: #6b7280;
	text-align: center;
}

.fap-type-heading {
	font-weight: 600;
	margin-bottom: 12px;
}
.fap-type-cards {
	display: grid;
	gap: 12px;
}
.fap-type-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: left;
	padding: 16px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fafafa;
	cursor: pointer;
}
.fap-type-card:hover {
	border-color: #1f4e5c;
	background: #f0f5f6;
}
.fap-type-card strong { font-size: 15px; color: #1f2937; }
.fap-type-card span { font-size: 13px; color: #6b7280; }

.fap-back-link {
	background: none;
	border: none;
	color: #1f4e5c;
	font-size: 13px;
	cursor: pointer;
	margin-bottom: 14px;
	padding: 0;
}

.fap-portal-loggedin { text-align: center; }
.fap-welcome { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.fap-account-type { color: #6b7280; margin-bottom: 20px; }

/* ---------- Password show/hide toggle ---------- */
.fap-pw-wrap {
	position: relative;
	display: block;
}
.fap-pw-wrap input {
	width: 100%;
	padding-right: 42px !important;
}
.fap-pw-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	opacity: 0.55;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fap-pw-toggle:hover { opacity: 0.9; }
/* Eye icon drawn in CSS so no image/icon-font dependency is needed. */
.fap-pw-toggle::before {
	content: "";
	width: 18px;
	height: 12px;
	border: 1.6px solid currentColor;
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	color: #374151;
	display: block;
}
.fap-pw-toggle::after {
	content: "";
	position: absolute;
	width: 5px;
	height: 5px;
	border: 1.6px solid #374151;
	border-radius: 50%;
}
/* Struck-through eye when the password is visible. */
.fap-pw-toggle.is-visible::before {
	border-color: #1f4e5c;
}
.fap-pw-toggle.is-visible::after {
	border-color: #1f4e5c;
	box-shadow: 0 0 0 1px #fff;
}
.fap-pw-toggle.is-visible {
	opacity: 1;
}

/* Shared notice box used by the dashboard for gated states. */
.fap-notice-box {
	max-width: 480px;
	margin: 40px auto;
	text-align: center;
	padding: 24px;
	border: 1px solid #e2e4e8;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Login helper links (forgot password / resend) ---------- */
.fap-login-links {
	margin: 14px 0 0;
	text-align: center;
	font-size: 13px;
}
.fap-portal .fap-link-btn {
	background: none;
	border: none;
	color: #1f4e5c;
	font-size: 13px;
	cursor: pointer;
	padding: 2px 4px;
	text-decoration: underline;
	width: auto;
}
.fap-portal .fap-link-btn:hover { color: #173943; }
.fap-link-sep { color: #cbd2d6; margin: 0 4px; }

.fap-subform { margin-top: 4px; }
.fap-subform-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 600;
	color: #1f2937;
}
.fap-portal .fap-subform .fap-btn { margin-bottom: 8px; }
.fap-note-inline {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 14px;
	line-height: 1.45;
}
.fap-help {
	display: block;
	font-size: 11px;
	color: #6b7280;
	margin-top: 4px;
}

/* ---------- Enrollment screen ---------- */
.fap-enroll-intro { margin-bottom: 18px; }
.fap-enroll-intro h3 {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 600;
	color: #1f2937;
}
.fap-enroll-intro p {
	margin: 0;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}
.fap-enroll-footer {
	margin: 18px 0 0;
	text-align: center;
	font-size: 12px;
}
.fap-enroll-footer a { color: #6b7280; }

/* Resend button inside the unverified-account notice. */
.fap-notice-box .fap-btn {
	width: auto;
	display: inline-block;
	margin-top: 8px;
}
.fap-notice-box .fap-alert { margin-top: 12px; text-align: left; }
.fap-notice-box .fap-note { font-size: 12px; color: #6b7280; margin-top: 10px; }
