/* Shared visual language with quantity_discount; scoped to this page and its dialogs. */
.super-option-page, .super-option-modal {
    --so-ink: #303a58; --so-muted: #7a859b; --so-line: #e3e8f0;
    --so-soft: #f6f8fb; --so-card: #fff; --so-primary: #ff596f;
    color: var(--so-ink);
}
.super-option-page [hidden], .super-option-modal [hidden] { display: none !important; }
.super-option-page .account-wrapper { max-width: none; }
.super-option-page .cube-so-card { border: 1px solid var(--so-line); border-radius: 14px; background: var(--so-card); box-shadow: 0 10px 30px rgba(40,50,82,.06); overflow: hidden; }
.cube-so-header, .cube-so-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.super-option-page .cube-so-header { padding: 20px 22px; border-bottom: 1px solid var(--so-line); background: linear-gradient(135deg,#fff,#fffaf7); }
.super-option-page .cube-so-body { padding: 20px 22px 22px; }
.super-option-page .cube-so-text-group, .super-option-modal .cube-so-text-group { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.super-option-page .cube-so-text-group > *, .super-option-modal .cube-so-text-group > * { margin: 0 !important; }
.super-option-page h3 { font-size: 1.35rem; font-weight: 800; line-height: 1.4; color: var(--so-ink); }
.super-option-page h4, .super-option-modal h4 { color: var(--so-ink); font-size: 14px; font-weight: 700; line-height: 1.4; }
.super-option-page .cube-so-text-group p, .super-option-modal .cube-so-text-group p { color: var(--so-muted); font-size: 12px; line-height: 1.5; }
.cube-so-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.super-option-page .button.cube-so-button, .super-option-modal .button.cube-so-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; min-height: 36px; padding: 0 17px; border-radius: 999px; font-size: 14px; font-weight: 700; box-shadow: none; margin: 0; line-height: 1; transition: background .15s, border-color .15s; }
.super-option-page .cube-so-primary, .super-option-modal .cube-so-primary { background: var(--so-primary); border: 1px solid var(--so-primary); color: #fff; }
.super-option-page .cube-so-primary:hover, .super-option-modal .cube-so-primary:hover { background: #f24760; border-color: #f24760; color: #fff; }
.super-option-page .cube-so-secondary, .super-option-modal .cube-so-secondary { background: var(--so-card); border: 1px solid #d9dfea; color: var(--so-ink); }
.super-option-page .cube-so-secondary:hover, .super-option-modal .cube-so-secondary:hover { background: var(--so-soft); border-color: #bac5d6; color: var(--so-ink); }
.super-option-page button:disabled { opacity: .5; cursor: not-allowed; }
.super-option-page button:focus-visible, .super-option-modal button:focus-visible, .cube-so-availability:focus-visible { outline: 2px solid #ff8f9e; outline-offset: 2px; }
#cube-so-save-state { font-size: 12px; color: #b76e35; white-space: nowrap; }
.super-option-page .cube-so-notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #f4e3d5; border-radius: 10px; background: #fff8f1; }
.super-option-page .cube-so-notice > i { color: #e99851; margin-top: 3px; flex: 0 0 16px; }
.super-option-page .cube-so-notice h4 { color: #956233; font-size: 13px; }
.super-option-page .cube-so-notice p { color: #9a7d64; }
.super-option-page .cube-so-toolbar { margin: 20px 0 12px; }
.cube-so-table-shell { border: 1px solid var(--so-line); border-radius: 10px; overflow: auto; }
.super-option-page .cube-so-table { width: 100%; min-width: 780px; table-layout: fixed; margin: 0; background: var(--so-card); }
.super-option-page .cube-so-table th, .super-option-page .cube-so-table td { border: 0; border-bottom: 1px solid var(--so-line); padding: 14px 16px; vertical-align: top; color: var(--so-ink); font-size: 13px; text-align: left; overflow-wrap: anywhere; }
.super-option-page .cube-so-table thead th { padding: 12px 16px; color: var(--so-muted); font-size: 12px; font-weight: 700; background: var(--so-soft); vertical-align: middle; }
.super-option-page .cube-so-table tbody tr:last-child td { border-bottom: 0; }
.super-option-page .cube-so-table tbody tr:hover { background: #fcfcfe; }
.cube-so-title-col { width: 20%; } .cube-so-min-col { width: 96px; } .cube-so-rule-col { width: 122px; } .cube-so-action-col { width: 100px; }
.cube-so-group-name { font-size: 14px; font-weight: 700; line-height: 1.5; }
.cube-so-group-count { display: block; margin-top: 2px; font-size: 12px; color: var(--so-muted); }
.cube-so-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 24px; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: #edf1f7; color: #65718a; white-space: nowrap; }
.cube-so-badge.is-allowed { background: #eaf6ef; color: #378262; }
.cube-so-option-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--so-line); }
.cube-so-option-row:first-child { padding-top: 0; }.cube-so-option-row:last-child { padding-bottom: 0; border-bottom: 0; }
.cube-so-choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.cube-so-choice-text > strong { font-size: 13px; font-weight: 600; color: var(--so-ink); }
.cube-so-choice-text > small { color: var(--so-muted); font-size: 11px; }
.cube-so-money { display: inline-flex; align-items: baseline; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; color: var(--so-ink); white-space: nowrap; }
.cube-so-money small { font-size: 70%; font-weight: inherit; color: inherit; }
.cube-so-money .cube-so-currency { margin-right: 3px; }
.cube-so-availability { box-sizing: border-box; width: 100px; height: 36px; min-height: 36px; border: 1px solid #d7e8df; border-radius: 8px; padding: 0 8px; background: #f0f8f3; color: #378262; font-size: 12px; flex-shrink: 0; }
.cube-so-availability.is-unavailable { background: #f2f4f7; border-color: #e1e5eb; color: #7d8799; }
.super-option-page .cube-so-action-cell { text-align: center !important; }
.cube-so-row-actions { display: flex; align-items: center; justify-content: center; gap: 6px; }
.super-option-page .cube-so-icon-button, .super-option-modal .cube-so-icon-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; flex: 0 0 30px; width: 30px; height: 30px; padding: 0; margin: 0; border: 1px solid var(--so-line); border-radius: 50%; background: var(--so-card); color: #738099; cursor: pointer; font-size: 13px; }
.cube-so-icon-button:hover { border-color: #ffacb7; color: #ef5b72; }
.cube-so-icon-button.cube-so-danger:hover { color: #d9425a; background: #fff3f5; border-color: #ffc3ce; }
.cube-so-empty { padding: 36px 20px; text-align: center; border: 1px dashed var(--so-line); border-radius: 10px; color: var(--so-muted); font-size: 13px; }
.cube-so-empty > i { display: block; margin-bottom: 10px; color: #a8b2c5; font-size: 25px; }
.cube-so-empty > p { margin: 0 0 10px; }.cube-so-empty > p:last-child { margin-bottom: 0; }
/* Dialogs keep the same compact rhythm as the list. */
.super-option-modal .modal-content { width: calc(100% - 32px); max-width: 790px; max-height: calc(100dvh - 40px); margin: 20px auto; padding: 0; }
.super-option-modal .modal-card { display: flex; flex-direction: column; width: 100%; max-width: none; max-height: calc(100dvh - 40px); margin: 0; border-radius: 14px; border: 1px solid var(--so-line); background: var(--so-card); box-shadow: 0 18px 60px rgba(40,50,82,.16); overflow: hidden; }
.super-option-modal .modal-card-head { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding: 18px 20px; border-bottom: 1px solid var(--so-line); background: var(--so-card); }
.super-option-modal .modal-card-head .cube-so-text-group { flex: 1; }
.super-option-modal .modal-card-head h3 { color: var(--so-ink); font-size: 17px; font-weight: 800; line-height: 1.4; }
.cube-so-modal-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: #fff0e6; color: #ef924b; font-size: 18px; }
.super-option-modal .modal-card-body { padding: 18px 20px; overflow: auto; min-height: 0; background: var(--so-card); }
.cube-so-form-section + .cube-so-form-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--so-line); }
.cube-so-section-heading { margin-bottom: 12px; }
.cube-so-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 14px; }
.cube-so-field { min-width: 0; }
.super-option-modal .cube-so-field label { display: block; margin: 0 0 6px; color: #64718a; font-size: 12px; font-weight: 600; line-height: 1.4; }
.super-option-modal .cube-so-field input, .super-option-modal .cube-so-field select { box-sizing: border-box; width: 100%; height: 36px; min-height: 36px; padding: 0 10px; border: 1px solid #dce2ec; border-radius: 8px; background: var(--so-card); color: var(--so-ink); font-size: 13px; line-height: normal; box-shadow: none; }
.super-option-modal .cube-so-field input:focus, .super-option-modal .cube-so-field select:focus { border-color: #ff8d9e; outline: none; box-shadow: 0 0 0 2px rgba(255,89,111,.09); }
.super-option-modal .cube-so-field [aria-invalid="true"] { border-color: #e85269; }
.cube-so-form-error { margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; background: #fff1f3; color: #c63e58; font-size: 13px; }
.cube-so-choice-list .cube-so-empty { padding: 18px 12px; font-size: 12px; background: var(--so-soft); }
.cube-so-choice-list .cube-so-option-row { padding: 10px 12px; border: 1px solid var(--so-line); border-bottom: 0; }
.cube-so-choice-list .cube-so-option-row:first-child { border-radius: 8px 8px 0 0; }
.cube-so-choice-list .cube-so-option-row:last-child { border-bottom: 1px solid var(--so-line); border-radius: 0 0 8px 8px; }
.cube-so-choice-list .cube-so-option-row:only-child { border-radius: 8px; }
.cube-so-choice-list .cube-so-choice-text { flex: 1; }
.cube-so-choice-list .cube-so-choice-actions { display: flex; align-items: center; gap: 10px; }
.cube-so-option-builder { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 96px auto; align-items: end; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--so-soft); }
.super-option-modal .modal-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 14px 20px; border-top: 1px solid var(--so-line); background: var(--so-card); }
.super-option-modal .modal-card-foot > p { margin: 0; color: var(--so-muted); font-size: 11px; }
@media (max-width: 767px) {
    .super-option-page .cube-so-header { padding: 16px; flex-wrap: wrap; gap: 12px; }
    .super-option-page .cube-so-body { padding: 16px; }
    .super-option-page h3 { font-size: 19px; }
    .super-option-page .cube-so-notice { padding: 10px; }
    .super-option-page .cube-so-toolbar { margin-top: 16px; }
    .super-option-modal .modal-content { width: calc(100% - 20px); margin: 10px auto; max-height: calc(100dvh - 20px); }
    .super-option-modal .modal-card { max-height: calc(100dvh - 20px); }
    .super-option-modal .modal-card-head, .super-option-modal .modal-card-body { padding: 14px; }
    .super-option-modal .modal-card-foot { padding: 12px 14px; }
    .super-option-modal .modal-card-foot .cube-so-actions { width: 100%; }
    .cube-so-option-builder { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .cube-so-option-builder .cube-so-button { width: 100%; }
    .cube-so-field-grid { gap: 12px; }
    .cube-so-choice-list .cube-so-choice-actions { gap: 6px; }
    .cube-so-choice-list .cube-so-availability { width: 100px; }
    .cube-so-choice-list .cube-so-option-row { gap: 8px; padding: 10px; }
}
@media (max-width: 420px) {
    .super-option-page .cube-so-header > .cube-so-actions { width: 100%; }
    .super-option-modal .cube-so-modal-icon { display: none; }
    .super-option-modal .cube-so-field-grid { grid-template-columns: 1fr; }
    .cube-so-choice-list .cube-so-option-row { flex-wrap: wrap; }
    .cube-so-choice-list .cube-so-choice-text { flex-basis: calc(100% - 12px); }
    .cube-so-choice-list .cube-so-choice-actions { margin-left: auto; }
}
.is-dark .super-option-page, .is-dark .super-option-modal { --so-ink: #e3e6ee; --so-muted: #a4aec1; --so-line: #3c4252; --so-soft: #272c39; --so-card: #303644; }
.is-dark .super-option-page .cube-so-header { background: var(--so-card); }
.is-dark .super-option-page .cube-so-notice { background: #3a332e; border-color: #514233; }
.is-dark .super-option-page .cube-so-notice h4, .is-dark .super-option-page .cube-so-notice p { color: #dfba98; }
.is-dark .super-option-page .cube-so-table tbody tr:hover { background: var(--so-soft); }
.is-dark .super-option-modal .cube-so-field label { color: var(--so-muted); }
.super-option-modal .modal-content { background: transparent; border-radius: 14px; }
.cube-so-mobile-label { display: none; }
@media (max-width: 767px) {
    .super-option-page .cube-so-table { min-width: 0; display: block; }
    .super-option-page .cube-so-table colgroup, .super-option-page .cube-so-table thead { display: none; }
    .super-option-page .cube-so-table tbody { display: block; }
    .super-option-page .cube-so-table tbody tr { display: grid; position: relative; grid-template-columns: auto 1fr; align-items: start; gap: 10px; padding: 14px; border-bottom: 1px solid var(--so-line); }
    .super-option-page .cube-so-table tbody tr:last-child { border-bottom: 0; }
    .super-option-page .cube-so-table tbody td { display: block; padding: 0; border: 0; min-width: 0; }
    .super-option-page .cube-so-table tbody td:first-child { grid-column: 1 / -1; padding-right: 72px; }
    .super-option-page .cube-so-table tbody td:nth-child(2), .super-option-page .cube-so-table tbody td:nth-child(3) { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
    .super-option-page .cube-so-table tbody td:nth-child(4) { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--so-line); }
    .super-option-page .cube-so-table tbody td:last-child { position: absolute; top: 14px; right: 12px; }
    .cube-so-mobile-label { display: inline; color: var(--so-muted); font-size: 11px; }
    .super-option-page .cube-so-option-row { gap: 8px; }
}
/* Override legacy dark-mode button and nested-text rules only on this page. */
body.is-dark .super-option-page .button.cube-so-primary,
body.is-dark .super-option-modal .button.cube-so-primary { background: #ff596f !important; border-color: #ff596f !important; color: #fff !important; }
body.is-dark .super-option-page .cube-so-primary .clang_text,
body.is-dark .super-option-modal .cube-so-primary .clang_text { color: #fff !important; }
body.is-dark .super-option-page .cube-so-badge { background: #424b60; }
body.is-dark .super-option-page .cube-so-badge.is-allowed { background: #294c42; }
body.is-dark .super-option-page .cube-so-icon-button,
body.is-dark .super-option-modal .cube-so-icon-button { color: #c1cbe0; }
