/* Server Activity page (.act-page on f_com_activity.cfm) */

.act-page {
	--act-bg:       rgba(0, 0, 0, 0.0);
	--act-card-bg:  rgba(2, 12, 28, 0.85);
	--act-border:   rgba(255, 255, 255, 0.1);
	--act-accent:   #3a9fd8;
	--act-gold:     #f4b942;
	--act-gold-border: rgba(244, 185, 66, 0.35);
	--act-text:     rgba(255, 255, 255, 0.88);
	--act-muted:    rgba(255, 255, 255, 0.5);
	--act-line:     rgba(255, 255, 255, 0.08);
	--act-hover:    rgba(255, 255, 255, 0.04);
	--act-active-bg:   rgba(58, 159, 216, 0.18);
	--act-active-text: #fff;

	/* Chart.js colors — read out of here by the page script via
	   getComputedStyle, so canvas drawing follows the active theme. */
	--act-grid:         rgba(255, 255, 255, 0.06);
	--act-tick:         #7a9ab8;
	--act-legend:       #c8d8e8;
	--act-tooltip-bg:     rgba(2, 12, 28, 0.95);
	--act-tooltip-title:  #b8d8f8;
	--act-tooltip-body:   #c8d8e8;
	--act-tooltip-border: #1a3a5c;
	--act-series-a:      #3a9fd8;
	--act-series-a-fill: rgba(58, 159, 216, 0.15);
	--act-series-b:      #4ecdc4;
	--act-series-c:      #f4b942;
	--act-series-c-fill: rgba(244, 185, 66, 0.15);

	box-sizing: border-box;
	width: 100%;
	padding: 0.75rem 0.5rem 2.5rem;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 0.95rem;
	color: var(--act-text);
}

.act-page *, .act-page *::before, .act-page *::after {
	box-sizing: inherit;
}

/* Daylight (light mode) — re-point the palette at the theme tokens.
   Series colors are darkened so lines stay readable on a white card. */
body[data-theme="daylight"] .act-page {
	--act-card-bg:  var(--bg-surface, #ffffff);
	--act-border:   var(--border, #d4d0c7);
	--act-accent:   var(--accent, #1e3a8a);
	--act-gold:     var(--accent-gold, #a16207);
	--act-gold-border: rgba(161, 98, 7, 0.4);
	--act-text:     var(--text-primary, #1a1f2e);
	--act-muted:    var(--text-secondary, #4a5068);
	--act-line:     rgba(26, 31, 46, 0.12);
	--act-hover:    rgba(26, 31, 46, 0.05);
	--act-active-bg:   rgba(30, 58, 138, 0.12);
	--act-active-text: #1e3a8a;

	--act-grid:         rgba(26, 31, 46, 0.10);
	--act-tick:         #4a5068;
	--act-legend:       #1a1f2e;
	--act-tooltip-bg:     rgba(255, 255, 255, 0.97);
	--act-tooltip-title:  #1a1f2e;
	--act-tooltip-body:   #4a5068;
	--act-tooltip-border: #d4d0c7;
	--act-series-a:      #1b6ea8;
	--act-series-a-fill: rgba(27, 110, 168, 0.15);
	--act-series-b:      #0f766e;
	--act-series-c:      #a16207;
	--act-series-c-fill: rgba(161, 98, 7, 0.18);
}

/* ---- Header ---- */
.act-header {
	text-align: center;
	margin-bottom: 1.25rem;
}

.act-title {
	margin: 0 0 0.25rem;
	font-size: 1.85rem;
	font-weight: 700;
	color: var(--act-accent);
	letter-spacing: 0.03em;
}

.act-subtitle {
	margin: 0;
	color: var(--act-muted);
	font-size: 0.88rem;
}

/* ---- Records strip ---- */
.act-records {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-bottom: 1.25rem;
}

.act-record-card {
	background: var(--act-card-bg);
	border: 1px solid var(--act-gold-border);
	border-radius: 6px;
	padding: 0.7rem 1.25rem;
	text-align: center;
	min-width: 180px;
}

.act-record-label {
	display: block;
	font-size: 0.75rem;
	color: var(--act-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 0.3rem;
}

.act-record-value {
	display: block;
	font-size: 2rem;
	font-weight: 700;
	color: var(--act-gold);
	line-height: 1.1;
}

.act-record-date {
	display: block;
	font-size: 0.78rem;
	color: var(--act-muted);
	margin-top: 0.25rem;
}

/* ---- Range picker ---- */
.act-range-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 1.1rem;
}

.act-range-label {
	color: var(--act-muted);
	font-size: 0.85rem;
}

.act-range-btn {
	display: inline-block;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--act-border);
	border-radius: 4px;
	background: var(--act-card-bg);
	color: var(--act-muted);
	text-decoration: none;
	font-size: 0.82rem;
	transition: border-color 0.15s, color 0.15s;
}

.act-range-btn:hover {
	border-color: var(--act-accent);
	color: var(--act-accent);
	text-decoration: none;
}

.act-range-btn.active {
	border-color: var(--act-accent);
	background: var(--act-active-bg);
	color: var(--act-active-text);
}

/* ---- Charts ---- */
.act-charts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

@media (max-width: 700px) {
	.act-charts { grid-template-columns: 1fr; }
}

.act-chart-card {
	background: var(--act-card-bg);
	border: 1px solid var(--act-border);
	border-radius: 6px;
	padding: 1rem 1rem 0.75rem;
}

.act-chart-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--act-accent);
	margin-bottom: 0.75rem;
	letter-spacing: 0.02em;
}

.act-canvas {
	display: block;
	width: 100% !important;
	height: 220px !important;
}

/* ---- Top 10 tables ---- */
.act-tables {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

@media (max-width: 700px) {
	.act-tables { grid-template-columns: 1fr; }
}

.act-table-card {
	background: var(--act-card-bg);
	border: 1px solid var(--act-border);
	border-radius: 6px;
	padding: 0.9rem 1rem;
}

.act-table-title {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--act-accent);
	margin-bottom: 0.65rem;
	letter-spacing: 0.02em;
}

.act-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.act-table th {
	text-align: left;
	padding: 0.35rem 0.5rem;
	border-bottom: 1px solid var(--act-line);
	color: var(--act-muted);
	font-weight: 600;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.act-table td {
	padding: 0.35rem 0.5rem;
	border-bottom: 1px solid var(--act-line);
	color: var(--act-text);
}

.act-table tr:last-child td { border-bottom: none; }

.act-table tr:hover td { background: var(--act-hover); }

.act-row-gold td { color: var(--act-gold); }

.act-td-rank {
	color: var(--act-muted);
	font-size: 0.8rem;
	width: 24px;
}

.act-td-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Full history ---- */
.act-history-section { margin-bottom: 1.25rem; }

.act-history-toggle {
	background: var(--act-card-bg);
	border: 1px solid var(--act-border);
	border-radius: 4px;
	color: var(--act-muted);
	padding: 0.45rem 0.9rem;
	font-size: 0.85rem;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.act-history-toggle:hover {
	border-color: var(--act-accent);
	color: var(--act-text);
}

.act-table-full { font-size: 0.82rem; }

/* ---- Misc ---- */
.act-no-data {
	color: var(--act-muted);
	font-style: italic;
	font-size: 0.85rem;
	padding: 0.5rem 0;
	margin: 0;
}

.act-footer-note {
	color: var(--act-muted);
	font-size: 0.78rem;
	margin-top: 0.5rem;
}

.act-footer-note code {
	font-size: 0.78rem;
	background: var(--act-hover);
	padding: 0.1em 0.35em;
	border-radius: 3px;
}
