/* =============================================
   Osclass Robokassa Plugin - Admin Styles
   ============================================= */

/* Общие стили для админ-панели */
.or-admin-wrap {
    margin: 20px 20px 0 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.or-admin-wrap h1 {
    margin: 0;
    padding: 20px 25px;
    background: #f5f5f5;
    border-bottom: 1px solid #e5e5e5;
    font-size: 22px;
    font-weight: 600;
    color: #23282d;
}

/* Вкладки меню */
.or-admin-tabs {
    background: #f5f5f5;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 25px;
    display: flex;
    flex-wrap: wrap;
}

.or-tab {
    display: inline-block;
    padding: 12px 20px;
    margin: 0 5px -1px 0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #555;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s;
}

.or-tab:hover {
    background: #fff;
    color: #0073aa;
    border-color: #e5e5e5;
}

.or-tab.active {
    background: #fff;
    color: #0073aa;
    border-color: #e5e5e5;
    border-bottom-color: #fff;
    margin-bottom: -1px;
}

/* Секции настроек */
.or-admin-section {
    margin: 25px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.or-admin-section h2 {
    margin: -20px -20px 20px -20px;
    padding: 15px 20px;
    background: #f1f1f1;
    border-bottom: 1px solid #e5e5e5;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
    border-radius: 6px 6px 0 0;
}

/* Поля ввода */
.or-field {
    margin-bottom: 20px;
    clear: both;
    overflow: hidden;
}

.or-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #23282d;
}

.or-field input[type="text"],
.or-field input[type="number"],
.or-field input[type="password"],
.or-field select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}

.or-field input[type="text"]:focus,
.or-field input[type="number"]:focus,
.or-field input[type="password"]:focus,
.or-field select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.or-field input[type="checkbox"] {

}

.or-desc {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

/* Кнопки */
.or-button {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
	width: 100px;
}

.or-button:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.or-button-primary {
    background: #0073aa;
    border-color: #006799;
    color: #fff;
}

.or-button-primary:hover {
    background: #005a87;
    border-color: #004d73;
    color: #fff;
}

.or-button-danger {
    background: #dc3545;
    border-color: #bd2130;
    color: #fff;
}

.or-button-danger:hover {
    background: #c82333;
    border-color: #a71d2a;
    color: #fff;
}

.or-button-success {
    background: #28a745;
    border-color: #1e7e34;
    color: #fff;
}

.or-button-success:hover {
    background: #218838;
    border-color: #1a6b2c;
    color: #fff;
}

.or-button-small {
    padding: 4px 10px;
    font-size: 12px;
}

.or-button-large {
    padding: 12px 24px;
    font-size: 16px;
}

.or-admin-actions {
    margin: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

/* Таблицы */
.or-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.or-table th {
    background: #f1f1f1;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
    color: #23282d;
}

.or-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

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

/* Фильтры поиска */
.or-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 25px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    align-items: flex-end;
}

.or-filters input,
.or-filters select {
    padding: 3px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    min-width: 150px;
}

/* Пагинация */
.or-pagination {
    margin: 20px 25px;
    text-align: center;
}

.or-pagination-wrap {
    display: inline-block;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.or-pagination-wrap a,
.or-pagination-wrap span {
    display: inline-block;
    padding: 8px 14px;
    text-decoration: none;
    color: #0073aa;
    border-right: 1px solid #ddd;
    font-size: 13px;
}

.or-pagination-wrap a:last-child,
.or-pagination-wrap span:last-child {
    border-right: none;
}

.or-pagination-wrap a:hover {
    background: #f1f1f1;
}

.or-pagination-wrap .or-pagination-active {
    background: #0073aa;
    color: #fff;
}

.or-pagination-dots {
    background: #fff;
    color: #666;
}

/* Статистика */
.or-stats-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 25px;
}

.or-stat-card {
    flex: 1;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.or-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.or-stat-icon {
    font-size: 32px;
    color: #0073aa;
    margin-bottom: 10px;
}

.or-stat-info {
    margin-top: 5px;
}

.or-stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.or-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #23282d;
}

.or-stat-count {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

/* Статусы */
.or-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.or-status-pending {
    background: #ffc107;
    color: #856404;
}

.or-status-completed {
    background: #28a745;
    color: #fff;
}

.or-status-failed,
.or-status-cancelled {
    background: #dc3545;
    color: #fff;
}

/* Типы транзакций */
.or-type-deposit {
    color: #28a745;
    font-weight: 600;
}

.or-type-withdraw {
    color: #dc3545;
    font-weight: 600;
}

.or-type-bonus {
    color: #ff9800;
    font-weight: 600;
}

/* Сообщения */
.or-flash-message {
    margin: 20px 25px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
}

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

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

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

/* Футер */
.or-admin-footer {
    margin: 25px;
    padding: 15px 20px;
    background: #f5f5f5;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Пустые сообщения */
.or-empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

/* Промокоды таблица */
.or-promocodes-table {
    width: 100%;
    border-collapse: collapse;
}

.or-promocodes-table th,
.or-promocodes-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.or-promocodes-table th {
    background: #f1f1f1;
    font-weight: 600;
}

/* Форма поиска пользователя */
.or-search-form {
    margin-bottom: 20px;
}

.or-search-input {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.or-search-input input {
    flex: 1;
    min-width: 250px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 1000px) {
    .or-stats-cards {
        flex-direction: column;
    }
    
    .or-stat-card {
        min-width: auto;
    }
    
    .or-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .or-filters input,
    .or-filters select {
        width: 100%;
    }
    
    .or-admin-tabs {
        flex-direction: column;
        padding: 0;
    }
    
    .or-tab {
        margin: 0;
        border-radius: 0;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .or-tab.active {
        border-bottom-color: #e5e5e5;
    }
}

/* =============================================
   Промокоды - Форма создания
   ============================================= */

/* Контейнер формы */
.or-form {
    margin: 0;
    padding: 0;
}

/* Строка формы */
.or-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 0;
    clear: both;
}

/* Метка (левая колонка) */
.or-form-label {
    flex: 0 0 180px;
    padding-top: 8px;
    font-weight: 600;
    color: #23282d;
}

.or-form-label label {
    font-weight: 600;
    margin: 0;
    color: #23282d;
}

/* Поле ввода (правая колонка) */
.or-form-field {
    flex: 1;
    min-width: 250px;
}

.or-form-field input[type="text"],
.or-form-field input[type="number"],
.or-form-field input[type="password"],
.or-form-field input[type="datetime-local"],
.or-form-field select {
    padding: 3px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}

.or-form-field input[type="text"]:focus,
.or-form-field input[type="number"]:focus,
.or-form-field input[type="datetime-local"]:focus,
.or-form-field select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.or-form-field select {
    cursor: pointer;
}

/* Описание поля */
.or-form-field .or-desc {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Группа полей в одной строке (например, скидка с селектом) */
.or-form-field .or-field-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.or-form-field .or-field-group input {
    flex: 1;
}

.or-form-field .or-field-group select {
    width: auto;
    min-width: 80px;
}

/* Адаптивность для формы промокодов */
@media (max-width: 768px) {
    .or-form-row {
        flex-direction: column;
    }
    
    .or-form-label {
        flex: auto;
        margin-bottom: 8px;
        padding-top: 0;
    }
    
    .or-form-field {
        flex: auto;
        width: 100%;
    }
    
    .or-form-field input[type="text"],
    .or-form-field input[type="number"],
    .or-form-field input[type="datetime-local"],
    .or-form-field select {
        width: 100%;
    }
}

/* Стили для списка промокодов */
.or-promocodes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.or-promocodes-table th,
.or-promocodes-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.or-promocodes-table th {
    background: #f1f1f1;
    font-weight: 600;
    color: #23282d;
}

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

.or-promocodes-table .or-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.or-promocodes-table .or-status-active {
    background: #28a745;
    color: #fff;
}

.or-promocodes-table .or-status-inactive {
    background: #dc3545;
    color: #fff;
}

.or-promocodes-table .or-status-expired {
    background: #ffc107;
    color: #856404;
}

/* Кнопки действий в таблице */
.or-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.or-action-buttons .or-button-small {
    padding: 4px 10px;
    font-size: 12px;
}

/* Секция промокодов в админке */
.or-promocode-section {
    margin-bottom: 30px;
}

.or-promocode-section h2 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

/* Разделитель между секциями */
.or-promocode-divider {
    margin: 30px 0;
    border-top: 1px solid #e5e5e5;
}

/* =============================================
   Osclass Robokassa Plugin - Admin Styles
   ============================================= */
/* Статистика */
.or-stats-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.or-stat-card {
    flex: 1;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.or-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.or-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #28a745;
}
.or-stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Боксы */
.or-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}
.or-box-head {
    background: #f5f5f5;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
    font-size: 15px;
}
.or-box-head i {
    margin-right: 8px;
    color: #0073aa;
}
.or-box-inside {
    padding: 20px;
}

/* Таблица */
.or-table {
    width: 100%;
}
.or-table-head {
    background: #f1f1f1;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
    overflow: hidden;
    padding: 12px 0;
}
.or-table-row {
    overflow: hidden;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.or-table-row:hover {
    background: #f9f9f9;
}
.or-row-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
}
.or-row-empty i {
    margin-right: 10px;
    font-size: 20px;
}

/* Колонки таблицы */
.or-col-1 { width: 5%; float: left; }
.or-col-2 { width: 12%; float: left; }
.or-col-3 { width: 18%; float: left; }
.or-col-4 { width: 25%; float: left; }
.or-col-5 { width: 30%; float: left; }

.or-balance {
    font-weight: bold;
    color: #28a745;
}

/* Действия */
.or-actions {
    text-align: right;
}
.or-inline-form {
    display: inline-block;
    margin: 0 2px;
}
.or-amount-input {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    width: 70px;
    text-align: center;
}
.or-amount-input:focus {
    border-color: #0073aa;
    outline: none;
}

/* Кнопки */
.or-button {
    display: inline-block;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.or-button-small {
    padding: 5px 10px;
    font-size: 12px;
}
.or-button-success {
    background: #28a745;
    color: #fff;
}
.or-button-success:hover {
    background: #218838;
}
.or-button-danger {
    background: #dc3545;
    color: #fff;
}
.or-button-danger:hover {
    background: #c82333;
}

/* Пагинация */
.or-pagination {
    margin-top: 20px;
    text-align: center;
}
.or-pagination-link {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    background: #fff;
}
.or-pagination-link:hover {
    background: #f1f1f1;
}
.or-pagination-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}
.or-pagination-active:hover {
    background: #005a87;
}

/* Адаптивность */
@media (max-width: 1000px) {
    .or-stats-grid {
        flex-direction: column;
    }
    .or-stat-card {
        min-width: auto;
    }
    .or-col-1, .or-col-2, .or-col-3, .or-col-4, .or-col-5 {
        width: auto;
        float: none;
        margin-bottom: 5px;
        text-align: left;
    }
    .or-table-head {
        display: none;
    }
    .or-table-row {
        padding: 15px;
    }
    .or-actions {
        text-align: left;
        margin-top: 10px;
    }
    .or-inline-form {
        display: inline-block;
        margin-right: 5px;
    }
}

/* Действия - группа полей и кнопок */
.or-action-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.or-inline-form {
    display: inline-block;
}

.or-input-button-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.or-amount-input {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    width: 80px;
    text-align: center;
}

.or-amount-input:focus {
    border-color: #0073aa;
    outline: none;
}

/* Кнопки */
.or-button {
    display: inline-block;
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    white-space: nowrap;
	width: 150px;
}

.or-button i {
    margin-right: 4px;
}

.or-button-success {
    background: #28a745;
    color: #fff;
}

.or-button-success:hover {
    background: #218838;
}

.or-button-danger {
    background: #dc3545;
    color: #fff;
}

.or-button-danger:hover {
    background: #c82333;
}

/* Адаптивность для мобильных */
@media (max-width: 1000px) {
    .or-action-group {
        justify-content: flex-start;
    }
    
    .or-inline-form {
        width: 100%;
    }
    
    .or-input-button-group {
        width: 100%;
    }
    
    .or-amount-input {
        flex: 1;
    }
}