/* --- Глобальные переменные --- */
:root {
    --primary: #1A5D1A; /* Глубокий зеленый */
    --secondary: #F0A500; /* Янтарный/золотой */
    --background: #F4F6F9; /* Светло-серый фон */
    --card-bg: #FFFFFF; /* Белый фон карточек */
    --text-color: #333333;
    --light-text: #6c757d;
    --success: #27AE60;
    --danger: #E74C3C;
    --border-color: #E0E0E0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --top-color: #B7950B; /* Цвет для ТОП-элементов */
}

/* --- Сброс стилей и базовые настройки --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    padding-bottom: 80px; /* БЫЛО 70px, УВЕЛИЧИВАЕМ ДЛЯ ЗАПАСА */
}

a {
    text-decoration: none;
    color: var(--primary);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Header --- */
.header {
    /* ИЗМЕНЕНИЕ: Уменьшаем вертикальный отступ */
    background-color: var(--primary);
    color: white;
    padding: 10px 0; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    /* ИЗМЕНЕНИЕ: Уменьшаем размер лого */
    font-size: 1.2rem; 
    font-weight: 700;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ИЗМЕНЕНИЕ: Скрываем selector */
.segment-selector {
    display: none; 
} 

.server-status {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 1; 
    /* ИЗМЕНЕНИЕ: Убираем текст "API" по умолчанию */
    color: transparent; 
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0px; 
    background: var(--danger);
    box-shadow: 0 0 5px var(--danger);
}

/* --- Навигация и Секции --- */
.section {
    padding: 20px 0;
    display: none;
}

.section.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-subtitle {
    color: var(--light-text);
    margin-bottom: 15px;
}

/* --- Bottom Nav --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    max-width: 800px;
    margin: 0 auto;
    padding: 5px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
    cursor: pointer;
    color: var(--light-text);
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item span {
    font-size: 0.75rem;
    margin-top: 3px;
    font-weight: 600;
}

.nav-item.active {
    color: var(--primary);
}

/* --- Кнопка FAB --- */
.fab {
    position: fixed;
    bottom: 80px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
    transition: transform 0.2s;
}

.fab:active {
    transform: scale(0.95);
}

/* --- Hero Banner (Скрываем) --- */
.hero-banner {
    display: none; 
    background: var(--primary);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero-banner h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 800;
}

.hero-banner p {
    font-size: 1rem;
    opacity: 0.8;
}

.hero-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* --- Рекламный фрейм (4.0) --- */
.promo-frame {
    background-color: #FFFDE7; /* Светло-желтый фон */
    color: #C67600; /* Темно-желтый текст */
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--secondary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
}

.promo-frame i {
    font-size: 1.2rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.promo-text {
    overflow: hidden;
    text-overflow: ellipsis;
}


/* --- Quick Access Grid --- */
.quick-access h3 {
    /* ИЗМЕНЕНИЕ: Скрываем заголовок "Быстрый доступ" */
    display: none; 
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary);
}

.grid {
    display: grid;
    gap: 15px;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.feature-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.feature-card:active {
    transform: scale(0.98);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.feature-name {
    font-weight: 700;
    font-size: 1rem;
}

.feature-desc {
    font-size: 0.75rem;
    color: var(--light-text);
}

/* --- Promotions --- */
.promotions-section h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary);
}

.promotions-grid {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
}

.promotion-card {
    flex: 0 0 280px; /* Фиксированная ширина */
    background: #FFFAF0; /* Светло-бежевый */
    border: 1px solid #FFEBCD;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.promotion-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.promotion-badge {
    color: var(--danger);
}

.promotion-date {
    color: var(--light-text);
}

.promotion-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4A4A4A;
    margin-bottom: 5px;
}

.promotion-desc {
    font-size: 0.9rem;
    color: #6A6A6A;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Улучшенная совместимость для ограничения текста 2 строками */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* Стандартное свойство (для будущих версий) */
    line-clamp: 2; 
    box-orient: vertical;
}

.promotion-code, .promotion-discount {
    font-size: 0.9rem;
    margin-top: 5px;
    color: var(--primary);
}

/* --- NEW: Дополнительные блоки контента на Главной --- */
.homepage-content-block {
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.homepage-content-block h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.top-supplier-block {
    background: #E8F5E9; /* Light Green */
    border-left: 5px solid var(--success);
}

.top-restaurant-block {
    background: #EAF4FF; /* Light Blue */
    border-left: 5px solid #007BFF;
}

.announcement-block {
    background: #FFFBEA; /* Light Yellow */
    border-left: 5px solid var(--secondary);
}

.block-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* --- Market/HR Content --- */
.toggle-switch {
    display: flex;
    background: #E0E0E0;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 8px 15px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    color: var(--light-text);
    transition: background 0.2s, color 0.2s;
}

.toggle-btn.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cat-grid, .items-grid, .vacancies-grid, .users-grid, .suppliers-grid, .restaurants-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.cat-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.cat-card {
    background: var(--card-bg);
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.cat-card:active {
    transform: scale(0.98);
}

.cat-icon {
    font-size: 2rem;
    display: block;
}

.cat-name {
    font-weight: 600;
    margin-top: 5px;
    font-size: 0.9rem;
}

.back-bar {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary);
    cursor: pointer;
}

.back-bar i {
    margin-right: 10px;
}

/* --- Product Card (Market) (2.3) --- */
.product-card, .vacancy-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    /* Усиленный стиль для выделения объявления */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); 
    border: 1px solid var(--border-color); /* Добавим рамку */
    position: relative;
}

.product-card.promo {
    border: 2px solid var(--secondary);
    background: #FFFBEA;
}

.product-header {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex-grow: 1;
}

.product-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    background: #E8F5E9;
    color: var(--primary);
    margin-bottom: 5px;
    display: inline-block;
}

.product-tag.promo {
    background: var(--secondary);
    color: white;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.3;
}

.product-meta {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-bottom: 5px;
    display: flex; /* Для размещения в ряд */
    flex-wrap: wrap;
    gap: 5px; /* Промежуток между мета-тегами */
    align-items: center;
}

/* НОВОЕ: Стиль для отображения срока жизни */
.badge-duration {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: #F4F4FF; /* Светло-сиреневый */
    color: #4A4A4A;
}


.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger);
}

.unit {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--light-text);
}

.product-description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
}

/* --- Product Actions (2.3 - Улучшение контактов) --- */
.product-actions {
    margin-top: 10px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

/* ИЗМЕНЕНИЕ ДЛЯ КОМПАКТНОСТИ В MINI APP */
.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 6px 8px; /* Уменьшен padding */
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem; /* Уменьшен font-size */
    transition: background 0.2s;
    text-decoration: none; 
}

.btn-contact i {
    margin-right: 5px;
}

.btn-wa {
    background: #25D366;
    color: white;
}

.btn-tg {
    background: #0088cc;
    color: white;
}


/* --- Vacancy Card (HR) --- */
.vacancy-card {
    background: #F7F7F7;
}

.vacancy-card.cv {
    background: #EAF4FF; /* Более светлый фон для резюме */
}

.vacancy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    /* ИЗМЕНЕНИЕ: Включаем flex-wrap для адаптивности */
    flex-wrap: wrap; 
    gap: 5px;
}

.vacancy-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.vacancy-salary {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 3px;
}

.vacancy-company {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
}

.vacancy-company i {
    margin-right: 5px;
}

.vacancy-description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
}

/* --- User Card (Community) --- */
.users-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.user-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* НОВОЕ: Выделение ТОП-пользователей */
.user-card.top-user-card {
    background: #FFFBEA; /* Светло-желтый фон */
    border: 2px solid var(--secondary);
    box-shadow: 0 6px 15px rgba(240, 165, 0, 0.2);
}


.user-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.user-card.top-user-card .user-header {
    border-bottom-color: var(--secondary);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-card.top-user-card .user-avatar {
    background: var(--top-color);
    box-shadow: 0 0 10px rgba(240, 165, 0, 0.5);
}

.user-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.user-role {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 3px;
}

.user-company {
    font-size: 0.8rem;
    color: var(--light-text);
}

.user-company i {
    margin-right: 5px;
}

/* НОВОЕ: Стиль для комментария ТОП-пользователя */
.user-top-comment {
    font-size: 0.85rem;
    color: var(--top-color);
    margin-top: 5px;
    background: #FFFDEE;
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid #FFEBCD;
    font-style: italic;
}

.user-top-comment i {
    margin-right: 5px;
}


.user-contacts {
    display: flex;
    gap: 10px;
}

.user-contacts button {
    flex: 1;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-li {
    background: #0077B5;
    color: white;
}


/* --- Supplier Card --- */
.suppliers-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.supplier-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.supplier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.supplier-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3px;
}

.supplier-company {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.supplier-type {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

.supplier-verified {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
    margin-top: 5px;
}

.supplier-details {
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
}

.detail-item i {
    margin-right: 10px;
    margin-top: 4px;
    color: var(--primary);
    flex-shrink: 0;
}

.supplier-actions {
    display: flex;
    gap: 10px;
}

/* --- Supplier Detail Page --- */
.supplier-detail-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.supplier-detail-meta {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 20px;
}

.supplier-detail-info h3 {
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
    color: var(--primary);
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.supplier-detail-info p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.supplier-detail-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.supplier-detail-info li {
    background: #F7F7F7;
    padding: 8px 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.contact-item i {
    margin-right: 10px;
}

.contact-item[href*="whatsapp"] { background: #25D366; }
.contact-item[href*="t.me"] { background: #0088cc; }
.contact-item[href*="mailto"] { background: #3498DB; }
.contact-item[href*="http"] { background: #95A5A6; }

/* --- Filter Tags --- */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-tag {
    padding: 8px 15px;
    border-radius: 20px;
    background: #E0E0E0;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag.active {
    background: var(--primary);
    color: white;
}

/* --- Restaurant Card --- */
.restaurants-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.restaurant-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--secondary);
}

.restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.restaurant-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4A4A4A;
}

.restaurant-meta {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.restaurant-meta i {
    color: var(--secondary);
}

.restaurant-desc {
    font-size: 0.9rem;
    color: #6A6A6A;
    margin-bottom: 15px;
}

/* --- Admin Panel on Home --- */
.admin-panel {
    margin-top: 30px;
    padding: 20px;
    background: #EAF4FF;
    border: 1px solid #B3D9FF;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-panel h3 {
    font-size: 1.3rem;
    color: #007BFF;
    margin: 0;
}

.badge-secure {
    padding: 5px 10px;
    background: #28A745;
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-stats {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 20px;
}

.admin-stat {
    text-align: center;
    font-size: 0.8rem;
    color: #555;
}

.admin-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007BFF;
}

.admin-actions {
    display: flex;
    gap: 10px;
    border-top: 1px dashed #B3D9FF;
    padding-top: 15px;
}

.admin-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

/* --- Buttons --- */
/* ИЗМЕНЕНИЕ ДЛЯ КОМПАКТНОСТИ В MINI APP */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 12px; /* Уменьшен padding */
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem; /* Уменьшен font-size */
}

.btn-secondary {
    background: #E0E0E0;
    color: var(--text-color);
    border: none;
    padding: 8px 12px; /* Уменьшен padding */
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem; /* Уменьшен font-size */
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-card {
    background: var(--card-bg);
    border-radius: 15px;
    max-width: 90%;
    width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
}

/* --- Form Styles --- */
.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    margin-top: 10px;
}

.form-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    background: #F9F9F9;
}

.form-input:focus {
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    flex: 1;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

/* --- Upload Box --- */
.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-box:hover {
    border-color: var(--primary);
}

#upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
}

#upload-placeholder i {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 5px;
    display: block;
}

/* --- Pricelist Modal Styles (3.3) --- */
.upload-help {
    background: #F0F4FF;
    border: 1px solid #D0D9EF;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.upload-help h4 {
    margin: 5px 0 10px 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.upload-help p {
    font-size: 0.9rem;
    color: #555;
}

.upload-box-large {
    border: 3px dashed var(--primary);
    background: #F9F9FF;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    border-radius: 15px;
    margin-top: 20px;
    transition: all 0.2s;
}

.upload-box-large:hover {
    background: #F0F4FF;
}

.upload-box-large i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-top: 5px;
}

.progress-bar {
    background-color: #E0E0E0;
    border-radius: 5px;
    height: 10px;
    margin-top: 15px;
}

.progress-fill {
    background-color: var(--success);
    height: 100%;
    width: 0%;
    border-radius: 5px;
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #555;
}

/* --- Delivery Zones (Supplier Modal) --- */
.delivery-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.zone-tag {
    padding: 8px 12px;
    border: 1px solid #D0D0D0;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #F0F0F0;
    transition: all 0.2s;
}

.zone-tag.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: 100;
    cursor: pointer;
}

#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

/* --- Badges --- */
.badge-region {
    padding: 3px 8px;
    border-radius: 5px;
    background: #EAF4FF;
    color: #007BFF;
    font-size: 0.75rem;
    font-weight: 600;
}

.verified-badge {
    color: var(--success);
    font-weight: 600;
    font-size: 0.8rem;
}

.premium-badge {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.8rem;
}

/* --- Admin Styles (Mini App version) --- */
.admin-tab {
    padding: 10px 15px;
    background: #E0E0E0;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
}

.admin-tab.active {
    background: var(--primary);
    color: white;
}

.admin-tab-content {
    padding-top: 20px;
}

/* --- Media Queries --- */
@media (max-width: 600px) {
    .header .logo {
        font-size: 1.2rem;
    }
    
    /* ИЗМЕНЕНИЕ: На маленьких экранах скрываем текст "API" в server-status */
    .server-status {
        color: transparent; 
        font-size: 0;
    }

    .hero-banner {
        padding: 20px;
    }
    
    .hero-banner h1 {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .bottom-nav-inner {
        padding: 5px 0;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        font-size: 1.4rem;
    }
    
    .fab {
        right: 15px;
        bottom: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group:not(:last-child) {
        margin-bottom: 15px;
    }
    
    /* Убедимся, что мета-информация не занимает слишком много места */
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Дополнительная настройка для мобильных устройств */
    .badge-region, .badge-duration {
        margin-top: 5px; /* Немного отступа между элементами */
    }
}