 * { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Arial, sans-serif; 
}

body { 
    background: #f1f5fa; 
    padding: 12px; 
}

.container { 
    max-width: 1400px; 
    margin: auto; 
    background: white; 
    padding: 20px; 
    border-radius: 20px; 
    box-shadow: 0 20px 50px rgba(0,0,0,.08); 
}

.header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
    flex-wrap: wrap;
    gap: 10px;
}

.header h1 { 
    color: #0b2b5e; 
    font-size: clamp(18px, 4vw, 28px);
}

.header button { 
    border: 0;
    background: #0b2b5e;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: clamp(12px, 2vw, 14px);
    white-space: nowrap;
}

.header button:hover {
    background: #1a3f72;
}

.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    margin-bottom: 25px; 
}

.stat-card { 
    background: #f7faff; 
    padding: 15px 10px; 
    border-radius: 16px; 
    text-align: center; 
}

.stat-card i { 
    font-size: clamp(20px, 4vw, 30px); 
    color: #0b2b5e; 
}

.stat-card strong { 
    display: block; 
    font-size: clamp(22px, 5vw, 28px); 
    margin: 6px 0; 
}

.stat-card p { 
    font-size: clamp(11px, 1.8vw, 14px); 
    color: #63778d; 
}

.stat-card .sub-text {
    font-size: clamp(9px, 1.2vw, 11px);
    color: #8a9bb0;
    margin-top: 2px;
}

.charts-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 20px; 
    margin-bottom: 25px; 
}

.chart-box { 
    background: #f7faff; 
    padding: 15px; 
    border-radius: 16px; 
    overflow: hidden;
}

.chart-box h3 { 
    margin-bottom: 12px; 
    color: #0b2b5e; 
    font-size: clamp(14px, 2.5vw, 18px);
    text-align: center;
}

.chart-box canvas { 
    max-height: 200px; 
    max-width: 100%;
    height: auto !important;
    width: 100% !important;
}

.top-ads { 
    background: #f7faff; 
    padding: 15px; 
    border-radius: 16px; 
}

.top-ads h3 { 
    margin-bottom: 12px; 
    color: #0b2b5e; 
    font-size: clamp(14px, 2.5vw, 18px);
}

.ad-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 0; 
    border-bottom: 1px solid #e5edf6; 
    font-size: clamp(12px, 1.8vw, 14px);
    flex-wrap: wrap;
    gap: 5px;
}

.ad-item:last-child { 
    border-bottom: 0; 
}

.ad-item .title {
    font-weight: 500;
    flex: 1;
    min-width: 100px;
}

.ad-item .clicks-badge {
    background: #0b2b5e;
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: clamp(11px, 1.5vw, 13px);
    white-space: nowrap;
}

.ad-item .unique-badge {
    background: #168344;
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: clamp(11px, 1.5vw, 13px);
    white-space: nowrap;
}

.error-box { 
    text-align: center; 
    padding: 40px 20px; 
    color: #d93434; 
}

.error-box i { 
    font-size: 48px; 
}

.error-box p { 
    margin-top: 15px; 
    font-size: clamp(16px, 3vw, 20px); 
}

.error-box button { 
    margin-top: 20px;
    padding: 10px 30px;
    border: 0;
    border-radius: 20px;
    background: #0b2b5e;
    color: white;
    cursor: pointer;
    font-size: clamp(14px, 2vw, 16px);
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: clamp(14px, 2vw, 16px);
}

/* ===== АДАПТИВ ===== */
@media (min-width: 600px) {
    .stats-grid { 
        grid-template-columns: repeat(5, 1fr); 
        gap: 20px; 
    }
    
    .charts-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 30px; 
    }
    
    .chart-box { 
        padding: 25px; 
    }
    
    .chart-box canvas { 
        max-height: 250px; 
    }
    
    body { 
        padding: 20px; 
    }
    
    .container { 
        padding: 35px; 
        border-radius: 24px; 
    }
}

@media (max-width: 500px) {
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 400px) {
    body { 
        padding: 6px; 
    }
    
    .container { 
        padding: 12px; 
        border-radius: 14px; 
    }
    
    .stats-grid { 
        gap: 8px; 
    }
    
    .stat-card { 
        padding: 12px 8px; 
        border-radius: 12px; 
    }
    
    .chart-box { 
        padding: 10px; 
        border-radius: 12px; 
    }
    
    .header h1 { 
        font-size: 16px; 
    }
    
    .header button { 
        padding: 6px 14px; 
        font-size: 11px; 
    }
}

.feedback-admin-section {
    background: #f7faff;
    padding: 20px;
    border-radius: 16px;
    margin-top: 25px;
}

.feedback-admin-section h3 {
    color: #0b2b5e;
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== ФИЛЬТРЫ ===== */
.feedback-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.feedback-filters .filter-btn {
    padding: 6px 16px;
    border: 2px solid #e5edf6;
    border-radius: 20px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #63778d;
    cursor: pointer;
    transition: all 0.25s ease;
}

.feedback-filters .filter-btn:hover {
    border-color: #b8c8dd;
}

.feedback-filters .filter-btn.active {
    border-color: #0b2b5e;
    background: #edf3fa;
    color: #0b2b5e;
}

/* ===== СПИСОК ОТЗЫВОВ ===== */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 4px;
}

.feedback-list::-webkit-scrollbar {
    width: 6px;
}

.feedback-list::-webkit-scrollbar-track {
    background: #e5edf6;
    border-radius: 3px;
}

.feedback-list::-webkit-scrollbar-thumb {
    background: #b8c8dd;
    border-radius: 3px;
}

.feedback-list::-webkit-scrollbar-thumb:hover {
    background: #8a9bb0;
}

/* ===== ОДИН ОТЗЫВ ===== */
.feedback-item {
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid #e5edf6;
    transition: all 0.3s ease;
}

.feedback-item:hover {
    border-color: #b8c8dd;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.feedback-item.unread {
    border-left: 4px solid #0b2b5e;
    background: #f8faff;
}

.feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.feedback-category {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 12px;
    text-transform: capitalize;
}

.feedback-category.suggestion {
    background: #e8f0fa;
    color: #0b2b5e;
}

.feedback-category.complaint {
    background: #fde8e8;
    color: #d93434;
}

.feedback-category.review {
    background: #fef6e0;
    color: #b8860b;
}

.feedback-category.bug {
    background: #f0e8f8;
    color: #6f42c1;
}

.feedback-date {
    font-size: 12px;
    color: #8a9bb0;
}

.feedback-item-user {
    font-size: 13px;
    color: #63778d;
    margin-bottom: 6px;
}

.feedback-item-user i {
    margin-right: 4px;
}

.feedback-item-message {
    font-size: 14px;
    color: #14253d;
    line-height: 1.5;
    padding: 6px 0 4px 0;
    word-wrap: break-word;
}

.feedback-item-message::before {
    content: '"';
    color: #b8c8dd;
}

.feedback-item-message::after {
    content: '"';
    color: #b8c8dd;
}

/* ===== ОТВЕТ ===== */
.feedback-item-answer {
    margin-top: 10px;
    padding: 10px 14px;
    background: #edf3fa;
    border-radius: 10px;
    border-left: 3px solid #168344;
    font-size: 14px;
    color: #14253d;
}

.feedback-item-answer strong {
    color: #168344;
}

/* ===== ФОРМА ОТВЕТА ===== */
.feedback-item-answer-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.feedback-item-answer-form input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e5edf6;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

.feedback-item-answer-form input:focus {
    border-color: #0b2b5e;
    box-shadow: 0 0 0 4px rgba(11, 43, 94, 0.08);
}

.feedback-item-answer-form input::placeholder {
    color: #a8b8cc;
}

.feedback-item-answer-form button {
    padding: 10px 20px;
    border: 0;
    border-radius: 12px;
    background: #0b2b5e;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.feedback-item-answer-form button:hover {
    background: #1a3f72;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(11, 43, 94, 0.3);
}

.feedback-item-answer-form button:active {
    transform: translateY(0);
}

/* ===== НЕТ ДАННЫХ ===== */
.feedback-list .no-data {
    text-align: center;
    padding: 40px 20px;
    color: #8a9bb0;
    font-size: 15px;
}

/* ============================================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ
   ============================================================ */

@media (max-width: 768px) {
    .feedback-admin-section {
        padding: 14px;
        border-radius: 12px;
    }
    
    .feedback-filters {
        gap: 6px;
    }
    
    .feedback-filters .filter-btn {
        font-size: 12px;
        padding: 4px 12px;
    }
    
    .feedback-item {
        padding: 14px 16px;
    }
    
    .feedback-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .feedback-item-answer-form {
        flex-direction: column;
    }
    
    .feedback-item-answer-form button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .feedback-filters .filter-btn {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .feedback-item {
        padding: 12px 14px;
    }
    
    .feedback-item-message {
        font-size: 13px;
    }
}
/* ===== МАЛЕНЬКИЕ ТОГЛЫ ДЛЯ СОЦСЕТЕЙ ===== */
.settings-toggle-row {
    margin-bottom: 8px;
}

.toggle-label.small .toggle-slider {
    width: 36px;
    height: 20px;
}

.toggle-label.small .toggle-slider::after {
    width: 16px;
    height: 16px;
}

.toggle-label.small input:checked + .toggle-slider::after {
    left: 18px;
}

.toggle-label.small .toggle-text {
    font-size: 13px;
}
/* ============================================================
   НАСТРОЙКИ САЙТА
   ============================================================ */

.settings-section {
    background: #f7faff;
    padding: 20px;
    border-radius: 16px;
    margin-top: 25px;
}

.settings-section h3 {
    color: #0b2b5e;
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.settings-group h4 {
    color: #0b2b5e;
    font-size: 15px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e5edf6;
    padding-bottom: 8px;
}

.settings-field {
    margin-bottom: 12px;
}

.settings-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
}

.settings-field input {
    width: 100%;
    padding: 8px 14px;
    border: 2px solid #e0e4ea;
    border-radius: 10px;
    font-size: 14px;
    transition: 0.25s;
    background: #fafbfc;
}

.settings-field input:focus {
    outline: none;
    border-color: #0b2b5e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(11, 43, 94, 0.08);
}

/* ===== ТОГЛЫ ===== */
.settings-toggle {
    margin-bottom: 12px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #14253d;
    user-select: none;
}

.toggle-label input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #c8d0da;
    border-radius: 12px;
    transition: 0.3s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle-label input:checked + .toggle-slider {
    background: #168344;
}

.toggle-label input:checked + .toggle-slider::after {
    left: 22px;
}

.toggle-label input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-text {
    font-weight: 500;
}

/* ===== ИНФО ===== */
.settings-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: #eef3f9;
    border-radius: 10px;
    font-size: 13px;
    color: #63778d;
}

.settings-info small {
    display: block;
    margin: 2px 0;
}

/* ===== КНОПКА СОХРАНЕНИЯ ===== */
.settings-save-btn {
    align-self: flex-start;
    padding: 10px 30px;
    border: 0;
    border-radius: 12px;
    background: #0b2b5e;
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-save-btn:hover {
    background: #1a3f72;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 43, 94, 0.3);
}

.settings-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.settings-save-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== СООБЩЕНИЕ ===== */
.settings-message {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 500;
    display: none;
}

.settings-message.success {
    display: block;
    background: #e8f5ee;
    color: #168344;
}

.settings-message.error {
    display: block;
    background: #fde8e8;
    color: #d93434;
}

/* ============================================================
   АДАПТАЦИЯ
   ============================================================ */

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .settings-section {
        padding: 14px;
    }
    
    .settings-save-btn {
        width: 100%;
        justify-content: center;
    }
}