/**
 * Booskit Dashboard Stylesheet
 */

:root {
	--dash-primary: #2563eb;
	--dash-primary-hover: #1d4ed8;
	--dash-bg-card: #ffffff;
	--dash-border: #e2e8f0;
	--dash-text-main: #1e293b;
	--dash-text-muted: #64748b;
	--dash-success: #10b981;
	--dash-danger: #ef4444;
	--dash-warning: #f59e0b;
	--dash-badge-bg: #f1f5f9;
	--dash-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Container */
.dashboard-container {
	margin: 15px 0 35px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--dash-text-main);
}

/* Header & Hero */
.dashboard-hero {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	color: #ffffff;
	padding: 24px 28px;
	border-radius: 12px;
	margin-bottom: 24px;
	box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
}

.dashboard-hero-content h1 {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 6px 0;
	color: #ffffff;
	display: flex;
	align-items: center;
	gap: 10px;
}

.dashboard-hero-content p {
	margin: 0;
	color: #94a3b8;
	font-size: 0.95rem;
}

.dashboard-search-form {
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	padding: 4px 6px 4px 14px;
	border-radius: 8px;
	backdrop-filter: blur(4px);
}

.dashboard-search-form input[type="text"] {
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 0.95rem;
	outline: none;
	width: 220px;
}

.dashboard-search-form input[type="text"]::placeholder {
	color: #cbd5e1;
}

.dashboard-search-form button {
	background: var(--dash-primary);
	color: #ffffff;
	border: none;
	padding: 8px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	transition: background 0.15s ease;
}

.dashboard-search-form button:hover {
	background: var(--dash-primary-hover);
}

/* Quick Statistics Grid */
.dashboard-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.dashboard-stat-card {
	background: var(--dash-bg-card);
	border: 1px solid var(--dash-border);
	border-radius: 10px;
	padding: 18px 20px;
	box-shadow: var(--dash-card-shadow);
	display: flex;
	align-items: center;
	gap: 16px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.dashboard-stat-icon {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	flex-shrink: 0;
}

.dashboard-stat-icon.users { background: #eff6ff; color: #3b82f6; }
.dashboard-stat-icon.online { background: #ecfdf5; color: #10b981; }
.dashboard-stat-icon.activity { background: #fff7ed; color: #f97316; }
.dashboard-stat-icon.content { background: #f5f3ff; color: #8b5cf6; }

.dashboard-stat-details {
	display: flex;
	flex-direction: column;
}

.dashboard-stat-value {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--dash-text-main);
}

.dashboard-stat-label {
	font-size: 0.85rem;
	color: var(--dash-text-muted);
	font-weight: 500;
	margin-top: 2px;
}

/* Two Column Layout */
.dashboard-grid-2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

@media (max-width: 980px) {
	.dashboard-grid-2col {
		grid-template-columns: 1fr;
	}
}

/* Cards */
.dash-card {
	background: var(--dash-bg-card);
	border: 1px solid var(--dash-border);
	border-radius: 10px;
	box-shadow: var(--dash-card-shadow);
	margin-bottom: 24px;
	overflow: hidden;
}

.dash-card-header {
	background: #fafafa;
	border-bottom: 1px solid var(--dash-border);
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.dash-card-title {
	font-size: 1.05rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--dash-text-main);
}

.dash-card-body {
	padding: 16px 20px;
}

.dash-card-body.no-padding {
	padding: 0;
}

.dash-card-footer {
	background: #f8fafc;
	border-top: 1px solid var(--dash-border);
	padding: 10px 20px;
	text-align: right;
}

/* Active Users Table / List */
.active-users-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 480px;
	overflow-y: auto;
}

.active-user-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px;
	border-bottom: 1px solid var(--dash-border);
	transition: background 0.15s ease;
}

.active-user-row:last-child {
	border-bottom: none;
}

.active-user-row:hover {
	background: #f8fafc;
}

.active-user-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.active-user-avatar {
	position: relative;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
}

.active-user-avatar img,
.active-user-avatar .default-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.active-user-avatar .default-avatar {
	background: #e2e8f0;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
}

.online-pulse-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 10px;
	height: 10px;
	background: var(--dash-success);
	border: 2px solid #ffffff;
	border-radius: 50%;
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.active-user-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
}

.active-user-name {
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.active-user-browsing {
	font-size: 0.8rem;
	color: var(--dash-text-muted);
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.browsing-badge {
	background: #e0f2fe;
	color: #0369a1;
	padding: 2px 8px;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	display: inline-block;
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-decoration: none;
}

.browsing-badge:hover {
	text-decoration: underline;
}

.active-user-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* Buttons */
.dash-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.15s ease;
}

.dash-btn-primary {
	background: var(--dash-primary);
	color: #ffffff !important;
}

.dash-btn-primary:hover {
	background: var(--dash-primary-hover);
}

.dash-btn-secondary {
	background: #ffffff;
	border-color: var(--dash-border);
	color: var(--dash-text-main) !important;
}

.dash-btn-secondary:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

.dash-btn-sm {
	padding: 4px 8px;
	font-size: 0.78rem;
}

/* Hot Topics Period Tabs */
.hot-topics-tabs {
	display: flex;
	align-items: center;
	gap: 4px;
	background: #e2e8f0;
	padding: 3px;
	border-radius: 8px;
}

.hot-topics-tab {
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #475569;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.hot-topics-tab.active {
	background: #ffffff;
	color: var(--dash-primary);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Hot Topics Table */
.hot-topics-table {
	width: 100%;
	border-collapse: collapse;
}

.hot-topics-table th {
	background: #f8fafc;
	padding: 10px 14px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--dash-text-muted);
	text-transform: uppercase;
	border-bottom: 1px solid var(--dash-border);
	text-align: left;
}

.hot-topics-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--dash-border);
	font-size: 0.9rem;
	vertical-align: middle;
}

.hot-topics-table tr:last-child td {
	border-bottom: none;
}

.hot-topics-table tr:hover td {
	background: #f8fafc;
}

.topic-title-link {
	font-weight: 600;
	color: #0284c7;
	text-decoration: none;
}

.topic-title-link:hover {
	text-decoration: underline;
}

.topic-forum-badge {
	display: inline-block;
	font-size: 0.75rem;
	background: #f1f5f9;
	color: #475569;
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 6px;
	text-decoration: none;
}

.topic-activity-badge {
	background: #fee2e2;
	color: #dc2626;
	padding: 2px 8px;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* User Profile in Dashboard */
.profile-hero {
	background: #ffffff;
	border: 1px solid var(--dash-border);
	border-radius: 12px;
	padding: 24px;
	box-shadow: var(--dash-card-shadow);
	margin-bottom: 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.profile-hero-user {
	display: flex;
	align-items: center;
	gap: 20px;
}

.profile-avatar-large {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.default-avatar-large {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.2rem;
}

.profile-user-titles h2 {
	margin: 0 0 4px 0;
	font-size: 1.6rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 10px;
}

.profile-group-badge {
	display: inline-block;
	background: #e2e8f0;
	color: #334155;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 9999px;
}

.profile-meta-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 10px;
	font-size: 0.85rem;
	color: var(--dash-text-muted);
}

.profile-meta-item strong {
	color: var(--dash-text-main);
}

.profile-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

/* Action Dropdown */
.dash-dropdown {
	position: relative;
	display: inline-block;
}

.dash-dropdown-menu {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	margin-top: 6px;
	background: #ffffff;
	min-width: 210px;
	border: 1px solid var(--dash-border);
	border-radius: 8px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	z-index: 100;
	padding: 6px 0;
}

.dash-dropdown.open .dash-dropdown-menu {
	display: block;
}

.dash-dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 16px;
	color: var(--dash-text-main) !important;
	font-size: 0.88rem;
	font-weight: 500;
	text-decoration: none !important;
	transition: background 0.12s ease;
}

.dash-dropdown-item:hover {
	background: #f1f5f9;
	color: var(--dash-primary) !important;
}

.dash-dropdown-item i {
	font-size: 1rem;
	width: 18px;
	text-align: center;
}

/* Profile Tabs Navigation */
.profile-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border-bottom: 2px solid var(--dash-border);
	margin-bottom: 20px;
	padding-bottom: 4px;
}

.profile-tab-btn {
	background: transparent;
	border: none;
	padding: 8px 16px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--dash-text-muted);
	cursor: pointer;
	border-radius: 8px 8px 0 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.15s ease;
}

.profile-tab-btn:hover {
	color: var(--dash-primary);
	background: #f1f5f9;
}

.profile-tab-btn.active {
	color: var(--dash-primary);
	background: #eff6ff;
	border-bottom: 2px solid var(--dash-primary);
	margin-bottom: -6px;
}

.profile-tab-badge {
	background: #e2e8f0;
	color: #475569;
	font-size: 0.75rem;
	padding: 2px 7px;
	border-radius: 9999px;
	font-weight: 700;
}

.profile-tab-btn.active .profile-tab-badge {
	background: var(--dash-primary);
	color: #ffffff;
}

.profile-tab-content {
	display: none;
}

.profile-tab-content.active {
	display: block;
	animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Profile Search & Limit Toolbar */
.profile-toolbar-card {
	background: var(--dash-bg-card);
	border: 1px solid var(--dash-border);
	border-radius: 10px;
	padding: 12px 18px;
	margin-bottom: 20px;
	box-shadow: var(--dash-card-shadow);
}

.profile-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.profile-search-form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	max-width: 480px;
}

.profile-search-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1;
}

.profile-search-icon {
	position: absolute;
	left: 10px;
	color: #94a3b8;
	pointer-events: none;
	font-size: 0.85rem;
}

.profile-search-input {
	width: 100%;
	padding: 7px 30px 7px 32px;
	border: 1px solid var(--dash-border);
	border-radius: 6px;
	font-size: 0.9rem;
	color: var(--dash-text-main);
	background: #ffffff;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-search-input:focus {
	border-color: var(--dash-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.profile-search-clear-btn {
	position: absolute;
	right: 8px;
	color: #94a3b8;
	font-size: 0.85rem;
	text-decoration: none;
	padding: 2px 4px;
	border-radius: 4px;
}

.profile-search-clear-btn:hover {
	color: #ef4444;
}

.profile-per-page-container {
	display: flex;
	align-items: center;
	gap: 8px;
}

.profile-per-page-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--dash-text-muted);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

.profile-limit-select {
	padding: 6px 12px;
	font-size: 0.85rem;
	border: 1px solid var(--dash-border);
	border-radius: 6px;
	background: #ffffff;
	color: var(--dash-text-main);
	cursor: pointer;
	outline: none;
}

.profile-active-filter-badge {
	display: inline-flex;
	align-items: center;
	margin-top: 10px;
	padding: 5px 12px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	font-size: 0.85rem;
	color: #1e40af;
}

/* Sub-tabs Navigation (e.g. Actions Issued) */
.profile-subtabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	background: #f1f5f9;
	padding: 4px;
	border-radius: 8px;
	margin-bottom: 16px;
}

.profile-subtab-btn {
	background: transparent;
	border: none;
	padding: 6px 14px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--dash-text-muted);
	cursor: pointer;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.15s ease;
}

.profile-subtab-btn:hover {
	color: var(--dash-text-main);
	background: rgba(255, 255, 255, 0.7);
}

.profile-subtab-btn.active {
	color: var(--dash-primary);
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.profile-subtab-badge {
	background: #e2e8f0;
	color: #475569;
	font-size: 0.72rem;
	padding: 1px 6px;
	border-radius: 9999px;
	font-weight: 700;
}

.profile-subtab-btn.active .profile-subtab-badge {
	background: #eff6ff;
	color: var(--dash-primary);
}

.profile-subtab-content {
	display: none;
}

.profile-subtab-content.active {
	display: block;
	animation: fadeIn 0.15s ease-in-out;
}

/* Item styling inside profiles & feeds */
.dash-item {
	padding: 14px 18px;
	border-bottom: 1px solid var(--dash-border);
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}

.dash-item:last-child {
	border-bottom: none;
}

.dash-item-main {
	flex: 1;
}

.dash-item-badge {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	background: #e2e8f0;
	color: #1e293b;
	margin-bottom: 6px;
}

.dash-item-content {
	font-size: 0.9rem;
	line-height: 1.5;
	color: #334155;
}

.dash-item-meta {
	font-size: 0.8rem;
	color: var(--dash-text-muted);
	text-align: right;
	flex-shrink: 0;
}

.dash-archive-notice {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 0.85rem;
	margin-bottom: 8px;
}

.dash-evidence-box {
	margin-top: 10px;
	background: #fffbeb;
	border-left: 3px solid #f59e0b;
	padding: 8px 12px;
	border-radius: 0 6px 6px 0;
	font-size: 0.85rem;
}

.dash-empty-state {
	padding: 40px 20px;
	text-align: center;
	color: var(--dash-text-muted);
	font-size: 0.95rem;
}

.dash-empty-state i {
	font-size: 2.2rem;
	display: block;
	margin-bottom: 10px;
	opacity: 0.5;
}

/* Avatar Initial Badges & Fallbacks */
.dash-avatar-initial {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.1rem;
	text-transform: uppercase;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	user-select: none;
	flex-shrink: 0;
}

.profile-avatar-wrapper .dash-avatar-initial {
	width: 72px;
	height: 72px;
	font-size: 2rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.profile-avatar-wrapper img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.active-user-avatar img {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.dash-btn-xs {
	padding: 2px 8px;
	font-size: 0.75rem;
	border-radius: 4px;
}

.dash-pagination-wrapper {
	padding: 12px 18px;
	background: #f8fafc;
	border-top: 1px solid var(--dash-border);
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

/* =========================================================================
 * STAT & STATISTICS MODULE STYLING
 * ========================================================================= */

.dash-month-picker-card {
	background: var(--dash-bg-card);
	border: 1px solid var(--dash-border);
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 20px;
	box-shadow: var(--dash-card-shadow);
}

.dash-month-picker-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.dash-month-select-form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.dash-select {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #1e293b;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-select:focus {
	border-color: var(--dash-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dash-stat-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 20px;
	border-bottom: 1px solid var(--dash-border);
	transition: background 0.15s ease;
	gap: 16px;
}

.dash-stat-row:last-child {
	border-bottom: none;
}

.dash-stat-row:hover {
	background: #f8fafc;
}

.dash-stat-main {
	flex: 1;
	min-width: 0;
}

.dash-stat-count-box {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	flex-shrink: 0;
	text-align: right;
}

.dash-stat-number {
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.1;
}

.dash-stat-label-month {
	font-size: 0.75rem;
	color: var(--dash-text-muted);
	margin-top: 2px;
	font-weight: 500;
}

.dashboard-stat-badge {
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.dashboard-stat-badge:hover {
	opacity: 0.92;
	transform: scale(1.02);
}

.dash-stat-posts-drawer {
	border-top: 1px solid var(--dash-border);
	animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.dash-table-responsive {
	overflow-x: auto;
	border-radius: 6px;
	border: 1px solid var(--dash-border);
}

@media (max-width: 640px) {
	.dash-stat-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.dash-stat-count-box {
		align-items: flex-start;
		margin-top: 10px;
		width: 100%;
		border-top: 1px dashed var(--dash-border);
		padding-top: 8px;
	}
	.dash-month-picker-inner {
		flex-direction: column;
		align-items: stretch;
	}
	.dash-month-select-form {
		justify-content: center;
	}
}


