﻿
/* ── Полноэкранный режим (flex — таблица тянется до низа) ── */
.wt-wrap-fs {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: #fff;
    margin: 0;
    padding: 3px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .wt-wrap-fs .wt-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        max-height: none;
    }

.wt-subtitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wt-table-toolbar {
    display: flex;
    justify-content: flex-end;
}

.wt-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    margin-left: 10px;
    transition: all .15s ease;
}

    .wt-fullscreen-btn:hover {
        background: #f5f3ee;
        border-color: #c9c6bd;
        color: #222;
    }

/* ── Панель фильтров ── */
.wt-filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.wt-search-wrap {
    position: relative;
    flex: 0 1 320px;
    min-width: 220px;
}

.wt-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0afa8;
    font-size: 0.9rem;
}

.wt-search-input {
    width: 100%;
    padding: 8px 32px 8px 34px;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
}

    .wt-search-input:focus {
        border-color: #c9c6bd;
    }

.wt-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #b0afa8;
    font-size: 0.9rem;
}

.wt-filter-select {
    position: relative;
    display: flex;
    align-items: center;
}

.wt-filter-icon {
    position: absolute;
    left: 10px;
    color: #b0afa8;
    font-size: 0.85rem;
    pointer-events: none;
}

.wt-select {
    appearance: none;
    padding: 8px 28px 8px 30px;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fff;
    cursor: pointer;
    outline: none;
    min-width: 160px;
    max-width: 240px;
}

/* ── Строка-заголовок отдела ── */
.wt-dept-row td {
    padding: 0;
}

.wt-dept-cell {
    background: #f3f1ea;
    border-top: 2px solid #e0ded7;
}

.wt-dept-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #4a4a45;
}

.wt-dept-count {
    font-size: 0.72rem;
    font-weight: 400;
    color: #8a8a86;
    background: #fff;
    border: 1px solid #e0ded7;
    border-radius: 10px;
    padding: 1px 8px;
}

.wt-empty-row {
    text-align: center;
    padding: 32px;
    color: #b0afa8;
    font-size: 0.9rem;
}

/* ── Аватар + статус приём/увольнение ── */
.wt-avatar-wrap {
    position: relative;
    display: inline-block;
}

.wt-status-tag {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.3;
}

.wt-status-hired {
    background: #e1f5fe;
    color: #0277bd;
    border: 1px solid #81d4fa;
}

.wt-status-fired {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

.wt-emp-date {
    font-size: 0.62rem;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.wt-emp-date-hired {
    color: #0277bd;
}

.wt-emp-date-fired {
    color: #b71c1c;
}

/* ── Метки приём/увольнение в ячейке дня ── */
.wt-day-status {
    display: block;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
    margin: 2px 0;
}

.wt-day-hired {
    background: #e1f5fe;
    color: #0277bd;
}

.wt-day-fired {
    background: #ffebee;
    color: #b71c1c;
}

/* ── Ячейка примечания ── */
.wt-note-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    cursor: pointer;
    min-height: 26px;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background .12s ease;
}

    .wt-note-cell:hover {
        background: #f5f3ee;
    }

.wt-note-text-val {
    font-size: 0.78rem;
    color: #4a4a45;
    white-space: normal;
    word-break: break-word;
}

.wt-note-auto {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 6px;
}

.wt-note-auto-hired {
    background: #e1f5fe;
    color: #0277bd;
}

.wt-note-auto-fired {
    background: #ffebee;
    color: #b71c1c;
}

.wt-note-empty {
    font-size: 0.72rem;
    color: #c4c2bb;
    font-style: italic;
}

.wt-note-edit-icon {
    font-size: 0.72rem;
    color: #c4c2bb;
    flex-shrink: 0;
}

.wt-note-cell:hover .wt-note-edit-icon {
    color: #8a8a86;
}

.wt-note-hint {
    font-size: 0.78rem;
    color: #777;
    background: #faf7f1;
    border-radius: 6px;
    padding: 8px 10px;
}

/* ── Дни / итоги / доработки ── */
.wt-td-days {
    text-align: center;
    vertical-align: middle;
    padding: 8px 6px;
}

.wt-days-val {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.wt-days-unit {
    font-size: 0.75rem;
    color: #8a8a86;
    font-weight: 300;
}

.wt-days-sub {
    font-size: 0.7rem;
    color: #b0afa8;
    margin-top: 2px;
}

.wt-td-overtime {
    text-align: center;
    vertical-align: middle;
    padding: 6px;
    font-size: 0.7rem;
    min-width: 110px;
}

.wt-ot-sat {
    color: #1565c0;
    margin-bottom: 2px;
    white-space: nowrap;
}

.wt-ot-paid {
    color: #2e7d32;
    margin-bottom: 2px;
    white-space: nowrap;
}

.wt-ot-pending {
    color: #e65100;
    margin-bottom: 2px;
    white-space: nowrap;
}

.wt-ot-flag {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
}

    .wt-ot-flag:hover {
        background: #bbdefb;
    }

.wt-ot-badge-paid {
    font-size: 0.55rem;
    color: #2e7d32;
    text-align: center;
    margin-top: 2px;
}

.wt-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.wt-total-h {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.wt-total-h-ok {
    color: #2e7d32;
}

.wt-total-h-warn {
    color: #b07d0c;
}

.wt-total-info {
    font-size: 0.8rem;
    color: #b0afa8;
    cursor: help;
    flex-shrink: 0;
}

.wt-total-bar {
    height: 4px;
    background: #ebe9e2;
    border-radius: 2px;
    margin: 6px 0 4px;
    overflow: hidden;
}

.wt-total-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.wt-total-bar-fill-ok {
    background: #2e7d32;
}

.wt-total-bar-fill-warn {
    background: #e0a213;
}

.wt-total-sub {
    font-size: 0.7rem;
    color: #b0afa8;
    white-space: nowrap;
}

.wt-edited-badge.wt-edited-clickable {
    cursor: pointer;
    user-select: none;
    transition: opacity .12s ease;
}

    .wt-edited-badge.wt-edited-clickable:hover {
        opacity: .8;
        text-decoration: underline;
    }

.wt-sunday-flag {
    position: absolute;
    bottom: 2px;
    left: 7px;
    right: 2px;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.58rem;
    padding: 1px 4px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
}

    .wt-sunday-flag:hover {
        background: #ffe0b2;
    }

.wt-sunday-choice {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.wt-sunday-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wt-sunday-paid {
    border-color: #2e7d32;
    background: #e8f5e9;
    color: #2e7d32;
}

.wt-sunday-unpaid {
    border-color: #c62828;
    background: #ffebee;
    color: #c62828;
}

/* модалки поверх полноэкранного режима */
.wt-modal-overlay {
    z-index: 1400 !important;
}

.wt-hist-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,16,12,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500 !important;
    padding: 16px;
}

.wt-hist-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}

.wt-hist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.wt-hist-title {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wt-hist-subtitle {
    font-size: 0.78rem;
    color: #8a8a86;
    margin-top: 2px;
}

.wt-hist-close {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    color: #8a8a86;
    line-height: 1;
}

.wt-hist-body {
    padding: 12px 20px 20px;
    overflow-y: auto;
}

.wt-hist-loading, .wt-hist-empty {
    text-align: center;
    color: #8a8a86;
    padding: 32px 0;
    font-size: 0.9rem;
}

.wt-hist-entry {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 12px;
}

    .wt-hist-entry:first-child {
        margin-top: 4px;
    }

.wt-hist-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.wt-hist-user {
    font-weight: 500;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wt-hist-date {
    font-size: 0.75rem;
    color: #8a8a86;
    white-space: nowrap;
}

.wt-hist-reason {
    font-size: 0.8rem;
    color: #555;
    background: #faf7f1;
    border-radius: 6px;
    padding: 6px 9px;
    margin-bottom: 8px;
}

.wt-hist-reason-lbl {
    color: #b0813a;
    font-weight: 500;
    margin-right: 4px;
}

.wt-hist-changes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wt-hist-change {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.wt-hist-field {
    color: #555;
}

.wt-hist-old {
    color: #c62828;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.wt-hist-arrow {
    color: #b0afa8;
    font-size: 0.75rem;
}

.wt-hist-new {
    color: #2e7d32;
    font-weight: 500;
}

.wt-hist-nochange {
    font-size: 0.8rem;
    color: #b0afa8;
    font-style: italic;
}


/*===================*/

/* ═══ БАННЕР СТАТУСА ═══ */
.wt-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 3px 10px;
    border-radius: 12px;
    border-left: 4px solid;
}

.wt-banner-draft {
    background: #f5f3ee;
    border-left-color: #8a8a86;
}

.wt-banner-pending {
    background: #e3f2fd;
    border-left-color: #1565c0;
}

.wt-banner-revision {
    background: #fff3e0;
    border-left-color: #e65100;
}

.wt-banner-approved {
    background: #e8f5e9;
    border-left-color: #2e7d32;
}

.wt-banner-closed {
    background: #f5f5f5;
    border-left-color: #4a4a45;
}

.wt-banner-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    padding-top: 2px;
}

.wt-banner-draft .wt-banner-icon {
    color: #8a8a86;
}

.wt-banner-pending .wt-banner-icon {
    color: #1565c0;
}

.wt-banner-revision .wt-banner-icon {
    color: #e65100;
}

.wt-banner-approved .wt-banner-icon {
    color: #2e7d32;
}

.wt-banner-closed .wt-banner-icon {
    color: #4a4a45;
}

.wt-banner-content {
    flex: 1;
    min-width: 0;
}

.wt-banner-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d2d2a;
    margin-bottom: 2px;
}

.wt-banner-revisions {
    font-size: 0.78rem;
    color: #8a8a86;
    font-weight: 400;
    margin-left: 6px;
}

.wt-banner-text {
    font-size: 0.80rem;
    color: #555;
}

.wt-banner-comment {
    margin-top: 8px;
    /*padding: 8px 12px;*/
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #2d2d2a;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

    .wt-banner-comment i {
        color: #e65100;
        font-size: 1rem;
        flex-shrink: 0;
        margin-top: 2px;
    }

.wt-banner-actions {
    flex-shrink: 0;
}

.wt-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-size: 0.82rem;
    color: #4a4a45;
    cursor: pointer;
    font-weight: 500;
    transition: all .15s;
}

    .wt-banner-btn:hover {
        background: #fafafa;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

/*===========*/

/* ═══ Readonly подсказка в модалке ═══ */
.wt-readonly-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #8a8a86;
    margin-top: 12px;
}

    .wt-readonly-hint i {
        color: #b0afa8;
    }

/* ═══ Readonly ячейка примечания ═══ */
.wt-note-readonly {
    cursor: default !important;
    opacity: 0.85;
}

    .wt-note-readonly:hover {
        background: transparent !important;
    }
/*===================*/

.wt-fact-open {
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

.wt-fact-open-label {
    font-size: 0.6rem;
    color: #8a8a86;
    font-weight: 400;
}


.tw-modal-refresh {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background .15s;
}

    .tw-modal-refresh:hover:not(:disabled) {
        background: rgba(255,255,255,0.25);
    }

    .tw-modal-refresh:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
   



.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    position: relative;
    cursor: pointer;
}

.card-help {
    display: flex;
    flex-direction: column;
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin-right: 15px;
}

.icon-yellow {
    background: #ffe08a;
    color: #9c6f00;
}

.icon-blue {
    background: #cce5ff;
    color: #004085;
}

.icon-green {
    background: #d4edda;
    color: #155724;
}

.icon-cyan {
    background: #c9f7f5;
    color: #0c5460;
}

.stat-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .stat-info h4 {
        margin-right: 10px;
        font-size: 16px;
        color: #666;
    }

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin: 5px 0;
}

.stat-desc {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/*.stat-desc-pay {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #374151;
    cursor: pointer;
}

    .stat-desc-pay:hover {
        color: #2563eb;
        border-bottom-color: #2563eb;
    }*/

.stat-desc-pay {
    margin-top: auto !important;
    align-self: flex-end !important;
}

.stat-badge {
    position: relative;
    top: 8px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #e6f4ea;
    color: #137333;
}

.badge-danger {
    background: #fdecea;
    color: #c5221f;
}

.table-block {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    height: 400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.scroll-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}


/*Component EmployeCard*/
.ec-page {
    min-height: 60vh;
}

.ec-header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.ec-photo {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.ec-photo-placeholder {
    background: #2C5EAD;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
}

.ec-header-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d2d2a;
}

.ec-header-sub {
    color: #8a8a86;
    font-size: .88rem;
    margin-top: 2px;
}

.ec-dot {
    margin: 0 6px;
}

.ec-header-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ec-tag {
    background: #f4f3f0;
    color: #4a4a45;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: .76rem;
}

/*.ec-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    flex-wrap: wrap;
}*/

.ec-tabs {
    display: flex;
    gap: 4px;
    background: #f4f3f0;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: none;
}

/*.ec-tab {
    padding: 10px 16px;
    font-size: .86rem;
    cursor: pointer;
    color: #8a8a86;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
}*/

.ec-tab {
    padding: 9px 16px;
    font-size: .86rem;
    font-weight: 500;
    cursor: pointer;
    color: #6a6a65;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

    /*.ec-tab:hover {
        color: #2d2d2a;
    }*/
    .ec-tab:hover {
        color: #2d2d2a;
        background: rgba(255,255,255,.6);
    }
/*
    .ec-tab.active {
        color: #1565c0;
        border-color: #1565c0;
        font-weight: 600;
    }*/
    .ec-tab.active {
        color: #2C5EAD;
        background: #fff;
        font-weight: 700;
        box-shadow: 0 1px 4px rgba(0,0,0,.08);
    }

.ec-tab-badge {
    background: #2C5EAD;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.4;
}

.ec-tab:not(.active) .ec-tab-badge {
    background: #d5d5d0;
    color: #6a6a65;
}

.ec-badge-unofficial {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fdf1d6;
    color: #a86a00;
    border: 1px solid #f0d98a;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 600;
}


/* ══ ТАБ "ЗАРПЛАТА" ══ */
.ec-salary-tab-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: linear-gradient(135deg, #eafaf1 0%, #f4faf6 100%);
    border: 1px solid #a9dfbf;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 20px;
}

.ec-salary-tab-total-lbl {
    display: block;
    font-size: .78rem;
    color: #4a4a45;
    margin-bottom: 4px;
}

.ec-salary-tab-total-val {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e8449;
}

.ec-salary-tab-split {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ec-salary-split-item {
    font-size: .84rem;
    color: #4a4a45;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-blue {
    background: #2C5EAD;
}

.dot-orange {
    background: #d99c4c;
}

.ec-salary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


    .ec-salary-item:hover {
        box-shadow: 0 3px 10px rgba(0,0,0,.06);
        transform: translateY(-1px);
    }

.ec-salary-item-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ec-salary-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.icon-main {
    background: #eaf2fd;
    color: #2265c4;
}

.icon-extra {
    background: #f4f3f0;
    color: #6a6a65;
}

.ec-salary-item-name {
    font-weight: 700;
    font-size: .92rem;
    color: #2d2d2a;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ec-salary-item-breakdown {
    font-size: .8rem;
    color: #8a8a86;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.ec-salary-item-total {
    font-weight: 800;
    font-size: 1rem;
    color: #2C5EAD;
    margin-left: auto;
}

.ec-salary-item-warn {
    border-left-color: #d99c4c;
    background: #fffdf7;
}

    .ec-salary-item-warn .ec-salary-item-icon {
        background: #fdf1d6;
        color: #a86a00;
    }

.ec-tag-warn {
    background: #fdf1d6;
    color: #a86a00;
    font-weight: 600;
}

.ec-tag-rate {
    background: #eef2fb;
    color: #2C5EAD;
    font-weight: 600;
}


.ec-salary-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 700;
}




.ec-salary-section {
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 20px;
    background: linear-gradient(180deg, #fbfaf8 0%, #ffffff 60%);
}

.ec-salary-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 14px;
    color: #2d2d2a;
}

    .ec-salary-head i {
        color: #2C5EAD;
        font-size: 1.1rem;
    }

.ec-salary-total {
    margin-left: auto;
    color: #1e8449;
    font-weight: 800;
    font-size: 1.15rem;
}


.ec-salary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #eee;
    border-left: 4px solid #2C5EAD;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}


.ec-salary-summary {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e0e0da;
    font-size: .88rem;
    flex-wrap: wrap;
    color: #4a4a45;
}

    .ec-salary-summary b {
        color: #2d2d2a;
    }


/* ══ ТАБ "ЗАРПЛАТА" ══ */
.ec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.ec-field {
    background: #faf9f7;
    border-radius: 10px;
    padding: 12px 14px;
}

.ec-lbl {
    display: block;
    font-size: .72rem;
    color: #8a8a86;
    margin-bottom: 3px;
}

.ec-val {
    font-size: .92rem;
    color: #2d2d2a;
    font-weight: 500;
}

.ec-loading, .ec-empty {
    text-align: center;
    color: #8a8a86;
    padding: 50px 0;
}

    .ec-empty i {
        font-size: 2.2rem;
        display: block;
        margin-bottom: 8px;
        opacity: .5;
    }

.ec-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.ec-item {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px 14px;
}

.ec-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ec-item-days {
    font-size: .78rem;
    color: #8a8a86;
}

.ec-item-period {
    font-size: .88rem;
    font-weight: 600;
    color: #2d2d2a;
}

.ec-item-comment {
    font-size: .8rem;
    color: #4a4a45;
    margin-top: 4px;
}

.ec-item-sum {
    font-size: .92rem;
    font-weight: 700;
    margin-top: 6px;
}

.sum-red {
    color: #c62828;
}

.sum-green {
    color: #2e7d32;
}

.ec-badge {
    padding: 2px 9px;
    border-radius: 8px;
    font-size: .74rem;
    font-weight: 600;
}

.b-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.b-orange {
    background: #fff3e0;
    color: #e65100;
}

.b-blue {
    background: #e3f2fd;
    color: #1565c0;
}

.b-red {
    background: #ffebee;
    color: #c62828;
}

.ec-item-footer {
    display: flex;
    justify-content: space-between;
    font-size: .74rem;
    color: #8a8a86;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.ec-status-tag {
    padding: 1px 7px;
    border-radius: 7px;
    font-weight: 600;
}

.ec-status-open {
    background: #e3f2fd;
    color: #1565c0;
}

.ec-status-closed {
    background: #f5f5f5;
    color: #8a8a86;
}

.ec-status-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.ec-status-deleted {
    background: #ffebee;
    color: #c62828;
}

.ec-loan-info {
    display: flex;
    gap: 14px;
    font-size: .76rem;
    color: #4a4a45;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.ec-payroll-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ec-sum-box {
    flex: 1;
    border-radius: 12px;
    padding: 14px 16px;
}

    .ec-sum-box.sum-red {
        background: #ffebee;
    }

    .ec-sum-box.sum-green {
        background: #e8f5e9;
    }

.ec-sum-lbl {
    font-size: .76rem;
    color: #8a8a86;
}

.ec-sum-val {
    font-size: 1.2rem;
    font-weight: 700;
}

.ec-sum-box.sum-red .ec-sum-val {
    color: #c62828;
}

.ec-sum-box.sum-green .ec-sum-val {
    color: #2e7d32;
}

.ec-chip-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 10px;
    background: rgba(0,0,0,.08);
    font-size: .74rem;
    font-weight: 600;
}

.ec-chip.active .ec-chip-count {
    background: rgba(255,255,255,.25);
}

.ec-loan-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    cursor: pointer;
    color: #6a6a65;
    margin-right: 4px;
    border-radius: 4px;
}

    .ec-loan-toggle:hover {
        background: #f0efec;
        color: #2265c4;
    }

.ec-loan-id-tag {
    margin-left: 6px;
    font-size: .72rem;
    color: #8a8a86;
    font-weight: 600;
}

.ec-trow-child {
    background: #fafaf9;
}

    .ec-trow-child td {
        padding-top: 8px;
        padding-bottom: 8px;
    }

.ec-child-connector {
    display: inline-block;
    margin-right: 6px;
    color: #b9b9b3;
    font-weight: 700;
}

.ec-trow-parent-ref {
    color: #2265c4;
    font-weight: 600;
}

@@media (max-width: 900px) {
    .ec-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@@media (max-width: 600px) {
    .ec-grid {
        grid-template-columns: 1fr;
    }

    .ec-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ═══ Фильтр месяц/год ═══ */
.mf-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.mf-select {
    padding: 7px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: .82rem;
    color: #4a4a45;
}

.mf-reset {
    border: none;
    background: #fff3e0;
    color: #e65100;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: .8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .mf-reset:hover {
        background: #ffe0b2;
    }

/* ═══ Разделение на 2 колонки ═══ */
.ec-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ec-split-col {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    background: #fdfdfc;
}

.ec-split-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e5e5e0;
}

.ec-split-title {
    font-size: .88rem;
    font-weight: 700;
    color: #2d2d2a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ec-split-total {
    font-size: 1rem;
    font-weight: 700;
}

/* ═══ Список-строки ═══ */
.ec-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ec-list-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

    .ec-list-row:hover {
        border-color: #d5d5d0;
    }

.ec-row-main {
    flex: 1;
    min-width: 0;
}

.ec-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.ec-row-period {
    font-size: .86rem;
    font-weight: 600;
    color: #2d2d2a;
}

.ec-row-date {
    font-size: .8rem;
    color: #8a8a86;
}

.ec-row-comment {
    font-size: .78rem;
    color: #6a6a65;
    margin-top: 2px;
}

.ec-row-right {
    text-align: right;
    flex-shrink: 0;
}

.ec-row-sum {
    font-size: .9rem;
    font-weight: 700;
    margin-top: 4px;
}

.ec-empty-sm {
    text-align: center;
    color: #b5b5b0;
    font-size: .82rem;
    padding: 24px 0;
}

/* ═══ Сводка (командировки) ═══ */
.ec-summary-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ec-summary-box {
    flex: 1;
    background: #f4f6fb;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
}

.ec-summary-lbl {
    font-size: .74rem;
    color: #8a8a86;
}

.ec-summary-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d2d2a;
    margin-top: 2px;
}

/* ═══ Прочие операции ═══ */
.ec-other-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.ec-other-title {
    font-size: .88rem;
    font-weight: 700;
    color: #4a4a45;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.b-grey {
    background: #eceae3;
    color: #4a4a45;
}

.b-blue-outline {
    background: #fff;
    border: 1px solid #1565c0;
    color: #1565c0;
}

.sum-orange {
    color: #e65100;
}







/*=============================== ewewewew*/
/* ═══ Скроллируемые списки (фиксированная высота, свой скролл) ═══ */
.ec-scroll-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.ec-scroll-list-lg {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

    .ec-scroll-list::-webkit-scrollbar,
    .ec-scroll-list-lg::-webkit-scrollbar {
        width: 6px;
    }

    .ec-scroll-list::-webkit-scrollbar-track,
    .ec-scroll-list-lg::-webkit-scrollbar-track {
        background: transparent;
    }

    .ec-scroll-list::-webkit-scrollbar-thumb,
    .ec-scroll-list-lg::-webkit-scrollbar-thumb {
        background: #d8d6d0;
        border-radius: 10px;
    }

        .ec-scroll-list::-webkit-scrollbar-thumb:hover,
        .ec-scroll-list-lg::-webkit-scrollbar-thumb:hover {
            background: #c0bdb5;
        }

/* ═══ Мягкая цветная акцентная полоса слева у карточки ═══ */
.ec-row-accent {
    position: relative;
    border-left: 3px solid var(--accent-color, transparent);
    padding-left: 14px !important;
}

/* ═══ Обновлённая палитра бейджей — мягкая, но насыщенная ═══ */
.b-red {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

.b-green {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

.b-blue {
    background: #eaf2fd;
    color: #2265c4;
    border: 1px solid #aecbf5;
}

.b-orange {
    background: #fef3e6;
    color: #d4780a;
    border: 1px solid #f7d9ad;
}

.b-grey {
    background: #f2f2f0;
    color: #6a6a65;
    border: 1px solid #d5d5d0;
}

.b-blue-outline {
    background: #fff;
    border: 1px solid #2265c4;
    color: #2265c4;
}

.sum-red {
    color: #c0392b;
}

.sum-green {
    color: #1e8449;
}

.sum-orange {
    color: #d4780a;
}

/* ═══ Более мягкие статус-теги ═══ */
.ec-status-tag {
    padding: 2px 9px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .72rem;
}

.ec-status-open {
    background: #eaf2fd;
    color: #2265c4;
}

.ec-status-closed {
    background: #f2f2f0;
    color: #8a8a86;
}

.ec-status-paid {
    background: #eafaf1;
    color: #1e8449;
}

.ec-status-deleted {
    background: #fdecea;
    color: #c0392b;
}

/* ═══ Сумма-блоки (шапки колонок) — тоже смягчить ═══ */
.ec-split-col {
    border: 1px solid #f0f0ec;
    border-radius: 14px;
    padding: 16px;
    background: #fdfdfc;
}

.ec-split-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #ebebe5;
}

.ec-split-title {
    font-size: .9rem;
    font-weight: 700;
    color: #2d2d2a;
    display: flex;
    align-items: center;
    gap: 7px;
}

.ec-split-total {
    font-size: 1.05rem;
    font-weight: 800;
}

/* ═══ Прочие операции: заголовок ═══ */
.ec-other-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f0f0ec;
}

.ec-other-title {
    font-size: .9rem;
    font-weight: 700;
    color: #4a4a45;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ═══ Строка списка — чуть мягче тень при ховере ═══ */
.ec-list-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #f0f0ec;
    border-radius: 10px;
    padding: 11px 14px;
    background: #fff;
    transition: box-shadow .15s, border-color .15s;
}

    .ec-list-row:hover {
        border-color: #e5e5e0;
        box-shadow: 0 2px 8px rgba(0,0,0,.04);
    }

@media (max-width: 800px) {
    .ec-split {
        grid-template-columns: 1fr;
    }
}

/*Part 2*/

.ec-history-flex {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-top: 20px;
    align-items: flex-start;
}

.ec-history-card {
    flex: 1;
    min-width: 0;
}

.ec-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
}

    .ec-section-title > i {
        color: #2265c4;
    }

 @media (max-width: 1000px) {
    .ec-history-flex {
        flex-direction: column;
    }

    .ec-history-card {
        width: 100%;
    }
}



.ec-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.ec-header-info {
    flex: 1;
}

/*.ec-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}*/

/* Контейнер для кнопок */
.ec-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Стили для кнопки "Доп. должность" в одном дизайне с остальными */
.ec-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #a5c7f3;
    border-radius: 7px;
    background: #f0f7ff;
    color: #0d6efd;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
}

    .ec-add-btn:hover {
        background: #0d6efd;
        color: white;
        border-color: #0d6efd;
        box-shadow: 0 3px 8px rgba(13, 110, 253, .20);
    }

    .ec-add-btn i {
        font-size: 15px;
    }

.ec-dismiss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #f0a7a7;
    border-radius: 7px;
    background: #fff5f5;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
}

    .ec-dismiss-btn:hover {
        background: #dc3545;
        color: white;
        border-color: #dc3545;
        box-shadow: 0 3px 8px rgba(220, 53, 69, .20);
    }

    .ec-dismiss-btn i {
        font-size: 15px;
    }

/* Базовые стили для обеих кнопок */
.es-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.es-btn-primary {
    background: #00B69B;
    color: #fff;
}

    .es-btn-primary:hover {
        background: #009c86;
    }

.es-btn-secondary {
    background: #2b3035;
    color: #fff;
    border: 1px solid #495057;
}

    .es-btn-secondary:hover {
        background: #343a40;
    }


.employee-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
}

.employee-modal {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: employeeModalShow .18s ease-out;
}

 @keyframes employeeModalShow {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



.employee-modal-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff0f0;
    color: #dc3545;
    font-size: 23px;
}

.employee-modal-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.employee-modal-text {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

    .employee-modal-text strong {
        color: #1f2937;
    }

.employee-modal-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: 8px;
    background: #fff8e8;
    color: #946200;
    font-size: 12px;
}

    .employee-modal-warning i {
        font-size: 15px;
        flex-shrink: 0;
    }

.employee-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

.employee-modal-cancel,
.employee-modal-confirm {
    height: 36px;
    padding: 0 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: .15s ease;
}

.employee-modal-cancel {
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #555;
}

    .employee-modal-cancel:hover {
        background: #f5f5f5;
    }

.employee-modal-confirm {
    border: 1px solid #dc3545;
    background: #dc3545;
    color: white;
}

    .employee-modal-confirm:hover {
        background: #bb2d3b;
        border-color: #bb2d3b;
    }

    .employee-modal-cancel:disabled,
    .employee-modal-confirm:disabled {
        opacity: .6;
        cursor: not-allowed;
    }







/*======*/
.ec-rehire-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #a9dfbf;
    border-radius: 7px;
    background: #eefaf3;
    color: #1e8449;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
}

    .ec-rehire-btn:hover {
        background: #1e8449;
        color: white;
        border-color: #1e8449;
        box-shadow: 0 3px 8px rgba(30, 132, 73, .20);
    }

    .ec-rehire-btn i {
        font-size: 15px;
    }


.employee-modal-icon-success {
    background: #eafaf1;
    color: #1e8449;
}

.employee-modal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: 8px;
    background: #eefaf3;
    color: #27704a;
    font-size: 12px;
}

    .employee-modal-info i {
        font-size: 15px;
        flex-shrink: 0;
    }

.employee-modal-rehire {
    height: 36px;
    padding: 0 16px;
    border-radius: 7px;
    border: 1px solid #1e8449;
    background: #1e8449;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: .15s ease;
}

    .employee-modal-rehire:hover {
        background: #176b3a;
        border-color: #176b3a;
    }

    .employee-modal-rehire:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

.employee-action-rehire {
    background: #198754;
}

    .employee-action-rehire:hover {
        background: #157347;
    }
/*Component EmployeCard*/




.wt-expired-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #e65100;
    background: #fff3e0;
    padding: 1px 5px;
    border-radius: 5px;
    margin-bottom: 2px;
}

.wt-expired-start {
    font-size: 0.62rem;
    color: #bf6a00;
    font-weight: 600;
}






/* ═══ Чипы фильтра типа ═══ */
.ec-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ec-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    background: #f2f2f0;
    color: #6a6a65;
    border: 1px solid transparent;
    transition: all .15s;
}

    .ec-chip:hover {
        background: #e8e8e3;
    }

    .ec-chip.active {
        background: #2d2d2a;
        color: #fff;
    }

    .ec-chip.chip-red.active {
        background: #c0392b;
    }

    .ec-chip.chip-green.active {
        background: #1e8449;
    }

    .ec-chip.chip-blue.active {
        background: #2265c4;
    }

    .ec-chip.chip-purple.active {
        background: #8e44ad;
    }

    .ec-chip.chip-teal.active {
        background: #128a86;
    }

    .ec-chip.chip-grey.active {
        background: #6a6a65;
    }

    .ec-chip.chip-indigo.active {
        background: #5b4fc4;
    }

/* ═══ Summary боксы (4 в ряд) ═══ */
.ec-summary-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.ec-summary-box {
    border-radius: 12px;
    padding: 12px 16px;
    background: #faf9f7;
    border-left: 3px solid transparent;
}

    .ec-summary-box.accent-red {
        background: #fdecea;
        border-color: #c0392b;
    }

    .ec-summary-box.accent-green {
        background: #eafaf1;
        border-color: #1e8449;
    }

    .ec-summary-box.accent-blue {
        background: #eaf2fd;
        border-color: #2265c4;
    }

    .ec-summary-box.accent-grey {
        background: #f2f2f0;
        border-color: #8a8a86;
    }

.ec-summary-lbl {
    font-size: .76rem;
    color: #6a6a65;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ec-summary-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #2d2d2a;
    margin-top: 4px;
}

/* ═══ Таблица (единый паттерн со всем приложением) ═══ */
.ec-table-wrap {
    overflow-x: auto;
    border: 1px solid #f0f0ec;
    border-radius: 12px;
}

.ec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}

    .ec-table thead th {
        background: #faf9f7;
        color: #8a8a86;
        font-size: .74rem;
        text-transform: uppercase;
        letter-spacing: .02em;
        font-weight: 700;
        padding: 10px 14px;
        text-align: left;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
    }

    .ec-table td {
        padding: 10px 14px;
        border-bottom: 1px solid #f4f3f0;
        vertical-align: top;
    }

.ec-trow {
    border-left: 3px solid var(--accent-color, transparent);
}

    .ec-trow:hover td {
        background: #faf9f7;
    }

.ec-trow-date {
    color: #8a8a86;
    font-size: .82rem;
    white-space: nowrap;
}

.ec-trow-desc {
    color: #2d2d2a;
}

.ec-trow-sub {
    font-size: .76rem;
    color: #8a8a86;
    margin-top: 2px;
}

.ec-trow-sum {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

@@media (max-width: 900px) {
    .ec-summary-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}


.ec-summary-box.accent-orange {
    background: #fef3e6;
    border-color: #d4780a;
}

.ec-chip.chip-orange.active {
    background: #d4780a;
}




/* ═══ Клетка сменной (ночной) смены — выглядит как рабочая ═══ */
.wt-td-shift {
    background: #f1f8f4 !important; /* тот же светлый фон, что у рабочего дня */
}

    .wt-td-shift:hover {
        background: #e8f3ec !important;
    }

/* ═══ Бейдж "Ночная" — компактный, читаемый ═══ */
/*.wt-night-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    margin-bottom: 3px;
    background: #ede7f6;*/ /* светло-фиолетовый фон */
    /*color: #4527a0;*/ /* фиолетовый текст */
    /*border-radius: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}*/

.wt-night-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 2px 0;
}
.wt-night-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #ede7f6;
    color: #4527a0;
    border-radius: 6px;
    font-size: 0.68rem;
    line-height: 1;
}
    .wt-night-badge i {
        font-size: 0.7rem;
    }

/* ═══ Часы в клетке — одинаковый вид для всех типов дней ═══ */
.wt-hours {
    font-size: 0.70rem;
    font-weight: 700;
    color: #2d2d2a;
    line-height: 1.2;
}

/* ═══ Доработка (overtime) под часами ═══ */
.wt-overtime {
    font-size: 0.60rem;
    font-weight: 600;
    color: #2e7d32;
    line-height: 1.15;
}

/* ═══ Недоработка (shortfall) ═══ */
.wt-shortfall {
    font-size: 0.60rem;
    font-weight: 600;
    color: #c62828;
    line-height: 1.15;
}


.wt-night-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
}

.wt-night-h,
.wt-night-m {
    font-size: 0.72rem;
    font-weight: 700;
    color: #4527a0;
}

/* мелкие "ч" / "м" приглушённые */
.wt-night-unit {
    font-size: 0.58rem;
    font-weight: 600;
    color: #7e6bb0;
    margin-left: 1px;
}

/* Клетка ночной смены — как рабочая, с лёгким фиолетовым фоном */
/*.wt-td-shift {
    background: #f6f4fc !important;
    border-left: 3px solid #4527a0 !important;
}*/

    .wt-td-shift:hover {
        background: #efeaf9 !important;
    }

/*Register module in page Employesettings.razor*/

.es-register-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #00B69B;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
}

    .es-register-btn:hover {
        background: #009c86;
    }

/*Register module in page Employesettings.razor*/

/*Register module in page EmployeeRegister.razor*/
.er-page {
    width: 100%;
}

/* ── Общие данные ── */
.er-common {
    background: #f5f5f5;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 22px;
}

.er-common-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

    .er-common-head i {
        font-size: 1.5rem;
        color: #2C5EAD;
    }

.er-common-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d2d2a;
}

.er-common-sub {
    font-size: .8rem;
    color: #8a8a86;
}

.er-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.er-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.er-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.er-field-check {
    justify-content: flex-end;
}

.er-label {
    font-size: .8rem;
    color: #4a4a45;
    margin-bottom: 6px;
    font-weight: 500;
}

.er-req {
    color: #c0392b;
}

.er-input {
    padding: 9px 12px;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: .88rem;
    outline: none;
    width: 100%;
    background: #fff;
}

    .er-input:focus {
        border-color: #2C5EAD;
    }

.er-input-invalid {
    border-color: #c0392b;
    background: #fdecea;
}

.er-hint {
    font-size: .72rem;
    color: #8a8a86;
}

.er-input-group {
    display: flex;
    gap: 6px;
}

    .er-input-group .er-input {
        flex: 1;
    }

.er-gen-btn {
    border: 1px solid #e0ded7;
    background: #faf9f7;
    border-radius: 8px;
    width: 40px;
    flex-shrink: 0;
    cursor: pointer;
    color: #4a4a45;
}

    .er-gen-btn:hover {
        background: #f0eee8;
    }

.er-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    cursor: pointer;
}

/* ── Dropdown-мультиселект (роли / группы) ── */
.er-dd-wrap {
    position: relative;
}

.er-dd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: .88rem;
    background: #fff;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: #2d2d2a;
}

    .er-dd-trigger:hover {
        border-color: #2C5EAD;
    }

    .er-dd-trigger i {
        color: #8a8a86;
        font-size: .8rem;
        flex-shrink: 0;
        margin-left: 8px;
    }

.er-dd-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.er-dd-panel {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d8d6cf;
    border-radius: 10px;
    box-shadow: 0 -8px 24px rgba(0,0,0,.12); 
    z-index: 50;
    max-height: 350px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 260px;
}

.er-dd-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

    .er-dd-search i {
        color: #8a8a86;
        font-size: .85rem;
    }

.er-dd-search-input {
    border: none;
    outline: none;
    font-size: .85rem;
    flex: 1;
    background: transparent;
}


.er-dd-list {
    flex: 1;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}

.er-dd-empty {
    padding: 14px 16px;
    font-size: .82rem;
    color: #8a8a86;
    text-align: center;
}

.er-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: .85rem;
    cursor: pointer;
    color: #2d2d2a;
}

    .er-dd-item:hover {
        background: #f5f3ee;
    }

    .er-dd-item.checked {
        background: #eef4ff;
        color: #2C5EAD;
        font-weight: 500;
    }

.er-dd-checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid #cfcdc6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .7rem;
    color: #fff;
}

.er-dd-item.checked .er-dd-checkbox {
    background: #2C5EAD;
    border-color: #2C5EAD;
}

.er-dd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid #eee;
    background: #faf9f7;
}

.er-dd-done {
    border: none;
    background: #2C5EAD;
    color: #fff;
    font-size: .78rem;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

    .er-dd-done:hover {
        background: #244d8f;
    }

/* ── Чипсы выбранных ролей/групп ── */
.er-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.er-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
}

.er-chip-role {
    background: #eef4ff;
    color: #2C5EAD;
}

.er-chip-group {
    background: #f2eafb;
    color: #8e44ad;
}

.er-chip i {
    cursor: pointer;
    font-size: .85rem;
    opacity: .7;
}

    .er-chip i:hover {
        opacity: 1;
    }

/* ── Табы платформ ── */
.er-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.er-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e8e6e0;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    background: #fbfbfa;
    border-bottom: 2px solid transparent;
    position: relative;
    transition: all .15s;
}

    .er-tab:hover {
        background: #f5f3ee;
    }

    .er-tab.active {
        background: #e6f2ff;
        border-color: #e8e6e0;
        border-bottom-color: #2C5EAD;
        box-shadow: 0 -2px 6px rgba(0,0,0,.03);
    }

    .er-tab.has-err {
        border-color: #f5b7b1;
    }

.er-tab-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.er-tab-sap {
    background: #8e44ad;
}

.er-tab-btrx {
    background: #1565c0;
}

.er-tab-text {
    display: flex;
    flex-direction: column;
}

.er-tab-name {
    font-weight: 700;
    font-size: .92rem;
    color: #2d2d2a;
}

.er-tab-hint {
    font-size: .75rem;
    color: #8a8a86;
}

.er-tab-ok {
    color: #1e8449;
    font-size: 1.1rem;
    margin-left: auto;
}

.er-tab-body {
    border: 1px solid #e8e6e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 22px;
    margin-bottom: 22px;
}

/* ── Ошибки / кнопки ── */
.er-errors {
    display: flex;
    gap: 10px;
    background: #fdecea;
    border: 1px solid #f5b7b1;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: .85rem;
}

    .er-errors i {
        font-size: 1.1rem;
    }

.er-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.er-btn-cancel {
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
}

.er-btn-save {
    padding: 10px 24px;
    border: none;
    background: #00B69B;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .er-btn-save:hover {
        background: #009c86;
    }

    .er-btn-save:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

@@media (max-width: 950px) {
    .er-grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .er-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@@media (max-width: 600px) {
    .er-grid-4, .er-grid-3 {
        grid-template-columns: 1fr;
    }

    .er-tabs {
        grid-template-columns: 1fr;
    }
}
/*Register module in page EmployeeRegister.razor*/








/*====================================*/


.wt-edit-btn {
    margin-top: 12px;
    padding: 7px 16px;
    background: none;
    border: 1px solid #1565c0;
    color: #1565c0;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .wt-edit-btn:hover {
        background: #e3f2fd;
    }

.wt-delete-btn {
    margin-top: 12px;
    padding: 7px 16px;
    background: none;
    color: #1565c0;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .wt-delete-btn:hover {
        background: #e3f2fd;
    }

.wt-edit-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.wt-edit-row {
    display: flex;
    gap: 10px;
}

.wt-edit-field {
    flex: 1;
}

.wt-edit-label {
    font-size: 0.72rem;
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.wt-required {
    color: #c62828;
}

.wt-edit-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.wt-edit-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.82rem;
    min-height: 64px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.wt-edit-error {
    font-size: 0.72rem;
    color: #c62828;
}

.wt-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.wt-edit-save {
    flex: 1;
    padding: 9px 16px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .wt-edit-save:hover {
        background: #1b5e20;
    }

    .wt-edit-save:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.wt-edit-cancel {
    padding: 9px 16px;
    background: none;
    color: #888;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
}

    .wt-edit-cancel:hover {
        border-color: #bbb;
        color: #555;
    }

.wt-edit-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wt-spin 0.7s linear infinite;
}

@keyframes wt-spin {
    to {
        transform: rotate(360deg);
    }
}


.wt-th-days {
    text-align: center;
}

.wt-td-days {
    text-align: center;
    vertical-align: middle;
    padding: 8px 6px;
}

.wt-days-val {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.wt-days-unit {
    font-size: 0.75rem;
    color: #8a8a86;
    font-weight: 300;
}

.wt-days-sub {
    font-size: 0.7rem;
    color: #b0afa8;
    margin-top: 2px;
}

/* ── Панель фильтров ── */
.wt-filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.wt-search-wrap {
    position: relative;
    flex: 1 1 280px;
    min-width: 220px;
}

.wt-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0afa8;
    font-size: 0.9rem;
}

.wt-search-input {
    width: 100%;
    padding: 8px 32px 8px 34px;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
}

    .wt-search-input:focus {
        border-color: #c9c6bd;
    }

.wt-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #b0afa8;
    font-size: 0.9rem;
}

.wt-filter-select {
    position: relative;
    display: flex;
    align-items: center;
}

.wt-filter-icon {
    position: absolute;
    left: 10px;
    color: #b0afa8;
    font-size: 0.85rem;
    pointer-events: none;
}

.wt-select {
    appearance: none;
    padding: 8px 28px 8px 30px;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fff;
    cursor: pointer;
    outline: none;
    min-width: 160px;
    max-width: 240px;
}

    .wt-select:focus {
        border-color: #c9c6bd;
    }

.wt-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    background: #fff;
    color: #c62828;
    font-size: 0.8rem;
    cursor: pointer;
}

    .wt-filter-reset:hover {
        background: #ffebee;
    }

/* ── Строка-заголовок отдела ── */
.wt-dept-row td {
    padding: 0;
}

.wt-dept-cell {
    background: #f3f1ea;
    border-top: 2px solid #e0ded7;
    position: sticky;
    left: 0;
}

.wt-dept-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #4a4a45;
}

.wt-dept-name {
    text-transform: none;
}

.wt-dept-count {
    font-size: 0.72rem;
    font-weight: 400;
    color: #8a8a86;
    background: #fff;
    border: 1px solid #e0ded7;
    border-radius: 10px;
    padding: 1px 8px;
}

.wt-empty-row {
    text-align: center;
    padding: 32px;
    color: #b0afa8;
    font-size: 0.9rem;
}

/* ── Кнопка / тулбар полноэкранного режима ── */
.wt-table-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.wt-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
    transition: all .15s ease;
}

    .wt-fullscreen-btn:hover {
        background: #f5f3ee;
        border-color: #c9c6bd;
        color: #222;
    }


.wt-wrap-fs {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: #fff;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .wt-wrap-fs .wt-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        max-height: none;
    }

.wt-fs-close {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1250;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0ded7;
    background: #fff;
    color: #555;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

    .wt-fs-close:hover {
        background: #ffebee;
        color: #c62828;
        border-color: #ef9a9a;
    }

.wt-td-overtime {
    text-align: center;
    vertical-align: middle;
    padding: 6px;
    font-size: 0.7rem;
    min-width: 110px;
}

.wt-ot-sat {
    color: #1565c0;
    margin-bottom: 2px;
    white-space: nowrap;
}

.wt-ot-paid {
    color: #2e7d32;
    margin-bottom: 2px;
    white-space: nowrap;
}

.wt-ot-pending {
    color: #e65100;
    margin-bottom: 2px;
    white-space: nowrap;
}

.wt-ot-flag {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
}

    .wt-ot-flag:hover {
        background: #bbdefb;
    }

.wt-ot-badge-paid {
    font-size: 0.55rem;
    color: #2e7d32;
    text-align: center;
    margin-top: 2px;
}

.wt-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.wt-total-h {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.wt-total-h-ok {
    color: #2e7d32;
}

.wt-total-h-warn {
    color: #b07d0c;
}

.wt-total-info {
    font-size: 0.8rem;
    color: #b0afa8;
    cursor: help;
    flex-shrink: 0;
}

.wt-total-bar {
    height: 4px;
    background: #ebe9e2;
    border-radius: 2px;
    margin: 6px 0 4px;
    overflow: hidden;
}

.wt-total-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.wt-total-bar-fill-ok {
    background: #2e7d32;
}

.wt-total-bar-fill-warn {
    background: #e0a213;
}

.wt-total-sub {
    font-size: 0.7rem;
    color: #b0afa8;
    white-space: nowrap;
}

.wt-edited-badge.wt-edited-clickable {
    cursor: pointer;
    user-select: none;
    transition: opacity .12s ease;
}

    .wt-edited-badge.wt-edited-clickable:hover {
        opacity: .8;
        text-decoration: underline;
    }

.wt-sunday-flag {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.58rem;
    padding: 1px 4px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
}

    .wt-sunday-flag:hover {
        background: #ffe0b2;
    }

.wt-sunday-choice {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.wt-sunday-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wt-sunday-paid {
    border-color: #2e7d32;
    background: #e8f5e9;
    color: #2e7d32;
}

.wt-sunday-unpaid {
    border-color: #c62828;
    background: #ffebee;
    color: #c62828;
}

/* ════════════════════════════════════════════════════════════
               ВАЖНО: модалки должны быть ПОВЕРХ полноэкранного режима.
               wt-wrap-fs создаёт stacking context с z-index:1200, поэтому
               модалкам задаём заведомо больший z-index, иначе при открытии
               в полноэкранном режиме они уходят "за" таблицу.
               ════════════════════════════════════════════════════════════ */
.wt-modal-overlay {
    z-index: 1400 !important;
}

.wt-hist-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,16,12,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500 !important;
    padding: 16px;
}

.wt-hist-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}

.wt-hist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.wt-hist-title {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wt-hist-subtitle {
    font-size: 0.78rem;
    color: #8a8a86;
    margin-top: 2px;
}

.wt-hist-close {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    color: #8a8a86;
    line-height: 1;
}

.wt-hist-body {
    padding: 12px 20px 20px;
    overflow-y: auto;
}

.wt-hist-loading, .wt-hist-empty {
    text-align: center;
    color: #8a8a86;
    padding: 32px 0;
    font-size: 0.9rem;
}

.wt-hist-entry {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 12px;
}

    .wt-hist-entry:first-child {
        margin-top: 4px;
    }

.wt-hist-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.wt-hist-user {
    font-weight: 500;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wt-hist-date {
    font-size: 0.75rem;
    color: #8a8a86;
    white-space: nowrap;
}

.wt-hist-reason {
    font-size: 0.8rem;
    color: #555;
    background: #faf7f1;
    border-radius: 6px;
    padding: 6px 9px;
    margin-bottom: 8px;
}

.wt-hist-reason-lbl {
    color: #b0813a;
    font-weight: 500;
    margin-right: 4px;
}

.wt-hist-changes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wt-hist-change {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.wt-hist-field {
    color: #555;
}

.wt-hist-old {
    color: #c62828;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.wt-hist-arrow {
    color: #b0afa8;
    font-size: 0.75rem;
}

.wt-hist-new {
    color: #2e7d32;
    font-weight: 500;
}

.wt-hist-nochange {
    font-size: 0.8rem;
    color: #b0afa8;
    font-style: italic;
}

/*======== Tabel Grid setka ===========*/

.wt-edited-badge {
    background: #fff3e0;
    color: #e65100;
    font-size: 0.62rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.wt-edited-dot-legend {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #abcdbd;
}

.wt-td {
    /* существующие стили... */
    position: relative; /* ← добавить если ещё нет */
}

.wt-edited-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #abcdbd;
    box-shadow: 0 0 0 2px #fff;
    z-index: 2;
}

.wt-wrap {
    font-family: inherit;
    border-radius: 12px;
    overflow: hidden;
}

.wt-subtitle {
    font-size: 0.78rem;
    color: #888;
    padding: 6px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wt-legend {
    display: flex;
    gap: 16px;
    padding: 8px 24px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.wt-leg-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #666;
}

.wt-leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-work {
    background: #4caf50;
}

.dot-weekend {
    background: #f44336;
}

.dot-holiday {
    background: #ff9800;
}

.dot-late {
    background: #ffb300;
}

.wt-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px 10px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.wt-search-wrap {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.wt-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 0.85rem;
    pointer-events: none;
}

.wt-search-input {
    width: 100%;
    height: 34px;
    padding: 0 32px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #333;
    background: #fafafa;
    outline: none;
    box-sizing: border-box;
}

    .wt-search-input:focus {
        border-color: #1565c0;
        background: #fff;
    }

    .wt-search-input::placeholder {
        color: #bbb;
    }

.wt-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.8rem;
}

.wt-search-count {
    font-size: 0.75rem;
    color: #aaa;
    white-space: nowrap;
}

.wt-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 560px;
}

.wt-table {
    border-collapse: collapse;
    min-width: 100%;
    table-layout: fixed;
}

    .wt-table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #f8f9fa;
        border-bottom: 2px solid #e9ecef;
        border-right: 1px solid #f0f0f0;
        padding: 6px 3px;
        text-align: center;
        width: 90px;
        white-space: nowrap;
    }

.wt-th-name {
    position: sticky !important;
    left: 0;
    z-index: 4 !important;
    width: 190px !important;
    text-align: left !important;
    padding: 6px 14px !important;
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wt-th-role {
    position: sticky !important;
    left: 190px;
    z-index: 4 !important;
    width: 130px !important;
    text-align: left !important;
    padding: 6px 10px !important;
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.wt-th-total {
    width: 72px !important;
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wt-th-extra {
    width: 110px !important;
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
}

.wt-th-notes {
    width: 140px !important;
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
}

.wt-th-num {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.wt-th-dow {
    display: block;
    font-size: 0.65rem;
    color: #aaa;
    text-transform: uppercase;
}

.wt-th-we .wt-th-num {
    color: #e53935;
}

.wt-th-we .wt-th-dow {
    color: #e53935;
    opacity: 0.7;
}

.wt-row:hover .wt-td-name, .wt-row:hover .wt-td {
    background-color: #f0f7ff !important;
}

.wt-td-name {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    border-right: 2px solid #e9ecef;
    padding: 8px 12px;
    width: 190px;
}

.wt-td-role {
    position: sticky;
    left: 190px;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #e9ecef;
    padding: 6px 10px;
    width: 130px;
}

.wt-emp {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e3f2fd;
    color: #1565c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wt-emp-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 124px;
}

.wt-emp-id {
    font-size: 0.65rem;
    color: #bbb;
}

.wt-role-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: #555;
    background: #f0f4ff;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 135px;
}

.wt-td {
    border-bottom: 1px solid #c5c5c5;
    border-right: 1px solid #f5f5f5;
    padding: 4px 3px;
    width: 90px;
    vertical-align: middle;
    text-align: center;
    background: #fff;
    transition: background 0.1s;
    min-height: 43px;
    min-width: 50px; /* ← добавить */
}

.wt-td-clickable {
    cursor: pointer;
}

    .wt-td-clickable:hover {
        filter: brightness(0.95);
    }

.wt-td-we {
    background: #fff5f5 !important;
}

.wt-td-empty {
    background: #fafafa !important;
}

.wt-td-work {
    background: #f1f8e9;
}

.wt-td-weekend {
    background: #ffebee;
}

.wt-td-holiday {
    background: #fff8e1;
}

.wt-td-late {
    background: #fffde7 !important;
    box-shadow: inset 3px 0 0 #ffb300;
}

.wt-td-ontime {
    background: #f1f8e9 !important;
    box-shadow: inset 3px 0 0 #66bb6a;
}

.wt-td-trip {
    background: #e3f2fd !important;
    box-shadow: inset 3px 0 0 #1565c0;
}

.wt-td-absence {
    background: #e8f5e9 !important;
    box-shadow: inset 3px 0 0 #2e7d32;
}

.wt-td-sick {
    background: #fff3e0 !important;
    box-shadow: inset 3px 0 0 #e65100;
}

.wt-plan {
    font-size: 0.65rem;
    color: #9e9e9e;
    margin-bottom: 1px;
}

.wt-fact {
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 1px;
}

.wt-fact-ok {
    color: #2e7d32;
}

.wt-fact-late {
    color: #c62828;
}

.wt-fact-missing {
    font-size: 0.62rem;
    color: #ccc;
    font-style: italic;
}

.wt-hours {
    font-size: 0.78rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.wt-late-label {
    font-size: 0.6rem;
    color: #c62828;
    font-weight: 700;
}

.wt-no-data {
    font-size: 0.75rem;
    color: #ccc;
}

.wt-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-work {
    background: #c8e6c9;
    color: #1b5e20;
}

.badge-weekend {
    background: #ffcdd2;
    color: #b71c1c;
}

.badge-holiday {
    background: #ffe0b2;
    color: #bf360c;
}

.badge-trip {
    background: #bbdefb;
    color: #0d47a1;
}

.badge-absence {
    background: #c8e6c9;
    color: #1b5e20;
}

.badge-sick {
    background: #ffe0b2;
    color: #bf360c;
}

.wt-td-total {
    border-bottom: 1px solid #f0f0f0;
    border-left: 2px solid #e9ecef;
    padding: 4px 8px;
    text-align: center;
    background: #f8f9fa;
    width: 72px;
}

.wt-total-h {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1565c0;
}

.wt-total-d {
    font-size: 0.65rem;
    color: #9e9e9e;
}

.wt-td-extra {
    border-bottom: 1px solid #f0f0f0;
    border-left: 1px solid #e9ecef;
    padding: 4px 8px;
    text-align: center;
    background: #fafafa;
    width: 110px;
    vertical-align: middle;
}

.wt-td-notes {
    border-bottom: 1px solid #f0f0f0;
    border-left: 1px solid #e9ecef;
    padding: 4px 10px;
    background: #fafafa;
    width: 140px;
    vertical-align: middle;
}

.wt-absence-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wt-absence-item {
    font-size: 0.62rem;
    padding: 1px 4px;
    border-radius: 3px;
}

.absence-biz {
    background: #e3f2fd;
    color: #1565c0;
}

.absence-off {
    background: #e8f5e9;
    color: #2e7d32;
    width:70px;
}

.absence-none {
    background: #fff3e0;
    color: #e65100;
}

.wt-fine {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wt-fine-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: #c62828;
}

.wt-fine-sub {
    font-size: 0.6rem;
    color: #bbb;
}

.wt-notes-text {
    font-size: 0.72rem;
    color: #aaa;
}

.wt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500 !important;
}

.wt-modal {
    background: #fff;
    border-radius: 16px;
    width: 460px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    overflow: hidden;
}

.wt-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.wt-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.wt-modal-subtitle {
    font-size: 0.78rem;
    color: #888;
    margin-top: 2px;
}

.wt-modal-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: #aaa;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}

    .wt-modal-close:hover {
        background: #f0f0f0;
        color: #333;
    }

.wt-modal-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wt-modal-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.wt-modal-source {
    font-weight: 400;
    color: #bbb;
    text-transform: none;
}

.wt-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.82rem;
}

.wt-modal-lbl {
    color: #888;
}

.wt-modal-val {
    font-weight: 500;
    color: #222;
}

.wt-modal-placeholder {
    color: #bbb;
    font-weight: 400;
    font-style: italic;
}

.wt-val-ok {
    color: #2e7d32;
    font-weight: 600;
}

.wt-val-late {
    color: #c62828;
    font-weight: 600;
}

.wt-late-tag {
    background: #ffcdd2;
    color: #b71c1c;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}

.wt-search-wrap {
    position: relative; /* ← ВАЖНО, чтобы дропдаун позиционировался относительно него */
}

.wt-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 320px;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    animation: dropdownFadeIn 0.15s ease;
}


@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wt-dropdown-header {
    padding: 8px 14px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #f0f0f0;
}

.wt-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.12s;
}

    .wt-search-item:hover {
        background: #f0f7ff;
    }

        .wt-search-item:hover .wt-search-item-arrow {
            opacity: 1;
            transform: translateX(2px);
        }

.wt-search-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wt-search-item-info {
    flex: 1;
    min-width: 0;
}

.wt-search-item-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-search-item-role {
    font-size: 0.71rem;
    color: #999;
    margin-top: 1px;
}

.wt-search-item-arrow {
    font-size: 0.8rem;
    color: #1565c0;
    opacity: 0;
    transition: opacity 0.12s, transform 0.12s;
}

.wt-dropdown-more {
    padding: 8px 14px;
    font-size: 0.72rem;
    color: #aaa;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    font-style: italic;
}



/*стили в сетке для нумерации*/

.wt-th-num-col {
    width: 40px;
    min-width: 40px;
    text-align: center;
    font-size: 0.72rem;
    color: #888;
    font-weight: 600;
    position: sticky;
    left: 0;
    background: #f8f9fa;
    z-index: 3;
}

.wt-td-num-col {
    width: 40px;
    min-width: 40px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #aaa;
    background: #fafafa;
    position: sticky;
    left: 0;
    z-index: 1;
}


.wt-transfer-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #1565c0;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    border: 1.5px solid white;
}

.wt-row-transfer {
    background: #f8fbff;
}

.wt-root-row {
    background: #f3f8ff;
}

.wt-root-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1565c0;
    border-left: 3px solid #1565c0;
}

.wt-root-name {
    font-weight: 600;
}

.wt-root-count {
    font-size: 0.75rem;
    color: #888;
    font-weight: 400;
}

/* Топар под должностью */
.wt-role-topar {
    font-size: 0.68rem;
    color: #555;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/*========== Разметка решения по воскресенью в модальном окне=============*/

.wt-sunday-flag {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.58rem;
    padding: 1px 4px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
}

    .wt-sunday-flag:hover {
        background: #ffe0b2;
    }

.wt-sunday-choice {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.wt-sunday-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wt-sunday-paid {
    border-color: #2e7d32;
    background: #e8f5e9;
    color: #2e7d32;
}

.wt-sunday-unpaid {
    border-color: #c62828;
    background: #ffebee;
    color: #c62828;
}

.wt-total-extra {
    font-size: 0.6rem;
    color: #1565c0;
    margin-top: 1px;
}

.wt-total-sunday {
    font-size: 0.6rem;
    color: #e65100;
    margin-top: 1px;
}
/*=======================*/


/* Невидимый placeholder чтобы пустые рабочие ячейки не сжимались */
.wt-td-work::after {
    content: '';
    display: block;
    height: 14px; /* высота как у бейджа */
}


/*Блок Поиск в табел*/
.tabel-filter-wrap {
    position: relative;
    height: 40px;
}

.tabel-filter-input {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
}

    .tabel-filter-input::placeholder {
        color: rgba(255,255,255,0.55);
    }

    .tabel-filter-input:focus {
        border-color: rgba(255,255,255,0.6);
        background: rgba(255,255,255,0.15);
    }

.tabel-filter-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    pointer-events: none;
}

.tabel-filter-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    border-radius: 4px;
}

    .tabel-filter-clear:hover {
        background: rgba(255,255,255,0.1);
    }

.tabel-filter-dropdown {
    position: absolute;
    top: 46px;
    left: 0;
    width: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 100;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tabel-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
}

.tfd-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tfd-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tfd-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tfd-chip {
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.12s;
    user-select: none;
}

    .tfd-chip:hover {
        border-color: #1565c0;
        color: #1565c0;
        background: #e3f2fd;
    }

.tfd-chip-active {
    background: #1565c0;
    color: #fff;
    border-color: #1565c0;
}

.tfd-footer {
    display: flex;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid #f0f0f0;
}

.tfd-btn-find {
    padding: 7px 20px;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.84rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .tfd-btn-find:hover {
        background: #1976d2;
    }

.tfd-btn-reset {
    padding: 7px 16px;
    background: none;
    color: #888;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.84rem;
    cursor: pointer;
}

    .tfd-btn-reset:hover {
        border-color: #bbb;
        color: #555;
    }



.wt-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px 10px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.wt-search-wrap {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.wt-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 0.85rem;
    pointer-events: none;
}

.wt-search-input {
    width: 100%;
    height: 34px;
    padding: 0 32px 0 32px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
}

    .wt-search-input:focus {
        border-color: #1565c0;
        background: #fff;
    }

    .wt-search-input::placeholder {
        color: #bbb;
    }

.wt-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
}

    .wt-search-clear:hover {
        background: #f0f0f0;
        color: #555;
    }

.wt-search-count {
    font-size: 0.75rem;
    color: #aaa;
    white-space: nowrap;
}





.wt-overtime {
    font-size: 0.6rem;
    color: #1565c0;
    font-weight: 600;
}

.wt-shortfall {
    font-size: 0.6rem;
    color: #c62828;
    font-weight: 600;
}

.wt-total-eq {
    font-size: 0.6rem;
    color: #aaa;
    margin-top: 1px;
}


/* ====  AbsenceTripList ========== */
.atl-edited-badge {
    background: #fff3e0;
    color: #e65100;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .atl-edited-badge:hover {
        opacity: 0.8;
    }

.wt-hist-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,16,12,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    padding: 16px;
}

.wt-hist-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}

.wt-hist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.wt-hist-title {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wt-hist-subtitle {
    font-size: 0.78rem;
    color: #8a8a86;
    margin-top: 2px;
}

.wt-hist-close {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    color: #8a8a86;
    line-height: 1;
}

.wt-hist-body {
    padding: 12px 20px 20px;
    overflow-y: auto;
}

.wt-hist-loading, .wt-hist-empty {
    text-align: center;
    color: #8a8a86;
    padding: 32px 0;
    font-size: 0.9rem;
}

.wt-hist-entry {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 12px;
}

    .wt-hist-entry:first-child {
        margin-top: 4px;
    }

.wt-hist-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.wt-hist-user {
    font-weight: 500;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wt-hist-date {
    font-size: 0.75rem;
    color: #8a8a86;
    white-space: nowrap;
}

.wt-hist-reason {
    font-size: 0.8rem;
    color: #555;
    background: #faf7f1;
    border-radius: 6px;
    padding: 6px 9px;
    margin-bottom: 8px;
}

.wt-hist-reason-lbl {
    color: #b0813a;
    font-weight: 500;
    margin-right: 4px;
}

.wt-hist-changes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wt-hist-change {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.wt-hist-field {
    color: #555;
}

.wt-hist-old {
    color: #c62828;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.wt-hist-arrow {
    color: #b0afa8;
    font-size: 0.75rem;
}

.wt-hist-new {
    color: #2e7d32;
    font-weight: 500;
}

.wt-hist-nochange {
    font-size: 0.8rem;
    color: #b0afa8;
    font-style: italic;
}
/* ==== Modal window for create Absence ========== */
.cad-types {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.cad-type {
    flex: 1;
    border: 1.5px solid #dde3ee;
    border-radius: 8px;
    padding: 9px 8px 8px;
    cursor: pointer;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.13s;
    line-height: 1.2;
}

    .cad-type:hover {
        border-color: #2C5EAD;
        background: #f0f5ff;
    }

    .cad-type.cad-active {
        border-color: #2C5EAD;
        background: #edf2ff;
        color: #1a56db;
        font-weight: 600;
    }

.cad-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cad-pay-row {
    display: flex;
    gap: 8px;
}

.cad-pay-btn {
    flex: 1;
    border: 1.5px solid #dde3ee;
    border-radius: 8px;
    background: #fafbfc;
    padding: 9px 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b;
    transition: all 0.13s;
}

    .cad-pay-btn:hover {
        border-color: #94a3b8;
    }

.cad-paid {
    border-color: #00B69B !important;
    background: #e6f9f6 !important;
    color: #007a68 !important;
}

.cad-unpaid {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.cad-section-label {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 14px 0 8px;
}

.cad-err {
    font-size: 0.72rem;
    color: #ef4444;
    margin-top: 3px;
}

/* ── Чеклист расходов ── */
.exp-list {
    border: 1px solid #dde3ee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.exp-item {
    display: grid;
    grid-template-columns: 1fr 130px 32px;
    gap: 0;
    align-items: center;
    border-bottom: 1px solid #f0f4f8;
}

    .exp-item:last-child {
        border-bottom: none;
    }

    .exp-item input {
        border: none;
        outline: none;
        padding: 8px 10px;
        font-size: 0.82rem;
        color: #1e293b;
        background: transparent;
        width: 100%;
    }

        .exp-item input.exp-amount {
            border-left: 1px solid #f0f4f8;
            text-align: right;
            font-variant-numeric: tabular-nums;
        }

.exp-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 6px;
    transition: color 0.12s;
}

    .exp-remove:hover {
        color: #ef4444;
    }

.exp-add-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1.5px dashed #cbd5e1;
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all 0.13s;
}

    .exp-add-btn:hover {
        border-color: #2C5EAD;
        color: #2C5EAD;
        background: #f0f5ff;
    }

.exp-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 2px;
    font-size: 0.8rem;
    color: #64748b;
}

    .exp-total strong {
        font-size: 0.9rem;
        color: #1e293b;
    }

.mud-dialog-content {
    padding: 16px 20px 8px !important;
}

.mud-dialog-actions {
    padding: 8px 20px 16px !important;
}


/*===== */


.wt-td-trip {
    background: #e3f2fd !important;
    box-shadow: inset 3px 0 0 #1565c0;
}

.wt-td-absence {
    background: #e8f5e9 !important;
    box-shadow: inset 3px 0 0 #2e7d32;
}

.wt-td-sick {
    background: #fff3e0 !important;
    box-shadow: inset 3px 0 0 #e65100;
}

.badge-trip {
    background: #bbdefb;
    color: #0d47a1;
}

.badge-absence {
    background: #c8e6c9;
    color: #1b5e20;
}

.badge-sick {
    background: #ffe0b2;
    color: #bf360c;
}

/*==== Merdan ===== */



/* ══ Легенда ══════════════════════════════════════════════════ */

.legend-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    user-select: none;
}

/* ══ Сетка календаря ══════════════════════════════════════════ */

.tabel-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ══ Карточка дня ════════════════════════════════════════════ */

.tabel-card {
    position: relative;
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    box-sizing: border-box;
    border-radius: 14px;
    border: 2px solid transparent;
    padding: 22px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.13s ease, box-shadow 0.13s ease;
}

    .tabel-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,.13);
    }

    .tabel-card:active {
        transform: translateY(0px) scale(0.97);
    }

/* ══ Кнопка редактирования ═══════════════════════════════════ */

.edit-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.75);
    color: #5c6bc0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease, transform 0.12s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.tabel-card:hover .edit-btn {
    opacity: 1;
}

.edit-btn:hover {
    background: #5c6bc0;
    color: #fff;
    transform: scale(1.1);
}

.edit-btn:active {
    transform: scale(0.95);
}

/* Цвет фона и рамки по статусу */
.card-working {
    background: #e8f5e9;
    border-color: #4caf50;
}

.card-weekend {
    background: #ffebee;
    border-color: #f44336;
}

.card-holiday {
    background: #fff3e0;
    border-color: #ff9800;
}

/* Число */
.tabel-card__day-num {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1a1a;
}

/* День недели */
.tabel-card__day-name {
    font-size: 0.68rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Время на карточке */
.tabel-card__time {
    font-size: 0.65rem;
    color: #555;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Бейдж статуса */
.tabel-card__badge {
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ══ Цвета бейджей и легенды ════════════════════════════════ */

.badge-working {
    background: #4caf50;
    color: #fff;
}

/*.badge-weekend {
    background: #f44336;
    color: #fff;
}*/

/*.badge-holiday {
    background: #ff9800;
    color: #fff;
}*/

/* ══ Backdrop ════════════════════════════════════════════════ */

.popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: transparent;
}

/* ══ Time Popover ════════════════════════════════════════════ */

.time-popover {
    position: fixed;
    z-index: 1000;
    width: 230px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    animation: popover-in 0.18s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes popover-in {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(-6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.time-popover__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    background: linear-gradient(135deg, #5c6bc0, #3f51b5);
    color: #fff;
}

.time-popover__title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

.time-popover__close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.13s;
    padding: 0;
}

    .time-popover__close:hover {
        background: rgba(255,255,255,0.35);
    }

.time-popover__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.time-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    min-width: 52px;
}

.time-input {
    flex: 1;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #222;
    outline: none;
    transition: border-color 0.15s;
    background: #fafafa;
}

    .time-input:focus {
        border-color: #5c6bc0;
        background: #fff;
    }

.time-popover__hours {
    text-align: center;
    font-size: 0.75rem;
    color: #5c6bc0;
    font-weight: 600;
    padding: 4px 0 0;
    border-top: 1px dashed #e8e8e8;
}

.time-popover__nonworking {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    color: #888;
}

    .time-popover__nonworking span {
        font-size: 0.9rem;
        font-weight: 700;
        color: #555;
    }

    .time-popover__nonworking small {
        font-size: 0.72rem;
    }

.time-popover__footer {
    padding: 10px 14px 12px;
    display: flex;
    justify-content: flex-end;
}

.popover-btn {
    border: none;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.13s, transform 0.1s;
}

    .popover-btn:active {
        transform: scale(0.96);
    }

.popover-btn--apply {
    background: #5c6bc0;
    color: #fff;
}

    .popover-btn--apply:hover {
        background: #3f51b5;
    }


/* Бейдж отсутствия вверху ячейки */
.wt-absence-top {
    margin-bottom: 2px;
}

/* Командировка — синяя левая полоска поверх зелёного фона */
.wt-td-trip {
    box-shadow: inset 3px 0 0 #1565c0;
}

.wt-td-absence {
    box-shadow: inset 3px 0 0 #2e7d32;
}

.wt-td-sick {
    box-shadow: inset 3px 0 0 #e65100;
}


/*Модал окно утверждения удаления табеля в странице Tabel.razor*/
.tw-btn-delete {
    background: #646889;
}

.tw-delete-modal {
    max-width: 420px;
}

.tw-delete-btn-no {
    flex: 1;
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a4a45;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s;
}

    .tw-delete-btn-no:hover {
        background: #f5f5f5;
    }

    .tw-delete-btn-no:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.tw-delete-btn-yes {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: #324479;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s;
}

    .tw-delete-btn-yes:hover {
        background: #303f69;
    }

    .tw-delete-btn-yes:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
/*Модал окно утверждения удаления табеля в странице Tabel.razor*/







.wt-deleted-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0.75;
}

.wt-deleted-icon {
    color: #c62828;
    font-size: 0.85rem;
}

.wt-deleted-label {
    font-size: 0.6rem;
    color: #c62828;
    font-weight: 600;
    text-transform: uppercase;
}
/* угловая иконка-индикатор, как у "изменено вручную" */
.wt-deleted-corner {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #c62828;
    border-radius: 50%;
}









.wt-add-pos-item {
    margin-top: 4px;
    border-top: 1px dashed #e0ded7;
    padding-top: 3px;
}

.wt-add-pos-badge {
    display: block;
    font-size: 0.72rem;
    color: #4527a0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-add-pos-period {
    display: block;
    font-size: 0.68rem;
    color: #8a8a86;
}








/* Кнопка раскрытия */
.wt-addpos-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #4527a0;
    background: #ede7f6;
    border: 1px solid #ce93d8;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

    .wt-addpos-toggle:hover {
        background: #d1c4e9;
    }

.wt-addpos-toggle-open {
    background: #b39ddb;
    color: #fff;
}

/* Строка доп. должности */
.wt-row-addpos {
    background: #f8f3ff;
}

    .wt-row-addpos:hover {
        background: #f0e6ff;
    }

.wt-td-addpos-side {
    background: #f8f3ff;
    border: none !important;
}

.wt-addpos-emp-indent {
    display: flex;
    justify-content: flex-end;
    padding-right: 4px;
}

.wt-addpos-arrow {
    color: #ce93d8;
    font-size: 0.85rem;
}

.wt-td-addpos-role {
    border-top: 1px dashed #ce93d8 !important;
    vertical-align: top;
    padding-top: 5px;
}

.wt-role-badge-add {
    color: #4527a0;
    background: #ede7f6;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.wt-addpos-period {
    font-size: 0.68rem;
    color: #8a8a86;
    margin-top: 2px;
}

.wt-td-addpos-out {
    background: #f0f0f0 !important;
}

.wt-td-addpos-empty {
    background: #f8f3ff !important;
}

.wt-td-addpos-work {
    background: #ede7f6 !important;
    text-align: center;
    vertical-align: middle;
}

.wt-addpos-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4527a0;
}

.wt-td-addpos-total {
    background: #ede7f6 !important;
    text-align: center;
    vertical-align: middle;
}

.wt-addpos-total-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4527a0;
}



/*Page Tabel.razor*/
/* ═══ Бейдж статуса ═══ */
.tw-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.tw-revision-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 7px;
    background: #fff3e0;
    color: #e65100;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ═══ Счётчик непрочитанных ═══ */
.tw-unread-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #d32f2f;
    color: #fff;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    animation: tw-pulse 2s infinite;
}

@@keyframes tw-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(211,47,47,0.6);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(211,47,47,0);
    }
}

.tw-chat-btn {
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #8a8a86;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

    .tw-chat-btn:hover {
        background: #f5f3ee;
        color: #4a4a45;
    }

/* ═══ Кнопки действий ═══ */
.tw-action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}

    .tw-action-btn:hover {
        opacity: .85;
    }

.tw-btn-send {
    background: #1565c0;
}

.tw-btn-reopen {
    background: #4774a7;
}

.tw-btn-approve {
    background: #2e7d32;
}

.tw-btn-return {
    background: #e65100;
}

.tw-btn-close {
    background: #4a4a45;
}

/* ═══ Модалка действия ═══ */
.tw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 16px;
}

.tw-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.tw-chat-modal {
    max-width: 640px;
    height: 75vh;
}

.tw-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #fff;
}

.tw-modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tw-modal-subtitle {
    font-size: 0.78rem;
    margin-top: 2px;
    opacity: 0.85;
}

.tw-modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.85;
}

    .tw-modal-close:hover {
        opacity: 1;
    }

.tw-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.tw-modal-text {
    color: #4a4a45;
    margin-bottom: 16px;
    line-height: 1.5;
}

.tw-edit-label {
    display: block;
    font-size: 0.85rem;
    color: #4a4a45;
    margin-bottom: 6px;
    font-weight: 500;
}

.tw-required {
    color: #c62828;
}

.tw-optional {
    color: #8a8a86;
    font-weight: 400;
    font-size: 0.78rem;
}

.tw-edit-textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 12px;
    border: 1px solid #e0ded7;
    border-radius: 8px;
    font-size: 0.88rem;
    resize: vertical;
    outline: none;
}

    .tw-edit-textarea:focus {
        border-color: #1565c0;
    }

.tw-edit-error {
    color: #c62828;
    font-size: 0.78rem;
    margin-top: 4px;
}

.tw-modal-footer {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #eee;
}

.tw-btn-cancel {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
}

.tw-btn-confirm {
    flex: 2;
    padding: 10px;
    border: none;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .tw-btn-confirm:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.tw-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tw-spin 0.8s linear infinite;
}

@@keyframes tw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══ Чат ═══ */
.tw-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 20px;
    background: #faf9f7;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tw-chat-loading, .tw-chat-empty {
    text-align: center;
    color: #8a8a86;
    padding: 40px 0;
}

    .tw-chat-empty i {
        font-size: 2.5rem;
        display: block;
        margin-bottom: 8px;
        opacity: 0.5;
    }

.tw-chat-msg {
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    max-width: 85%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tw-msg-mine {
    align-self: flex-end;
    background: #e3f2fd;
}

.tw-msg-other {
    align-self: flex-start;
}

.tw-msg-system {
    background: #fff8e1;
    border: 1px dashed #ffd54f;
    max-width: 95%;
    align-self: center;
}

.tw-msg-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.75rem;
    color: #8a8a86;
    margin-bottom: 4px;
}

.tw-msg-user {
    font-weight: 600;
    color: #4a4a45;
}

.tw-msg-role {
    color: #8a8a86;
    font-weight: 400;
    margin-left: 4px;
}

.tw-msg-action {
    font-size: 0.78rem;
    color: #1565c0;
    font-weight: 600;
    margin-bottom: 4px;
}

.tw-msg-text {
    font-size: 0.88rem;
    color: #2d2d2a;
    white-space: pre-wrap;
    word-break: break-word;
}

.tw-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fff;
}

    .tw-chat-input .tw-edit-textarea {
        min-height: 50px;
    }

.tw-btn-send-msg {
    width: 44px;
    height: 44px;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-self: flex-end;
}

    .tw-btn-send-msg:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
/*Page Tabel.razor*/


/*EditAbsenceTripDialog.razor*/
.cad-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cad-info-row {
    display: flex;
    justify-content: space-between;
    background: #f5f5f4;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #555;
}
/*EditAbsenceTripDialog.razor*/


/* ═══ Дополнительные должности EmployeCard.razor═══ */
.ec-positions-section {
    margin-top: 24px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.ec-positions-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 700;
    color: #2d2d2a;
    margin-bottom: 14px;
    cursor: pointer;
    user-select: none;
    padding: 6px 4px;
    border-radius: 8px;
    transition: background .15s;
}

    .ec-positions-head:hover {
        background: #f5f3ee;
    }

    .ec-positions-head i {
        color: #2C5EAD;
        font-size: 1.1rem;
    }

.ec-pos-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2C5EAD;
    font-size: .72rem;
    font-weight: 700;
}

.ec-positions-chevron {
    margin-left: auto;
    color: #8a8a86 !important;
    font-size: .85rem !important;
    transition: transform .15s;
}

.ec-pos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
}

    /* Компактный скроллбар, чтобы блок выглядел аккуратно */
    .ec-pos-list::-webkit-scrollbar {
        width: 6px;
    }

    .ec-pos-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .ec-pos-list::-webkit-scrollbar-thumb {
        background: #d8d6cf;
        border-radius: 999px;
    }

        .ec-pos-list::-webkit-scrollbar-thumb:hover {
            background: #c3c1b9;
        }

.ec-pos-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 16px;
    border: 1px solid #e8e6e0;
    border-left: 3px solid #1e8449;
    border-radius: 10px;
    background: #fafcfa;
    transition: opacity .15s;
}

.ec-pos-item-inactive {
    border-left-color: #b0aea8;
    background: #f7f7f5;
    opacity: .75;
}

.ec-pos-main {
    flex: 1;
    min-width: 0;
}

.ec-pos-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.ec-pos-name {
    font-weight: 600;
    font-size: .92rem;
    color: #2d2d2a;
}

.ec-pos-period {
    font-size: .8rem;
    color: #6a6a65;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .ec-pos-period i {
        font-size: .8rem;
    }

.ec-pos-comment {
    font-size: .78rem;
    color: #8a8a86;
    margin-top: 4px;
    font-style: italic;
}

.ec-pos-actions {
    flex-shrink: 0;
}

.ec-pos-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

    .ec-pos-toggle-btn:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

    .ec-pos-toggle-btn.btn-deactivate {
        background: #fdecea;
        color: #c0392b;
        border-color: #f5b7b1;
    }

        .ec-pos-toggle-btn.btn-deactivate:hover:not(:disabled) {
            background: #fadbd8;
        }

    .ec-pos-toggle-btn.btn-activate {
        background: #eafaf1;
        color: #1e8449;
        border-color: #a9dfbf;
    }

        .ec-pos-toggle-btn.btn-activate:hover:not(:disabled) {
            background: #d5f5e3;
        }

@media (max-width: 700px) {
    .ec-pos-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .ec-pos-actions {
        width: 100%;
    }

    .ec-pos-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}


/*RootPriorityManagement.razor*/

.es-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.es-search-wrap {
    position: relative;
}

.es-search-input {
    padding: 9px 12px 9px 34px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-width: 280px;
    font-size: .88rem;
}

.es-search-icon {
    position: absolute;
    left: 12px;
    top: 11px;
    color: #8a8a86;
}

.es-select {
    padding: 9px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: .85rem;
}

.es-spacer {
    flex: 1;
}

.es-count {
    font-size: .82rem;
    color: #8a8a86;
}

.es-table-wrap {
    overflow-x: auto;
}

.es-table thead th {
    background: #faf9f7;
    font-size: .78rem;
    color: #8a8a86;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
    text-align: center;
}

.es-th-id, .es-td-id {
    color: #8a8a86;
    font-size: .82rem;
    width: 90px;
    text-align: center;
}

.es-table td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f4f3f0;
}

.es-td-id {
    color: #8a8a86;
    font-size: .82rem;
    text-align: center;
}

.es-row:hover {
    background: #faf9f7;
}

.es-emp {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.es-avatar, .es-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.es-avatar {
    background: #2C5EAD;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .78rem;
}

.es-avatar-img {
    object-fit: cover;
}

.es-emp-name {
    font-weight: 600;
    color: #2d2d2a;
    font-size: .88rem;
}

.es-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}

.es-badge-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.es-badge-fired {
    background: #ffebee;
    color: #c62828;
}

.es-td-email {
    color: #4a4a45;
    font-size: .84rem;
}
/* Увольнение */
.employee-action-dismiss {
    background: #dc3545;
}

    .employee-action-dismiss:hover {
        background: #bb2d3b;
    }

.employee-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

    .employee-action-btn i {
        font-size: 15px;
    }

    .employee-action-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    }

    .employee-action-btn:active {
        transform: translateY(0);
    }

.es-icon-btn {
    border: 1px solid #e0e0e0;
    background: #fff;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    cursor: pointer;
    color: #4a4a45;
}

    .es-icon-btn:hover {
        background: #f5f3ee;
    }

.es-page-btn {
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: .84rem;
    cursor: pointer;
}

    .es-page-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.es-page-btn-primary {
    background: #2C5EAD;
    color: #fff;
    border-color: #2C5EAD;
}

.es-page-nums {
    display: flex;
    align-items: center;
    gap: 4px;
}

.es-page-num {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    cursor: pointer;
    font-size: .84rem;
    color: #4a4a45;
}

    .es-page-num:hover {
        background: #f5f3ee;
    }

    .es-page-num.active {
        background: #2C5EAD;
        color: #fff;
        font-weight: 600;
    }

.es-page-dots {
    padding: 0 4px;
    color: #8a8a86;
}

.es-page-size {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8a8a86;
    font-size: .82rem;
}

.es-page-size-select {
    height: 32px;
    min-width: 68px;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    background: #fff;
    color: #4a4a45;
    font-size: .82rem;
    cursor: pointer;
}

    .es-page-size-select:focus {
        outline: none;
        border-color: #2C5EAD;
    }




.es-th-salary, .es-td-salary {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    color: #2C5EAD;
}

/*==========================*/
.es-th-action {
    text-align: center;
    width: 70px;
}


.es-td-action {
    display: flex;
    align-items: center;
    justify-content: center; /* или flex-start, если нужно выравнивание по левому краю */
    gap: 6px; /* Отступ между кнопками */
    white-space: nowrap; /* Запрет переноса на новую строку */
}


.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

    .action-btn:hover {
        opacity: 0.85;
    }

/* Цвет и фоны для конкретных типов кнопок */
.action-btn-view {
    background-color: #f1f5f9;
    color: #475569;
}

.action-btn-edit {
    background-color: #d99c4c;
    color: #ffffff;
}

.action-btn-dismiss {
    background-color: #ef4444;
    color: #ffffff;
}

.action-btn-rehire {
    background-color: #22c55e;
    color: #ffffff;
}

.tw-action-btn {
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    cursor: pointer;
    color: #fff;
}

.es-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 10px;
}


  







    

  

