
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            background: #f4f4f4;
            color: #222;
        }

        header {
            background: #2c3e50;
            color: white;
            padding: 20px 30px;
        }

        header h1 {
            margin: 0;
            font-size: 28px;
        }

        nav {
            margin-top: 10px;
        }

        nav a {
            color: white;
            text-decoration: none;
            margin-right: 20px;
            font-weight: bold;
        }

        nav a:hover {
            text-decoration: underline;
        }

        .container {
            max-width: 1280px;
            margin: 30px auto;
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
        }

        .card {
            border: 1px solid #ddd;
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 8px;
            background: #fafafa;
        }

        .summary-box {
            margin-top: 30px;
            padding: 20px;
            background: #eef6ee;
            border: 1px solid #b7d3b7;
            border-radius: 8px;
        }

        .button-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        
        .button-link,
        button {
            flex: 1 0 100px;
            text-align: center; /* для inline-элементов, но в данном случае не влияет */
            display: flex;
            justify-content: center; /* горизонтальное выравнивание */
            align-items: center;   /* вертикальное выравнивание */
            padding: 8px 14px;
            background: #3498db;
            color: white;
            text-decoration: none;
            border: 1px solid #ccc;
            border-radius: 6px;
            cursor: pointer;
        }

        .button-reset,
        button {
            flex: 1 0 100px;
              
            text-align: center;
            justify-content: center; 
            /* align-items: center;  */
            display: inline-block;
            padding: 8px 14px;
            background: #3498db;
            color: white;
            text-decoration: none;
            border: 1px solid #ccc;
            border-radius: 6px;
            cursor: pointer;
        }

        .button-link:hover,
        button:hover {
            background: #2980b9;
        }

        form p {
            margin-bottom: 15px;
        }

        input,
        textarea,
        select {
            width: 100%;
            padding: 8px;
            box-sizing: border-box;
        }

        .muted {
            color: #666;
        }

        .top-space {
            margin-top: 20px;
        }
        .danger-link {
            display: inline-block;
            padding: 10px 16px;
            background: #c0392b;
            color: white;
            text-decoration: none;
            border-radius: 6px;
        }

        .danger-link:hover {
            background: #a93226;
        }

        .table-wrapper {
            overflow-x: auto;
            margin-top: 16px;
            width: 100%;
        }

        .estimate-table {
            width: 100%;
            table-layout: fixed;
            border-collapse: collapse;
            background: white;
            font-size: 13px;
        }

        .estimate-table th,
        .estimate-table td {
            border: 1px solid #dcdcdc;
            padding: 6px 8px;
            text-align: left;
            vertical-align: top;
            word-wrap: break-word;
            overflow-wrap: anywhere;
        }

        .estimate-table th {
            background: #f4f6f8;
            font-size: 12px;
        }

        .total-row {
            background: #f9f9f9;
            font-weight: bold;
        }

        .estimate-table tr:hover {
            background: #fafafa;
        }
        .status-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: bold;
        }       

        .status-approved {
            background: #e6f4ea;
            color: #1e7e34;
        }

        .status-draft {
            background: #fff4e5;
            color: #b36b00;
        }
        
        .logo-box {
            background-image: url('/static/images/logo.png');
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            width: 150px;
            height: 150px;
            border: 1px solid #bbb;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            color: #777;
            margin-bottom: 12px;
        }

        .estimate-items-table {
            width: 100%;
            table-layout: fixed;
            /* border-collapse: collapse; */
        }

        .estimate-items-table a {
            word-break: break-word;
        }

        .estimate-items-table th,
        .estimate-items-table td {
            /* padding: 8px; */
            vertical-align: top;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        .estimate-items-table select,
        .estimate-items-table input,
        .estimate-items-table textarea {
            width: 100%;
            box-sizing: border-box;
        }


        .pagination-wrapper {
            margin: 16px 0 18px;
            display: flex;
            justify-content: center;
        }

        .pagination {
            display: grid;
            grid-template-columns: 96px 326px 96px;
            align-items: center;
            column-gap: 12px;
        }

        .pagination-side {
            display: grid;
            grid-template-columns: 44px 44px;
            gap: 8px;
        }

        .pagination-pages {
            display: grid;
            grid-template-columns: repeat(7, 38px);
            gap: 8px;
            justify-content: center;
            align-items: center;
        }

        .pagination-link,
        .pagination-dots,
        .pagination-slot-empty {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            min-width: 38px;
            border-radius: 10px;
            font-size: 14px;
            line-height: 1;
            text-decoration: none;
            box-sizing: border-box;
        }

        .pagination-nav {
            width: 44px;
            min-width: 44px;
            font-size: 18px;
            font-weight: 600;
        }

        .pagination-link {
            color: #1f2937;
            background: #ffffff;
            border: 1px solid #d1d5db;
            transition: all 0.15s ease;
        }

        .pagination-link:hover {
            background: #f3f4f6;
            border-color: #9ca3af;
        }

        .pagination-link-active {
            background: #3498db;
            color: #ffffff;
            border: 1px solid #3498db;
            font-weight: 600;
            cursor: default;
        }

        .pagination-link-disabled {
            color: #9ca3af;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            cursor: default;
            pointer-events: none;
        }

        .pagination-dots {
            color: #6b7280;
            background: transparent;
            border: none;
            cursor: default;
        }

        .pagination-slot-empty {
            visibility: hidden;
        }

        .action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.back-actions {
    margin-top: 16px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.card-spaced {
    margin-bottom: 20px;
}

.inline-muted {
    color: #666;
}

.detail-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.table-text-wrap {
    white-space: normal;
    line-height: 1.4;
}

.table-comment-wide {
    min-width: 280px;
    max-width: 420px;
    white-space: normal;
    line-height: 1.4;
}

.table-comment-wider {
    min-width: 320px;
    max-width: 480px;
    white-space: normal;
    line-height: 1.4;
}

