:root {
    --red: #cc1246;
    --ink: #1b2230;
    --muted: #647084;
    --line: #dde3eb;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #f4f6fa;
    color: var(--ink);
    font:
        15px/1.5 system-ui,
        sans-serif;
}
a {
    color: var(--red);
    text-decoration: none;
}
button,
input,
select {
    font: inherit;
}
button,
.button {
    cursor: pointer;
    border: 0;
    border-radius: 7px;
    padding: 10px 16px;
    background: var(--red);
    color: white;
    display: inline-block;
}
button.secondary {
    background: #e9edf3;
    color: var(--ink);
}
button.danger {
    background: #fff0f3;
    color: #a20c34;
}
.shell {
    display: grid;
    grid-template-columns: 230px 1fr;
    min-height: 100vh;
}
aside {
    background: #171c27;
    color: white;
    padding: 28px 22px;
}
aside strong {
    font-size: 29px;
}
aside small {
    display: block;
    color: #aab4c7;
    margin-bottom: 30px;
}
nav a {
    display: block;
    color: #cbd3e2;
    padding: 12px;
    border-radius: 7px;
    margin: 5px 0;
}
nav a.selected {
    background: var(--red);
    color: white;
}
main {
    padding: 30px;
    max-width: 1400px;
    width: 100%;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;
}
h1 {
    margin: 0;
    font-size: 29px;
}
h2 {
    font-size: 20px;
    margin: 0 0 18px;
}
.muted {
    color: var(--muted);
}
.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 22px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.metric {
    font-size: 35px;
    font-weight: 700;
}
.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
label {
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
}
input:not([type="checkbox"]),
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #c5cdd9;
    border-radius: 6px;
    background: white;
    color: var(--ink);
    margin-top: 5px;
}
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}
th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
}
.scroll {
    overflow: auto;
}
.badge {
    font-size: 12px;
    border-radius: 20px;
    padding: 4px 9px;
    background: #edf1f7;
}
.steps td {
    vertical-align: top;
}
.steps label {
    font-size: 12px;
    white-space: nowrap;
    margin: 6px 0;
}
.steps input[type="text"] {
    min-width: 150px;
}
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.notice {
    background: #e8f6ed;
    border: 1px solid #b4dfc4;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.error {
    background: #fff0f0;
    border-color: #ecb7b7;
}
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 8px 30px #0002;
    max-width: 90vw;
}
.login {
    max-width: 440px;
    margin: 10vh auto;
}
.login h1 {
    margin-bottom: 10px;
}
.dev {
    font-size: 12px;
    color: #aab4c7;
}
code {
    overflow-wrap: anywhere;
}
@media (max-width: 800px) {
    .shell {
        grid-template-columns: 1fr;
    }
    aside {
        padding: 15px;
    }
    aside small {
        margin: 0;
    }
    nav {
        display: flex;
        flex-wrap: wrap;
    }
    nav a {
        padding: 8px;
    }
    main {
        padding: 18px;
    }
    .grid,
    .fields {
        grid-template-columns: 1fr;
    }
    header {
        align-items: flex-start;
    }
    .steps {
        min-width: 800px;
    }
}

.column-help {
    background: transparent;
    color: var(--muted);
    padding: 0;
    font: inherit;
    text-transform: inherit;
    text-align: left;
    border-radius: 3px;
    cursor: help;
}
.column-help span {
    color: var(--red);
    margin-left: 4px;
}
.column-help:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 5px;
}
.column-tooltip {
    position: fixed;
    z-index: 1000;
    width: 310px;
    max-width: calc(100vw - 24px);
    padding: 12px 15px;
    border-radius: 8px;
    background: var(--ink);
    color: white;
    font:
        14px/1.5 system-ui,
        sans-serif;
    box-shadow: 0 6px 20px #0003;
    pointer-events: none;
    text-transform: none;
}

/* Product configuration */
textarea {
    width: 100%;
    margin-top: 5px;
    padding: 10px;
    border: 1px solid #c5cdd9;
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}
.option-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fafbfd;
}
.secondary-link {
    background: #e9edf3;
    color: var(--ink);
}
hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 24px 0;
}

/* Standard size selection and per-product ordering */
.size-library {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}
.size-choice {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px;
    margin: 0;
}
.size-choice small {
    display: block;
    color: var(--muted);
    font-weight: normal;
}
.selected-size {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 6px 0;
}
.selected-size span {
    flex: 1;
}
button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Field requirements stay together, then stack on narrow screens. */
.field-requirements {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
#product-sizes {
    max-height: 260px;
    overflow-y: auto;
    padding: 2px;
}
@media (max-width: 650px) {
    .field-requirements {
        grid-template-columns: 1fr;
    }
}

