/* ── Финансовые статьи: красивая кнопка «Добавить статью» ─────────────── */
.field-planned_amount input,
.field-actual_amount input {
    text-align: right;
    font-family: monospace;
    min-width: 120px;
}

/* Кнопка добавления строки в inline */
.add-row a,
a.add-row {
    display: inline-block !important;
    margin-top: 8px !important;
    padding: 6px 14px !important;
    background: #1a73e8 !important;
    color: #fff !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: background .2s;
}
.add-row a:hover,
a.add-row:hover {
    background: #1558b0 !important;
    color: #fff !important;
}

/* Кнопки save наверху страницы */
.submit-row {
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 6px;
}

/* ── Результаты спортсменов: stacked inline удобнее ────────────────────── */
.inline-group .stacked .inline-related {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 12px;
    background: #fafbfc;
}
.inline-group .stacked .inline-related h3 {
    background: #1a73e8;
    color: #fff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
}

/* ── Имя пользователя в сайдбаре ────────────────────────────────────────── */
.user-panel .info a,
.user-panel .info span {
    color: #fff !important;
}
/* Bootstrap .opacity-75 ставит opacity: .75 !important прямо на span — перебиваем */
.user-panel .info .opacity-75 {
    opacity: 1 !important;
}

/* ── Фильтры в журнале: select2 получает width инлайном — перебиваем ────── */
.search-filter + .select2-container {
    max-width: 200px !important;
    width: 200px !important;
}

/* ── Поле поиска: инлайн min-width: 250px — перебиваем ──────────────────── */
#searchbar {
    width: 180px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    height: 38px !important;
    margin-bottom: 0 !important;
    vertical-align: middle;
}

/* ── Кнопка Найти — выравниваем по высоте с полем и фильтрами ────────────── */
#changelist-search .btn[type="submit"] {
    height: 38px !important;
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

/* ── form-group вокруг select2 убираем нижний отступ ────────────────────── */
#changelist-search .form-group {
    margin-bottom: 0 !important;
}

/* ── Год: выбор из списка выглядит аккуратнее ──────────────────────────── */
select[name="year"] {
    width: auto !important;
    min-width: 90px;
}

/* ── Скрываем иконки редактирования/добавления рядом с FK-полями ────────── */
.related-widget-wrapper-link,
a.related-lookup,
a.add-related,
a.change-related,
a.delete-related,
a.view-related {
    display: none !important;
}

/* ── Единый стиль рамок для всех полей выбора ───────────────────────────── */

/* Обычный <select> — одинаковая рамка только внутри форм редактирования */
.change-form select,
.change-form .form-control,
.change-form .form-select {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
}

/* Select2 одиночный выбор — только в форме редактирования */
.change-form .select2-container--default .select2-selection--single {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    height: 36px !important;
    padding: 4px 8px !important;
}
.change-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 26px !important;
    color: #495057 !important;
}
.change-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
}

/* Select2 множественный выбор */
.change-form .select2-container--default .select2-selection--multiple {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    min-height: 36px !important;
    padding: 2px 6px !important;
}

/* Фокус — синяя рамка как у текстовых полей */
.change-form .select2-container--default.select2-container--focus .select2-selection--single,
.change-form .select2-container--default.select2-container--focus .select2-selection--multiple,
.change-form select:focus {
    border-color: #80bdff !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25) !important;
}
