/* === ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ === */

:root {
    --cyan: #00FFFF;
    --cyan-dark: #00CED1;
    --light-blue: #00BFFF;
    --bg-default: #1A1A1A;
    --bg-elevated: #2D2D2D;
    --bg-sunken: #0F0F0F;
    --bg-hover: #3A3A3A;
    --text-primary: #FFFFFF;
    --text-secondary: #E2E8F0;
    --text-muted: #CBD5E0;
    --text-onBrand: #0A0F1A;
    --accent-positive: #10B981;
    --accent-negative: #EF4444;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 4px 16px rgba(0, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-default);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === НАВИГАЦИЯ === */
.profile-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* === КНОПКИ === */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--cyan) 0%, var(--light-blue) 100%);
    color: var(--text-onBrand);
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.5);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--cyan);
}

.btn-danger {
    background: transparent;
    color: var(--accent-negative);
    border: 1px solid var(--accent-negative);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
}

.btn-admin {
    background: var(--cyan);
    color: var(--text-onBrand);
}

.btn-admin:hover {
    background: var(--cyan-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* === ОСНОВНОЙ КОНТЕЙНЕР === */
.profile-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

/* === БОКОВАЯ ПАНЕЛЬ === */
.profile-sidebar {
    width: 280px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 2rem 0;
}

.sidebar-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--light-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-onBrand);
    margin: 0 auto 1rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.user-email {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(0, 255, 255, 0.1);
    color: var(--cyan);
    border-left: 3px solid var(--cyan);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* === ОСНОВНОЙ КОНТЕНТ === */
.profile-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    max-width: calc(100% - 280px);
}

.profile-page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.profile-page.active {
    display: block;
}

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

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* === СЕКЦИИ === */
.dashboard-section,
.account-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-link {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.section-link:hover {
    opacity: 0.8;
}

/* === КАРТОЧКИ === */
.next-call-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.next-call-card:hover {
    border-color: var(--cyan);
    box-shadow: var(--shadow-hover);
}

.next-call-card .empty-state {
    text-align: center;
    padding: 2rem;
}

.next-call-card-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.next-call-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.next-call-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.next-call-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.next-call-time-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

.next-call-time-badge.status-scheduled {
    background: rgba(0, 255, 255, 0.2);
    color: var(--cyan);
}

.next-call-time-badge.status-started {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-positive);
}

.next-call-time-badge.status-ended {
    background: rgba(203, 213, 224, 0.2);
    color: var(--text-muted);
}

.next-call-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: right;
}

.next-call-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.next-call-participants {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.next-call-participants-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.next-call-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.next-call-actions .btn {
    flex: 1;
}

.call-card-mini {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.call-card-mini:hover {
    border-color: var(--cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.call-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.call-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.call-card-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-scheduled {
    background: rgba(0, 255, 255, 0.2);
    color: var(--cyan);
}

.status-started {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-positive);
}

.status-ended {
    background: rgba(203, 213, 224, 0.2);
    color: var(--text-muted);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-negative);
}

.call-card-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.call-card-participants {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === СЕТКИ === */
.calls-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    min-height: 200px;
}

.calls-grid-mini .loading-state {
    grid-column: 1 / -1;
    width: 100%;
}

.calls-grid-mini .empty-state {
    grid-column: 1 / -1;
    width: 100%;
}

.orders-list-mini {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
}

.orders-list-mini .loading-state {
    width: 100%;
}

.order-card-mini {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-card-mini:hover {
    border-color: var(--cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.order-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.order-card-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.favorites-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    min-height: 200px;
}

.favorites-preview .loading-state {
    grid-column: 1 / -1;
    width: 100%;
}

.favorite-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.favorite-item:hover {
    border-color: var(--cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* === ФИЛЬТРЫ === */
.filters-bar {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === КАСТОМНЫЕ СЕЛЕКТОРЫ (в стиле админской панели) === */
.filter-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Убираем стандартный вид */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    /* Кастомная стрелка */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300FFFF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    /* Убираем outline при фокусе */
    outline: none;
    font-family: inherit;
    min-width: 250px;
}

/* Скрываем селекторы, которые уже обработаны JavaScript */
.filter-select[data-custom-select-created="true"] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    clip: rect(0, 0, 0, 0) !important;
    overflow: hidden !important;
}

.filter-select::-ms-expand {
    display: none; /* Убираем стрелку в IE/Edge */
}

.filter-select:hover {
    border-color: var(--cyan);
}

.filter-select:focus {
    border-color: var(--cyan);
    background: rgba(26, 26, 26, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Стили для option элементов */
.filter-select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 0.75rem;
    border: none;
}

.filter-select option:hover {
    background: var(--bg-hover);
}

.filter-select option:checked {
    background: var(--cyan);
    color: var(--text-onBrand);
}

/* Для Firefox */
@-moz-document url-prefix() {
    .filter-select {
        text-indent: 0.01px;
        text-overflow: '';
    }
}

/* === КАСТОМНЫЙ DROPDOWN (в стиле админской панели) === */
.custom-select-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
    z-index: 100;
    isolation: isolate;
}

.custom-select-dropdown {
    position: relative;
    width: 100%;
    flex: 1;
    min-width: 250px;
    z-index: 3500;
    isolation: isolate;
}

.custom-select-button {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    background: var(--bg-default);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-family: inherit;
    min-height: 38px;
    min-width: 250px;
    box-sizing: border-box;
}

.custom-select-button:hover {
    border-color: var(--cyan);
}

.custom-select-button:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.custom-select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    width: 12px;
    height: 12px;
    color: var(--cyan);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.custom-select-dropdown.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown-list {
    position: fixed !important;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    z-index: 3500 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
    overflow-y: hidden;
    overflow-x: hidden;
    will-change: transform, opacity;
    transform-style: preserve-3d;
    isolation: isolate;
    pointer-events: auto;
}

.custom-select-dropdown.open .custom-select-dropdown-list {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    overflow-x: hidden !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.custom-select-dropdown:not(.open) .custom-select-dropdown-list {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.custom-select-item {
    padding: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.85rem;
}

.custom-select-item:hover {
    background: var(--bg-hover);
}

.custom-select-item.selected {
    background: rgba(0, 255, 255, 0.1);
    color: var(--cyan);
    font-weight: 500;
}

.custom-select-item:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.custom-select-item:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Стили для скроллбара в dropdown */
.custom-select-dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.custom-select-dropdown-list::-webkit-scrollbar-track {
    background: var(--bg-default);
    border-radius: 4px;
}

.custom-select-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.custom-select-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

.search-input {
    padding: 0.5rem 1rem;
    background: var(--bg-default);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 300px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-default);
    border-radius: 8px;
    padding: 0.25rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.view-btn.active {
    background: rgba(0, 255, 255, 0.2);
    color: var(--cyan);
}

.view-btn:hover:not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* === СОЗВОНЫ === */
.calls-content {
    min-height: 400px;
}

.calls-view {
    display: none;
}

.calls-view.active {
    display: block;
}

.calls-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.call-card-full {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.call-card-full:hover {
    border-color: var(--cyan);
    box-shadow: var(--shadow-hover);
}

.call-card-participants-section {
    margin-top: 1rem;
}

.call-card-creator {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.call-card-participants-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.participants-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.participant-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: var(--bg-default);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    cursor: default;
}

.participant-chip:hover {
    background: var(--bg-hover);
    border-color: var(--cyan);
    color: var(--text-primary);
}

.participant-chip-employee {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 191, 255, 0.2) 100%);
    border-color: var(--cyan);
    color: var(--cyan);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.2);
}

.participant-chip-employee:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 191, 255, 0.3) 100%);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
    transform: translateY(-1px);
}

.participant-chip-employee::after {
    content: '';
    margin-left: 0.25rem;
    font-size: 0.75rem;
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.participant-chip-empty {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.participant-chip-more {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: var(--bg-sunken);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Tooltip для сотрудников */
.participant-chip-employee[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--cyan);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow);
    pointer-events: none;
}

.participant-chip-employee[title]:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.25rem;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--cyan);
    z-index: 1001;
    pointer-events: none;
}

/* === КАЛЕНДАРЬ === */
.calendar-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    min-height: 600px;
}

.calendar-sidebar {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.calendar-container {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-month-year {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-default);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: inherit;
}

.calendar-nav-btn:hover {
    background: var(--bg-hover);
    border-color: var(--cyan);
    color: var(--cyan);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    position: relative;
}

.calendar-day:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.calendar-day.other-month {
    color: var(--text-muted);
    opacity: 0.4;
}

.calendar-day.today {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--cyan);
    color: var(--cyan);
    font-weight: 700;
}

.calendar-day.has-calls {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.3);
}

.calendar-day.has-calls::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--cyan);
    border-radius: 50%;
}

.calendar-day.selected {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--light-blue) 100%);
    color: var(--text-onBrand);
    font-weight: 700;
    border-color: var(--cyan);
}

.calendar-day.selected::after {
    background: var(--text-onBrand);
}

.calendar-calls-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.calendar-selected-date {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.calendar-selected-date h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.calendar-calls-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-call-item {
    background: var(--bg-default);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.calendar-call-item:hover {
    border-color: var(--cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.calendar-call-time {
    font-size: 0.9rem;
    color: var(--cyan);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.calendar-call-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.calendar-call-participants {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }
    
    .calendar-sidebar {
        order: 2;
    }
    
    .calendar-calls-panel {
        order: 1;
    }
}

/* === ЗАКАЗЫ === */
.orders-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    min-height: 600px;
}

.orders-list-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.orders-list-full {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item-full {
    padding: 1.5rem;
    background: var(--bg-default);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-item-full:hover {
    border-color: var(--cyan);
    background: var(--bg-hover);
}

.order-item-full.selected {
    border-color: var(--cyan);
    background: rgba(0, 255, 255, 0.1);
}

.order-details-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.order-details {
    min-height: 400px;
}

.order-details-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.order-details-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.order-details-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.order-details-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.order-details-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.order-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-meta-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.order-meta-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.order-details-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* === ФОРМЫ === */
.profile-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-default);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Поле Telegram с верификацией */
.telegram-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.telegram-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.telegram-input-group .form-input {
    flex: 1;
}

.telegram-input-group .btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-top: 0;
}

.telegram-error-message {
    color: var(--accent-negative);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
}

.telegram-verification-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: var(--accent-positive);
    font-size: 0.85rem;
    font-weight: 500;
}

.telegram-verify-widget {
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
}

.telegram-widget-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--light-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-onBrand);
    overflow: hidden;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.security-actions {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

/* === МОДАЛЬНЫЕ ОКНА === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* === TOAST УВЕДОМЛЕНИЯ === */
.toast-container {
    position: fixed;
    top: 90px;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toast.success {
    border-left: 4px solid var(--accent-positive);
}

.toast.error {
    border-left: 4px solid var(--accent-negative);
}

.toast.info {
    border-left: 4px solid var(--cyan);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === СОСТОЯНИЯ === */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    min-height: 200px;
}

.spinner {
    border: 3px solid rgba(0, 255, 255, 0.1);
    border-top: 3px solid var(--cyan);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
    flex-shrink: 0;
}

.loading-state p {
    margin: 0;
    font-size: 0.95rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.empty-state-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.empty-state-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 1024px) {
    .profile-sidebar {
        width: 240px;
    }
    
    .profile-content {
        margin-left: 240px;
        max-width: calc(100% - 240px);
    }
    
    .orders-layout {
        grid-template-columns: 1fr;
    }
    
    .orders-list-panel {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .profile-wrapper {
        flex-direction: column;
    }
    
    .profile-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
    }
    
    .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .profile-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1.5rem 1rem;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calls-grid-mini {
        grid-template-columns: 1fr;
    }
    
    .orders-layout {
        grid-template-columns: 1fr;
    }
    
    .order-details-panel {
        max-height: none;
    }
}

/* === ПЛАШКА ДОСТУПА ЗАПРЕЩЕН === */
.access-denied-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-default);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.access-denied-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.access-denied-logo {
    margin-bottom: 2rem;
}

.access-denied-logo img {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.access-denied-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.access-denied-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.access-denied-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--cyan);
    color: var(--text-onBrand);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.access-denied-button:hover {
    background: var(--cyan-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
}

.access-denied-button:active {
    transform: translateY(0);
}

