/* Значок «!» «предъяв» и его модалка (см. agent-rules/bug-reports.md).

   Значок живёт внутри `.manual-hint` — той же группы, что и «?»: оба модуля
   делят ключ места, и человеку не нужно искать «а куда тут жаловаться» в другом
   углу экрана. Размер и посадка на строку — как у подсказки, отличается цвет.

   Отдельный файл, а не дописка в manual-hint.css: модули парные, но независимые
   — один может стоять без другого. Подключён в layouts/app.blade.php. */

.bug-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 4px;
}

.bug-badge__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid var(--danger, #D94D4D);
    border-radius: 50%;
    background: transparent;
    color: var(--danger, #D94D4D);
    font-family: 'GolosText-SemiBold', sans-serif;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.bug-badge__btn:hover {
    background-color: var(--danger, #D94D4D);
    color: #FFF4E7;
}

/* --- Модалка отправки замечания ------------------------------------------ */

.bug-modal {
    position: fixed;
    inset: 0;
    z-index: 1250; /* выше мануал-модалки: её могли открыть первой */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(33, 33, 45, 0.55);
}

.bug-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px 32px;
    border-radius: 12px;
    background: #FFF8EC;
    box-shadow: 0 24px 60px rgba(33, 33, 45, 0.3);
    font-family: 'GolosText-Regular', sans-serif;
}

.bug-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #5c5851;
    cursor: pointer;
}

.bug-modal__title {
    margin: 0 0 8px;
    padding-right: 28px;
    font-family: 'Oswald-Medium', sans-serif;
    font-size: 22px;
    line-height: 130%;
    color: var(--danger, #D94D4D);
}

.bug-modal__place {
    margin: 0 0 14px;
    font-size: 13px;
    color: #5c5851;
}

.bug-modal__place code {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(61, 86, 50, 0.1);
    font-size: 12px;
}

.bug-modal__textarea {
    width: 100%;
    min-height: 130px;
    padding: 12px 14px;
    border: 1px solid rgba(64, 53, 40, 0.25);
    border-radius: 8px;
    background: #fff;
    font-family: 'GolosText-Regular', sans-serif;
    font-size: 15px;
    line-height: 150%;
    color: #2f2b26;
    resize: vertical;
}

.bug-modal__textarea:focus {
    outline: none;
    border-color: var(--textPrimaryBase, #3D5632);
}

.bug-modal__signature {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: #5c5851;
}

.bug-modal__signature input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 12px;
    border: 1px solid rgba(64, 53, 40, 0.25);
    border-radius: 8px;
    background: #fff;
    font-family: 'GolosText-Regular', sans-serif;
    font-size: 14px;
    color: #2f2b26;
}

.bug-modal__signature input:focus {
    outline: none;
    border-color: var(--textPrimaryBase, #3D5632);
}

.bug-modal__tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.bug-modal__file-input { display: none; }

.bug-modal__attach {
    padding: 6px 14px;
    border: 1px solid var(--textPrimaryBase, #3D5632);
    border-radius: 20px;
    background: transparent;
    color: var(--textPrimaryBase, #3D5632);
    font-size: 13px;
    cursor: pointer;
}

.bug-modal__attach:hover {
    background: var(--textPrimaryBase, #3D5632);
    color: #FFF4E7;
}

.bug-modal__hint {
    font-size: 12px;
    color: #8a857d;
}

/* Плитки приложенных файлов: крестик на каждой — удаление поштучно. */
.bug-modal__files {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.bug-modal__file {
    position: relative;
    width: 104px;
    font-size: 11px;
    color: #5c5851;
    word-break: break-word;
}

.bug-modal__file img {
    display: block;
    width: 104px;
    height: 72px;
    border: 1px solid rgba(64, 53, 40, 0.2);
    border-radius: 6px;
    object-fit: cover;
    background: #fff;
}

.bug-modal__file-doc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 72px;
    border: 1px dashed rgba(64, 53, 40, 0.35);
    border-radius: 6px;
    background: #fff;
    font-family: 'GolosText-SemiBold', sans-serif;
    font-size: 13px;
    color: #5c5851;
}

.bug-modal__file-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--danger, #D94D4D);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.bug-modal__file-name {
    display: block;
    margin-top: 4px;
}

.bug-modal__context {
    margin-top: 16px;
    font-size: 12px;
    color: #5c5851;
}

.bug-modal__context summary {
    cursor: pointer;
    color: #9D653F;
}

.bug-modal__context ul {
    margin: 8px 0 0;
    padding-left: 18px;
    list-style: disc;
}

.bug-modal__error {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--danger, #D94D4D);
}

.bug-modal__done {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--success, #3e6f48);
}

.bug-modal__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(61, 86, 50, 0.15);
}

.bug-modal__link {
    margin-right: auto;
    font-size: 13px;
    color: #9D653F;
}

.bug-modal__btn {
    padding: 8px 18px;
    border: 1px solid rgba(64, 53, 40, 0.3);
    border-radius: 20px;
    background: transparent;
    font-family: 'GolosText-Regular', sans-serif;
    font-size: 14px;
    color: #403528;
    cursor: pointer;
}

.bug-modal__btn--primary {
    border-color: var(--textPrimaryBase, #3D5632);
    background: var(--textPrimaryBase, #3D5632);
    color: #FFF4E7;
}

.bug-modal__btn:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 767.98px) {
    .bug-modal__dialog { padding: 24px 18px; }
    .bug-modal__actions { flex-wrap: wrap; }
}

/* ==========================================================================
   Раздел админки «Замечания» (/admin/bug-reports)
   ========================================================================== */

.admin-bugs { font-family: 'GolosText-Regular', sans-serif; }

.admin-bugs__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* Глобальные .input/.select тянутся на всю ширину, а подписи мест длинные
   («Пользователи и участники — Колонка „Роль / конкурс"») — без потолка фильтр
   места выдавливает панель в три строки. */
.admin-bugs__toolbar .input,
.admin-bugs__toolbar .select {
    width: auto;
    min-width: 190px;
    max-width: 300px;
}

.admin-bugs__spacer { margin-left: auto; }

.admin-bugs__table {
    width: 100%;
    border-collapse: collapse;
    background: #FFF8EC;
    font-size: 14px;
}

.admin-bugs__table th,
.admin-bugs__table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(61, 86, 50, 0.12);
    text-align: left;
    vertical-align: top;
}

.admin-bugs__table th {
    font-family: 'GolosText-SemiBold', sans-serif;
    color: #3D5632;
    white-space: nowrap;
}

.admin-bugs__row { cursor: pointer; }
.admin-bugs__row:hover { background: rgba(61, 86, 50, 0.06); }

.admin-bugs__place { font-size: 12px; color: #5c5851; }
.admin-bugs__muted { color: #8a857d; }
.admin-bugs__thumbs { font-size: 12px; color: #9D653F; }

/* Цвет статуса — единственный способ увидеть состояние очереди с одного взгляда. */
.admin-bugs__status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.admin-bugs__status--open { background: rgba(217, 77, 77, 0.15); color: #a5352c; }
.admin-bugs__status--in_progress { background: rgba(210, 184, 80, 0.25); color: #7a641b; }
.admin-bugs__status--answered { background: rgba(61, 86, 50, 0.15); color: #3D5632; }
.admin-bugs__status--rework { background: rgba(157, 101, 63, 0.2); color: #9D653F; }
.admin-bugs__status--closed { background: rgba(64, 53, 40, 0.12); color: #6a6259; }

.admin-bugs__pager {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 14px;
}

.admin-bugs__card-body {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(61, 86, 50, 0.06);
    font-size: 15px;
    line-height: 155%;
    white-space: pre-wrap;
}

.admin-bugs__answer {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-left: 3px solid var(--textPrimaryBase, #3D5632);
    border-radius: 0 8px 8px 0;
    background: rgba(61, 86, 50, 0.1);
    font-size: 15px;
    line-height: 155%;
    white-space: pre-wrap;
}

.admin-bugs__answer-meta {
    margin: 0 0 6px;
    font-size: 12px;
    color: #5c5851;
}

.admin-bugs__meta {
    margin: 0 0 14px;
    font-size: 13px;
    color: #5c5851;
}

.admin-bugs__meta div { margin-bottom: 3px; }
.admin-bugs__meta a { color: #9D653F; word-break: break-all; }

.admin-bugs__shots {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.admin-bugs__shot { position: relative; width: 150px; }

.admin-bugs__shot img {
    display: block;
    width: 150px;
    height: 100px;
    border: 1px solid rgba(64, 53, 40, 0.2);
    border-radius: 6px;
    object-fit: cover;
    background: #fff;
}

.admin-bugs__shot-name {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #5c5851;
    word-break: break-word;
}

.admin-bugs__shot-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--danger, #D94D4D);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.admin-bugs__statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-bugs__status-btn {
    padding: 6px 14px;
    border: 1px solid rgba(64, 53, 40, 0.3);
    border-radius: 18px;
    background: transparent;
    font-size: 13px;
    color: #403528;
    cursor: pointer;
}

.admin-bugs__status-btn--active {
    border-color: var(--textPrimaryBase, #3D5632);
    background: var(--textPrimaryBase, #3D5632);
    color: #FFF4E7;
}

.admin-bugs__note {
    margin: 0 0 12px;
    font-size: 12px;
    color: #8a857d;
}

@media (max-width: 767.98px) {
    .admin-bugs__table { display: block; overflow-x: auto; }
    .admin-bugs__toolbar { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   Раздел «Подсказки и замечания» (/admin/hints): вкладки и вкладка «Доступ».
   ========================================================================== */
.admin-hints { font-family: 'GolosText-Regular', sans-serif; }

.admin-hints__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.admin-hints__tab {
    padding: 10px 22px;
    border: 1px solid rgba(61, 86, 50, 0.25);
    border-radius: 22px;
    background: transparent;
    font-family: 'GolosText-Regular', sans-serif;
    font-size: 15px;
    color: #403528;
    cursor: pointer;
}

.admin-hints__tab--active {
    border-color: var(--textPrimaryBase, #3D5632);
    background: var(--textPrimaryBase, #3D5632);
    color: #FFF4E7;
}

.hints-access__title {
    margin: 0 0 12px;
    font-family: 'Oswald-Medium', sans-serif;
    font-size: 20px;
    color: #3D5632;
}

.hints-access__switches {
    margin-bottom: 30px;
    padding: 18px 20px;
    border: 1px solid rgba(61, 86, 50, 0.2);
    border-radius: 10px;
    background: #FFF8EC;
}

.hints-access__matrix {
    border-collapse: collapse;
    font-size: 14px;
}

.hints-access__matrix th,
.hints-access__matrix td {
    padding: 10px 20px 10px 0;
    text-align: left;
    vertical-align: middle;
}

.hints-access__matrix thead th {
    font-family: 'GolosText-SemiBold', sans-serif;
    color: #3D5632;
}

.hints-access__matrix thead th span {
    font-family: 'GolosText-Regular', sans-serif;
    font-size: 12px;
    color: #8a857d;
}

.hints-access__matrix tbody th {
    font-family: 'GolosText-Regular', sans-serif;
    font-weight: normal;
    color: #403528;
}

/* Грабли из чертежа: грант выдан, категория выключена — человек не понимает,
   почему у него ничего нет. Говорим заранее. */
.hints-access__warn {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(217, 77, 77, 0.1);
    font-size: 13px;
    line-height: 150%;
    color: #a5352c;
}

.hints-access__warn--soft {
    background: rgba(210, 184, 80, 0.18);
    color: #7a641b;
}

.hints-access__error {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--danger, #D94D4D);
}

.hints-access__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hints-access__toolbar .input { width: auto; min-width: 260px; max-width: 320px; }
.hints-access__toolbar .select { width: auto; min-width: 170px; }

.hints-access__hint {
    flex: 1 1 280px;
    font-size: 12px;
    line-height: 145%;
    color: #8a857d;
}

/* Массовые операции. Визуально отделены рамкой и подложкой: кнопка, которая
   разом меняет доступ сотням людей, не должна стоять в одном ряду с обычными
   фильтрами и нажиматься «заодно». */
.hints-access__bulk {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(210, 184, 80, 0.45);
    border-radius: 10px;
    background: rgba(210, 184, 80, 0.08);
}

.hints-access__bulk-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #5c5347;
}

.hints-access__bulk-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hints-access__bulk-label {
    min-width: 150px;
    font-size: 13px;
    color: #5c5347;
}

.hints-access__bulk .ghost-button {
    padding: 6px 12px;
    font-size: 13px;
}

.hints-access__bulk .hints-access__hint {
    flex: none;
    display: block;
    margin-top: 4px;
}

.hints-access__bulk-result {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #4b6b3a;
}

@media (max-width: 600px) {
    .hints-access__bulk-label { min-width: 100%; }
}

.hints-access__table {
    width: 100%;
    border-collapse: collapse;
    background: #FFF8EC;
    font-size: 14px;
}

.hints-access__table th,
.hints-access__table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(61, 86, 50, 0.12);
    text-align: left;
    vertical-align: middle;
}

.hints-access__table thead th {
    font-family: 'GolosText-SemiBold', sans-serif;
    color: #3D5632;
    white-space: nowrap;
}

.hints-access__email { font-size: 12px; color: #8a857d; }

.hints-access__cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hints-access__state {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.hints-access__state--on { background: rgba(61, 86, 50, 0.15); color: #3D5632; }
.hints-access__state--off { background: rgba(64, 53, 40, 0.1); color: #6a6259; }

/* Причина — то, ради чего таблица и нужна. */
.hints-access__reason { font-size: 12px; color: #8a857d; }

.hints-access__pager {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 14px;
}

@media (max-width: 767.98px) {
    .hints-access__table { display: block; overflow-x: auto; }
}

/* Строка «Значки» в меню пользователя: два переключателя, обозначенные самими
   значками, — так строка не повторяет «показывать» дважды. */
.header-user-menu__badges {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: #4a453e;
}

.header-user-menu__badges-label { margin-right: 2px; }

.header-user-menu__badge-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.header-user-menu__badge-toggle input { margin: 0; }

.header-user-menu__badge-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-family: 'GolosText-SemiBold', sans-serif;
    font-size: 12px;
    line-height: 1;
}

.header-user-menu__badge-mark--hint { color: #3D5632; }
.header-user-menu__badge-mark--bug { color: var(--danger, #D94D4D); }
