/* Styles for the BOM Enricher */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.container {
    display: flex;
    gap: 20px;
    max-width: none;
    margin: 0;
    padding: 0;
}

.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.upload-section {
    border: 2px dashed #444;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    background-color: #2a2a2a;
    border-radius: 8px;
}

.column-select-section {
    display: none;
    background: #2a2a2a;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #444;
}

.column-select-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 20px;
}

.column-select {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
}

.column-select h3 {
    margin-top: 0;
    color: #4CAF50;
    font-size: 20px;
    margin-bottom: 15px;
}

.column-select p {
    color: #e0e0e0;
    margin-bottom: 15px;
}

select {
    width: 100%;
    padding: 10px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
}

select option {
    background: #333;
    color: #fff;
    padding: 8px;
}

.process-btn {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.process-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

.progress-section {
    display: none;
    margin: 20px 0;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress {
    width: 0%;
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    color: #e0e0e0;
    font-size: 14px;
}

.processed-rows {
    color: #40E0D0;
    font-weight: bold;
}

.updates {
    margin: 20px 0;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.updates table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.updates th,
.updates td {
    padding: 12px;
    border-bottom: 1px solid #444;
    width: 33.33%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.updates th {
    background: #333;
    text-align: left;
    color: #40E0D0;
    font-size: 14px;
    border-bottom: 2px solid #444;
}

.updates td {
    font-size: 14px;
    line-height: 1.4;
}

.updates td a {
    color: #4a9eff;
    text-decoration: none;
    word-break: break-all;
}

.updates tr:hover {
    background: #333;
}

.download-btn {
    display: none;
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px 0;
    text-align: center;
}

.download-btn:hover {
    background: #45a049;
}

#status {
    margin-top: 10px;
    font-weight: bold;
}

.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    background: #ff4444;
    color: white;
    border-radius: 4px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

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

/* Заголовок */
.header {
    text-align: left;
    margin: 0 0 30px 0;
    padding: 20px;
    background: #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.header h1 {
    font-size: 28px;
    color: #40E0D0;
    margin: 0 0 15px 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #40E0D0;
    background: rgba(64, 224, 208, 0.1);
}

/* Боковая панель */
.side-panel {
    width: 500px;
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    height: calc(90vh - 40px);
    position: sticky;
    top: 20px;
    overflow-y: auto;
}

.side-panel h3 {
    color: #40E0D0;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.processed-files {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.processed-file {
    background: #333;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    width: 100%;
}

.processed-file:hover {
    transform: translateY(-2px);
    background-color: #404040;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.file-name {
    font-size: 14px;
    color: #40E0D0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    white-space: normal;
}

.file-details {
    font-size: 12px;
    color: #888;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    white-space: normal;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.updates {
    margin: 20px 0;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.updates table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.updates th,
.updates td {
    padding: 12px;
    border-bottom: 1px solid #444;
}

.updates th {
    background: #333;
    text-align: left;
    color: #40E0D0;
    font-size: 14px;
    border-bottom: 2px solid #444;
}

.updates td {
    font-size: 14px;
    line-height: 1.4;
}

.updates tr:hover {
    background: #333;
}

/* Docs styles */
.docs-content {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
}

.docs-content h2 {
    color: #40E0D0;
    font-size: 28px;
    margin: 30px 0 20px;
}

.docs-content h3 {
    color: #4a9cb0;
    font-size: 20px;
    margin: 25px 0 15px;
}

.docs-content p, .docs-content li {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 15px;
}

.docs-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.docs-content pre {
    background: #333;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

.docs-content code {
    color: #4a9eff;
    font-family: 'Courier New', monospace;
}

.docs-content li {
    margin: 8px 0;
}

.docs-content li ul {
    margin: 8px 0;
}

.docs-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    padding: 20px;
    color: white;
}

.side-nav {
    position: sticky;
    top: 20px;
}

.nav-group {
    margin-bottom: 30px;
}

.nav-group h3 {
    color: #ecf0f1;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #34495e;
}

.side-nav a {
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    padding: 8px 15px;
    margin: 5px 0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.side-nav a:hover {
    background: #34495e;
    color: white;
}

.side-nav a.active {
    background: #3498db;
    color: white;
}

.main-wrapper {
    flex: 1;
    padding: 20px;
    background: #fff;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    color: #e0e0e0;
    line-height: 1.6;
}

.content h2 {
    color: #40E0D0;
    font-size: 28px;
    margin: 40px 0 20px;
}

.content h3 {
    color: #4CAF50;
    font-size: 20px;
    margin: 25px 0 15px;
}

.content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.content ul, .content ol {
    margin: 15px 0;
    padding-left: 20px;
}

.content li {
    margin: 8px 0;
}

.content a {
    color: #4a9eff;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.custom-file-upload {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(145deg, #2a2a2a, #333);
    color: #40E0D0;
    border: 2px solid #40E0D0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 10px 0;
}

.custom-file-upload:hover {
    background: linear-gradient(145deg, #333, #2a2a2a);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#fileInput {
    display: none;
}