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

.container {
    margin: 10px 5%;
    float: left;
    width: 90%;
	font-family: 'Segoe UI', Arial, sans-serif;
}

.header {
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #deebf1;
    box-shadow: 0px 0px 3px 1px #67757e;
}
.header h1 { font-size: 24px; font-weight: 700; }
.header h1 span { color: #3b82f6; }
.btn-add {
	background: #3b82f6; color: #fff; border: none;
	padding: 10px 24px; border-radius: 40px; font-size: 14px; font-weight: 600;
	cursor: pointer; transition: 0.2s;
}
.btn-add:hover { background: #2563eb; }

.form-box {
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgb(0 0 0 / 60%);
    margin-bottom: 24px;
    display: none;
    text-align: left;
}
.form-box.open { display: block; }
.form-box label { font-size: 14px; font-weight: 600; display: block; margin: 12px 0 4px; }
.form-box input, .form-box textarea {
	width: 100%; padding: 10px 14px;
	border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px;
	transition: 0.2s;
}
.form-box input:focus, .form-box textarea:focus {
	outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-box textarea { min-height: 100px; resize: vertical; }

.file-input {
	border: 2px dashed #e2e8f0; padding: 16px; text-align: center;
	border-radius: 10px; cursor: pointer; transition: 0.2s; font-size: 14px;
}
.file-input:hover { border-color: #3b82f6; }

.file-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-preview img {
	max-width: 80px; max-height: 80px; border-radius: 8px;
	object-fit: cover; border: 1px solid #e2e8f0;
}

.submit-btn {
    margin: 0 auto;
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    display: flex;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    width: auto;
    transition: 0.2s;
}
.submit-btn:hover { background: #16a34a; }

.reviews-list { display: flex; flex-direction: column; gap: 16px; }

.review-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 60%);
    border-left: 4px solid #4CAF50;
}


/* === ОТВЕТ АДМИНИСТРАТОРА === */
.admin-reply {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 12px;
    border-left: 3px solid #3b82f6;
	text-align: left;
}
.admin-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.reply-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.reply-icon {
    font-size: 18px;
    color: #3b82f6;
    line-height: 1;
}
.reply-label {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
    letter-spacing: 0.5px;
}
.reply-date {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}
.admin-reply-text {
    font-size: 14px;
    color: #1a2a3a;
    line-height: 1.6;
    padding-left: 4px;
}






.review-header {
	display: flex; justify-content: space-between; align-items: center;
	flex-wrap: wrap; margin-bottom: 8px;
}
.review-name { font-size: 16px; font-weight: 600; color: #1a2a3a; }
.review-date { font-size: 12px; color: #94a3b8; }

.review-text { font-size: 15px; color: #2d3e50; line-height: 1.6; margin: 8px 0 12px; text-align: left;}

.review-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.review-photos img {
	max-width: 120px; max-height: 120px; border-radius: 10px;
	object-fit: cover; border: 1px solid #e2e8f0;
	cursor: pointer; transition: transform 0.2s;
}
.review-photos img:hover { transform: scale(1.05); }

.gallery-overlay {
	position: fixed; top: 0; left: 0; width: 100%; height: 100%;
	background: rgba(0,0,0,0.95); z-index: 9999;
	display: none; align-items: center; justify-content: center; flex-direction: column;
}
.gallery-overlay.active { display: flex; }

.gallery-overlay .close-btn {
	position: absolute; top: 20px; right: 30px;
	color: #fff; font-size: 40px; cursor: pointer;
	background: none; border: none; z-index: 10000;
}
.gallery-overlay .close-btn:hover { color: #ef4444; }

.gallery-overlay .nav-btn {
	position: absolute; top: 50%; transform: translateY(-50%);
	color: #fff; font-size: 48px; cursor: pointer;
	background: rgb(24 24 24 / 60%); border: none;
	padding: 16px 24px; border-radius: 12px;
	user-select: none;
}
.gallery-overlay .nav-btn.prev { left: 20px; }
.gallery-overlay .nav-btn.next { right: 20px; }

.gallery-overlay .gallery-counter {
	position: absolute; bottom: 30px;
	color: #fff; font-size: 16px;
	background: rgba(0,0,0,0.5); padding: 8px 16px; border-radius: 20px;
}

.gallery-overlay .gallery-image {
	max-width: 90%; max-height: 90vh;
	object-fit: contain; border-radius: 8px;
	transition: opacity 0.3s;
}

.empty { text-align: center; padding: 60px 20px; color: #94a3b8; }
.empty .icon { font-size: 48px; margin-bottom: 12px; }

.pagination {
	display: flex; justify-content: center; gap: 8px;
	margin-top: 24px; flex-wrap: wrap;
}
.pagination a {
	display: inline-block; padding: 8px 16px;
	background: #ffffff; border-radius: 8px;
	text-decoration: none; color: #1a2a3a; font-size: 14px;
	border: 1px solid #e2e8f0; transition: 0.2s; cursor: pointer;
}
.pagination a:hover { background: #f1f5f9; }
.pagination a.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }

.toast {
	position: fixed; bottom: 24px; right: 24px;
	background: #22c55e; color: #fff;
	padding: 16px 24px; border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
	font-weight: 600;
	transform: translateY(120px); opacity: 0;
	transition: 0.4s; z-index: 999;
}
.toast.show { transform: translateY(0); opacity: 1; }

.review-item.pending {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.pending-badge {
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 640px) {
.header {
    flex-direction: row;
    align-items: center;
    padding: 12px;
    flex-wrap: nowrap;
}
.btn-add {
    padding: 10px 12px;
}

	.review-item { padding: 16px; }
	.review-photos img { max-width: 80px; max-height: 80px; }
	.gallery-overlay .nav-btn { font-size: 32px; padding: 12px 16px; }
	.gallery-overlay .nav-btn.prev { left: 8px; }
	.gallery-overlay .nav-btn.next { right: 8px; }
	.gallery-overlay .gallery-image { max-width: 95%; max-height: 70vh; }
	.container { margin: 10px 2%; width: 96%; }
}
