/* Общий контейнер */
.srm-dash-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #1c1c1c; /* Темный фон */
    color: #f0f0f0;
    font-family: Arial, sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.srm-dash-title {
    color: #CC0000;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

/* --- 1. Статистика --- */
.srm-stats-bar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: #2a2a2a;
    padding: 15px 20px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: #bbb;
    font-size: 14px;
    text-transform: uppercase;
}

.stat-card p {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}
/* Цвета для акцента */
.total-pending p { color: #FFD700; }
.awaiting-parts p { color: #9C27B0; }
.total-all p { color: #5B6A7F; }

/* --- 2. Фильтры --- */
.srm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 6px;
}

.srm-filter-group {
    display: flex;
    align-items: center;
}

.srm-filter-group label {
    margin-right: 10px;
    font-weight: bold;
    color: #ccc;
    white-space: nowrap;
}

.srm-filter-bar input[type="text"], 
.srm-filter-bar select {
    padding: 8px;
    border: 1px solid #555;
    background: #333;
    color: #eee;
    border-radius: 4px;
}

.srm-filter-group button {
    padding: 8px 15px;
    margin-right: 5px;
    background: #333;
    color: #ccc;
    border: 1px solid #555;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.srm-filter-group button:hover {
    background: #444;
}

.srm-filter-group button.active {
    background: #CC0000;
    color: white;
    border-color: #990000;
}

/* --- 3. Таблица Заявок --- */
.srm-request-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
}

.srm-request-table th, .srm-request-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #444;
}

.srm-request-table th {
    background: #333;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
}

.srm-request-table tbody tr:hover {
    background: #3a3a3a;
    cursor: pointer;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
    color: white; 
}

/* Кнопка "Детали" */
.srm-details-btn {
    background: none;
    border: none;
    color: #CC0000;
    font-size: 18px;
    cursor: pointer;
}

/* --- Пагинация --- */
.srm-pagination {
    margin-top: 20px;
    text-align: center;
}
.srm-pagination button {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
}
.srm-pagination button:disabled {
    background: #1e1e1e;
    color: #555;
    cursor: not-allowed;
}

/* --- 4. Модальное окно Деталей --- */
.srm-details-modal {
    display: none; 
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.srm-details-content {
    background-color: #2a2a2a;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #444;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
}

.srm-close-modal {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

#srm-details-body h3 {
    color: #CC0000;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-top: 0;
}

.detail-row {
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px dashed #3a3a3a;
    display: flex;
    flex-wrap: wrap; /* Для мобильной адаптации */
}
.detail-label {
    font-weight: bold;
    color: #bbb;
    flex-basis: 40%;
}
.detail-value {
    flex-basis: 60%;
}

.srm-details-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.srm-details-actions button,
.srm-details-actions select,
.srm-details-actions a.edit-link-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.copy-btn {
    background-color: #CC0000;
    color: white;
}
.copy-btn:hover {
    background-color: #E03333;
}

#srm-status-selector {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

/* Кнопка Удаления */
.srm-details-actions .delete-btn {
    background-color: #B00020; 
    color: white;
    margin-left: auto; /* Сдвигает кнопку вправо */
}

.srm-details-actions .delete-btn:hover {
    background-color: #E53935;
}

/* --- Стили для формы входа (если не авторизован) --- */
.srm-auth-required {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.srm-auth-required p {
    color: #ccc;
}

.srm-auth-required form {
    margin-top: 20px;
}

.srm-auth-required input[type="text"],
.srm-auth-required input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px 0;
    background: #333;
    border: 1px solid #555;
    color: #eee;
    box-sizing: border-box;
    border-radius: 4px;
}

.srm-auth-required .login-submit input[type="submit"] {
    width: 100%;
    background-color: #CC0000;
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.srm-auth-required .login-submit input[type="submit"]:hover {
    background-color: #FF3333;
}

.srm-auth-required #nav, .srm-auth-required #backtoblog {
    display: none;
}

/* --- 5. Стили для галочки согласия на обработку персональных данных в Contact Form 7 --- */

/* Контейнер для чекбокса согласия */
.wpcf7 .srm-consent-field {
    margin: 20px 0;
    padding: 15px;
    background: rgba(204, 0, 0, 0.1);
    border-left: 4px solid #CC0000;
    border-radius: 6px;
}

/* Стили для самого чекбокса */
.wpcf7 .srm-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

/* Скрываем стандартный чекбокс */
.wpcf7 .srm-consent-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный чекбокс */
.wpcf7 .srm-consent-checkbox .custom-checkbox {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #333;
    border: 2px solid #CC0000;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Эффект при наведении */
.wpcf7 .srm-consent-checkbox:hover .custom-checkbox {
    background: #444;
    border-color: #FF3333;
}

/* Отмеченное состояние */
.wpcf7 .srm-consent-checkbox input[type="checkbox"]:checked + .custom-checkbox {
    background: #CC0000;
    border-color: #CC0000;
}

/* Галочка внутри */
.wpcf7 .srm-consent-checkbox .custom-checkbox::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wpcf7 .srm-consent-checkbox input[type="checkbox"]:checked + .custom-checkbox::after {
    display: block;
}

/* Текст чекбокса */
.wpcf7 .srm-consent-checkbox .consent-text {
    color: #eee;
    font-size: 14px;
    line-height: 1.4;
}

/* Ссылка в тексте согласия */
.wpcf7 .srm-consent-checkbox .consent-text a {
    color: #CC0000;
    text-decoration: underline;
    transition: color 0.2s;
}

.wpcf7 .srm-consent-checkbox .consent-text a:hover {
    color: #FF6666;
}

/* Стили для стандартного чекбокса CF7 (если не используется кастомный) */
.wpcf7-list-item {
    margin: 0;
}

.wpcf7 .wpcf7-checkbox .wpcf7-list-item {
    display: block;
    margin: 15px 0;
}

.wpcf7 .wpcf7-checkbox .wpcf7-list-item-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eee;
}

.wpcf7 .wpcf7-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    background: #333;
    border: 1px solid #CC0000;
    border-radius: 3px;
}

.wpcf7 .wpcf7-checkbox input[type="checkbox"]:checked {
    background: #CC0000;
}

.wpcf7 .wpcf7-checkbox a {
    color: #CC0000;
    text-decoration: underline;
}

/* Сообщение об ошибке для обязательного чекбокса */
.wpcf7-not-valid-tip {
    color: #FF6666;
    font-size: 12px;
    margin-top: 5px;
}

/* --- Стили для полей формы Contact Form 7 --- */
.wpcf7 .input-text {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #333;
    border: 1px solid #555;
    color: #eee;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.wpcf7 .input-text:focus {
    outline: none;
    border-color: #CC0000;
}

.wpcf7 .wp-element-button {
    background: #CC0000;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.wpcf7 .wp-element-button:hover {
    background: #FF3333;
}

/* Стили для полей с ошибками */
.wpcf7 .wpcf7-not-valid {
    border-color: #FF6666;
}

/* Стили для спиннера загрузки */
.wpcf7 .ajax-loader {
    display: block;
    margin: 10px auto 0;
}

/* Сообщение об успешной отправке */
.wpcf7 .wpcf7-response-output {
    margin: 20px 0 0;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
}

.wpcf7 .wpcf7-mail-sent-ok {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-validation-errors {
    background: rgba(204, 0, 0, 0.2);
    border: 1px solid #CC0000;
    color: #FF6666;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .srm-stats-bar {
        flex-direction: column;
        gap: 10px;
    }

    .srm-filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .srm-details-actions {
        justify-content: space-between;
    }
    .srm-details-actions .delete-btn {
        margin-left: 0;
        width: 100%;
    }
    .srm-details-actions select {
        width: 100%;
    }

    .desktop-only {
        display: none;
    }

    .srm-request-table thead {
        display: none; 
    }

    .srm-request-table, .srm-request-table tbody, .srm-request-table tr, .srm-request-table td {
        display: block;
        width: 100%;
    }

    .srm-request-table tr {
        margin-bottom: 15px;
        border: 1px solid #444;
        border-radius: 4px;
    }

    .srm-request-table td {
        border: none;
        padding: 8px 12px;
        position: relative;
        text-align: right;
    }

    .srm-request-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: #bbb;
    }
    
    /* Адаптация чекбокса на мобильных */
    .wpcf7 .srm-consent-checkbox {
        align-items: center;
    }
    
    .wpcf7 .srm-consent-checkbox .consent-text {
        font-size: 13px;
    }
}
