/* ═══════════════════════════════════════════════════
   Site Admin — Centralized Stylesheet
   ═══════════════════════════════════════════════════
   Scoped under .inst-admin-page, .inst-edit-page,
   .faq-admin, .meta-editor so nothing leaks to
   reader-facing pages.
   ═══════════════════════════════════════════════════ */

/* ── Page containers ── */
.inst-admin-page {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: system-ui, -apple-system, sans-serif;
}
.inst-edit-page {
	max-width: 860px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: system-ui, -apple-system, sans-serif;
}
.inst-admin-page h2,
.inst-edit-page h2 {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
	color: #333;
}
.inst-admin-page .subtitle,
.inst-edit-page .subtitle {
	color: #666;
	margin-bottom: 1.25rem;
}

/* ── Tab navigation ── */
.inst-tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid #d9d9d9;
	margin-bottom: 1.5rem;
}
.inst-tab {
	padding: 0.6rem 1.25rem;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	color: #666;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}
.inst-tab:hover {
	color: #333;
}
.inst-tab--active {
	color: #044597;
	border-bottom-color: #044597;
	font-weight: 600;
}

/* ── Stat row (inline, not card grid) ── */
.inst-stats {
	display: flex;
	gap: 2rem;
	margin-bottom: 1.5rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid #e5e7eb;
}
.inst-stat-item {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
}
.inst-stat-item .stat-value {
	font-size: 1.25rem;
	font-weight: 700;
	color: #333;
	font-variant-numeric: tabular-nums;
}
.inst-stat-item .stat-label {
	font-size: 0.75rem;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ── Toolbar / search ── */
.inst-toolbar {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	align-items: center;
	flex-wrap: wrap;
}
.inst-toolbar form {
	display: flex;
	gap: 0.5rem;
	flex: 1;
	min-width: 200px;
}
.inst-toolbar input[type="text"] {
	flex: 1;
	padding: 0.5rem 0.75rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.875rem;
}
.inst-toolbar input[type="text"]:focus {
	outline: 2px solid #044597;
	outline-offset: -1px;
	border-color: #044597;
}
.inst-toolbar .inst-result-count {
	font-size: 0.78rem;
	color: #999;
}

/* ── Filters ── */
.inst-filters {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
	align-items: center;
}
.inst-filters label {
	font-size: 0.72rem;
	font-weight: 600;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.inst-filters select,
.inst-analytics-filters select {
	padding: 0.35rem 0.6rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.8rem;
	background: #fff;
	color: #333;
	cursor: pointer;
}
.inst-analytics-filters {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
	align-items: center;
	flex-wrap: wrap;
}
.inst-analytics-filters label {
	font-size: 0.72rem;
	font-weight: 600;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ── Messages ── */
.inst-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 0.6rem 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
	font-size: 0.85rem;
}
.inst-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	padding: 0.6rem 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
	font-size: 0.85rem;
}
.inst-warning {
	padding: 0.6rem 1rem;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 4px;
	color: #92400e;
	font-size: 0.85rem;
	margin-bottom: 1rem;
}

/* ── Tables ── */
.inst-table-wrap {
	overflow-x: auto;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
}
.inst-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}
.inst-table th {
	background: #f8f8f8;
	text-align: left;
	padding: 0.55rem 0.75rem;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #999;
	border-bottom: 1px solid #d9d9d9;
	white-space: nowrap;
	position: sticky;
	top: 0;
	z-index: 1;
}
.inst-table th.sortable {
	cursor: pointer;
	user-select: none;
}
.inst-table th.sortable:hover {
	color: #333;
}
.inst-table th .sort-arrow {
	font-size: 0.65rem;
	margin-left: 0.2rem;
	opacity: 0.3;
}
.inst-table th .sort-arrow--active {
	opacity: 1;
	color: #333;
}
.inst-table td {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid #f1f1f1;
	vertical-align: middle;
	font-size: 0.84rem;
	color: #333;
}
.inst-table tr:last-child td {
	border-bottom: none;
}
.inst-table tr:hover td {
	background: #f8f8f8;
}
.inst-table td.inst-id-cell {
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: #999;
	font-size: 0.78rem;
}
.inst-table .inst-name-cell {
	font-weight: 500;
}
.inst-table .inst-name-local {
	display: block;
	font-size: 0.75rem;
	color: #666;
	font-weight: 400;
	margin-top: 0.1rem;
}
.inst-table .js-path,
.inst-table .pay-path {
	font-family: ui-monospace, SFMono-Regular, monospace;
	font-size: 0.78rem;
	color: #666;
}
.inst-table .js-name,
.inst-table .pay-name {
	font-weight: 500;
}

/* Table inputs */
.inst-table select,
.inst-table input[type="text"],
.inst-table input[type="number"] {
	padding: 0.3rem 0.4rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.8rem;
	font-family: inherit;
	background: #fff;
}
.inst-table select:focus,
.inst-table input[type="text"]:focus,
.inst-table input[type="number"]:focus {
	outline: 2px solid #044597;
	outline-offset: -1px;
	border-color: #044597;
	box-shadow: none;
}
.inst-table input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #044597;
}
.inst-table input.input-url {
	min-width: 160px;
	font-family: ui-monospace, SFMono-Regular, monospace;
	font-size: 0.75rem;
}
.inst-table input.input-number {
	min-width: 60px;
	width: 70px;
	text-align: center;
}

/* Row accent borders for status — subtle left border, no box-shadow */
.inst-table tr.inst-row--trial td:first-child {
	border-left: 3px solid #ca8a04;
}
.inst-table tr.inst-row--inactive td:first-child {
	border-left: 3px solid #999;
}

/* IP cell */
.inst-ip-cell {
	font-size: 0.72rem;
	line-height: 1.5;
}
.inst-ip-cell code {
	background: #f5f5f5;
	padding: 0.1rem 0.3rem;
	border-radius: 2px;
	font-size: 0.68rem;
	white-space: nowrap;
}
.inst-ip-hidden { display: none; }
.inst-ip-toggle {
	display: inline-block;
	padding: 0.08rem 0.4rem;
	border-radius: 2px;
	font-size: 0.65rem;
	font-weight: 600;
	background: #f5f5f5;
	color: #666;
	cursor: pointer;
	margin-left: 0.25rem;
	border: 1px solid #d9d9d9;
	vertical-align: middle;
}
.inst-ip-toggle:hover { background: #eee; }

/* ── Status & badges — plain text, no pills ── */
.inst-status {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: capitalize;
}
.inst-status--active { color: #166534; }
.inst-status--trial { color: #854d0e; }
.inst-status--inactive { color: #999; }

.inst-badge {
	font-size: 0.78rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #333;
}
.inst-badge--zero { color: #999; }

.inst-country {
	font-size: 0.78rem;
	color: #333;
	font-weight: 500;
}
.inst-country--empty {
	color: #999;
	font-style: italic;
	font-weight: 400;
}

/* Indexing link — plain text, no pill */
.badge-yes {
	font-size: 0.78rem;
	font-weight: 500;
	color: #044597;
	text-decoration: underline;
}
.badge-no {
	font-size: 0.78rem;
	font-weight: 500;
	color: #999;
	text-decoration: underline;
}
.badge-yes:hover,
.badge-no:hover { color: #032d64; }

/* OA / Subscription labels */
.badge-oa {
	font-size: 0.72rem;
	font-weight: 600;
	color: #166534;
}
.badge-sub {
	font-size: 0.72rem;
	font-weight: 600;
	color: #044597;
}

/* ── Buttons ── */
.inst-btn {
	padding: 0.4rem 0.85rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.8rem;
	font-weight: 500;
	text-decoration: none;
	display: inline-block;
	line-height: 1.4;
}
.inst-btn-primary {
	background: #044597;
	color: #fff;
}
.inst-btn-primary:hover {
	background: #032d64;
	color: #fff;
}
.inst-btn-edit {
	background: #f5f5f5;
	color: #333;
	border: 1px solid #d9d9d9;
}
.inst-btn-edit:hover { background: #eee; }
.inst-btn-delete {
	background: #fff;
	color: #991b1b;
	border: 1px solid #fecaca;
}
.inst-btn-delete:hover { background: #fef2f2; }
.inst-btn-cancel {
	background: #f5f5f5;
	color: #333;
}
.inst-btn-cancel:hover { background: #eee; }
.inst-btn-export {
	background: #f5f5f5;
	color: #333;
	border: 1px solid #d9d9d9;
}
.inst-btn-export:hover { background: #eee; }
.inst-actions-cell {
	display: flex;
	gap: 0.35rem;
	align-items: center;
}

/* Save bar */
.inst-save-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}
.inst-save-bar .inst-save-btn {
	padding: 0.5rem 1.25rem;
	background: #044597;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}
.inst-save-bar .inst-save-btn:hover { background: #032d64; }

/* ── Pagination ── */
.inst-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}
.inst-pagination a {
	padding: 0.4rem 0.75rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.875rem;
	color: #333;
}
.inst-pagination a.current {
	background: #044597;
	color: #fff;
	border-color: #044597;
	pointer-events: none;
}
.inst-pagination a:hover:not(.current) {
	background: #f5f5f5;
}
.inst-pagination .ellipsis {
	padding: 0.4rem 0.25rem;
	font-size: 0.875rem;
	color: #999;
}
.inst-count {
	text-align: center;
	color: #666;
	font-size: 0.8rem;
	margin-top: 0.5rem;
}

/* ── Form sections ── */
.inst-form-section {
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.25rem;
}
.inst-form-section h3 {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 1rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #eee;
	color: #333;
}
.inst-field { margin-bottom: 1rem; }
.inst-field:last-child { margin-bottom: 0; }
.inst-field label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.3rem;
}
.inst-field input[type="text"],
.inst-field input[type="url"],
.inst-field input[type="email"],
.inst-field input[type="number"],
.inst-field select,
.inst-field textarea {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.875rem;
	font-family: inherit;
	box-sizing: border-box;
	background: #fff;
}
.inst-field input:focus,
.inst-field select:focus,
.inst-field textarea:focus {
	outline: 2px solid #044597;
	outline-offset: -1px;
	border-color: #044597;
	box-shadow: none;
}
.inst-field textarea {
	min-height: 80px;
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, monospace;
	font-size: 0.8rem;
}
.inst-field .help {
	font-size: 0.75rem;
	color: #999;
	margin-top: 0.2rem;
}
.inst-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.inst-field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.inst-form-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.5rem;
	align-items: center;
}

/* Back link */
.inst-back {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.85rem;
	color: #044597;
	text-decoration: none;
	margin-bottom: 1rem;
}
.inst-back:hover { text-decoration: underline; }

/* ── Journal table (edit page) ── */
.inst-journal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}
.inst-journal-table th {
	text-align: left;
	padding: 0.5rem 0.6rem;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #999;
	border-bottom: 1px solid #d9d9d9;
}
.inst-journal-table td {
	padding: 0.45rem 0.6rem;
	border-bottom: 1px solid #f1f1f1;
	vertical-align: middle;
}
.inst-journal-table tr:last-child td { border-bottom: none; }
.inst-journal-table tr:hover td { background: #f8f8f8; }
.inst-journal-table input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #044597;
}
.inst-journal-table input[type="date"] {
	padding: 0.25rem 0.4rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.8rem;
	font-family: inherit;
}
.inst-journal-table .journal-name { font-weight: 500; }

/* Year access panel */
.inst-year-btn {
	padding: 0.15rem 0.5rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 0.75rem;
	color: #333;
}
.inst-year-btn:hover { background: #f5f5f5; }
.inst-year-summary {
	font-size: 0.75rem;
	color: #666;
	margin-right: 0.3rem;
}
.inst-year-summary.has-restriction { color: #991b1b; font-weight: 600; }
.inst-year-panel {
	background: #f8f8f8;
	border-top: 1px solid #d9d9d9;
	padding: 0.75rem 1rem;
}
.inst-year-panel-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 0.75rem;
}
.inst-year-panel-header strong { font-size: 0.8rem; }
.inst-year-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.5rem;
}
.inst-year-grid label {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 0.78rem;
	padding: 0.2rem 0.45rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	cursor: pointer;
	user-select: none;
}
.inst-year-grid label:hover { background: #eee; }
.inst-year-grid input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: #044597; }
.inst-year-grid input[type="checkbox"]:checked + span { font-weight: 600; }
.inst-year-quick {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	color: #666;
	margin-top: 0.25rem;
}
.inst-year-quick input[type="number"] {
	width: 62px;
	padding: 0.15rem 0.3rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.75rem;
	font-family: inherit;
}
.inst-year-quick button {
	padding: 0.15rem 0.5rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 0.72rem;
}
.inst-year-quick button:hover { background: #f5f5f5; }

/* Toggle all buttons */
.inst-toggle-all {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}
.inst-toggle-all button {
	padding: 0.3rem 0.7rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 0.75rem;
	color: #333;
}
.inst-toggle-all button:hover { background: #f5f5f5; }

/* Logo field */
.inst-logo-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.inst-logo-thumb {
	width: 64px;
	height: 36px;
	object-fit: contain;
	border: 1px solid #d9d9d9;
	border-radius: 2px;
	background: #f8f8f8;
}
.inst-logo-none { font-size: 0.8rem; color: #999; font-style: italic; }
.inst-logo-input { font-size: 0.8rem; }
.inst-logo-delete-label {
	font-size: 0.8rem;
	color: #991b1b;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* ── Analytics ── */
.inst-summary {
	display: flex;
	gap: 2rem;
	margin-bottom: 1.5rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid #e5e7eb;
}
.inst-summary-item {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
}
.inst-summary-item .summary-value {
	font-size: 1.25rem;
	font-weight: 700;
	color: #333;
	font-variant-numeric: tabular-nums;
}
.inst-summary-item .summary-label {
	font-size: 0.75rem;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.inst-analytics-section { margin-bottom: 2rem; }
.inst-analytics-section h3 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	color: #333;
}

.inst-rank {
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: #999;
	font-weight: 600;
	font-size: 0.78rem;
}
.inst-metric {
	font-variant-numeric: tabular-nums;
	text-align: right;
	font-weight: 500;
}
.inst-bar-cell { width: 140px; }
.inst-bar {
	height: 6px;
	border-radius: 2px;
	background: #e5e7eb;
	position: relative;
	overflow: hidden;
}
.inst-bar-fill {
	height: 100%;
	border-radius: 2px;
	background: #044597;
}
.inst-country-tag {
	font-size: 0.72rem;
	color: #666;
	font-weight: 500;
}

.inst-journal-group { margin-bottom: 1.25rem; }
.inst-journal-group h4 {
	font-size: 0.85rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.4rem;
	padding-left: 0.5rem;
	border-left: 3px solid #044597;
}

.inst-empty {
	text-align: center;
	color: #999;
	padding: 3rem 1rem;
	font-size: 0.9rem;
}

/* ── Frozen / sticky columns ── */
.inst-table .col-frozen-1,
.inst-table .col-frozen-2 {
	position: sticky;
	z-index: 2;
	background: #fff;
}
.inst-table .col-frozen-1 {
	left: 0;
	min-width: 60px;
	max-width: 60px;
	border-right: 1px solid #d9d9d9;
}
.inst-table .col-frozen-2 {
	left: 60px;
	min-width: 200px;
	border-right: 1px solid #d9d9d9;
}
.inst-table thead .col-frozen-1,
.inst-table thead .col-frozen-2 {
	z-index: 4;
	background: #f8f8f8;
}
.inst-table tr:hover .col-frozen-1,
.inst-table tr:hover .col-frozen-2 {
	background: #f8f8f8;
}

/* Preview box */
.inst-preview {
	margin-top: 0.5rem;
	padding: 0.75rem;
	background: #f8f8f8;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.8rem;
	line-height: 1.6;
	max-height: 150px;
	overflow-y: auto;
}

/* ── Editorial Board (table layout) ── */
.eb-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
	gap: 1rem;
	flex-wrap: wrap;
}
.eb-toolbar select {
	padding: 0.45rem 0.75rem;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 0.85rem;
	background: #fff;
	min-width: 250px;
}
.eb-toolbar select:focus {
	outline: 2px solid #044597;
	outline-offset: -1px;
	border-color: #044597;
	box-shadow: none;
}
.eb-add-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0.5rem 1.1rem;
	background: #044597;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}
.eb-add-btn:hover { background: #032d64; color: #fff; }

.eb-section { margin-bottom: 2rem; }
.eb-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.6rem 0;
	border-bottom: 1px solid #d9d9d9;
	margin-bottom: 0;
}
.eb-section-title { font-size: 1rem; font-weight: 600; color: #333; }
.eb-section-count { font-size: 0.75rem; color: #999; }

.eb-table {
	width: 100%;
	border-collapse: collapse;
}
.eb-table td {
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid #f1f1f1;
	vertical-align: middle;
	font-size: 0.84rem;
}
.eb-table tr:last-child td { border-bottom: none; }
.eb-table tr:hover td { background: #f8f8f8; }
.eb-table__photo {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
	background: #044597;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}
.eb-table__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.eb-table__name {
	font-weight: 600;
	color: #333;
}
.eb-table__name a { color: inherit; text-decoration: none; }
.eb-table__name a:hover { text-decoration: underline; }
.eb-table__affiliation {
	font-size: 0.78rem;
	color: #666;
	line-height: 1.35;
}
.eb-table__email {
	font-size: 0.75rem;
	color: #999;
}
.eb-table__actions {
	display: flex;
	gap: 0.35rem;
	white-space: nowrap;
}
.eb-table__actions a {
	font-size: 0.75rem;
	padding: 3px 10px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 500;
	border: 1px solid #d9d9d9;
	color: #333;
	background: #fff;
}
.eb-table__actions a:hover { background: #f5f5f5; }
.eb-table__actions .eb-delete { color: #991b1b; border-color: #fecaca; }
.eb-table__actions .eb-delete:hover { background: #fef2f2; }

.eb-empty { text-align: center; padding: 3rem; color: #999; font-size: 0.9rem; }

/* Editorial board edit form */
.photo-preview { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 0.5rem; }
.photo-preview img {
	width: 80px;
	height: 80px;
	border-radius: 4px;
	object-fit: cover;
	border: 1px solid #d9d9d9;
}
.photo-preview .photo-placeholder {
	width: 80px;
	height: 80px;
	border-radius: 4px;
	background: #044597;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
}
.photo-remove { font-size: 0.78rem; color: #991b1b; cursor: pointer; background: none; border: none; text-decoration: underline; }
.photo-position { margin-top: 0.5rem; }
.photo-position label { font-size: 0.78rem; color: #333; font-weight: 600; }
.photo-position input[type="range"] { width: 160px; vertical-align: middle; margin-left: 6px; accent-color: #044597; }
.photo-position .pos-label { font-size: 0.7rem; color: #999; margin-left: 6px; }

.role-helper { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.role-helper button {
	padding: 3px 10px;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	background: #fff;
	font-size: 0.75rem;
	cursor: pointer;
	color: #333;
}
.role-helper button:hover { background: #f5f5f5; }

/* Shared editor info box — flat, no icon circle */
.eb-info-box {
	padding: 0.6rem 1rem;
	background: #f8f8f8;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	color: #333;
	font-size: 0.82rem;
	margin-bottom: 1.25rem;
	line-height: 1.5;
}
.eb-info-box strong { font-weight: 600; }

@media (max-width: 768px) {
	.inst-field-row { grid-template-columns: 1fr; }
	.inst-field-row-3 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   FAQ Admin
   ═══════════════════════════════════════════════════ */
.faq-admin {
	max-width: 900px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: system-ui, -apple-system, sans-serif;
}
.faq-admin h2 { font-size: 1.5rem; font-weight: 600; color: #333; margin-bottom: 0.25rem; }
.faq-admin .subtitle { color: #666; font-size: 0.9rem; margin-bottom: 1.5rem; }
.faq-admin .faq-alert {
	padding: 0.6rem 1rem; border-radius: 4px; font-size: 0.85rem; margin-bottom: 1.25rem;
	background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
}
.faq-admin .faq-toolbar {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem;
}
.faq-admin .faq-btn {
	display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem;
	border-radius: 4px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
	border: none; text-decoration: none;
}
.faq-admin .faq-btn-primary { background: #044597; color: #fff; }
.faq-admin .faq-btn-primary:hover { background: #032d64; color: #fff; text-decoration: none; }
.faq-admin .faq-btn-secondary { background: #f5f5f5; color: #333; border: 1px solid #d9d9d9; }
.faq-admin .faq-btn-secondary:hover { background: #eee; color: #333; text-decoration: none; }
.faq-admin .faq-btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
.faq-admin .faq-btn-danger { background: #fff; color: #991b1b; border: 1px solid #fecaca; }
.faq-admin .faq-btn-danger:hover { background: #fef2f2; }
.faq-admin .faq-btn-add { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.faq-admin .faq-btn-add:hover { background: #f5f5f5; }

.faq-admin .faq-section-card {
	background: #fff; border: 1px solid #d9d9d9; border-radius: 4px;
	margin-bottom: 1.25rem; overflow: hidden;
}
.faq-admin .faq-section-header {
	display: flex; align-items: center; gap: 0.75rem;
	padding: 0.75rem 1.25rem; border-bottom: 1px solid #eee; cursor: pointer;
	user-select: none;
}
.faq-admin .faq-section-header:hover { background: #f8f8f8; }
.faq-admin .faq-section-title { font-size: 1rem; font-weight: 600; color: #333; flex: 1; }
.faq-admin .faq-section-count { font-size: 0.75rem; color: #999; font-weight: 500; }
.faq-admin .faq-section-toggle { width: 20px; height: 20px; color: #999; transition: transform 0.2s; }
.faq-admin .faq-section-card.collapsed .faq-section-toggle { transform: rotate(-90deg); }
.faq-admin .faq-section-card.collapsed .faq-section-body { display: none; }

.faq-admin .faq-item-card {
	padding: 1rem 1.25rem; border-bottom: 1px solid #eee;
}
.faq-admin .faq-item-card:last-child { border-bottom: none; }
.faq-admin .faq-item-top {
	display: flex; align-items: start; gap: 0.75rem; margin-bottom: 0.5rem;
}
.faq-admin .faq-item-id {
	font-size: 0.68rem; font-weight: 600; color: #999;
	text-transform: uppercase; letter-spacing: 0.05em;
	background: #f5f5f5; padding: 2px 8px; border-radius: 2px;
	white-space: nowrap; flex-shrink: 0; margin-top: 4px;
}
.faq-admin .faq-item-question-input {
	flex: 1; padding: 0.4rem 0.6rem; border: 1px solid #d9d9d9;
	border-radius: 4px; font-size: 0.88rem; font-weight: 600; color: #333;
	font-family: inherit; background: #fff; box-sizing: border-box;
}
.faq-admin .faq-item-question-input:focus {
	outline: 2px solid #044597; outline-offset: -1px; border-color: #044597; box-shadow: none;
}
.faq-admin .faq-item-remove { flex-shrink: 0; margin-top: 2px; }
.faq-admin .faq-item-status {
	font-size: 0.72rem; font-weight: 600; margin-bottom: 0.5rem;
	display: inline-block;
}
.faq-admin .faq-status-empty { color: #991b1b; }
.faq-admin .faq-status-filled { color: #166534; }
.faq-admin .faq-answer-editor {
	width: 100%; min-height: 100px; padding: 0.75rem; border: 1px solid #d9d9d9;
	border-radius: 4px; font-size: 0.85rem; font-family: inherit;
	line-height: 1.6; resize: vertical; box-sizing: border-box; background: #fff;
}
.faq-admin .faq-answer-editor:focus {
	outline: 2px solid #044597; outline-offset: -1px; border-color: #044597; box-shadow: none;
}
.faq-admin .faq-editor-help { font-size: 0.72rem; color: #999; margin-top: 0.3rem; }
.faq-admin .faq-progress { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: #666; }
.faq-admin .faq-progress-bar { flex: 1; height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; }
.faq-admin .faq-progress-fill { height: 100%; background: #044597; border-radius: 2px; transition: width 0.3s; }
.faq-admin .faq-section-footer {
	padding: 0.75rem 1.25rem; background: #f8f8f8; border-top: 1px solid #eee;
}

/* ═══════════════════════════════════════════════════
   Article Metadata Editor
   ═══════════════════════════════════════════════════ */
.meta-editor {
	max-width: 900px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: system-ui, -apple-system, sans-serif;
}
.meta-editor h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; color: #333; }
.meta-editor .subtitle { color: #666; margin-bottom: 1.5rem; font-size: 0.9rem; }
.meta-section {
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.25rem;
}
.meta-section h3 {
	font-size: 1rem; font-weight: 600; margin: 0 0 1rem 0;
	padding-bottom: 0.5rem; border-bottom: 1px solid #eee; color: #333;
}
.meta-field { margin-bottom: 1rem; }
.meta-field:last-child { margin-bottom: 0; }
.meta-field label { display: block; font-size: 0.8rem; font-weight: 600; color: #333; margin-bottom: 0.3rem; }
.meta-field input[type="text"],
.meta-field input[type="date"],
.meta-field select,
.meta-field textarea {
	width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d9d9d9;
	border-radius: 4px; font-size: 0.875rem; font-family: inherit;
	box-sizing: border-box; background: #fff;
}
.meta-field input:focus, .meta-field select:focus, .meta-field textarea:focus {
	outline: 2px solid #044597; outline-offset: -1px; border-color: #044597; box-shadow: none;
}
.meta-field .help { font-size: 0.75rem; color: #999; margin-top: 0.2rem; }
.meta-filter-row { display: grid; grid-template-columns: 140px 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
@media (max-width: 500px) { .meta-filter-row { grid-template-columns: 1fr; } }
.meta-filter-row select {
	width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d9d9d9;
	border-radius: 4px; font-size: 0.875rem; font-family: inherit; background: #fff;
}
.meta-filter-row select:focus { outline: 2px solid #044597; outline-offset: -1px; border-color: #044597; box-shadow: none; }
.meta-article-list { max-height: 320px; overflow-y: auto; border: 1px solid #d9d9d9; border-radius: 4px; margin-top: 0.5rem; }
.meta-article-item {
	display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.75rem;
	border-bottom: 1px solid #f1f1f1; font-size: 0.82rem; cursor: pointer;
	text-decoration: none; color: inherit;
}
.meta-article-item:hover { background: #f8f8f8; text-decoration: none; color: inherit; }
.meta-article-item:last-child { border-bottom: none; }
.meta-article-id { font-weight: 600; color: #044597; min-width: 55px; font-size: 0.78rem; flex-shrink: 0; }
.meta-article-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-no-results { padding: 1.5rem; text-align: center; color: #999; font-size: 0.85rem; }
.meta-dates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .meta-dates-grid { grid-template-columns: 1fr; } }
.meta-search-input {
	width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d9d9d9;
	border-radius: 4px; font-size: 0.85rem; font-family: inherit;
	box-sizing: border-box; margin-top: 0.5rem;
}
.meta-search-input:focus { outline: 2px solid #044597; outline-offset: -1px; border-color: #044597; box-shadow: none; }
.meta-btn {
	display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem;
	border-radius: 4px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
	border: none; text-decoration: none;
}
.meta-btn-primary { background: #044597; color: #fff; }
.meta-btn-primary:hover { background: #032d64; color: #fff; text-decoration: none; }
.meta-btn-secondary { background: #f5f5f5; color: #333; border: 1px solid #d9d9d9; }
.meta-btn-secondary:hover { background: #eee; text-decoration: none; color: #333; }
.meta-btn-sm { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
.meta-btn-danger { background: #fff; color: #991b1b; border: 1px solid #fecaca; }
.meta-btn-danger:hover { background: #fef2f2; }
.meta-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }
.meta-alert { padding: 0.6rem 1rem; border-radius: 4px; font-size: 0.85rem; margin-bottom: 1.25rem; }
.meta-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.meta-article-banner {
	background: #f8f8f8; border: 1px solid #d9d9d9; border-radius: 4px;
	padding: 0.6rem 1rem; margin-bottom: 1rem; font-size: 0.9rem; color: #333; font-weight: 500;
}

/* Institution pool — numbered prefix instead of circle badge */
.meta-inst-card {
	margin-bottom: 0.75rem; padding: 0.75rem; background: #fff;
	border: 1px solid #d9d9d9; border-radius: 4px; position: relative;
}
.meta-inst-card:last-of-type { margin-bottom: 0; }
.meta-inst-num {
	position: absolute; top: 0.5rem; right: 0.5rem;
	font-size: 0.72rem; font-weight: 700; color: #044597;
}
.meta-inst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (max-width: 600px) { .meta-inst-grid { grid-template-columns: 1fr; } }
.meta-inst-grid .meta-field { margin-bottom: 0; }
.meta-inst-grid .meta-field label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: #999; }
.meta-inst-grid .meta-field input { padding: 0.4rem 0.6rem; font-size: 0.82rem; }
.meta-inst-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* Author assignment */
.meta-author-card {
	margin-bottom: 0.75rem; padding: 0.75rem 1rem; background: #f8f8f8;
	border-radius: 4px; border: 1px solid #d9d9d9;
}
.meta-author-card:last-of-type { margin-bottom: 0; }
.meta-author-name { font-size: 0.88rem; font-weight: 600; color: #333; margin-bottom: 0.5rem; }
.meta-author-checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.meta-author-checks label {
	display: inline-flex; align-items: center; gap: 0.35rem;
	font-size: 0.82rem; color: #333; cursor: pointer;
}
.meta-author-checks input[type="checkbox"] { accent-color: #044597; width: 15px; height: 15px; cursor: pointer; }
.meta-inst-badge {
	font-size: 0.72rem; font-weight: 700; color: #044597; margin-right: 2px;
}
.meta-inst-summary { font-size: 0.78rem; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }

/* Grant support — bordered inline items, not pills */
.meta-grant-tag {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
	background: #fff; border: 1px solid #d9d9d9; border-radius: 4px;
	font-size: 0.82rem; color: #333; margin: 0 6px 6px 0;
}
.meta-grant-tag button {
	background: none; border: none; cursor: pointer; color: #999;
	font-size: 1rem; line-height: 1; padding: 0;
}
.meta-grant-tag button:hover { color: #991b1b; }
.meta-grant-tags { margin-bottom: 0.75rem; min-height: 32px; }
.meta-grant-add-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; }
.meta-grant-add-row select, .meta-grant-add-row input {
	padding: 0.45rem 0.6rem; font-size: 0.82rem; border: 1px solid #d9d9d9;
	border-radius: 4px; font-family: inherit; background: #fff;
}
.meta-grant-add-row select:focus, .meta-grant-add-row input:focus {
	outline: 2px solid #044597; outline-offset: -1px; border-color: #044597; box-shadow: none;
}
.meta-grant-preview {
	margin-top: 0.75rem; padding: 0.6rem 1rem; background: #f8f8f8;
	border: 1px solid #d9d9d9; border-radius: 4px; font-size: 0.82rem;
	color: #666; line-height: 1.6;
}
.meta-grant-preview strong { font-weight: 600; color: #333; }
