/* admin.css */

/* Общие стили для админ-панели */
.admin-container {
	min-height: calc(100vh - 80px - 200px);
	background: linear-gradient(135deg, #f9f5f0 0%, #f0e6d6 100%);
	padding: 40px 0;
}

.admin-header {
	text-align: center;
	margin-bottom: 40px;
	padding: 30px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.admin-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.admin-title i {
	color: #8b7355;
	font-size: 2.2rem;
}

.admin-subtitle {
	color: #666;
	font-size: 1.1rem;
	font-weight: 300;
}

/* Статистика */
.admin-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

.stat-card {
	background: white;
	border-radius: 16px;
	padding: 25px;
	display: flex;
	align-items: center;
	gap: 20px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	border: 1px solid #f0f0f0;
}

.stat-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stat-icon {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #8b7355 0%, #a89176 100%);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.8rem;
}

.stat-info h3 {
	font-size: 2.2rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 5px;
	line-height: 1;
}

.stat-info p {
	color: #666;
	font-size: 0.95rem;
	font-weight: 300;
}

/* Элементы управления */
.admin-controls {
	display: flex;
	gap: 15px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.admin-controls .btn {
	padding: 14px 28px;
	font-size: 1rem;
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 200px;
}

.btn-primary {
	background: linear-gradient(135deg, #8b7355 0%, #a89176 100%);
	color: white;
}

.btn-secondary {
	background: #1a1a1a;
	color: white;
}

.btn-secondary:hover {
	background: #333;
}

/* Секция товаров */
.products-section {
	background: white;
	border-radius: 20px;
	padding: 30px;
	margin-bottom: 40px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
	font-size: 1.8rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 25px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.section-title i {
	color: #8b7355;
}

.close-btn {
	background: none;
	border: none;
	font-size: 1.5rem;
	color: #666;
	cursor: pointer;
	padding: 5px;
	line-height: 1;
	transition: color 0.2s ease;
	position: relative;
	z-index: 10;
}

.close-btn:hover {
	color: #1a1a1a;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 50%;
}

/* Специфичные стили для модального окна просмотра файлов */
#viewFileModal .close-btn {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#viewFileModal .modal-header {
	position: relative;
	padding-right: 60px; /* Даем место для кнопки закрытия */
}

#viewFileModal .modal-header .close-btn {
	position: absolute;
	top: 50%;
	right: 20px;
	transform: translateY(-50%);
	margin: 0;
}

/* Список папок */
.folders-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.folder-item {
	background: #f9f9f9;
	border-radius: 12px;
	padding: 20px;
	border: 1px solid #e8e8e8;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.folder-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	border-color: #8b7355;
}

.folder-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}

.folder-icon {
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, #8b7355 0%, #a89176 100%);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.2rem;
}

.folder-name {
	font-size: 1.2rem;
	font-weight: 600;
	color: #1a1a1a;
	flex-grow: 1;
}

.folder-badge {
	background: #8b7355;
	color: white;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
}

/* Список файлов */
.files-list {
	margin-top: 15px;
}

.file-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	background: white;
	border-radius: 8px;
	margin-bottom: 8px;
	border: 1px solid #f0f0f0;
	transition: all 0.2s ease;
}

.file-item:hover {
	background: #f9f9f9;
	border-color: #8b7355;
}

.file-icon {
	color: #8b7355;
	font-size: 1rem;
	width: 20px;
	text-align: center;
}

.file-name {
	flex-grow: 1;
	font-size: 0.9rem;
	color: #333;
	word-break: break-all;
}

.file-size {
	font-size: 0.8rem;
	color: #999;
	font-weight: 300;
}

/* Индикаторы загрузки */
.access-check {
	text-align: center;
	padding: 60px 20px;
	background: white;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	margin-bottom: 40px;
}

.access-check .spinner {
	width: 60px;
	height: 60px;
	border: 4px solid rgba(139, 115, 85, 0.1);
	border-top: 4px solid #8b7355;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 20px;
}

.access-check h2 {
	color: #1a1a1a;
	margin-bottom: 10px;
}

.access-check p {
	color: #666;
	font-weight: 300;
}

.loading-section {
	text-align: center;
	padding: 40px 20px;
}

.loading-section .spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(139, 115, 85, 0.1);
	border-top: 3px solid #8b7355;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 15px;
}

.loading-section p {
	color: #666;
	font-weight: 300;
}

/* Сообщения об ошибках и пустых данных */
.access-denied {
	text-align: center;
	padding: 60px 20px;
	background: white;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	margin-bottom: 40px;
}

.access-denied i {
	font-size: 4rem;
	color: #ff6b6b;
	margin-bottom: 20px;
}

.access-denied h2 {
	color: #1a1a1a;
	margin-bottom: 10px;
}

.access-denied p {
	color: #666;
	margin-bottom: 25px;
	font-weight: 300;
}

.no-data {
	text-align: center;
	padding: 60px 20px;
	background: white;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.no-data i {
	font-size: 4rem;
	color: #8b7355;
	margin-bottom: 20px;
	opacity: 0.5;
}

.no-data h3 {
	color: #1a1a1a;
	margin-bottom: 10px;
}

.no-data p {
	color: #666;
	font-weight: 300;
}

/* Информация о системе */
.system-info {
	background: white;
	border-radius: 20px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.info-item {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 12px;
	border: 1px solid #eee;
}

.info-item i {
	font-size: 1.5rem;
	color: #8b7355;
	width: 40px;
}

.info-item h4 {
	font-size: 1rem;
	color: #666;
	margin-bottom: 5px;
	font-weight: 600;
}

.info-item p {
	color: #1a1a1a;
	font-size: 0.95rem;
	font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
	.admin-title {
		font-size: 2rem;
		flex-direction: column;
		gap: 10px;
	}

	.admin-stats {
		grid-template-columns: 1fr;
	}

	.admin-controls .btn {
		min-width: 100%;
	}

	.folders-list {
		grid-template-columns: 1fr;
	}

	.info-grid {
		grid-template-columns: 1fr;
	}
}

/* Анимации */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.fade-in {
	animation: fadeIn 0.5s ease;
}

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

/* Улучшения для скролла */
.files-list {
	max-height: 200px;
	overflow-y: auto;
	padding-right: 5px;
}

.files-list::-webkit-scrollbar {
	width: 6px;
}

.files-list::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

.files-list::-webkit-scrollbar-thumb {
	background: #8b7355;
	border-radius: 10px;
}

.files-list::-webkit-scrollbar-thumb:hover {
	background: #a89176;
}
