/**
 * SMART КЛИЕНТ - Стили
 * Единый файл стилей для всего приложения
 */

/* =========================================
   1. ПЕРЕМЕННЫЕ И СБРОС
   ========================================= */
:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #1abc9c;
    --accent-hover: #16a085;
    --light: #ecf0f1;
    --white: #ffffff;
    --text-dark: #333;
    --text-muted: #666;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --warning: #f39c12;
    --success: #27ae60;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-sm: 6px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* =========================================
   2. ОБЩИЕ ЭЛЕМЕНТЫ UI
   ========================================= */

/* --- Логотип --- */
.logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.logo i { color: var(--accent); }

/* --- Кнопки --- */
.nav-btn {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.nav-btn:hover { background: var(--accent); }

.nav-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.nav-btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.nav-btn-danger { background: var(--danger); }
.nav-btn-danger:hover { background: var(--danger-hover); }

.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.submit-btn {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 0.9rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.promotion-countdown {
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
}

.submit-btn:hover { background: var(--secondary); }
.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* --- Формы --- */
.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2);
}
.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

/* --- Алерты и Бейджи --- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notif-item.expired {
    background: #fafafa;
    opacity: 0.7;
}
.notif-item.expired .notif-item-icon {
    background: #ddd;
    color: #999;
}
.notif-item.expired .notif-item-dot {
    background: #999;
}

.promotion-upcoming-badge {
    /* существующие стили */
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #fff3cd;
    color: #856404;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.3rem;
    /* новые ограничения */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.alert-success { background: rgba(39, 174, 96, 0.1); color: var(--success); border: 1px solid var(--success); }
.alert-error { background: rgba(231, 76, 60, 0.1); color: var(--danger); border: 1px solid var(--danger); }
.alert-warning { background: rgba(243, 156, 18, 0.1); color: var(--warning); border: 1px solid var(--warning); }
.alert-info { background: rgba(26, 188, 156, 0.1); color: var(--accent); border: 1px solid var(--accent); }

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-success { background: rgba(39, 174, 96, 0.1); color: var(--success); }
.badge-warning { background: rgba(243, 156, 18, 0.1); color: var(--warning); }
.badge-danger { background: rgba(231, 76, 60, 0.1); color: var(--danger); }
.badge-info { background-color: #e3f2fd; color: #0d47a1; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; }
.badge-accent { background: var(--accent); color: white; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }

/* --- Модальные окна --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(44, 62, 80, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 2000;
    backdrop-filter: blur(5px);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    z-index: 10;
}
.close-modal:hover { color: var(--primary); }
.modal-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
   /*  padding-right: 30px; */
}

/* --- Пагинация --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: #333;
}
.pagination button:hover, .pagination button.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.page-dots { padding: 0 0.5rem; align-self: center; color: #666; }
.pagination-info { font-size: 0.85rem; color: #666; padding: 10px; text-align: center; }

/* --- Загрузка --- */
.loading { display: flex; justify-content: center; align-items: center; padding: 2rem; }
.spinner {
    width: 40px; height: 40px;
    border: 4px solid #ddd;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.section-loading { position: relative; pointer-events: none; min-height: 200px; }
.section-loading-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; border-radius: var(--radius);
}

/* --- Рейтинг --- */
.rating-group { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.rating-btn {
    width: 50px; height: 50px;
    border: 2px solid #ddd;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
}
.rating-btn:hover { border-color: var(--warning); background: rgba(243, 156, 18, 0.1);transform: scale(1.15); }
.rating-btn.active { background: var(--warning); border-color: var(--warning); color: var(--white); }
.rating-labels { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.8rem; color: var(--text-muted); }
.star { color: #ddd; font-size: 1rem; }
.star.filled { color: var(--warning); }

/* =========================================
   3. СТРАНИЦЫ И СЕКЦИИ
   ========================================= */

/* --- Header --- */
.header {
    background: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-links { display: flex; gap: 1rem; align-items: center; }
.user-initials { display: none; }

/* --- Footer --- */
.footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.85rem;
    margin-top: auto;
}

.form-section {
    padding: 3rem 5%;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Container --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 3rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero h1 { font-size: 1.8rem; margin-bottom: 1rem; line-height: 1.3; }
.hero p { font-size: 1rem; max-width: 600px; margin: 0 auto 1.5rem; opacity: 0.9; }
.hero-cta {
    background: var(--accent);
    color: var(--white);
    padding: 0.9rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    text-decoration: none;
    display: inline-block;
}
.hero-cta:hover { transform: translateY(-3px); background: var(--accent-hover); }

/* --- Cards Grid (Main Page) --- */
.ecosystem { padding: 2.5rem 5%; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 2rem; color: var(--primary); }
.section-title h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.section-title p { font-size: 0.95rem; color: var(--text-muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-top: 4px solid var(--accent); }
.card-icon {
    font-size: 2rem; color: var(--primary); margin-bottom: 1rem;
    background: var(--light); width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.card:hover .card-icon { background: var(--primary); color: var(--white); }
.card h3 { margin-bottom: 0.5rem; color: var(--primary); font-size: 1.1rem; }
.card p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.9rem; line-height: 1.4; }
.card-tag {
    display: inline-block;
    background: rgba(26, 188, 156, 0.1);
    color: var(--accent-hover);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- Process Section --- */
.process { background: var(--white); padding: 3rem 5%; }
.steps-container { display: flex; justify-content: space-around; flex-wrap: wrap; max-width: 1000px; margin: 0 auto; gap: 2rem; }
.step { text-align: center; flex: 1; min-width: 250px; }
.step-number { font-size: 2.5rem; font-weight: 900; color: rgba(44, 62, 80, 0.1); line-height: 1; margin-bottom: -15px; position: relative; z-index: 1; }
.step-content { position: relative; z-index: 2; }
.step h4 { font-size: 1.1rem; margin-bottom: 0.3rem; color: var(--primary); }
.step p { font-size: 0.9rem; color: var(--text-muted); }

/* --- Social Proof --- */
.social-proof { padding: 3rem 5%; background: var(--light); text-align: center; }
.stats-grid { display: flex; justify-content: center; gap: 3rem; margin-top: 1.5rem; flex-wrap: wrap; }
.stat-item h3 { font-size: 2rem; color: var(--accent); margin-bottom: 0.2rem; }
.stat-item p { color: var(--secondary); font-weight: 600; font-size: 0.9rem; }

/* --- Partner List --- */
.partner-list { list-style: none; margin-top: 1rem; }
.partner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    margin-bottom: 0.8rem;
    border-radius: 8px;
    transition: var(--transition);
}
.partner-item:hover { border-color: var(--accent); background: #f9ffff; }
.partner-btn {
    background: var(--accent); color: var(--white); padding: 0.5rem 1rem; border-radius: 4px;
    text-decoration: none; font-size: 0.85rem; white-space: nowrap; margin-left: 10px; border: none; cursor: pointer;
}
.partner-btn:hover { background: var(--accent-hover); }
.partner-name { flex: 1; font-size: 0.95rem; color: var(--text-dark); }
.partner-disabled { background: #f5f5f5 !important; border: 1px dashed #ccc !important; }
.partner-btn-disabled { background: #ccc !important; cursor: not-allowed !important; pointer-events: none; }

/* --- Auth Pages --- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-container { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem; }
.auth-box {
    background: var(--white); padding: 2rem; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 400px;
}
.auth-logo { text-align: center; margin-bottom: 1rem; }
.auth-logo i { font-size: 2.5rem; color: var(--accent); }
.auth-box h2 { text-align: center; margin-bottom: 0.25rem; color: var(--primary); font-size: 1.4rem; }
.auth-box .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.code-sent-info { text-align: center; margin-bottom: 1.25rem; padding: 1rem; background: var(--light); border-radius: var(--radius-sm); }
.code-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 0.5rem; }
.code-sent-info p { color: #666; font-size: 0.85rem; margin-bottom: 0.25rem; }
.code-sent-info strong { color: var(--primary); font-size: 0.9rem; }
.code-input { text-align: center !important; font-size: 1.5rem !important; letter-spacing: 0.5rem; }
.debug-code { margin-bottom: 1rem; padding: 0.6rem; background: #fff3cd; border-radius: var(--radius-sm); text-align: center; }
.form-links { text-align: center; margin-top: 1rem; }
.form-links button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.9rem; }
.resend-code { text-align: center; margin-top: 0.75rem; }
.resend-code button { background: none; border: none; color: #666; cursor: pointer; font-size: 0.85rem; }
.resend-code button:disabled { color: #999; cursor: default; }
.auth-info { margin-top: 1.25rem; padding: 0.75rem; background: var(--light); border-radius: var(--radius-sm); text-align: center; color: #666; font-size: 0.85rem; }
.auth-link { text-align: center; margin-top: 1rem; color: #666; font-size: 0.9rem; }
.auth-link a { color: var(--accent); }

/* --- Cabinet / Dashboard --- */
.cabinet-page { min-height: 100vh; display: flex; flex-direction: column; }
.cabinet-content { flex: 1; padding: 2rem 5%; max-width: 1000px; margin: 0 auto; width: 100%; }
.welcome-section { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: var(--white); padding: 2rem; border-radius: var(--radius); margin-bottom: 2rem; }
.welcome-section h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.welcome-section p { opacity: 0.9; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.action-card {
    display: flex; align-items: center; gap: 1rem; background: var(--white); padding: 1rem 1.25rem;
    border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: var(--transition); border-left: 4px solid transparent;
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-left-color: var(--accent); }
.action-card-static { background: var(--light); cursor: default; }
.action-card-static:hover { transform: none; box-shadow: var(--shadow); }
.action-icon {
    width: 48px; height: 48px; min-width: 48px; background: var(--light); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: var(--accent);
}
.action-card:hover .action-icon { background: var(--accent); color: white; }
.action-text h3 { font-size: 0.95rem; color: var(--primary); margin-bottom: 0.15rem; }
.action-text p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.info-box { margin-top: 2rem; padding: 1.25rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.info-box h3 { color: var(--primary); margin-bottom: 0.75rem; font-size: 1rem; }
.info-box ol { color: #666; line-height: 1.8; padding-left: 1.25rem; margin: 0; font-size: 0.9rem; }

/* --- Reviews List --- */
.reviews-section h2 { color: var(--primary); margin-bottom: 1rem; font-size: 1.3rem; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }
.review-card {
    background: var(--white); padding: 1.5rem; border-radius: var(--radius-sm); box-shadow: var(--shadow);
    border-left: 4px solid var(--accent); margin-bottom: 10px;
}
.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.review-company { font-weight: 700; color: var(--primary); }
.review-service { font-size: 0.9rem; color: var(--text-muted); }
.review-rating { display: flex; gap: 0.2rem; }
.review-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }
.discount-badge { display: inline-block; background: var(--success); color: var(--white); padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; margin-top: 0.5rem; }

/* --- Discount Page --- */
.discount-page { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); }
.discount-header { background: rgba(255,255,255,0.95) !important; }
.discount-content { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1rem; min-height: calc(100vh - 60px); }
.discount-box {
    background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 420px; text-align: center;
}
.discount-icon { font-size: 4rem; color: var(--warning); margin-bottom: 0.75rem; }
.discount-icon.success { color: var(--success); }
.discount-icon.blocked { color: #999; }
.discount-title { color: var(--primary); margin-bottom: 0.25rem; font-size: 1.3rem; }
.discount-subtitle { color: #666; margin-bottom: 1.25rem; font-size: 0.95rem; }
.discount-company-card { background: var(--light); padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; position: relative; }
.discount-company-card h3 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.company-badge {
    position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--accent); color: white;
    padding: 0.15rem 0.75rem; border-radius: 12px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
}
.discount-value { font-size: 3rem; font-weight: 900; color: var(--accent); line-height: 1; }
.discount-value span:last-child { font-size: 1.5rem; }
.discount-label { color: var(--success); font-weight: 600; font-size: 0.85rem; margin-top: 0.25rem; }
.rating-section { margin-bottom: 1.25rem; }
.rating-section label { display: block; margin-bottom: 0.5rem; color: var(--secondary); font-weight: 600; font-size: 0.9rem; }
.discount-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%;
    background: var(--accent); color: white; padding: 0.9rem 1.5rem; border-radius: var(--radius-sm); font-size: 1rem;
    font-weight: 600; border: none; cursor: pointer; text-decoration: none; transition: var(--transition);
}
.discount-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.discount-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--light);
    color: var(--primary); padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.9rem;
    font-weight: 600; text-decoration: none; transition: var(--transition);
}
.success-card { background: rgba(39, 174, 96, 0.1); border: 2px solid var(--success); }
.success-label { color: var(--success); font-weight: 600; margin-bottom: 0.25rem; }
.success-value { color: var(--success); }
.company-label { color: #666; font-size: 0.9rem; margin-top: 0.5rem; }
.discount-info { margin-top: 1rem; padding: 0.75rem; background: var(--light); border-radius: var(--radius-sm); color: #666; font-size: 0.85rem; }
.discount-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.discount-actions a { flex: 1; }
.form-section h2 {margin: 0;color: var(--primary);font-size: 1.6rem;}


/* =========================================
   4. АДМИН-ПАНЕЛЬ (ДЕСКТОП)
   ========================================= */
.admin-page { min-height: 100vh; display: flex; }

/* Сайдбар */
.admin-sidebar {
    width: 250px; background: var(--primary); color: var(--white);
    padding: 1.5rem 0; position: fixed; height: 100vh; overflow-y: auto;
    /* Mobile ready: hidden by default on mobile, controlled by JS class */
    left: -260px; 
    top: 0;
    z-index: 1050;
    transition: left 0.3s ease;
}
.admin-sidebar.active { left: 0; } /* Open state for mobile */
.admin-sidebar .logo { padding: 0 1.5rem; margin-bottom: 2rem; color: #1abc9c; }
.admin-nav { list-style: none; }
.admin-nav li { margin-bottom: 0.25rem; }
.admin-nav a {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8); text-decoration: none; transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.1); color: var(--white); }
.admin-nav i { width: 20px; text-align: center; }

/* Основной контент */
.admin-main {
    flex: 1; margin-left: 0; /* Mobile first: no margin */
    padding: 1rem; background: #f8f9fa; min-height: 100vh;
}
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.admin-header h1 { color: var(--primary); font-size: 1.5rem; }

/* Статистика */
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card h3 { font-size: 2rem; color: var(--accent); margin-bottom: 0.25rem; }
.stat-card p { color: var(--text-muted); font-size: 0.9rem; }
.stat-card .label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }

/* Таблицы */
.table-container { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid #eee; }
.table-header h3 { color: var(--primary); font-size: 1.1rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
.data-table th { background: #f8f9fa; font-weight: 600; color: var(--secondary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:hover { background: #f8f9fa; }
.data-table .actions { display: flex; gap: 0.5rem; }
.data-table tr.row-warning { background-color: #fff5f5 !important; }
.data-table tr.row-warning:hover { background-color: #ffebeb !important; }
.data-table tr.row-warning td { border-bottom-color: #ffd6d6; }

/* QR Code Section (Admin) */
.qr-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.qr-info-box { background: var(--light); padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.qr-info-box p { margin: 0; font-size: 0.9rem; color: #666; line-height: 1.6; }
.qr-result-container { display: none; text-align: center; padding: 2rem; background: var(--light); border-radius: var(--radius); margin-top: 1.5rem; }
.qr-result-container.active { display: block; }
.qr-result-title { margin-bottom: 0.5rem; color: var(--primary); }
.qr-result-type { margin-bottom: 1rem; color: var(--accent); font-weight: 600; }
.qr-result-image { background: white; padding: 1.5rem; display: inline-block; border-radius: 8px; margin-bottom: 1rem; }
.qr-result-url { word-break: break-all; color: #666; margin-bottom: 1rem; }
.btn-group-center { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.qr-section { text-align: center; padding: 2rem; }
.qr-code { width: 200px; height: 200px; margin: 1rem auto; background: var(--white); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }

/* Мобильная шапка админки (гамбургер) */
.mobile-header-toggle {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 900;
    align-items: center; padding: 0 1rem; justify-content: space-between;
}
.mobile-header-toggle .logo { font-size: 1rem; color: var(--primary); }
.menu-toggle-btn { background: none; border: none; font-size: 1.5rem; color: var(--primary); cursor: pointer; padding: 0.5rem; }

/* Затемнение фона при открытом меню */
.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1040; opacity: 0; transition: opacity 0.3s;
}
.sidebar-overlay.active { display: block; opacity: 1; }

body.modal-open {
    overflow: hidden;
}

/* --- Сворачиваемый блок (Info Box) --- */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none; /* Чтобы текст не выделялся при быстрых кликах */
}

.collapsible-header h3 {
    margin: 0; /* Убираем отступы у заголовка внутри */
}

.collapsible-icon {
    transition: transform 0.3s ease;
    font-size: 1rem;
    color: var(--text-muted);
}

#about.info-box {
    margin-top: inherit;
    padding: 3rem 5%;
    background: none;
    border-radius: inherit;
    box-shadow: none;
}

/* Повернутая стрелка когда блок закрыт */
.collapsible-collapsed .collapsible-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease, padding 0.3s ease;
    max-height:  max-content; /* Достаточно много для контента */
    opacity: 1;
}

/* Состояние "Скрыто" */
.collapsible-collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    border: none;
}


/* =========================================
   5. АДАПТИВ (RESPONSIVE)
   ========================================= */

@media (min-width: 769px) {
    /* Восстанавливаем сайдбар для десктопа */
    .admin-sidebar {
        left: 0; /* Показываем */
    }
    .admin-main {
        margin-left: 250px; /* Отступ для контента */
        padding-top: 2rem;
    }
    .mobile-header-toggle {
        display: none; /* Прячем гамбургер */
    }
        .info-box-mobile-hide .collapsible-header {
        cursor: default; /* Убираем указатель клика */
    }
    
    .info-box-mobile-hide .collapsible-icon {
        display: none; /* Прячем стрелку */
    }
    
    .info-box-mobile-hide .collapsible-content {
        max-height: none !important; /* Убираем ограничение высоты */
        opacity: 1 !important;
        padding-top: inherit !important;
        padding-bottom: inherit !important;
    }
    
    /* Убираем возможность сворачивания */
    .info-box-mobile-hide.collapsible-collapsed .collapsible-content {
        max-height: none !important;
        opacity: 1 !important;
        padding-top: inherit !important;
        padding-bottom: inherit !important;
    }
}

@media (max-width: 768px) {
    /* --- Mobile Header --- */
    .header { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
    .header .logo { font-size: 0.95rem; }
    .nav-links { gap: 0.5rem; flex-wrap: wrap; }
    .nav-btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
    .nav-btn-outline { border: 0px solid var(--primary); }
    .hero-cta {font-size: 0.85rem;}
    .stat-item p {font-size: 0.8rem;}
    .stat-item h3 {font-size: 1.5rem;}
    .form-section h2 {font-size: 1.3rem;}
    #about.info-box {padding: 1.5rem 5%;}
    .stats-grid {gap: 2rem;}
    .social-proof {padding: 2rem 5%;}
    /* User initials mobile */
    .user-initials { display: inline-block; min-width: 32px; height: 32px; line-height: 32px; text-align: center; background: var(--accent); color: white; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }
    .user-full-name { display: none; }

    /* --- Mobile Cabinet --- */
    .welcome-section { padding: 1.25rem; }
    .welcome-section h1 { font-size: 1.1rem; }
    .quick-actions { gap: 0.75rem; }
    .action-card { padding: 0.75rem 1rem; }
    .action-icon { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }
    .action-text h3 { font-size: 0.85rem; }
    .action-text p { display: none; }

    /* --- Mobile Auth Pages --- */
    .auth-container { padding: 1rem; }
    .auth-box { padding: 1.5rem; }
    .auth-logo i { font-size: 2rem; }
    .auth-box h2 { font-size: 1.2rem; }
    .code-input { font-size: 1.25rem !important; }
    
    /* --- Mobile Discount Page --- */
    .discount-content { padding: 1rem; }
    .discount-box { padding: 1.25rem; }
    .discount-value { font-size: 2.5rem; }
    .discount-actions { flex-direction: column; gap: 0.5rem; }

    /* --- Main Page Mobile --- */
    .hero { padding: 2rem 4%; }
    .hero h1 { font-size: 1.5rem; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .card { padding: 1rem; border-radius: 8px; }
    .card-icon { width: 45px; height: 45px; font-size: 1.5rem; margin-bottom: 0.5rem; }
    .card h3 { font-size: 0.9rem; margin-bottom: 0.3rem; }
    .card p { display: none; }
    .modal-content { width: 100%; height: 100%; max-height: 100vh; max-width: 100%; border-radius: 0; padding: 1.5rem; overflow-y: auto; }

    /* --- Mobile Admin Panel --- */
    .mobile-header-toggle { display: flex; } /* Показываем гамбургер */
    
    /* Сайдбар скрыт по умолчанию (left: -260px), открывается классом .active */
    .admin-main { padding-top: 80px; margin-left: 0; }
    
    /* Stats in 2 cols */
    .stats-cards { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    
    /* Grid layouts to single col */
    .admin-main > section > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    
    /* --- Table to Card Transformation --- */
    .data-table { border: none; background: transparent; }
    .data-table thead { display: none; }
    .data-table tbody { display: flex; flex-direction: column; gap: 1rem; }
    .data-table tr {
        display: block; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
        padding: 1rem; border-left: 4px solid var(--accent); margin-bottom: 0;
    }
    .data-table tr.row-warning { border-left-color: var(--danger); background: #fff5f5; }
    .data-table td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0.5rem 0; border-bottom: 1px solid #eee; text-align: right !important;
    }
    .data-table td:last-child {
        border-bottom: none; margin-top: 0.5rem; padding-top: 1rem;
        justify-content: flex-end; gap: 0.5rem;
    }
    .data-table td::before {
        content: attr(data-label); font-weight: 600; color: var(--secondary);
        text-align: left; margin-right: 1rem; font-size: 0.85rem;
    }
    .data-table tr > td[colspan] { display: block; text-align: center !important; border-bottom: none; padding: 2rem; }
    .data-table tr > td[colspan]::before { display: none; }

    /* Forms & Filters Mobile */
    .form-box > div { flex-direction: column !important; }
    .form-group { width: 100% !important; min-width: 100% !important; }
    .qr-options-grid { grid-template-columns: 1fr; }
    .qr-result-container { padding: 1.5rem 1rem; }
        
        .card-tag {
    padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
        }
        /* .table-container {
    background: none;
    box-shadow: none;
        } */
        .qr-result-image {
    padding: 1.0rem;
        }


        
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.3rem; }
    .section-title h2 { font-size: 1.5rem; }
    .grid { gap: 0.6rem; }
    .card { padding: 0.8rem; }
    .card-icon { width: 40px; height: 40px; font-size: 1.3rem; }
    .card h3 { font-size: 0.85rem; }

    .auth-box { padding: 1.5rem; }
}

/* Поддержка: чат и тикеты */
.ticket-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}
.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.ticket-title {
    font-size: 1rem;
}
.ticket-subject {
    margin-left: 0.5rem;
    font-weight: normal;
}
.ticket-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ticket-binding {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--accent);
}
.ticket-binding-badge {
   /* background: #e3f2fd;*/
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}
.ticket-date {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 0.5rem;
}
.ticket-last-message {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}
/* Чат */
#newMessage {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}
.chat-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.chat-buttons button {
    flex: 1;
}

.action-card-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.action-card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.partner-phone-link {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}
.partner-phone-link:hover {
    background: var(--accent);
}

.status-new { background: #e74c3c; color: white; }
.status-in_progress { background: #f39c12; color: white; }
.status-resolved { background: #2ecc71; color: white; }
.status-closed { background: #95a5a6; color: white; }

.chat-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
.chat-message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}
.chat-message.user { align-items: flex-start; }
.chat-message.admin { align-items: flex-end; }
.message-bubble {
    max-width: 70%;
    padding: 0.75rem;
    border-radius: 12px;
    background: var(--primary);
    color: white;
}
.message-bubble.admin {
    background: #e9ecef;
    color: #333;
}
.message-meta {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.2rem;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.cookie-banner.show {
    transform: translateY(0);
}
.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}
.cookie-banner a {
    color: var(--accent);
    text-decoration: underline;
}
.cookie-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.cookie-btn:hover {
    background: var(--accent-hover);
}
@media (max-width: 480px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}
/* --- Кастомный чекбокс --- */
.form-checkbox {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    width: auto;
    font-weight: normal;
}

.form-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    flex-shrink: 0;
    height: 20px;
    width: 20px;
    background-color: var(--white);
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.form-checkbox:hover .checkmark {
    border-color: var(--accent);
}

.form-checkbox input:checked ~ .checkmark {
    background-color: var(--accent);
    border-color: var(--accent);
}

.checkmark:after {
    content: "";
    display: none;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.form-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.checkbox-text a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkbox-text a:hover {
    color: var(--accent-hover);
}

.unread-badge {
    background: #e74c3c;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    margin-left: 8px;
    font-weight: 600;
}

/* =========================================
   6. АКЦИИ И СКИДКИ
   ========================================= */

/* --- Слайдер акций (кабинет) --- */
.promotions-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
}
.promotions-slider::-webkit-scrollbar {
    height: 6px;
}
.promotions-slider::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.promotion-slide {
    width: 280px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    scroll-snap-align: start;
    flex-shrink: 0;
}
.promotion-slide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.promotion-slide-image {
    height: 160px;
    overflow: hidden;
    background: var(--light);
}
.promotion-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promotion-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent);
    background: linear-gradient(135deg, var(--light) 0%, #d5f5e3 100%);
}


.promotion-slide-info {
    padding: 1rem;
}
.promotion-slide-info h4 {
    color: var(--primary);
    margin-bottom: 0.35rem;
    font-size: 1rem;
}
.promotion-slide-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.promotion-period {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(26, 188, 156, 0.1);
    color: var(--accent-hover);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- Сетка акций (страница акций) --- */
.promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.promotion-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}
.promotion-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.promotion-card-image {
    height: 250px;
    overflow: hidden;
    background: var(--light);
}
.promotion-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.promotion-card:hover .promotion-card-image img {
    transform: scale(1.05);
}

.promotion-card-body {
    padding: 1.25rem;
}
.promotion-card-body h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}
.promotion-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.promotion-card-company {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* --- Детали акции (модалка) --- */
.promotion-detail-modal {
    max-width: 600px;
}
.promotion-detail-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1rem;
}
.promotion-detail-image img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}
.promotion-detail-period {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(26, 188, 156, 0.1);
    color: var(--accent-hover);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.promotion-detail-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.promotion-detail-company {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.promotion-company-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}
.promotion-company-link:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* --- Админка: статус акции --- */
.status-active {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}
.status-inactive {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

/* --- Адаптив для акций --- */
@media (max-width: 768px) {
    .promotions-slider {
        gap: 0.75rem;
    }
    .promotion-slide {
        min-width:inherit; 
        width: 240px;
    }
    .promotion-slide-image {
        height: 130px;
    }
    .promotions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .promotion-card-body h3 {
        font-size: 0.85rem;
    }
    .promotion-card-desc,
    .promotion-card-company {
        font-size: 0.75rem;
    }
    .promotion-card-image {
        height: 120px;
    }
    .promotion-no-image {
        height: 80px;
        font-size: 1.5rem;
    }
    .promotions-main-section {
        padding: 2rem 4%;
    }
}

/* --- Секция акций на главной странице --- */
.promotions-main-section {
    width: 100%;
    background: var(--light);
}

.promotions-section-wrapper {
    padding: 2.5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}


.promotions-main-section .section-title h2 {
    font-size: 1.6rem;
}
.promotions-main-section .promotions-slider {
    justify-content: flex-start;
}

/* =========================================
   7. ВИДЖЕТ УВЕДОМЛЕНИЙ (КОЛОКОЛЬЧИК)
   ========================================= */

/* Контейнер колокольчика */
.notifications-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    transition: background 0.2s;
}
.notifications-bell:hover {
    background: rgba(26, 188, 156, 0.1);
}
.notifications-bell > i {
    font-size: 1.2rem;
    color: var(--primary);
    transition: color 0.2s;
}
.notifications-bell:hover > i {
    color: var(--accent);
}

/* Бейдж непрочитанных */
.notifications-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    pointer-events: none;
    transition: transform 0.2s;
}
.notifications-badge:empty,
.notifications-badge[data-count="0"] {
    display: none;
}

/* Dropdown */
.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    max-height: 420px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.notifications-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

/* Dropdown Header */
.notifications-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}
.notifications-dropdown-header h4 {
    font-size: 0.9rem;
    color: var(--primary);
    margin: 0;
}
.notifications-dropdown-header button {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.notifications-dropdown-header button:hover {
    background: rgba(26, 188, 156, 0.1);
}

/* Dropdown List */
.notifications-dropdown-list {
    flex: 1;
    overflow-y: auto;
    max-height: 320px;
}

/* Empty State */
.notifications-dropdown-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
}
.notifications-dropdown-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}
.notifications-dropdown-empty p {
    font-size: 0.85rem;
    margin: 0;
}

/* Notification Item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}
.notif-item:hover {
    background: #f9fffe;
}
.notif-item:last-child {
    border-bottom: none;
}

/* Unread indicator */
.notif-item.unread {
    background: #f0faf8;
}
.notif-item.unread:hover {
    background: #e6f7f3;
}
.notif-item .notif-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    margin-top: 6px;
}
.notif-item.unread .notif-item-dot {
    background: var(--accent);
}

/* Notification Icon */
.notif-item-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.9rem;
}

/* Notification Body */
.notif-item-body {
    flex: 1;
    min-width: 0;
}
.notif-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notif-item-message {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 3px;
}

/* Dropdown Footer */
.notifications-dropdown-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid #eee;
    text-align: center;
    background: #fafafa;
}
.notifications-dropdown-footer a {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.notifications-dropdown-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.form-section .collapsible-header {
    justify-content: center;
}

/* Mobile Adaptations for Notifications */
@media (max-width: 768px) {
    .notifications-bell {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1001;
        background: var(--white);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    .notifications-bell > i {
        font-size: 1.1rem;
    }
    .notifications-badge {
        top: -4px;
        right: -6px;
    }
    .notifications-dropdown {
        position: fixed;
        top: 56px;
        right: 0;
        left: auto;
        width: 100%;
        max-width: 360px;
        max-height: 70vh;
        border-radius: 0 0 var(--radius) var(--radius);
        transform: translateY(0);
    }
    .notifications-dropdown.open {
        transform: translateY(0);
    }
}

/* =========================================
   ЗАГРУЗКА ИЗОБРАЖЕНИЙ
   ========================================= */

.image-upload-area {
    border: 2px dashed #ccc;
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    background: #fafafa;
    min-height: 120px;
    position: relative;
}

.image-upload-area:hover {
    border-color: var(--accent);
    background: #f0faf7;
}

.image-upload-placeholder {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: var(--transition);
}

.image-upload-placeholder:hover {
    opacity: 0.8;
}

.image-upload-placeholder p {
    margin: 0.3rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.image-upload-placeholder small {
    color: #999;
    font-size: 0.8rem;
}

.image-preview-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 250px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.image-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: 2px solid #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: var(--transition);
    z-index: 1;
}

.image-remove-btn:hover {
    background: var(--danger-hover);
    transform: scale(1.1);
}

/* =========================================
   БЕЙДЖ ОТЗЫВА (в тикетах поддержки)
   ========================================= */

.review-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.review-badge:hover {
    background: #ffe0b2;
}

.review-badge i {
    font-size: 0.8rem;
}

#companiesGrid span.card-tag{
    display: none;
}
