/* v20260401 */
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 0;
	background: #f6f7fb;
	color: #1d1f23;
	display: flex;
	height: 100vh;
}
.sidebar {
	width: 240px;
	background: #1f2937;
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 20px 0;
}
.sidebar .brand {
	padding: 0 20px 20px;
	font-size: 20px;
	font-weight: bold;
	border-bottom: 1px solid #374151;
	margin-bottom: 20px;
}
.sidebar nav {
	display: flex;
	flex-direction: column;
}
.sidebar nav a {
	color: #d1d5db;
	padding: 12px 20px;
	text-decoration: none;
	font-size: 15px;
	transition: background 0.2s;
}
.sidebar nav a:hover {
	background: #374151;
	color: #fff;
}
.sidebar nav a.active {
	background: #2563eb;
	color: #fff;
}
.main-content {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
}
header {
	background: #fff;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 24px;
}
header .title {
	font-size: 18px;
	font-weight: 600;
}
.container {
	max-width: 1200px;
	margin: 0 auto;
}
.card {
	background: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	margin-bottom: 20px;
}
button {
	background: #2563eb;
	color: #fff;
	border: none;
	padding: 8px 14px;
	border-radius: 6px;
	cursor: pointer;
}
input, select, textarea {
	padding: 8px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	width: 100%;
	box-sizing: border-box;
	margin-top: 6px;
}
table {
	width: 100%;
	border-collapse: collapse;
}
th, td {
	padding: 10px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
	font-size: 14px;
}
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
.muted {
	color: #6b7280;
	font-size: 13px;
}
.flex {
	display: flex;
	gap: 12px;
	align-items: center;
}
.right {
	text-align: right;
}
.login-box {
	max-width: 360px;
	margin: 80px auto;
	background: #fff;
	padding: 24px;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

/* Modal */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-container {
  background: #fff;
  width: 600px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.close-btn:hover {
  color: #111827;
}
.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}
.stats-group {
  margin-bottom: 12px;
}
.stats-group:last-child {
  margin-bottom: 0;
}
.stats-group-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  padding-left: 8px;
  border-left: 4px solid #2563eb;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stats-item {
  display: flex;
  flex-direction: column;
  background: #f9fafb;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
}
.stats-item label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}
.stats-item span {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.stats-grid-compact {
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.stats-grid-compact .stats-item {
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 4px;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.stats-grid-compact .stats-item label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 0;
}

.stats-grid-compact .stats-item span {
  font-size: 13px;
  font-weight: 700;
}

.stats-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}

.stats-metrics-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  flex: 1;
}

.metric-checkbox {
  display: flex;
  align-items: center;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s;
  white-space: nowrap;
}

.metric-checkbox:hover {
  background: #f3f4f6;
}

.metric-checkbox input {
  margin: 0 8px 0 0;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.metric-checkbox span {
  font-weight: 500;
}

.stats-range-control {
  width: 180px;
  margin-left: 30px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  padding: 0 4px;
}

#stats-range-slider {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  outline: none;
  margin: 0;
}
