.designs-page {
    padding: 20px 0;
    font-size: 14px
}

.designs-page h2 {
    margin-bottom: 18px
}

.designs-filters,
.designs-meta,
.designs-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 14px;
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 12px
}

.designs-page label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #444
}

.designs-page input,
.designs-page select {
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #bbb;
    border-radius: 3px
}

.designs-page input[readonly] {
    background: #f2f2f2;
    width: 100px
}

.designs-meta .design-remark {
    flex: 1;
    min-width: 220px
}

.designs-meta .design-remark input {
    width: 100%
}

.designs-tools>label:has(input[type=radio]),
.design-create label:has(input[type=checkbox]) {
    flex-direction: row;
    align-items: center
}

.design-create {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
    border-left: 1px solid #ddd;
    padding-left: 12px
}

.design-create input[type=number] {
    width: 76px
}

.design-grid-wrap {
    overflow: auto;
    max-height: 68vh;
    background: #fff;
    border: 1px solid #ddd
}

.alpha-block-layout-wrap {
    overflow-x: auto;
    margin: 0 0 12px;
}

.alpha-table-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.alpha-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

.alpha-export-btn:hover {
    background: #d5f0df;
}

.alpha-export-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.alpha-table-title {
    margin: 8px 0;
    font-size: 15px;
}

.alpha-table-title a {
    color: inherit;
}

.alpha-block-layout {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    font-size: 13px
}

.alpha-block-layout th,
.alpha-block-layout td {
    border: 1px solid #ddd;
    padding: 5px 8px;
    text-align: center;
    white-space: nowrap;
}

.alpha-block-layout th {
    background: #e8eef6;
    font-weight: 700;
}

.alpha-block-layout th:first-child {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    text-align: left;
}

.alpha-block-layout tbody tr:nth-child(even) {
    background: #f8f9f9;
}

.alpha-block-layout tbody th {
    vertical-align: middle;
    text-align: center;
}

#design-grid {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px
}

#design-grid.design-array {
    width: 100%;
    table-layout: fixed;
}

#design-grid th,
#design-grid td {
    border: 1px solid #ddd;
    padding: 5px 8px;
    white-space: nowrap
}

#design-grid th {
    position: sticky;
    top: 0;
    z-index: 1
}

#design-grid tbody tr:nth-child(even) {
    background: #f8f9f9
}

#design-grid td input {
    min-width: 62px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 3px
}

#design-grid td input:focus {
    outline: 1px solid #4b8064;
    background: white
}

#design-message {
    min-height: 24px;
    margin: 6px 0;
    color: #245b39
}

#design-message.error {
    color: #a32626
}

.design-array th:first-child {
    position: sticky;
    left: 0;
    z-index: 2
}

.design-array th:first-child:not([colspan]) {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    box-sizing: border-box;
}

.design-array .array-cell {
    text-align: center;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 34px;
    box-sizing: border-box
}

.design-array .design-rep-heading th {
    position: static;
    background: #dce9e0;
    text-align: left;
    padding: 8px
}

.design-array th:first-child:not([colspan]) {
    width: 72px;
    min-width: 72px;
    max-width: 72px
}

.design-array .design-rep-label {
    vertical-align: middle;
    text-align: center
}

#design-grid.design-array tbody th:first-child {
    position: static;
    left: auto
}

#design-grid.design-array tbody .design-rep-label {
    position: sticky;
    left: 0;
    z-index: 2
}

.design-modal[hidden] {
    display: none
}

.design-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .45)
}

.design-modal-card {
    width: min(525px, 100%);
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .24)
}

.design-modal-card h3 {
    margin: 0 0 12px
}

.design-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px
}

.design-delete-btn {
    background: #dc3545;
    color: #fff;
    border-color: #c82333
}

.design-delete-btn:hover {
    background: #c82333
}

.designs-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px
}

.designs-top>.designs-filters,
.designs-top>.designs-meta {
    margin-bottom: 12px
}

@media(max-width:900px) {
    .designs-top {
        grid-template-columns: 1fr
    }
}

.designs-page label {
    font-weight: 700
}

.designs-page label[hidden] {
    display: none
}

.design-array th {
    background: #e8eef6
}

.design-create button[hidden] {
    display: none
}

.alpha-possibilities-card {
    max-height: 85vh;
    display: flex;
    flex-direction: column
}

.alpha-possibilities-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.alpha-possibilities-header h3 {
    margin: 0
}

.alpha-possibilities-table-wrap {
    overflow: auto;
    margin-top: 14px
}

.alpha-possibilities-table {
    border-collapse: collapse;
    width: 100%
}

.alpha-possibilities-table th,
.alpha-possibilities-table td {
    border: 1px solid #ddd;
    padding: 7px 12px;
    text-align: left
}

.alpha-possibilities-table th {
    position: sticky;
    top: 0;
    background: #fff
}

.alpha-possibilities-table .alpha-treatment-odd {
    background: #f1f6f2
}

.alpha-possibilities-table .alpha-treatment-even {
    background: #fff
}

.alpha-possibilities-reference {
    margin: 5px 0 0;
    color: #555;
    font-size: 13px;
    font-weight: 400
}

.alpha-possibilities-reference a {
    color: #1b6b3a
}

.design-code-loader {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    font-weight: 400
}

.design-code-loader[hidden] {
    display: none
}

.design-code-loader .design-spinner {
    width: 14px;
    height: 14px;
    border-width: 2px
}

.design-grid-wrap {
    position: relative;
    min-height: 120px
}

.design-loader {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, .82);
    color: #444
}

.design-loader.is-visible {
    display: flex
}

.design-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #d8e1dc;
    border-top-color: #4b8064;
    border-radius: 50%;
    animation: design-spin .8s linear infinite
}

@keyframes design-spin {
    to {
        transform: rotate(360deg)
    }
}
