/* ===== БАЗА: фон/типографика ===== */
body {
    background:
        radial-gradient(1200px 800px at 10% -10%, #eef7ff 0, rgba(238, 247, 255, 0) 60%),
        radial-gradient(1000px 800px at 110% 10%, #f0fff7 0, rgba(240, 255, 247, 0) 55%),
        #f7f9fb;
    color: #111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.text-subtle {
    color: #6b7280;
}

.form-text {
    font-size: .8rem;
    color: #9ca3af;
}

/* ===== Карточки ===== */
.card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.card-elevated {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}

.glass {
    background: rgba(255, 255, 255, .68);
    backdrop-filter: saturate(160%) blur(8px);
    border: 1px solid rgba(255, 255, 255, .6);
}

/* ===== Toasts ===== */
.toast-area {
    z-index: 1080;
}

.toast {
    box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}

/* ===== Таблица заявок ===== */
.table thead th {
    background: #fafafa;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.table td,
.table th {
    vertical-align: middle;
}


/* без горизонтального скролла: проценты и обрезка текста */
.table-no-scroll {
    table-layout: auto;
    width: 100%;
}

.col-id {
    width: 4%;
}

.col-patient {
    width: 14%;
}

.col-research {
    width: 12%;
}

.col-desc {
    width: 24%;
}

/* описание */
.col-deadline {
    width: 7%;
}

.col-urgent {
    width: 5%;
    text-align: center;
}

.col-status {
    width: 16%;
}

.col-doctor {
    width: 8%;
}

/* суммарно ~90%, остальное — на перенос/иконки */

.cell-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Статусы/бейджи ===== */
.badge-urgent {
    background: #ef4444;
}

.status-dot {
    display: inline-block;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    margin-right: .4rem;
    background: currentColor;
    opacity: .8;
}

/* ===== Полоса действий под строкой заявки ===== */
.actions-row td {
    background: #f8fafb;
    border-top: 1px dashed #e5e7eb;
    padding: .5rem .75rem;
}

.actions-row .btn-toolbar {
    gap: .5rem;
}

.actions-row .btn {
    display: inline-flex;
    align-items: center;
}

/* Кнопки: перенос разрешён, но держим справа вторую группу */
.actions-row .btn-toolbar .d-flex {
    gap: .5rem;
}

.actions-row .btn-toolbar .flex-wrap {
    row-gap: .5rem;
}

/* ===== Контейнер пошире на десктопе ===== */
@media (min-width:1400px) {
    .container-xxl {
        max-width: 1680px;
    }
}

/* ===== Адаптивные упрощения ===== */
@media (max-width:1600px) {
    .col-urgent {
        display: none;
    }

    /* скрываем «Срочн.» */
}

@media (max-width:1400px) {
    .status-dates {
        display: none;
    }

    /* прячем блок дат под статусом */
}

@media (max-width:1200px) {

    /* оставляем только иконки в полосе действий */
    .actions-row .btn .me-1 {
        margin-right: 0 !important;
    }

    .actions-row .btn span {
        display: none;
    }
}

/* === Отключаем подсветку строк таблицы при наведении === */
.table.table-hover tbody tr:hover,
.table.table-hover tbody tr:hover>* {
    background: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

/* На всякий случай не даём менять фон у строки действий */
.actions-row:hover td {
    background: #f8fafb !important;
    --bs-table-accent-bg: transparent !important;
}

/* Полностью отключаем подсветку строк Bootstrap при hover */
.table {
    --bs-table-hover-bg: transparent !important;
    --bs-table-hover-color: inherit !important;
}

.table-hover>tbody>tr:hover {
    background-color: transparent !important;
}

.table-hover>tbody>tr:hover>* {
    --bs-table-accent-bg: transparent !important;
    background-color: transparent !important;
}

/* Строка с действиями должна оставаться светлой и не мигать */
.actions-row:hover td {
    background: #f8fafb !important;
}

/* Лейбл на странице логина (когда navbar скрыт) */
.brand-overlay {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 1040;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.brand-overlay .bi {
    color: #10b981;
}

/* ======== ДОБАВЛЕНО: аккуратный перенос и уважение \n ======== */
.pre-wrap {
    white-space: pre-wrap;
    word-break: break-word;
}