/* Общие стили админки */
.tips-admin-wrapper {
    max-width: 1200px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Вкладки */
.tips-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 10px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s;
}

.tab-button:hover {
    background: #f5f5f5;
    color: #333;
}

.tab-button.active {
    background: #2271b1;
    color: #fff;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Настройки */
.settings-group {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.settings-group h2 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

.setting-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.setting-row label {
    min-width: 200px;
    font-weight: 500;
}

.setting-row input[type="text"],
.setting-row input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

.setting-row .checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.setting-row .description {
    color: #666;
    font-size: 13px;
    margin-left: 10px;
}

/* Таблица советов */
.tips-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tips-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.tips-table th {
    background: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
}

.tips-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.tips-table tr:hover {
    background: #f9f9f9;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.inactive {
    background: #fce4ec;
    color: #c62828;
}

.badge-recommended {
    color: #f9a825;
    font-size: 18px;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #999;
}

/* Кнопки */
.button-primary {
    background: #2271b1;
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.button-primary:hover {
    background: #135e96;
}

.button-secondary {
    background: #f5f5f5;
    color: #333;
    padding: 10px 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.button-secondary:hover {
    background: #e5e5e5;
}

.btn-edit {
    background: #e3f2fd;
    color: #1565c0;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-edit:hover {
    background: #bbdefb;
}

.btn-delete {
    background: #fce4ec;
    color: #c62828;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-delete:hover {
    background: #f8bbd0;
}

.btn-stats {
    background: #fff3e0;
    color: #e65100;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-stats:hover {
    background: #ffe0b2;
}

.button-add {
    background: #4caf50;
    color: #fff;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.button-add:hover {
    background: #388e3c;
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.col-3 {
    flex: 0 0 calc(25% - 15px);
    min-width: 150px;
}

.col-6 {
    flex: 0 0 calc(50% - 10px);
    min-width: 200px;
}

/* Позиционирование */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin-top: 10px;
}

.position-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.position-item:hover {
    background: #e5e5e5;
}

.position-item input[type="radio"]:checked + .position-label {
    font-weight: bold;
}

.position-item:has(input:checked) {
    border-color: #2271b1;
    background: #e3f2fd;
}

.position-label {
    font-size: 12px;
    text-transform: capitalize;
}

/* Медиа-загрузка */
.media-upload {
    padding: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

.media-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

#media-preview {
    margin-top: 15px;
    max-width: 300px;
}

#media-preview img,
#media-preview video {
    max-width: 100%;
    border-radius: 4px;
}

/* Статистика в модалке */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-top: 0;
}

/* Flash сообщения */
.flashmessage {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.flashmessage-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flashmessage-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flashmessage-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.flashmessage-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}