body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
}
.container {
    max-width: 90%;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
nav {
    margin-bottom: 20px;
    font-size: 1.1em;
}
.flashes li {
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
}
.flashes .success { background: #d4edda; color: #155724; }
.flashes .error { background: #f8d7da; color: #721c24; }
input, select, button {
    padding: 8px;
    margin: 5px 0;
}
button {
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}
button:hover {
    background: #0056b3;
}

/* Корпоративные классы кнопок */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
    margin: 5px 0;
}

.btn-primary {
    color: #ffffff;
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004085;
}

.btn-success {
    color: #ffffff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    color: #ffffff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-info {
    color: #ffffff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-secondary {
    color: #ffffff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Классы для форм */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: normal;
    margin-right: 8px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #0056b3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.form-control-sm {
    padding: 6px 8px;
    font-size: 13px;
    line-height: 1.5;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

/* Инлайн форма */
.form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 1000px;
}

.form-inline .form-group {
    margin-bottom: 0;
    margin-right: 10px;
}

.form-inline .form-control {
    width: auto;
}

.form-inline .form-control-sm {
    width: 60px;
}

/* Контейнер формы */
.form-container {
    margin-top: 20px;
    font-size: 14px;
}

/* Группа кнопок */
.button-group {
    margin-top: 15px;
}

.button-group .btn {
    margin-right: 10px;
}

/* Классы для таблиц */
.table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
    background-color: #ffffff;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align: left;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    border-top: 0;
    font-weight: bold;
    background-color: #f8f9fa;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

.table-striped tbody tr:hover {
    background-color: #e9ecef;
}

/* Классы для сообщений */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Стили для редактора парсеров */
.editor-layout {
    display: flex;
    gap: 15px;
    height: 90vh;
}

.editor-left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.info-row {
    margin: 5px 0;
}

.doc-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 1px 0;
    flex-wrap: wrap;
    font-size: 14px;
}

.doc-link {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 280px;
}

.doc-link a {
    word-break: break-all;
    font-size: 14px;
}

.doc-input {
    flex: 1;
    min-width: 250px;
}

.template-buttons {
    margin-bottom: 10px;
}

.template-buttons .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.codemirror-wrapper {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.editor-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.log-output {
    margin-top: 15px;
    padding: 10px;
    height: 120px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-family: Consolas, Monaco, monospace;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 13px;
}

.cheatsheet-panel {
    width: 580px;
    display: flex;
    flex-direction: column;
}

.cheatsheet-header {
    margin: 0 0 10px 0;
    padding: 5px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    text-align: center;
}

.cheatsheet-content {
    flex: 1;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Стили для создания парсера */
.empty-state {
    color: #6c757d;
    padding: 20px;
    text-align: center;
}

.create-parser-form {
    max-width: 600px;
}

.doc-preview {
    margin-top: 10px;
    display: none;
}

.doc-preview-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    padding: 10px;
    border-radius: 6px;
    background: #f8f9fa;
}

.error-container {
    margin-top: 10px;
}

.btn-block {
    width: 100%;
}

.text-muted {
    color: #6c757d;
    font-size: 13px;
}

/* Стили для страницы городов */
.page-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.page-header h2 {
    color: #0056b3;
    margin: 0 0 10px 0;
}

.page-header h3 {
    color: #1a1a1a;
    margin: 0;
    font-weight: normal;
}

.city-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.city-item {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.city-item:hover {
    background-color: #f8f9fa;
}

.city-item:last-child {
    border-bottom: none;
}

.city-link {
    color: #0056b3;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 5px 0;
}

.city-link:hover {
    color: #004494;
    text-decoration: underline;
}

/* Стили для навигации инструкций */
.instruction-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.instruction-nav .btn {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.instruction-nav .btn.active {
    background-color: #0056b3;
    color: #ffffff;
}

.instruction-content {
    max-width: 900px;
}

.instruction-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.instruction-section h3 {
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.instruction-section p {
    line-height: 1.6;
    margin-bottom: 12px;
}

.instruction-section ul {
    margin: 12px 0;
    padding-left: 25px;
}

.instruction-section li {
    margin: 8px 0;
    line-height: 1.6;
}

.instruction-section ul ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

.instruction-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 15px 0;
}

.instruction-section a {
    color: #0056b3;
    text-decoration: none;
}

.instruction-section a:hover {
    color: #004494;
    text-decoration: underline;
}

/* Стили для статуса WebSocket */
.websocket-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    background: #6c757d;
    color: #ffffff;
    font-size: 12px;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0.8;
}

/* Стили для проверки контрактов */
.check-status {
    margin: 15px 0;
    color: #0056b3;
    font-weight: bold;
    font-size: 16px;
    padding: 10px;
    background: #f8f9fa;
    border-left: 4px solid #0056b3;
    border-radius: 4px;
}

.check-results {
    list-style: none;
    padding: 0;
}

.check-result-item {
    color: #6c757d;
    margin: 5px 0;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #dee2e6;
}