/* Reach HR Admin Panel — front-end control panel styles. Self-contained. */

.rha-wrap {
	--rha-ink: #05264e;
	--rha-muted: #66738c;
	--rha-line: #e7ebf3;
	--rha-brand: #3c65f5;
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 28px;
	align-items: start;
	margin: 24px 0 40px;
	color: var(--rha-ink);
}

/* Sidebar */
.rha-sidebar {
	background: #fff;
	border: 1px solid var(--rha-line);
	border-radius: 14px;
	padding: 18px;
	position: sticky;
	top: 20px;
}
.rha-brand {
	font-weight: 700;
	font-size: 16px;
	color: var(--rha-ink);
	padding: 6px 10px 14px;
	border-bottom: 1px solid var(--rha-line);
	margin-bottom: 12px;
}
.rha-nav { display: flex; flex-direction: column; gap: 6px; }
.rha-nav-item {
	display: block;
	padding: 11px 14px;
	border-radius: 9px;
	color: var(--rha-ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	transition: all .15s ease;
}
.rha-nav-item:hover { background: #f4f7ff; color: var(--rha-brand); }
.rha-nav-item.active { background: var(--rha-brand); color: #fff; }
.rha-nav-logout { color: #b32d2e; margin-top: 8px; border-top: 1px solid var(--rha-line); border-radius: 0 0 9px 9px; }
.rha-nav-logout:hover { background: #fdecea; color: #b32d2e; }

/* Main */
.rha-main { min-width: 0; }
.rha-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}
.rha-header h1 { margin: 0; font-size: 26px; color: var(--rha-ink); }
.rha-userbox { color: var(--rha-muted); font-size: 14px; }

/* Notices */
.rha-notice { padding: 12px 16px; border-radius: 9px; margin-bottom: 18px; font-size: 14px; }
.rha-notice-ok { background: #e8f6ee; color: #186a3b; border: 1px solid #bfe3cd; }
.rha-notice-err { background: #fdecea; color: #922; border: 1px solid #f5c6c0; }

/* Cards */
.rha-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}
.rha-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--rha-line);
	border-radius: 14px;
	text-decoration: none;
	transition: box-shadow .18s ease, transform .18s ease;
}
.rha-card:hover { box-shadow: 0 12px 28px rgba(16, 33, 86, .08); transform: translateY(-2px); }
.rha-card-value { font-size: 30px; font-weight: 700; color: var(--rha-ink); line-height: 1.1; }
.rha-card-label { font-size: 14px; color: var(--rha-muted); }

/* Panels */
.rha-panel {
	background: #fff;
	border: 1px solid var(--rha-line);
	border-radius: 14px;
	padding: 22px 24px;
	margin-bottom: 20px;
	overflow-x: auto;
}
.rha-panel h3 { margin-top: 0; color: var(--rha-ink); }

/* Tables */
.rha-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rha-table th, .rha-table td { padding: 12px 14px; border-bottom: 1px solid #eef1f7; text-align: left; vertical-align: middle; }
.rha-table thead th { background: #f7f9ff; color: var(--rha-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.rha-table tbody tr:hover { background: #fafbff; }
.rha-table a { color: var(--rha-brand); text-decoration: none; }
.rha-table a:hover { text-decoration: underline; }

/* Buttons / links */
.rha-btn {
	display: inline-block;
	background: var(--rha-brand);
	color: #fff !important;
	border: none;
	border-radius: 8px;
	padding: 9px 16px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.3;
}
.rha-btn:hover { background: #2348d6; }
.rha-btn-sm { padding: 6px 12px; font-size: 13px; }
.rha-btn-light { background: #eef2fe; color: var(--rha-brand) !important; }
.rha-btn-light:hover { background: #e0e8ff; }
.rha-link { background: none; border: none; color: var(--rha-brand); cursor: pointer; font-size: 14px; padding: 0; text-decoration: none; }
.rha-link:hover { text-decoration: underline; }
.rha-link-danger { color: #b32d2e; }

/* Inline action forms */
.rha-actionbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rha-actionbar-top { margin-bottom: 14px; }
.rha-inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.rha-inline-form select { padding: 6px 8px; border: 1px solid #d7deee; border-radius: 7px; font-size: 13px; max-width: 170px; }

/* Search */
.rha-search { display: flex; gap: 8px; margin-bottom: 16px; }
.rha-search input[type="text"] { flex: 1; max-width: 320px; padding: 8px 12px; border: 1px solid #d7deee; border-radius: 8px; }

/* Pagination */
.rha-pagination { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.rha-page-info { color: var(--rha-muted); font-size: 14px; }

/* Status badges */
.rha-status {
	display: inline-block; padding: 3px 11px; border-radius: 999px;
	font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
	background: #eef2fe; color: #2348d6; text-transform: capitalize;
}
.rha-status-completed, .rha-status-publish, .rha-status-enrolled { background: #e8f6ee; color: #186a3b; }
.rha-status-processing, .rha-status-pending, .rha-status-contacted { background: #fff4e0; color: #9a6700; }
.rha-status-on-hold, .rha-status-draft, .rha-status-new { background: #eef2fe; color: #2348d6; }
.rha-status-cancelled, .rha-status-failed, .rha-status-refunded, .rha-status-trash, .rha-status-expired, .rha-status-closed, .rha-status-rejected { background: #fdecea; color: #922; }
/* Job-application stages */
.rha-status-interviewed { background: #fff4e0; color: #9a6700; }
.rha-status-offer { background: #ede7fb; color: #5a32b0; }
.rha-status-hired { background: #e8f6ee; color: #186a3b; }

/* Rich editor field (blog body) */
.rha-f-editor > span { font-weight: 600; font-size: 14px; color: var(--rha-ink); display: block; margin-bottom: 6px; }
.rha-f-editor .wp-editor-wrap { width: 100%; }
/* Undo the global full-width input rule inside the editor (its Text-tab toolbar
   uses <input type="button">; only the editor's own textarea should be 100%). */
.rha-form .rha-f-editor input { width: auto !important; display: inline-block !important; }
.rha-form .rha-f-editor textarea { width: 100% !important; display: block !important; }

.rha-denied { padding: 40px; text-align: center; color: var(--rha-muted); }

/* Forms (add/edit) — grouped hierarchy, full width */
.rha-form { display: flex; flex-direction: column; gap: 22px; max-width: 100%; width: 100%; }
.rha-fieldset {
	border: 1px solid #e7ebf3;
	border-radius: 12px;
	padding: 20px 22px 22px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: #fcfdff;
}
.rha-fieldset > h4 {
	margin: 0 0 4px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #3c65f5;
	font-weight: 700;
	padding-bottom: 10px;
	border-bottom: 1px solid #eef1f7;
}
.rha-form-actions { padding-top: 4px; }
.rha-f-check { flex-direction: row; align-items: center; gap: 10px; }
.rha-f-check > span { font-weight: 500; }
.rha-hint { font-size: 13px; color: #66738c; margin: 0; }
.rha-thumb { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #e7ebf3; margin-bottom: 8px; }
.rha-thumb-wide { width: 140px; height: 72px; }
.rha-f { display: flex; flex-direction: column; gap: 6px; }
.rha-f > span { font-weight: 600; font-size: 14px; color: var(--rha-ink); }
.rha-f input[type="text"],
.rha-f input[type="email"],
.rha-f input[type="url"],
.rha-f input[type="number"],
.rha-f input[type="date"],
.rha-f input[type="time"],
.rha-f input[type="password"],
.rha-f select,
.rha-f textarea {
	width: 100%;
	border: 1px solid #d7deee;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 15px;
	background: #fff;
}
.rha-f input:focus, .rha-f select:focus, .rha-f textarea:focus { outline: none; border-color: var(--rha-brand); }
.rha-fieldset, .rha-form, .rha-f-grid, .rha-f-row, .rha-f { width: 100%; box-sizing: border-box; }
.rha-f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rha-f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.rha-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Force full-width inputs even when the active theme styles form controls
   with a fixed/auto width or float (the panel renders on the front end). */
.rha-form .rha-f input,
.rha-form .rha-f select,
.rha-form .rha-f textarea {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	display: block !important;
	float: none !important;
	margin: 0 !important;
}
@media (max-width: 560px) { .rha-f-row { grid-template-columns: 1fr; } }

/* Gallery editor (training form) */
.rha-gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 8px; }
.rha-gallery-edit-item { display: flex; flex-direction: column; gap: 6px; }
.rha-gallery-edit-item img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid #e7ebf3; }
.rha-gallery-remove { font-size: 12px; color: #b32d2e; display: flex; align-items: center; gap: 5px; }

/* Responsive */
@media (max-width: 860px) {
	.rha-wrap { grid-template-columns: 1fr; }
	.rha-sidebar { position: static; }
	.rha-nav { flex-direction: row; flex-wrap: wrap; }
	.rha-nav-item { flex: 1 1 auto; text-align: center; }
	.rha-nav-logout { border-top: none; }
}
