/* AAA Turnover Study dashboard */

.turnover-wrap {
	max-width: 1200px;
	margin: 0 auto;
	color: #2d3748;
}

/* Header */
.turnover-header { text-align: center; margin-bottom: 1.4em; }
.turnover-header h2 { font-size: 1.7em; color: #194077; margin: 0 0 0.25em; }
.turnover-subtitle { font-size: 0.9em; color: #718096; margin: 0; }
.turnover-yearbar { margin-top: 0.8em; font-size: 0.85em; }

/* Access gate */
.turnover-gate {
	max-width: 560px; margin: 2em auto; padding: 2em;
	text-align: center; background: #f7fafc;
	border: 1px solid #e2e8f0; border-radius: 10px;
}
.turnover-gate h3 { color: #194077; margin-top: 0; }
.turnover-btn {
	display: inline-block; padding: 0.6em 1.6em; background: #194077; color: #fff !important;
	border-radius: 6px; text-decoration: none; font-weight: 600;
}
.turnover-btn:hover { background: #0f2d54; }
.turnover-empty { text-align: center; color: #718096; padding: 2em; }

/* KPI band */
.turnover-kpis {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; margin-bottom: 1.6em;
}
.turnover-kpi {
	background: #194077; color: #fff; border-radius: 10px; padding: 1.1em 1em; text-align: center;
}
.turnover-kpi-alert { background: #c62828; }
.turnover-kpi-value { display: block; font-size: 1.8em; font-weight: 700; line-height: 1.15; }
.turnover-kpi-label { display: block; font-size: 0.76em; opacity: 0.9; margin-top: 0.35em; }
.turnover-filter-note {
	text-align: center; font-size: 0.85em; color: #7b341e; background: #fffaf0;
	border: 1px solid #fbd38d; border-radius: 6px; padding: 0.5em; margin: -0.8em 0 1.4em;
}

/* Filter bar */
.turnover-filters {
	display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em;
	padding: 0.7em 1em; margin-bottom: 1.4em;
	background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.turnover-filters-label { font-size: 0.82em; font-weight: 600; color: #4a5568; }
.turnover-filter { position: relative; }
.turnover-filter > summary {
	display: inline-flex; align-items: center; gap: 0.3em; cursor: pointer;
	padding: 0.35em 0.8em; font-size: 0.82em; background: #fff;
	border: 1px solid #cbd5e0; border-radius: 16px; list-style: none; user-select: none;
}
.turnover-filter > summary::-webkit-details-marker { display: none; }
.turnover-filter > summary::after { content: '▾'; font-size: 0.7em; opacity: 0.6; }
.turnover-filter-active > summary { background: #194077; color: #fff; border-color: #194077; }
.turnover-filter-options {
	position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
	min-width: 240px; max-height: 320px; overflow-y: auto; padding: 0.5em;
	background: #fff; border: 1px solid #cbd5e0; border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.turnover-filter-options label {
	display: block; font-size: 0.82em; padding: 0.3em 0.4em; border-radius: 4px; cursor: pointer;
}
.turnover-filter-options label:hover { background: #edf2f7; }
.turnover-filter-clear {
	font-size: 0.8em; padding: 0.3em 0.9em; background: #fff;
	border: 1px solid #cbd5e0; border-radius: 16px; cursor: pointer;
}
.turnover-filter-status { font-size: 0.8em; color: #718096; }

/* Sections and cards */
.turnover-section { margin-bottom: 2.2em; }
.turnover-section > h3 {
	font-size: 1.15em; color: #194077; border-bottom: 2px solid #e2e8f0;
	padding-bottom: 0.35em; margin-bottom: 0.9em;
}
.turnover-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2em; align-items: start; }
.turnover-card {
	background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
	padding: 1em; box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.turnover-card-wide { grid-column: 1 / -1; }
.turnover-card h4 {
	font-size: 0.85em; text-align: center; color: #2d3748; margin: 0 0 0.7em; font-weight: 600;
}
.turnover-chart-wrap { position: relative; }
.turnover-note { font-size: 0.8em; color: #718096; margin-top: 0.7em; }

/* Callout */
.turnover-card-callout {
	display: flex; flex-direction: column; justify-content: center; text-align: center;
	background: #fff5f5; border-color: #feb2b2;
}
.turnover-callout-value { font-size: 3em; font-weight: 700; color: #c62828; line-height: 1; }
.turnover-card-callout p { font-size: 0.9em; margin: 0.6em 0 0; }

/* Tables */
.turnover-table { width: 100%; border-collapse: collapse; font-size: 0.87em; margin-top: 1em; }
.turnover-table th, .turnover-table td {
	padding: 0.5em 0.7em; border-bottom: 1px solid #e2e8f0; text-align: right;
}
.turnover-table thead th { background: #f7fafc; color: #4a5568; font-size: 0.9em; }
.turnover-table th:first-child, .turnover-table td:first-child { text-align: left; }
.turnover-table-plain th { text-align: left; font-weight: 600; }
.turnover-occ-name { font-weight: 600; }
.turnover-n { color: #a0aec0; font-size: 0.9em; }
.turnover-delta { font-size: 0.8em; font-weight: 600; }
.turnover-delta-down { color: #2e7d32; }
.turnover-delta-up { color: #c62828; }

/* Tabs */
.turnover-tabs { display: flex; flex-wrap: wrap; gap: 0.35em; margin-bottom: 1em; }
.turnover-tab {
	padding: 0.45em 1em; font-size: 0.82em; cursor: pointer;
	background: #fff; border: 1px solid #cbd5e0; border-radius: 16px; color: #2d3748;
}
.turnover-tab:hover { border-color: #194077; }
.turnover-tab-active { background: #194077; color: #fff; border-color: #194077; }
.turnover-panel-hidden { display: none; }

/* Occupation summary stats */
.turnover-occ-summary {
	display: flex; flex-wrap: wrap; gap: 0.8em; margin-bottom: 1.2em;
}
.turnover-stat {
	flex: 1; min-width: 130px; text-align: center; padding: 0.8em 0.6em;
	background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.turnover-stat-value { display: block; font-size: 1.5em; font-weight: 700; color: #194077; }
.turnover-stat-muted .turnover-stat-value { color: #718096; font-size: 1.25em; }
.turnover-stat-label { display: block; font-size: 0.74em; color: #718096; margin-top: 0.25em; }

@media (max-width: 900px) {
	.turnover-kpis { grid-template-columns: repeat(2, 1fr); }
	.turnover-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.turnover-kpis { grid-template-columns: 1fr; }
}
