/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #4A90E2;
    --color-primary-dark: #357ABD;
    --color-secondary: #6C757D;
    --color-success: #28A745;
    --color-danger: #DC3545;
    --color-warning: #FFC107;
    --color-info: #17A2B8;

    --color-bg-main: #F5F7FA;
    --color-bg-white: #FFFFFF;
    --color-bg-sidebar: #2C3E50;
    --color-bg-sidebar-hover: #7476783b;

    --color-text-primary: #2C3E50;
    --color-text-secondary: #6C757D;
    --color-text-light: #FFFFFF;
    --color-text-muted: #95A5A6;

    --color-border: #E1E8ED;
    --color-border-light: #F0F3F7;
    --color-border-dark: #000000;

    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    --transition-base: all 0.3s ease;

    --sidebar-width: 200px;
    --sidebar-collapsed-width: 70px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: var(--color-bg-main);
    overflow-x: hidden;
    overflow: -moz-scrollbars-none;
    overflow-y: scroll;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.show {
    opacity: 1;
    visibility: visible;
}

.hide {
    opacity: 0;
    visibility: hidden;
}

.documents-item {
    position: relative;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-bg-sidebar);
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transition: var(--transition-base);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar--collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar__header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar__logo {
    display: flex;
    align-items: center;
    transition: var(--transition-base);
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-base);
    cursor: pointer;
}

.contacts__add-btn {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.logout-btn svg {
    transition: var(--transition-base);
}

.sidebar--collapsed .logout-btn {
    gap: 0;
}

.sidebar--collapsed .logout-btn svg {
    width: 32px;
    height: 32px;
}

.sidebar__logo-icon {
    transition: var(--transition-base);
}

.sidebar--collapsed .sidebar__logo-icon {
    width: 32px;
    height: 32px;
}

.sidebar__toggle {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar__toggle:hover {
    background-color: var(--color-bg-sidebar-hover);
}

.sidebar__nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar__menu {
    list-style: none;
}

.sidebar__menu-item {
    margin-bottom: 4px;
}

.sidebar__menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition-base);
    position: relative;
}

.sidebar__menu-link:hover {
    background-color: var(--color-bg-sidebar-hover);
    color: var(--color-text-light);
}

.sidebar__menu-item--active .sidebar__menu-link {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.sidebar__menu-item--active .sidebar__menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--color-text-light);
}

.sidebar__menu-icon {
    min-width: 20px;
    margin-right: 12px;
}

.sidebar--collapsed .sidebar__menu-icon {
    margin-right: 0;
}

.sidebar__menu-text {
    white-space: nowrap;
    opacity: 1;
    transition: var(--transition-base);
}

.sidebar--collapsed .sidebar__menu-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: var(--transition-base);
}

.sidebar__footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.sidebar__support {
    background-color: var(--color-bg-sidebar-hover);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.sidebar__support-image {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.sidebar--collapsed .sidebar__support-image {
    margin-bottom: 0;
}

.sidebar__support-button {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-base);
}

.sidebar__support-button:hover {
    background-color: var(--color-primary-dark);
}

.sidebar--collapsed .sidebar__support-button {
    padding: 10px;
}

.sidebar--collapsed .sidebar__support-text {
    display: none;
}

.sidebar__logout {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    width: 100%;
    border-radius: 8px;
    transition: var(--transition-base);
    font-size: 14px;
}

.sidebar__logout:hover {
    background-color: var(--color-bg-sidebar-hover);
    color: var(--color-text-light);
}

.sidebar__logout-icon {
    min-width: 20px;
}

.sidebar--collapsed .sidebar__logout {
    justify-content: center;
}

.sidebar--collapsed .sidebar__logout-text {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar--collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
    background-color: var(--color-bg-white);
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__search {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin-left: 70px;
}

.header__search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
}

.header__search-clear:hover {
    color: #000;
}

.header__search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
}

.header__search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition-base);
}

.header__search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header__notification {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px;
    border-radius: 8px;
    transition: var(--transition-base);
    color: var(--color-text-secondary);
}

.header__notification:hover {
    background-color: var(--color-bg-main);
}

.header__notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--color-danger);
    color: var(--color-text-light);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.header__user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition-base);
}

.header__user:hover {
    background-color: var(--color-bg-main);
}

.header__user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.header__user-name {
    font-weight: 500;
    color: var(--color-text-primary);
}

.header__user-dropdown {
    color: var(--color-text-secondary);
}

.employees {
    flex: 1;
    padding: 32px 40px 90px 40px;
}

.employees__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.employees__title {
    font-size: 32px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.employees__count {
    color: var(--color-text-secondary);
    font-weight: 400;
}

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

.employees__tabs {
    display: flex;
    background-color: var(--color-bg-white);
    border-radius: 8px;
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.employees__tab {
    padding: 10px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: 6px;
    transition: var(--transition-base);
}

.employees__tab:hover {
    color: var(--color-text-primary);
}

.employees__tab--active {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.employees__filter {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    color: var(--color-text-secondary);
}

.employees__filter:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.employees__pdf-btn {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-base);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.employees__pdf-btn svg {
    width: 20px;
    height: 20px;
}

.pdf-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-btn-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.employees__add-btn {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.employees__add-btn:hover {
    background-color: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
}

/* Employees Table */
.employees__table-wrapper {
    /*background-color: #bbddff8a;*/
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

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

.employees-table__head {
    background-color: var(--color-bg-main);
}

.employees-table__header {
    padding: 16px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    justify-content: space-between;
    gap: 8px;
}

.employees-table__header--name {
    flex-direction: row;
    justify-content: unset;
}

.employees-table__header--left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.employees-table__row {
    border-bottom: 1px solid var(--color-border-dark);
    transition: var(--transition-base);
}

.employees-table__row:last-child {
    border-bottom: none;
}

.employees-table__cell {
    padding: 10px 15px;
    color: var(--color-text-primary);
}

.employees-table__cell--name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employees-table__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.employees-table__info {
    display: flex;
    flex-direction: column;
}

.employees-table__name {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.employees-table__email {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.employees-table__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--color-border-light);
    color: var(--color-text-secondary);
}

.employees-table__badge--middle {
    background-color: #E3F2FD;
    color: #1976D2;
}

.employees-table__badge--senior {
    background-color: #FFF3E0;
    color: #F57C00;
}

.employees-table__badge--junior {
    background-color: #F3E5F5;
    color: #7B1FA2;
}

.employees-table__actions {
    text-align: center;
}

.employees-table__menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: var(--color-text-secondary);
    transition: var(--transition-base);
}

.employees-table__menu-btn:hover {
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
}

/* Pagination */
.employees__pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pagination-top {
    margin-bottom: 20px;
}

.employees__pagination-info {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.employees__pagination-controls {
    display: flex;
    gap: 8px;
}

.employees__pagination-btn {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    color: var(--color-text-secondary);
}

.employees__pagination-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal--active {
    display: flex;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal__content {
    position: relative;
    background-color: var(--color-bg-main);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    scrollbar-width: none;
    scrollbar-color: var(--color-border) transparent;
}

.modal__content--large {
    max-width: 900px;
}

.modal__content::-webkit-scrollbar {
    width: 8px;
}

.modal__content::-webkit-scrollbar-track {
    background: transparent;
}

.modal__content::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: 4px;
}

.modal__content::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-text-secondary);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal__header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal__title {
    text-align: center;
    flex-grow: 1;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.modal__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--color-text-secondary);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__close:hover {
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
}

.modal__form {
    padding: 24px;
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.form-group__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 14px;
}

.form-group__input,
.form-group__select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition-base);
    background-color: var(--color-bg-white);
}

#employeeBirthday {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='%236C757D' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M4 1a1 1 0 00-1 1v1H2a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2h-1V2a1 1 0 10-2 0v1H5V2a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H4z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.form-group__input:focus,
.form-group__select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group__select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8L2 4h8L6 8z' fill='%236C757D'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Flatpickr Custom Styles */
.flatpickr-input {
    cursor: pointer !important;
    background-color: var(--color-bg-white) !important;
}

.flatpickr-input:disabled {
    cursor: not-allowed !important;
    background-color: var(--color-bg-main) !important;
}

.form-group {
    position: relative;
}

.form-group__input[readonly] {
    cursor: pointer;
    background-color: var(--color-bg-white);
}

.flatpickr-calendar {
    box-shadow: var(--shadow-lg) !important;
    border-radius: 12px !important;
    border: 1px solid var(--color-border) !important;
    font-family: inherit !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--color-bg-white) !important;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
    border-top-color: var(--color-bg-white) !important;
}

.flatpickr-months {
    background-color: var(--color-primary) !important;
    border-radius: 12px 12px 0 0 !important;
}

.flatpickr-current-month {
    color: var(--color-text-light) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background-color: transparent !important;
    color: var(--color-text-light) !important;
    font-weight: 500 !important;
}

.flatpickr-current-month .numInputWrapper input {
    color: var(--color-text-light) !important;
    font-weight: 500 !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: var(--color-text-light) !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    fill: var(--color-text-light) !important;
    opacity: 0.8;
}

.flatpickr-weekdays {
    background-color: var(--color-bg-main) !important;
}

.flatpickr-weekday {
    color: var(--color-text-secondary) !important;
    font-weight: 500 !important;
}

.flatpickr-day {
    color: var(--color-text-primary) !important;
    border-radius: 6px !important;
    font-weight: 400 !important;
}

.flatpickr-day:hover {
    background-color: var(--color-bg-main) !important;
    border-color: var(--color-bg-main) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-text-light) !important;
}

.flatpickr-day.today {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.flatpickr-day.today:hover {
    background-color: var(--color-primary) !important;
    color: var(--color-text-light) !important;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: var(--color-text-muted) !important;
    background-color: transparent !important;
    cursor: not-allowed !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: var(--color-text-muted) !important;
}

/* Modal Actions */
.modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal__btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.modal__btn--cancel {
    background-color: #c7c7c7;
    color: var(--color-text-primary);
}

.modal__btn--cancel:hover {
    background-color: var(--color-border);
}

.modal__btn--save {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.modal__btn--save:hover {
    background-color: var(--color-primary-dark);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background-color: var(--color-bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 160px;
    z-index: 2500;
    display: none;
    animation: contextMenuFadeIn 0.15s ease;
}

.context-menu--active {
    display: block;
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-base);
    color: var(--color-text-primary);
    font-size: 14px;
    text-align: left;
}

.context-menu__item:hover {
    background-color: var(--color-bg-main);
}

.context-menu__item--danger {
    color: var(--color-danger);
}

.context-menu__item--danger:hover {
    background-color: #FEE;
}

.context-menu__icon {
    min-width: 16px;
}

.context-menu__text {
    flex: 1;
}

/* Employee Card */
.modal__content--view {
    max-width: 600px;
}

.employee-card {
    padding: 24px;
}

.employee-card__header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 24px;
}

.employee-card__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.employee-card__main-info {
    flex: 1;
}

.employee-card__name {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.employee-card__position {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.employee-card__badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    background-color: var(--color-border-light);
    color: var(--color-text-secondary);
}

.employee-card__badge--middle {
    background-color: #E3F2FD;
    color: #1976D2;
}

.employee-card__badge--senior {
    background-color: #FFF3E0;
    color: #F57C00;
}

.employee-card__badge--junior {
    background-color: #F3E5F5;
    color: #7B1FA2;
}

.employee-card__details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.employee-card__detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.employee-card__detail-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.5px;
}

.employee-card__detail-value {
    font-size: 15px;
    color: var(--color-text-primary);
    font-weight: 500;
}

.employee-card__email {
    color: var(--color-primary);
    text-decoration: none;
}

.employee-card__email:hover {
    text-decoration: underline;
}

.employee-card__actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.employee-card__btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.employee-card__btn--edit {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.employee-card__btn--edit:hover {
    background-color: var(--color-primary-dark);
}

.employee-card__btn--delete {
    background-color: var(--color-bg-main);
    color: var(--color-danger);
}

.employee-card__btn--delete:hover {
    background-color: #FEE;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header {
        padding: 16px 24px;
    }

    .employees {
        padding: 24px;
    }

    .employees__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .employees__controls {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar--collapsed {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar--collapsed ~ .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }

    .header__search {
        max-width: 200px;
    }

    .header__user-name {
        display: none;
    }

    .employees-table__header,
    .employees-table__cell {
        padding: 12px 16px;
    }

    .employees__add-btn span {
        display: none;
    }
}

@media (max-width: 768px) {
    .modal__content--large {
        max-width: 95%;
        width: 95%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .employees__controls {
        flex-wrap: wrap;
    }

    .employees__tabs {
        order: 3;
        width: 100%;
    }

    .modal__content {
        width: 95%;
        margin: 20px;
    }

    .employee-card__details {
        grid-template-columns: 1fr;
    }

    .employee-card__header {
        flex-direction: column;
        text-align: center;
    }

    .employee-card__actions {
        flex-direction: column;
    }
}


/*---------------------AUTH STYLES----------------------*/
.auth-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
}

.auth-title {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border-light);
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

input,
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

input:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border-left: 4px solid #c33;
}

.error ul {
    margin: 0;
    padding-left: 20px;
}

.success {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border-left: 4px solid #3c3;
}

.login-link,
.register-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.login-link a,
.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover,
.register-link a:hover {
    text-decoration: underline;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 10px;
    color: #667eea;
}


/* Form */
.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* .register-row - placeholder for register-specific styles */

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .register-row {
         grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .form-row {
        grid-template-columns: repeat(3, 1fr);
    }

     .register-row {
         grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.required {
    color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #111827;
    background-color: white;
    transition: all 0.2s;
}

.form-group textarea {
    resize: none;
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
    margin-top: 0.5rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Scrollbar */
.modal__content::-webkit-scrollbar {
    width: 8px;
}

.modal__content::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.modal__content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.modal__content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.page-invites {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    padding: 20px 0;
    min-height: 100vh;
}

.page-invites__title {
    text-align: center;
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
}

/* Форма */
.invite-form {
    max-width: 500px;
    margin: 0 auto 40px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.invite-form__input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.invite-form__input:focus {
    border-color: #3498db;
    outline: none;
}

.invite-form__button {
    padding: 10px 20px;
    border: none;
    background-color: #3498db;
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.invite-form__button:hover {
    background-color: #2980b9;
}

/* Таблица */
.invites-table {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.invites-table__head {
    background-color: #3498db;
    color: #fff;
    font-weight: 600;
}

.invites-table__row:nth-child(even) {
    background-color: #f2f6fb;
}

.invites-table__cell {
    padding: 12px 15px;
    text-align: left;
}

.invites-table__link {
    color: #2980b9;
    text-decoration: none;
}

.invites-table__link:hover {
    text-decoration: underline;
}

/* Разделитель */
.page-invites__divider {
    border: none;
    height: 1px;
    background-color: #ddd;
    margin: 30px 0;
}

.filter-dropdown {
    position: relative;
}


.filter-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--color-bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0;
    min-width: 280px;
    z-index: 1000;
    display: none;
    animation: dropdownFadeIn 0.2s ease;
}

.filter-dropdown__menu--active {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.filter-dropdown__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.filter-dropdown__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    color: var(--color-text-secondary);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-dropdown__close:hover {
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
}

.filter-dropdown__form {
    padding: 16px 20px;
}

.filter-dropdown__group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-dropdown__checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition-base);
}

.filter-dropdown__checkbox:hover {
    background-color: var(--color-bg-main);
}

.filter-dropdown__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
    margin: 0;
}

.filter-dropdown__checkbox-label {
    font-size: 14px;
    color: var(--color-text-primary);
    user-select: none;
}

.filter-dropdown__actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-light);
}

.filter-dropdown__btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.filter-dropdown__btn--clear {
    background-color: var(--color-bg-main);
    color: var(--color-text-secondary);
}

.filter-dropdown__btn--clear:hover {
    background-color: var(--color-border);
    color: var(--color-text-primary);
}

.filter-dropdown__btn--apply {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.filter-dropdown__btn--apply:hover {
    background-color: var(--color-primary-dark);
}

/* Active filter indicator */
.employees__filter--active {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.employees__filter--active:hover {
    background-color: var(--color-primary-dark);
}

.header__search {
    display: flex;
    align-items: center;
}

.header__search-button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.header__search-icon {
    width: 20px;
    height: 20px;
}

/* table */
/* Wrapper */
.employees__table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

/* Стилизация скроллбара для webkit браузеров */
.employees__table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.employees__table-wrapper::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.employees__table-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
    transition: background 0.2s;
}

.employees__table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Градиент-индикатор для скролла справа */
.employees__table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 8px;
    width: 40px;
    background: linear-gradient(to left, rgba(245, 247, 250, 0.95), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.employees__table-wrapper.has-scroll::after {
    opacity: 1;
}

.employees-table {
    width: 100%;
    min-width: 1200px;
}

/* Header */
.employees-table__head {
    margin-bottom: 12px;
}

.employees-table__row--header {
    display: grid;
    grid-template-columns:
        minmax(220px, 2fr)  /* Імʼя */
        minmax(110px, 1fr)  /* Від */
        minmax(110px, 1fr)  /* До */
        minmax(130px, 1fr)  /* Підстава */
        minmax(110px, 1fr)  /* Термін */
        minmax(130px, 1fr)  /* Дозвіл */
        minmax(110px, 1fr)  /* До */
        minmax(110px, 1fr)  /* PESEL */
        minmax(110px, 1fr)  /* Подача */
        minmax(110px, 1fr)  /* Дата */
        60px;               /* Actions */
    gap: 12px;
    padding: 12px 16px;
    /*background-color: #bbddff8a;*/
    align-items: center;
}

.employees-table__header {
    height: 100%;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employees-table__header--actions {
    text-align: center;
}

/* Body */
.employees-table__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Row as Card */
.employees-table__row:not(.employees-table__row--header) {
    display: grid;
    grid-template-columns:
        minmax(220px, 2fr)  /* Імʼя */
        minmax(110px, 1fr)  /* Від */
        minmax(110px, 1fr)  /* До */
        minmax(130px, 1fr)  /* Підстава */
        minmax(110px, 1fr)  /* Термін */
        minmax(130px, 1fr)  /* Дозвіл */
        minmax(110px, 1fr)  /* До */
        minmax(110px, 1fr)  /* PESEL */
        minmax(110px, 1fr)  /* Подача */
        minmax(110px, 1fr)  /* Дата */
        60px;               /* Actions */
    gap: 12px;
    padding: 0px 15px;
    align-items: center;
}

/* Task Card styles */
.task-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #e9ecef;
    cursor: pointer;
    transition: all 0.25s ease;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Status colors */
.task-card[data-status="Pracujący"] {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.task-card[data-status="Zwolniony"] {
    border-left-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.task-card[data-status="Umowa o prace"] {
    border-left-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.task-card[data-status="Zmiana stanowiska"] {
    border-left-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.task-card--medium {
    border-left-color: #FFC107;
}

/* Cell */
.employees-table__cell {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #212529;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Добавляем курсор help для ячеек с длинным текстом */
.employees-table__cell[title] {
    cursor: help;
}

/* Name cell */
.employees-table__cell--name {
    display: flex;
    gap: 12px;
    align-items: center;
}

.employees-table__avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    padding: 8px;
}

.employees-table__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    min-width: 0;
}

.employees-table__name {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employees-table__email {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Actions */
.employees-table__actions {
    justify-content: center;
}

.employees-table__menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.employees-table__menu-btn:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* Empty state */
.employees-table__empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Responsive - великі екрани */
@media (min-width: 1900px) {
    .employees-table {
        min-width: auto;
    }
    
    .employees__table-wrapper::after {
        display: none;
    }
}

/* Responsive - екрани 1600px - 1900px */
@media (max-width: 1900px) and (min-width: 1601px) {
    .employees-table {
        min-width: 1600px;
    }
    
    .employees-table__row--header,
    .employees-table__row:not(.employees-table__row--header) {
        grid-template-columns:
            minmax(210px, 2fr)
            minmax(105px, 1fr)
            minmax(105px, 1fr)
            minmax(125px, 1fr)
            minmax(105px, 1fr)
            minmax(125px, 1fr)
            minmax(105px, 1fr)
            minmax(105px, 1fr)
            minmax(105px, 1fr)
            minmax(105px, 1fr)
            58px;
        gap: 10px;
    }
}

/* Responsive - екрани 1400px - 1600px */
@media (max-width: 1600px) and (min-width: 1401px) {
    .employees-table {
        min-width: 1400px;
    }
    
    .employees-table__row--header,
    .employees-table__row:not(.employees-table__row--header) {
        grid-template-columns:
            minmax(190px, 2fr)
            minmax(95px, 1fr)
            minmax(95px, 1fr)
            minmax(115px, 1fr)
            minmax(95px, 1fr)
            minmax(115px, 1fr)
            minmax(95px, 1fr)
            minmax(95px, 1fr)
            minmax(95px, 1fr)
            minmax(95px, 1fr)
            55px;
        gap: 8px;
    }
    
    .employees-table__header,
    .employees-table__cell {
        font-size: 12px;
    }
    
    .employees-table__row:not(.employees-table__row--header) {
        padding: 9px 14px;
    }
}

/* Responsive - екрани 1200px - 1400px */
@media (max-width: 1400px) and (min-width: 1201px) {
    .employees-table {
        min-width: 1200px;
    }
    
    .employees-table__row--header,
    .employees-table__row:not(.employees-table__row--header) {
        grid-template-columns:
            minmax(180px, 2fr)
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            minmax(110px, 1fr)
            minmax(90px, 1fr)
            minmax(110px, 1fr)
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            50px;
        gap: 8px;
    }
    
    .employees-table__header,
    .employees-table__cell {
        font-size: 12px;
    }
    
    .employees-table__avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .employees-table__row:not(.employees-table__row--header) {
        padding: 8px 12px;
    }
    
    .employees-table__cell--name {
        gap: 10px;
    }
}

/* Responsive - середні екрани (менше 1200px) */
@media (max-width: 1200px) {
    .employees-table {
        min-width: 1100px;
    }
    
    .employees-table__row--header,
    .employees-table__row:not(.employees-table__row--header) {
        grid-template-columns:
            minmax(170px, 2fr)
            repeat(9, minmax(85px, 1fr))
            48px;
        gap: 8px;
    }

    .employees-table__header,
    .employees-table__cell {
        font-size: 11px;
    }

    .employees-table__avatar {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
    
    .employees-table__name {
        font-size: 13px;
    }
    
    .employees-table__email {
        font-size: 11px;
    }
}

/* Responsive - планшети */
@media (max-width: 992px) {
    .employees__table-wrapper {
        overflow-x: scroll;
    }
}

/* Responsive - мобільні */
@media (max-width: 768px) {
    .employees-table {
        min-width: auto;
    }

    .employees-table__head {
        display: none;
    }

    .employees-table__row:not(.employees-table__row--header) {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .employees-table__cell {
        display: grid;
        grid-template-columns: 110px 1fr;
        gap: 10px;
        align-items: center;
    }

    .employees-table__cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c757d;
        font-size: 12px;
    }

    .employees-table__cell--name {
        grid-column: 1 / -1;
        grid-template-columns: auto 1fr;
    }

    .employees-table__cell--name::before {
        display: none;
    }

    .employees-table__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .employees-table__actions::before {
        display: none;
    }
}

/* Employee Profile Card - BEM Methodology */

.employee-profile {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header Section */
.employee-profile__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 32px;
    color: white;
    position: relative;
}

.employee-profile__main-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.employee-profile__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.employee-profile__name-block {
    flex: 1;
}

.employee-profile__name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.employee-profile__workplace {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}

.employee-profile__badges {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.employee-profile__badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.employee-profile__badge--student {
    background: rgba(52, 211, 153, 0.3);
    border-color: rgba(52, 211, 153, 0.5);
}

.employee-profile__badge--works {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.employee-profile__badge--fired {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.employee-profile__badge--contract {
    background: rgba(0, 58, 184, 0.3);
    border-color: rgba(26, 57, 255, 0.5);
}

.employee-profile__badge--shift {
    background: rgba(244, 210, 72, 0.3);
    border-color: rgba(248, 218, 126, 0.5);
}

/* Content Section */
.employee-profile__content {
    padding: 32px;
}

/* Section */
.employee-profile__section {
    margin-bottom: 32px;
}

.employee-profile__section:last-child {
    margin-bottom: 0;
}

.employee-profile__section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.employee-profile__section-icon {
    width: 20px;
    height: 20px;
    color: #667eea;
}

/* Grid Layout */
.employee-profile__grid {
    display: grid;
    /*grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));*/
    grid-template-columns: repeat(3, minmax(149px, 1fr));
    gap: 20px;
}

.employee-profile__grid--single {
    grid-template-columns: 1fr;
}

/* Field */
.employee-profile__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.employee-profile__field-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.employee-profile__field-value {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
}

.employee-profile__field-value--link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.employee-profile__field-value--link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.employee-profile__field-value--empty {
    color: #9ca3af;
    font-style: italic;
}

/* Nested Items (Documents, Contracts, etc.) */
.employee-profile__items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employee-profile__item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.employee-profile__item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.employee-profile__item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.employee-profile__item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.employee-profile__item-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.employee-profile__item-status--valid {
    background: #d1fae5;
    color: #065f46;
}

.employee-profile__item-status--expired {
    background: #fee2e2;
    color: #991b1b;
}

.employee-profile__item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

/* Additional Information */
.employee-profile__additional-info {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 16px;
    color: #78350f;
    line-height: 1.6;
}

/* Empty State */
.employee-profile__empty {
    text-align: center;
    padding: 32px;
    color: #9ca3af;
    font-style: italic;
}

/* Actions */
.employee-profile__actions {
    display: flex;
    gap: 12px;
    padding: 24px 32px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.employee-profile__btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.employee-profile__btn--edit {
    background: #667eea;
    color: white;
}

.employee-profile__btn--edit:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.employee-profile__btn--delete {
    background: #ef4444;
    color: white;
}

.employee-profile__btn--delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .employee-profile__header {
        padding: 24px 20px;
    }

    .employee-profile__main-info {
        flex-direction: column;
        text-align: center;
    }

    .employee-profile__content {
        padding: 20px;
    }

    .employee-profile__grid {
        grid-template-columns: 1fr;
    }

    .employee-profile__actions {
        flex-direction: column;
        padding: 20px;
    }
}
/* So
rt Buttons */
.sort-buttons {
    display: inline-flex;
    gap: 4px;
    flex-shrink: 0;
}

.buttons-sort--column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}

.sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s;
    cursor: pointer;
}

.sort-btn:hover {
    background-color: #f3f4f6;
    color: #4b5563;
}

.sort-btn--active {
    color: #667eea;
    font-weight: bold;
}

.sort-btn--active:hover {
    background-color: #eef2ff;
    color: #5568d3;
}

.sort-btn--clear {
    color: #ef4444;
}

.sort-btn--clear:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.sort-btn--disabled {
    color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive adjustments for sort buttons */
@media (max-width: 768px) {
    .sort-buttons {
        gap: 2px;
    }
    
    .sort-btn {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* Chat Widget Container */
#chatWidget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

/* Collapsed State - Toggle Button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Анимация slideIn для кнопки чата при новом сообщении */
.chat-toggle-btn.slideIn {
    animation: slideIn 0.3s ease-out;
}

.chat-total-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* Expanded State - Chat Window */
.chat-window {
    display: none;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    flex-direction: column;
    overflow: hidden;
}

#chatWidget.chat-widget-expanded .chat-toggle-btn {
    display: none;
}

#chatWidget.chat-widget-expanded .chat-window {
    display: flex;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#chatHeaderText {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

.chat-back-btn,
.chat-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-back-btn:hover,
.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Users List */
.chat-users-list {
    flex: 1;
    overflow-y: auto;
}

.chat-user {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-user:hover {
    background: #f8fafc;
}

.chat-user.active {
    background: #eff6ff;
    border-left: 3px solid #667eea;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chat-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.chat-user-name {
    font-weight: 500;
    color: #1e293b;
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
}

.message {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 18px;
    max-width: 75%;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.me {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
}

.other {
    background: white;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
}

/* Chat Input Block */
.chat-input-block {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    background: white;
    gap: 8px;
}

#chatInput {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#chatInput:focus {
    border-color: #667eea;
}

#sendBtn {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#sendBtn:hover {
    transform: scale(1.1);
}

#sendBtn:active {
    transform: scale(0.95);
}



/* Стили для badge непрочитанных сообщений */
.chat-user {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.unread-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 6px;
    margin-left: auto;
}

/* Анимация для уведомления */
/*#chatWidget.has-notification {*/
/*    animation: pulse 0.5s ease-in-out 3;*/
/*}*/

/*@keyframes pulse {*/
/*    0%, 100% {*/
/*        transform: scale(1);*/
/*    }*/
/*    50% {*/
/*        transform: scale(1.05);*/
/*        box-shadow: 0 12px 28px rgba(59, 130, 246, 0.4);*/
/*    }*/
/*}*/

/* Улучшенный стиль для активного чата */
.chat-user.active {
    background: #e0f2fe;
    border-left: 3px solid #3b82f6;
}

/* Анимация появления сообщения */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стиль для общего badge чата */
.chat-total-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    /*min-width: 20px;*/
    /*height: 20px;*/
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    /*padding: 0 6px;*/
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-toggle-wrapper {
    position: relative;
}

#chatWidget.has-notification {
    border-radius: 50%;
    animation: shake-notification 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.8) !important;
}

@keyframes shake-notification {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* User Profile Modal Styles */
.modal__content--profile {
    max-width: 600px;
}

.profile-content {
    padding: 24px;
}

.profile-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-border-light);
    box-shadow: var(--shadow-md);
}

.profile-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--color-bg-main);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    transition: var(--transition-base);
}

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

.profile-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.profile-field-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.5px;
}

.profile-field-value {
    font-size: 15px;
    color: var(--color-text-primary);
    font-weight: 500;
}

.profile-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.profile-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.profile-btn--edit {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.profile-btn--edit:hover {
    background-color: var(--color-primary-dark);
}

.profile-btn--password {
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

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

.profile-edit-form,
.profile-password-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Responsive для профиля */
@media (max-width: 768px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
    
    .profile-actions {
        flex-direction: column;
    }
}

/* Стили для общего чата в списке пользователей */
.chat-user-group {
    background: linear-gradient(135deg, #f093fb15 0%, #f5576c15 100%);
    border-left: 3px solid #f5576c;
}

.chat-user-group:hover {
    background: linear-gradient(135deg, #f093fb25 0%, #f5576c25 100%);
}

.chat-user-group.active {
    background: linear-gradient(135deg, #f093fb35 0%, #f5576c35 100%);
    border-left: 3px solid #f5576c;
}

.chat-user-avatar-group {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Разделитель в списке чатов */
.chat-divider {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* Стили для сообщений общего чата */
.chat-body.group-chat-active {
    background: linear-gradient(to bottom, #fef3f8 0%, #f8fafc 100%);
}

.message.group-message.me {
    background: white;
    color: #1e293b;
    border-radius: 12px;
    border-bottom-right-radius: 4px;
    padding: 10px 14px;
}

.message.group-message.other {
    background: white;
    color: #1e293b;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.group-message-sender {
    font-size: 11px;
    font-weight: 600;
    color: #f5576c;
    margin-bottom: 4px;
}

.group-message-text {
    font-size: 14px;
    line-height: 1.4;
}


/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switcher__form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-form {
    justify-content: center;
}

.language-switcher__select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    background-color: var(--color-bg-white);
    cursor: pointer;
    transition: var(--transition-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8L2 4h8L6 8z' fill='%236C757D'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.language-switcher__select:hover {
    border-color: var(--color-primary);
}

.language-switcher__select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.language-switcher__button {
    padding: 8px 16px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.language-switcher__button:hover {
    background-color: var(--color-primary-dark);
}

.language-switcher__button:active {
    transform: translateY(1px);
}

/* Вариант для sidebar */
.sidebar .language-switcher {
    padding: 12px 20px;
}

.sidebar .language-switcher__select {
    width: 100%;
    background-color: var(--color-bg-sidebar-hover);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
}

.sidebar .language-switcher__select:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.sidebar .language-switcher__button {
    width: 100%;
}

/* Компактный вариант для header */
.header .language-switcher__select {
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    min-width: 120px;
}

.header .language-switcher__button {
    padding: 6px 12px;
    font-size: 13px;
}

/* Collapsed sidebar */
.sidebar--collapsed .language-switcher {
    flex-direction: column;
    gap: 8px;
}

.sidebar--collapsed .language-switcher__select,
.sidebar--collapsed .language-switcher__button {
    width: 100%;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .language-switcher {
        flex-direction: column;
        width: 100%;
    }

    .language-switcher__select,
    .language-switcher__button {
        width: 100%;
    }
}
/* 
============================================
   CHAT WIDGET STYLES
   ============================================ */

/* Chat toggle button pulse animation */
@keyframes chat-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(74, 144, 226, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0);
    }
}

@keyframes chat-pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.chat-toggle-btn {
    position: relative;
    transition: all 0.3s ease;
}

/* Пульсация когда есть непрочитанные сообщения */
.chat-toggle-btn.has-unread {
    animation: chat-pulse 2s infinite;
}

/* Дополнительное кольцо пульсации */
.chat-toggle-btn.has-unread::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.3);
    transform: translate(-50%, -50%);
    animation: chat-pulse-ring 2s infinite;
    pointer-events: none;
}

/* Бейдж с количеством сообщений */
.chat-total-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    /* padding: 2px 6px; */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: badge-pop 0.3s ease;
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Hover эффект для кнопки */
.chat-toggle-btn:hover {
    transform: scale(1.05);
}

.chat-toggle-btn.has-unread:hover {
    animation: none;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

/* Кнопка прикрепления файла */
.file-attach-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #f1f5f9;
    color: #667eea;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.file-attach-btn:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.file-attach-btn:active {
    transform: scale(0.95);
}

/* Сообщение с файлом */
.message-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.message-file:hover {
    background: rgba(255, 255, 255, 0.2);
}

.message.me .message-file {
    background: rgba(255, 255, 255, 0.15);
}

.message.me .message-file:hover {
    background: rgba(255, 255, 255, 0.25);
}

.message.other .message-file {
    background: rgba(102, 126, 234, 0.05);
}

.message.other .message-file:hover {
    background: rgba(102, 126, 234, 0.1);
}

.file-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message.me .file-icon {
    background: rgba(255, 255, 255, 0.3);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    opacity: 0.7;
}

.file-download-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Предпросмотр файла перед отправкой */
.file-preview {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-preview.show {
    display: flex;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 11px;
    color: #64748b;
}

.file-preview-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.file-preview-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Обновляем блок ввода */
.chat-input-block {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    background: white;
    gap: 8px;
}

.chat-input-row {
    display: flex;
    gap: 8px;
}

/* Лоадер при отправке файла */
.file-uploading {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-uploading.show {
    display: flex;
}

.file-uploading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #dbeafe;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.file-uploading-text {
    font-size: 13px;
    color: #3b82f6;
}

/* Ограничение размера файла */
.file-size-error {
    display: none;
    padding: 8px 12px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

.file-size-error.show {
    display: block;
}