/* public/css/ndashboard.css - v9.0 */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap");

/* --- RESET & BASE --- */
* {
	box-sizing: border-box;
}
body {
	background-color: #121212;
	color: #e0e0e0;
	margin: 0;
	font-family: "Manrope", sans-serif;
	
	background-attachment: fixed;
	background-size: cover;
	background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, .8)),
		url("/public/assets/mc_wallpaper_bw.png");
	min-height: 100vw;
}
a {
	text-decoration: none;
	color: inherit;
	transition: 0.2s;
}
ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.hidden {
	display: none !important;
}
.file-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}
.badge-os {
	padding: 2px;
	border-radius: 1px;
	font-size: 0.7rem;
	font-weight: bold;
	min-width: 20px;
	text-align: center;
	display: inline-block;

	background: rgba(34, 197, 94, 0.15);
	color: #4ade80;
	border: 1px solid #166534;
}
/* --- HEADER & LAYOUT --- */
.dash-header {
	background: #1e1e1e;
	border-bottom: 1px solid #333;
	padding: 0 20px;
	height: 60px;
	display: flex;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 100;
}
.header-logo {
	height: 30px;
}
.header-right {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 15px;
}
.dash-container {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 30px;
	padding: 30px 20px;
	max-width: 1400px;
	margin: 0 auto;
	min-height: 100vh;
}

/* --- SIDEBAR --- */
.dash-sidebar {
	background: #1e1e1e;
	border: 1px solid #333;
	border-radius: 8px;
	padding: 20px;
	height: fit-content;
	position: sticky;
	top: 80px;
}
.user-card {
	text-align: center;
	padding-bottom: 20px;
	border-bottom: 1px solid #333;
	margin-bottom: 20px;
}
.current-avatar {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 10px;
	border: 2px solid #7ed957;
	display: block;
}
.avatar-circle {
	width: 100px;
	height: 100px;
	background: #7ed957;
	color: #000;
	font-size: 2.5rem;
	font-weight: bold;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 10px;
	border: 2px solid #fff;
}
.role-badge {
	background: #333;
	color: #aaa;
	font-size: 0.75rem;
	padding: 2px 8px;
	border-radius: 10px;
	text-transform: uppercase;
}
.user-uuid {
	display: inline-block;
	background: #000;
	color: #7ed957;
	font-family: monospace;
	font-size: 0.9rem;
	padding: 4px 8px;
	border-radius: 4px;
	margin-top: 5px;
	border: 1px solid #333;
}
.dash-nav {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
/* ... Các code cũ của .dash-nav ... */

/* Xóa style hr cũ nếu không dùng nữa, hoặc giữ lại cũng không sao */
.dash-nav hr {
	display: none; /* Ẩn thẻ hr đi */
}

/* Style cho tiêu đề phân mục mới */
.nav-category {
	font-size: 0.7rem; /* Chữ nhỏ */
	font-weight: 800; /* In đậm */
	color: #666; /* Màu xám tối để không tranh chấp với link chính */
	text-transform: uppercase; /* In hoa toàn bộ */
	letter-spacing: 1px; /* Giãn chữ cho thoáng */
	margin-top: 25px; /* Cách xa nhóm trên */
	margin-bottom: 8px; /* Cách gần nhóm dưới */
	padding-left: 15px; /* Căn lề thẳng hàng với icon/text */
	user-select: none; /* Không cho bôi đen */
}

/* Chỉnh lại margin cho mục đầu tiên nếu cần */
.dash-nav .nav-category:first-child {
	margin-top: 10px;
}
.dash-nav a {
	padding: 10px 15px;
	color: #ccc;
	border-radius: 4px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 10px;
}
.dash-nav a:hover {
	background: #333;
	color: #fff;
}
.dash-nav a.active {
	background: rgba(126, 217, 87, 0.15);
	color: #7ed957;
	font-weight: 700;
	border-left: 3px solid #7ed957;
}
.dash-nav hr {
	border: 0;
	border-top: 1px solid #333;
	margin: 10px 0;
	width: 100%;
}

/* --- CONTENT AREA --- */
.dash-content {
	background: #1e1e1e;
	border: 1px solid #333;
	border-radius: 8px;
	padding: 30px;
	min-width: 0;
}
.dash-title {
	margin: 0 0 20px 0;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	border-bottom: 1px solid #333;
	padding-bottom: 15px;
}
.dash-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	border-bottom: 1px solid #333;
	padding-bottom: 15px;
}
.dash-header-row .dash-title {
	border: none;
	padding: 0;
	margin: 0;
}

/* --- TOOLBAR & FORMS --- */
.toolbar {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
}
.search-input {
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid #444;
	background: #252525;
	color: #fff;
	flex: 1;
	min-width: 200px;
	font-family: inherit;
}
.form-box {
	width: 100%;
	background: #252525;
	padding: 20px;
	border-radius: 8px;
	border: 1px solid #333;
	margin-bottom: 20px;
}
.form-group {
	margin-bottom: 20px;
}
.form-group label {
	display: block;
	margin-bottom: 8px;
	color: #ccc;
	font-weight: 600;
	font-size: 0.9rem;
}
.mc-input {
	width: 100%;
	padding: 10px;
	background: #2b2b2b;
	border: 1px solid #444;
	color: #fff;
	border-radius: 4px;
	font-family: inherit;
}
textarea.mc-input {
	resize: vertical;
}

/* === STYLE 1: COMPACT LIST (Cho User & Blog) === */
.compact-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.c-item {
	display: flex;
	align-items: center;
	gap: 15px;
	background: #252525;
	border: 1px solid #333;
	padding: 12px 15px;
	border-radius: 6px;
	transition: 0.2s;
}
.c-item:hover {
	border-color: #555;
	transform: translateX(2px);
}
.c-img {
	width: 45px;
	height: 45px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background: #333;
}
.c-info {
	flex-grow: 1;
	min-width: 0;
}
.c-title {
	font-weight: 700;
	color: #fff;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	margin-bottom: 4px;
}
.c-meta {
	font-size: 0.8rem;
	color: #888;
	display: flex;
	gap: 10px;
	align-items: center;
}
.c-actions {
	display: flex;
	gap: 5px;
	flex-shrink: 0;
}

/* === STYLE 2: CARD GRID (Cho Mod/Project) === */
.mod-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}
.mod-card {
	background: #252525;
	border: 1px solid #333;
	border-radius: 8px;
	overflow: hidden;
	transition: 0.2s;
	display: flex;
	flex-direction: column;
}
.mod-card:hover {
	transform: translateY(-4px);
	border-color: #7ed957;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.mod-thumb {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	background: #1a1a1a;
	border-bottom: 1px solid #333;
}
.mod-body {
	padding: 15px;
	flex-grow: 1;
}
.mod-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.mod-icon {
	width: 100px;
	height: 100px;
	border-radius: 8px;
	object-fit: cover;
	transform: translateY(-50px);
}
.mod-header-r {
	transform: translateY(-30px);
}
.mod-title {
	font-weight: 700;
	color: white;
	font-size: 1rem;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mod-slug {
	font-size: 0.8rem;
	color: #777;
	margin-bottom: 10px;
}
.mod-footer {
	padding: 10px 15px;
	border-top: 1px solid #333;
	background: #2a2a2a;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* --- BADGES & BUTTONS --- */
.status-badge {
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
}
.st-published,
.st-active {
	background: rgba(126, 217, 87, 0.15);
	color: #7ed957;
	border: 1px solid rgba(126, 217, 87, 0.3);
}
.st-pending,
.st-draft {
	background: rgba(245, 158, 11, 0.15);
	color: #f59e0b;
	border: 1px solid rgba(245, 158, 11, 0.3);
}
.st-rejected,
.st-archived,
.st-banned {
	background: rgba(255, 85, 85, 0.15);
	color: #ff5555;
	border: 1px solid rgba(255, 85, 85, 0.3);
}

.mc-btn {
	padding: 6px 12px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.85rem;
	transition: 0.2s;
	white-space: nowrap;
}
.mc-btn-sm {
	padding: 4px 8px;
	font-size: 0.75rem;
}
.mc-btn-green {
	background: #7ed957;
	color: #000;
}
.mc-btn-blue {
	background: #3498db;
	color: #fff;
}
.mc-btn-red {
	background: #ff5555;
	color: #fff;
}
.mc-btn-gray {
	background: #444;
	color: #ccc;
}
.mc-btn:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

/* --- EDIT PROJECT & UPLOAD --- */
.project-grid-layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 20px;
}
.thumbnail-box {
	width: 100%;
	aspect-ratio: 16/9;
	background: #1a1a1a;
	border: 2px dashed #444;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}
.thumbnail-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.version-card {
	background: #252525;
	border: 1px solid #333;
	padding: 15px;
	border-radius: 6px;
	margin-bottom: 15px;
}
.version-header {
	display: flex;
	justify-content: space-between;
	align-content: center;
	align-items: center;
}
.file-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #2a2a2a;
	padding: 8px 12px;
	border-radius: 4px;
	margin-bottom: 5px;
	border: 1px solid #333;
	font-size: 0.9rem;
}
.upload-section {
	margin-top: 10px;
	border-top: 1px solid #333;
	padding-top: 10px;
}
.btn-upload {
	display: inline-block;
	padding: 5px 6px;
	background: #7ed957;
	color: black;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 500;
}
#file_name {
	font-size: 0.8rem;
	display: inline-block;
	max-width: 150px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.btn-upload:hover {
	background: #4338ca;
}
.checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}
.checkbox-label {
	display: flex;
	align-items: center;
	font-size: 0.8rem;
	cursor: pointer;
	background: #333;
	padding: 5px 10px;
	border-radius: 4px;
	color: #ccc;
}
.checkbox-label input {
	margin-right: 5px;
	accent-color: #7ed957;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
	.dash-container {
		grid-template-columns: 1fr;
		padding: 15px;
		gap: 20px;
	}
	.dash-sidebar {
		position: static;
		margin-bottom: 20px;
	}
	.project-grid-layout {
		grid-template-columns: 1fr;
	}
	.c-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.c-actions {
		width: 100%;
		justify-content: flex-end;
		border-top: 1px solid #333;
		padding-top: 10px;
	}
	.mod-grid {
		grid-template-columns: 1fr;
	} /* Mobile 1 cột cho Mod */
}

.pagination {
	display: flex;
	justify-content: center;
	gap: 5px;
	margin-top: 20px;
}
.page-btn {
	padding: 5px 10px;
	background: #333;
	color: #ccc;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid #444;
}
.page-btn.active {
	background: #7ed957;
	color: #000;
	font-weight: bold;
	border-color: #7ed957;
}

/* Toast & Modal */
#toast-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
}
.mc-toast {
	background: #333;
	color: white;
	padding: 15px 20px;
	border-radius: 6px;
	margin-bottom: 10px;
	border-left: 4px solid #7ed957;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
	animation: slideIn 0.3s;
}
.mc-toast.warn {
	border-left-color: #ffb33c;
}

.mc-toast.error {
	border-left-color: #ff5555;
}
@keyframes slideIn {
	from {
		transform: translateX(100%);
	}
	to {
		transform: translateX(0);
	}
}
.mc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	transition: 0.2s;
}
.mc-modal-overlay.active {
	visibility: visible;
	opacity: 1;
}
.mc-modal-box {
	background: #252525;
	padding: 25px;
	border-radius: 8px;
	border: 1px solid #444;
	width: 90%;
	max-width: 400px;
}
/* =========================================
   CHANGELOG BUILDER - CLEAN & FLAT STYLE
   ========================================= */

/* 1. Container: Xóa màu nền xám, để trong suốt cho thoáng */
.changelog-builder {
	background: transparent;
	border: none;
	padding: 0;
	margin-bottom: 15px;
	max-height: 300px;
	overflow-y: auto;
}

/* 2. Dòng nhập liệu: Căn thẳng tắp */
.changelog-row {
	display: flex;
	gap: 10px; /* Khoảng cách giữa các ô */
	margin-bottom: 10px;
	align-items: center;
}

/* 3. Style chung cho Input và Select */
.cl-select,
.cl-input {
	height: 42px !important; /* Chiều cao cố định, cao hơn chút cho dễ bấm */
	background-color: #1a1a1a !important; /* Màu nền tối hơn nền Modal một chút */
	color: #e0e0e0 !important;
	border: 1px solid #333 !important; /* Viền mờ */
	border-radius: 6px !important; /* Bo góc mềm mại */
	font-size: 0.95rem !important;
	box-sizing: border-box; /* Đảm bảo padding không làm vỡ layout */
}

/* Riêng Select box */
.cl-select {
	width: 100px !important;
	padding: 0 10px !important;
	cursor: pointer;
}

/* Riêng Input text */
.cl-input {
	flex-grow: 1; /* Tự động giãn hết phần còn lại */
	padding: 0 12px !important;
}

/* Hiệu ứng khi bấm vào (Focus) - Viền xanh Minecraft */
.cl-select:focus,
.cl-input:focus {
	border-color: #7ed957 !important;
	background-color: #111 !important;
	outline: none;
	box-shadow: 0 0 0 1px rgba(126, 217, 87, 0.3);
}

/* 4. Nút Xóa (X) - Làm thành nút vuông đẹp */
.cl-btn-remove {
	width: 42px;
	height: 42px; /* Bằng chiều cao input */
	flex-shrink: 0; /* Không bị co lại */

	background-color: rgba(255, 68, 68, 0.1); /* Nền đỏ trong suốt */
	color: #ff4444;
	border: 1px solid rgba(255, 68, 68, 0.2);
	border-radius: 6px;

	cursor: pointer;
	font-size: 1.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.cl-btn-remove:hover {
	background-color: #ff4444;
	color: white;
	transform: scale(1.05);
}

/* 5. Nút "+ Dòng" - Làm nhỏ lại và tinh tế hơn */
.changelog-builder + button, /* Chọn nút ngay sau builder */
button[onclick="addChangelogRow()"] {
	background-color: #252525;
	color: #aaa;
	border: 1px dashed #444;
	padding: 8px 15px;
	border-radius: 6px;
	font-size: 0.9rem;
	transition: all 0.2s;
}

button[onclick="addChangelogRow()"]:hover {
	background-color: #333;
	color: #fff;
	border-color: #7ed957;
	color: #7ed957;
}

/* Mobile Responsive */
@media (max-width: 500px) {
	.cl-select {
		width: 80px !important;
		font-size: 0.85rem !important;
	}
	.cl-btn-remove {
		width: 42px;
	}
}
/* public/css/ndashboard.css - v9.4 (Profile Layout Update) */

/* ... (GIỮ NGUYÊN CSS CŨ TỪ DÒNG 1 ĐẾN DÒNG 380) ... */
/* Bạn copy lại toàn bộ CSS cũ, sau đó thêm đoạn dưới này vào cuối file */

/* === NEW: INTERNAL PROFILE TABS === */
.internal-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	border-bottom: 2px solid #333;
	padding-bottom: 1px; /* Để viền active đè lên border bottom */
}

.i-tab-btn {
	background: transparent;
	border: none;
	color: #888;
	padding: 10px 20px;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 600;
	border-bottom: 2px solid transparent;
	transition: all 0.2s;
	font-family: "Manrope", sans-serif;
	display: flex;
	align-items: center;
	gap: 8px;
}

.i-tab-btn:hover {
	color: #ccc;
}

.i-tab-btn.active {
	color: #7ed957;
	border-bottom-color: #7ed957;
}

/* Ẩn hiện nội dung sub-tab */
.subtab-content {
	display: none;
	animation: fadeIn 0.3s ease;
}

.subtab-content.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Các class bổ trợ cho Profile mới */
.section-divider {
	font-size: 1.1rem;
	color: #fff;
	border-bottom: 1px solid #333;
	padding-bottom: 10px;
	margin: 25px 0 15px 0;
}

.section-heading {
	margin-top: 0;
	font-size: 1.1rem;
	margin-bottom: 15px;
	color: #fff;
}

.form-footer {
	margin-top: 20px;
	display: flex;
	justify-content: flex-end;
}

/* Avatar nhỏ trong phần edit */
.current-avatar-small {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #7ed957;
}

.avatar-circle-small {
	width: 70px;
	height: 70px;
	background: #7ed957;
	color: #000;
	font-size: 1.8rem;
	font-weight: bold;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
}

/* Utility giữ nguyên */
.hidden {
	display: none !important;
}
/* === OVERVIEW STATS WIDGETS === */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.stat-card {
	background: #252525;
	border: 1px solid #333;
	padding: 25px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	gap: 20px;
	transition:
		transform 0.2s,
		border-color 0.2s;
}

.stat-card:hover {
	transform: translateY(-5px);
	border-color: #7ed957;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-icon {
	width: 60px;
	height: 60px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	flex-shrink: 0;
}

/* Màu sắc riêng cho từng loại Icon */
.icon-blue {
	background: rgba(52, 152, 219, 0.15);
	color: #3498db;
}
.icon-green {
	background: rgba(126, 217, 87, 0.15);
	color: #7ed957;
}
.icon-orange {
	background: rgba(245, 158, 11, 0.15);
	color: #f59e0b;
}
.icon-purple {
	background: rgba(155, 89, 182, 0.15);
	color: #9b59b6;
}

.stat-info {
	flex-grow: 1;
}

.stat-label {
	display: block;
	color: #888;
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 5px;
	letter-spacing: 0.5px;
}

.stat-number {
	display: block;
	color: #fff;
	font-size: 2rem;
	font-weight: 800;
	line-height: 1;
}

/* Welcome Box */
.welcome-banner {
	background: linear-gradient(135deg, #1e1e1e 0%, #252525 100%);
	border: 1px solid #333;
	border-left: 5px solid #7ed957;
	padding: 25px;
	border-radius: 8px;
	margin-bottom: 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.welcome-text h2 {
	margin: 0 0 5px 0;
	color: #fff;
	font-size: 1.5rem;
}
.welcome-text p {
	margin: 0;
	color: #aaa;
}

/* === ACTION MENU (3 DOTS) === */
.action-wrapper {
	position: relative;
	display: inline-block;
}

.btn-dots {
	background: transparent;
	border: none;
	color: #888;
	cursor: pointer;
	padding: 8px 12px;
	font-size: 1.1rem;
	border-radius: 4px;
	transition: all 0.2s;
}

.btn-dots:hover,
.btn-dots.active {
	background: #333;
	color: #fff;
}

.dropdown-menu {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	margin-top: 5px;
	background: #252525;
	border: 1px solid #444;
	border-radius: 6px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
	z-index: 1000;
	min-width: 160px;
	overflow: hidden;
	animation: fadeInMenu 0.1s ease-out;
}

.dropdown-menu.show {
	display: block;
}

@keyframes fadeInMenu {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 15px;
	text-align: left;
	background: transparent;
	border: none;
	color: #ccc;
	font-size: 0.9rem;
	font-family: inherit;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s;
}

.dropdown-item:hover {
	background: #333;
	color: #fff;
}

.dropdown-item.danger {
	color: #ff5555;
}

.dropdown-item.danger:hover {
	background: rgba(255, 85, 85, 0.1);
}

.dropdown-divider {
	height: 1px;
	background: #333;
	margin: 4px 0;
}
