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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-image {
    max-width: 200px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.login-header h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

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

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

.phone-input-wrapper {
    position: relative;
    width: 100%;
}

.phone-input-wrapper .phone-mask-overlay {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
    font-size: 16px;
    white-space: nowrap;
    z-index: 2;
    user-select: none;
    opacity: 1;
    transition: opacity 0.2s;
    font-family: inherit;
    line-height: 1;
    background: transparent;
}

.phone-input-wrapper #phone {
    position: relative;
    z-index: 1;
    background: transparent;
}

.phone-input-wrapper:focus-within .phone-mask-overlay {
    opacity: 0 !important;
}

.phone-input-wrapper:not(:focus-within) .phone-mask-overlay {
    opacity: 1;
}

/* Скрываем маску если в поле есть значение */
.phone-input-wrapper:not(:focus-within) #phone:not(:placeholder-shown) ~ .phone-mask-overlay,
.phone-input-wrapper:not(:focus-within) #phone[value]:not([value=""]) ~ .phone-mask-overlay {
    opacity: 0;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}


.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 8px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-block {
    width: 100%;
}

#login-error {
    margin-bottom: 15px;
    padding: 12px;
    background: #fee;
    color: #c33;
    border-radius: 8px;
    display: none;
}

/* Dashboard Layout */
.dashboard-body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    transition: padding 0.3s ease;
    position: relative;
}

.sidebar.collapsed .sidebar-header {
    padding: 15px 10px;
    justify-content: center;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar.collapsed .logo {
    width: auto;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.logo-image {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    display: block;
    transition: max-height 0.3s ease;
}

.sidebar.collapsed .logo-image {
    max-height: 40px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .sidebar-toggle {
    margin: 0 auto;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    position: relative;
    white-space: nowrap;
}

.sidebar.collapsed .nav-item {
    padding: 12px;
    justify-content: center;
}

.nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
}

.nav-item span {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.nav-item:hover {
    background: #f8f8f8;
    color: #333;
}

.nav-item.active {
    background: #667eea;
    color: white;
    border-left-color: #5568d3;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    transition: padding 0.3s ease;
}

.sidebar.collapsed .sidebar-footer {
    padding: 15px 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    transition: justify-content 0.3s ease;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    flex-direction: column;
    margin-bottom: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar.collapsed .user-avatar {
    margin-right: 0;
    margin-bottom: 5px;
}

.user-info {
    flex: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar.collapsed .user-info {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.user-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

.user-role {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    width: 100%;
}

.sidebar.collapsed .logout-btn {
    padding: 10px;
    justify-content: center;
}

.logout-btn i {
    margin-right: 8px;
    flex-shrink: 0;
}

.sidebar.collapsed .logout-btn i {
    margin-right: 0;
}

.logout-btn span {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar.collapsed .logout-btn span {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.logout-btn:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    overflow-x: visible;
    overflow-y: auto;
    width: calc(100% - 260px);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 70px;
}

/* Header */
.header {
    background: white;
    padding: 0 30px;
    height: 80px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-small {
    display: flex;
    flex-direction: column;
}

.logo-text-small {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    border: 1px solid #333;
    padding: 2px 8px;
}

.logo-subtitle {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}


.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.add-complex-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.add-complex-btn:hover {
    background: #5568d3;
}

.add-complex-btn i {
    font-size: 14px;
}

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

.filter-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: #5568d3;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name-header {
    font-weight: 500;
    color: #333;
}

.user-avatar-header {
    width: 36px;
    height: 36px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Content Body */
.content-body {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
    min-height: calc(100vh - 80px);
    overflow-x: visible;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Sales Header Section */
.sales-header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.sales-period-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.sales-header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sales-filter-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.sales-filter-btn:hover {
    background: #5568d3;
}

.conversion-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.conversion-btn:hover {
    background: #218838;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.metric-card:nth-child(1) .metric-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.metric-card:nth-child(2) .metric-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metric-card:nth-child(3) .metric-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metric-card:nth-child(4) .metric-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.metric-card:nth-child(5) .metric-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.metric-card:nth-child(6) .metric-icon {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.metric-subvalue {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    margin-top: 5px;
    line-height: 1;
}

.calls-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.table-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

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

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

.calls-table thead {
    background: #f8f9fa;
}

.calls-table th {
    padding: 15px 25px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    border-bottom: 2px solid #eee;
}

.calls-table td {
    padding: 15px 25px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.calls-table tbody tr:hover {
    background: #f8f9fa;
}

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

.table-empty {
    text-align: center;
    color: #999;
    padding: 40px !important;
    font-style: italic;
}

/* Managers Table Styles */
.managers-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-top: 30px;
}

.managers-table-title {
    padding: 20px 25px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

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

.managers-table thead {
    background: #f8f9fa;
}

.managers-table th {
    padding: 15px 25px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    border-bottom: 2px solid #eee;
    position: relative;
}

.managers-table th:first-child {
    font-weight: 700;
    color: #333;
}

.managers-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.managers-table th.sortable:hover {
    background-color: #e9ecef;
}

.managers-table th.sortable .sort-icon {
    margin-left: 8px;
    font-size: 12px;
    color: #999;
    transition: color 0.2s;
}

.managers-table th.sortable:hover .sort-icon {
    color: #667eea;
}

.managers-table th.sortable .sort-icon.sort-active {
    color: #667eea;
}

.managers-table td {
    padding: 15px 25px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.managers-table td:first-child {
    font-weight: 500;
    color: #333;
}

.managers-table td:not(:first-child) {
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.managers-table td .conversion-percent {
    font-size: 12px;
    font-weight: 500;
    color: #28a745;
    margin-left: 5px;
}

.managers-table td.conversion-cell {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-align: left;
    padding-left: 15px;
}

/* Conversion Container Styles */
.conversion-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-top: 30px;
}

.conversion-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.conversion-steps {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.conversion-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 140px;
    flex: 1;
}

.conversion-step-name {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-align: center;
}

.conversion-step-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    text-align: center;
}

.conversion-step-value .conversion-percent {
    font-size: 14px;
    font-weight: 600;
    color: #28a745;
    margin-left: 5px;
}

.conversion-arrow-inline {
    color: #667eea;
    font-size: 18px;
    flex-shrink: 0;
}

.managers-table tbody tr:hover {
    background: #f8f9fa;
}

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

/* Complexes Cards Styles */
.complexes-cards-container {
    margin-top: 30px;
}

.complexes-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.complex-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.complex-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.complex-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.complex-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.complex-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

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

.complex-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.complex-address {
    font-size: 14px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.complex-edit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    opacity: 0.9;
}

.complex-edit-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    opacity: 1;
}

.complex-edit-btn:active {
    transform: translateY(0) scale(0.98);
}

.complex-edit-btn i {
    font-size: 16px;
    font-weight: 600;
}

.complex-metrics {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.complex-metrics-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.complex-metrics-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.complex-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.complex-metrics-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 10px 0;
}

.complex-metric-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: left;
}

.complex-metric-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.metric-info-icon {
    font-size: 12px;
    color: #999;
    cursor: help;
    transition: color 0.2s;
    flex-shrink: 0;
}

.metric-info-icon:hover {
    color: #667eea;
}

.metric-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    margin-bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 13px;
    z-index: 99999;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    min-width: 240px;
    max-width: 320px;
    white-space: normal;
    backdrop-filter: blur(10px);
}

.metric-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #667eea;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.metric-tooltip.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

.metric-tooltip-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    letter-spacing: 0.5px;
}

.metric-tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 20px;
    transition: background-color 0.2s;
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
    margin: 2px 0;
}

.metric-tooltip-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.metric-tooltip-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.metric-tooltip-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.metric-tooltip-value {
    font-weight: 700;
    color: white;
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
}

.complex-metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 4px;
}

.complex-metric-sum {
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
    line-height: 1;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 30px;
}

.modal-content form {
    padding: 30px;
}

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

.modal-content .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

/* Стили для модального окна фильтрации */
.filter-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.filter-header-label {
    font-weight: 600;
    margin: 0;
    font-size: 15px;
    color: #333;
}

.filter-header-buttons {
    display: flex;
    gap: 10px;
}

.filter-complexes-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    background: #fafafa;
}

.filter-complexes-list::-webkit-scrollbar {
    width: 8px;
}

.filter-complexes-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.filter-complexes-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.filter-complexes-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.filter-complex-item {
    margin-bottom: 12px;
    border-radius: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.filter-complex-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.filter-complex-item.checked {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.2);
}

.filter-complex-item-label {
    display: block;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.filter-complex-item-content {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
    padding-right: 45px; /* Место для чекбокса */
}

.filter-complex-item-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.filter-complex-item-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.filter-complex-item-info {
    flex: 1;
    min-width: 0;
}

.filter-complex-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-complex-item-address {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-complex-item {
    position: relative;
}

.filter-complex-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
}

.filter-complex-item-label {
    position: relative;
}

.filter-complex-item-label::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
    z-index: 1;
    pointer-events: none;
}

.filter-complex-checkbox:checked ~ .filter-complex-item-content::after,
.filter-complex-checkbox:checked + .filter-complex-item-content::after,
.filter-complex-item-label:has(.filter-complex-checkbox:checked)::after {
    background: #667eea;
    border-color: #667eea;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='white' d='M5.5 11L1 6.5l1.5-1.5L5.5 8l6-6L13 3.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.filter-empty-message {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.filter-select-all-btn,
.filter-deselect-all-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select-all-btn:hover,
.filter-deselect-all-btn:hover {
    background: #f5f5f5;
    border-color: #667eea;
    color: #667eea;
}

.filter-price-toggle {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.filter-price-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 18px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-price-label:hover {
    background: #f0f0f0;
}

.filter-price-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
    flex-shrink: 0;
}

.filter-price-text {
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.filter-price-text {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}
    font-weight: 500;
    font-size: 14px;
}

.modal-content .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.modal-content .form-control:focus {
    outline: none;
    border-color: #667eea;
}

.modal-content input[type="file"] {
    padding: 8px 15px;
    cursor: pointer;
}

.modal-content input[type="file"]::-webkit-file-upload-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    font-weight: 500;
}

.modal-content input[type="file"]::-webkit-file-upload-button:hover {
    background: #5568d3;
}

#logoPreview {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

#logoPreviewImg {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-content .form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
    line-height: 1.5;
}

.form-error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding: 20px 30px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.content-placeholder {
    text-align: center;
    padding: 60px 20px;
}

.content-placeholder h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 28px;
}

.content-placeholder p {
    color: #666;
    font-size: 16px;
}

/* Страница 404 */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.error-icon {
    font-size: 80px;
    color: #f39c12;
    margin-bottom: 20px;
}

.error-404 h1 {
    font-size: 120px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
    line-height: 1;
}

.error-404 h2 {
    font-size: 32px;
    color: #333;
    margin: 20px 0 10px;
}

.error-404 p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
}

.error-404 .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
}

/* Phone input wrapper */
.phone-input-wrapper {
    position: relative;
    width: 100%;
}

/* Overlay для маски телефона */
.phone-mask-overlay {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
    font-size: 16px;
    white-space: nowrap;
    z-index: 2;
    user-select: none;
    opacity: 0;
    transition: opacity 0.2s;
    font-family: inherit;
    line-height: 1;
    background: transparent;
}

/* Позиционируем overlay после введенного текста */
.phone-input-wrapper #phone {
    position: relative;
    z-index: 1;
}

/* Показываем маску когда поле не в фокусе */
.phone-input-wrapper:not(:focus-within) .phone-mask-overlay {
    opacity: 1;
}

/* Скрываем маску когда поле в фокусе */
.phone-input-wrapper:focus-within .phone-mask-overlay {
    opacity: 0;
}

/* Скрываем маску когда номер полный */
#phone.full-number ~ .phone-mask-overlay {
    opacity: 0;
}

/* Password input wrapper */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form-input {
    padding-right: 45px;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    padding: 5px;
    z-index: 2;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: #333;
}

.password-toggle-btn:focus {
    outline: none;
    color: #667eea;
}

/* Phone input wrapper для формы пользователя */
.phone-input-wrapper #userPhone {
    position: relative;
    z-index: 1;
}

.phone-input-wrapper #userPhoneMask {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
    font-size: 16px;
    white-space: nowrap;
    z-index: 2;
    user-select: none;
    opacity: 0;
    transition: opacity 0.2s;
    font-family: inherit;
    line-height: 1;
    background: transparent;
}

/* Показываем маску только когда поле пустое и не в фокусе */
.phone-input-wrapper:not(:focus-within) #userPhoneMask {
    opacity: 1;
}

.phone-input-wrapper:focus-within #userPhoneMask {
    opacity: 0;
}

/* Скрываем маску когда поле заполнено */
#userPhone.full-number ~ #userPhoneMask,
.phone-input-wrapper:not(:focus-within) #userPhone:not(:placeholder-shown) ~ #userPhoneMask,
.phone-input-wrapper:not(:focus-within) #userPhone[value]:not([value=""]) ~ #userPhoneMask {
    opacity: 0;
}

/* Loading and Empty Messages */
.loading-message, .empty-message, .error-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
}

.loading-message i {
    margin-right: 10px;
    color: #667eea;
}

.empty-message {
    color: #999;
    font-style: italic;
}

.error-message {
    color: #c33;
}

/* Period Filter Modal Styles */
.period-filter-modal {
    max-width: 600px;
    width: 90%;
}

.period-filter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.period-filter-header .modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.period-filter-header .modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.period-filter-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.period-filter-body {
    padding: 30px 25px;
}

.period-date-range {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.period-date-group {
    flex: 1;
}

.period-date-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.period-date-input-wrapper {
    position: relative;
}

.period-date-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.period-date-input:focus {
    outline: none;
    border-color: #667eea;
}

.period-date-input.date-input-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.period-date-input.date-input-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.date-error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.period-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.period-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.period-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.period-divider span {
    position: relative;
    background: white;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

.period-quick-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.period-quick-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.period-quick-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.period-quick-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.period-filter-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
}

.period-filter-reset,
.period-filter-close,
.period-filter-apply {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.period-filter-reset {
    background: #f0f0f0;
    color: #333;
}

.period-filter-reset:hover {
    background: #e0e0e0;
}

.period-filter-close {
    background: #f0f0f0;
    color: #333;
}

.period-filter-close:hover {
    background: #e0e0e0;
}

.period-filter-apply {
    background: #667eea;
    color: white;
}

.period-filter-apply:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .period-date-range {
        flex-direction: column;
    }
    
    .period-quick-buttons {
        flex-direction: column;
    }
    
    .period-quick-btn {
        width: 100%;
    }
}

/* ========== НАСТРОЙКИ ========== */
.settings-container {
    padding: 20px;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.settings-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-tab:hover {
    color: #667eea;
}

.settings-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.settings-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Таблица пользователей */
.users-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.users-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.users-table tbody tr:hover {
    background: #f8f9fa;
}

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

.loading-row, .empty-row {
    text-align: center;
    padding: 40px !important;
    color: #999;
}

.loading-row i {
    margin-right: 10px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.text-muted {
    color: #999;
}

.small {
    font-size: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    margin-right: 5px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

/* Модальное окно пользователя */
.user-modal {
    max-width: 500px;
}

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

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

.form-input, .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.delete-modal {
    max-width: 400px;
}

.warning-text {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
}

/* Разрешения */
.permissions-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.permission-group-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.permission-group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

.permission-group-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.permission-group-body {
    padding: 20px;
}

.permission-item {
    margin-bottom: 12px;
}

.permission-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permission-group-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.loading-message, .empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading-message i {
    margin-right: 10px;
}

/* Bookings Page Styles */
.bookings-header-section {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 100 !important;
    overflow: visible !important;
    flex-wrap: nowrap;
}

.bookings-period-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.bookings-header-buttons {
    display: flex !important;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1001 !important;
    overflow: visible !important;
    min-width: 150px;
}

.bookings-period-filter-button,
.period-filter-button,
button[data-action="open-period-filter"],
#bookingsPeriodFilterBtn {
    background: #667eea !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: background 0.3s !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 102 !important;
    min-width: 140px !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3) !important;
}

.bookings-period-filter-button:hover,
.period-filter-button:hover {
    background: #5568d3 !important;
}

.bookings-period-filter-button i,
.period-filter-button i {
    display: inline-block !important;
    font-size: 14px !important;
}

.bookings-period-filter-button span,
.period-filter-button span {
    display: inline-block !important;
    white-space: nowrap !important;
}

/* Bookings Table Styles */
.bookings-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: visible;
    margin-top: 30px;
    width: 100%;
}

.bookings-table-title {
    padding: 20px 25px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

.bookings-table-container .table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
}

.bookings-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
}

.bookings-table thead {
    background: #f8f9fa;
}

.bookings-table th {
    padding: 15px 25px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.bookings-table th:first-child {
    font-weight: 700;
    color: #333;
}

.bookings-table td {
    padding: 15px 25px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.bookings-table td:first-child {
    font-weight: 500;
    color: #333;
}

.bookings-table tbody tr:hover {
    background: #f8f9fa;
}

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

.bookings-table .table-empty {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* Отключение переноса текста для колонок: ЖК, $ за кв.м, Сумма */
.bookings-table th:nth-child(2),
.bookings-table td:nth-child(2),
.bookings-table th:nth-child(8),
.bookings-table td:nth-child(8),
.bookings-table th:nth-child(9),
.bookings-table td:nth-child(9) {
    white-space: nowrap;
}

/* Стили для ссылок на сделки в AmoCRM в колонке ФИО */
.booking-contact-link {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px dashed #667eea;
    transition: all 0.2s;
}

.booking-contact-link:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
    text-decoration: none;
}

.booking-contact-link:visited {
    color: #667eea;
}

/* Стили для иконок фильтра в заголовках таблицы */
.bookings-table th {
    position: relative;
}

.bookings-filter-icon {
    margin-left: 8px;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    opacity: 0.6;
}

.bookings-filter-icon:hover {
    color: #667eea;
    opacity: 1;
}

.bookings-filter-icon.active {
    color: #667eea;
    opacity: 1;
}

/* Модальное окно фильтра колонок */
.column-filter-modal {
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.column-filter-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-filter-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
    max-height: 400px;
}

.column-filter-search {
    margin-bottom: 15px;
}

.column-filter-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.column-filter-search-input:focus {
    border-color: #667eea;
}

.column-filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.column-filter-option {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.column-filter-option input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.column-filter-option label {
    cursor: pointer;
    font-size: 14px;
    color: #333;
    flex: 1;
    user-select: none;
}

.column-filter-option:hover {
    background: #f8f9fa;
    margin: 0 -10px;
    padding: 8px 10px;
    border-radius: 4px;
}

.column-filter-footer {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}



/* Conversion Modal Styles */
.conversion-modal {
    max-width: 700px;
}

.conversion-body {
    padding: 30px;
}

.conversion-funnel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.conversion-step {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.conversion-step:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.conversion-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 15px;
}

.conversion-step-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.conversion-step-count {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    min-width: 50px;
    text-align: right;
}

.conversion-step-percent {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
    min-width: 60px;
    text-align: right;
}

.conversion-step-bar {
    height: 8px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.conversion-arrow {
    text-align: center;
    color: #667eea;
    font-size: 20px;
    padding: 5px 0;
}

.conversion-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.conversion-error {
    text-align: center;
    padding: 20px;
    color: #c33;
    background: #fee;
    border-radius: 8px;
}

.conversion-error i {
    margin-right: 8px;
}
