:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --ink: #18202a;
    --muted: #657282;
    --line: #dfe4ea;
    --primary: #176b87;
    --primary-dark: #105266;
    --accent: #db7c26;
    --success: #16784f;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

a {
    color: var(--primary);
}

.topbar {
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 16px;
    min-height: 62px;
    padding: 0 24px;
    position: relative;
}

.brand {
    color: var(--ink);
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
}

.section {
    border-left: 1px solid var(--line);
    color: var(--muted);
    padding-left: 16px;
}

.topbar-actions {
    display: flex;
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.topbar-button {
    min-height: 38px;
    white-space: nowrap;
}

.page {
    margin: 0 auto;
    max-width: 1120px;
    padding: 32px 20px 56px;
}

.hero {
    align-items: center;
    display: grid;
    gap: 28px;
    grid-template-columns: 1.2fr .8fr;
    min-height: 52vh;
}

.hero h1,
.panel h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.02;
    margin: 0 0 16px;
}

.lead {
    color: var(--muted);
    font-size: 18px;
    max-width: 680px;
}

.visit-counter {
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.choice-grid,
.grid {
    display: grid;
    gap: 16px;
}

.choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.card h2,
.card h3,
.panel h2 {
    margin-top: 0;
}

.card-link {
    color: var(--ink);
    display: block;
    min-height: 160px;
    text-decoration: none;
}

.card-link:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(24, 32, 42, .08);
}

.button,
button {
    align-items: center;
    background: var(--primary);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    text-decoration: none;
}

.button.secondary,
button.secondary {
    background: #e8edf2;
    color: var(--ink);
}

.button.danger,
button.danger {
    background: var(--danger);
}

.button.danger:hover,
button.danger:hover {
    background: #8f1c13;
}

.button:hover,
button:hover {
    background: var(--primary-dark);
}

button:disabled {
    background: #aab4bf;
    cursor: not-allowed;
}

form {
    display: grid;
    gap: 14px;
}

.model-price-form {
    margin-top: 16px;
}

.model-card-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.model-card-actions button {
    min-width: 0;
    padding: 8px 12px;
    white-space: normal;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 14px;
    font-weight: 700;
    gap: 6px;
}

.inline-check {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    min-height: 42px;
}

input,
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}

input[type="checkbox"],
input[type="radio"] {
    min-height: auto;
    width: auto;
}

textarea {
    min-height: 92px;
}

table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.table-scroll {
    overflow-x: auto;
}

.table-scroll table {
    min-width: 920px;
}

.admin-list-table {
    table-layout: auto;
}

.admin-list-table th:last-child,
.admin-list-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.admin-purchase-orders-table {
    min-width: 1740px;
    table-layout: fixed;
}

.admin-purchase-orders-table th,
.admin-purchase-orders-table td {
    word-break: normal;
}

.admin-purchase-orders-table th:nth-child(1),
.admin-purchase-orders-table td:nth-child(1) {
    width: 170px;
}

.admin-purchase-orders-table th:nth-child(2),
.admin-purchase-orders-table td:nth-child(2) {
    width: 105px;
}

.admin-purchase-orders-table th:nth-child(3),
.admin-purchase-orders-table td:nth-child(3) {
    width: 150px;
}

.admin-purchase-orders-table th:nth-child(4),
.admin-purchase-orders-table td:nth-child(4) {
    width: 240px;
}

.admin-purchase-orders-table th:nth-child(5),
.admin-purchase-orders-table td:nth-child(5) {
    width: 130px;
}

.admin-purchase-orders-table th:nth-child(6),
.admin-purchase-orders-table td:nth-child(6) {
    width: 160px;
}

.admin-purchase-orders-table th:nth-child(7),
.admin-purchase-orders-table td:nth-child(7) {
    width: 155px;
    white-space: normal;
}

.admin-purchase-orders-table th:nth-child(8),
.admin-purchase-orders-table td:nth-child(8) {
    width: 220px;
    white-space: normal;
}

.admin-purchase-orders-table th:nth-child(9),
.admin-purchase-orders-table td:nth-child(9) {
    width: 405px;
    white-space: normal;
}

.club-purchase-orders-table {
    min-width: 1220px;
    table-layout: fixed;
}

.club-purchase-orders-table th,
.club-purchase-orders-table td {
    word-break: normal;
}

.club-purchase-orders-table th:nth-child(1),
.club-purchase-orders-table td:nth-child(1) {
    width: 170px;
}

.club-purchase-orders-table th:nth-child(2),
.club-purchase-orders-table td:nth-child(2) {
    width: 95px;
}

.club-purchase-orders-table th:nth-child(3),
.club-purchase-orders-table td:nth-child(3) {
    width: 250px;
}

.club-purchase-orders-table th:nth-child(4),
.club-purchase-orders-table td:nth-child(4) {
    width: 135px;
}

.club-purchase-orders-table th:nth-child(5),
.club-purchase-orders-table td:nth-child(5) {
    width: 255px;
}

.club-purchase-orders-table th:nth-child(6),
.club-purchase-orders-table td:nth-child(6) {
    width: 150px;
}

.club-purchase-orders-table th:nth-child(7),
.club-purchase-orders-table td:nth-child(7) {
    width: 145px;
}

.club-member-orders-table {
    min-width: 1360px;
    table-layout: fixed;
}

.club-member-orders-table th,
.club-member-orders-table td {
    overflow-wrap: normal;
    word-break: normal;
}

.club-member-orders-table th:nth-child(1),
.club-member-orders-table td:nth-child(1) {
    width: 78px;
}

.club-member-orders-table th:nth-child(2),
.club-member-orders-table td:nth-child(2) {
    width: 54px;
}

.club-member-orders-table th:nth-child(3),
.club-member-orders-table td:nth-child(3) {
    width: 170px;
}

.club-member-orders-table th:nth-child(4),
.club-member-orders-table td:nth-child(4) {
    width: 220px;
}

.club-member-orders-table td:nth-child(4) .muted {
    overflow-wrap: anywhere;
}

.club-member-orders-table th:nth-child(5),
.club-member-orders-table td:nth-child(5) {
    width: 145px;
}

.club-member-orders-table th:nth-child(6),
.club-member-orders-table td:nth-child(6) {
    width: 145px;
    white-space: nowrap;
}

.club-member-orders-table th:nth-child(7),
.club-member-orders-table td:nth-child(7) {
    width: 185px;
}

.club-member-orders-table th:nth-child(8),
.club-member-orders-table td:nth-child(8) {
    width: 145px;
}

.club-member-orders-table th:nth-child(9),
.club-member-orders-table td:nth-child(9) {
    width: 218px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-toolbar {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.admin-menu,
.tab-menu {
    position: relative;
}

.admin-menu summary,
.tab-menu summary {
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.admin-menu summary::-webkit-details-marker,
.tab-menu summary::-webkit-details-marker {
    display: none;
}

.admin-menu summary::after,
.tab-menu summary::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    content: "";
    display: inline-block;
    margin-left: 9px;
    transform: translateY(1px);
}

.admin-menu[open] summary::after,
.tab-menu[open] summary::after {
    border-bottom: 5px solid currentColor;
    border-top: 0;
}

.admin-menu-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(24, 32, 42, .14);
    display: grid;
    gap: 4px;
    left: 0;
    min-width: 260px;
    padding: 8px;
    position: absolute;
    top: calc(100% + 8px);
    z-index: 30;
}

.admin-menu-panel-right {
    left: auto;
    right: 0;
}

.admin-menu-panel a {
    border-radius: 6px;
    color: var(--ink);
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    text-decoration: none;
}

.admin-menu-panel a:hover {
    background: #f1f6f8;
}

.admin-menu-panel span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.tabs {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 22px 0 18px;
}

.filter-bar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-bar label {
    min-width: 240px;
}

.tab-button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    color: var(--muted);
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    text-decoration: none;
}

.tab-button:hover,
.tab-button.active {
    background: var(--surface);
    border-color: var(--line);
    border-bottom-color: var(--surface);
    color: var(--ink);
}

.admin-compact-tabs {
    align-items: flex-end;
}

.tab-menu .admin-menu-panel {
    min-width: 220px;
}

.dashboard-overview {
    display: grid;
    gap: 18px;
}

.overview-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.overview-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 6px;
    min-height: 116px;
    padding: 18px;
    text-decoration: none;
}

.overview-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(24, 32, 42, .08);
}

.overview-card.warning {
    border-color: #f0c48d;
}

.overview-card span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.overview-card strong {
    font-size: 36px;
    line-height: 1;
}

.section-heading {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading a {
    font-weight: 700;
    white-space: nowrap;
}

.overview-list {
    display: grid;
    gap: 8px;
}

.overview-list a {
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    display: grid;
    gap: 2px;
    padding: 11px 12px;
    text-decoration: none;
}

.overview-list a:hover {
    background: #f8fafc;
    border-color: #cbd6df;
}

.overview-list span {
    color: var(--muted);
}

.alert {
    border-radius: 6px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.alert.success {
    background: #e9f7f0;
    color: var(--success);
}

.alert.error {
    background: #fdecec;
    color: var(--danger);
}

.test-credentials {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #7c2d12;
    display: grid;
    gap: 5px;
    margin-top: 18px;
    padding: 12px 14px;
}

.muted {
    color: var(--muted);
}

.price {
    color: var(--accent);
    font-size: 24px;
    font-weight: 800;
}

.payment-summary {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 220px;
}

.club-global-payment {
    align-items: start;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 180px;
    margin: 18px 0 24px;
    padding: 18px;
}

.club-global-payment h3 {
    margin-top: 0;
}

.club-global-payment .qr {
    margin-top: 0;
    max-width: 180px;
}

.payment-details {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

.order-payment-form {
    gap: 8px;
}

.order-payment-bulk-form {
    margin-bottom: 16px;
}

.order-payment-select {
    margin-bottom: 8px;
}

.order-payment-form label {
    font-size: 12px;
}

.order-payment-form input,
.order-payment-form select {
    min-height: 36px;
    padding: 7px 9px;
}

.order-payment-form button {
    min-height: 36px;
}

.compact-inline-form {
    display: block;
}

.compact-inline-form select {
    min-height: 36px;
    padding: 7px 9px;
}

.line-item {
    display: grid;
    gap: 2px;
    margin-bottom: 8px;
}

.line-item span {
    color: var(--muted);
    font-size: 13px;
}

.extra-order-panel {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    margin-top: 6px;
    padding-top: 18px;
}

.extra-order-panel h3 {
    margin: 0;
}

.extra-order-model {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.extra-size-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
}

.extra-size-grid input {
    min-height: 38px;
}

.club-order-dialog {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(24, 32, 42, .24);
    max-height: calc(100vh - 32px);
    max-width: 880px;
    padding: 0;
    width: calc(100% - 32px);
}

.club-order-dialog::backdrop {
    background: rgba(24, 32, 42, .65);
}

.club-order-form {
    padding: 22px;
}

.club-order-dialog-header {
    align-items: start;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding-bottom: 14px;
}

.club-order-dialog-header h2,
.club-order-dialog-header p {
    margin: 0;
}

.club-order-dialog-header p {
    margin-top: 6px;
}

.club-order-content {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
}

.club-order-visuals {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.club-order-visuals figure {
    margin: 0;
}

.club-order-visuals .design-visual {
    aspect-ratio: 4 / 5;
    height: 160px;
    object-fit: contain;
    width: 100%;
}

.club-order-details {
    display: grid;
    gap: 16px;
}

.club-order-details > p {
    margin: 0;
}

.club-order-size-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.club-order-size-grid label {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.club-order-size-grid label span {
    color: var(--ink);
    font-size: 16px;
}

.club-order-summary {
    background: #f1f6f8;
    border: 1px solid #bfd4dc;
    border-radius: 6px;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
}

.club-order-summary div {
    display: grid;
    gap: 3px;
}

.club-order-summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.club-order-summary strong {
    font-size: 22px;
}

.badge {
    background: #e8edf2;
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 10px;
}

.badge.success {
    background: #e9f7f0;
    color: var(--success);
}

.badge.danger {
    background: #fdecec;
    color: var(--danger);
}

.stock-input {
    max-width: 96px;
    min-height: 36px;
}

.stock-size-input {
    max-width: none;
    min-height: 36px;
    min-width: 150px;
    width: 150px;
}

.stock-price-input {
    max-width: 132px;
    min-height: 36px;
}

.inventory-toolbar {
    margin: 0 0 18px;
}

.inventory-stock-summary {
    background: #f8fafb;
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 20px;
}

.inventory-stock-summary > div {
    display: grid;
    gap: 6px;
    padding: 16px 20px;
}

.inventory-stock-summary > div + div {
    border-left: 1px solid var(--line);
}

.inventory-stock-summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.inventory-stock-summary strong {
    font-size: 24px;
}

.inventory-stock-summary .combined-stock-total {
    background: #eef8f3;
}

.inventory-stock-summary .combined-stock-total strong {
    color: var(--success);
}

.stock-filter-summary {
    color: var(--muted);
}

.stock-filter-summary strong {
    color: var(--ink);
}

.row-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.row-actions form {
    display: block;
    flex: 0 0 auto;
}

.row-actions .button,
.row-actions button {
    min-width: max-content;
    white-space: nowrap;
}

.member-item-delete-toolbar {
    align-items: center;
    background: #f8fafb;
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 16px 0;
    padding: 14px 0;
}

.member-order-items-table {
    min-width: 1180px;
    table-layout: auto;
}

.member-order-items-table th {
    white-space: nowrap;
}

.member-order-items-table.is-editable th:first-child,
.member-order-items-table.is-editable td:first-child {
    min-width: 210px;
    text-align: left;
    width: auto;
}

.member-order-items-table.is-editable {
    min-width: 1520px;
}

.member-order-design-select {
    min-width: 190px;
}

.member-order-size-select {
    min-width: 105px;
}

.member-order-quantity-input {
    min-width: 82px;
    width: 92px;
}

.member-order-remove-item {
    align-items: center;
    color: var(--danger);
    display: inline-flex;
    gap: 7px;
    margin: 0;
    white-space: nowrap;
}

.member-order-add-item {
    align-items: end;
    background: #f8fafb;
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(240px, 1fr) minmax(210px, 1fr) minmax(120px, 0.5fr) auto;
    margin-top: 18px;
    padding: 18px 0;
}

.member-order-add-item h3,
.member-order-add-item p,
.member-order-add-item label {
    margin: 0;
}

.member-order-edit-actions {
    align-items: center;
    margin-top: 16px;
}

.purchase-order-actions {
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 100%;
}

.purchase-order-actions form {
    display: flex;
}

.order-type-badge {
    white-space: nowrap;
}

.order-filter-bar {
    margin-top: 8px;
}

.club-requirements-hint {
    margin: 18px 0;
}

.club-purchase-requirements {
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    margin: 22px 0;
    padding: 20px 0;
}

.section-heading-row {
    align-items: flex-start;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.section-heading-row h3,
.section-heading-row p {
    margin-top: 0;
}

.requirement-totals {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.requirement-totals span {
    background: #f4f7f9;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    white-space: nowrap;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.club-requirements-table {
    min-width: 1040px;
    table-layout: auto;
}

.club-requirements-table th {
    white-space: nowrap;
}

.club-requirements-table th:nth-last-child(-n+3),
.club-requirements-table td:nth-last-child(-n+3) {
    text-align: center;
    white-space: nowrap;
}

.club-print-preparation {
    border-top: 1px solid var(--line);
    margin-top: 26px;
    padding-top: 24px;
}

.club-print-preparation-heading h3,
.club-print-preparation-heading p {
    margin-top: 0;
}

.club-print-items {
    border-top: 1px solid var(--line);
}

.club-print-item {
    align-items: start;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(300px, 1fr) auto;
    padding: 22px 0;
}

.club-print-item-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.club-print-item-title h4 {
    font-size: 18px;
    margin: 0;
}

.club-print-quantities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.club-print-quantities span {
    align-items: center;
    background: #eef6f8;
    border: 1px solid #c9dfe6;
    border-radius: 6px;
    color: var(--primary-dark);
    display: inline-flex;
    gap: 8px;
    min-width: 70px;
    padding: 7px 9px;
}

.club-print-quantities strong {
    color: var(--ink);
}

.club-print-order-numbers,
.club-print-notes {
    margin-bottom: 0;
}

.club-print-files {
    margin-top: 14px;
}

.club-print-file-links {
    display: grid;
    gap: 7px;
    margin-top: 7px;
    max-width: 560px;
}

.club-print-file-link {
    align-items: center;
    background: #f3f5f7;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 8px 10px;
    text-decoration: none;
}

.club-print-file-link:hover {
    border-color: var(--primary);
}

.club-print-file-link > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.club-print-file-action {
    color: var(--primary);
    font-weight: 700;
    white-space: nowrap;
}

.club-print-visuals {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, clamp(72px, 8vw, 96px));
    justify-content: end;
}

.club-print-visuals figure {
    margin: 0;
    min-width: 0;
}

.club-print-visuals figcaption {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.club-print-visuals a,
.club-print-empty-visual {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: #f3f5f7;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.club-print-visuals img {
    height: 100%;
    object-fit: contain;
    padding: 8px;
    width: 100%;
}

.club-print-empty-visual {
    color: var(--muted);
    font-size: 12px;
    padding: 10px;
    text-align: center;
}

@media (max-width: 900px) {
    .section-heading-row,
    .club-print-item {
        display: grid;
        grid-template-columns: 1fr;
    }

    .member-order-add-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .member-order-add-item .member-order-quantity-input {
        width: 100%;
    }

    .requirement-totals {
        justify-content: flex-start;
    }

    .club-print-visuals {
        grid-template-columns: repeat(3, minmax(72px, 90px));
        justify-content: start;
    }
}

.stock-table {
    min-width: 1260px;
    table-layout: auto;
}

.stock-table th,
.stock-table td {
    overflow-wrap: normal;
    word-break: normal;
}

.stock-table th {
    white-space: nowrap;
}

.material-stock-table {
    min-width: 1180px;
}

.goodie-stock-table {
    min-width: 1320px;
}

.paper-print-table {
    min-width: 1320px;
}

.paper-print-table td:first-child {
    width: 100px;
}

.paper-mini-preview {
    height: 112px;
    width: 88px;
}

.paper-preview {
    max-height: 320px;
}

.paper-print-card {
    display: grid;
}

.paper-print-card-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr);
    overflow: hidden;
}

.paper-print-card-content {
    display: grid;
    gap: 12px;
}

.paper-print-card-content h3,
.paper-print-card-content p {
    margin: 0;
}

.design-print-files {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.design-print-file-list {
    margin-bottom: 1rem;
}

.design-print-file-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.design-print-file-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.design-print-file-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.paper-client-preview {
    aspect-ratio: 4 / 5;
    max-height: 260px;
}

.paper-client-placeholder {
    align-items: center;
    aspect-ratio: 4 / 5;
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    display: flex;
    font-weight: 700;
    justify-content: center;
    padding: 16px;
    text-align: center;
}

.paper-client-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.paper-client-details span {
    background: #e8edf2;
    border-radius: 999px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    padding: 5px 10px;
}

.paper-client-price-table {
    min-width: 0;
}

.paper-client-price-table th,
.paper-client-price-table td {
    padding: 8px 10px;
}

.paper-card-actions {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-column: 1 / -1;
}

.paper-order-form {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: none;
    width: 100%;
}

.paper-order-form button,
.paper-card-actions > .button {
    width: 100%;
}

.paper-order-total {
    background: #f1f6f8;
    border: 1px solid #bfd4dc;
    border-radius: 6px;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
}

.paper-order-total span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.paper-order-total strong {
    font-size: 18px;
}

.paper-personalization-field {
    grid-column: 1 / -1;
}

.paper-personalization-field textarea {
    min-height: 88px;
    resize: vertical;
    width: 100%;
}

.paper-order-history {
    margin-top: 18px;
}

.paper-order-table {
    min-width: 780px;
}

.paper-order-status-form {
    align-items: center;
    display: flex;
    gap: 8px;
}

.paper-order-status-form select {
    min-width: 150px;
}

.nested-panel {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.nested-panel h2 {
    margin: 0;
}

.paper-price-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(90px, .7fr) repeat(2, minmax(150px, 1fr));
}

.paper-sale-calculator {
    border: 0;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.paper-sale-calculator legend {
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.paper-sale-mode {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    justify-self: start;
}

.paper-sale-mode label {
    align-items: center;
    background: #e8eef3;
    border: 1px solid var(--line);
    cursor: pointer;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
}

.paper-sale-mode label:first-child {
    border-radius: 6px 0 0 6px;
}

.paper-sale-mode label:last-child {
    border-left: 0;
    border-radius: 0 6px 6px 0;
}

.paper-sale-mode label:has(input:checked) {
    background: var(--primary);
    color: #fff;
}

.paper-sale-mode input {
    margin: 0;
    width: auto;
}

.paper-ratio-panel {
    align-items: end;
    display: grid;
    gap: 12px 16px;
    grid-template-columns: minmax(240px, 1fr) auto;
    max-width: 720px;
}

.paper-ratio-panel[hidden] {
    display: none;
}

.paper-ratio-panel label {
    margin: 0;
}

.paper-ratio-panel input[type="range"] {
    padding: 0;
}

.paper-ratio-value {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 18px;
    font-weight: 800;
    min-width: 90px;
    padding: 9px 12px;
    text-align: center;
}

.paper-ratio-panel .muted {
    grid-column: 1 / -1;
}

.js-paper-sale[readonly] {
    background: #eef6f8;
    color: var(--ink);
    font-weight: 700;
}

.mini-price-table {
    font-size: 13px;
    min-width: 420px;
}

.mini-price-table th,
.mini-price-table td {
    padding: 7px 8px;
}

.consumption-table {
    min-width: 960px;
}

.consumption-summary-table {
    min-width: 1320px;
}

.consumption-summary-table td:nth-child(3) {
    min-width: 300px;
}

.consumption-summary-table td:nth-child(4) {
    min-width: 150px;
}

.consumption-summary-table .muted {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.consumption-table form {
    display: block;
}

.replacement-form {
    min-width: 330px;
}

.replacement-form select {
    margin-bottom: 8px;
}

.profitability-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.profitability-grid > div {
    background: #f4f7f9;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 14px 18px;
}

.profitability-grid > div.positive {
    background: #eef8ee;
    border-color: #b8ddc8;
}

.profitability-grid > div.negative {
    background: #fdecec;
    border-color: #efc2bd;
}

.profitability-grid span,
.profitability-grid small {
    color: var(--muted);
    font-weight: 700;
}

.profitability-grid strong {
    font-size: 24px;
}

.profitability-grid .positive strong {
    color: var(--success);
}

.profitability-grid .negative strong {
    color: var(--danger);
}

.profitability-note {
    margin-bottom: 0;
}

.stock-table th:last-child,
.stock-table td:last-child {
    min-width: 320px;
    white-space: nowrap;
}

.stock-table th:first-child,
.stock-table td:first-child {
    min-width: 260px;
}

.stock-table th:nth-child(3),
.stock-table td.stock-size-cell {
    min-width: 170px;
    width: 170px;
}

.stock-table td.stock-size-cell .stock-size-input {
    max-width: none;
    min-width: 150px;
    width: 150px;
}

.stock-product-visual {
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    flex: 0 0 88px;
    height: 88px;
    object-fit: contain;
    padding: 4px;
    width: 88px;
}

.stock-file-input {
    font-size: 12px;
    margin-top: 8px;
    max-width: 132px;
    min-height: 36px;
    padding: 6px;
}

.stock-remove-image {
    font-size: 12px;
    margin-top: 6px;
    min-height: 0;
}

.stock-image-help {
    color: var(--muted);
    display: block;
    font-size: 11px;
    line-height: 1.3;
    margin-top: 5px;
    max-width: 132px;
}

.inventory-visual-bulk {
    align-items: end;
    background: #f5f8fa;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(220px, 0.7fr) minmax(540px, 1.6fr);
    margin: 18px 0 24px;
    padding: 18px;
}

.inventory-visual-bulk h3,
.inventory-visual-bulk p {
    margin: 0;
}

.inventory-visual-bulk p {
    margin-top: 6px;
}

.inventory-visual-bulk-form {
    margin: 0;
}

.section-heading-actions {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-heading-actions h1,
.section-heading-actions p {
    margin-top: 0;
}

.form-disclosure {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}

.form-disclosure > summary {
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    list-style-position: inside;
    padding: 8px 0;
}

.form-disclosure > form {
    margin-top: 16px;
}

.form-disclosure .full-width {
    grid-column: 1 / -1;
}

.compact-action {
    margin-top: 10px;
}

.quote-product-summary {
    background: #f5f8fa;
    border-left: 4px solid var(--primary);
    display: grid;
    gap: 4px;
    margin-bottom: 20px;
    padding: 14px 16px;
}

.quote-direct-shipping-check {
    margin: 18px 0 8px;
}

.quote-direct-shipping-fields {
    background: #f5f8fa;
    border-left: 4px solid var(--primary);
    margin-bottom: 18px;
    padding: 16px;
}

.supplier-selection-fieldset {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin: 18px 0;
    padding: 16px;
}

.supplier-selection-fieldset legend {
    font-weight: 700;
    padding: 0 8px;
}

.supplier-selection-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-selection-option {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    margin: 0;
    min-height: 64px;
    padding: 10px 12px;
}

.supplier-selection-option:has(input:checked) {
    background: #edf7fa;
    border-color: var(--primary);
}

.supplier-selection-option input {
    flex: 0 0 auto;
    min-height: 0;
    width: auto;
}

.supplier-selection-option span,
.supplier-selection-option small {
    display: block;
}

.supplier-selection-option small {
    color: var(--muted);
    margin-top: 2px;
}

.quote-comparison-table {
    min-width: 1180px;
}

.quote-comparison-table .selected-offer td {
    background: #eef8ee;
}

.quote-cost-summary {
    display: grid;
    gap: 4px 18px;
    grid-template-columns: auto auto;
}

.quote-cost-summary span {
    color: var(--muted);
}

.quote-print-document {
    background: var(--surface);
    border: 1px solid var(--line);
    margin: 20px auto;
    max-width: 900px;
    padding: 44px;
}

.quote-print-document section {
    margin-top: 30px;
}

.quote-print-header {
    border-bottom: 2px solid var(--ink);
    display: flex;
    gap: 40px;
    justify-content: space-between;
    padding-bottom: 24px;
}

.quote-print-header h1 {
    margin: 0 0 8px;
}

@media print {
    body {
        background: #fff;
    }

    .topbar,
    .print-toolbar,
    .screen-only {
        display: none !important;
    }

    .page {
        max-width: none;
        padding: 0;
    }

    .quote-print-document {
        border: 0;
        margin: 0;
        max-width: none;
        padding: 0;
    }
}

@media (max-width: 900px) {
    .inventory-visual-bulk {
        grid-template-columns: 1fr;
    }

    .section-heading-actions,
    .quote-print-header {
        flex-direction: column;
    }

    .supplier-selection-grid {
        grid-template-columns: 1fr;
    }
}

.calculator-panel {
    max-width: 760px;
}

.calculator-result {
    background: #eef8ee;
    margin-top: 18px;
    max-width: 760px;
}

.calculator-result td:last-child {
    text-align: right;
}

.calculator-total {
    font-size: 18px;
    font-weight: 800;
}

.visual-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin: 12px 0;
}

.visual-grid figure {
    margin: 0;
}

.design-visual {
    aspect-ratio: 4 / 5;
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    object-fit: contain;
    padding: 6px;
    width: 100%;
}

.mini-visual-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, 72px);
    max-width: 240px;
}

.mini-visual-grid figure {
    margin: 0;
    width: 72px;
}

.mini-design-visual {
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    height: 90px;
    object-fit: contain;
    padding: 4px;
    width: 72px;
}

figcaption {
    color: var(--muted);
    font-size: 12px;
    margin-top: 5px;
}

.stock-technical-details {
    min-width: 220px;
    vertical-align: top;
}

.stock-technical-details strong,
.stock-technical-details span,
.stock-technical-details small {
    display: block;
    line-height: 1.35;
    margin-bottom: 4px;
}

.stock-technical-details small {
    color: var(--muted);
    max-width: 260px;
    white-space: normal;
}

.stock-document-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.stock-technical-details .stock-size-guide-badge {
    display: inline-flex;
    margin: 0;
    text-decoration: none;
    white-space: nowrap;
}

.stock-product-link {
    align-items: center;
    color: var(--ink);
    display: flex;
    gap: 14px;
    text-decoration: none;
}

.stock-product-link:hover strong {
    color: var(--primary);
    text-decoration: underline;
}

.stock-product-name strong,
.stock-product-name small {
    display: block;
    line-height: 1.35;
}

.stock-product-name small {
    color: var(--muted);
    margin-top: 4px;
}

.stock-product-placeholder {
    align-items: center;
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    display: flex;
    flex: 0 0 88px;
    font-size: 12px;
    height: 88px;
    justify-content: center;
    padding: 8px;
    text-align: center;
}

.stock-item-layout {
    align-items: start;
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    margin-bottom: 32px;
}

.stock-item-visual-column {
    display: grid;
    gap: 12px;
}

.stock-size-guide-admin {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding-top: 18px;
}

.stock-size-guide-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    max-height: 190px;
    object-fit: contain;
    padding: 6px;
    width: 100%;
}

.stock-item-visual {
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    height: 320px;
    object-fit: contain;
    padding: 12px;
    width: 100%;
}

.stock-item-empty-visual {
    align-items: center;
    background: #f1f3f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    display: flex;
    height: 260px;
    justify-content: center;
}

.stock-item-details-form {
    margin: 0;
}

.stock-item-variants-table {
    min-width: 820px;
    table-layout: auto;
}

.stock-item-variants-table input {
    max-width: 220px;
}

.stock-item-save-actions {
    margin-top: 24px;
}

.stock-reference-split {
    align-items: end;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.7fr) auto;
    margin-top: 24px;
    padding: 18px;
}

.stock-variant-duplicate {
    align-items: end;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(190px, 1fr) repeat(4, minmax(130px, 0.7fr));
    margin-top: 24px;
    padding: 18px;
}

.stock-variant-duplicate h3,
.stock-variant-duplicate p,
.stock-variant-duplicate label {
    margin: 0;
}

.stock-duplicate-copy {
    grid-column: 1 / -2;
}

.stock-reference-split h3,
.stock-reference-split p,
.stock-reference-split label {
    margin: 0;
}

.size-guide-disclosure {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin: 14px 0;
    padding: 12px;
}

.size-guide-disclosure summary {
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.size-guide-disclosure[open] summary {
    margin-bottom: 12px;
}

.size-guide-image {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    max-height: 360px;
    object-fit: contain;
    padding: 8px;
    width: 100%;
}

.size-guide-pdf {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    height: 280px;
    width: 100%;
}

.technical-sheet-pdf {
    height: 520px;
}

.technical-sheet-image {
    max-height: 620px;
}

.size-guide-open-link {
    display: inline-block;
    font-weight: 700;
    margin-top: 10px;
}

@media (max-width: 800px) {
    .stock-item-layout {
        grid-template-columns: 1fr;
    }

    .stock-item-visual-column {
        max-width: 360px;
    }

    .stock-reference-split {
        grid-template-columns: 1fr;
    }

    .inventory-stock-summary {
        grid-template-columns: 1fr;
    }

    .inventory-stock-summary > div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .stock-variant-duplicate {
        grid-template-columns: 1fr;
    }

    .stock-duplicate-copy {
        grid-column: auto;
    }
}

.qr {
    background: #fff;
    border: 10px solid #fff;
    box-shadow: 0 0 0 1px var(--line);
    display: block;
    height: auto;
    margin-top: 10px;
    max-width: 220px;
    width: 100%;
}

.qr-small {
    border-width: 6px;
    max-width: 120px;
}

@media (max-width: 1180px) {
    .paper-print-card-layout {
        grid-template-columns: 1fr;
    }

    .paper-order-form {
        max-width: none;
    }
}

@media (max-width: 980px) {
    .paper-order-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        padding-bottom: 12px;
        padding-top: 12px;
    }

    .topbar-actions {
        margin-left: 0;
        position: static;
        transform: none;
        width: 100%;
    }

    .topbar-button {
        width: 100%;
    }

    .admin-toolbar,
    .admin-menu,
    .admin-menu summary {
        width: 100%;
    }

    .admin-menu-panel,
    .tab-menu .admin-menu-panel {
        margin-top: 8px;
        min-width: 0;
        position: static;
        width: 100%;
    }

    .tabs {
        align-items: stretch;
    }

    .tab-menu {
        width: 100%;
    }

    .tab-menu .tab-button {
        width: 100%;
    }

    .hero,
    .choice-grid,
    .overview-grid,
    .grid.cols-2,
    .grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 24px 14px 44px;
    }

    .payment-summary {
        grid-template-columns: 1fr;
    }

    .club-order-dialog-header {
        display: grid;
    }

    .club-order-content {
        grid-template-columns: 1fr;
    }

    .club-order-visuals {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }

    .club-order-visuals .design-visual {
        height: 150px;
    }

    .club-order-summary {
        grid-template-columns: 1fr;
    }

    .model-card-actions {
        grid-template-columns: 1fr;
    }

    .paper-print-card-layout {
        grid-template-columns: 1fr;
    }

    .paper-order-form {
        grid-template-columns: 1fr;
    }

    .profitability-grid {
        grid-template-columns: 1fr;
    }

    .paper-price-grid {
        grid-template-columns: 1fr;
    }

    .paper-sale-mode,
    .paper-ratio-panel {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .paper-ratio-panel .muted {
        grid-column: auto;
    }
}
.order-member-summary + .order-member-summary {
    margin-top: 0.75rem;
}

.order-member-summary .muted {
    display: block;
    margin-top: 0.2rem;
    line-height: 1.4;
}
