/* Стили страницы «air_curtains_object_knowledge». Вынесены из <style> в шаблоне без правки правил.
 * Ссылка стоит ровно там, где стоял блок: порядок в каскаде сохранён. */

* {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
            background: var(--slate-50);
            color: var(--slate-900);
            line-height: 1.6;
            padding: 20px;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            padding: 30px;
        }
        
        header {
            text-align: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--slate-200);
        }
        
        h1 {
            color: var(--slate-900);
            font-size: 2rem;
            margin-bottom: 8px;
        }
        
        .subtitle {
            color: var(--slate-500);
            font-size: 1rem;
        }
        
        .summary-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            padding: 20px;
            border: 1px solid var(--slate-200);
            text-align: center;
        }
        
        .card-header {
            font-size: 1rem;
            font-weight: 600;
            color: var(--slate-500);
            margin-bottom: 10px;
        }
        
        .card-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--slate-900);
        }
        
        .card-value.small {
            font-size: 1.5rem;
        }
        
        .tabs {
            display: flex;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--slate-200);
        }
        
        .tab {
            padding: 12px 20px;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            font-weight: 600;
            color: var(--slate-500);
        }
        
        .tab.active {
            color: var(--blue-500);
            border-bottom: 3px solid var(--blue-500);
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .filters {
            background: var(--slate-50);
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border: 1px solid var(--slate-200);
        }
        
        .filter-row {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 15px;
        }
        
        .form-group {
            margin-bottom: 15px;
        }
        
        label {
            display: block;
            margin-bottom: 6px;
            font-weight: 600;
            color: var(--slate-700);
            font-size: 0.9rem;
        }
        
        input, select {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--slate-300);
            border-radius: 6px;
            font-size: 14px;
            background: var(--white);
        }
        
        input:focus, select:focus {
            outline: none;
            border-color: var(--blue-500);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        .buttons {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        
        button {
            padding: 10px 16px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .btn-primary {
            background: var(--blue-500);
            color: white;
        }
        
        .btn-primary:hover {
            background: var(--blue-600);
        }
        
        .btn-secondary {
            background: var(--slate-200);
            color: var(--slate-700);
        }
        
        .btn-secondary:hover {
            background: var(--slate-300);
        }
        
        .btn-tertiary {
            background: var(--blue-100);
            color: var(--blue-700);
        }
        
        .btn-tertiary:hover {
            background: var(--blue-200);
        }
        
        .btn-success {
            background: var(--emerald-500);
            color: white;
        }
        
        .btn-success:hover {
            background: var(--emerald-600);
        }
        
        .btn-danger {
            background: var(--red-500);
            color: white;
        }
        
        .btn-danger:hover {
            background: var(--red-600);
        }
        
        .btn-warning {
            background: var(--amber-500);
            color: white;
        }
        
        .btn-warning:hover {
            background: var(--amber-600);
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border: 1px solid var(--slate-200);
        }

        /* review-queue-table has 12 columns including an 8-button actions
           column and long free-text (Объект/Заказчик) -- table-layout:auto
           let those force the whole table (and with it the page body, since
           nothing upstream clips it) wider than the viewport. Fixed layout
           + explicit column widths + truncation keeps everything inside
           .table-container's own overflow-x:auto instead. */
        #review-queue-table {
            table-layout: fixed;
        }

        #review-queue-table col.col-id { width: 90px; }
        #review-queue-table col.col-text { width: 130px; }
        #review-queue-table col.col-narrow { width: 60px; }
        #review-queue-table col.col-status { width: 100px; }
        #review-queue-table col.col-date { width: 90px; }
        #review-queue-table col.col-actions { width: 230px; }

        .cell-truncate {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        th {
            background: var(--slate-100);
            padding: 12px;
            text-align: left;
            font-weight: 600;
            border: 1px solid var(--slate-200);
        }

        td {
            padding: 12px;
            border: 1px solid var(--slate-200);
            vertical-align: top;
        }
        
        tr:nth-child(even) {
            background: var(--slate-50);
        }
        
        tr:hover {
            background: var(--slate-100);
        }
        
        .table-container {
            overflow-x: auto;
            margin-bottom: 30px;
        }
        
        .profile-status-draft {
            color: var(--red-800);
            background-color: var(--red-100);
            border: 1px solid var(--red-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .profile-status-needs_review {
            color: var(--yellow-800);
            background-color: var(--yellow-100);
            border: 1px solid var(--yellow-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .profile-status-approved {
            color: var(--green-800);
            background-color: var(--green-100);
            border: 1px solid var(--green-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .profile-status-rejected {
            color: var(--red-800);
            background-color: var(--red-100);
            border: 1px solid var(--red-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .profile-status-archived {
            color: var(--purple-900);
            background-color: var(--purple-100);
            border: 1px solid var(--purple-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .completeness-high {
            color: var(--green-800);
            background-color: var(--green-100);
            border: 1px solid var(--green-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .completeness-medium {
            color: var(--yellow-800);
            background-color: var(--yellow-100);
            border: 1px solid var(--yellow-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .completeness-low {
            color: var(--red-800);
            background-color: var(--red-100);
            border: 1px solid var(--red-300);
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.8rem;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            overflow-y: auto;
        }
        
        .modal-content {
            background: white;
            margin: 50px auto;
            padding: 30px;
            border-radius: 12px;
            max-width: 90%;
            width: 800px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            position: relative;
        }
        
        .close-modal {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 24px;
            cursor: pointer;
            color: var(--slate-500);
        }
        
        .close-modal:hover {
            color: var(--slate-900);
        }
        
        .modal-header {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--slate-200);
        }
        
        .modal-body {
            margin-bottom: 20px;
        }
        
        .detail-section {
            margin-bottom: 20px;
        }
        
        .detail-section h3 {
            margin-bottom: 10px;
            color: var(--slate-900);
        }
        
        .detail-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .detail-item {
            background: var(--slate-50);
            padding: 15px;
            border-radius: 6px;
            border: 1px solid var(--slate-200);
        }
        
        .detail-label {
            font-size: 0.85rem;
            color: var(--slate-500);
            margin-bottom: 4px;
        }
        
        .detail-value {
            font-weight: 600;
            color: var(--slate-900);
        }
        
        .back-button {
            display: inline-block;
            padding: 12px 20px;
            background: var(--slate-200);
            color: var(--slate-700);
            text-decoration: none;
            border-radius: 6px;
            font-weight: 600;
            margin-top: 20px;
            transition: background 0.2s;
        }
        
        .back-button:hover {
            background: var(--slate-300);
        }
        
        .no-data {
            color: var(--slate-500);
            font-style: italic;
            text-align: center;
            padding: 40px;
        }
        
        .action-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        
        .action-button {
            padding: 6px 12px;
            font-size: 0.85rem;
        }
        
        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }
            
            .summary-cards {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 10px;
            }
            
            .filter-row {
                grid-template-columns: 1fr;
            }
            
            .modal-content {
                margin: 20px;
                padding: 20px;
                width: calc(100% - 40px);
            }
        }
