:root {
    --primary-color: #2B386C;
    --primary-hover: #1E2A4D;
    --success-color: #3B4A7C;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --corrected-color: #16a34a;
    --already-avz-color: #2563eb;
    --bg-primary: #ffffff;
    --bg-secondary: #f0f2f7;
    --bg-tertiary: #e0e4ed;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #cbd5e1;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --comments-rail-width: 74px;
    --comments-rail-handle-width: 34px;
    --comments-rail-toggle-height: 132px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #3B4A7C 0%, #2B386C 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
}

.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    background: var(--bg-primary);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

header {
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary-color), #3B4A7C);
    color: white;
    padding: 8px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

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

.parser-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 8px;
}

.parser-selector label {
    font-size: 14px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.parser-selector select {
    padding: 6px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.parser-selector select:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: white;
}

.parser-selector select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

header h1 img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #2B386C;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

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

.tabs-container {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 0;
}

.tabs {
    display: flex;
    gap: 4px;
    padding: 4px 11.2px 0; /* Minimal padding */
    overflow-x: auto;
}

.tab {
    padding: 4px 16.8px; /* Minimal vertical padding */
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.5);
}

.tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    font-weight: 600;
}

.tab.processing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    cursor: not-allowed;
    opacity: 0.8;
}

.tab.processing:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: none;
}

.tab .close-tab {
    margin-left: 8px;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.tab .close-tab:hover {
    background: rgba(0, 0, 0, 0.1);
}

.content {
    padding: 0px 32px;
    flex: 1;
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--text-secondary);
    text-align: center;
}

.welcome-screen i {
    margin-bottom: 24px;
    opacity: 0.5;
}

.welcome-screen h2 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-panel {
    display: none;
}

.project-panel.active {
    display: block;
}

.processing-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.processing-content {
    text-align: center;
    color: var(--text-secondary);
}

.processing-content i {
    color: var(--warning-color);
    margin-bottom: 16px;
}

.processing-content h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.processing-content p {
    font-size: 14px;
    line-height: 1.5;
}

.error-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px dashed var(--danger-color);
}

.error-content {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    padding: 20px;
}

.error-content i {
    color: var(--danger-color);
    margin-bottom: 16px;
}

.error-content h3 {
    margin-bottom: 16px;
    color: var(--danger-color);
}

.error-content p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.tab.error {
    border-left: 3px solid var(--danger-color);
}

.tab.error:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Wrapper for panel-controls and table-controls */
.controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 12px 0;
    gap: 12px;
}

.panel-controls {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    flex: 0 0 auto;
    order: 2;
}

.table-controls {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    align-items: center;
    flex: 1 1 auto;
    order: 1;
}

.table-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.search-box {
    flex: 1;
    min-width: 640px;
    max-width: 640px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--border-color);
    border-radius: 0;
}

#content > div.project-panel.active > div.table-wrapper {
    width: calc(100% + 64px);
    max-width: calc(100% + 64px);
    margin-left: -32px;
    margin-right: -32px;
    box-sizing: border-box;
}

/* Make table-wrapper scrollable - 75% of viewport height */
.table-wrapper {
    height: 75vh;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    isolation: isolate;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

thead {
    background: var(--bg-secondary);
}

thead tr {
    background: var(--bg-secondary);
}

#content > div.project-panel.active > div.table-wrapper > table > thead {
    background: var(--bg-secondary);
}

#content > div.project-panel.active > div.table-wrapper > table > thead > tr {
    background: var(--bg-secondary);
}

#content > div.project-panel.active > div.table-wrapper > table > thead > tr > th {
    background: var(--bg-secondary);
}

/* Tables with specific IDs */
table[id^="table-"] > thead {
    background: var(--bg-secondary);
}

table[id^="table-"] > thead > tr {
    background: var(--bg-secondary);
}

table[id^="table-"] > thead > tr > th {
    background: var(--bg-secondary);
}

/* Table header styling - sticky within table-wrapper */
.table-wrapper table > thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-secondary);
}

.table-wrapper table > thead > tr {
    background: var(--bg-secondary);
}

.table-wrapper table > thead > tr > th {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 11;
}

th {
    padding: 7px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    position: relative;
    background: var(--bg-secondary);
}

.table-wrapper table > thead > tr > th.row-number,
.table-wrapper table > thead > tr > th.comments-tail,
table[id^="table-"] > thead > tr > th.row-number,
table[id^="table-"] > thead > tr > th.comments-tail,
th.row-number,
th.comments-tail {
    text-align: center;
    cursor: default;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 7px 2px;
    border-bottom: 1px solid var(--border-color);
}

th.row-number {
    width: 30px;
    font-size: 12px;
    min-width: 30px;
    max-width: 30px;
}

th.resizable {
    position: relative;
    min-width: 100px;
    max-width: 400px;
}

th.sortable {
    padding-right: 30px;
}

th.resizable span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    cursor: col-resize;
    z-index: 10;
}

.resize-handle:hover {
    background: var(--primary-color);
    opacity: 0.5;
}

th:hover {
    background: var(--bg-tertiary);
}

th.sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    opacity: 0.3;
    transition: all 0.2s;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

th.sortable:hover::after {
    opacity: 0.6;
}

th.sort-asc::after {
    content: '\f0de';
    opacity: 1;
    color: var(--primary-color);
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

th.sort-desc::after {
    content: '\f0dd';
    opacity: 1;
    color: var(--primary-color);
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--border-color);
}

th.comments-tail,
td.comments-tail {
    width: var(--comments-rail-handle-width);
    min-width: var(--comments-rail-handle-width);
    max-width: var(--comments-rail-handle-width);
    padding: 0;
    text-align: right;
    position: relative;
    overflow: visible;
    background: transparent;
}

th.row-number:hover {
    background: var(--bg-tertiary);
}

th.comments-tail:hover {
    background: transparent;
}

th.comments-tail {
    border-bottom-color: transparent;
    background: transparent !important;
}

th.comments-tail::after {
    content: none;
}

.comments-rail {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-left: 1px solid rgba(43, 56, 108, 0.12);
    border-right: 1px solid rgba(43, 56, 108, 0.08);
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    transition: width 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
    z-index: 8;
    pointer-events: none;
}

.comments-rail > * {
    pointer-events: auto;
}

.comments-rail-floating {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: var(--comments-rail-handle-width);
    height: var(--comments-rail-toggle-height);
    display: flex;
    justify-content: flex-start;
    pointer-events: none;
    z-index: 10;
    transition: width 0.22s ease;
}

.comments-rail-floating::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 0;
    bottom: 10px;
    left: var(--comments-rail-handle-width);
    border-left: 1px solid rgba(43, 56, 108, 0.16);
    border-right: 1px solid rgba(43, 56, 108, 0.08);
    border-radius: 0 14px 14px 0;
    background: linear-gradient(180deg, rgba(43, 56, 108, 0.16), rgba(59, 74, 124, 0.08));
    box-shadow: none;
    opacity: 0;
    transition: opacity 0.22s ease, background 0.22s ease;
}

.comments-rail-floating > * {
    pointer-events: auto;
}

.comments-rail-toggle {
    width: var(--comments-rail-handle-width);
    height: var(--comments-rail-toggle-height);
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 5px;
    border-radius: 12px 0 0 12px;
    box-shadow: none;
    transition: filter 0.22s ease;
}

.comments-rail-toggle:hover {
    filter: brightness(1.03);
}

.comments-rail-toggle-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.comments-rail-toggle i {
    font-size: 11px;
}

.comments-rail--body {
    justify-content: center;
    padding: 0 6px;
}

.table-wrapper.comments-column-expanded .comments-rail-toggle {
    background: var(--primary-color);
}

.table-wrapper.comments-column-expanded .comments-rail-floating {
    width: var(--comments-rail-width);
}

.table-wrapper.comments-column-expanded .comments-rail {
    width: calc(var(--comments-rail-width) - var(--comments-rail-handle-width));
    border-left-color: rgba(43, 56, 108, 0.14);
    border-right-color: rgba(43, 56, 108, 0.08);
    background: linear-gradient(180deg, rgba(43, 56, 108, 0.16), rgba(59, 74, 124, 0.08));
    box-shadow: none;
}

.table-wrapper.comments-column-collapsed .comments-rail {
    width: 0;
    box-shadow: none;
    border-left-color: transparent;
    border-right-color: transparent;
    background: transparent;
}

.comments-rail--body .comment-btn {
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.table-wrapper.comments-column-collapsed .comments-rail--body .comment-btn {
    opacity: 0;
    transform: translateX(16px);
    pointer-events: none;
}

td.row-number {
    width: 30px;
    text-align: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 7px 2px;
    min-width: 30px;
    max-width: 30px;
    position: relative;
}

/* Row insertion hover area - hidden by default */
.row-insertion-area {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s;
    opacity: 0;
    pointer-events: none;
}

/* Show insertion areas only in edit mode */
.edit-mode .row-insertion-area {
    opacity: 1;
    pointer-events: auto;
}

.row-insertion-area:hover {
    background: var(--primary-color);
}

.row-insertion-area:hover .insert-row-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.insert-row-btn {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.insert-row-btn:hover {
    background: var(--primary-hover);
    transform: translate(-50%, -30%) scale(1.1);
}

/* Delete row button - positioned on border between column 0 and 1 */
.delete-row-btn {
    position: absolute;
    top: 50%;
    right: -7px; /* Center it on the vertical line (same as line position) */
    transform: translateY(-50%) scale(0.8);
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Show delete buttons only in edit mode */
.edit-mode .delete-row-btn {
    opacity: 1;
}

.delete-row-btn:hover {
    background: #dc2626;
    transform: translateY(-50%) scale(1.1);
}

/* Row deletion hover area - vertical line on column border */
.row-deletion-area {
    position: absolute;
    top: 0;
    right: -2px; /* Position it on the right edge of the row number column */
    width: 4px;
    height: 100%;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s;
    opacity: 0;
    pointer-events: none;
}

/* Show deletion areas only in edit mode */
.edit-mode .row-deletion-area {
    opacity: 1;
    pointer-events: auto;
}

.row-deletion-area:hover {
    background: var(--danger-color);
}

.row-deletion-area:hover .delete-row-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Show delete button on row hover in edit mode */
.edit-mode tr:hover .delete-row-btn {
    opacity: 1;
}

tr:hover {
    background: var(--bg-secondary);
}

tr:hover td.row-number {
    background: var(--bg-tertiary);
}

tr:hover td.comments-tail {
    background: transparent;
}

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

td input {
    width: 100%;
    padding: 3px 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

td input:disabled {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.comment-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.comment-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.comment-btn.has-comments {
    border-color: rgba(25, 118, 210, 0.35);
    color: var(--primary-color);
    background: rgba(25, 118, 210, 0.08);
}

.comment-btn:disabled {
    cursor: not-allowed;
    color: #9aa4b2;
    background: #f7f8fa;
    border-color: #e4e7eb;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
    color: white;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

.modal-content.modal-large {
    max-width: 1200px;
}

.comments-modal-content {
    max-width: 920px;
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.modal-body {
    padding: 24px;
}

.comments-modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.comments-context {
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.comments-context h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.comments-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 16px;
}

.comments-context-label {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.comments-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.comments-toolbar-title {
    font-size: 16px;
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
    background: white;
}

.comment-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comment-item-meta {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.comment-item-body {
    white-space: pre-wrap;
    line-height: 1.5;
    color: var(--text-primary);
}

.comment-item-actions {
    display: inline-flex;
    gap: 8px;
}

.comment-item-actions .btn {
    padding: 8px 12px;
}

.comment-empty {
    padding: 22px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
    color: var(--text-secondary);
    background: #fafbfc;
}

.comment-editor {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    background: #fffdf7;
}

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

.comment-editor-header h3 {
    font-size: 16px;
}

.comment-editor textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
}

.comment-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.lock-icon {
    font-size: 14px;
}

/* Upload Overlay */
.upload-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upload-overlay.active {
    display: flex;
}

.upload-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color), #3B4A7C);
    color: white;
}

.upload-header h3 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.upload-header .close-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.upload-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.upload-body {
    padding: 24px;
}

.upload-file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.upload-file-info i {
    color: var(--danger-color);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    word-break: break-word;
}

.file-size {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #3B4A7C);
    border-radius: 12px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-primary);
}

.upload-status i {
    font-size: 16px;
}

#cancelUploadButton {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    header,
    .tabs-container,
    .panel-controls,
    .table-controls,
    .comments-rail-floating,
    th.comments-tail,
    td.comments-tail {
        display: none !important;
    }

    .table-wrapper {
        border: none;
    }

    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

@media (max-width: 768px) {
    :root {
        --comments-rail-width: 68px;
        --comments-rail-handle-width: 32px;
        --comments-rail-toggle-height: 120px;
    }

    .comments-rail-toggle-label {
        font-size: 10px;
    }

    .comments-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-item-header {
        flex-direction: column;
    }

    .comment-editor-actions {
        flex-direction: column-reverse;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

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

/* Highlight Модель АВЗ column */
th.avz-model-column {
    background: linear-gradient(135deg, rgba(43, 56, 108, 0.15), rgba(59, 74, 124, 0.2)) !important;
    font-weight: 700;
}

th.avz-model-column:hover {
    background: linear-gradient(135deg, rgba(43, 56, 108, 0.2), rgba(59, 74, 124, 0.25)) !important;
}

td.avz-model-column {
    background: linear-gradient(135deg, rgba(43, 56, 108, 0.08), rgba(59, 74, 124, 0.12)) !important;
    font-weight: 600;
}

td.avz-model-column input {
    background: transparent !important;
}

tr:hover td.avz-model-column {
    background: linear-gradient(135deg, rgba(43, 56, 108, 0.15), rgba(59, 74, 124, 0.22)) !important;
}

td.avz-model-column.ahu-placeholder {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.28), rgba(253, 224, 71, 0.34)) !important;
}

tr:hover td.avz-model-column.ahu-placeholder {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.34), rgba(253, 224, 71, 0.40)) !important;
}

td.avz-model-column.already-avz-highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.20)) !important;
}

tr:hover td.avz-model-column.already-avz-highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.26)) !important;
}

/* Warning state for Модель АВЗ cell */
td.avz-model-column.warning {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(244, 114, 182, 0.10)) !important;
}

tr:hover td.avz-model-column.warning {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(244, 114, 182, 0.15)) !important;
}

td.avz-model-column.corrected {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(74, 222, 128, 0.16)) !important;
}

tr:hover td.avz-model-column.corrected {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.18), rgba(74, 222, 128, 0.22)) !important;
}

/* History Panel */
.history-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 400px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.history-panel.active {
    display: flex;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-color), #3B4A7C);
    color: white;
    border-bottom: 1px solid var(--border-color);
}

.history-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-header .close-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.history-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.history-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.history-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.history-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.history-item:hover {
    background: var(--bg-secondary);
}

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

.history-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.history-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.history-item-icon.upload {
    color: var(--primary-color);
}

.history-item-icon.processed {
    color: var(--success-color);
}

.history-item-icon.error {
    color: var(--danger-color);
}

.history-item-icon.rename {
    color: var(--warning-color);
}

.history-item-icon.delete {
    color: var(--danger-color);
}

.history-item-icon.cell_edit {
    color: var(--warning-color);
}

.history-item-icon.row_add {
    color: var(--success-color);
}

.history-item-icon.row_delete {
    color: var(--danger-color);
}

.history-item-icon.comment_create {
    color: var(--primary-color);
}

.history-item-icon.comment_edit {
    color: #0284c7;
}

.history-item-icon.comment_delete {
    color: var(--danger-color);
}

.history-item-type {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.history-item-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-item-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
    white-space: pre-line;
}

.history-item-project {
    font-size: 12px;
    color: var(--primary-color);
    margin-top: 4px;
    font-weight: 500;
}

.history-item-parser {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

.history-item-error {
    font-size: 12px;
    color: var(--danger-color);
    margin-top: 4px;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--danger-color);
}

.history-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.history-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Diff View Styles */
.diff-comparison {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 4px;
    background: white;
}

.diff-side {
    flex: 1;
    padding: 8px;
    overflow-x: auto;
}

.diff-expected-side {
    background-color: rgba(239, 68, 68, 0.05); /* Light red tint for deletions/expected */
    border-right: 1px solid var(--border-color);
}

.diff-actual-side {
    background-color: rgba(34, 197, 94, 0.05); /* Light green tint for additions/actual */
}

.diff-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.diff-value {
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}

.diff-field {
    margin-bottom: 12px;
}

.full-item-comparison {
    display: flex;
    gap: 0;
    margin-top: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.full-item-side {
    flex: 1;
    padding: 10px;
    overflow-x: auto;
}

.full-item-expected {
    background-color: rgba(239, 68, 68, 0.05);
    border-right: 1px solid var(--border-color);
}

.full-item-actual {
    background-color: rgba(34, 197, 94, 0.05);
}

/* Admin page */
.admin-content {
    padding-top: 20px;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.admin-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-card-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.admin-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.admin-card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.admin-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.admin-create-user-panel {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    margin-bottom: 16px;
}

.admin-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 16px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.admin-form-inline {
    min-width: auto;
}

.admin-form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.admin-form-group input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.admin-table-wrap {
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-height: 0;
    max-height: 60vh;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

.admin-table th, .admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

.admin-table th {
    background: var(--bg-secondary);
    font-weight: 700;
    color: var(--text-primary);
    cursor: default;
    position: sticky;
    top: 0;
    z-index: 2;
}

.admin-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.admin-actions .btn i {
    min-width: 14px;
    text-align: center;
    display: inline-block;
}

.admin-actions .btn .service-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.admin-placeholder {
    color: var(--text-secondary);
    padding: 12px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.admin-comments-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.admin-comments-header p {
    margin: 6px 0 0;
    color: var(--text-secondary);
    line-height: 1.45;
}

.admin-comments-state {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    padding: 16px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.admin-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-comment-card {
    padding: 16px 18px;
    border: 1px solid rgba(43, 56, 108, 0.10);
    border-radius: 14px;
    background: #fafbfc;
}

.admin-comment-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.admin-comment-card h3 {
    margin: 0 0 5px;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.35;
}

.admin-comment-meta,
.admin-comment-time,
.admin-comment-footer {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.admin-comment-time {
    white-space: nowrap;
}

.admin-comment-body {
    white-space: pre-wrap;
    color: var(--text-primary);
    line-height: 1.55;
    margin: 12px 0;
}

.admin-comment-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(43, 56, 108, 0.08);
}

.admin-comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.admin-comment-actions .btn,
.admin-comment-editor-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
}

.admin-comment-editor {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(43, 56, 108, 0.12);
    border-radius: 12px;
    background: white;
}

.admin-comment-editor-title {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
}

.admin-comment-editor textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
}

.admin-comment-editor textarea:focus {
    outline: none;
    border-color: rgba(43, 56, 108, 0.28);
    box-shadow: 0 0 0 4px rgba(43, 56, 108, 0.06);
}

.admin-comment-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.admin-comments-empty {
    padding: 28px 18px;
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.admin-comments-empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pill-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.pill-bad {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.pill-user {
    background: rgba(59, 74, 124, 0.10);
    color: var(--primary-color);
}

.pill-admin {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.pill-root {
    background: rgba(17, 24, 39, 0.10);
    color: #111827;
}

.impersonation-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: white;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
    .admin-comments-header,
    .admin-comment-card-header,
    .admin-comment-footer {
        flex-direction: column;
    }

    .admin-comment-time {
        white-space: normal;
    }

    .admin-comment-editor-actions {
        flex-direction: column-reverse;
    }
}

.welcome-guide-link {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(43, 56, 108, 0.08);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.welcome-guide-link:hover {
    background: rgba(43, 56, 108, 0.14);
    transform: translateY(-1px);
}

.guide-page {
    --guide-sidebar-width: 300px;
    --guide-sidebar-offset: 84px;
    --guide-sidebar-gap: 28px;
    overflow: auto;
    padding: 24px 32px 40px calc(var(--guide-sidebar-width) + var(--guide-sidebar-gap) + 20px);
    background: linear-gradient(180deg, #f7f9fc 0%, #edf2f8 100%);
}

.guide-page-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding: 26px 28px;
    border-radius: 24px;
    background: white;
    border: 1px solid rgba(43, 56, 108, 0.10);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.guide-page-head-copy {
    min-width: 0;
}

.guide-page-label {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(43, 56, 108, 0.08);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.guide-page-head h2 {
    margin-top: 14px;
    margin-bottom: 10px;
    font-size: 34px;
    line-height: 1.1;
}

.guide-page-head p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    max-width: 860px;
}

.guide-page-updated {
    min-width: 220px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guide-page-updated span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.guide-page-updated strong {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.4;
}

.guide-page-layout {
    margin-top: 24px;
    display: block;
}

.guide-page-sidebar {
    position: fixed;
    left: 0;
    top: var(--guide-sidebar-offset);
    bottom: 0;
    width: var(--guide-sidebar-width);
    padding: 0 18px 24px 0;
    z-index: 25;
    overflow-y: auto;
}

.guide-page-sidebar-card {
    height: auto;
    padding: 18px;
    border-radius: 0 20px 20px 0;
    background: white;
    border: 1px solid rgba(43, 56, 108, 0.10);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    overflow: auto;
}

.guide-page-sidebar-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 18px;
}

.guide-page-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.guide-page-search:focus-within {
    border-color: rgba(43, 56, 108, 0.18);
    background: white;
    box-shadow: 0 0 0 4px rgba(43, 56, 108, 0.06);
}

.guide-page-search i {
    color: var(--text-secondary);
}

.guide-page-search input {
    width: 100%;
    padding: 14px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
}

.guide-page-search input:focus {
    outline: none;
}

.guide-page-search-hint {
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.guide-page-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-page-nav-item {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.45;
}

.guide-page-nav-item:hover {
    background: rgba(43, 56, 108, 0.06);
    color: var(--text-primary);
}

.guide-page-nav-item.active {
    background: rgba(43, 56, 108, 0.10);
    border-color: rgba(43, 56, 108, 0.12);
    color: var(--primary-color);
    font-weight: 700;
}

.guide-page-main {
    min-width: 0;
    max-width: 1320px;
}

.guide-state {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 16px;
    background: white;
    border: 1px solid rgba(43, 56, 108, 0.10);
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.guide-page-article {
    padding: 28px 30px;
    border-radius: 24px;
    background: white;
    border: 1px solid rgba(43, 56, 108, 0.10);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.guide-page-intro {
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 1px solid rgba(43, 56, 108, 0.10);
}

.guide-page-section + .guide-page-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(43, 56, 108, 0.08);
}

.guide-page-section h3 {
    margin-bottom: 14px;
    font-size: 26px;
    line-height: 1.2;
    color: var(--primary-color);
}

.guide-prose {
    color: var(--text-primary);
    line-height: 1.72;
}

.guide-prose h3,
.guide-prose h4 {
    margin-top: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
}

.guide-prose h3:first-child,
.guide-prose h4:first-child {
    margin-top: 0;
}

.guide-prose p + p,
.guide-prose ul + p,
.guide-prose ol + p,
.guide-prose p + ul,
.guide-prose p + ol,
.guide-prose ul + ul,
.guide-prose ol + ol {
    margin-top: 12px;
}

.guide-prose ul,
.guide-prose ol {
    padding-left: 22px;
}

.guide-prose li + li {
    margin-top: 6px;
}

.guide-prose code {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(43, 56, 108, 0.08);
    color: var(--primary-color);
    font-size: 0.95em;
}

.guide-prose strong {
    color: #172554;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1200px) {
    .guide-page {
        padding-left: 32px;
    }

    .guide-page-sidebar {
        position: static;
        width: auto;
        padding: 0;
        margin-bottom: 18px;
    }

    .guide-page-sidebar-card {
        height: auto;
        border-radius: 20px;
        max-height: none;
    }
}

@media (max-width: 900px) {
    .guide-page {
        padding: 18px 16px 28px;
    }

    .guide-page-head {
        flex-direction: column;
    }

    .guide-page-updated {
        width: 100%;
        min-width: 0;
    }

    .guide-page-article {
        padding: 22px 18px;
    }

    .guide-page-section h3 {
        font-size: 22px;
    }
}
