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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.6;
}

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

/* Стили для связок */
.pipeline-container {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid #2a2a2a;
}

.pipeline-container h1 {
    margin-bottom: 30px;
    color: #f5f5f5;
    font-size: 28px;
    font-weight: 600;
}

/* Вкладки */
.tabs {
    display: flex;
    border-bottom: 2px solid #2a2a2a;
    margin-bottom: 20px;
    gap: 4px;
}

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

.tab-button i {
    font-size: 16px;
}

.tab-button:hover {
    color: #e0e0e0;
    background-color: #2a2a2a;
    border-radius: 6px 6px 0 0;
}

.tab-button.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

.tab-button.active:hover {
    background-color: transparent;
}

.tab-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #666;
    pointer-events: none;
}

.tab-button.disabled:hover {
    background-color: transparent;
    color: #666;
}

.tab-button.disabled i {
    opacity: 0.5;
}

/* Содержимое вкладок */
.tab-content {
    display: none;
    padding: 20px 0;
}

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

/* Форма */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #1f1f1f;
}

.form-control::placeholder {
    color: #666;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0a0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    background-color: #3a3a3a;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Результат */
#result {
    background-color: #1a1a1a;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
}

/* Группа ввода с кнопкой */
.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

.input-group .btn {
    white-space: nowrap;
}

/* Кнопки */
.btn-secondary {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #4a4a4a;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-success:disabled {
    background-color: #3a3a3a;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Таблица проектов */
.projects-table {
    background-color: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #3a3a3a;
    width: 100%;
    border-collapse: collapse;
}

.projects-table thead {
    background-color: #2a2a2a;
}

.projects-table th {
    padding: 12px;
    text-align: left;
    color: #e0e0e0;
    font-weight: 600;
    border-bottom: 2px solid #3a3a3a;
}

.projects-table th:first-child {
    width: 50px;
    text-align: center;
}

.projects-table tbody tr {
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.projects-table tbody tr:hover {
    background-color: #2a2a2a;
}

.projects-table tbody tr.selected {
    background-color: rgba(59, 130, 246, 0.2);
}

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

.projects-table td {
    padding: 12px;
    color: #e0e0e0;
}

.projects-table td:first-child {
    width: 50px;
    text-align: center;
}

.projects-table input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Стили для ссылок на папки в таблице проектов */
.projects-table .folder-link {
    color: #60a5fa;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.projects-table .folder-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.projects-table .folder-link i {
    font-size: 0.9em;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
    background-color: #3a3a3a;
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-info {
    background-color: #06b6d4;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background-color: #0891b2;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
    transform: translateY(-1px);
}

/* Статус сообщения */
.status-message {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;
}

.status-message.success {
    color: #10b981;
}

.status-message.error {
    color: #ef4444;
}

.status-message.info {
    color: #3b82f6;
}

/* Модальное окно */
.modal {
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1a1a1a;
    border: 1px solid #3a3a3a;
    color: #e0e0e0;
}

.close {
    color: #a0a0a0;
}

.close:hover {
    color: #e0e0e0;
}

/* Alert */
.alert {
    border: 1px solid;
    border-radius: 6px;
    padding: 12px 16px;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Details/Summary */
details {
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 12px;
    background-color: #1f1f1f;
}

details summary {
    color: #e0e0e0;
    cursor: pointer;
}

details summary:hover {
    color: #f5f5f5;
}

/* Range input */
input[type="range"] {
    background-color: #2a2a2a;
}

input[type="range"]::-webkit-slider-thumb {
    background-color: #3b82f6;
}

input[type="range"]::-moz-range-thumb {
    background-color: #3b82f6;
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #3b82f6;
}
