/* =====================================================================
   KungfuPu — base.css
   Shared resets, typography, topbar, buttons, badges, cards.
   Loaded on every page (admin + member + auth). Page-specific files
   (admin.css, member.css, auth.css, tree.css) layer on top of this.
   ===================================================================== */

* { box-sizing: border-box; }

body {
	font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
	background: #f5f5f5;
	margin: 0;
	padding: 24px;
	color: #222;
}

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; }

a { color: #1f5fbf; }

.subtitle { color: #666; margin-bottom: 20px; font-size: 13px; }

/* --- Topbar (signed-in-as / logout / language switcher) --- */
.topbar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: #666;
	margin-bottom: 8px;
}
.topbar a { color: #1f5fbf; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .sep { color: #ccc; }

/* --- Buttons --- */
button, .btn {
	padding: 9px 18px;
	border: none;
	border-radius: 4px;
	background: #1f2d3d;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}
button:hover, .btn:hover { background: #33465e; }

/* --- Cards --- */
.card {
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.1);
	border-radius: 6px;
	padding: 24px;
}

/* --- Badges --- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-approved { background: #e3f7e8; color: #1a7f37; }
.badge-pending  { background: #fff4e0; color: #a3620a; }

/* --- Generic form fields (login forms, member edit form) --- */
label { display: block; font-size: 12px; color: #555; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=file], textarea, select {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
}
textarea { resize: vertical; min-height: 120px; }

/* --- Messages --- */
.msg-error, .error {
	background: #fdeaea; color: #a3312a; font-size: 13px;
	padding: 10px 12px; border-radius: 4px; margin-bottom: 16px;
}
.msg-error ul { margin: 4px 0 0 18px; padding: 0; }
.msg-saved {
	background: #e3f7e8; color: #1a7f37; font-size: 13px;
	padding: 10px 12px; border-radius: 4px; margin-bottom: 16px;
}

/* --- Photo thumbnails (sizes vary by context via modifier classes) --- */
.photo { object-fit: cover; border-radius: 4px; border: 1px solid #ddd; background: #eee; }
.photo-sm { width: 40px; height: 56px; border-radius: 3px; }
.photo-md { width: 110px; height: 154px; }
.photo-lg { width: 140px; height: 196px; }
