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

body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    margin-bottom: 20px;
    color: #333;
}

.page-header {
    margin-bottom: 32px;
    margin-top: -20px;
    padding: 24px 20px 20px 20px;
    background-color: #fafafa;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 4px 4px 0 0;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.2;
}

.header-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
}

.header-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-radius: 2px;
    box-shadow: 
        0 6px 0 -4px white,
        6px 0 0 -4px white;
}

.page-subtitle {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #555;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #666;
}

.section {
    margin-bottom: 30px;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.collapsible-header h2 {
    margin: 0;
}

.collapsible-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.collapse-toggle {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    min-width: auto;
}

.collapse-toggle:hover {
    background-color: #f5f5f5;
}

.collapsible-body {
    margin-top: 6px;
}

.collapsible-content {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
}

.instruction-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #444;
    line-height: 1.4;
}

.prompt-hint-section {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

.toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    padding: 5px;
}

.toggle-button:hover {
    color: #000;
}

.prompt-hint-content {
    margin-top: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
}

.prompt-hint-content.expanded {
    display: block !important;
}

.copy-button {
    margin: 0;
    padding: 6px 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.copy-button:hover {
    background-color: #45a049;
}

.table-wrapper {
    position: relative;
}

.table-container-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
}

.table-anchor-gutter {
    width: 34px;
    min-width: 34px;
    background-color: #f9f9f9;
    border: none;
    border-radius: 0 0 0 4px;
    position: relative;
    cursor: default;
    user-select: none;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 600px;
    scrollbar-color: #888 #f1f1f1;
    scrollbar-width: auto;
}

.table-anchor-gutter:hover {
    background-color: #f0f0f0;
}

.table-anchor-rows {
    position: relative;
    display: flex;
    flex-direction: column;
}

.table-anchor-row {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    cursor: default;
}

.table-anchor-row:hover .anchor-dot {
    border-color: #007bff;
}

.anchor-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background-color: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.anchor-dot.dragging {
    cursor: grabbing;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.anchor-dot.drag-hidden {
    opacity: 0;
}

.anchor-dot.drag-ghost {
    background-color: #007bff;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.anchor-dot.active {
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.anchor-dot.disabled {
    opacity: 0.5;
    background-color: #ccc;
    border-color: #bbb;
    box-shadow: none;
}

.table-anchor-row.drag-hover {
    background-color: #e7f1ff;
}

.table-container tbody tr.drag-hover td {
    background-color: #e7f1ff !important;
}

.table-anchor-row.range-fill {
    background-color: #c8d9ff;
}

.anchor-control-panel {
    position: absolute;
    left: 38px;
    top: 0;
    display: none;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 25;
    white-space: nowrap;
    flex-direction: column;
}

.anchor-control-panel button {
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
    text-align: center;
}

.anchor-control-panel button:disabled {
    background-color: #e0e0e0;
    color: #888;
    cursor: not-allowed;
}

.table-scroll-top {
    width: 100%;
    height: 17px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background-color: #f9f9f9;
    display: none; /* Скрыт по умолчанию, показывается только когда нужен скролл */
    scrollbar-color: #888 #f1f1f1;
    scrollbar-width: auto;
}

/* Унифицированный стиль скроллбаров */
.table-scroll-top::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.table-anchor-gutter::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.table-scroll-top::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track,
.table-anchor-gutter::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.table-scroll-top::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.table-anchor-gutter::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.table-scroll-top::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover,
.table-anchor-gutter::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.table-scroll-top::-webkit-scrollbar {
    height: 12px;
}

.table-scroll-top::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-scroll-top::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.table-scroll-top::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.table-container {
    flex: 1;
    max-height: 600px;
    overflow: auto;
    scrollbar-color: #888 #f1f1f1;
    scrollbar-width: auto;
    border: 1px solid #ddd;
    border-top: none;
    border-left: none;
    border-radius: 0 0 4px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    table-layout: auto;
}

th, td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 12px;
    min-width: 150px;
    max-width: 400px;
    position: relative; /* для абсолютного позиционирования маркера */
}

.table-font-size-10px th,
.table-font-size-10px td {
    font-size: 10px;
}

.table-font-size-12px th,
.table-font-size-12px td {
    font-size: 12px;
}

.table-font-size-14px th,
.table-font-size-14px td {
    font-size: 14px;
}

.table-font-size-16px th,
.table-font-size-16px td {
    font-size: 16px;
}

.table-font-size-18px th,
.table-font-size-18px td {
    font-size: 18px;
}

th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 10;
    vertical-align: middle;
    text-align: center;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f5f5f5;
}

#columnCheckboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.table-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.table-controls-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.table-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.tokenization-start-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tokenization-start-control label {
    white-space: nowrap;
    font-weight: normal;
    font-size: 14px;
}

.view-mode-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.view-mode-wrapper label {
    white-space: nowrap;
    font-weight: normal;
    font-size: 14px;
}

.download-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-button-data {
    background-color: #007bff;
}

.download-button-data:hover {
    background-color: #0056b3;
}

.download-button-dict {
    background-color: #6c757d;
}

.download-button-dict:hover {
    background-color: #5a6268;
}

.download-button-zip {
    background-color: #7c2430;
}

.download-button-zip:hover {
    background-color: #671d28;
}

.detokenization-controls {
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.json-import-section {
    margin-bottom: 20px;
}

.section-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

.json-import-control-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.json-import-control-top label {
    font-weight: bold;
    white-space: nowrap;
    font-size: 14px;
}

.json-import-control-top input[type="file"] {
    font-size: 13px;
    padding: 6px;
}

.json-file-name {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.detokenization-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

/* Базовые стили responseTextarea переопределены в .textarea-wrapper textarea */

.tokens-list-container {
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
    overflow-y: auto;
    scrollbar-color: #888 #f1f1f1;
    scrollbar-width: auto;
}

.tokens-list-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.token-item {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.token-item.found {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.token-item.not-found {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.token-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.token-value {
    flex: 1;
    min-width: 150px;
    word-break: break-all;
}

.token-count {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    margin: 0 5px;
}

.token-status {
    font-size: 11px;
    white-space: nowrap;
}

.detokenized-result {
    margin-top: 20px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.result-header h3 {
    margin: 0;
}

.result-text {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    min-height: 120px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 14px;
    max-height: none;
}

.result-text.result-text-collapsed {
    max-height: 240px;
    overflow: auto;
}

.result-text.result-text-expanded {
    max-height: none;
}

.token-unresolved {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1px 2px;
    border-radius: 3px;
}

.result-toggle-button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    min-width: auto;
}

.result-toggle-button:hover {
    background-color: #f5f5f5;
}


select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

input[type="file"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.file-controls-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: nowrap;
}

.file-control-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 1;
    min-width: 0;
}

.file-control-item-clear {
    margin-left: auto;
    flex-shrink: 0;
}

.file-control-item label {
    font-weight: bold;
    white-space: nowrap;
    font-size: 13px;
}

.file-control-item input[type="file"],
.file-control-item select {
    white-space: nowrap;
    min-width: 150px;
    height: 38px; /* Единая высота для выравнивания */
    padding: 8px;
    box-sizing: border-box;
}

.file-control-item select {
    min-width: 120px;
}

.file-control-item input[type="file"] {
    padding: 6px 8px;
}

.column-checkbox {
    margin-right: 8px;
    vertical-align: middle;
}

.column-selected {
    background-color: #fff9c4 !important; /* Жёлтый для выбранных */
}

.column-tokenized {
    background-color: #c8e6c9 !important; /* Зелёный для токенизированных */
}

.column-selected.column-tokenized {
    background-color: #c8e6c9 !important; /* Зелёный имеет приоритет */
}

.cell-tooltip {
    position: relative;
    cursor: help;
}

.cell-both-view {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cell-original-value {
    font-weight: normal;
    color: #333;
}

.cell-tokenized-value {
    font-weight: normal;
    color: #666;
    font-size: 0.9em;
}

.tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    display: none;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
}

.cell-tooltip:hover .tooltip {
    display: block;
}

.token-replaced {
    background-color: #d4edda;
    color: #155724;
    padding: 2px 4px;
    border-radius: 3px;
}

.prompt-subsection {
    margin-top: 20px;
}

.prompt-subsection-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.prompt-subsection-header h4 {
    margin: 0;
    flex: 0 0 auto;
}

.prompt-subsection-header h4 {
    margin: 0;
    font-size: 16px;
    color: #555;
}

.prompt-header {
    margin-bottom: 0;
}

.prompt-actions-inline {
    gap: 8px;
}

.prompt-toggle-button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    min-width: auto;
}

.prompt-toggle-button:hover {
    background-color: #f5f5f5;
}

.prompt-section {
    margin-top: 10px;
}

.prompt-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    position: relative;
}

.copy-button-prompt {
    margin: 0;
    padding: 6px 12px;
    font-size: 13px;
}

.prompt-text {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.detokenization-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 400px;
    min-height: 400px;
}

.detokenization-left label {
    display: block;
    margin: 0 0 8px 0;
    font-weight: bold;
    font-size: 15px;
    color: #555;
    height: 20px;
    line-height: 20px;
    flex-shrink: 0;
}

/* Стили #responseTextarea определены в .textarea-wrapper textarea */

.textarea-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
}

.textarea-highlight {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px;
    margin: 0;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #fff;
    color: #333;
    overflow: auto;
    overflow-x: hidden;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 1;
    letter-spacing: normal;
    word-spacing: normal;
    tab-size: 4;
    -moz-tab-size: 4;
}

.textarea-wrapper textarea {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 10px;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: transparent;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    caret-color: #111;
    z-index: 2;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    resize: none;
    overflow: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    letter-spacing: normal;
    word-spacing: normal;
    tab-size: 4;
    -moz-tab-size: 4;
}

.token-highlight-found {
    background-color: #d4edda;
    color: #155724;
}

.token-highlight-notfound {
    background-color: #f8d7da;
    color: #721c24;
}

.detokenization-center {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 400px;
    min-height: 400px;
}

.detokenization-center h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #555;
    height: 20px;
    line-height: 20px;
    flex-shrink: 0;
}

.detokenization-right {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 400px;
    min-height: 400px;
    min-width: 0;
}

.detokenization-right h4 {
    margin: 0;
    font-size: 15px;
    color: #555;
    line-height: 20px;
}

.detokenization-stats {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: auto;
    min-height: 0;
}

.stats-summary {
    margin: 0;
    padding: 0;
    background-color: transparent;
    font-size: 13px;
    color: #666;
}

.stats-summary div {
    margin: 6px 0;
    padding: 4px 0;
}

.json-import-control {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.json-import-control label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
}

.json-import-control input[type="file"] {
    width: 100%;
    font-size: 13px;
    padding: 6px;
}

.tokens-list-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    background-color: #f9f9f9;
    overflow-y: auto;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
}

.tokens-list-container > div {
    /* Содержимое списка токенов */
}

.tokens-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-shrink: 0;
    height: 20px;
    min-height: 20px;
}

.token-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 20px;
}

.token-filter-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.token-filter-checkbox span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #bbb;
    cursor: pointer;
    box-shadow: inset 0 0 0 2px #fff;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    line-height: 1;
    text-align: center;
    padding: 0 4px;
}

.token-filter-found span {
    background-color: #d4edda;
    border-color: #9bc7a2;
}

.token-filter-notfound span {
    background-color: #f8d7da;
    border-color: #e7a9b0;
}

.token-filter-checkbox input:checked + span {
    box-shadow: inset 0 0 0 3px rgba(255,255,255,0.85);
}

.token-filter-checkbox input:not(:checked) + span {
    background-color: #e0e0e0;
    border-color: #c4c4c4;
    color: #777;
    box-shadow: inset 0 0 0 1px #f5f5f5;
    filter: grayscale(0.7);
    opacity: 0.7;
}

.token-filter-checkbox span:hover {
    filter: brightness(0.95);
}

.token-value {
    cursor: help;
}

.token-with-tooltip:hover {
    text-decoration: underline;
}

.token-not-found {
    opacity: 0.7;
}

.copy-button-result {
    margin: 0;
    padding: 6px 12px;
    font-size: 13px;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #ccc;
    border-radius: 50%;
    font-weight: bold;
    color: #555;
    background-color: #fff;
    cursor: help;
    position: relative;
}

.help-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: normal;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 20;
    line-height: 1.4;
}

.help-icon:hover::after {
    opacity: 1;
}

.download-button-bundle {
    background-color: #495057;
}

.download-button-bundle:hover {
    background-color: #343a40;
}

/* Модальное окно */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-dialog {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-dialog h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.modal-dialog p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.modal-dialog .warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
    color: #856404;
}

.modal-dialog .modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-dialog .modal-button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.modal-dialog .modal-button-cancel {
    background-color: #6c757d;
    color: white;
}

.modal-dialog .modal-button-cancel:hover {
    background-color: #5a6268;
}

.modal-dialog .modal-button-confirm {
    background-color: #dc3545;
    color: white;
}

.modal-dialog .modal-button-confirm:hover {
    background-color: #c82333;
}

/* Маркер справа у ячейки */
.cell-marker {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background-color: #666;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    border-radius: 3px;
    z-index: 10;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5), inset 0 0 2px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.4);
}

td:hover .cell-marker {
    opacity: 1;
}

.cell-marker.marker-selected {
    background-color: #d4a017; /* более тёмный жёлтый для лучшего контраста */
    border-color: #b8860b;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6), inset 0 0 2px rgba(255, 255, 255, 0.4), 0 0 3px rgba(212, 160, 23, 0.8);
}

.cell-marker.marker-tokenized {
    background-color: #1e7e34; /* более тёмный зелёный для лучшего контраста */
    border-color: #155724;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6), inset 0 0 2px rgba(255, 255, 255, 0.4), 0 0 3px rgba(30, 126, 52, 0.8);
}

.cell-marker.marker-excluded {
    background-color: #495057; /* более тёмный серый для лучшего контраста */
    border-color: #343a40;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5), inset 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Обводка для точечно изменённых ячеек */
.cell-override {
    border: 2px solid #007bff !important;
    box-shadow: inset 0 0 0 1px rgba(0, 123, 255, 0.3);
}

/* Обводка должна быть видна на всех фонах */
.column-tokenized.cell-override {
    border-color: #0056b3 !important;
    box-shadow: inset 0 0 0 1px rgba(0, 86, 179, 0.4);
}

.column-selected.cell-override {
    border-color: #b8860b !important;
    box-shadow: inset 0 0 0 1px rgba(184, 134, 11, 0.4);
}


