@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── Design tokens ── */
:root {
    --color-bg:          #ffffff;
    --color-bg-subtle:   #f7f7f8;
    --color-bg-hover:    #f0f0f2;
    --color-border:      #e4e4e7;
    --color-border-subtle: #f0f0f2;

    --color-text:        #09090b;
    --color-text-muted:  #71717a;
    --color-text-subtle: #a1a1aa;

    --color-accent:      #0a74f0;   /* Avito blue (≈, уточнить по токенам) */
    --color-accent-hover:#0a5ad6;

    --color-success-bg:  #f0fdf4;
    --color-success-text:#15803d;
    --color-success-border:#bbf7d0;

    --color-error-bg:    #fef2f2;
    --color-error-text:  #dc2626;
    --color-error-border:#fecaca;

    --color-sidebar-bg:  #18181b;
    --color-sidebar-text:#a1a1aa;
    --color-sidebar-text-hover:#ffffff;
    --color-sidebar-active:#ffffff;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
}

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* HTML-атрибут hidden должен побеждать любой display от классов
   (иначе, напр., .form-field { display: flex } перекрывает скрытие). */
[hidden] {
    display: none !important;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg-subtle);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Public layout ── */

.nav {
    background: rgba(255, 255, 255, .8);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
}

.nav__logo-img {
    display: block;
    height: 35px;
    width: auto;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 24px;
}

.nav__link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 7px 12px;
    border-radius: var(--radius-md);
    transition: background .12s, color .12s;
}

.nav__link:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.nav__link--active {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.nav__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 9px;
    background: var(--color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
}

.nav__user {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.nav__username {
    font-size: 13px;
    color: var(--color-text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav__logout {
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

.nav__logout:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
    border-color: var(--color-text-subtle);
}

/* ── Nav cards (dashboard) ── */

.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.nav-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: border-color .12s, box-shadow .12s, transform .12s;
}

.nav-card:hover {
    border-color: var(--color-text-subtle);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.nav-card__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

.nav-card__icon svg {
    width: 19px;
    height: 19px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-card__title {
    font-size: 14.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.nav-card__text {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ── Admin layout ── */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--color-sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    top: 0px;
    bottom: 0;
    left: 0;
}

.admin-sidebar__header {
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.admin-sidebar__logo {
    display: inline-flex;
    align-items: center;
}

.admin-sidebar__logo-img {
    display: block;
    height: 22px;
    width: auto;
}

.admin-sidebar__nav {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 2px;
}

.admin-sidebar__section {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-sidebar-text);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 12px 8px 4px;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--color-sidebar-text);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    transition: background .12s, color .12s;
}

.admin-sidebar__link:hover {
    background: rgba(255,255,255,.07);
    color: var(--color-sidebar-text-hover);
}

.admin-sidebar__link--active {
    background: rgba(255,255,255,.1);
    color: var(--color-sidebar-active);
}

.admin-main {
    margin-left: 232px;
    flex: 1;
    min-height: 100vh;
    background: var(--color-bg-subtle);
}

.admin-topbar {
    background: var(--color-bg);
}

.admin-content {
    padding: 40px 32px;
}

/* ── Page header ── */

.page-header {
    margin-bottom: 32px;
}

/* Заголовок страницы с действием справа (например, кнопка экспорта на дашборде). */
.page-header--with-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.page-header__title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 6px;
}

.page-header__subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ── Card ── */

.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* ── Review sections ──
   Единая система блоков для страниц просмотра/заполнения ревью
   (/review, /manager/reviews, /admin/reviews): фрейм-карточка с
   заголовком ВНУТРИ и согласованным вертикальным ритмом между блоками. */

.review-section {
    margin-bottom: 24px;
}

.review-section:last-child {
    margin-bottom: 0;
}

/* Заголовок блока внутри карточки (с опциональной мета-подписью справа). */
.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-header__title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.card-header__meta {
    font-size: 13px;
    color: var(--color-text-muted);
}

.card-header__meta--low {
    color: var(--color-error-text);
}

/* ── Alerts ── */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 24px;
    border: 1px solid transparent;
}

.alert--success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border-color: var(--color-success-border);
}

/* Плавное исчезновение авто-скрываемого уведомления (data-autodismiss). */
.alert--fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.alert--error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
    border-color: var(--color-error-border);
}

.alert--warning {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.alert--info {
    background: #e0f2fe;
    color: #075985;
    border-color: #7dd3fc;
}

.revision-comment {
    margin-top: 6px;
    color: var(--color-text);
    white-space: pre-wrap;
}

/* История возвратов на доработку: сначала самые свежие комментарии. */
.revision-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.revision-list__item:not(:last-child) {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border-subtle);
}

.revision-list__meta {
    font-size: 12px;
    color: var(--color-text-muted);
}

.revision-list__item .revision-comment {
    margin-top: 4px;
}

/* ── Upload form ── */

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
}

.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 36px 24px;
    border: 1.5px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-subtle);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
}

.file-drop:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-hover);
}

.file-drop__icon {
    width: 36px;
    height: 36px;
    color: var(--color-text-subtle);
}

.file-drop__text {
    font-size: 13.5px;
    color: var(--color-text-muted);
    text-align: center;
}

.file-drop__subtext {
    font-size: 12px;
    color: var(--color-text-subtle);
}

.file-drop__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-drop__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    display: none;
}

/* ── Buttons ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .12s, opacity .12s;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

.btn--danger {
    background: var(--color-bg);
    color: var(--color-error-text);
    border-color: var(--color-error-border);
}

.btn--danger:hover {
    background: var(--color-error-bg);
}

.btn--secondary {
    background: var(--color-bg);
    color: var(--color-text-muted);
    border-color: var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
    border-color: var(--color-text-subtle);
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Modal (нативный <dialog>) ── */

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 440px;
    width: calc(100% - 32px);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
}

.modal::backdrop {
    background: rgba(0, 0, 0, .4);
}

.modal__title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.modal__text {
    font-size: 13.5px;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-bottom: 22px;
}

/* Более широкий попап — для возврата на доработку с полем причины. */
.modal--wide {
    max-width: 650px;
}

/* Поле причины внутри попапа возврата на доработку отделяется от кнопок снизу. */
.modal .form-field {
    margin-bottom: 22px;
}

/* Textarea в попапе возврата растёт по содержимому (JS data-autosize): ручное
   растягивание мышкой отключено, своя полоса прокрутки не нужна. */
.modal textarea {
    resize: none;
    overflow: hidden;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Список незаполненных разделов в попапе валидации отправки. */
.missing-list {
    margin: 0 0 22px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13.5px;
    color: var(--color-text);
}

/* ── Text input ── */

.text-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color .12s;
}

.text-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, .06);
}

.text-input::placeholder {
    color: var(--color-text-subtle);
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 6px;
}

.inline-form .text-input {
    flex: 1;
}

.inline-form .btn {
    flex-shrink: 0;
}

/* ── Active cycle card ── */

.cycle-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cycle-active__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-left: 8px;
}

.cycle-active__meta {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* ── Import success ── */

.import-success__text {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

/* ── Stat cards ── */

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 4px;
}

.stat-card {
    flex: 1;
    min-width: 130px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.dashboard-meta {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.stat-card__value {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card__label {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ── Table ── */

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-muted);
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.table tbody td {
    padding: 11px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--color-border-subtle);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover td {
    background: var(--color-bg-hover);
}

.table__cell--name {
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
}

.table__cell--muted {
    color: var(--color-text-muted);
}

.table__empty {
    color: var(--color-text-subtle);
}

/* Строка-итог внизу таблицы: сколько человек сейчас на странице. */
.table__foot {
    padding: 11px 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

/* ── Badge ── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.badge--active {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.badge--inactive {
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.badge--draft {
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.badge--pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* ── Empty state ── */

.empty-state {
    text-align: center;
    padding: 64px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.empty-state__title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.empty-state__text {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* ── Error page (404/403 и т.п.) ── */

.error-page__code {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.error-page__action {
    display: inline-block;
    margin-top: 24px;
}

/* ── Review form ── */

.form-optional {
    font-weight: 400;
    color: var(--color-text-subtle);
}

.form-required {
    color: var(--color-error-text);
}

.form-error {
    font-size: 12px;
    color: var(--color-error-text);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

/* Индикатор автосохранения черновика (в шапке, рядом с бейджем статуса). */
.save-status {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-left: 8px;
    vertical-align: middle;
    transition: color .12s;
}

.save-status--saving {
    color: var(--color-text-subtle);
}

.save-status--saved {
    color: var(--color-success-text);
}

.save-status--error {
    color: var(--color-error-text);
}

/* Отрисовка сохранённого HTML в readonly-просмотрах. */
.rich-content {
    word-break: break-word;
}

/* ── WYSIWYG (Quill, тема snow) ── */
.ql-toolbar.ql-snow,
.ql-container.ql-snow {
    border-color: var(--color-border);
}

.ql-toolbar.ql-snow {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.ql-container.ql-snow {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
}

.ql-editor {
    min-height: 120px;
}

.ql-editor.ql-blank::before {
    color: var(--color-text-subtle);
    font-style: normal;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.readonly-field {
    margin-bottom: 20px;
}

.readonly-field:last-child {
    margin-bottom: 0;
}

.readonly-field__label {
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

/* ── Reviewers ── */

.reviewers-hint {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.reviewer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reviewer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
}

.reviewer-item__info {
    display: flex;
    flex-direction: column;
}

.reviewer-item__name {
    font-weight: 500;
    font-size: 14px;
}

.reviewer-item__meta {
    font-size: 12.5px;
    color: var(--color-text-muted);
}

.reviewer-item__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    border: none;
    background: transparent;
    color: var(--color-text-subtle);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    transition: color .12s, background .12s;
}

.btn-icon:hover {
    color: var(--color-error-text);
    background: var(--color-error-bg);
}

.hidden-form {
    display: none;
}

/* ── Reviewer autocomplete ── */

.reviewer-search {
    position: relative;
    margin-bottom: 16px;
}

.reviewer-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 20;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

.reviewer-option {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 9px 12px;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 1px solid var(--color-border-subtle);
    transition: background .1s;
}

.reviewer-option:last-child {
    border-bottom: none;
}

.reviewer-option:hover {
    background: var(--color-bg-hover);
}

.reviewer-option__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.reviewer-option__meta {
    font-size: 12.5px;
    color: var(--color-text-muted);
}

/* ── Submit section ── */

.submit-section {
    margin-top: 16px;
}

.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 16px 0;
}

.checklist__item {
    font-size: 13.5px;
    color: var(--color-text-muted);
}

.checklist__item--done {
    color: var(--color-success-text);
}

/* ── Manager ── */

.table__cell--action {
    text-align: right;
    white-space: nowrap;
}

.link-action {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link-back {
    display: inline-block;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.link-back:hover {
    color: var(--color-text);
}

.manager-actions {
    margin: 16px 0;
}

/* Кнопки согласования трека: «Согласовать» и «Вернуть на доработку» в один ряд,
   отделённые от содержимого карточки линией. Возврат открывает попап с причиной. */
.approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-subtle);
}

/* ── Collected feedback ── */

.feedback-item {
    padding: 0;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

/* Тело отзыва получает отступы вместо самой карточки — так весь summary кликабелен. */
.feedback-item__body {
    padding: 0 16px 16px;
}

/* Даты создания/обновления отзыва — приглушённая строка над содержимым ОС. */
.feedback-item__dates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.feedback-item:last-child {
    margin-bottom: 0;
}

.feedback-item__author {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feedback-item__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.feedback-item__head .feedback-item__author {
    margin-bottom: 0;
}

/* Свёрнутая карточка обратной связи: заголовок-summary кликабелен, отзыв раскрывается по клику. */
.feedback-item > summary {
    padding: 16px;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.feedback-item > summary::-webkit-details-marker {
    display: none;
}

.feedback-item__toggle {
    margin-left: auto;
    font-size: 18px;
    line-height: 1;
    color: var(--color-text-muted);
    transition: transform 0.15s ease;
}

.feedback-item[open] > summary .feedback-item__toggle {
    transform: rotate(90deg);
}

.feedback-item[open] > summary {
    padding-bottom: 12px;
}

/* Крупный прочерк для незаполненного отзыва. */
.empty-dash {
    display: block;
    font-size: 28px;
    line-height: 1.2;
    color: var(--color-text-muted);
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

/* ── Login page ── */

.login-page {
    min-height: calc(100vh - 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-card__header {
    text-align: center;
}

.login-card__title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.login-card__subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
}

.btn--google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
}

.btn--google:hover {
    background: var(--color-bg-subtle);
}

/* ── Дашборд: фильтры получателей и панель рассылки ── */

/* Свёрнутая панель фильтров на нативном <details>: в свёрнутом виде видны только
   кнопка «Фильтры» и чипы активных фильтров; форма разворачивается по клику. */
.filter-panel {
    margin-bottom: 16px;
}

.filter-panel__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    list-style: none;
    cursor: pointer;
}

/* Убираем стандартный треугольник-маркер <summary>. */
.filter-panel__bar::-webkit-details-marker {
    display: none;
}

.filter-panel__toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    user-select: none;
}

.filter-panel__bar:hover .filter-panel__toggle {
    background: var(--color-bg-hover);
}

.filter-panel__icon {
    font-size: 13px;
}

.filter-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.filter-panel__caret {
    font-size: 11px;
    color: var(--color-text-muted);
    transition: transform .15s;
}

.filter-panel[open] .filter-panel__caret {
    transform: rotate(180deg);
}

/* Чипы активных фильтров (видны и в свёрнутом виде). */
.filter-chips {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px 5px 11px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-hover);
    border: 1px solid var(--color-border-subtle);
    font-size: 13px;
    color: var(--color-text);
}

.filter-chip__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
}

.filter-chip__remove:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.filter-chips__reset {
    font-size: 13px;
    color: var(--color-text-muted);
    text-decoration: none;
}

.filter-chips__reset:hover {
    text-decoration: underline;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 16px;
}

.filters__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

/* Комбобокс фильтра (сотрудник/руководитель): текстовое поле + выпадающие подсказки.
   Выпадашка использует .reviewer-dropdown, позиционируется относительно этого контейнера. */
.combobox {
    position: relative;
}

/* Сетка полей в форме правила автоотправки (аудитория, расписание). */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 16px;
    margin-bottom: 4px;
}

/* Вертикальный ритм формы правила автоотправки: воздух между блоками. */
.schedule-form > .form-field {
    margin-bottom: 22px;
}

.schedule-form > .form-label {
    margin-top: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.schedule-form > .filter-grid {
    margin-bottom: 8px;
}

.schedule-form > button,
.schedule-form > .manager-actions {
    margin-top: 24px;
}

/* Выбор дней недели для еженедельного расписания. */
.weekday-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.weekday-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.filters__field .form-label {
    margin-bottom: 0;
}

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

.btn--ghost {
    background: transparent;
    color: var(--color-text-muted);
    border-color: transparent;
}

.btn--ghost:hover {
    color: var(--color-text);
    background: var(--color-bg-subtle);
}

.table__cell--checkbox {
    width: 36px;
    text-align: center;
}

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

.broadcast-bar__select {
    max-width: 360px;
}

button.link-action {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.link-action--danger {
    color: #dc2626;
}

/* ── Карточка оповещения (раздел «Оповещения») ── */
.announcement {
    margin-bottom: 12px;
}

.announcement__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.announcement__title {
    font-size: 15px;
    font-weight: 600;
    margin-right: auto;
}

.announcement__stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.announcement__meta {
    font-size: 12px;
    color: var(--color-text-muted);
}

.announcement__body {
    color: var(--color-text);
    white-space: pre-wrap;
    font-size: 13.5px;
    line-height: 1.5;
    padding: 12px 14px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.announcement__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Раздел «Роли»: имя сотрудника на странице назначения роли. */
.role-edit__user {
    font-weight: 600;
    font-size: 16px;
}

/* Несколько действий (ссылки + форма) в одной ячейке таблицы — в ряд, справа. */
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.row-actions form {
    margin: 0;
}
