:root {
	--navy: #0b2341;
	--navy-deep: #07182d;
	--gold: #c9a24d;
	--red: #9c1c2d;
	--cream: #f6f3ee;
	--gray: #ece8e1;
	--ink: #1c2430;
	--muted: #5c6570;
	--line: rgba(11, 35, 65, 0.12);
	--white: #fff;
	--serif: "IBM Plex Serif", Georgia, serif;
	--sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--sans);
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink);
	background: var(--cream);
}

body.login-body {
	background: var(--navy-deep);
}

button,
input,
select,
textarea,
label,
.btn {
	font-family: var(--sans);
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

.admin-top {
	background: var(--navy-deep);
	color: var(--white);
}

.admin-top__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.admin-brand {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	color: var(--white);
}

.admin-brand:hover { color: var(--gold); }

.admin-brand__kicker {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold);
}

.admin-brand__name {
	font-family: var(--serif);
	font-size: 20px;
	font-weight: 600;
}

.admin-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}

.admin-nav a {
	color: rgba(255,255,255,0.82);
	font-size: 14px;
	font-weight: 600;
}

.admin-nav a:hover,
.admin-nav a.is-active {
	color: var(--gold);
}

.admin-main {
	padding: 28px 0 48px;
}

.admin-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
}

.admin-flash {
	padding: 12px 14px;
	border-radius: 6px;
	margin-bottom: 18px;
	font-weight: 600;
}

.admin-flash--success {
	background: #e7f6ec;
	color: #1b5e2f;
}

.admin-flash--error {
	background: #fdecea;
	color: #8a1f1f;
}

.admin-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.admin-head h1 {
	margin: 0;
	font-family: var(--serif);
	font-size: 32px;
	color: var(--navy);
}

.admin-head p {
	margin: 6px 0 0;
	color: var(--muted);
}

.admin-subnav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -4px 0 18px;
}

.admin-subnav a {
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--navy);
	border: 1px solid var(--line);
	background: var(--white);
}

.admin-subnav a:hover,
.admin-subnav a.is-active {
	background: var(--navy);
	border-color: var(--navy);
	color: var(--white);
}

.admin-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 10px 28px rgba(7, 24, 45, 0.06);
}

.admin-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.admin-stat {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 18px;
}

.admin-stat strong {
	display: block;
	font-family: var(--serif);
	font-size: 30px;
	color: var(--navy);
	line-height: 1;
}

.admin-stat span {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.admin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 16px;
	border-radius: 4px;
	border: 2px solid transparent;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.btn--red {
	background: var(--red);
	border-color: var(--red);
	color: var(--white);
}

.btn--red:hover { color: var(--white); filter: brightness(0.95); }

.btn--navy {
	background: var(--navy);
	border-color: var(--navy);
	color: var(--white);
}

.btn--navy:hover { color: var(--white); filter: brightness(1.08); }

.btn--outline {
	background: transparent;
	border-color: var(--navy);
	color: var(--navy);
}

.btn--ghost {
	background: transparent;
	border-color: transparent;
	color: var(--red);
	padding-left: 0;
	padding-right: 0;
}

.btn--sm {
	min-height: 32px;
	padding: 0 12px;
	font-size: 12px;
}

table.admin-table {
	width: 100%;
	border-collapse: collapse;
}

.admin-table th,
.admin-table td {
	text-align: left;
	padding: 12px 10px;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
}

.admin-table th {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.admin-table td.actions {
	white-space: nowrap;
	text-align: right;
}

.admin-table img.thumb {
	width: 56px;
	height: 42px;
	object-fit: cover;
	border-radius: 4px;
	background: var(--gray);
}

.badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.badge--yes {
	background: #e7f6ec;
	color: #1b5e2f;
}

.badge--no {
	background: var(--gray);
	color: var(--muted);
}

.badge--cover {
	background: rgba(201, 162, 77, 0.2);
	color: #7a5a16;
	margin-left: 6px;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.form-grid .full {
	grid-column: 1 / -1;
}

.form-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="url"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="datetime-local"],
.form-field input[type="date"],
.form-field input[type="password"],
.form-field input[type="file"],
.form-field select,
.form-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid rgba(11, 35, 65, 0.18);
	border-radius: 4px;
	font: inherit;
	background: var(--white);
}

.form-field textarea {
	min-height: 110px;
	resize: vertical;
}

.form-field .hint,
.hint {
	margin-top: 6px;
	font-size: 13px;
	color: var(--muted);
	font-weight: 400;
}

.setup-hash {
	width: 100%;
	margin-top: 10px;
	padding: 10px;
	font-family: Consolas, monospace;
	font-size: 13px;
}

.form-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 22px;
}

.form-checks label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--ink);
}

.preview {
	margin-top: 10px;
	max-width: 220px;
	border-radius: 6px;
	border: 1px solid var(--line);
}

.login-body {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var(--navy-deep);
}

.login-card {
	width: 100%;
	max-width: 420px;
	background: var(--white);
	border-radius: 8px;
	padding: 28px;
}

.login-card h1 {
	margin: 0 0 8px;
	font-family: var(--serif);
	font-size: 28px;
	color: var(--navy);
}

.login-card p {
	margin: 0 0 18px;
	color: var(--muted);
}

.login-card__links {
	margin: 16px 0 0;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
}

.login-card__links a {
	color: var(--navy);
}

.login-card__links a:hover {
	color: var(--red);
}

.hp-field {
	display: none !important;
}

.empty {
	padding: 24px;
	text-align: center;
	color: var(--muted);
}

.admin-grid--4 {
	grid-template-columns: repeat(4, 1fr);
}

.avatar-preview {
	width: 160px;
	height: 160px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--gray);
}

.avatar-thumb {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 50%;
	background: var(--gray);
	vertical-align: middle;
}

.profile-photo-editor {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.profile-photo-label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
}

.photo-dropzone {
	position: relative;
	width: 100%;
	padding: 14px;
	border: 2px dashed rgba(11, 35, 65, 0.22);
	border-radius: 8px;
	background: var(--cream);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.photo-dropzone:hover,
.photo-dropzone.is-dragover {
	border-color: var(--gold);
	background: #fff8e8;
	box-shadow: inset 0 0 0 1px var(--gold);
}

.photo-dropzone__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.photo-dropzone__copy {
	flex: 1;
	min-width: 200px;
}

.photo-dropzone__title {
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--navy);
}

.photo-dropzone__browse {
	padding: 0;
	border: 0;
	background: none;
	color: var(--red);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.photo-dropzone__browse:hover {
	color: var(--navy);
}

.remove-photo {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	font-weight: 600;
	cursor: default;
}

.user-name-cell {
	display: flex;
	align-items: center;
	gap: 10px;
}

.user-name-cell .hint {
	margin-top: 2px;
}

.admin-search input[type="search"] {
	width: min(100%, 260px);
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid rgba(11, 35, 65, 0.18);
	border-radius: 4px;
	font: inherit;
	background: var(--white);
}

.admin-search input[type="search"]:focus {
	outline: 2px solid var(--gold);
	outline-offset: 1px;
}

.officer-assign-table select {
	width: 100%;
	max-width: 280px;
	padding: 8px 10px;
	border: 1px solid rgba(11, 35, 65, 0.18);
	border-radius: 4px;
	font: inherit;
	background: var(--white);
}

.crop-modal {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(7, 24, 45, 0.72);
}

.crop-modal[hidden] {
	display: none !important;
}

.crop-modal__dialog {
	width: min(720px, 100%);
	background: var(--white);
	border-radius: 8px;
	padding: 20px;
}

.crop-modal__dialog h2 {
	margin: 0;
	font-family: var(--serif);
	color: var(--navy);
}

.crop-modal__stage {
	height: min(60vh, 480px);
	margin: 14px 0;
	background: #111;
}

.crop-modal__stage img {
	display: block;
	max-width: 100%;
}

body.crop-modal-open {
	overflow: hidden;
}

.upload-drop {
	margin-bottom: 16px;
	padding: 22px;
	border: 2px dashed rgba(11, 35, 65, 0.22);
	background: #fbfaf7;
	cursor: pointer;
}

.upload-drop.is-dragover {
	border-color: var(--gold);
	background: rgba(201, 162, 77, 0.12);
}

.upload-drop__copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: center;
}

.upload-drop__copy strong {
	font-size: 17px;
	color: var(--navy);
}

.upload-drop__copy span {
	color: var(--muted);
	font-size: 14px;
}

.upload-drop__status {
	min-height: 1.2em;
	font-weight: 600;
	color: var(--navy) !important;
}

.upload-queue {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-align: left;
}

.upload-queue__item {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 10px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 4px;
	font-size: 13px;
}

.upload-queue__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.upload-queue__state {
	flex-shrink: 0;
	color: var(--muted);
}

.upload-queue__item.is-done .upload-queue__state {
	color: #1b5e2f;
}

.upload-queue__item.is-error .upload-queue__state {
	color: var(--red);
}

@media (max-width: 800px) {
	.admin-grid,
	.admin-grid--4,
	.form-grid {
		grid-template-columns: 1fr;
	}

	.admin-table {
		display: block;
		overflow-x: auto;
	}
}
