/*
 * Reach HR — dashboard UI improvements (issue #4).
 * Scoped to dashboard/My-Account containers so other pages are unaffected.
 * Covers: candidate Job Dashboard (tabs + ctrljm tables), employer job table,
 * and the WooCommerce My Account area (admin/recruiter).
 */

/* ---- Shared layout polish ------------------------------------------------ */
.woocommerce-account .woocommerce,
#job-manager-job-dashboard,
.box-nav-tabs {
	--rh-line: #e7ebf3;
	--rh-ink: #05264e;
	--rh-muted: #66738c;
	--rh-brand: #3c65f5;
}

/* ---- Left navigation (candidate dashboard + woo my-account) -------------- */
.box-nav-tabs.nav-tavs-profile .nav,
.woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.box-nav-tabs.nav-tavs-profile .nav li a,
.woocommerce-MyAccount-navigation ul li a {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 18px !important;
	border: 1px solid #e7ebf3 !important;
	border-radius: 10px !important;
	background: #fff;
	color: #05264e !important;
	font-weight: 600;
	font-size: 15px;
	text-align: left;
	margin: 0 !important;
	transition: all .18s ease;
}

.box-nav-tabs.nav-tavs-profile .nav li a:hover,
.woocommerce-MyAccount-navigation ul li a:hover {
	border-color: #c7d2f0 !important;
	background: #f7f9ff;
	transform: translateX(2px);
}

.box-nav-tabs.nav-tavs-profile .nav li a.active,
.woocommerce-MyAccount-navigation ul li.is-active a {
	background: #3c65f5 !important;
	border-color: #3c65f5 !important;
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(60, 101, 245, .25);
}

.box-nav-tabs.nav-tavs-profile .nav li a.text-danger {
	color: #b32d2e !important;
}
.box-nav-tabs.nav-tavs-profile .nav li a.text-danger:hover {
	background: #fdecea;
	border-color: #f5c6c0 !important;
}

/* ---- Dashboard content card --------------------------------------------- */
.woocommerce-MyAccount-content,
.tab-content#ctrljm-tabContent {
	background: #fff;
	border: 1px solid #e7ebf3;
	border-radius: 14px;
	padding: 28px 30px;
	box-shadow: 0 6px 24px rgba(16, 33, 86, .04);
}

.woocommerce-MyAccount-content p:first-child {
	margin-top: 0;
}

/* ---- Tables: employer jobs, candidate data tables, woo orders ------------ */
.job-manager-jobs,
table.ctrljm-data-table,
.woocommerce-MyAccount-content table.shop_table,
.woocommerce-orders-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #e7ebf3;
	border-radius: 12px;
	overflow: hidden;
	margin: 0 0 20px;
	background: #fff;
}

.job-manager-jobs thead th,
table.ctrljm-data-table thead th,
.woocommerce-MyAccount-content table.shop_table thead th,
.woocommerce-orders-table thead th {
	background: #f7f9ff;
	color: #66738c;
	font-size: 13px;
	letter-spacing: .03em;
	text-transform: uppercase;
	font-weight: 600;
	padding: 14px 16px;
	border-bottom: 1px solid #e7ebf3;
	text-align: left;
}

.job-manager-jobs td,
table.ctrljm-data-table td,
table.ctrljm-data-table th[scope="row"],
.woocommerce-MyAccount-content table.shop_table td,
.woocommerce-orders-table td {
	padding: 14px 16px;
	border-bottom: 1px solid #eef1f7;
	vertical-align: middle;
	color: #05264e;
}

table.ctrljm-data-table tbody tr:hover,
.job-manager-jobs tbody tr:hover {
	background: #fafbff;
}

table.ctrljm-data-table img.rounded-circle {
	border: 2px solid #eef1f7;
}

.job-manager-jobs tfoot td {
	background: #f7f9ff;
	padding: 16px;
}

/* Action links inside tables */
.job-dashboard-actions,
.ctrljm-data-table .list-inline {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}
.job-dashboard-actions a,
.ctrljm-data-table .list-inline a {
	font-size: 13px;
	color: #3c65f5;
	text-decoration: none;
}
.job-dashboard-actions a:hover { text-decoration: underline; }

/* ---- Dashboard buttons row (Job Dashboard / Post a Job) ------------------ */
.woocommerce-MyAccount-content .btn-default {
	display: inline-block;
	background: #3c65f5;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 22px;
	font-weight: 600;
	text-decoration: none;
}
.woocommerce-MyAccount-content .btn-default:hover { background: #2348d6; color: #fff; }

/* ---- Welcome text for candidates ---------------------------------------- */
.tab-content#ctrljm-tabContent #tab-jobs-dashboard {
	font-size: 15px;
	line-height: 1.7;
	color: #4f5e74;
}

/* ---- My Trainings tab: table + status badge (issue #3 visibility) -------- */
.tab-content#ctrljm-tabContent .reach-hr-mytrainings-table { width: 100%; border-collapse: collapse; border: 1px solid #e7ebf3; border-radius: 12px; overflow: hidden; }
.tab-content#ctrljm-tabContent .reach-hr-mytrainings-table th,
.tab-content#ctrljm-tabContent .reach-hr-mytrainings-table td { padding: 14px 16px; border-bottom: 1px solid #eef1f7; text-align: left; vertical-align: middle; }
.tab-content#ctrljm-tabContent .reach-hr-mytrainings-table thead th { background: #f7f9ff; color: #66738c; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }

/* Status badge — defined here too so it is always styled on the dashboard,
   regardless of whether the Trainings plugin stylesheet loaded. */
.reach-hr-status {
	display: inline-block; padding: 3px 12px; border-radius: 999px;
	font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.reach-hr-status-new       { background: #e9eefb; color: #2348d6; }
.reach-hr-status-contacted { background: #fff4e0; color: #9a6700; }
.reach-hr-status-enrolled  { background: #e8f6ee; color: #186a3b; }
.reach-hr-status-closed    { background: #f0f1f4; color: #66738c; }

/* ---- Candidate dashboard home (graphical revamp, issue #5) --------------- */
.rh-candidate-home { padding: 4px 0; }
.rh-home-greeting { font-size: 24px; color: #05264e; margin: 0 0 6px; }
.rh-home-sub { color: #66738c; margin: 0 0 24px; font-size: 15px; }

.rh-home-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 18px;
	margin-bottom: 26px;
}
.rh-home-card {
	display: flex; flex-direction: column; gap: 4px;
	padding: 22px;
	border-radius: 14px;
	text-decoration: none;
	color: #fff;
	background: linear-gradient(135deg, #3c65f5, #5b7cff);
	box-shadow: 0 10px 24px rgba(60, 101, 245, .18);
	transition: transform .18s ease, box-shadow .18s ease;
}
.rh-home-card:nth-child(2) { background: linear-gradient(135deg, #11b886, #1fd39b); box-shadow: 0 10px 24px rgba(17, 184, 134, .18); }
.rh-home-card:nth-child(3) { background: linear-gradient(135deg, #f5862e, #ffa459); box-shadow: 0 10px 24px rgba(245, 134, 46, .18); }
.rh-home-card:hover { transform: translateY(-3px); color: #fff; }
.rh-home-card-icon { font-size: 26px; }
.rh-home-card-value { font-size: 30px; font-weight: 700; line-height: 1.1; }
.rh-home-card-label { font-size: 14px; opacity: .92; }

.rh-home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rh-home-btn {
	display: inline-block; background: #3c65f5; color: #fff !important;
	border: none; border-radius: 8px; padding: 11px 22px; font-weight: 600;
	font-size: 15px; text-decoration: none; cursor: pointer;
}
.rh-home-btn:hover { background: #2348d6; color: #fff; }
.rh-home-btn-light { background: #eef2fe; color: #2348d6 !important; }
.rh-home-btn-light:hover { background: #e0e8ff; }
.rh-home-btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---- Profile banner with cover + avatar + photo editor ------------------- */
.rh-profile-banner { margin-bottom: 10px; }
.rh-cover {
	position: relative;
	height: 220px;
	border-radius: 16px;
	background: linear-gradient(135deg, #dbe4ff, #eef2fe);
	background-size: cover;
	background-position: center;
}
.rh-edit-toggle {
	position: absolute; top: 14px; right: 14px;
	background: rgba(255, 255, 255, .92); color: #05264e;
	border: none; border-radius: 8px; padding: 8px 14px;
	font-weight: 600; font-size: 13px; cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.rh-edit-toggle:hover { background: #fff; }
.rh-profile-head { display: flex; align-items: flex-end; gap: 18px; margin: -48px 0 0 28px; position: relative; }
.rh-avatar {
	width: 110px; height: 110px; border-radius: 50%; overflow: hidden;
	border: 4px solid #fff; box-shadow: 0 6px 18px rgba(16, 33, 86, .15);
	background: #fff; flex: 0 0 auto;
}
.rh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rh-profile-meta { padding-bottom: 8px; }
.rh-profile-name { margin: 0; font-size: 20px; color: #05264e; }
.rh-profile-desc { margin: 2px 0 0; color: #66738c; font-size: 14px; }

.rh-pic-notice { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.rh-pic-ok { background: #e8f6ee; color: #186a3b; border: 1px solid #bfe3cd; }
.rh-pic-err { background: #fdecea; color: #922; border: 1px solid #f5c6c0; }

.rh-photo-editor { margin-top: 18px; background: #f7f9ff; border: 1px solid #e7ebf3; border-radius: 12px; padding: 20px; }
.rh-photo-editor[hidden] { display: none; }
.rh-photo-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rh-upload-form { display: flex; flex-direction: column; gap: 8px; }
.rh-upload-label { font-weight: 600; color: #05264e; font-size: 14px; }
.rh-upload-form input[type="file"] { font-size: 13px; }
@media (max-width: 600px) { .rh-photo-editor-grid { grid-template-columns: 1fr; } }

/* Account Details: picture controls (moved here from the banner) */
.rh-account-pictures { margin-top: 30px; padding-top: 24px; border-top: 1px solid #e7ebf3; }
.rh-account-pictures h3 { color: #05264e; margin: 0 0 16px; }
.rh-account-pic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rh-account-pic-grid .rh-upload-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.rh-pic-preview-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(16,33,86,.12); }
.rh-pic-preview-cover { display: block; width: 100%; height: 110px; border-radius: 10px; background: linear-gradient(135deg, #dbe4ff, #eef2fe); background-size: cover; background-position: center; }
@media (max-width: 600px) { .rh-account-pic-grid { grid-template-columns: 1fr; } }

/* ---- Responsive tables --------------------------------------------------- */
.table-responsive { width: 100%; overflow-x: auto; }

@media (max-width: 991px) {
	.woocommerce-MyAccount-content,
	.tab-content#ctrljm-tabContent { padding: 20px; }
}
