/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Подключение шрифта Gravity */
@font-face {
    font-family: 'Gravity';
    src: local('Gravity'), local('Gravity-Regular');
    font-weight: 400;
    font-style: normal;
}

body {
    font-family: 'Gravity', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #FFFFFF;
}

/* Header с логотипом и аватаром */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px 15px 20px;
    min-height: 60px;
}

/* Логотип компании */
.company-logo {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.company-logo img {
    height: 32px;
    width: auto;
    display: block;
}

.company-logo:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Аватар пользователя */
.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #E4FF00;
    background: #1A1D2E;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(228, 255, 0, 0.3);
}

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

/* Меню пользователя */
.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1A1D2E;
    border: 2px solid rgba(228, 255, 0, 0.5);
    border-radius: 8px;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(228, 255, 0, 0.2);
    z-index: 9999;
}

.user-menu.active {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

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

.user-menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    width: 100%;
    white-space: nowrap;
}

.user-menu-item:hover {
    background: rgba(228, 255, 0, 0.1);
    color: #E4FF00;
}

.container {
    max-width: 1296px;
    margin: 0 auto;
    padding: 18px;
}

.main-content {
    background: #1A1D2E;
    border-radius: 11px;
    box-shadow: none;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Секция загрузки */
.upload-section {
    padding: 54px 36px;
    text-align: center;
    background: #000000;
}

.upload-card {
    background: #E4FF00;
    border-radius: 11px;
    padding: 43px 36px;
    color: #000000;
    box-shadow: none;
    border: none;
}

.upload-area {
    border: 3px dashed rgba(0, 0, 0, 0.3);
    border-radius: 7px;
    padding: 43px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

.upload-area:hover {
    border-color: rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 3.6rem;
    margin-bottom: 22px;
    opacity: 1;
    color: #000000;
}

.upload-area h3 {
    font-size: clamp(18px, 2.25vw, 25px);
    margin-bottom: 16px;
    font-weight: 400;
    color: #000000;
    letter-spacing: 0;
}

.upload-area p {
    font-size: clamp(13px, 1.35vw, 16px);
    margin-bottom: 10px;
    opacity: 0.8;
    color: #000000;
    line-height: 1.6;
}

.file-types {
    font-size: clamp(11px, 1.08vw, 13px);
    opacity: 0.7;
    margin-top: 24px;
    color: #000000;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Секция файлов */
.files-section {
    padding: 43px 36px;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.files-section h2,
.files-section h3 {
    color: #FFFFFF;
    margin-bottom: 0;
    font-weight: 400;
    font-size: clamp(22px, 2.7vw, 29px);
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: clamp(22px, 2.7vw, 29px);
    height: clamp(22px, 2.7vw, 29px);
    color: #E4FF00;
    stroke-width: 1.5;
    flex-shrink: 0;
}

.clear-all-btn {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: none;
    font-size: 14px;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.clear-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(228, 255, 0, 0.3);
    background: #FFFFFF;
    color: #000000;
    border-color: #FFFFFF;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
}

.file-card {
    background: #1A1D2E;
    border-radius: 7px;
    padding: 22px;
    box-shadow: none;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-card:hover {
    transform: translateY(-2px);
    background: #242738;
    border-color: rgba(255, 255, 255, 0.2);
}

.file-card.selected {
    border: 2px solid #E4FF00;
    background: #1A1D2E;
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px rgba(228, 255, 0, 0.1);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.file-card h4 {
    color: #FFFFFF;
    margin-bottom: 0;
    font-weight: 400;
    flex: 1;
    margin-right: 10px;
    font-size: clamp(14px, 1.35vw, 16px);
}

.delete-file-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.8;
    flex-shrink: 0;
    color: #FFFFFF;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-file-btn:hover {
    opacity: 1;
    background: #FFFFFF;
    border-color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.delete-icon {
    width: 20px;
    height: 20px;
    color: inherit;
    stroke-width: 1.5;
}

.delete-file-btn:hover .delete-icon {
    color: #000000;
}

.file-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-size: clamp(11px, 1.08vw, 13px);
}

.file-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 400;
    font-size: clamp(11px, 1.08vw, 13px);
}

.file-status.processing {
    background: rgba(228, 255, 0, 0.15);
    color: #E4FF00;
    border: 1px solid rgba(228, 255, 0, 0.3);
}

.file-status.success {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.file-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.loading {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 48px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    grid-column: 1 / -1;
}

/* Секция результатов */
.results-section {
    padding: 58px 36px 14px 36px;
    background: #000000;
    overflow: visible;
}

.results-section h2,
.results-section h3 {
    color: #FFFFFF;
    margin-bottom: 32px;
    font-weight: 400;
    font-size: clamp(22px, 2.7vw, 29px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 22px;
    margin-bottom: 29px;
}

.summary-card {
    background: #E4FF00;
    color: #000000;
    padding: 29px;
    border-radius: 11px;
    text-align: center;
    box-shadow: none;
    border: none;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-card i {
    font-size: 2.25rem;
    margin-bottom: 14px;
    opacity: 1;
    color: #000000;
}

.summary-card h3 {
    font-size: clamp(11px, 1.08vw, 13px);
    margin-bottom: 12px;
    font-weight: 400;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-card span {
    font-size: clamp(25px, 3.6vw, 32px);
    font-weight: 400;
}

/* Секция обогащения данных */
.enrichment-section {
    padding: 14px 36px 43px 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: #000000;
    gap: 14px;
}

/* Элементы управления обогащением */
.enrichment-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    width: 100%;
}

/* Блок с кнопками управления (экспорт + обогащение) */
.control-buttons-wrapper {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.enrichment-status {
    padding: 16px;
    background: rgba(228, 255, 0, 0.15);
    color: #E4FF00;
    border-radius: 8px;
    border: 1px solid rgba(228, 255, 0, 0.3);
    font-weight: 400;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    flex-basis: 100%;
    margin-top: 16px;
}

.enrichment-status:not(:empty) {
    display: flex;
}

/* Таблица результатов */
.results-table-container {
    background: #1A1D2E;
    border-radius: 0;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: none;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(11px, 1.08vw, 13px);
}

.results-table th {
    background: #E4FF00;
    color: #000000;
    padding: 16px;
    text-align: left;
    font-weight: 400;
    font-size: clamp(11px, 1.08vw, 13px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.results-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: top;
    color: #FFFFFF;
}

.results-table tbody {
    overflow: visible;
}

.results-table tbody tr {
    overflow: visible;
}

.results-table tbody tr:hover {
    background: rgba(228, 255, 0, 0.05);
}

.status-valid {
    color: #4ade80;
    font-weight: 400;
}

.status-invalid {
    color: #ef4444;
    font-weight: 400;
}

.status-info {
    color: #E4FF00;
    font-weight: 400;
}

/* Стили для новых столбцов scoring */
.scoring-total {
    text-align: center;
    font-weight: 400;
    color: #E4FF00;
    background: rgba(228, 255, 0, 0.1);
    padding: 8px;
    border: 1px solid rgba(228, 255, 0, 0.2);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: visible !important;
}

.scoring-total:hover {
    background: rgba(228, 255, 0, 0.2);
    border-color: rgba(228, 255, 0, 0.4);
}

/* Tooltip для источников scoring */
.scoring-tooltip {
    position: fixed !important;
    background: #1A1D2E !important;
    border: 3px solid #E4FF00 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9) !important;
    padding: 16px !important;
    z-index: 999999 !important;
    display: none !important;
    min-width: 250px !important;
    width: max-content;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    pointer-events: none;
    opacity: 1 !important;
    visibility: visible !important;
}

.scoring-tooltip.visible {
    display: block !important;
    animation: slideDown 0.2s ease-out;
    pointer-events: auto;
}

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

.scoring-tooltip-item {
    color: #FFFFFF;
    font-size: clamp(10px, 1vw, 12px);
    line-height: 1.8;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.scoring-tooltip-item:hover {
    background: rgba(228, 255, 0, 0.05);
}

.scoring-tooltip-item:last-child {
    border-bottom: none;
}

.scoring-tooltip-source {
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    margin-right: 4px;
}

.scoring-tooltip-score {
    color: #E4FF00;
    font-weight: 700;
    white-space: nowrap;
}

/* Стилизация scrollbar для tooltip */
.scoring-tooltip::-webkit-scrollbar {
    width: 6px;
}

.scoring-tooltip::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.scoring-tooltip::-webkit-scrollbar-thumb {
    background: rgba(228, 255, 0, 0.3);
    border-radius: 3px;
}

.scoring-tooltip::-webkit-scrollbar-thumb:hover {
    background: rgba(228, 255, 0, 0.5);
}

.scoring-sources {
    max-width: 300px;
    font-size: clamp(10px, 0.9vw, 12px);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scoring-sources:hover {
    white-space: normal;
    overflow: visible;
    cursor: help;
    color: #FFFFFF;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.page-info {
    font-weight: 400;
    color: #FFFFFF;
    font-size: clamp(13px, 1.35vw, 14px);
}

/* Кнопки */
.btn {
    padding: 16px 48px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(228, 255, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: #E4FF00;
    color: #000000;
    border: none;
}

.btn-primary:hover:not(:disabled) {
    background: #FFFFFF;
    color: #000000;
}

.btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
}

.btn-secondary:hover:not(:disabled) {
    background: #FFFFFF;
    color: #000000;
    border-color: #FFFFFF;
}

/* Экспорт */
.export-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 40px;
    overflow: visible;
}

.export-btn-wrapper {
    position: relative;
    display: inline-block;
}

.export-main-btn {
    min-width: 160px;
    padding: 14px 32px;
    justify-content: center;
    gap: 0;
}

.export-menu {
    position: absolute;
    bottom: 0;
    left: 100%;
    margin-left: 16px;
    background: #1A1D2E;
    border: 2px solid rgba(228, 255, 0, 0.5);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(228, 255, 0, 0.2);
    z-index: 9999;
}

.export-menu.active {
    display: flex;
    animation: slideInRight 0.3s ease-out;
}

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

.export-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    width: 100%;
}

.export-menu-item:hover {
    background: rgba(228, 255, 0, 0.1);
    color: #E4FF00;
}

.export-menu-item .menu-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    stroke-width: 1.5;
}

/* Меню обогащения (копия стилей экспорта) */
.enrich-btn-wrapper {
    position: relative;
    display: inline-block;
}

.enrich-main-btn {
    min-width: 160px;
    padding: 14px 32px;
    justify-content: center;
    gap: 0;
}

.enrich-menu {
    position: absolute;
    bottom: 0;
    left: 100%;
    margin-left: 16px;
    background: #1A1D2E;
    border: 2px solid rgba(228, 255, 0, 0.5);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(228, 255, 0, 0.2);
    z-index: 9999;
}

.enrich-menu.active {
    display: flex;
    animation: slideInRight 0.3s ease-out;
}

.enrich-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    width: 100%;
}

.enrich-menu-item:hover {
    background: rgba(228, 255, 0, 0.1);
    color: #E4FF00;
}

.enrich-menu-item .menu-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    stroke-width: 1.5;
}

/* Меню выбора роли (CEO / Учредитель) */
.role-btn-wrapper {
    position: relative;
    display: inline-block;
}

.role-main-btn {
    min-width: 160px;
    padding: 14px 32px;
    justify-content: center;
    gap: 0;
    border: none;
    transition: all 0.3s ease;
}

/* Цвета для разных ролей */
.role-main-btn.role-ceo {
    background: #C8E6C9;
    color: #000000;
}

.role-main-btn.role-ceo:hover:not(:disabled) {
    background: #A5D6A7;
    color: #000000;
}

.role-main-btn.role-founder {
    background: #FFCDD2;
    color: #000000;
}

.role-main-btn.role-founder:hover:not(:disabled) {
    background: #EF9A9A;
    color: #000000;
}

/* Кнопка остановки/продолжения */
.pause-btn-wrapper {
    position: relative;
    display: inline-block;
}

.pause-main-btn {
    min-width: 160px;
    padding: 14px 32px;
    justify-content: center;
    gap: 8px;
    border: none;
    transition: all 0.3s ease;
}

.pause-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-width: 1.5;
}

/* Цвета для кнопки остановки */
.pause-main-btn.pause-stop {
    background: #FFCDD2;
    color: #000000;
}

.pause-main-btn.pause-stop:hover:not(:disabled) {
    background: #EF9A9A;
    color: #000000;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

/* Цвета для кнопки продолжения */
.pause-main-btn.pause-resume {
    background: #C8E6C9;
    color: #000000;
}

.pause-main-btn.pause-resume:hover:not(:disabled) {
    background: #A5D6A7;
    color: #000000;
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

.role-menu {
    position: absolute;
    bottom: 0;
    left: 100%;
    margin-left: 16px;
    background: #1A1D2E;
    border: 2px solid rgba(228, 255, 0, 0.5);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(228, 255, 0, 0.2);
    z-index: 9999;
}

.role-menu.active {
    display: flex;
    animation: slideInRight 0.3s ease-out;
}

.role-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    width: 100%;
}

.role-menu-item:hover {
    background: rgba(228, 255, 0, 0.1);
    color: #E4FF00;
}

.role-menu-item .menu-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    stroke-width: 1.5;
}

/* Сообщения */
.message {
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 400;
    text-align: center;
    font-size: clamp(13px, 1.35vw, 14px);
}

.message.info {
    background: rgba(228, 255, 0, 0.15);
    color: #E4FF00;
    border: 1px solid rgba(228, 255, 0, 0.3);
}

.message.success {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.message.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Компактный счетчик API запросов */
.api-counter-compact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #E4FF00;
    border-radius: 8px;
    color: #000000;
    box-shadow: none;
    margin: 0;
    border: none;
}

.api-counter-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(11px, 1.08vw, 13px);
    font-weight: 400;
}

.api-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #000000;
}

.api-label {
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: clamp(10px, 1vw, 12px);
}

.api-count {
    color: #000000;
    font-weight: 700;
}

.api-separator {
    opacity: 0.6;
}

.api-limit {
    color: #000000;
    opacity: 0.8;
}

.api-progress {
    width: 80px;
    height: 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.api-progress-fill {
    height: 100%;
    background: #000000;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.api-progress-fill.api-warning {
    background: #f59e0b;
}

.api-progress-fill.api-critical {
    background: #dc2626;
}

.api-warning {
    margin: 10px 0 0 0;
    padding: 12px 16px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
    font-size: clamp(11px, 1.08vw, 13px);
    text-align: center;
    color: #fbbf24;
    display: inline-block;
}

.api-warning.api-critical {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Пустые состояния */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.empty-state p {
    margin: 0;
    font-size: clamp(13px, 1.35vw, 14px);
}

.files-section .empty-state {
    background: transparent;
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.results-table .empty-state td {
    padding: 48px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Адаптивность для компактного счетчика */
@media (max-width: 768px) {
    .api-counter-compact {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        min-width: 100%;
        max-width: 100%;
    }
    
    .api-counter-info {
        font-size: 13px;
    }
    
    .api-progress {
        width: 100%;
        height: 8px;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    /* Логотип на мобильных */
    .company-logo {
        margin: 0;
        padding: 10px 0 10px 10px;
        min-height: 50px;
    }
    
    .company-logo img {
        height: 28px;
    }
    
    .container {
        padding: 10px;
    }
    
    .upload-section,
    .files-section,
    .results-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-area h3 {
        font-size: 1.5rem;
    }
    
    .results-summary {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .summary-card span {
        font-size: 1.5rem;
    }
    
    .results-table {
        font-size: 0.8rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 10px;
    }
    
    .scoring-sources {
        max-width: 150px;
        font-size: 0.7rem;
    }
    
    .scoring-total {
        font-size: 0.8rem;
    }
    
    /* Адаптивность tooltip для мобильных */
    .scoring-tooltip {
        min-width: 180px;
        max-width: 250px;
        left: auto;
        right: auto;
        transform: translateX(-25%);
    }
    
    .scoring-tooltip-item {
        font-size: 0.7rem;
        padding: 3px 0;
    }
    
    /* Кнопки управления в мобильной версии */
    .control-buttons-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }
    
    .export-btn-wrapper,
    .enrich-btn-wrapper,
    .role-btn-wrapper,
    .pause-btn-wrapper {
        width: 100%;
    }
    
    .export-main-btn,
    .enrich-main-btn,
    .role-main-btn,
    .pause-main-btn {
        width: 100%;
        max-width: none;
    }
    
    /* Меню выпадают вниз на мобильных */
    .export-menu,
    .enrich-menu,
    .role-menu {
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        bottom: auto;
        margin-left: 0;
        width: 100%;
    }
    
    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 20px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-area h3 {
        font-size: 1.3rem;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
    }
}

/* Стили для столбца WhatsApp */
/* Колонка с типом данных */
.data-type {
    text-align: center;
    font-weight: 400;
    color: #E4FF00;
    font-size: clamp(10px, 1vw, 12px);
    padding: 8px;
}

.whatsapp-cell {
    text-align: center;
    font-size: clamp(11px, 1.08vw, 13px);
}

.whatsapp-link {
    color: #25d366;
    text-decoration: none;
    font-weight: 400;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
}

.whatsapp-link:hover {
    background: #25d366;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-no {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-size: clamp(10px, 1vw, 12px);
}

.whatsapp-error {
    color: #ef4444;
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 400;
}

.whatsapp-loading {
    color: #fbbf24;
    font-size: clamp(10px, 1vw, 12px);
    animation: pulse 1.5s ease-in-out infinite;
}

.whatsapp-pending {
    color: rgba(255, 255, 255, 0.4);
    font-size: clamp(10px, 1vw, 12px);
    font-style: italic;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ========== СТИЛИ WHATSAPP СТАТИСТИКИ ========== */
#whatsappStats.whatsapp-stats-container {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: #E4FF00;
    border-radius: 8px;
    color: #000000;
    box-shadow: none;
    margin: 0;
    border: none;
}

.whatsapp-stats-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.whatsapp-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.whatsapp-title {
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 400;
    color: #000000;
    opacity: 0.8;
    letter-spacing: 0.05em;
}

.whatsapp-stats-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row {
    display: grid;
    grid-template-columns: 85px 60px 60px;
    align-items: center;
    gap: 8px;
}

.stat-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label {
    font-size: clamp(11px, 1.08vw, 13px);
    font-weight: 400;
    color: #000000 !important;
    min-width: 85px;
}

.stat-count {
    font-size: clamp(13px, 1.26vw, 14px);
    font-weight: 700;
    color: #000000 !important;
    min-width: 60px;
}

.stat-max {
    font-size: clamp(11px, 1.08vw, 13px);
    font-weight: 400;
    color: #000000 !important;
    opacity: 0.6;
}

.stat-progress-bar {
    width: 60px;
    height: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.stat-progress-fill {
    height: 100%;
    background: #000000;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stat-remaining {
    display: none;
}

.whatsapp-stats-compact {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.whatsapp-stats-compact .stat-label {
    font-weight: 400;
    color: #25d366;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.whatsapp-stats-compact .stat-value {
    font-weight: 400;
    color: #FFFFFF;
}

.whatsapp-stats-compact .stat-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(37, 211, 102, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.3);
}

.stat-label {
    font-size: clamp(10px, 1vw, 12px);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin-right: 12px;
    min-width: 60px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-item > div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.stat-value {
    font-size: clamp(14px, 1.62vw, 18px);
    font-weight: 400;
    color: #25d366;
    line-height: 1.2;
}

.stat-remaining {
    font-size: clamp(9px, 0.9vw, 11px);
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    line-height: 1;
}

/* Дополнительные стили для состояний WhatsApp */
.whatsapp-not-checked {
    color: rgba(255, 255, 255, 0.4);
    font-size: clamp(10px, 1vw, 12px);
    font-style: italic;
}

.whatsapp-checking {
    color: #fbbf24;
    font-size: clamp(10px, 1vw, 12px);
    animation: pulse 1.5s ease-in-out infinite;
    font-weight: 400;
}

/* ========== СТИЛИ БАЛАНСА USERBOX ========== */
.userbox-balance-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #E4FF00;
    border-radius: 8px;
    color: #000000 !important;
    box-shadow: none;
    margin: 0;
    border: none;
}

.userbox-balance-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(11px, 1.08vw, 13px);
    font-weight: 400;
    color: #000000 !important;
}

.balance-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #000000;
}

.balance-label {
    color: #000000 !important;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: clamp(10px, 1vw, 12px);
}

.balance-amount {
    color: #000000 !important;
    font-weight: 700;
    font-size: clamp(13px, 1.26vw, 14px);
}

/* Адаптивность для WhatsApp статистики */
@media (max-width: 768px) {
    #whatsappStats.whatsapp-stats-container {
        width: 100%;
    }
    
    .whatsapp-stats-header {
        gap: 6px;
    }
    
    .whatsapp-icon {
        width: 14px;
        height: 14px;
    }
    
    .whatsapp-title {
        font-size: 11px;
    }
    
    .stat-row {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-count {
        font-size: 13px;
    }
    
    .stat-max {
        font-size: 11px;
    }
    
    .stat-remaining {
        font-size: 10px;
    }
    
    .userbox-balance-container {
        width: 100%;
    }
}

/* ========== СТИЛИ СТРАНИЦЫ АККАУНТА ========== */
.account-section {
    padding: 64px 40px;
    background: #000000;
    min-height: calc(100vh - 200px);
}

.account-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
}

.account-section h2 {
    color: #FFFFFF;
    margin-bottom: 0;
    font-weight: 400;
    font-size: clamp(22px, 2.7vw, 29px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-back {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #FFFFFF;
    color: #000000;
    border-color: #FFFFFF;
}

.back-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.account-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    max-width: 600px;
    margin: 0 auto;
}

.account-avatar-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.account-avatar-container {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid #E4FF00;
    overflow: hidden;
    cursor: pointer !important;
    background: #1A1D2E;
    transition: all 0.3s ease;
}

.account-avatar-container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(228, 255, 0, 0.4);
}

.account-avatar-container:hover .avatar-overlay {
    opacity: 1;
}

.account-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #E4FF00;
    pointer-events: none;
}

.avatar-overlay i {
    font-size: 32px;
}

.avatar-overlay span {
    font-size: 14px;
    font-weight: 400;
}

.account-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #E4FF00;
    font-size: clamp(13px, 1.35vw, 14px);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    padding: 16px 20px;
    background: #1A1D2E;
    border: 2px solid rgba(228, 255, 0, 0.3);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: clamp(13px, 1.35vw, 14px);
    font-weight: 400;
    transition: all 0.3s ease;
    font-family: 'Gravity', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#saveAccountBtn {
    margin-top: 16px;
    align-self: flex-start;
}

/* Адаптивность для страницы аккаунта */
@media (max-width: 768px) {
    .account-section {
        padding: 32px 20px;
    }
    
    .account-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .btn-back {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .back-icon {
        width: 18px;
        height: 18px;
    }
    
    .account-avatar-container {
        width: 140px;
        height: 140px;
    }
    
    .avatar-overlay i {
        font-size: 24px;
    }
    
    .avatar-overlay span {
        font-size: 12px;
    }
    
    #saveAccountBtn {
        width: 100%;
    }
    
    .header-container {
        padding: 15px 10px 10px 10px;
    }
    
    .user-avatar-btn {
        width: 40px;
        height: 40px;
    }
}

/* ========== СТИЛИ ДЛЯ СТРАНИЦЫ АВТОРИЗАЦИИ ========== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #000000;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.login-card {
    background: #0A0A0A;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(228, 255, 0, 0.1);
}

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

.login-logo img {
    height: 48px;
    width: auto;
}

.login-title {
    font-size: 32px;
    font-weight: 600;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form .form-label {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.login-form .form-control {
    width: 100%;
    padding: 14px 16px;
    background: #1A1D2E;
    border: 2px solid rgba(228, 255, 0, 0.2);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s ease;
    font-family: 'Gravity', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-form .form-control:focus {
    outline: none;
    border-color: #E4FF00;
    box-shadow: 0 0 0 4px rgba(228, 255, 0, 0.1);
}

.login-btn {
    margin-top: 8px;
    width: 100%;
    padding: 16px 24px;
    background: #E4FF00;
    color: #000000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Gravity', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login-btn:hover:not(:disabled) {
    background: #D4EF00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(228, 255, 0, 0.3);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.login-btn.loading .login-btn-icon {
    animation: spin 1s linear infinite;
}

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

.login-btn-icon {
    width: 20px;
    height: 20px;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #EF4444;
    font-size: 14px;
    margin-top: 8px;
}

.login-error .error-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-error .error-text {
    flex: 1;
}

/* Адаптив для страницы авторизации */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .login-logo img {
        height: 36px;
    }
    
    .login-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .login-form {
        gap: 20px;
    }
    
    .login-form .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Loading индикаторы для ячеек таблицы */
.cell-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3B82F6;
    font-size: 14px;
}

.cell-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Специфичные стили для разных типов ячеек */
.phone-loading {
    color: #8B5CF6;
}

.phone-loading .cell-loading-spinner {
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8B5CF6;
}

.whatsapp-loading {
    color: #10B981;
}

.whatsapp-loading .cell-loading-spinner {
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10B981;
}

.telegram-loading {
    color: #3B82F6;
}

.telegram-loading .cell-loading-spinner {
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3B82F6;
}
