/* =========================================================
   ApexNW Sohbethane & Ticarethane - Global Design System
   Themes: ApexNW (Mor & Siyah), Simsiyah (Pitch Black), Gündüz (Light)
   ========================================================= */

:root {
	--font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
	--font-mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;
	--font-mc: 'Minecraft', 'Segoe UI', sans-serif;
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 14px;
	--radius-xl: 20px;
	--transition: 0.18s ease-in-out;
}

/* 1. APEXNW THEME (Mor ve Siyah - Varsayılan) */
[data-theme="apexnw"], :root:not([data-theme]) {
	--bg-app: #09070f;
	--bg-sidebar: #0f0b18;
	--bg-card: #151022;
	--bg-card-hover: #1c152d;
	--bg-surface: #1e1730;
	--bg-input: #120d20;
	--border: #2c2045;
	--border-active: #a855f7;
	--text-main: #f5f3ff;
	--text-muted: #a78bfa;
	--text-dim: #7c6f9f;
	--primary: #9333ea;
	--primary-hover: #a855f7;
	--primary-glow: rgba(168, 85, 247, 0.35);
	--accent-purple: #c084fc;
	--badge-admin: #9333ea;
	--badge-player: #3b82f6;
	--gold: #fbbf24;
	--emerald: #10b981;
	--danger: #ef4444;
	--header-glow: 0 4px 24px rgba(147, 51, 234, 0.25);
	--card-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* 2. SİMSİYAH TEMA (Pitch Black / OLED Dark) */
[data-theme="black"] {
	--bg-app: #000000;
	--bg-sidebar: #070707;
	--bg-card: #0e0e0e;
	--bg-card-hover: #161616;
	--bg-surface: #1a1a1a;
	--bg-input: #080808;
	--border: #222222;
	--border-active: #e5e5e5;
	--text-main: #ffffff;
	--text-muted: #a3a3a3;
	--text-dim: #666666;
	--primary: #262626;
	--primary-hover: #383838;
	--primary-glow: rgba(255, 255, 255, 0.15);
	--accent-purple: #d4d4d4;
	--badge-admin: #ef4444;
	--badge-player: #525252;
	--gold: #fbbf24;
	--emerald: #10b981;
	--danger: #dc2626;
	--header-glow: 0 4px 20px rgba(0, 0, 0, 0.8);
	--card-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

/* 3. GÜNDÜZ TEMASI (Light Mode) */
[data-theme="light"] {
	--bg-app: #f1f5f9;
	--bg-sidebar: #ffffff;
	--bg-card: #ffffff;
	--bg-card-hover: #f8fafc;
	--bg-surface: #e2e8f0;
	--bg-input: #f8fafc;
	--border: #cbd5e1;
	--border-active: #9333ea;
	--text-main: #0f172a;
	--text-muted: #475569;
	--text-dim: #94a3b8;
	--primary: #9333ea;
	--primary-hover: #7e22ce;
	--primary-glow: rgba(147, 51, 234, 0.2);
	--accent-purple: #9333ea;
	--badge-admin: #7e22ce;
	--badge-player: #2563eb;
	--gold: #d97706;
	--emerald: #059669;
	--danger: #dc2626;
	--header-glow: 0 4px 20px rgba(0, 0, 0, 0.05);
	--card-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: var(--bg-app);
	color: var(--text-main);
	font-family: var(--font-main);
	font-size: 14px;
	line-height: 1.5;
	overflow-x: hidden;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

/* Layout container */
.app-container {
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow: hidden;
}

/* Header & Announcement Banner */
.announcement-banner {
	background: linear-gradient(90deg, #7e22ce, #9333ea, #c084fc);
	color: #ffffff;
	padding: 8px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	font-weight: 600;
	z-index: 100;
	box-shadow: 0 2px 10px rgba(147, 51, 234, 0.3);
}

.announcement-banner.warning {
	background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.announcement-banner.info {
	background: linear-gradient(90deg, #1e40af, #3b82f6);
}

.announcement-content {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-header {
	height: 60px;
	background: var(--bg-sidebar);
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	box-shadow: var(--header-glow);
	flex-shrink: 0;
	z-index: 50;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.02em;
	cursor: pointer;
	user-select: none;
}

.brand-logo {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: linear-gradient(135deg, #9333ea, #4c1d95);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	box-shadow: 0 0 15px var(--primary-glow);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
	background: linear-gradient(135deg, #ffffff 40%, var(--accent-purple));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	font-weight: 800;
}

.brand-badge {
	font-size: 10px;
	padding: 2px 6px;
	background: var(--primary);
	color: #fff;
	border-radius: 4px;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.05em;
}

/* Nav Tabs */
.nav-tabs {
	display: flex;
	align-items: center;
	gap: 6px;
}

.nav-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: var(--radius-md);
	background: transparent;
	color: var(--text-muted);
	border: 1px solid transparent;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition: var(--transition);
}

.nav-tab:hover {
	background: var(--bg-card);
	color: var(--text-main);
}

.nav-tab.active {
	background: var(--bg-card);
	color: var(--text-main);
	border-color: var(--border-active);
	box-shadow: 0 0 12px var(--primary-glow);
}

.nav-tab.admin-tab {
	color: #f472b6;
}
.nav-tab.admin-tab.active {
	border-color: #ec4899;
	box-shadow: 0 0 14px rgba(236, 72, 153, 0.4);
}

.header-user-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-profile-pill {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	padding: 4px 10px 4px 4px;
	border-radius: 30px;
	cursor: pointer;
	transition: var(--transition);
}

.user-profile-pill:hover {
	border-color: var(--border-active);
}

.user-avatar-sm {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	image-rendering: pixelated;
}

.user-info-text {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.user-name-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--text-main);
	display: flex;
	align-items: center;
	gap: 4px;
}

.user-coin-badge {
	font-size: 11px;
	color: var(--gold);
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 3px;
}

/* App Main Layout */
.app-body {
	display: flex;
	flex: 1;
	overflow: hidden;
	height: calc(100vh - 60px);
}

/* Common UI Components */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: var(--radius-md);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: var(--transition);
	user-select: none;
}

.btn-primary {
	background: var(--primary);
	color: #ffffff;
	box-shadow: 0 2px 10px var(--primary-glow);
}
.btn-primary:hover {
	background: var(--primary-hover);
	transform: translateY(-1px);
}

.btn-secondary {
	background: var(--bg-surface);
	color: var(--text-main);
	border-color: var(--border);
}
.btn-secondary:hover {
	background: var(--bg-card-hover);
	border-color: var(--border-active);
}

.btn-danger {
	background: var(--danger);
	color: #fff;
}
.btn-danger:hover {
	filter: brightness(1.15);
}

.btn-sm {
	padding: 4px 10px;
	font-size: 12px;
}

.input, .select, .textarea {
	width: 100%;
	background: var(--bg-input);
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 9px 12px;
	border-radius: var(--radius-md);
	font-size: 13px;
	font-family: inherit;
	transition: var(--transition);
	outline: none;
}

.input:focus, .select:focus, .textarea:focus {
	border-color: var(--border-active);
	box-shadow: 0 0 0 3px var(--primary-glow);
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.badge-admin {
	background: rgba(147, 51, 234, 0.25);
	color: #c084fc;
	border: 1px solid rgba(147, 51, 234, 0.5);
}

.badge-member {
	background: rgba(59, 130, 246, 0.15);
	color: #60a5fa;
	border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-realm {
	background: rgba(251, 191, 36, 0.15);
	color: #fbbf24;
	border: 1px solid rgba(251, 191, 36, 0.3);
}

/* =========================================================
   AUTH MODAL / LOGIN & REGISTER SCREENS
   ========================================================= */
.auth-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}

.auth-card {
	width: 100%;
	max-width: 440px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px var(--primary-glow);
	overflow: hidden;
	animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
	from {
		opacity: 0;
		transform: scale(0.94);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.auth-header {
	padding: 24px 24px 16px;
	text-align: center;
	background: linear-gradient(180deg, var(--bg-surface) 0%, transparent 100%);
	border-bottom: 1px solid var(--border);
}

.auth-skin-preview {
	width: 64px;
	height: 64px;
	margin: 0 auto 12px;
	border-radius: 12px;
	background: var(--bg-input);
	border: 2px solid var(--border-active);
	box-shadow: 0 0 16px var(--primary-glow);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.auth-skin-preview img {
	width: 100%;
	height: 100%;
	image-rendering: pixelated;
}

.auth-tabs {
	display: flex;
	border-bottom: 1px solid var(--border);
	background: var(--bg-sidebar);
}

.auth-tab-btn {
	flex: 1;
	padding: 12px;
	text-align: center;
	background: transparent;
	border: none;
	color: var(--text-muted);
	font-weight: 700;
	cursor: pointer;
	transition: var(--transition);
}

.auth-tab-btn.active {
	color: var(--text-main);
	background: var(--bg-card);
	border-bottom: 2px solid var(--border-active);
}

.auth-form {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
}

.error-box {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid var(--danger);
	color: #fca5a5;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 500;
}

/* =========================================================
   1. SOHBETHANE (CHAT) AREA
   ========================================================= */
.chat-layout {
	display: flex;
	width: 100%;
	height: 100%;
}

.chat-sidebar {
	width: 260px;
	background: var(--bg-sidebar);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}

.chat-sidebar-header {
	padding: 16px;
	border-bottom: 1px solid var(--border);
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.channels-list {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.channel-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--radius-md);
	background: transparent;
	border: 1px solid transparent;
	color: var(--text-muted);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	text-align: left;
	transition: var(--transition);
	width: 100%;
}

.channel-btn:hover {
	background: var(--bg-card);
	color: var(--text-main);
}

.channel-btn.active {
	background: var(--bg-card);
	color: var(--text-main);
	border-color: var(--border-active);
	box-shadow: 0 0 10px var(--primary-glow);
}

.chat-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: var(--bg-app);
	position: relative;
	min-width: 0;
}

.chat-header {
	height: 52px;
	padding: 0 20px;
	border-bottom: 1px solid var(--border);
	background: var(--bg-sidebar);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.chat-header-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.messages-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.chat-message-row {
	display: flex;
	gap: 12px;
	padding: 8px 12px;
	border-radius: var(--radius-md);
	transition: var(--transition);
	position: relative;
}

.chat-message-row:hover {
	background: var(--bg-card);
}

.chat-message-row.pinned {
	background: rgba(147, 51, 234, 0.12);
	border-left: 3px solid var(--primary);
}

.msg-avatar {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	image-rendering: pixelated;
	flex-shrink: 0;
}

.msg-body {
	flex: 1;
	min-width: 0;
}

.msg-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 3px;
}

.msg-author {
	font-weight: 700;
	font-size: 13px;
	color: var(--text-main);
	cursor: pointer;
}

.msg-author:hover {
	text-decoration: underline;
	color: var(--accent-purple);
}

.msg-time {
	font-size: 11px;
	color: var(--text-dim);
}

.msg-text {
	font-size: 13.5px;
	color: var(--text-main);
	word-break: break-word;
	line-height: 1.45;
}

.msg-actions {
	opacity: 0;
	transition: var(--transition);
}

.chat-message-row:hover .msg-actions {
	opacity: 1;
}

/* Chat Input Bar */
.chat-input-area {
	padding: 14px 20px;
	background: var(--bg-sidebar);
	border-top: 1px solid var(--border);
	display: flex;
	gap: 10px;
	align-items: center;
}

.chat-input-box {
	flex: 1;
	position: relative;
	display: flex;
	align-items: center;
}

.chat-input {
	padding-right: 40px;
}

.chat-send-btn {
	height: 38px;
	padding: 0 18px;
}

/* =========================================================
   2. TİCARETHANE (MARKETPLACE) AREA
   ========================================================= */
.market-layout {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	padding: 24px;
	background: var(--bg-app);
}

.market-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 14px;
}

.market-filters-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	padding: 14px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.market-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 18px;
}

.market-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--card-shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

.market-card:hover {
	transform: translateY(-3px);
	border-color: var(--border-active);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 15px var(--primary-glow);
}

.market-card.featured {
	border-color: var(--gold);
	box-shadow: 0 0 20px rgba(251, 191, 36, 0.25);
}

.featured-ribbon {
	position: absolute;
	top: 10px;
	right: 10px;
	background: linear-gradient(135deg, #fbbf24, #d97706);
	color: #000;
	font-size: 10px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 20px;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.market-card-header {
	padding: 16px;
	display: flex;
	gap: 14px;
	align-items: center;
	background: linear-gradient(180deg, var(--bg-surface) 0%, transparent 100%);
	border-bottom: 1px solid var(--border);
}

.item-icon-box {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	flex-shrink: 0;
	box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.market-card-title-group {
	flex: 1;
	min-width: 0;
}

.item-title {
	font-weight: 700;
	font-size: 14px;
	color: var(--text-main);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 4px;
}

.market-card-body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 12px;
}

.item-desc {
	font-size: 12.5px;
	color: var(--text-muted);
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.market-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--border);
}

.seller-badge {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--text-muted);
}

.price-tag {
	font-size: 15px;
	font-weight: 800;
	color: var(--gold);
	display: flex;
	align-items: center;
	gap: 4px;
}

.market-card-actions {
	padding: 12px 16px;
	background: var(--bg-sidebar);
	border-top: 1px solid var(--border);
	display: flex;
	gap: 8px;
}

/* =========================================================
   3. DM (DIRECT MESSAGES) AREA
   ========================================================= */
.dm-layout {
	display: flex;
	width: 100%;
	height: 100%;
}

.dm-sidebar {
	width: 280px;
	background: var(--bg-sidebar);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}

.dm-sidebar-header {
	padding: 16px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.dm-conv-list {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dm-conv-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: var(--radius-md);
	background: transparent;
	border: 1px solid transparent;
	cursor: pointer;
	transition: var(--transition);
	text-align: left;
	width: 100%;
}

.dm-conv-item:hover {
	background: var(--bg-card);
}

.dm-conv-item.active {
	background: var(--bg-card);
	border-color: var(--border-active);
	box-shadow: 0 0 10px var(--primary-glow);
}

.dm-conv-info {
	flex: 1;
	min-width: 0;
}

.dm-conv-name {
	font-weight: 700;
	font-size: 13px;
	color: var(--text-main);
	margin-bottom: 2px;
}

.dm-conv-last {
	font-size: 12px;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dm-chat-pane {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: var(--bg-app);
	min-width: 0;
}

.dm-chat-header {
	height: 56px;
	padding: 0 20px;
	border-bottom: 1px solid var(--border);
	background: var(--bg-sidebar);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* =========================================================
   4. AYARLAR (SETTINGS) AREA
   ========================================================= */
.settings-layout {
	flex: 1;
	overflow-y: auto;
	padding: 30px;
	max-width: 800px;
	margin: 0 auto;
	width: 100%;
}

.settings-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--card-shadow);
}

.settings-section-title {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text-main);
}

.theme-options-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.theme-card-option {
	padding: 16px;
	border-radius: var(--radius-md);
	border: 2px solid var(--border);
	background: var(--bg-surface);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	transition: var(--transition);
	text-align: center;
}

.theme-card-option:hover {
	transform: translateY(-2px);
	border-color: var(--border-active);
}

.theme-card-option.active {
	border-color: var(--primary);
	box-shadow: 0 0 16px var(--primary-glow);
}

.theme-preview-palette {
	width: 100%;
	height: 48px;
	border-radius: var(--radius-sm);
	display: flex;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-preview-palette .color-box {
	flex: 1;
	height: 100%;
}

/* =========================================================
   5. ADMIN PANELİ (ADMIN PANEL - 5 KEY FEATURES)
   ========================================================= */
.admin-layout {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

.admin-header {
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.admin-features-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 12px;
	overflow-x: auto;
}

.admin-feature-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: var(--radius-md);
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--text-muted);
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	transition: var(--transition);
	white-space: nowrap;
}

.admin-feature-tab:hover {
	border-color: var(--border-active);
	color: var(--text-main);
}

.admin-feature-tab.active {
	background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(236, 72, 153, 0.2));
	border-color: #ec4899;
	color: #fff;
	box-shadow: 0 0 16px rgba(236, 72, 153, 0.3);
}

.admin-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
	box-shadow: var(--card-shadow);
	margin-bottom: 20px;
}

/* Stats Counter Cards */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.stat-box {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 16px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.stat-val {
	font-size: 22px;
	font-weight: 800;
	color: var(--text-main);
}

.stat-lbl {
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 600;
}

/* Data Table */
.admin-table-container {
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--bg-surface);
}

.admin-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.admin-table th {
	background: var(--bg-sidebar);
	padding: 12px 14px;
	text-align: left;
	font-weight: 700;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border);
}

.admin-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	color: var(--text-main);
	vertical-align: middle;
}

.admin-table tr:hover td {
	background: var(--bg-card-hover);
}

/* Modal Windows */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(5px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 500;
	padding: 20px;
}

.modal-card {
	width: 100%;
	max-width: 520px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
	overflow: hidden;
	animation: popIn 0.2s ease;
}

.modal-header {
	padding: 18px 20px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--bg-surface);
}

.modal-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-height: 70vh;
	overflow-y: auto;
}

.modal-footer {
	padding: 14px 20px;
	border-top: 1px solid var(--border);
	background: var(--bg-surface);
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.app-header {
		padding: 0 12px;
	}
	.nav-tab span {
		display: none;
	}
	.chat-sidebar {
		width: 70px;
	}
	.chat-sidebar-header span, .channel-btn span {
		display: none;
	}
	.theme-options-grid {
		grid-template-columns: 1fr;
	}
}
