/* =========================================================
   BJJ Lab · Admin shell v2
   Two-tier navigation (rail + sub-nav) + topbar + content
   Loaded alongside (not replacing) legacy admin CSS
   ========================================================= */

@font-face { font-family: "BJJ Lab Shop"; src: url("/fonts/Montserrat-Black.ttf") format("truetype"); font-weight: 900; font-style: normal; font-display: swap; }
.shop-public .shop-nav { background: var(--neutral-0); border-bottom: var(--border-width) solid var(--border-default); font-family: var(--font-ui); }
.shop-public .shop-nav-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: var(--space-6); max-width: var(--shop-content-width); padding: var(--space-5) var(--space-4); margin: 0 auto; }
.shop-public .shop-nav-logo { display: inline-flex; align-items: center; gap: var(--space-3); width: fit-content; min-width: 0; font-family: "BJJ Lab Shop", var(--font-ui); font-size: var(--shop-brand-size); font-weight: var(--shop-heading-weight); line-height: var(--shop-heading-line-height); letter-spacing: var(--shop-heading-tracking); text-transform: uppercase; text-decoration: none; color: var(--neutral-900); white-space: nowrap; }
.shop-brand-mark-v2 { display: block; flex: none; width: var(--shop-brand-mark-size); height: var(--shop-brand-mark-size); background: currentColor; mask: url('/images/logos/shop-favicon-white.svg') center / contain no-repeat; }
.shop-public .shop-nav-links { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-6); margin: 0; padding: 0; border: 0; }
.shop-public .shop-nav-links a { margin: 0; font-size: var(--fs-body); font-weight: var(--fw-medium); letter-spacing: normal; text-transform: none; text-decoration: none; color: var(--text-secondary); }
.shop-public .shop-nav-item { display: flex; align-items: center; position: relative; }
.shop-public .shop-nav-links > .shop-nav-item > a { font-size: var(--fs-body); font-weight: var(--fw-semibold); letter-spacing: var(--shop-navigation-tracking); text-transform: uppercase; color: var(--neutral-900); }
.shop-public .shop-nav-all-v2 { display: none; }
.shop-header-actions-v2 { grid-column: 3; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.shop-public .shop-header-actions-v2 .shop-icon-link-v2 { position: relative; display: flex; align-items: center; justify-content: center; box-sizing: border-box; flex: none; width: var(--button-height-touch); height: var(--button-height-touch); min-height: var(--button-height-touch); padding: 0; margin: 0; border: 0; color: var(--neutral-900); text-decoration: none; font-size: var(--fs-h2); line-height: var(--shop-heading-line-height); }
.shop-public .shop-icon-link-v2:hover { background: var(--neutral-50); border-radius: var(--radius-pill); }
.shop-public .shop-nav-item > a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--button-height-touch); padding: var(--space-3) 0; border-bottom: var(--border-width) solid transparent; }
.shop-public .shop-nav-item > a:hover { color: var(--neutral-900); }
.shop-public .shop-nav-links a[aria-current] { color: var(--neutral-900); border-bottom-color: var(--neutral-900); }
.shop-public .shop-cart-link { font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--neutral-900); }
.shop-public .shop-cart-count { position: absolute; top: 0; right: 0; display: grid; place-items: center; box-sizing: border-box; min-width: var(--space-5); height: var(--space-5); padding: 0 var(--space-1); border: var(--border-width) solid var(--neutral-0); border-radius: var(--radius-pill); background: var(--neutral-900); color: var(--neutral-0); font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold); line-height: var(--shop-heading-line-height); font-variant-numeric: tabular-nums; }
.shop-public .shop-cart-count[hidden] { display: none; }
.shop-public .shop-cart-dropdown, .shop-public .shop-login-dropdown { border: var(--border-width) solid var(--border-default); box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); background: var(--neutral-0); }
.shop-public .shop-cart-nav:focus-within .shop-cart-dropdown { display: block; }
.shop-public .shop-cart-button, .shop-public .shop-login-dropdown button { text-transform: none; letter-spacing: normal; background: var(--neutral-900); color: var(--neutral-0); font-family: var(--font-ui); font-size: var(--fs-body); font-weight: var(--fw-semibold); border-radius: var(--radius-sm); min-height: var(--button-height-touch); }
.shop-public .shop-cart-button { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; padding: var(--space-3) var(--space-4); line-height: var(--shop-line-height); margin: 0; }
.shop-public .shop-login-dropdown { min-width: var(--shop-account-panel-width); padding: var(--space-5); }
.shop-account-title-v2 { font-family: "BJJ Lab Shop", var(--font-ui); font-size: var(--fs-h2); font-weight: var(--shop-heading-weight); color: var(--neutral-900); margin: 0 0 var(--space-5); }
.shop-public .shop-account-orders-v2 { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-4); color: var(--text-secondary); font-size: var(--fs-body); text-decoration: none; }
.shop-public .shop-login-dropdown label { text-transform: none; letter-spacing: normal; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-secondary); }
.shop-public .shop-login-dropdown input { border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); min-height: var(--button-height-touch); font: inherit; }
.shop-public .shop-menu-toggle { display: none; border: 0; background: transparent; color: var(--neutral-900); }
.shop-public .shop-menu-close-v2 { display: none; }
.shop-public .shop-nav :is(a, button):focus-visible { outline: var(--border-width) solid var(--color-primary); outline-offset: var(--space-1); }
@media (max-width: 1279px) {
    .shop-public .shop-nav-inner { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-1); padding: var(--space-3); }
    .shop-public .shop-nav-logo { grid-column: 2; grid-row: 1; justify-self: center; font-size: var(--shop-brand-mobile-size); gap: var(--space-2); }
    .shop-brand-mark-v2 { display: none; }
    .shop-header-actions-v2 { gap: 0; }
    .shop-public .shop-cart-nav { position: static; }
    .shop-public .shop-cart-nav .shop-cart-dropdown { display: none; }
    .shop-public .shop-menu-toggle { display: grid; grid-column: 1; grid-row: 1; place-items: center; width: var(--button-height-touch); height: var(--button-height-touch); padding: 0; font-size: var(--fs-h2); cursor: pointer; }
    .shop-menu-toggle[aria-expanded="true"] .fa-bars { display: none; }
    .shop-public .shop-menu-toggle[aria-expanded="true"] .shop-menu-close-v2 { display: block; }
    .shop-public .shop-nav-links { grid-column: 1 / -1; grid-row: 2; display: none; margin-top: var(--space-3); gap: 0; align-items: stretch; border-top: var(--border-width) solid var(--border-subtle); }
    .shop-public .shop-nav-all-v2 { display: flex; }
    .shop-public .shop-nav-links.is-open { display: flex; flex-direction: column; }
    .shop-public .shop-nav-links .shop-nav-item { flex-wrap: wrap; border-bottom: var(--border-width) solid var(--border-subtle); }
    .shop-public .shop-nav-links .shop-nav-item > a { flex: 1; padding: var(--space-3) 0; }
    .shop-public .shop-login-nav { position: static; }
    .shop-public .shop-header-actions-v2 .shop-login-dropdown { position: absolute; right: var(--space-3); top: 100%; width: min(var(--shop-account-panel-width), calc(100vw - 2 * var(--space-3))); min-width: 0; padding: var(--space-5); margin: 0; border: var(--border-width) solid var(--border-default); box-shadow: var(--shadow-md); z-index: var(--shop-header-panel-layer); }
}
.shop-checkout-v2 { max-width: var(--shop-content-width); margin: 0 auto; color: var(--neutral-900); font-family: var(--font-ui); font-size: var(--fs-body); line-height: var(--shop-line-height); }
.shop-checkout-v2 *, .shop-checkout-dialog-v2 * { box-sizing: border-box; }
.shop-checkout-heading-v2 { padding: var(--space-6) 0 var(--space-6); }
.shop-checkout-heading-v2 h1 { font-family: "BJJ Lab Shop", var(--font-ui); font-size: var(--shop-heading-size); font-weight: var(--shop-heading-weight); letter-spacing: var(--shop-heading-tracking); line-height: var(--shop-heading-line-height); text-transform: uppercase; margin: 0; }
.shop-checkout-heading-v2 > p:last-child { margin: 0; color: var(--text-secondary); font-size: var(--fs-h3); }
.shop-checkout-eyebrow-v2 { font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--shop-eyebrow-tracking); text-transform: uppercase; margin: 0; color: var(--text-secondary); }
.shop-checkout-back-v2 { color: var(--neutral-900); font-size: var(--fs-sm); background: transparent; border: 0; padding: var(--space-2) 0; text-decoration: none; cursor: pointer; }
.shop-checkout-back-v2:hover { color: var(--neutral-900); text-decoration: underline; }
.shop-checkout-heading-v2 > a { float: right; }
.shop-checkout-grid-v2 { display: grid; grid-template-columns: minmax(0, 1fr) var(--shop-summary-width); align-items: start; gap: var(--space-10); }
.shop-checkout-section-heading-v2 { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-bottom: var(--space-6); }
.shop-checkout-section-heading-v2 h2 { font-size: var(--fs-h2); font-weight: var(--fw-semibold); margin: 0; letter-spacing: normal; }
.shop-checkout-section-heading-v2 > span { color: var(--text-secondary); font-size: var(--fs-sm); }
.shop-checkout-bag-v2 > .shop-checkout-section-heading-v2 { border-bottom: var(--border-width) solid var(--neutral-900); }
.shop-cart-row-v2 { display: grid; grid-template-columns: var(--shop-product-image-width) minmax(0, 1fr) auto; gap: var(--space-5); align-items: start; padding: var(--space-6) 0; border-bottom: var(--border-width) solid var(--border-default); }
.shop-cart-image-v2 { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: var(--shop-product-image-ratio); background: var(--neutral-50); border-radius: var(--radius-sm); overflow: hidden; color: var(--text-tertiary); font-size: var(--fs-caption); }
.shop-cart-image-v2 img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.shop-cart-details-v2 { min-width: 0; }
.shop-cart-name-v2 { display: block; color: var(--neutral-900); font-size: var(--fs-h3); font-weight: var(--fw-semibold); text-decoration: none; line-height: var(--shop-line-height); overflow-wrap: anywhere; }
.shop-cart-name-v2:hover { color: var(--neutral-900); text-decoration: underline; }
.shop-cart-meta-v2 { margin: var(--space-1) 0 var(--space-4); color: var(--text-secondary); font-size: var(--fs-sm); }
.shop-cart-controls-v2 { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.shop-cart-quantity-v2 { display: inline-flex; align-items: center; border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-surface); }
.shop-cart-quantity-v2 button { width: var(--button-height-touch); height: var(--button-height-touch); border: 0; background: transparent; color: var(--neutral-900); font-size: var(--fs-h2); cursor: pointer; }
.shop-cart-quantity-v2 input { appearance: textfield; -moz-appearance: textfield; width: var(--shop-quantity-width); height: var(--button-height-touch); padding: 0; border: 0; text-align: center; border-radius: 0; font: inherit; background: transparent; color: var(--neutral-900); }
.shop-cart-quantity-v2 input::-webkit-inner-spin-button, .shop-cart-quantity-v2 input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.shop-cart-quantity-v2 button:disabled { color: var(--neutral-400); cursor: default; }
.shop-cart-remove-v2 { background: transparent; color: var(--text-secondary); border: 0; padding: var(--space-2) 0; font: inherit; font-size: var(--fs-caption); text-decoration: underline; text-underline-offset: var(--space-1); cursor: pointer; }
.shop-cart-price-v2 { font-weight: var(--fw-semibold); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: var(--space-1); }
.shop-cart-warning-v2 { color: var(--color-error-text); font-size: var(--fs-sm); margin: var(--space-2) 0; }
.shop-cart-warning-v2:empty { display: none; }
.shop-checkout-pickup-v2 { display: flex; gap: var(--space-4); margin-top: var(--space-6); padding: var(--space-6); background: var(--neutral-50); border-radius: var(--radius-sm); }
.shop-checkout-pickup-icon-v2 { font-size: var(--fs-h2); }
.shop-checkout-pickup-v2 h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); margin: 0 0 var(--space-2); }
.shop-checkout-pickup-v2 p { margin: 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.shop-checkout-summary-v2 { position: sticky; top: var(--space-6); padding: var(--shop-summary-padding); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-lg); background: var(--neutral-25); }
.shop-checkout-totals-v2 { margin: 0 0 var(--space-6); }
.shop-checkout-totals-v2 > div { display: flex; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-3); }
.shop-checkout-totals-v2 dt { font-weight: var(--fw-regular); color: var(--text-secondary); }
.shop-checkout-totals-v2 dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.shop-checkout-totals-v2 .shop-checkout-total-v2 { padding-top: var(--space-5); margin-top: var(--space-5); border-top: var(--border-width) solid var(--border-default); align-items: baseline; }
.shop-checkout-total-v2 dt { color: var(--neutral-900); font-weight: var(--fw-semibold); }
.shop-checkout-total-v2 dd { font-size: var(--fs-h1); font-weight: var(--fw-semibold); }
.shop-checkout-fields-v2 { padding: 0; margin: 0 0 var(--space-6); min-width: 0; border: 0; }
.shop-checkout-fields-v2 legend { font-size: var(--fs-h3); color: var(--neutral-900); font-weight: var(--fw-semibold); border: 0; margin: 0 0 var(--space-4); padding: 0; }
.shop-checkout-field-v2 + .shop-checkout-field-v2 { margin-top: var(--space-3); }
.shop-checkout-field-v2 label { display: block; margin: 0 0 var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-regular); }
.shop-checkout-field-v2 input, .shop-checkout-field-v2 select, .shop-checkout-notes-v2 textarea { display: block; width: 100%; min-height: var(--shop-field-height); padding: var(--space-3); background: var(--bg-surface); border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); color: var(--neutral-900); font: inherit; font-size: var(--shop-field-font-size); box-shadow: none; }
.shop-checkout-field-v2 input:focus, .shop-checkout-field-v2 select:focus, .shop-checkout-notes-v2 textarea:focus { border-color: var(--neutral-900); outline: var(--border-width) solid var(--neutral-900); outline-offset: 0; }
.shop-checkout-field-v2 input::placeholder, .shop-checkout-notes-v2 textarea::placeholder { color: var(--text-tertiary); }
.shop-checkout-payment-v2 { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); margin: 0; border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-surface); cursor: pointer; font-weight: var(--fw-regular); }
.shop-checkout-payment-v2 + .shop-checkout-payment-v2 { margin-top: var(--space-2); }
.shop-checkout-payment-v2:has(input:checked) { border-color: var(--neutral-900); }
.shop-checkout-payment-v2 input { accent-color: var(--neutral-900); margin: 0; flex-shrink: 0; width: var(--space-4); height: var(--space-4); }
.shop-checkout-payment-v2 > span { flex: 1; min-width: 0; }
.shop-checkout-payment-v2 strong, .shop-checkout-payment-v2 small { display: block; }
.shop-checkout-payment-v2 strong { font-weight: var(--fw-medium); font-size: var(--fs-body); }
.shop-checkout-payment-v2 small { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: var(--space-1); overflow-wrap: anywhere; }
.shop-checkout-notes-v2 { margin: 0 0 var(--space-6); }
.shop-checkout-notes-v2 summary { cursor: pointer; font-size: var(--fs-sm); padding: var(--space-2) 0; }
.shop-checkout-notes-v2 summary span { color: var(--text-tertiary); margin-left: var(--space-2); font-size: var(--fs-caption); }
.shop-checkout-notes-v2 label { font-size: var(--fs-sm); font-weight: var(--fw-regular); margin-top: var(--space-3); }
.shop-checkout-notes-v2 textarea { margin-top: var(--space-2); resize: vertical; }
.shop-checkout-button-v2 { display: flex; align-items: center; justify-content: center; gap: var(--space-4); width: 100%; min-height: var(--shop-action-height); padding: var(--space-4) var(--space-5); border: var(--border-width) solid var(--neutral-900); border-radius: var(--radius-sm); background: var(--neutral-900); color: var(--neutral-0); font: inherit; font-size: var(--fs-h3); font-weight: var(--fw-semibold); text-decoration: none; cursor: pointer; }
.shop-checkout-button-v2:hover { color: var(--neutral-0); background: var(--neutral-700); text-decoration: none; }
.shop-checkout-button-v2:disabled { background: var(--neutral-200); border-color: var(--neutral-200); color: var(--neutral-500); cursor: not-allowed; }
.shop-checkout-button-v2 .chev-right { margin-left: auto; }
.shop-checkout-button-v2:focus-visible, .shop-checkout-back-v2:focus-visible, .shop-cart-controls-v2 :focus-visible { outline: var(--border-width) solid var(--neutral-900); outline-offset: var(--space-1); }
.shop-checkout-reassurance-v2 { display: flex; align-items: baseline; justify-content: center; gap: var(--space-2); margin: var(--space-4) 0 0; color: var(--text-secondary); font-size: var(--fs-caption); text-align: center; }
.shop-checkout-muted-v2 { color: var(--text-secondary); }
.shop-checkout-notice-v2, .shop-checkout-unavailable-v2 { padding: var(--space-4); border-radius: var(--radius-sm); background: var(--color-warning-subtle); color: var(--color-warning-text); font-size: var(--fs-sm); line-height: var(--shop-line-height); }
.shop-checkout-notice-v2:empty { display: none; }
.shop-checkout-empty-v2 { padding: var(--space-10); margin-bottom: var(--space-10); background: var(--neutral-50); text-align: center; border-radius: var(--radius-lg); }
.shop-checkout-empty-v2 h2 { font-size: var(--fs-h1); font-weight: var(--fw-semibold); margin: var(--space-5) 0 var(--space-3); }
.shop-checkout-empty-v2 p { color: var(--text-secondary); margin: 0 0 var(--space-6); }
.shop-checkout-empty-icon-v2 { font-size: var(--fs-display); }
.shop-checkout-empty-v2 .shop-checkout-button-v2 { width: fit-content; margin: 0 auto; }
.shop-checkout-dialog-v2 { font-family: var(--font-ui); color: var(--neutral-900); }
.shop-checkout-dialog-v2 .modal-v2-title { font-size: var(--fs-h1); font-weight: var(--fw-semibold); margin-top: var(--space-2); }
.shop-checkout-dialog-v2 .modal-v2-footer { flex-wrap: wrap; justify-content: center; gap: var(--space-5); }
.shop-checkout-dialog-v2 .shop-checkout-review-v2 { display: block; margin: 0; }
.shop-checkout-review-v2 > div { margin-bottom: var(--space-5); }
.shop-checkout-dialog-v2 .shop-checkout-review-v2 dt { padding: 0; font-size: var(--fs-caption); color: var(--text-secondary); font-weight: var(--fw-regular); margin-bottom: var(--space-1); }
.shop-checkout-dialog-v2 .shop-checkout-review-v2 dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.shop-checkout-review-total-v2 { border-top: var(--border-width) solid var(--border-default); padding-top: var(--space-5); margin-bottom: 0; font-weight: var(--fw-semibold); font-size: var(--fs-h1); }
@media (max-width: 991px) {
    .shop-checkout-grid-v2 { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
    .shop-checkout-summary-v2 { position: static; }
}
@media (max-width: 767px) {
    .shop-checkout-heading-v2 { padding: var(--space-3) 0 var(--space-5); }
    .shop-checkout-heading-v2 > a { float: none; display: inline-flex; margin-bottom: var(--space-6); }
    .shop-cart-row-v2 { grid-template-columns: var(--shop-product-image-mobile-width) minmax(0, 1fr); column-gap: var(--space-4); row-gap: var(--space-2); }
    .shop-cart-image-v2 { grid-row: span 2; }
    .shop-cart-price-v2 { grid-column: 2; }
    .shop-checkout-summary-v2 { padding: var(--space-5); }
    .shop-checkout-empty-v2 { padding: var(--space-10) var(--space-5); }
}
.shop-pagination-v2 { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: center; margin: var(--space-6) 0; }
.shop-product-v2 { max-width: var(--shop-content-width); margin: 0 auto; color: var(--neutral-900); font-family: var(--font-ui); font-size: var(--fs-body); line-height: var(--shop-line-height); }
.shop-product-v2 *, .shop-product-v2 *::before { box-sizing: border-box; }
.shop-product-navigation-v2 { padding: var(--space-2) 0 var(--space-6); }
.shop-product-v2 .product-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-10); align-items: start; }
.shop-product-v2 .product-media { position: sticky; top: var(--space-6); min-width: 0; }
.shop-product-v2 .product-info { min-width: 0; padding: var(--space-2) 0; }
.shop-product-v2 .product-main-image-wrapper { position: relative; aspect-ratio: var(--shop-product-image-ratio); overflow: hidden; background: var(--neutral-50); border-radius: var(--radius-sm); }
.shop-product-v2 .product-main-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-product-v2 .product-image-placeholder-v2 { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--space-3); color: var(--text-tertiary); font-size: var(--fs-display); }
.shop-product-v2 .product-image-placeholder-v2 span { font-size: var(--fs-sm); }
.shop-product-v2 .product-thumbs { display: grid; grid-template-columns: repeat(auto-fill, var(--shop-product-thumbnail-width)); gap: var(--space-2); padding: var(--space-2) 0; margin-top: var(--space-1); }
.shop-product-v2 .product-thumbs:empty { display: none; }
.shop-product-v2 .product-thumb { width: 100%; min-width: 0; aspect-ratio: var(--shop-product-image-ratio); padding: var(--space-1); border: var(--border-width) solid transparent; background: transparent; cursor: pointer; border-radius: var(--radius-sm); }
.shop-product-v2 .product-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-product-v2 .product-thumb.is-active { border-color: var(--neutral-900); }
.shop-product-v2 .product-name { font-family: "BJJ Lab Shop", var(--font-ui); font-size: var(--shop-product-title-size); font-weight: var(--shop-heading-weight); letter-spacing: var(--shop-heading-tracking); line-height: var(--shop-heading-line-height); text-transform: uppercase; margin: 0 0 var(--space-5); overflow-wrap: anywhere; }
.shop-product-v2 .shop-product-price-v2 { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-5); margin: 0 0 var(--space-6); padding-bottom: var(--space-6); border-bottom: var(--border-width) solid var(--border-default); }
.shop-product-v2 .shop-product-internal-price-v2 { order: -1; }
.shop-product-v2 .price-main, .shop-product-v2 .price-internal { font-size: var(--shop-product-price-size); font-weight: var(--fw-semibold); color: var(--neutral-900); }
.shop-product-v2 .price-retail { font-size: var(--shop-product-price-size); color: var(--text-tertiary); }
.shop-product-v2 .price-label-retail, .shop-product-v2 .price-label-internal { font-size: var(--fs-caption); font-weight: var(--fw-regular); color: var(--text-secondary); margin-top: var(--space-1); text-decoration: none; }
.shop-product-v2 .product-color-row, .shop-product-v2 .product-size-row { margin: 0 0 var(--space-5); }
.shop-product-v2 .product-color-label, .shop-product-v2 .product-size-label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin-bottom: var(--space-2); }
.shop-product-v2 .product-color-label span { font-weight: var(--fw-regular); color: var(--text-secondary); margin-left: var(--space-2); }
.shop-product-v2 .product-colors { margin: 0; gap: var(--space-1); flex-wrap: wrap; }
.shop-public .shop-product-v2 .shop-color-swatches-v2 .color-dot { width: calc(var(--shop-swatch-render-size) + var(--space-1)); height: var(--button-height-touch); flex-basis: calc(var(--shop-swatch-render-size) + var(--space-1)); margin: 0; }
.shop-product-v2 .product-size-options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.shop-product-v2 .product-size-option { min-width: var(--shop-field-height); min-height: var(--shop-field-height); margin: 0; padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); background: var(--neutral-0); color: var(--neutral-900); font: inherit; font-size: var(--fs-sm); text-align: center; cursor: pointer; }
.shop-product-v2 .product-size-option.is-active { background: var(--neutral-900); color: var(--neutral-0); border-color: var(--neutral-900); }
.shop-product-v2 .product-size-option.is-disabled { color: var(--text-tertiary); border-color: var(--border-subtle); background: var(--neutral-50); text-decoration: line-through; cursor: not-allowed; }
.shop-product-v2 .product-cart-row { margin-top: var(--space-6); }
.shop-product-v2 .product-stock-status { margin-bottom: var(--space-3); font-size: var(--fs-sm); color: var(--text-secondary); }
.shop-product-v2 .product-stock-status.is-out, .shop-product-v2 .product-cart-message.is-error, .shop-product-v2 .bulk-message.is-error { color: var(--color-error-text); }
.shop-product-v2 .product-cart-message, .shop-product-v2 .bulk-message { font-size: var(--fs-sm); margin-top: var(--space-3); }
.shop-product-v2 .product-cart-message:empty, .shop-product-v2 .bulk-message:empty { display: none; }
.shop-product-v2 .shop-product-cart-link-v2 { display: block; text-align: center; margin-top: var(--space-2); }
.shop-product-v2 .product-description, .shop-product-v2 .product-bulk-order { border-top: var(--border-width) solid var(--border-default); margin-top: var(--space-6); }
.shop-product-v2 summary { display: list-item; list-style-position: inside; cursor: pointer; padding: var(--space-4) 0; font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
.shop-product-v2 .shop-product-description-body-v2 { color: var(--text-secondary); padding-bottom: var(--space-2); overflow-wrap: anywhere; }
.shop-product-description-body-v2 h1, .shop-product-description-body-v2 h2, .shop-product-description-body-v2 h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); color: var(--neutral-900); margin: var(--space-4) 0 var(--space-2); }
.shop-product-description-body-v2 p, .shop-product-description-body-v2 ul { margin: 0 0 var(--space-3); }
.shop-product-description-body-v2 img { max-width: 100%; height: auto; }
.shop-product-v2 .bulk-table-wrap { max-width: 100%; overflow-x: auto; }
.shop-product-v2 .bulk-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.shop-product-v2 .bulk-table th, .shop-product-v2 .bulk-table td { padding: var(--space-2); border: var(--border-width) solid var(--border-default); white-space: nowrap; text-align: center; }
.shop-product-v2 .bulk-table th { background: var(--neutral-50); font-size: var(--fs-caption); font-weight: var(--fw-semibold); }
.shop-product-v2 .bulk-color-dot { display: inline-block; width: var(--space-3); height: var(--space-3); border: var(--border-width) solid var(--border-strong); vertical-align: middle; margin-right: var(--space-1); }
.shop-product-v2 .bulk-cell.is-unavailable { background: var(--neutral-50); }
.shop-product-v2 .bulk-cell.is-low-stock { background: var(--color-warning-subtle); }
.shop-product-v2 .bulk-qty-input { width: var(--shop-bulk-quantity-width); min-height: var(--button-height-touch); padding: var(--space-2); font: inherit; text-align: center; border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); background: var(--neutral-0); color: var(--neutral-900); }
.shop-product-v2 .bulk-qty-input:disabled { background: var(--neutral-100); color: var(--text-tertiary); cursor: not-allowed; }
.shop-product-v2 .bulk-stock-hint { display: block; margin-top: var(--space-1); font-size: var(--fs-caption); color: var(--text-secondary); }
.shop-product-v2 .bulk-stock-hint.is-out { color: var(--text-tertiary); }
.shop-product-v2 .bulk-add-btn { margin-top: var(--space-4); }
.shop-product-v2 .product-size-option:focus-visible, .shop-product-v2 .product-thumb:focus-visible, .shop-product-v2 summary:focus-visible { outline: var(--border-width) solid var(--neutral-900); outline-offset: var(--space-1); }
@media (max-width: 767px) {
    .shop-product-v2 .product-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
    .shop-product-v2 .product-media { position: static; }
    .shop-product-v2 .product-info { padding: 0; }
}
.shop-public [hidden] { display: none !important; }
.shop-public .modal-v2-backdrop { z-index: var(--shop-modal-layer); }
.shop-catalog-v2 { max-width: var(--shop-content-width); margin: 0 auto; color: var(--neutral-900); font-family: var(--font-ui); line-height: var(--shop-line-height); }
.shop-catalog-v2 *, .shop-catalog-v2 *::before, .shop-catalog-v2 *::after { box-sizing: border-box; }
.shop-catalog-heading-v2 { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); padding: var(--space-6) 0; }
.shop-catalog-v2 .shop-page-title { font-family: "BJJ Lab Shop", var(--font-ui); font-size: var(--shop-heading-size); font-weight: var(--shop-heading-weight); letter-spacing: var(--shop-heading-tracking); line-height: var(--shop-heading-line-height); text-transform: uppercase; margin: 0; }
.shop-catalog-v2 .shop-page-description { margin: var(--space-3) 0 0; font-size: var(--fs-h3); color: var(--text-secondary); line-height: var(--shop-line-height); }
.shop-catalog-v2 .shop-page-description > :last-child { margin-bottom: 0; }
.shop-catalog-count-v2 { margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); white-space: nowrap; }
.shop-filter-bar-v2 { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-end; padding: var(--space-5) 0; margin: 0 0 var(--space-6); border-top: var(--border-width) solid var(--border-default); border-bottom: var(--border-width) solid var(--border-default); }
.shop-filter-field-v2 { display: block; min-width: var(--shop-filter-width); margin: 0; font-weight: var(--fw-regular); }
.shop-filter-field-v2 > span { display: block; margin-bottom: var(--space-2); font-size: var(--fs-sm); }
.shop-filter-field-v2 select { display: block; width: 100%; min-height: var(--shop-field-height); padding: var(--space-3); border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--neutral-900); font: inherit; font-size: var(--shop-field-font-size); cursor: pointer; box-shadow: none; }
.shop-filter-sort-v2 { margin-left: auto; min-width: var(--shop-sort-width); }
.shop-filter-field-v2 select:hover { border-color: var(--neutral-900); }
.shop-catalog-v2 :is(select, a):focus-visible { outline: var(--border-width) solid var(--neutral-900); outline-offset: var(--space-1); }
.shop-active-filters-v2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-6); }
.shop-filter-chip-v2 { display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--button-height-touch); padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); background: var(--neutral-50); color: var(--neutral-900); font-size: var(--fs-sm); text-decoration: none; }
.shop-filter-chip-v2:hover { color: var(--neutral-900); border-color: var(--neutral-900); text-decoration: none; }
.shop-filter-clear-v2 { display: inline-flex; align-items: center; min-height: var(--button-height-touch); padding: 0 var(--space-3); color: var(--text-secondary); text-decoration: underline; text-underline-offset: var(--space-1); font-size: var(--fs-sm); }
.shop-filter-clear-v2:hover { color: var(--neutral-900); }
.shop-catalog-v2 .shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10) var(--space-6); padding: 0; }
.shop-catalog-v2 .shop-card { min-width: 0; }
.shop-catalog-v2 .shop-card-body { padding: var(--space-4) 0 0; }
.shop-catalog-v2 .shop-card-product-link:hover { color: var(--neutral-900); }
.shop-catalog-v2 .product-name { margin: 0 0 var(--space-2); font-size: var(--fs-h3); font-weight: var(--fw-semibold); line-height: var(--shop-line-height); letter-spacing: normal; text-transform: none; }
.shop-catalog-v2 .product-price { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); margin: 0; font-size: var(--fs-h2); }
.shop-catalog-v2 .shop-card-internal-price-v2 { order: -1; }
.shop-catalog-v2 .product-price > div, .shop-product-v2 .shop-product-price-v2 > div { display: flex; flex-direction: column; align-items: flex-start; }
.shop-catalog-v2 .price-main, .shop-catalog-v2 .price-internal { font-weight: var(--fw-semibold); color: var(--neutral-900); }
.shop-catalog-v2 .price-retail { margin: 0; font-size: inherit; color: var(--text-secondary); }
.shop-catalog-v2 .price-label-retail, .shop-catalog-v2 .price-label-internal { margin: 0; font-size: var(--fs-caption); font-weight: var(--fw-regular); color: var(--text-secondary); text-decoration: none; }
.shop-catalog-v2 .price-label-internal, .shop-product-v2 .price-label-internal { font-weight: var(--fw-semibold); color: var(--neutral-900); }
.shop-product-v2 .price-label-retail, .shop-product-v2 .price-label-internal { margin-top: 0; }
.shop-catalog-layout-v2 { display: grid; grid-template-columns: var(--shop-filter-panel-width) minmax(0, 1fr); gap: var(--space-6); border-top: var(--border-width) solid var(--border-default); padding-top: var(--space-5); }
.shop-catalog-results-v2 { min-width: 0; }
.shop-category-navigation-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-6); }
.shop-category-navigation-v2 a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--button-height-touch); padding: var(--space-2) var(--space-4); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); color: var(--neutral-900); font-size: var(--fs-body); font-weight: var(--fw-medium); text-decoration: none; }
.shop-category-navigation-v2 a:hover { color: var(--neutral-900); background: var(--neutral-50); border-color: var(--neutral-900); text-decoration: none; }
.shop-category-navigation-v2 a[aria-current="page"] { color: var(--neutral-0); background: var(--neutral-900); border-color: var(--neutral-900); }
.shop-category-navigation-v2 a:focus-visible { outline: var(--border-width) solid var(--color-primary); outline-offset: var(--space-1); }
.shop-catalog-toolbar-v2 { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.shop-catalog-toolbar-v2 .shop-filter-sort-v2 { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.shop-catalog-toolbar-v2 .shop-filter-sort-v2 > span { white-space: nowrap; margin: 0; }
.shop-catalog-toolbar-v2 select { width: auto; }
.shop-catalog-filters-v2 { min-width: 0; align-self: start; padding-right: var(--space-5); border-right: var(--border-width) solid var(--border-default); }
.shop-catalog-filters-v2 > summary { display: flex; align-items: center; gap: var(--space-3); min-height: var(--shop-field-height); font-size: var(--fs-h3); font-weight: var(--fw-semibold); cursor: pointer; }
.shop-catalog-filters-v2 > summary::-webkit-details-marker { display: none; }
.shop-filter-section-v2 { min-width: 0; border: 0; border-bottom: var(--border-width) solid var(--border-default); margin: 0; padding: var(--space-4) 0; }
.shop-filter-section-v2 legend { float: left; width: 100%; border: 0; margin: 0 0 var(--space-2); padding: 0; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--neutral-900); }
.shop-filter-section-v2 legend + * { clear: both; }
.shop-filter-group-v2 { border-bottom: var(--border-width) solid var(--border-default); padding: var(--space-3) 0; }
.shop-filter-group-v2 summary { display: list-item; list-style-position: inside; font-size: var(--fs-body); font-weight: var(--fw-semibold); padding: var(--space-2) 0; cursor: pointer; }
.shop-filter-group-v2 summary span { float: right; color: var(--text-secondary); }
.shop-filter-options-v2 { display: grid; margin-top: var(--space-1); gap: 0 var(--space-1); }
.shop-filter-sizes-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-filter-option-v2 { display: flex; align-items: center; gap: var(--space-2); min-height: var(--button-height-sm); margin: 0; font-size: var(--fs-body); font-weight: var(--fw-regular); cursor: pointer; }
.shop-public .shop-filter-option-v2 input { width: var(--space-4); height: var(--space-4); min-height: 0; margin: 0; flex-shrink: 0; accent-color: var(--neutral-900); }
.shop-filter-option-v2 span { overflow-wrap: anywhere; }
.shop-filter-actions-v2 { display: grid; justify-items: center; padding: var(--space-4) 0; background: var(--bg-surface); }
.shop-catalog-filters-v2 :focus-visible { outline: var(--border-width) solid var(--neutral-900); outline-offset: var(--space-1); }
@media (max-width: 767px) {
    .shop-catalog-layout-v2 { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding-top: var(--space-3); }
    .shop-catalog-filters-v2 { padding: 0 0 var(--space-3); border-right: 0; border-bottom: var(--border-width) solid var(--border-default); }
    .shop-catalog-filters-v2 > summary::after { content: '+'; margin-left: auto; }
    .shop-catalog-filters-v2[open] > summary::after { content: '-'; }
    .shop-catalog-toolbar-v2 .shop-filter-sort-v2 > span { display: none; }
    .shop-catalog-toolbar-v2 select { width: 100%; }
    .shop-filter-options-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-filter-option-v2 { min-height: var(--button-height-touch); }
    .shop-filter-sizes-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.shop-catalog-v2 .placeholder-image { display: flex; flex-direction: column; gap: var(--space-3); align-items: center; justify-content: center; background: var(--neutral-50); color: var(--text-tertiary); font-size: var(--fs-display); }
.shop-catalog-v2 .placeholder-image span { font-size: var(--fs-caption); text-align: center; padding: 0 var(--space-3); }
.shop-product-flags-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-3); }
.shop-product-badge-v2, .shop-card-stock-v2 { display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2); font-size: var(--fs-caption); font-weight: var(--fw-medium); border-radius: var(--radius-sm); }
.shop-product-badge-ranked-v2 { color: var(--neutral-800); background: var(--neutral-100); }
.shop-product-badge-limited-v2 { color: var(--neutral-0); background: var(--neutral-800); }
.shop-product-badge-legal-v2 { color: var(--color-success-text); background: var(--color-success-subtle); }
.shop-card-badges-v2 { position: absolute; top: var(--space-2); left: var(--space-2); right: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: flex-start; }
.shop-card-badges-v2 .shop-product-flags-v2 { display: contents; }
.shop-rank-warning-v2 { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); margin-bottom: var(--space-4); border-radius: var(--radius-sm); background: var(--color-warning-subtle); color: var(--color-warning-text); font-size: var(--fs-body); }
.shop-rank-warning-v2 > i { margin-top: var(--space-1); }
.shop-rank-warning-v2 strong { font-weight: var(--fw-semibold); }
.shop-rank-warning-v2 p { margin: var(--space-1) 0 0; }
.shop-card-stock-low-v2 { color: var(--color-warning-text); background: var(--color-warning-subtle); }
.shop-card-stock-out-v2 { color: var(--color-error-text); background: var(--color-error-subtle); }
.shop-catalog-empty-v2 { padding: var(--space-10) var(--space-5); background: var(--neutral-50); text-align: center; }
.shop-catalog-empty-v2 h2 { margin: 0 0 var(--space-3); font-size: var(--fs-h2); font-weight: var(--fw-semibold); }
.shop-catalog-empty-v2 p { color: var(--text-secondary); }
.shop-catalog-v2 .shop-pagination-v2 { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-4); padding-top: var(--space-6); margin: var(--space-10) 0 0; border-top: var(--border-width) solid var(--border-default); font-size: var(--fs-sm); }
.shop-pagination-pages-v2 { display: flex; align-items: center; justify-content: center; gap: var(--space-1); }
.shop-pagination-number-v2 { display: inline-flex; align-items: center; justify-content: center; width: var(--button-height-touch); height: var(--button-height-touch); border: var(--border-width) solid transparent; border-radius: var(--radius-sm); color: var(--neutral-900); text-decoration: none; font-variant-numeric: tabular-nums; }
.shop-pagination-number-v2[aria-current] { color: var(--neutral-0); background: var(--neutral-900); }
.shop-pagination-number-v2:hover { color: var(--neutral-900); border-color: var(--neutral-900); text-decoration: none; }
.shop-pagination-number-v2[aria-current]:hover { color: var(--neutral-0); }
.shop-pagination-direction-v2 { display: inline-flex; align-items: center; min-height: var(--button-height-touch); justify-self: start; color: var(--neutral-900); text-decoration: none; }
.shop-pagination-direction-v2:last-child { justify-self: end; }
.shop-pagination-direction-v2:hover { color: var(--neutral-900); text-decoration: underline; }
.shop-pagination-direction-v2[aria-disabled] { color: var(--text-tertiary); }
.shop-pagination-ellipsis-v2 { color: var(--text-secondary); padding: 0 var(--space-1); }
@media (max-width: 767px) {
    .shop-catalog-heading-v2 { align-items: flex-start; flex-direction: column; gap: var(--space-3); padding: var(--space-3) 0 var(--space-5); }
    .shop-filter-bar-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
    .shop-filter-field-v2 { min-width: 0; }
    .shop-filter-sort-v2 { grid-column: 1 / -1; margin-left: 0; }
    .shop-catalog-v2 .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-3); }
    .shop-catalog-v2 .product-name { font-size: var(--fs-body); }
    .shop-catalog-v2 .product-price { font-size: var(--fs-h3); }
    .shop-catalog-v2 .shop-pagination-v2 { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
    .shop-pagination-pages-v2 { grid-column: 1 / -1; grid-row: 1; }
}
.shop-order-note-v2 { white-space: pre-wrap; overflow-wrap: anywhere; }
.shop-order-v2 .shop-checkout-heading-v2 p { overflow-wrap: anywhere; }
.shop-order-item-v2 { display: grid; grid-template-columns: var(--shop-product-image-mobile-width) minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; padding: var(--space-5) 0; border-bottom: var(--border-width) solid var(--border-default); }
.shop-order-image-v2 { display: grid; place-items: center; width: 100%; aspect-ratio: var(--shop-product-image-ratio); background: var(--neutral-50); color: var(--text-tertiary); border-radius: var(--radius-sm); overflow: hidden; }
.shop-order-image-v2 img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-order-item-info-v2 h3 { margin: 0 0 var(--space-2); font-size: var(--fs-h3); font-weight: var(--fw-semibold); line-height: var(--shop-line-height); }
.shop-order-item-info-v2 p { margin: var(--space-1) 0 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.shop-order-item-total-v2 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); white-space: nowrap; }
.shop-order-actions-v2 { display: grid; gap: var(--space-3); margin-top: var(--space-5); text-align: center; }
.shop-order-secondary-v2 { display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; min-height: var(--button-height-touch); padding: var(--space-3) var(--space-4); background: var(--neutral-0); color: var(--neutral-900); border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; font-weight: var(--fw-semibold); text-decoration: none; cursor: pointer; }
.shop-order-secondary-v2:hover { background: var(--neutral-50); color: var(--neutral-900); text-decoration: none; }
.shop-order-status-v2 { display: inline-flex; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); background: var(--neutral-100); color: var(--neutral-800); font-size: var(--fs-caption); font-weight: var(--fw-medium); }
.shop-order-notes-v2 { padding-top: var(--space-5); }
.shop-order-notes-v2 h2 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
.shop-order-notes-v2 p { color: var(--text-secondary); }
@media (max-width: 767px) {
    .shop-order-item-v2 { grid-template-columns: var(--shop-product-thumbnail-width) minmax(0, 1fr); gap: var(--space-2) var(--space-3); }
    .shop-order-image-v2 { grid-row: span 2; }
    .shop-order-item-total-v2 { grid-column: 2; }
}
.form-actions-v2.shop-order-actions-v2 { flex-wrap: wrap; }

/* Shop fulfillment follows backend panels and typography. */
.shop-admin-orders-v2 strong { font-weight: var(--fw-semibold); }
.shop-admin-muted-v2, .shop-admin-table-secondary-v2 { color: var(--text-secondary); font-size: var(--fs-sm); }
.shop-admin-table-secondary-v2 { display: block; margin-top: var(--space-1); }
.shop-admin-filters-v2, .shop-admin-pagination-v2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); }
.shop-admin-pagination-v2 { justify-content: flex-end; margin: var(--space-4) 0 0; }
.shop-admin-order-table-v2 td { vertical-align: middle; overflow-wrap: anywhere; }
.shop-admin-order-reference-v2 { font-weight: var(--fw-semibold); }
.shop-admin-empty-v2 { padding: var(--space-10) var(--space-4); text-align: center; color: var(--text-secondary); }
.shop-admin-empty-v2 > i { font-size: var(--fs-h1); }
.shop-admin-empty-v2 h3 { margin: var(--space-3) 0 var(--space-2); font-size: var(--fs-h3); color: var(--text-primary); }
.shop-admin-empty-v2 p { margin: 0 0 var(--space-3); }
.page-grid-v2.shop-admin-order-grid-v2 { grid-template-columns: minmax(0, 1fr) var(--shop-admin-summary-width); align-items: start; }
.shop-admin-order-grid-v2 > * { min-width: 0; }
.shop-admin-item-v2 { display: grid; grid-template-columns: var(--shop-product-thumbnail-width) minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: var(--space-5) var(--space-4); border-bottom: var(--border-width) solid var(--border-default); }
.shop-admin-item-v2:last-child { border-bottom: 0; }
.shop-admin-item-image-v2 { display: grid; place-items: center; aspect-ratio: var(--shop-product-image-ratio); background: var(--neutral-50); border-radius: var(--radius-sm); overflow: hidden; color: var(--text-tertiary); }
.shop-admin-item-image-v2 img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-admin-item-info-v2 h3 { font-size: var(--fs-body); font-weight: var(--fw-semibold); margin: 0 0 var(--space-2); overflow-wrap: anywhere; }
.shop-admin-item-info-v2 p { font-size: var(--fs-sm); color: var(--text-secondary); margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.shop-admin-item-info-v2 .shop-admin-item-sku-v2 { font-size: var(--fs-caption); }
.shop-admin-item-total-v2 { white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-admin-customer-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); overflow-wrap: anywhere; }
.shop-admin-customer-v2 h3 { margin: 0 0 var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-secondary); }
.shop-admin-customer-v2 p { margin: var(--space-1) 0; }
.shop-admin-summary-details-v2 { margin: 0; }
.shop-admin-summary-details-v2 > div { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.shop-admin-summary-details-v2 dt { color: var(--text-secondary); font-weight: var(--fw-regular); }
.shop-admin-summary-details-v2 dd { margin: 0; text-align: right; }
.shop-admin-summary-details-v2 .shop-admin-summary-total-v2 { border-top: var(--border-width) solid var(--border-default); padding-top: var(--space-5); margin-top: var(--space-5); }
.shop-admin-summary-total-v2 dd { font-size: var(--fs-h1); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.shop-admin-order-actions-v2 { display: grid; gap: var(--space-2); margin-top: var(--space-5); }
.shop-admin-order-actions-v2 .btn-v2 { width: 100%; justify-content: center; }
.shop-admin-order-cancel-v2 { margin-top: var(--space-5); padding-top: var(--space-3); border-top: var(--border-width) solid var(--border-default); text-align: center; }
.shop-admin-alert-v2 { display: flex; align-items: baseline; gap: var(--space-3); padding: var(--space-4); margin-bottom: var(--space-4); border: var(--border-width) solid var(--color-warning-text); border-radius: var(--radius-sm); background: var(--color-warning-subtle); color: var(--color-warning-text); }
@media (max-width: 1199px) {
    .page-grid-v2.shop-admin-order-grid-v2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
    .shop-admin-item-v2 { grid-template-columns: var(--shop-product-thumbnail-width) minmax(0, 1fr); gap: var(--space-2) var(--space-3); }
    .shop-admin-item-image-v2 { grid-row: span 2; }
    .shop-admin-item-total-v2 { grid-column: 2; }
    .shop-admin-customer-v2 { grid-template-columns: minmax(0, 1fr); }
}

/* Paper-first packing document. Keep rows intact and repeat table headers. */
.shop-pick-sheet-v2 { margin: 0; padding: var(--space-6); background: var(--bg-canvas); color: var(--neutral-900); font-family: var(--font-ui); font-size: var(--fs-body); line-height: var(--shop-line-height); page: shop-pick-sheet; }
.shop-pick-sheet-v2 *, .shop-pick-sheet-v2 *::before { box-sizing: border-box; }
.shop-pick-toolbar-v2 { display: flex; align-items: center; justify-content: flex-end; max-width: var(--shop-pick-page-width); margin: 0 auto var(--space-4); }
.shop-pick-paper-v2 { max-width: var(--shop-pick-page-width); min-height: var(--shop-pick-page-height); padding: var(--shop-pick-page-margin); margin: 0 auto; background: var(--neutral-0); border: var(--border-width) solid var(--border-default); }
.shop-pick-heading-v2 { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-6); border-bottom: calc(2 * var(--border-width)) solid var(--neutral-900); padding-bottom: var(--space-5); margin-bottom: var(--space-6); }
.shop-pick-brand-v2 { margin: 0 0 var(--space-3); font-family: 'BJJ Lab Shop', var(--font-ui); font-weight: var(--shop-heading-weight); font-size: var(--fs-h3); text-transform: uppercase; }
.shop-pick-heading-v2 h1 { margin: 0; font-size: var(--fs-display); line-height: var(--shop-heading-line-height); font-weight: var(--fw-semibold); }
.shop-pick-reference-v2 { text-align: right; overflow-wrap: anywhere; }
.shop-pick-reference-v2 strong { display: block; font-size: var(--fs-h2); font-weight: var(--fw-semibold); }
.shop-pick-reference-v2 span { display: block; margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-secondary); }
.shop-pick-recipient-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); margin-bottom: var(--space-6); overflow-wrap: anywhere; }
.shop-pick-sheet-v2 h2 { font-size: var(--fs-caption); font-weight: var(--fw-medium); color: var(--text-secondary); margin: 0 0 var(--space-2); }
.shop-pick-sheet-v2 strong { font-weight: var(--fw-semibold); }
.shop-pick-recipient-v2 p { margin: var(--space-1) 0 0; font-size: var(--fs-sm); }
.shop-pick-notes-v2 { padding: var(--space-4); border: var(--border-width) solid var(--border-strong); margin-bottom: var(--space-6); }
.shop-pick-notes-v2 p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.shop-pick-items-v2 { width: 100%; border-collapse: collapse; table-layout: fixed; }
.shop-pick-items-v2 th { text-align: left; font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--shop-navigation-tracking); border-top: var(--border-width) solid var(--neutral-900); border-bottom: var(--border-width) solid var(--neutral-900); padding: var(--space-3) var(--space-2); }
.shop-pick-items-v2 td { padding: var(--space-5) var(--space-2); border-bottom: var(--border-width) solid var(--border-strong); vertical-align: top; overflow-wrap: anywhere; }
.shop-pick-items-v2 td > strong, .shop-pick-items-v2 td > span { display: block; }
.shop-pick-items-v2 td > span:not(.shop-pick-checkbox-v2) { margin-top: var(--space-1); }
.shop-pick-check-column-v2 { width: var(--shop-pick-check-width); }
.shop-pick-variant-column-v2 { width: var(--shop-pick-variant-width); }
.shop-pick-quantity-column-v2 { width: var(--shop-pick-quantity-width); }
.shop-pick-checkbox-v2 { width: var(--space-5); height: var(--space-5); border: var(--border-width) solid var(--neutral-900); margin-top: var(--space-1); }
.shop-pick-sku-v2 { font-size: var(--fs-caption); color: var(--text-secondary); }
.shop-pick-items-v2 .shop-pick-quantity-v2 { text-align: center; font-size: var(--fs-h1); font-weight: var(--fw-semibold); line-height: var(--shop-heading-line-height); font-variant-numeric: tabular-nums; }
.shop-pick-items-v2 th:last-child { text-align: center; }
.shop-pick-total-v2 { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-6); padding: var(--space-4) var(--space-2); border-bottom: calc(2 * var(--border-width)) solid var(--neutral-900); }
.shop-pick-total-v2 strong { width: calc(var(--shop-pick-quantity-width) - 2 * var(--space-2)); text-align: center; font-size: var(--fs-h1); }
.shop-pick-signoff-v2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); margin-top: var(--space-10); font-size: var(--fs-caption); color: var(--text-secondary); }
.shop-pick-write-line-v2 { display: block; height: var(--space-6); border-bottom: var(--border-width) solid var(--neutral-900); }
.shop-pick-collection-v2 { display: flex; align-items: center; gap: var(--space-5); margin-top: var(--space-6); break-inside: avoid; }
.shop-pick-collection-v2 img { display: block; width: var(--shop-pick-code-size); height: var(--shop-pick-code-size); }
.shop-pick-collection-v2 p { margin: var(--space-2) 0 0; font-size: var(--fs-sm); }
.shop-pickup-search-v2 { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-5); }
.shop-pickup-search-v2 .form-field-v2 { flex: 1; min-width: var(--shop-admin-summary-width); margin: 0; }
.shop-pickup-detail-v2 { max-width: var(--shop-pickup-detail-width); }
.shop-pickup-confirm-v2 { display: grid; gap: var(--space-3); }
.shop-pickup-confirm-v2 p { margin: 0; }
.shop-pickup-record-v2 { margin: var(--space-3) 0; line-height: var(--shop-line-height); }
@media (max-width: 767px) {
    .shop-pickup-search-v2 .form-field-v2 { min-width: 100%; }
}
@page shop-pick-sheet { size: A4; margin: var(--shop-pick-page-margin); }
@media print {
    .shop-pick-sheet-v2 { padding: 0; background: var(--neutral-0); }
    .shop-pick-toolbar-v2 { display: none; }
    .shop-pick-paper-v2 { max-width: none; min-height: 0; padding: 0; border: 0; }
    .shop-pick-heading-v2, .shop-pick-recipient-v2, .shop-pick-signoff-v2, .shop-pick-total-v2, .shop-pick-items-v2 tr { break-inside: avoid; }
    .shop-pick-items-v2 thead { display: table-header-group; }
    .shop-pick-heading-v2, .shop-pick-recipient-v2, .shop-pick-notes-v2 { break-after: avoid; }
}
.shop-card-product-link { text-decoration: none; color: inherit; }
.shop-card .shop-card-colors-v2 { position: absolute; bottom: var(--space-2); left: var(--space-2); right: var(--space-2); flex-wrap: wrap; gap: var(--space-1); margin: 0; }
@media (max-width: 767px) {
    .shop-card .shop-card-colors-v2 { --shop-swatch-render-size: round(nearest, var(--space-6), var(--shop-swatch-pixel)); --shop-swatch-fill-size: calc(var(--shop-swatch-render-size) - 2 * var(--shop-swatch-border-size) - 2 * var(--shop-swatch-gap-size)); gap: 0; }
}
.shop-public .shop-color-swatches-v2 .color-dot { display: grid; place-items: center; box-sizing: border-box; width: var(--shop-swatch-render-size); height: var(--shop-swatch-render-size); flex: 0 0 var(--shop-swatch-render-size); margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; transition: none; }
.shop-color-swatches-v2 .color-dot::before { content: none; }
.shop-public .shop-color-swatches-v2 .color-dot { background: linear-gradient(currentColor, currentColor) center / calc(var(--shop-swatch-fill-size) - 2 * var(--shop-swatch-border-size)) calc(var(--shop-swatch-fill-size) - 2 * var(--shop-swatch-border-size)) no-repeat, linear-gradient(var(--shop-swatch-edge-color, var(--neutral-200)), var(--shop-swatch-edge-color, var(--neutral-200))) center / var(--shop-swatch-fill-size) var(--shop-swatch-fill-size) no-repeat; }
.shop-color-swatches-v2 .color-dot[data-color="white"], .shop-color-swatches-v2 .color-dot[data-swatch-border="dark"] { --shop-swatch-edge-color: var(--border-strong); --shop-swatch-check-color: var(--neutral-900); }
.shop-color-swatches-v2 .shop-swatch-check-v2 { display: none; pointer-events: none; color: var(--shop-swatch-check-color, var(--neutral-0)); font-size: var(--fs-sm); line-height: var(--shop-heading-line-height); }
.shop-color-swatches-v2 .color-dot--active .shop-swatch-check-v2 { display: block; }
.shop-public .orders-page, .shop-public .order-page { max-width: var(--shop-content-width); }
.shop-public .data-table-v2 td { overflow-wrap: anywhere; }
.shop-public .color-dot:focus-visible { outline: var(--border-width) solid var(--color-primary); outline-offset: var(--space-1); }
@media (max-width: 767px) { .shop-public button, .shop-public select, .shop-public input { min-height: var(--button-height-touch); } .shop-public .shop-checkout-payment-v2 input { min-height: 0; } }

.scheduled-task-slots-v2 { display: grid; gap: var(--space-3); }
.scheduled-task-form-v2 { display: grid; gap: var(--space-4); }
.scheduled-task-slot-v2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); align-items: center; border-bottom: var(--border-width) solid var(--border-subtle); padding-bottom: var(--space-3); }
.scheduled-task-slot-v2 .form-field-v2 { margin: 0; min-width: 0; }
.scheduled-task-occurrence-v2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: var(--border-width) solid var(--border-subtle); }
.scheduled-task-occurrence-v2 > div { min-width: 0; overflow-wrap: anywhere; }
.scheduled-task-occurrence-v2:last-child { border-bottom: 0; }
.scheduled-task-instructions-v2 { white-space: pre-wrap; color: var(--neutral-600); }
@media (max-width: 767px) {
    .scheduled-task-slot-v2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .scheduled-task-slot-v2 > .checkbox-label-v2 { grid-column: 1 / -1; }
    .scheduled-task-occurrence-v2 .table-actions-v2 { width: 100%; }
}

:root {
    --shop-content-width: 1200px;
    --shop-brand-size: 24px;
    --shop-brand-mobile-size: clamp(16px, 4.6vw, 20px);
    --shop-brand-mark-size: 32px;
    --shop-brand-mark-mobile-size: 28px;
    --shop-navigation-panel-width: 220px;
    --shop-navigation-tracking: .04em;
    --shop-account-panel-width: 300px;
    --shop-header-panel-layer: 30;
    --shop-modal-layer: 10000;
    --shop-summary-width: 420px;
    --shop-summary-padding: 32px;
    --shop-heading-size: clamp(30px, 3vw, 40px);
    --shop-heading-weight: 900;
    --shop-admin-summary-width: 300px;
    --shop-pick-page-width: 210mm;
    --shop-pick-code-size: 35mm;
    --shop-pickup-detail-width: 900px;
    --shop-pick-page-height: 297mm;
    --shop-pick-page-margin: 20mm;
    --shop-pick-check-width: 44px;
    --shop-pick-variant-width: 130px;
    --shop-pick-quantity-width: 88px;
    --shop-heading-tracking: -.04em;
    --shop-heading-line-height: 1.05;
    --shop-eyebrow-tracking: .12em;
    --shop-line-height: 1.5;
    --shop-product-image-width: 112px;
    --shop-product-image-mobile-width: 88px;
    --shop-product-image-ratio: 4 / 5;
    --shop-quantity-width: 32px;
    --shop-field-height: 48px;
    --shop-field-font-size: 16px;
    --shop-action-height: 54px;
    --shop-swatch-size: 28px;
    --shop-product-title-size: clamp(26px, 2.6vw, 36px);
    --shop-product-price-size: 28px;
    --shop-sale-accent: var(--color-error-text);
    --shop-sale-subtle: var(--color-error-subtle);
    --shop-sale-contrast: var(--neutral-0);
    --shop-product-thumbnail-width: 72px;
    --shop-bulk-quantity-width: 64px;
    --shop-filter-width: 160px;
    --shop-sort-width: 220px;
    --shop-filter-panel-width: 240px;
    --shop-swatch-inset: 2px;
    --shop-swatch-pixel: 1px;
    --shop-swatch-render-size: round(nearest, var(--shop-swatch-size), var(--shop-swatch-pixel));
    --shop-swatch-border-size: round(nearest, var(--border-width), var(--shop-swatch-pixel));
    --shop-swatch-gap-size: round(down, var(--shop-swatch-inset), var(--shop-swatch-pixel));
    --shop-swatch-backing-size: calc(var(--shop-swatch-render-size) - 2 * var(--shop-swatch-border-size));
    --shop-swatch-fill-size: calc(var(--shop-swatch-backing-size) - 2 * var(--shop-swatch-gap-size));
    --neutral-0: #FFFFFF;
    --neutral-25: #FBFBFC;
    --neutral-50: #F6F7F8;
    --neutral-100: #EDEEF1;
    --neutral-200: #E2E4E8;
    --neutral-300: #C8CCD2;
    --neutral-400: #9AA0A8;
    --neutral-500: #6B7280;
    --neutral-600: #4A5059;
    --neutral-700: #2E333B;
    --neutral-800: #1C1E22;
    --neutral-900: #0A0A0B;

    --color-primary: #1E6FFF;
    --color-primary-hover: #1857CC;
    --color-primary-active: #134199;
    --color-primary-subtle: #EAF1FF;
    --color-primary-border: #B4CCFF;

    --color-success: #158B4F;
    --color-success-subtle: #E6F5EC;
    --color-success-text: #0E6B3A;
    --color-warning: #B5750E;
    --color-warning-subtle: #FDF3E2;
    --color-warning-text: #8C590A;
    --color-error: #C8342F;
    --color-error-subtle: #FBEBEA;
    --color-error-text: #A32925;

    --text-primary: var(--neutral-800);
    --text-secondary: var(--neutral-600);
    --text-tertiary: var(--neutral-500);
    --text-link: var(--color-primary);

    --bg-rail: #0F1115;
    --bg-rail-hover: #1A1D23;
    --rail-text: #B6BAC2;
    --rail-text-muted: #7A7F88;
    --rail-text-active: #FFFFFF;
    --rail-divider: #23262C;

    --bg-canvas: #F4F5F7;
    --bg-secondary: #FAFBFC;
    --bg-surface: #FFFFFF;
    --bg-hover: #EEF0F3;

    --border-subtle: var(--neutral-100);
    --border-default: var(--neutral-200);
    --border-strong: var(--neutral-300);
    --border-width: 1px;
    --image-lightbox-max-width: 960px;
    --image-lightbox-max-height: 85vh;

    --font-ui: "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --fs-display: 34px;
    --fs-h1: 22px;
    --fs-h2: 18px;
    --fs-h3: 15px;
    --fs-body: 14px;
    --fs-sm: 13px;
    --fs-caption: 12px;
    --fs-eyebrow: 11px;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;

    --row-height: 42px;
    --input-height: 34px;
    --button-height-sm: 28px;
    --button-height-md: 34px;
    --button-height-touch: 44px;
    --cell-padding-y: 10px;
    --cell-padding-x: 14px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-10: 48px;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 8px rgba(16, 24, 40, 0.06), 0 2px 4px rgba(16, 24, 40, 0.04);
    --shadow-lg: 0 12px 24px rgba(16, 24, 40, 0.10), 0 4px 8px rgba(16, 24, 40, 0.05);
    --shadow-focus: 0 0 0 3px rgba(30, 111, 255, 0.20);

    --transition-fast: 120ms ease-out;
    --transition-base: 180ms ease-out;
    --check-in-notice-transition: 700ms ease;

    --rail-width: 60px;
    --rail-width-expanded: 184px;
    --subnav-width: 232px;
    --topbar-height: 48px;

    /* Belt progression signage. Belt colours encode rank, not status. */
    --belt-white: #F6F6F6;
    --belt-grey: #919495;
    --belt-yellow: #FFC740;
    --belt-orange: #ED7C39;
    --belt-green: #007D45;
    --belt-blue: #1E5AF9;
    --belt-purple: #923692;
    --belt-brown: #66320D;
    --belt-black: #201F1F;
    --belt-red: #D11B1B;
    --progression-background: #0B0B0B;
    --progression-panel: #141414;
    --progression-border: #343434;
    --progression-muted: #B8B8B8;
    --progression-belt-outline: #555555;
    --progression-font-heading: "BJJ Lab Montserrat", var(--font-ui);
    --progression-font-body: "BJJ Lab Lato", var(--font-ui);
    --progression-heading-weight: 900;
    --progression-heading-tracking: -.02em;
    --progression-page-padding: clamp(24px, 2.8vh, 40px);
    --progression-title-size: clamp(26px, 3.2vh, 40px);
    --progression-number-size: clamp(36px, 4.5vh, 58px);
    --progression-body-size: clamp(18px, 2.1vh, 27px);
    --progression-small-size: clamp(16px, 1.85vh, 24px);
    --progression-tiny-size: clamp(14px, 1.6vh, 20px);
    --progression-heading-size: clamp(22px, 2.7vh, 35px);
    --progression-section-gap: clamp(16px, 2.1vh, 28px);
    --progression-rank-rule: 6px;
    --progression-vector-outline: 1px;
    --progression-belt-surface-strength: 78%;
    --progression-variants-height: clamp(190px, 24vh, 270px);
    --progression-preview-height: calc(var(--fs-sm) * 1.5 + var(--space-2) * 2 + var(--space-1) * 2 + var(--border-width));
    --progression-screen-width: 1920px;
    --progression-screen-height: 1080px;
    --progression-screen-ratio: 16 / 9;
    --progression-screen-bezel: var(--space-2);
    --progression-zoom-value-width: 5ch;
    --progression-portrait-width: 1080px;
    --progression-portrait-height: 1920px;
    --progression-portrait-ratio: 9 / 16;
    --progression-portrait-title: 52px;
    --progression-portrait-rank-title: 52px;
    --progression-portrait-giant-title: 76px;
    --progression-portrait-kids-title: 44px;
    --progression-portrait-chapter-size: 100px;
    --progression-portrait-step: 32px;
    --progression-portrait-kids-columns: 220px minmax(0,1fr);
    --progression-portrait-pennant: polygon(0 0, calc(100% - 32px) 0, 100% 50%, calc(100% - 32px) 100%, 0 100%);
    --progression-line-height: 1.35;
    --progression-tight-line-height: 1.1;
    --progression-tracking: .12em;
    --progression-form-width: 640px;
    --progression-ink: var(--neutral-0);
    --progression-paper: #F3F0E8;
    --progression-paper-panel: #FFFEFA;
    --progression-paper-line: #CEC9BD;
    --progression-blueprint: #102D4A;
    --progression-blueprint-panel: #163956;
    --progression-blueprint-line: #3F6482;
    --progression-blueprint-text: #C1DAEA;
    --progression-station-size: 20px;
    --progression-milestone-number: clamp(22px, 2.7vh, 34px);
    --progression-credit-art-width: 112px;
    --progression-compact-belt-width: 180px;
    --progression-path-width: 2px;
    --progression-row-columns: .8fr .65fr 1.8fr 1.3fr;
    --progression-kids-row-columns: .8fr 3fr 1fr;
    --progression-variant-columns: 3;
    --progression-on-belt: #FFFFFF;
    --progression-rank-title: clamp(32px, 3vw, 54px);
    --progression-kids-title: clamp(24px, 2.3vw, 42px);
    --progression-giant-title: clamp(44px, 4.6vw, 88px);
    --progression-weave-title: clamp(28px, 2.7vw, 48px);
    --progression-identity-height: 128px;
    --progression-step-rise: clamp(16px, 2.8vh, 36px);
    --progression-hero-rise: clamp(30px, 5vh, 60px);
    --progression-pennant-tip: 64px;
    --progression-pennant-shape: polygon(0 0, 100% 0, 100% calc(100% - 40px), 50% 100%, 0 calc(100% - 40px));
    --progression-slash-shape: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 0 100%);
    --progression-route-width: 12px;
    --progression-weave-width: 28px;
    --progression-weave-radius: 64px;
    --progression-row-art-width: 248px;
    --progression-kids-stripe-width: 240px;
    --progression-kids-mobile-belt-width: 68%;
    --progression-live-row-columns: 1.2fr 1.35fr 1fr 1.25fr;
    --progression-giant-row-columns: 1.8fr 1.15fr 1fr 1.15fr;
    --progression-leader-width: 1.2px;
    --progression-leader-opacity: .6;
    --progression-chapter-size: clamp(120px, 13vh, 156px);
    --progression-chapter-rule: 16px;
    --progression-split-sidebar: 340px;
    --progression-split-heading: 38px;
    --progression-split-columns: 1fr 1.1fr .85fr 1.3fr;
    --progression-orbit-size: 260px;
    --progression-orbit-kids-size: 220px;
    --progression-orbit-title: 40px;
    --progression-orbit-ring: 10px;
}

/* ========== BELT PROGRESSION SIGNAGE ========== */
/* Live art direction: shared data and exact belt geometry, ten distinct compositions. */
@font-face { font-family: "BJJ Lab Montserrat"; src: url("/fonts/Montserrat-Black.ttf") format("truetype"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "BJJ Lab Lato"; src: url("/fonts/Lato-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
.progression-display-v2 { margin: 0; background: var(--progression-background); color: var(--progression-ink); font-family: var(--progression-font-body); font-size: var(--progression-body-size); line-height: var(--progression-line-height); }
.progression-display-v2 * { box-sizing: border-box; }
.progression-display-v2 [hidden], .progression-settings-v2[hidden], .progression-settings-v2 [hidden] { display: none !important; }
.progression-poster-v2 { display: flex; flex-direction: column; gap: var(--progression-section-gap); width: 100%; padding: var(--progression-page-padding); background: var(--progression-background); }
.progression-poster-v2 :is(h1,h2,h3,p,figure) { margin: 0; }
.progression-poster-v2 :is(h1,h2) { font-family: var(--progression-font-heading); font-weight: var(--progression-heading-weight); text-transform: uppercase; line-height: var(--progression-tight-line-height); letter-spacing: var(--progression-heading-tracking); }
.progression-poster-v2 strong { font-weight: var(--fw-semibold); }
.progression-title-v2 { display: flex; align-items: baseline; gap: var(--space-5); }
.progression-title-v2 h1 { font-size: var(--progression-title-size); }
.progression-audience-v2 { font-size: var(--progression-small-size); text-transform: uppercase; letter-spacing: var(--progression-tracking); color: var(--progression-muted); }
.progression-reading-guide-v2 { display: flex; justify-content: space-between; gap: var(--space-4); font-size: var(--progression-small-size); }
.progression-reading-guide-v2 > span { color: var(--progression-muted); }
.progression-ranks-v2 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-4); }
.progression-rank-v2 { position: relative; isolation: isolate; min-width: 0; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); }
.progression-display-v2 .white-belt { --belt-colour: var(--belt-white); --progression-on-belt: var(--neutral-900); }
.progression-display-v2 .blue-belt { --belt-colour: var(--belt-blue); }
.progression-display-v2 .purple-belt { --belt-colour: var(--belt-purple); }
.progression-display-v2 .brown-belt { --belt-colour: var(--belt-brown); }
.progression-display-v2 .black-belt { --belt-colour: var(--belt-black); }
.progression-display-v2 [class*="grey"] { --belt-colour: var(--belt-grey); --progression-on-belt: var(--neutral-900); }
.progression-display-v2 [class*="yellow"] { --belt-colour: var(--belt-yellow); --progression-on-belt: var(--neutral-900); }
.progression-display-v2 [class*="orange"] { --belt-colour: var(--belt-orange); --progression-on-belt: var(--neutral-900); }
.progression-display-v2 [class*="green"] { --belt-colour: var(--belt-green); }
.progression-identity-v2 h2 { font-size: var(--progression-rank-title); overflow-wrap: normal; }
.progression-stage-number-v2 { display: none; }
.progression-time-v2 { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-3); }
.progression-time-v2 > strong { font-size: var(--progression-heading-size); }
.progression-time-v2 > span { color: var(--progression-muted); font-size: var(--progression-tiny-size); }
.progression-annotated-belt-v2 { display: block; width: 100%; }
.progression-annotated-belt-v2 > svg { display: block; width: 100%; height: auto; }
.progression-stripe-counts-v2 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); text-align: center; font-size: var(--progression-milestone-number); font-variant-numeric: tabular-nums; margin-top: var(--space-1); }
.progression-belt-fabric-v2 { fill: var(--belt-colour); }
.progression-belt-edge-v2 { fill: none; stroke: var(--progression-belt-outline); stroke-width: var(--progression-vector-outline); }
.progression-belt-panel-v2 { fill: var(--belt-black); }
svg.black-belt .progression-belt-panel-v2 { fill: var(--belt-red); }
svg.credit-competitor .progression-belt-panel-v2 { fill: var(--belt-white); }
.progression-belt-degree-v2 { fill: var(--belt-white); }
.progression-belt-centre-v2 { fill: transparent; }
.progression-display-v2 svg[class*="-white-belt"] .progression-belt-centre-v2 { fill: var(--belt-white); }
.progression-display-v2 svg[class*="-black-belt"] .progression-belt-centre-v2 { fill: var(--belt-black); }
.progression-stripe-leader-v2 { fill: none; stroke: currentColor; stroke-width: var(--progression-leader-width); opacity: var(--progression-leader-opacity); }
.progression-stripe-section-v2 { min-width: 0; }
.progression-stripe-section-v2 figcaption, .progression-kids-stripes-v2 figcaption { text-align: center; font-size: var(--progression-tiny-size); margin-top: var(--space-2); color: var(--progression-muted); }
.progression-promotion-v2 { padding-top: var(--space-4); border-top: var(--border-width) solid var(--progression-border); }
.progression-promotion-v2 h3 { display: flex; gap: var(--space-3); align-items: center; font-size: var(--progression-body-size); font-weight: var(--fw-semibold); }
.progression-promotion-days-v2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin-top: var(--space-1); }
.progression-promotion-days-v2 > strong { font-family: var(--progression-font-heading); font-weight: var(--progression-heading-weight); font-size: var(--progression-number-size); line-height: var(--progression-tight-line-height); }
.progression-promotion-days-v2 > span { font-size: var(--progression-small-size); }
.progression-class-mix-v2 { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--progression-small-size); }
.progression-class-label-v2 { font-size: var(--progression-small-size); font-weight: var(--fw-semibold); }
.progression-class-note-v2 { font-size: var(--progression-tiny-size); color: var(--progression-muted); }
.progression-class-mix-v2 strong { font-size: var(--progression-body-size); }
.progression-credits-v2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-5); align-items: center; padding-top: var(--space-4); border-top: var(--border-width) solid var(--progression-border); }
.progression-credit-title-v2 { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--progression-small-size); }
.progression-credit-title-v2 > span { color: var(--progression-muted); font-size: var(--progression-tiny-size); }
.progression-credit-bars-v2 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-5); }
.progression-credit-bars-v2 > div { display: flex; align-items: center; gap: var(--space-3); font-size: var(--progression-small-size); }
.progression-credit-belt-v2 { display: block; width: var(--progression-credit-art-width); max-width: 50%; height: auto; }
.progression-footer-v2 { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }
.progression-footer-v2 > strong { font-size: var(--progression-small-size); }
.progression-footer-v2 > p { font-size: var(--progression-tiny-size); color: var(--progression-muted); text-align: right; }
.progression-kids-v2 .progression-ranks-v2 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.progression-kids-v2 .progression-identity-v2 h2 { font-size: var(--progression-kids-title); }
.progression-kids-variants-v2 { display: flex; flex-direction: column; gap: var(--space-5); min-height: var(--progression-variants-height); }
.progression-kids-variants-v2 > div { display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--progression-small-size); }
.progression-rank-strip-v2 { display: block; width: 100%; height: auto; }
.progression-days-v2 { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.progression-days-v2 > strong { font-family: var(--progression-font-heading); font-weight: var(--progression-heading-weight); font-size: var(--progression-number-size); }
.progression-days-v2 > span { font-size: var(--progression-small-size); }
.progression-kids-steps-v2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-6); align-items: center; padding-top: var(--space-4); border-top: var(--border-width) solid var(--progression-border); }
.progression-step-label-v2 { display: flex; flex-direction: column; gap: var(--space-2); }
.progression-step-label-v2 > span { font-size: var(--progression-small-size); color: var(--progression-muted); }
.progression-kids-stripes-v2 { width: 100%; max-width: var(--progression-kids-stripe-width); justify-self: center; }
.progression-step-finish-v2 { display: flex; align-items: center; gap: var(--space-4); }

/* Colour surfaces always carry deliberate contrasting text. */
:is([data-design="ribbons"],[data-design="architecture"],[data-design="ascent"],[data-design="pennants"]) .progression-rank-v2 {
    background: var(--belt-colour); color: var(--progression-on-belt); --progression-muted: var(--progression-on-belt); --progression-border: currentColor;
}
:is([data-design="ribbons"],[data-design="architecture"],[data-design="ascent"],[data-design="pennants"]) .progression-rank-v2:not(.white-belt) {
    background: color-mix(in srgb, var(--belt-colour) var(--progression-belt-surface-strength), var(--progression-background));
}
/* 01 Belt ribbons: large horizontal colour bands, a single annotated rank bar. */
[data-design="ribbons"] .progression-rank-v2 { border-radius: 0 var(--space-6) var(--space-6) 0; }
[data-design="ribbons"] .progression-ranks-v2 { gap: var(--space-3); }
/* 02 Colour architecture: full-height fields, strong labels and aligned requirements. */
[data-design="architecture"] .progression-ranks-v2 { gap: 0; }
[data-design="architecture"] .progression-rank-v2 { padding: var(--space-6); }
[data-design="architecture"] .progression-identity-v2 { min-height: var(--progression-identity-height); }
[data-design="architecture"] .progression-kids-v2 .progression-identity-v2 { min-height: 0; }
/* 03 The ascent: broad equal-width steps keep the early stages readable. */
[data-design="ascent"] .progression-ranks-v2 { gap: 0; align-items: start; padding-top: calc(var(--progression-step-rise) * 3); }
[data-design="ascent"] .progression-rank-v2:nth-child(2) { margin-top: calc(var(--progression-step-rise) * -1); }
[data-design="ascent"] .progression-rank-v2:nth-child(3) { margin-top: calc(var(--progression-step-rise) * -2); }
[data-design="ascent"] .progression-rank-v2:nth-child(4) { margin-top: calc(var(--progression-step-rise) * -3); }
[data-design="ascent"] .progression-rank-v2:nth-child(5) { margin-top: calc(var(--progression-step-rise) * -4); }
[data-design="ascent"] .progression-kids-v2 .progression-ranks-v2 { padding-top: calc(var(--progression-step-rise) * 4); }
/* 04 Broadcast: confident slashes and athletic rows, without a slogan. */
[data-design="broadcast"] .progression-rank-v2 { border-bottom: var(--progression-path-width) solid var(--belt-colour); padding-left: 0; }
[data-design="broadcast"] .progression-identity-v2 { background: var(--belt-colour); color: var(--progression-on-belt); padding: var(--space-5) var(--space-6) var(--space-5) var(--space-5); clip-path: var(--progression-slash-shape); --progression-muted: var(--progression-on-belt); }
[data-design="broadcast"] .progression-promotion-v2 { border-top: 0; border-left: var(--progression-rank-rule) solid var(--belt-colour); padding: 0 0 0 var(--space-4); }
/* 06 Giant type: name and ribbon interlock; requirements retain their own space. */
[data-design="giant"] .progression-identity-v2 h2 { font-size: var(--progression-giant-title); }
[data-design="giant"] .progression-identity-v2 { border-bottom: var(--progression-rank-rule) solid var(--belt-colour); padding-bottom: var(--space-3); }
[data-design="giant"] .progression-rank-v2 { padding-left: 0; padding-right: 0; }
[data-design="giant"] .progression-time-v2 { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: var(--space-2); }
/* 07 Pennants: flat silhouettes and one dominant rank, no decorative dividers. */
[data-design="pennants"] .progression-rank-v2 { padding-bottom: var(--progression-pennant-tip); clip-path: var(--progression-pennant-shape); }
[data-design="pennants"] .progression-promotion-v2 { border: 0; padding: 0; }
[data-design="pennants"] .progression-rank-v2 .progression-class-mix-v2 { margin-top: auto; }
/* 10 Franchise hero: staggered flat belt exhibits, with a shared requirements baseline. */
[data-design="hero"] .progression-rank-v2 { padding: var(--space-5) var(--space-3); border-bottom: var(--progression-rank-rule) solid var(--belt-colour); }
[data-design="hero"] .progression-identity-v2 h2 { border-left: var(--progression-route-width) solid var(--belt-colour); padding-left: var(--space-3); }
[data-design="hero"] .progression-ranks-v2 { align-items: start; gap: var(--space-6); }
[data-design="hero"] .progression-stripe-section-v2 { padding-top: var(--progression-hero-rise); padding-bottom: 0; }
[data-design="hero"] .progression-rank-v2:nth-child(2) .progression-stripe-section-v2 { padding-top: calc(var(--progression-hero-rise) * 2 / 3); padding-bottom: calc(var(--progression-hero-rise) / 3); }
[data-design="hero"] .progression-rank-v2:nth-child(3) .progression-stripe-section-v2 { padding-top: calc(var(--progression-hero-rise) / 3); padding-bottom: calc(var(--progression-hero-rise) * 2 / 3); }
[data-design="hero"] .progression-rank-v2:nth-child(4) .progression-stripe-section-v2 { padding-top: 0; padding-bottom: var(--progression-hero-rise); }
[data-design="hero"] .progression-kids-variants-v2 { border-top: var(--progression-rank-rule) solid var(--belt-colour); padding-top: var(--space-5); }

/* 05 Colour chapters: oversized chapter numbers on a warm editorial spread. */
[data-design="chapters"] { --progression-background: var(--progression-paper); --progression-ink: var(--neutral-900); --progression-muted: var(--neutral-600); --progression-border: var(--progression-paper-line); }
[data-design="chapters"] .progression-ranks-v2 { gap: 0; }
[data-design="chapters"] .progression-rank-v2 { border-left: var(--border-width) solid var(--progression-border); padding: var(--space-5) var(--space-6); }
[data-design="chapters"] .progression-rank-v2:first-child { border-left: 0; }
[data-design="chapters"] .progression-stage-number-v2 { display: block; color: var(--belt-colour); font-family: var(--progression-font-heading); font-size: var(--progression-chapter-size); line-height: 1; letter-spacing: var(--progression-heading-tracking); margin-bottom: var(--space-3); }
[data-design="chapters"] .white-belt .progression-stage-number-v2 { color: var(--neutral-500); }
[data-design="chapters"] .progression-identity-v2 { border-top: var(--progression-chapter-rule) solid var(--belt-colour); padding-top: var(--space-4); }
[data-design="chapters"] .white-belt .progression-identity-v2 { border-color: var(--neutral-500); }
[data-design="chapters"] .progression-promotion-v2 { border-color: var(--progression-ink); }
[data-design="chapters"] .progression-header-v2 { border-bottom: var(--progression-path-width) solid var(--progression-ink); padding-bottom: var(--space-4); }
/* 08 Split screen: a light title panel beside compact, colour-coded belt lanes. */
[data-design="split"] .progression-rank-v2 { border-left: var(--progression-route-width) solid var(--belt-colour); background: var(--progression-panel); }
[data-design="split"] .progression-identity-v2 h2 { font-size: var(--progression-kids-title); }
[data-design="split"] .progression-promotion-v2 { border: 0; padding: 0; }
/* 09 Orbit: circular rank emblems connected across a common horizon. */
[data-design="orbit"] .progression-rank-v2 { padding: var(--space-5); }
[data-design="orbit"] .progression-identity-v2 { width: var(--progression-orbit-size); max-width: 100%; aspect-ratio: 1; align-self: center; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border-radius: var(--radius-pill); border: var(--progression-orbit-ring) solid var(--belt-colour); background: var(--progression-panel); }
[data-design="orbit"] .progression-identity-v2 h2 { font-size: var(--progression-orbit-title); }
[data-design="orbit"] .progression-stage-number-v2 { display: block; font-family: var(--font-mono); font-size: var(--progression-tiny-size); color: var(--progression-muted); margin-bottom: var(--space-2); }
[data-design="orbit"] .progression-kids-v2 .progression-identity-v2 { width: var(--progression-orbit-kids-size); }
[data-design="orbit"] .progression-time-v2 { margin-top: var(--space-2); }
[data-design="orbit"] .progression-time-v2 > strong { font-size: var(--progression-small-size); }
[data-design="orbit"] .progression-ranks-v2 { position: relative; isolation: isolate; }
[data-design="orbit"] .progression-ranks-v2::before { content: ''; position: absolute; z-index: -1; top: calc(var(--space-5) + var(--progression-orbit-size) / 2); left: 0; width: 100%; border-top: var(--progression-path-width) solid var(--progression-border); }
[data-design="orbit"] .progression-kids-v2 .progression-ranks-v2::before { top: calc(var(--space-5) + var(--progression-orbit-kids-size) / 2); }
[data-design="orbit"] .progression-promotion-v2 { border-top: var(--progression-path-width) solid var(--belt-colour); }

.progression-preview-v2 { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-2) var(--progression-page-padding); background: var(--neutral-900); color: var(--neutral-300); font-size: var(--fs-sm); }
.progression-preview-v2 a { color: var(--neutral-0); text-decoration: none; padding: var(--space-1) 0; }
.progression-preview-v2 a[aria-current] { border-bottom: var(--border-width) solid currentColor; }
.progression-preview-v2 { flex-wrap: wrap; }
.progression-orientation-picker-v2 { display: flex; gap: var(--space-1); margin-left: auto; }
.progression-zoom-picker-v2 { display: flex; align-items: center; gap: var(--space-1); }
.progression-zoom-value-v2 { min-width: var(--progression-zoom-value-width); text-align: center; font-variant-numeric: tabular-nums; }
:is(.progression-orientation-picker-v2,.progression-zoom-picker-v2) button { padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--neutral-700); border-radius: var(--radius-sm); background: transparent; color: var(--neutral-300); font: inherit; cursor: pointer; }
:is(.progression-orientation-picker-v2,.progression-zoom-picker-v2) button[aria-pressed="true"] { background: var(--neutral-0); color: var(--neutral-900); }
:is(.progression-orientation-picker-v2,.progression-zoom-picker-v2) button:focus-visible { outline: var(--progression-path-width) solid var(--neutral-0); outline-offset: var(--space-1); }
.progression-zoom-picker-v2 button:disabled { color: var(--neutral-600); cursor: default; }
[data-orientation="portrait"] { --progression-screen-width: var(--progression-portrait-width); --progression-screen-height: var(--progression-portrait-height); --progression-screen-ratio: var(--progression-portrait-ratio); }
.progression-display-v2:has(.progression-preview-stage-v2) { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: var(--neutral-800); }
.progression-preview-v2, .progression-design-picker-v2 { flex-shrink: 0; }
.progression-preview-stage-v2 { flex: 1; min-height: 0; overflow: auto; }
.progression-preview-stage-v2:focus-visible { outline: var(--progression-path-width) solid var(--neutral-500); outline-offset: calc(var(--progression-path-width) * -1); }
.progression-preview-surface-v2 { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-6); width: max(100%, calc(var(--progression-frame-width, 0px) + var(--space-6) * 2)); min-height: 100%; }
.progression-screen-frame-v2 { flex-shrink: 0; width: var(--progression-frame-width, 100%); padding: var(--progression-screen-bezel); border: var(--border-width) solid var(--progression-border); border-radius: var(--radius-lg); background: var(--progression-background); box-shadow: var(--shadow-lg); }
.progression-screen-viewport-v2 { position: relative; width: 100%; aspect-ratio: var(--progression-screen-ratio); overflow: hidden; }
.progression-screen-content-v2 { position: absolute; inset: 0; width: var(--progression-screen-width); height: var(--progression-screen-height); border: 0; transform: scale(var(--progression-screen-scale, 1)); transform-origin: top left; }
.progression-screen-caption-v2 { margin: 0; color: var(--neutral-300); font-size: var(--fs-sm); }
.progression-settings-v2 { max-width: var(--progression-form-width); }
.progression-settings-previews-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.progression-design-picker-v2 { display: flex; flex-wrap: wrap; gap: var(--space-1); padding: var(--space-2) var(--progression-page-padding); border-top: var(--border-width) solid var(--neutral-700); background: var(--neutral-900); }
.progression-design-picker-v2 button { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: var(--border-width) solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--neutral-300); font: var(--fs-sm) var(--font-ui); cursor: pointer; }
.progression-design-picker-v2 button span { color: var(--neutral-500); font-family: var(--font-mono); font-size: var(--fs-caption); }
.progression-design-picker-v2 button:hover { background: var(--neutral-800); color: var(--neutral-0); }
.progression-design-picker-v2 button[aria-pressed="true"] { background: var(--neutral-0); color: var(--neutral-900); border-color: var(--neutral-0); }
.progression-design-picker-v2 button:focus-visible { outline: var(--border-width) solid var(--neutral-0); outline-offset: var(--space-1); }
.progression-concept-gallery-v2 { padding: var(--space-5); }
.progression-concept-gallery-v2 h1 { margin: 0; font-family: var(--progression-font-heading); font-size: var(--progression-heading-size); }
.progression-concept-gallery-v2 p { margin: var(--space-3) 0; font-size: var(--progression-small-size); color: var(--progression-muted); }
.progression-concept-gallery-v2 .progression-design-picker-v2 { padding: var(--space-3) 0; margin: var(--space-4) 0; }
.progression-concept-gallery-v2 figure { margin: 0; background: var(--belt-black); }
.progression-concept-gallery-v2 img { display: block; width: 100%; height: auto; background: var(--progression-background); }
.progression-concept-gallery-v2 figcaption { padding: var(--space-4); font-size: var(--progression-small-size); background: var(--progression-panel); }

@media (min-width: 1001px) {
    [data-design="split"] .progression-poster-v2 { display: grid; grid-template-columns: var(--progression-split-sidebar) minmax(0,1fr); grid-template-areas: 'title ranks' 'guide ranks' 'credits credits' 'footer footer'; position: relative; isolation: isolate; }
    [data-design="split"] .progression-poster-v2::before { content: ''; grid-area: 1 / 1 / 3 / 2; background: var(--progression-paper); z-index: -1; }
    [data-design="split"] .progression-header-v2 { grid-area: title; color: var(--neutral-900); padding: var(--space-6); }
    [data-design="split"] .progression-title-v2 { flex-direction: column; align-items: flex-start; gap: var(--space-6); }
    [data-design="split"] .progression-title-v2 h1 { font-size: var(--progression-split-heading); }
    [data-design="split"] .progression-audience-v2 { color: var(--neutral-600); }
    [data-design="split"] .progression-reading-guide-v2 { grid-area: guide; flex-direction: column; justify-content: flex-end; padding: var(--space-6); color: var(--neutral-900); }
    [data-design="split"] .progression-reading-guide-v2 > span { color: var(--neutral-600); }
    [data-design="split"] .progression-ranks-v2 { grid-area: ranks; grid-template-columns: 1fr; gap: var(--space-4); }
    [data-design="split"] .progression-rank-v2 { display: grid; grid-template-columns: var(--progression-split-columns); align-items: center; gap: var(--space-5); }
    [data-design="split"] .progression-annotated-belt-v2 { max-width: var(--progression-row-art-width); margin: auto; }
    [data-design="split"] .progression-stripe-section-v2 figcaption { display: none; }
    [data-design="split"] .progression-credits-v2 { grid-area: credits; }
    [data-design="split"] .progression-footer-v2 { grid-area: footer; }
    [data-design="split"] .progression-kids-steps-v2 { grid-area: guide; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; border: 0; padding: var(--space-6); color: var(--neutral-900); --progression-muted: var(--neutral-600); }
    [data-design="split"] .progression-kids-v2 .progression-rank-v2 { grid-template-columns: var(--progression-kids-row-columns); }
    [data-design="split"] .progression-kids-variants-v2 { flex-direction: row; min-height: 0; gap: var(--space-5); }
    [data-design="split"] .progression-kids-variants-v2 > div { width: calc(100% / var(--progression-variant-columns)); }
    [data-design="split"] .progression-days-v2 { margin: 0; }
    .progression-canvas-v2 { display: flex; align-items: center; justify-content: center; height: 100vh; overflow: hidden; }
    .progression-canvas-v2 .progression-poster-v2 { flex-shrink: 0; transform: scale(var(--progression-scale,1)); }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-ranks-v2 { grid-template-columns: 1fr; }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-rank-v2 { display: grid; grid-template-columns: var(--progression-live-row-columns); gap: var(--space-6); align-items: center; padding-top: var(--space-3); padding-bottom: var(--space-3); }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-annotated-belt-v2 { max-width: var(--progression-row-art-width); margin: auto; }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-time-v2 { margin-top: var(--space-1); }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-promotion-v2 { border-top: 0; padding-top: 0; }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-stripe-section-v2 figcaption { display: none; }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-kids-v2 .progression-rank-v2 { grid-template-columns: var(--progression-kids-row-columns); }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-kids-variants-v2 { flex-direction: row; min-height: 0; gap: var(--space-6); }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-kids-variants-v2 > div { width: calc(100% / var(--progression-variant-columns)); }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"]) .progression-days-v2 { margin: 0; }
    [data-design="giant"] .progression-rank-v2 { grid-template-columns: var(--progression-giant-row-columns); }
    [data-design="giant"] .progression-kids-v2 .progression-identity-v2 h2 { font-size: var(--progression-rank-title); }
}
@media (max-width: 1000px) {
    [data-design="orbit"] .progression-ranks-v2::before { display: none; }
    .progression-ranks-v2, .progression-kids-v2 .progression-ranks-v2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
    [data-design="ascent"] .progression-ranks-v2, [data-design="ascent"] .progression-kids-v2 .progression-ranks-v2 { padding-top: 0; }
    [data-design="ascent"] .progression-rank-v2:nth-child(n) { margin-top: 0; }
    .progression-credits-v2 { grid-template-columns: 1fr; }
    .progression-reading-guide-v2 { flex-direction: column; gap: var(--space-1); }
    [data-design="giant"] .progression-identity-v2 h2 { font-size: var(--progression-rank-title); }
    [data-design="hero"] .progression-rank-v2:nth-child(n) .progression-stripe-section-v2 { padding: 0; }
}
@media (max-width: 600px) {
    .progression-ranks-v2, .progression-kids-v2 .progression-ranks-v2 { grid-template-columns: 1fr; }
    .progression-title-v2 { align-items: flex-start; flex-direction: column; gap: var(--space-2); }
    .progression-footer-v2 { flex-direction: column; align-items: flex-start; }
    .progression-footer-v2 > p { text-align: left; }
    .progression-credit-bars-v2 { gap: var(--space-3); }
    .progression-credit-bars-v2 > div { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
    .progression-credit-belt-v2 { max-width: 100%; width: 100%; }
    .progression-kids-variants-v2 { min-height: 0; }
    .progression-kids-variants-v2 > div { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-4); }
    .progression-kids-variants-v2 > div > span { width: var(--progression-kids-mobile-belt-width); }
    .progression-kids-steps-v2 { grid-template-columns: 1fr; gap: var(--space-4); }
    .progression-step-finish-v2 { justify-content: center; }
    .progression-design-picker-v2 { flex-wrap: nowrap; overflow-x: auto; padding: var(--space-2) var(--space-4); }
    .progression-design-picker-v2 button { flex-shrink: 0; min-height: var(--button-height-touch); }
}
/* Portrait signage is composed for a vertical television, independently of phone layouts. */
@media (min-width: 1001px) and (orientation: portrait) {
    .progression-display-v2 { --progression-title-size: var(--progression-portrait-title); --progression-rank-title: var(--progression-portrait-rank-title); --progression-kids-title: var(--progression-portrait-kids-title); --progression-giant-title: var(--progression-portrait-giant-title); --progression-chapter-size: var(--progression-portrait-chapter-size); }
    .progression-canvas-v2 .progression-poster-v2 { min-height: 100vh; }
    .progression-title-v2 { flex-direction: column; gap: var(--space-2); }
    .progression-reading-guide-v2 { flex-direction: column; gap: var(--space-2); }
    .progression-poster-v2 .progression-adult-ranks-v2 { grid-template-columns: repeat(2,minmax(0,1fr)); flex: 1; align-items: stretch; }
    .progression-poster-v2 .progression-adult-ranks-v2 .progression-rank-v2 { display: flex; flex-direction: column; gap: var(--space-5); }
    .progression-adult-ranks-v2 .progression-identity-v2 { min-height: 0; }
    .progression-adult-ranks-v2 .progression-promotion-v2 { margin-top: auto; }
    .progression-adult-ranks-v2 .progression-class-mix-v2 { margin-top: 0; }
    .progression-footer-v2 { align-items: flex-start; flex-direction: column; gap: var(--space-2); }
    .progression-footer-v2 > p { text-align: left; }
    .progression-credits-v2 { grid-template-columns: 1fr; gap: var(--space-3); }
    .progression-credit-title-v2 { flex-direction: row; align-items: baseline; gap: var(--space-3); }
    :is([data-design="ribbons"],[data-design="ascent"],[data-design="broadcast"],[data-design="giant"],[data-design="split"]) .progression-adult-ranks-v2 { grid-template-columns: 1fr; }
    :is([data-design="ribbons"],[data-design="ascent"],[data-design="broadcast"],[data-design="giant"],[data-design="split"]) .progression-adult-ranks-v2 .progression-rank-v2 { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: 'identity artwork' 'promotion classes'; align-items: center; padding: var(--space-6); gap: var(--space-4) var(--space-6); }
    :is([data-design="ribbons"],[data-design="ascent"],[data-design="broadcast"],[data-design="giant"],[data-design="split"]) .progression-adult-ranks-v2 .progression-identity-v2 { grid-area: identity; }
    :is([data-design="ribbons"],[data-design="ascent"],[data-design="broadcast"],[data-design="giant"],[data-design="split"]) .progression-stripe-section-v2 { grid-area: artwork; }
    :is([data-design="ribbons"],[data-design="ascent"],[data-design="broadcast"],[data-design="giant"],[data-design="split"]) .progression-adult-ranks-v2 .progression-promotion-v2 { grid-area: promotion; margin: 0; }
    :is([data-design="ribbons"],[data-design="ascent"],[data-design="broadcast"],[data-design="giant"],[data-design="split"]) .progression-class-mix-v2 { grid-area: classes; }
    :is([data-design="ribbons"],[data-design="broadcast"],[data-design="giant"],[data-design="split"]) .progression-annotated-belt-v2 { max-width: none; }
    [data-design="ascent"] .progression-ranks-v2 { padding-top: 0; gap: var(--space-3); }
    [data-design="ascent"] .progression-rank-v2:nth-child(n) { margin-top: 0; }
    [data-design="ascent"] .progression-rank-v2:nth-child(2) { margin-left: var(--progression-portrait-step); }
    [data-design="ascent"] .progression-rank-v2:nth-child(3) { margin-left: calc(var(--progression-portrait-step) * 2); }
    [data-design="ascent"] .progression-rank-v2:nth-child(4) { margin-left: calc(var(--progression-portrait-step) * 3); }
    [data-design="ascent"] .progression-rank-v2:nth-child(5) { margin-left: calc(var(--progression-portrait-step) * 4); }
    [data-design="chapters"] .progression-rank-v2:nth-child(odd) { border-left: 0; }
    [data-design="chapters"] .progression-stage-number-v2 { float: right; margin: 0 0 var(--space-2) var(--space-3); }
    [data-design="chapters"] .progression-identity-v2 { padding-top: var(--space-5); }
    [data-design="orbit"] .progression-ranks-v2::before { display: none; }
    [data-design="hero"] .progression-ranks-v2 { gap: var(--space-5); }
    [data-design="hero"] .progression-rank-v2:nth-child(n) .progression-stripe-section-v2 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
    [data-design="split"] .progression-poster-v2 { grid-template-columns: 1fr 1fr; grid-template-areas: 'title guide' 'ranks ranks' 'credits credits' 'footer footer'; grid-template-rows: auto 1fr auto auto; }
    [data-design="split"] .progression-poster-v2::before { grid-area: 1 / 1 / 2 / 3; }
    [data-design="split"] .progression-title-v2 h1 { font-size: var(--progression-title-size); }
    [data-design="split"] .progression-kids-steps-v2 { justify-content: center; gap: var(--space-3); }
    [data-design="split"] .progression-reading-guide-v2 { justify-content: center; }
    .progression-poster-v2.progression-kids-v2 .progression-ranks-v2 { grid-template-columns: 1fr; padding-top: 0; flex: 1; align-items: stretch; }
    .progression-poster-v2.progression-kids-v2 .progression-rank-v2 { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: 'identity days' 'variants variants'; align-items: center; gap: var(--space-4) var(--space-6); padding: var(--space-6); }
    .progression-kids-v2 .progression-identity-v2 { grid-area: identity; }
    .progression-kids-v2 .progression-kids-variants-v2 { grid-area: variants; display: flex; flex-direction: row; gap: var(--space-4); min-height: 0; }
    .progression-kids-v2 .progression-kids-variants-v2 > div { width: calc(100% / var(--progression-variant-columns)); }
    .progression-kids-v2 .progression-days-v2 { grid-area: days; margin: 0; justify-self: end; }
    .progression-kids-steps-v2 { grid-template-columns: 1fr 1fr; }
    .progression-step-finish-v2 { grid-column: 2; justify-content: center; }
    [data-design="chapters"] .progression-kids-v2 .progression-stage-number-v2 { float: none; font-size: var(--progression-portrait-giant-title); }
    [data-design="chapters"] .progression-kids-v2 .progression-rank-v2 { border-left: 0; border-bottom: var(--border-width) solid var(--progression-border); }
    [data-design="chapters"] .progression-kids-v2 .progression-identity-v2 { border-top: 0; padding-top: 0; }
    [data-design="giant"] .progression-kids-v2 .progression-identity-v2 h2 { font-size: var(--progression-kids-title); }
    [data-design="pennants"] .progression-kids-v2 .progression-rank-v2 { clip-path: var(--progression-portrait-pennant); padding-right: var(--progression-pennant-tip); }
    [data-design="orbit"] .progression-kids-v2 .progression-identity-v2 { justify-self: center; }
    [data-design="orbit"] .progression-poster-v2.progression-kids-v2 .progression-rank-v2 { grid-template-columns: var(--progression-portrait-kids-columns); grid-template-areas: 'identity variants' 'days variants'; }
    [data-design="orbit"] .progression-kids-v2 .progression-days-v2 { justify-self: start; }
    [data-design="hero"] .progression-kids-variants-v2 { border-top: 0; padding-top: 0; }
}
@media print {
    .progression-canvas-v2 { display: block; height: auto !important; overflow: visible; }
    .progression-canvas-v2 .progression-poster-v2 { transform: none; break-after: page; }
    .progression-preview-v2, .progression-design-picker-v2 { display: none; }
    .progression-display-v2 .progression-poster-v2[hidden] { display: flex !important; }
    .progression-display-v2 { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}


/* ========== CUSTOM TASKS ========== */
.custom-task-board-v2 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
    align-items: start;
}
.custom-task-filters-v2 { margin-bottom: var(--space-6); }
.custom-task-column-v2 {
    min-width: 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    overflow: hidden;
}
.custom-task-column-header-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-default);
}
.custom-task-column-header-v2 h2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    color: var(--text-primary);
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
}
.custom-task-column-header-v2 h2 i { color: var(--text-tertiary); }
.custom-task-column-count-v2,
.custom-task-panel-count-v2 {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    padding: 0 var(--space-2);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    background: var(--neutral-100);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
}
.custom-task-column-body-v2 {
    display: flex;
    min-height: 120px;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-2);
}
.custom-task-card-v2 {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    background: var(--bg-surface);
    box-shadow: var(--shadow-xs);
    text-decoration: none;
}
.custom-task-card-link-v2 {
    display: block;
    padding: 12px;
    color: inherit;
    text-decoration: none;
}
.custom-task-card-link-v2:hover { color: inherit; text-decoration: none; }
.custom-task-card-link-v2:focus-visible {
    outline: 0;
    box-shadow: var(--shadow-focus);
}
.custom-task-card-v2.is-overdue { border-left: 3px solid var(--color-error); }
.custom-task-card-title-v2 {
    color: var(--text-primary);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
}
.custom-task-card-description-v2 {
    display: -webkit-box;
    margin-top: var(--space-1);
    overflow: hidden;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.custom-task-card-meta-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) 12px;
    margin-top: 12px;
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}
.custom-task-card-meta-v2 span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}
.custom-task-card-meta-v2 .is-overdue { color: var(--color-error-text); font-weight: var(--fw-medium); }
.custom-task-card-actions-v2 {
    display: flex;
    justify-content: flex-end;
    padding: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}
.custom-task-card-actions-v2 form { margin: 0; }
.custom-task-column-empty-v2 {
    display: grid;
    min-height: 96px;
    place-items: center;
    padding: var(--space-6);
    color: var(--text-tertiary);
    font-size: var(--fs-sm);
    text-align: center;
}
.custom-task-weekdays-v2 {
    margin: 16px 0 0;
    padding: 0;
    border: 0;
}
.custom-task-weekday-options-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) 16px;
}
.custom-task-file-input-v2 { padding: var(--space-1); line-height: normal; }
.custom-task-heading-meta-v2 {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.custom-task-status-v2,
.custom-task-repeat-badge-v2 {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-pill);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
}
.custom-task-status-v2.status-todo { color: var(--text-secondary); background: var(--neutral-100); }
.custom-task-status-v2.status-in_progress { color: var(--color-primary-active); background: var(--color-primary-subtle); }
.custom-task-status-v2.status-done { color: var(--color-success-text); background: var(--color-success-subtle); }
.custom-task-repeat-badge-v2 { color: var(--text-secondary); background: var(--bg-hover); }
.custom-task-status-actions-v2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}
.page-grid-v2.custom-task-detail-grid-v2 { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.custom-task-detail-main-v2,
.custom-task-detail-side-v2 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 16px;
}
.custom-task-description-v2 {
    color: var(--text-primary);
    line-height: 1.6;
    white-space: normal;
}
.custom-task-checklist-list-v2 {
    display: flex;
    flex-direction: column;
}
.custom-task-checklist-shell-v2 {
    display: flex;
    flex-direction: column;
}
.custom-task-checklist-enable-v2 {
    align-self: flex-start;
}
.custom-task-checklist-item-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--input-height);
    padding: var(--space-1) var(--space-6);
}
.custom-task-checklist-item-v2 + .custom-task-checklist-item-v2 {
    border-top: var(--border-width) solid var(--border-subtle);
}
.custom-task-checklist-toggle-v2 {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    color: var(--text-primary);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    cursor: pointer;
}
.custom-task-checklist-toggle-v2 input {
    width: calc(var(--space-6) - var(--space-1));
    height: calc(var(--space-6) - var(--space-1));
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--color-primary);
}
.custom-task-checklist-toggle-v2 span {
    overflow-wrap: anywhere;
}
.custom-task-checklist-item-v2.is-complete .custom-task-checklist-toggle-v2 span {
    color: var(--text-tertiary);
    text-decoration: line-through;
}
.custom-task-checklist-item-actions-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.custom-task-checklist-item-actions-v2 .icon-btn-v2 {
    width: var(--input-height);
    height: var(--input-height);
}
.custom-task-checklist-item-actions-v2 .icon-btn-v2:disabled {
    opacity: 0;
    pointer-events: none;
}
.custom-task-checklist-add-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-6);
    border-top: var(--border-width) solid var(--border-default);
}
.custom-task-checklist-add-v2 .input-v2 {
    min-width: 0;
    flex: 1;
}
.custom-task-attachment-form-v2 {
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
}
.custom-task-attachment-list-v2 { border-top: 1px solid var(--border-default); }
.custom-task-attachment-row-v2 {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}
.custom-task-attachment-row-v2 + .custom-task-attachment-row-v2 { border-top: 1px solid var(--border-subtle); }
.custom-task-attachment-icon-v2 {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--bg-secondary);
}
.custom-task-attachment-row-v2 a {
    display: block;
    overflow: hidden;
    color: var(--text-link);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.custom-task-attachment-row-v2 span {
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}
.custom-task-facts-v2 {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 12px;
}
.custom-task-facts-v2 div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: var(--space-2); }
.custom-task-facts-v2 dt { color: var(--text-tertiary); font-size: var(--fs-caption); font-weight: var(--fw-medium); }
.custom-task-facts-v2 dd { margin: 0; color: var(--text-primary); font-size: var(--fs-sm); }
.custom-task-activity-list-v2 { padding: 8px 16px 16px; }
.custom-task-activity-row-v2 {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: var(--space-2);
    padding: var(--space-2) 0;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}
.custom-task-activity-marker-v2 {
    width: var(--space-2);
    height: var(--space-2);
    margin-top: 6px;
    border-radius: var(--radius-pill);
    background: var(--neutral-300);
}
.custom-task-activity-row-v2 strong { color: var(--text-primary); font-weight: var(--fw-medium); }
.custom-task-activity-row-v2 div > span { display: block; color: var(--text-tertiary); font-size: var(--fs-caption); }
.custom-task-danger-actions-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (max-width: 1099px) {
    .custom-task-board-v2 { grid-template-columns: 1fr; }
    .page-grid-v2.custom-task-detail-grid-v2 { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .custom-task-column-body-v2 { min-height: 0; }
    .custom-task-attachment-form-v2 { align-items: stretch; flex-direction: column; }
    .custom-task-attachment-form-v2 .form-field-v2.wide { flex: 0 0 auto; width: 100%; }
    .custom-task-status-actions-v2 .btn-v2 { min-height: var(--button-height-touch); }
    .custom-task-weekday-options-v2 { align-items: stretch; flex-direction: column; }
    .custom-task-checklist-toggle-v2 {
        min-height: var(--button-height-touch);
    }
    .custom-task-checklist-item-v2 {
        padding-right: var(--space-2);
        padding-left: var(--space-2);
    }
    .custom-task-checklist-item-actions-v2 {
        justify-content: flex-end;
    }
    .custom-task-checklist-item-actions-v2 .icon-btn-v2 {
        width: var(--button-height-touch);
        height: var(--button-height-touch);
    }
    .custom-task-checklist-add-v2 { padding: var(--space-2); }
    .custom-task-checklist-add-v2 .btn-v2 {
        min-height: var(--button-height-touch);
    }
}

/* ========== TASK CONFIGURATION ========== */
.task-configuration-page-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}
.task-configuration-group-v2 {
    overflow: hidden;
}
.task-configuration-group-header-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}
.task-configuration-group-title-v2,
.task-configuration-bulk-v2,
.task-configuration-badges-v2,
.task-configuration-assignee-list-v2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.task-configuration-group-title-v2 > svg { color: var(--text-tertiary); }
.task-configuration-bulk-v2 label {
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
}
.task-configuration-group-assignee-v2 { min-width: var(--subnav-width); }
.task-configuration-list-v2 {
    overflow: visible;
}
.task-configuration-column-headings-v2,
.task-configuration-row-v2 {
    display: grid;
    grid-template-columns: calc(var(--space-10) * 2) minmax(calc(var(--subnav-width) * 1.25), 1.4fr) minmax(var(--subnav-width), 1fr) auto;
    column-gap: var(--space-6);
}
.task-configuration-column-headings-v2 {
    align-items: center;
    min-height: var(--space-10);
    padding: 0 var(--space-6);
    border-bottom: 1px solid var(--border-default);
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
}
.task-configuration-row-v2 {
    align-items: center;
    min-height: calc(var(--space-10) + var(--space-6));
    padding: calc(var(--space-2) + var(--space-1)) var(--space-6);
    background: var(--bg-surface);
}
.task-configuration-row-v2 + .task-configuration-row-v2 { border-top: 1px solid var(--border-subtle); }
.task-configuration-row-v2.is-disabled { background: var(--bg-secondary); }
.task-configuration-row-v2.is-disabled .task-configuration-info-v2 h3,
.task-configuration-row-v2.is-disabled .task-configuration-info-v2 p { color: var(--text-tertiary); }
.task-configuration-enabled-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.task-configuration-enabled-v2 > span {
    color: var(--text-secondary);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
}
.task-configuration-row-v2.is-disabled .task-configuration-enabled-v2 > span {
    color: var(--text-tertiary);
}
.task-configuration-info-v2 { min-width: 0; }
.task-configuration-info-v2 h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
}
.task-configuration-info-v2 p {
    margin: var(--space-1) 0 0;
    color: var(--text-secondary);
    font-size: var(--fs-caption);
    line-height: 1.45;
}
.task-configuration-badges-v2 { margin-top: var(--space-2); }
.task-configuration-assignments-v2 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
}
.task-configuration-mobile-label-v2 { display: none; }
.task-configuration-assignee-v2 {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-1) var(--space-1) calc(var(--space-2) + var(--space-1));
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    background: var(--neutral-100);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
}
.task-configuration-assignee-remove-v2 {
    display: inline-grid;
    width: var(--space-6);
    height: var(--space-6);
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    color: var(--text-tertiary);
    background: transparent;
    cursor: pointer;
}
.task-configuration-assignee-remove-v2:hover {
    color: var(--color-error-text);
    background: var(--color-error-subtle);
}
.task-configuration-unassigned-v2,
.task-configuration-designation-v2 {
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}
.task-configuration-assignee-select-v2 {
    width: 100%;
    max-width: calc(var(--subnav-width) * 1.25);
}
.task-configuration-add-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-2) var(--space-6);
    border-top: 1px solid var(--border-default);
    background: var(--bg-secondary);
}
.task-configuration-add-v2 > label {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}
.task-configuration-add-v2 > div {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.task-configuration-add-v2 .input-v2 { min-width: calc(var(--subnav-width) * 1.25); }
.task-configuration-detail-v2 {
    display: flex;
    max-width: calc(var(--subnav-width) * 4);
    flex-direction: column;
    gap: var(--space-6);
}
.form-help-v2 {
    margin: 0 0 var(--space-6);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.switch-v2 + .form-help-v2 { margin-top: var(--space-2); margin-bottom: 0; }
.task-configuration-detail-assignees-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.task-configuration-detail-add-v2 {
    max-width: calc(var(--subnav-width) * 2);
    margin-top: var(--space-6);
}
.task-schedule-table-v2 .input-v2 { min-width: calc(var(--space-10) * 3); }
.task-schedule-table-v2 tr.is-inactive { background: var(--bg-secondary); }
.task-schedule-table-v2 tr.is-inactive td:not(:first-child) { color: var(--text-tertiary); }
.task-checklist-configuration-list-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.task-checklist-configuration-row-v2,
.task-checklist-configuration-add-v2 {
    display: grid;
    grid-template-columns: minmax(var(--subnav-width), 1fr) minmax(var(--subnav-width), 1fr) minmax(var(--subnav-width), 1fr) auto;
    align-items: end;
    gap: var(--space-2);
    padding: var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}
.task-checklist-configuration-add-v2 {
    margin-top: var(--space-6);
    border-style: dashed;
    background: var(--bg-secondary);
}
.task-checklist-weekdays-v2 {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    border: 0;
}
.task-checklist-weekdays-v2 > div {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-6);
}
.task-checklist-configuration-actions-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.task-configuration-rename-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    max-width: calc(var(--subnav-width) * 2);
    margin-bottom: var(--space-6);
}

@media (max-width: 1099px) {
    .task-configuration-column-headings-v2,
    .task-configuration-row-v2 {
        grid-template-columns: calc(var(--space-10) * 2) minmax(0, 1fr) auto;
    }
    .task-configuration-column-headings-v2 span:nth-child(3) { display: none; }
    .task-configuration-assignments-v2 { grid-column: 2; }
    .task-checklist-configuration-row-v2,
    .task-checklist-configuration-add-v2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .task-configuration-page-v2 { gap: var(--space-6); }
    .task-configuration-group-header-v2,
    .task-configuration-bulk-v2 {
        align-items: stretch;
        flex-direction: column;
    }
    .task-configuration-group-header-v2 { padding: var(--space-6); }
    .task-configuration-column-headings-v2 { display: none; }
    .task-configuration-group-assignee-v2 { width: 100%; }
    .task-configuration-row-v2 {
        grid-template-columns: 1fr auto;
        gap: var(--space-6);
        min-height: 0;
        padding: var(--space-6);
    }
    .task-configuration-enabled-v2,
    .task-configuration-assignments-v2 { grid-column: 1 / -1; }
    .task-configuration-info-v2 { grid-column: 1 / -1; }
    .task-configuration-enabled-v2 { grid-row: 1; }
    .task-configuration-row-v2 > .btn-v2 {
        grid-column: 2;
        grid-row: 1;
    }
    .task-configuration-mobile-label-v2 {
        display: block;
        color: var(--text-tertiary);
        font-size: var(--fs-caption);
        font-weight: var(--fw-semibold);
    }
    .task-configuration-assignee-select-v2 { width: 100%; }
    .task-configuration-add-v2 {
        align-items: stretch;
        flex-direction: column;
        gap: var(--space-2);
        padding: var(--space-6);
    }
    .task-configuration-add-v2 > div {
        align-items: stretch;
        flex-direction: column;
    }
    .task-configuration-add-v2 .input-v2 { min-width: 0; width: 100%; }
    .task-configuration-add-v2 .btn-v2 { min-height: var(--button-height-touch); }
    .task-checklist-configuration-row-v2,
    .task-checklist-configuration-add-v2 {
        grid-template-columns: 1fr;
    }
    .task-checklist-weekdays-v2 { grid-column: auto; }
    .task-checklist-weekdays-v2 > div { flex-direction: column; }
    .task-checklist-configuration-actions-v2 { align-items: stretch; flex-direction: column; }
    .task-checklist-configuration-actions-v2 .btn-v2 { width: 100%; }
    .task-configuration-rename-v2 { align-items: stretch; flex-direction: column; }
}

/* ========== BOOKKEEPING PERIOD DOCUMENTS ========== */
.bookkeeping-document-list-v2 {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.bookkeeping-document-row-v2 {
    display: grid;
    grid-template-columns: var(--space-10) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-6);
    background: var(--bg-surface);
}
.bookkeeping-document-row-v2 + .bookkeeping-document-row-v2 {
    border-top: 1px solid var(--border-subtle);
}
.bookkeeping-document-icon-v2 {
    display: grid;
    width: var(--space-10);
    height: var(--space-10);
    place-items: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--bg-secondary);
    font-size: var(--fs-h2);
}
.bookkeeping-document-details-v2 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: var(--space-1);
}
.bookkeeping-document-details-v2 strong {
    color: var(--text-primary);
    font-weight: var(--fw-semibold);
}
.bookkeeping-document-details-v2 span,
.bookkeeping-share-note-v2,
.panel-copy-v2 {
    color: var(--text-tertiary);
    font-size: var(--fs-sm);
}
.bookkeeping-document-inline-action-v2 {
    display: inline;
    margin: 0 0 0 var(--space-1);
    padding: 0;
    border: 0;
    color: var(--text-link);
    background: transparent;
    font: inherit;
    font-weight: var(--fw-medium);
    text-decoration: underline;
    cursor: pointer;
}
.bookkeeping-document-inline-action-v2:hover {
    color: var(--color-primary-hover);
}
.bookkeeping-document-inline-action-v2:focus-visible {
    border-radius: var(--radius-sm);
    outline: 0;
    box-shadow: var(--shadow-focus);
}
.panel-copy-v2 {
    margin: var(--space-1) 0 0;
}
.bookkeeping-share-field-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: var(--space-2);
}
.bookkeeping-share-field-v2 .input-v2 {
    min-width: 0;
    font-family: var(--font-mono);
    font-size: var(--fs-caption);
}
.bookkeeping-share-note-v2 {
    margin: var(--space-2) 0;
}
.infoniqa-form-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}
.infoniqa-readiness-v2 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    padding: var(--space-2) var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}
.infoniqa-readiness-v2.ready {
    color: var(--color-success-text);
    border-color: var(--color-success);
    background: var(--color-success-subtle);
}
.infoniqa-readiness-v2.incomplete {
    color: var(--color-warning-text);
    border-color: var(--color-warning);
    background: var(--color-warning-subtle);
}
.infoniqa-readiness-v2 > div:not(.infoniqa-readiness-icon-v2) {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.infoniqa-readiness-v2 span {
    font-size: var(--fs-sm);
}
.infoniqa-readiness-icon-v2 {
    font-size: var(--fs-h2);
}
.infoniqa-issue-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(var(--space-10) * 3), 1fr));
    gap: var(--space-2);
    margin: calc(var(--space-6) * -1) 0 var(--space-6);
}
.infoniqa-issue-grid-v2 span {
    padding: var(--space-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    background: var(--bg-surface);
    font-size: var(--fs-caption);
}
.infoniqa-mapping-list-v2 {
    display: flex;
    flex-direction: column;
}
.infoniqa-mapping-row-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(calc(var(--space-10) * 3), calc(var(--space-10) * 5));
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-2) 0;
}
.infoniqa-mapping-row-v2 + .infoniqa-mapping-row-v2 {
    border-top: 1px solid var(--border-subtle);
}
.infoniqa-mapping-row-v2 > span,
.infoniqa-category-table-v2 td:first-child {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.infoniqa-mapping-row-v2 small,
.infoniqa-category-table-v2 small {
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}
.infoniqa-category-table-wrap-v2 {
    overflow-x: auto;
}
.infoniqa-category-table-v2 {
    min-width: calc(var(--space-10) * 18);
}
.infoniqa-category-table-v2 .input-v2 {
    min-width: calc(var(--space-10) * 2);
}
.infoniqa-rate-field-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-1);
    color: var(--text-tertiary);
}
.infoniqa-import-note-v2 {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-6);
    border: 1px solid var(--color-primary-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--color-primary-subtle);
    font-size: var(--fs-sm);
}
.infoniqa-import-note-v2 svg {
    flex: 0 0 auto;
    margin-top: var(--space-1);
    color: var(--color-primary);
}
.bookkeeping-share-shell-v2.infoniqa-public-shell-v2 {
    width: calc(var(--subnav-width) * 5);
    padding-bottom: var(--space-6);
}
.infoniqa-individual-downloads-v2 {
    margin-top: var(--space-6);
}
.infoniqa-download-list-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.bookkeeping-share-page-v2 {
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary);
    background: var(--bg-canvas);
    font-family: var(--font-ui);
}
.bookkeeping-share-shell-v2 {
    width: calc(var(--subnav-width) * 3);
    max-width: calc(100% - (var(--space-6) * 2));
    margin: 0 auto;
    padding: var(--space-10) 0;
}
.bookkeeping-share-header-v2 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}
.bookkeeping-share-header-v2 h1 {
    margin: var(--space-1) 0;
    color: var(--text-primary);
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
}
.bookkeeping-share-header-v2 p {
    margin: 0;
    color: var(--text-secondary);
}
.bookkeeping-share-eyebrow-v2 {
    color: var(--text-tertiary);
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--space-1);
    text-transform: uppercase;
}
.bookkeeping-share-lock-v2 {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    background: var(--bg-surface);
    font-size: var(--fs-caption);
    white-space: nowrap;
}
.bookkeeping-share-panel-v2 {
    padding: var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-xs);
}
.bookkeeping-share-panel-v2 + .bookkeeping-share-panel-v2 {
    margin-top: var(--space-6);
}
.bookkeeping-share-panel-heading-v2 {
    margin-bottom: var(--space-6);
}
.bookkeeping-share-footer-v2 {
    margin: var(--space-6) 0 0;
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
    text-align: center;
}

@media (max-width: 767px) {
    .bookkeeping-document-row-v2 {
        grid-template-columns: var(--space-10) minmax(0, 1fr);
    }
    .bookkeeping-document-row-v2 .btn-v2 {
        grid-column: 1 / -1;
        min-height: 44px;
    }
    .bookkeeping-share-field-v2 {
        grid-template-columns: 1fr;
    }
    .bookkeeping-share-field-v2 .btn-v2 {
        min-height: 44px;
    }
    .bookkeeping-share-header-v2 {
        flex-direction: column;
    }
    .infoniqa-readiness-v2 {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .infoniqa-readiness-v2 .btn-v2 {
        grid-column: 1 / -1;
        min-height: var(--row-height);
    }
    .infoniqa-mapping-row-v2 {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2);
    }
    .infoniqa-category-table-v2 {
        min-width: 0;
    }
}

/* ========== EXPECTED TRIAL LEADS ========== */
.trial-leads-v2 { grid-column: 1 / -1; }
.trial-lead-group-v2 + .trial-lead-group-v2 { border-top: 1px solid var(--border-default); }
.trial-lead-group-v2 > h3 {
    margin: 0;
    padding: var(--space-2) var(--space-6);
    color: var(--text-secondary);
    background: var(--bg-secondary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
}
.trial-lead-row-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-2) var(--space-6);
    border-top: 1px solid var(--border-subtle);
}
.trial-lead-main-v2 { min-width: 0; }
.trial-lead-main-v2 > strong { color: var(--text-primary); font-weight: var(--fw-semibold); }
.trial-lead-meta-v2,
.trial-lead-notes-v2 { color: var(--text-tertiary); font-size: var(--fs-caption); }
.trial-lead-notes-v2 { margin-top: var(--space-1); white-space: pre-line; }
.trial-leads-error-v2 { margin: var(--space-2) var(--space-6); }
.myc-item-title .myc-badge.trials { background: var(--color-primary-subtle); color: var(--color-primary-active); }
.screen-trial-leads-modal {
    display: none;
    position: absolute;
    inset: var(--space-10) var(--space-10) auto;
    max-height: calc(100% - (2 * var(--space-10)));
    overflow-y: auto;
}
.screen-trial-leads-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

@media (max-width: 767px) {
    .trial-lead-row-v2 { align-items: flex-start; flex-direction: column; gap: var(--space-2); }
    .trial-lead-row-v2 .btn-v2 { min-height: 44px; }
}

/* ========== J+S ADMINISTRATION ========== */
.youth-and-sport-member-panel-v2,
.youth-and-sport-lower-grid-v2 { margin-top: var(--space-6); }
.youth-and-sport-summary-v2 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}
.youth-and-sport-summary-card-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    color: var(--text-secondary);
    box-shadow: var(--shadow-xs);
}
.youth-and-sport-summary-card-v2 strong { color: var(--text-primary); font-size: var(--fs-display); font-weight: var(--fw-semibold); }
.youth-and-sport-summary-card-v2.ready { border-color: var(--color-success); background: var(--color-success-subtle); }
.youth-and-sport-summary-card-v2.incomplete { border-color: var(--color-warning); background: var(--color-warning-subtle); }
.youth-and-sport-workflow-navigation-v2 {
    margin-bottom: var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}
.youth-and-sport-workflow-panel-v2 { scroll-margin-top: calc(var(--topbar-height) + var(--space-2)); }
#youth-and-sport-leaders { scroll-margin-top: calc(var(--topbar-height) + var(--space-2)); }
.youth-and-sport-workflow-panel-v2[hidden],
.youth-and-sport-selection-item-v2[hidden] { display: none !important; }
.youth-and-sport-lesson-date-v2,
.youth-and-sport-lesson-detail-v2 { display: block; }
.youth-and-sport-lesson-detail-v2 { color: var(--text-tertiary); font-size: var(--fs-caption); }
.youth-and-sport-leader-picker-v2 > div,
.youth-and-sport-leader-options-v2 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.youth-and-sport-leader-picker-v2 .checkbox-label-v2,
.youth-and-sport-leader-options-v2 .checkbox-label-v2 { margin: 0; white-space: nowrap; }
.youth-and-sport-lesson-filters-v2 .input-sm-v2,
.youth-and-sport-leader-filters-v2 .input-sm-v2 { width: calc(var(--subnav-width) - var(--space-10)); }
.youth-and-sport-reference-form-v2 { display: flex; align-items: flex-end; gap: var(--space-2); }
.youth-and-sport-reference-form-v2 .input-v2 { width: calc(var(--subnav-width) - var(--space-10)); }
.youth-and-sport-member-search-v2 { width: var(--subnav-width); }
.youth-and-sport-pagination-v2 { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding: var(--space-2) var(--space-6); border-top: 1px solid var(--border-default); }
#youthAndSportReadinessTable tr[hidden] { display: none !important; }
.youth-and-sport-readiness-banner-v2 {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    padding: var(--space-2) var(--space-6);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}
.youth-and-sport-readiness-banner-v2.ready { color: var(--color-success-text); background: var(--color-success-subtle); border-color: var(--color-success); }
.youth-and-sport-readiness-banner-v2.incomplete { color: var(--color-warning-text); background: var(--color-warning-subtle); border-color: var(--color-warning); }
.youth-and-sport-readiness-banner-v2 > svg { flex: 0 0 auto; width: var(--space-6); height: var(--space-6); }
.youth-and-sport-readiness-banner-v2 div { display: flex; flex-direction: column; }
.youth-and-sport-readiness-banner-v2 details { margin-left: auto; }
.youth-and-sport-readiness-banner-v2 summary { cursor: pointer; font-weight: var(--fw-medium); }
.youth-and-sport-selection-actions-v2 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.youth-and-sport-selection-list-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: calc(var(--row-height) * 8);
    overflow-y: auto;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}
.youth-and-sport-selection-item-v2 {
    display: grid;
    grid-template-columns: var(--space-6) 1fr;
    column-gap: var(--space-2);
    padding: var(--space-2);
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
}
.youth-and-sport-selection-item-v2:hover { background: var(--bg-hover); }
.youth-and-sport-selection-item-v2 input { grid-row: 1 / span 2; align-self: center; }
.youth-and-sport-selection-item-v2 .selection-primary { display: flex; align-items: center; gap: var(--space-2); min-width: 0; overflow-wrap: anywhere; color: var(--text-primary); font-weight: var(--fw-medium); }
.youth-and-sport-selection-item-v2 .selection-secondary { min-width: 0; overflow-wrap: anywhere; color: var(--text-tertiary); font-size: var(--fs-caption); }
.youth-and-sport-selection-item-v2 [data-observed-badge][hidden] { display: none !important; }
.youth-and-sport-export-list-v2 { display: flex; flex-direction: column; }
.youth-and-sport-export-list-v2 > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding: var(--space-2) 0; border-bottom: 1px solid var(--border-subtle); }
.youth-and-sport-export-list-v2 > div:last-child { border-bottom: 0; }
.youth-and-sport-export-list-v2 span { display: flex; flex-direction: column; }
.youth-and-sport-export-list-v2 small { color: var(--text-tertiary); }
.youth-and-sport-panel-copy-v2 { margin-top: 0; }
.youth-and-sport-panel-copy-v2 + form input[type="file"] { height: auto; padding: var(--space-2); }

@media (max-width: 767px) {
    .youth-and-sport-summary-v2,
    .youth-and-sport-selection-list-v2 { grid-template-columns: 1fr; }
    .youth-and-sport-reference-form-v2 { width: 100%; flex-wrap: wrap; }
    .youth-and-sport-workflow-navigation-v2 { flex-wrap: nowrap; overflow-x: auto; }
    .youth-and-sport-workflow-navigation-v2 .filter-chip-v2 { flex: 0 0 auto; }
    .youth-and-sport-lesson-filters-v2 .toolbar-filter-group,
    .youth-and-sport-leader-filters-v2 .toolbar-filter-group { width: 100%; }
    .youth-and-sport-lesson-filters-v2 .input-sm-v2,
    .youth-and-sport-lesson-filters-v2 .toolbar-filter-select,
    .youth-and-sport-leader-filters-v2 .input-sm-v2,
    .youth-and-sport-leader-filters-v2 .toolbar-filter-select { flex: 1 1 auto; width: auto; }
}

/* Scoped reset - only applies inside the v2 shell */
.app-v2, .app-v2 * { box-sizing: border-box; }
.app-v2 table, .app-v2 input[type="number"], .app-v2 .tabular { font-variant-numeric: tabular-nums; }
.app-v2 button { font-family: inherit; }

/* Link styling is scoped to content area - anchors used as nav (rail, subnav)
   or as buttons get colors from their own component class. Button-like
   anchors need explicit colour overrides because .content-v2 a (specificity
   1,1) would otherwise beat .btn-primary-v2 (specificity 1,0). */
.content-v2 a { color: var(--text-link); text-decoration: none; }
.content-v2 a:hover { text-decoration: underline; }
.content-v2 a.btn-v2 { color: var(--neutral-800); text-decoration: none; }
.content-v2 a.btn-v2:hover { text-decoration: none; }
.content-v2 a.btn-primary-v2,
.content-v2 a.btn-primary-v2:hover { color: #fff; }
.content-v2 a.btn-secondary-v2 { color: var(--neutral-800); }
.content-v2 a.btn-secondary-v2:hover { color: var(--neutral-900); }
.content-v2 a.btn-ghost-v2 { color: var(--neutral-700); }
.content-v2 a.btn-ghost-v2:hover { color: var(--neutral-900); }
.content-v2 a.btn-danger-v2,
.content-v2 a.btn-danger-v2:hover { color: #fff; }
.content-v2 a.btn-success-v2,
.content-v2 a.btn-success-v2:hover { color: #fff; }
.content-v2 a.btn-warning-v2,
.content-v2 a.btn-warning-v2:hover { color: #fff; }

.environment-banner-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: var(--space-6);
    padding: 0 var(--space-6);
    border-bottom: var(--border-width) solid var(--color-warning);
    color: var(--color-warning-text);
    background: var(--color-warning-subtle);
    font-family: var(--font-ui);
    font-size: var(--fs-caption);
    line-height: 1;
}
.environment-banner-v2 strong { font-weight: var(--fw-semibold); }
.environment-banner-v2 + .app-v2 {
    min-height: calc(100vh - var(--space-6));
}
.environment-banner-v2 + .app-v2 .rail,
.environment-banner-v2 + .app-v2 .subnav {
    height: calc(100vh - var(--space-6));
}

.app-v2 {
    display: grid;
    grid-template-columns: var(--rail-width) var(--subnav-width) 1fr;
    min-height: 100vh;
    font-family: var(--font-ui);
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01", "ss03";
    transition: grid-template-columns var(--transition-base);
}
html[data-rail="expanded"] .app-v2 {
    grid-template-columns: var(--rail-width-expanded) var(--subnav-width) 1fr;
}

/* ========== TIER 1 RAIL ========== */
.rail {
    background: var(--bg-rail);
    color: var(--rail-text);
    display: flex;
    flex-direction: column;
    padding: 8px 8px 10px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 20;
    transition: width var(--transition-base);
}
.rail::-webkit-scrollbar { width: 4px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb { background: #2A2D34; border-radius: 999px; }

.rail-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px 4px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--rail-divider);
}
.rail-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.rail-brand-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3B82FF 0%, #1857CC 100%);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.04em;
    box-shadow: 0 4px 10px rgba(30, 111, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}
.rail-brand-text {
    display: none;
    color: var(--rail-text-active);
    font-size: 14px;
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.rail-toggle {
    width: 26px; height: 26px;
    display: inline-flex;
    align-items: center; justify-content: center;
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--rail-text-muted);
    cursor: pointer;
    flex-shrink: 0;
}
.rail-toggle:hover { background: var(--bg-rail-hover); color: var(--rail-text-active); }
.rail-toggle svg,
.rail-toggle > i { width: 14px; height: 14px; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; stroke-width: 2; }

.rail-group { display: flex; flex-direction: column; gap: 1px; }
.rail-group + .rail-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rail-divider); }
.rail-group-label {
    display: none;
    padding: 6px 10px 2px;
    font-size: 10px;
    font-weight: var(--fw-semibold);
    color: var(--rail-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.rail-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--rail-text);
    cursor: pointer;
    position: relative;
    transition: background var(--transition-fast), color var(--transition-fast);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: -0.005em;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}
.rail-btn svg,
.rail-btn > i {
    width: 18px; height: 18px;
    font-size: 18px;
    line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    stroke-width: 1.75;
    flex-shrink: 0;
    color: var(--rail-text-muted);
}
.rail-btn-label { display: none; flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.rail-btn:hover,
.rail-btn:focus,
.rail-btn:active {
    background: var(--bg-rail-hover);
    color: var(--rail-text-active);
    text-decoration: none;
    outline: none;
}
.rail-btn:hover svg,
.rail-btn:hover > i { color: var(--rail-text); }
.rail-btn.active {
    background: rgba(30, 111, 255, 0.16);
    color: #7CB0FF;
}
.rail-btn.active svg,
.rail-btn.active > i { color: #7CB0FF; }
.rail-btn.active::before {
    content: '';
    position: absolute;
    left: -8px; top: 7px; bottom: 7px;
    width: 3px;
    background: var(--color-primary);
    border-radius: 0 3px 3px 0;
}
.rail-btn .rail-badge {
    font-size: 10px;
    font-weight: var(--fw-semibold);
    background: var(--color-primary);
    color: #fff;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    display: inline-grid; place-items: center;
    line-height: 1;
    flex-shrink: 0;
}

/* Collapsed mode: hide labels, center icons */
html[data-rail="collapsed"] .app-v2 .rail-btn {
    justify-content: center;
    padding: 0;
    width: 40px;
    margin: 0 auto;
}
html[data-rail="collapsed"] .app-v2 .rail-btn .rail-btn-label { display: none; }
html[data-rail="collapsed"] .app-v2 .rail-btn .rail-badge {
    position: absolute;
    top: 3px; right: 3px;
    min-width: 15px; height: 15px;
    font-size: 9px;
    border: 2px solid var(--bg-rail);
    padding: 0 3px;
}
html[data-rail="collapsed"] .app-v2 .rail-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px); top: 50%;
    transform: translateY(-50%);
    background: var(--neutral-900);
    color: #fff;
    font-size: var(--fs-caption);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: var(--shadow-md);
}
html[data-rail="collapsed"] .app-v2 .rail-group-label { display: none; }
html[data-rail="collapsed"] .app-v2 .rail-brand-text { display: none; }
html[data-rail="collapsed"] .app-v2 .rail-header {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px 0 10px;
}
html[data-rail="collapsed"] .app-v2 .rail-toggle-icon-collapse { display: none; }

/* Expanded mode */
html[data-rail="expanded"] .app-v2 .rail-brand-text { display: block; }
html[data-rail="expanded"] .app-v2 .rail-btn-label { display: block; }
html[data-rail="expanded"] .app-v2 .rail-group-label { display: block; }
html[data-rail="expanded"] .app-v2 .rail-toggle-icon-expand { display: none; }
html[data-rail="expanded"] .app-v2 .rail-toggle { margin-left: auto; }

.rail-spacer { flex: 1; min-height: 8px; }
.rail-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 6px;
    background: transparent;
    border: 0;
    width: 100%;
    color: var(--rail-text);
    cursor: pointer;
    margin-top: 8px;
    border-top: 1px solid var(--rail-divider);
    text-decoration: none;
}
.rail-user:hover,
.rail-user:focus,
.rail-user:active { background: var(--bg-rail-hover); text-decoration: none; outline: none; }
.rail-user.active { background: var(--bg-rail-hover); }
.rail-user-avatar {
    width: 28px; height: 28px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #8089A0 0%, #4A5060 100%);
    color: #fff;
    display: grid; place-items: center;
    font-weight: var(--fw-semibold);
    font-size: 11px;
    flex-shrink: 0;
}
.rail-user-info { display: none; flex: 1; text-align: left; overflow: hidden; min-width: 0; }
.rail-user-name { font-size: var(--fs-sm); color: var(--rail-text-active); font-weight: var(--fw-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-user-meta { font-size: var(--fs-caption); color: var(--rail-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-rail="expanded"] .app-v2 .rail-user-info { display: block; }
html[data-rail="collapsed"] .app-v2 .rail-user { padding: 6px; justify-content: center; }
.rail-user-cog {
    color: var(--rail-text-muted);
    font-size: 12px;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity var(--transition-base), color var(--transition-base);
}
.rail-user:hover .rail-user-cog { color: var(--rail-text-active); opacity: 1; }
html[data-rail="collapsed"] .app-v2 .rail-user-cog { display: none; }

/* ========== TIER 2 SUBNAV ========== */
.subnav {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}
.subnav-header {
    height: var(--topbar-height);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-default);
    flex-shrink: 0;
}
.subnav-title {
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    letter-spacing: -0.01em;
}
.subnav-action {
    width: 24px; height: 24px;
    display: grid; place-items: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--neutral-600);
    cursor: pointer;
}
.subnav-action:hover { color: var(--neutral-900); border-color: var(--neutral-300); }
.subnav-action svg { width: 12px; height: 12px; stroke-width: 2; }

.subnav-body {
    padding: 8px 6px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.subnav-body::-webkit-scrollbar { width: 6px; }
.subnav-body::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: 999px; }
.subnav-body::-webkit-scrollbar-thumb:hover { background: var(--neutral-300); }

.subnav-section + .subnav-section { margin-top: 12px; }
.subnav-eyebrow {
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px 4px;
}
.subnav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 30px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    color: var(--neutral-700);
    font-size: var(--fs-sm);
    text-decoration: none;
    cursor: pointer;
    font-weight: var(--fw-medium);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.subnav-link svg,
.subnav-link > i {
    width: 14px; height: 14px;
    font-size: 14px;
    line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--neutral-500);
    stroke-width: 1.75;
    flex-shrink: 0;
}
.subnav-link:hover,
.subnav-link:focus,
.subnav-link:active {
    background: var(--bg-hover);
    color: var(--neutral-900);
    text-decoration: none;
    outline: none;
}
.subnav-link:hover svg,
.subnav-link:hover > i { color: var(--neutral-700); }
.subnav-link.active {
    background: var(--color-primary-subtle);
    color: var(--color-primary-active);
}
.subnav-link.active svg,
.subnav-link.active > i { color: var(--color-primary); }
.subnav-link-muted {
    color: var(--neutral-400);
}
.subnav-link-muted svg,
.subnav-link-muted > i {
    color: var(--neutral-400);
}
.subnav-link-muted:hover,
.subnav-link-muted:focus,
.subnav-link-muted:active {
    color: var(--neutral-600);
}
.subnav-link-muted:hover svg,
.subnav-link-muted:hover > i {
    color: var(--neutral-500);
}
.subnav-link-muted.active {
    background: var(--bg-muted);
    color: var(--neutral-500);
}
.subnav-link-muted.active svg,
.subnav-link-muted.active > i {
    color: var(--neutral-500);
}
.subnav-count {
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    color: var(--neutral-600);
    background: var(--neutral-100);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-variant-numeric: tabular-nums;
}
.subnav-link.active .subnav-count { color: var(--color-primary-active); background: var(--color-primary-subtle); }
.subnav-count.mine { color: var(--color-primary-active); background: var(--color-primary-subtle); }
.subnav-count.warn, .subnav-link.active .subnav-count.warn { color: var(--color-warning-text); background: var(--color-warning-subtle); }
.subnav-count.err, .subnav-link.active .subnav-count.err { color: var(--color-error-text); background: var(--color-error-subtle); }
.subnav-count.zero { color: var(--neutral-400); background: transparent; }

.subnav-group { display: none; }
.subnav-group.active { display: block; }

/* ========== TOPBAR ========== */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border-default);
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.breadcrumb-v2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--neutral-500);
}
.breadcrumb-v2 .sep { color: var(--neutral-300); }
.breadcrumb-v2 .crumb { color: var(--neutral-600); }
.breadcrumb-v2 .crumb.current { color: var(--neutral-900); font-weight: var(--fw-medium); }
.topbar-spacer { flex: 1; }

.icon-btn {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--neutral-600);
    cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--neutral-900); }
.icon-btn svg { width: 14px; height: 14px; stroke-width: 2; }
.rail-brand-wrap { position: relative; min-width: 0; flex: 0 1 auto; }
.rail-brand-wrap.is-open .rail-brand-chevron { transform: rotate(180deg); }
.rail-brand-chevron {
    width: 12px; height: 12px;
    font-size: 12px;
    line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--rail-text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: auto;
}
html[data-rail="collapsed"] .app-v2 .rail-brand-chevron { display: none; }

.rail-brand-text { overflow: hidden; min-width: 0; }
.rail-brand-logo,
.rail-brand-icon {
    display: block;
    object-fit: contain;
    /* Invert dark logos on the dark rail so they render legibly. */
    filter: invert(1) brightness(1.1);
}
.rail-brand-logo {
    height: 32px;
    /* Negative margin lets the logo render visually larger without growing
       the rail header - the logo PNG has built-in whitespace around its
       artwork so a bigger render reads better. */
    margin-top: -5px;
    margin-bottom: -5px;
    width: auto;
    max-width: 100%;
    object-position: left center;
}
.rail-brand-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
html[data-rail="collapsed"] .app-v2 .rail-brand-logo { display: none; }
html[data-rail="collapsed"] .app-v2 .rail-brand { justify-content: center; }
html[data-rail="collapsed"] .app-v2 .rail-brand-wrap { flex: none; }
html[data-rail="expanded"] .app-v2 .rail-brand-icon { display: none; }
html[data-rail="expanded"] .app-v2 .rail-brand-mark-collapsed-only { display: none; }

button.rail-brand {
    border: none;
    background: transparent;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
    transition: background var(--transition-fast);
}
button.rail-brand:hover { background: var(--bg-rail-hover); }
.rail-brand-wrap.is-open button.rail-brand { background: var(--bg-rail-hover); }

/* Fixed-positioned so it escapes the rail's overflow clip and paints above
   the subnav's stacking context. Coords are computed in JS on open. */
.rail-brand-menu {
    position: fixed;
    min-width: 240px;
    padding: 6px;
    background: var(--bg-rail);
    border: 1px solid var(--rail-divider);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
}
.rail-brand-menu[hidden] { display: none; }
.rail-brand-menu-header {
    padding: 6px 10px;
    font-size: var(--fs-xs, 11px);
    font-weight: var(--fw-semibold, 600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rail-text-muted);
}
.rail-brand-option-form { margin: 0; }
.rail-brand-option {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none; background: transparent;
    border-radius: var(--radius-xs, 4px);
    color: var(--rail-text);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    text-align: left;
    cursor: pointer;
}
.rail-brand-option:hover { background: var(--bg-rail-hover); color: var(--rail-text-active); }
.rail-brand-option.is-current { color: var(--rail-text-active); }
.rail-brand-option-logo {
    height: 24px;
    width: 28px;
    flex: 0 0 28px;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: invert(1) brightness(1.1);
}
.rail-brand-option-logo-placeholder { background: transparent; filter: none; }
.rail-brand-option-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-brand-option-check { width: 14px; height: 14px; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; color: var(--rail-text-active); flex: 0 0 14px; }

/* ========== CONTENT ========== */
.content-v2 { padding: 4px 24px 40px; flex: 1; }
/* Higher specificity than Bootstrap's `.page-header { margin: 40px 0 20px }`
   which loads after admin-v2.css. Scoping under .content-v2 wins without
   resorting to !important. */
.content-v2 .page-header,
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin: 0 0 20px;
    padding-bottom: 0;
    border-bottom: 0;
}
/* Explicit h1 reset beats Bootstrap's `h1 { margin: .67em 0 }` which is
   loaded after admin-v2.css and reintroduces a top margin on page titles. */
h1.page-title,
.page-title {
    font-size: var(--fs-h1);
    line-height: 1.25;
    font-weight: var(--fw-semibold);
    margin: 10px 0 4px;
    color: var(--neutral-900);
    letter-spacing: -0.022em;
}
.page-subtitle {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--neutral-500);
}
/* Inline alert inside a page subtitle (e.g. "N needing replacement") -
   picks up the error palette but stays at subtitle size. */
.page-subtitle-alert {
    color: var(--color-error-text);
    font-weight: var(--fw-medium);
}
.page-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ========== BUTTONS ========== */
.btn-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    /* Lock height dimensionally so variants can't drift. */
    height: var(--button-height-md);
    min-height: var(--button-height-md);
    max-height: var(--button-height-md);
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    line-height: 1;
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: -0.005em;
    white-space: nowrap;
    vertical-align: middle;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
/* Icons scale with button font-size so sm / md buttons have proportional icons
   and inline SVGs match the chevron utility at the same size. */
.btn-v2 svg {
    width: 0.95em;
    height: 0.95em;
    stroke-width: 2;
    flex-shrink: 0;
}

/* Button-style summary for compact forms that are revealed on demand. */
.disclosure-button-v2 {
    cursor: pointer;
    list-style: none;
}
.disclosure-button-v2::-webkit-details-marker { display: none; }
.disclosure-button-v2::after {
    content: '';
    width: 0.9em;
    height: 0.9em;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    transition: transform var(--transition-fast);
}
details[open] > .disclosure-button-v2 { margin-bottom: var(--space-2); }
details[open] > .disclosure-button-v2::after { transform: rotate(90deg); }
.btn-primary-v2 {
    background: var(--color-primary);
    color: #fff;
    /* Border same colour as background - keeps the 1px border box-model
       consistent with secondary but contributes zero visual weight. */
    border-color: var(--color-primary);
    box-shadow: var(--shadow-xs);
}
.btn-primary-v2:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; text-decoration: none; }
.btn-primary-v2:active { background: var(--color-primary-active); border-color: var(--color-primary-active); }
.btn-secondary-v2 {
    background: var(--bg-surface);
    border-color: var(--border-default);
    color: var(--neutral-800);
    box-shadow: var(--shadow-xs);
}
.btn-secondary-v2:hover { background: var(--bg-hover); border-color: var(--neutral-300); color: var(--neutral-900); text-decoration: none; }
.btn-ghost-v2 { background: transparent; color: var(--neutral-700); }
.btn-ghost-v2:hover { background: var(--bg-hover); color: var(--neutral-900); text-decoration: none; }
.btn-danger-v2 {
    background: var(--color-error);
    border-color: var(--color-error);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn-danger-v2:hover { background: #A32925; border-color: #A32925; color: #fff; text-decoration: none; }
.btn-danger-v2:active { background: #8a2220; border-color: #8a2220; }
.btn-success-v2 {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn-success-v2:hover { background: #0E6B3A; border-color: #0E6B3A; color: #fff; text-decoration: none; }
.btn-success-v2:active { background: #0A5530; border-color: #0A5530; }
.btn-warning-v2 {
    background: var(--color-warning);
    border-color: var(--color-warning);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn-warning-v2:hover { background: #8C590A; border-color: #8C590A; color: #fff; text-decoration: none; }
.btn-warning-v2:active { background: #6F4708; border-color: #6F4708; }
/* Ghost-danger - transparent by default, error-tinted on hover. Used for
   destructive actions in toolbars where a filled red button would be too
   aggressive (e.g. the "Delete" secondary action inside a modal footer). */
.btn-ghost-danger-v2 {
    background: transparent;
    color: var(--color-error-text);
}
.btn-ghost-danger-v2:hover {
    background: var(--color-error-subtle);
    color: var(--color-error);
    text-decoration: none;
}
.btn-sm-v2 {
    height: var(--button-height-sm);
    min-height: var(--button-height-sm);
    max-height: var(--button-height-sm);
    padding: 0 10px;
    font-size: var(--fs-caption);
}
/* Square icon-only button. Pair with a ghost / secondary / primary variant
   and optionally btn-sm-v2. Width locks to the matching button height so
   the control is a perfect square regardless of icon glyph. */
.btn-icon-v2 {
    width: var(--button-height-md);
    padding: 0;
}
.btn-icon-v2.btn-sm-v2 {
    width: var(--button-height-sm);
}

/* ========== SWITCH (toggle) ==========
   Usage:
   <label class="switch-v2">
       <input type="checkbox">
       <span class="switch-v2-track"><span class="switch-v2-thumb"></span></span>
       <span class="switch-v2-label">Hide completed</span>
   </label>
*/
.switch-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: var(--fs-sm);
    color: var(--neutral-700);
    margin: 0;
    width: fit-content;
}
.switch-v2 input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.switch-v2-track {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    background: var(--neutral-300);
    border-radius: var(--radius-pill);
    transition: background var(--transition-fast);
    flex-shrink: 0;
}
.switch-v2-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}
.switch-v2 input:checked + .switch-v2-track { background: var(--color-primary); }
.switch-v2 input:checked + .switch-v2-track .switch-v2-thumb { transform: translateX(14px); }
.switch-v2 input:focus-visible + .switch-v2-track { box-shadow: var(--shadow-focus); }
.switch-v2 input:disabled + .switch-v2-track { opacity: 0.5; cursor: not-allowed; }
.switch-v2-label { line-height: 1; }

/* ========== PANELS ========== */
.panel-v2 {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.panel-header-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-default);
    gap: 10px;
}
.panel-title-v2 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    margin: 0;
    letter-spacing: -0.005em;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Inline icons inside a panel title pick up the muted icon color by default.
   Uses `:where()` so the specificity stays at 0,1,0 and the generic
   `.icon-*` utilities below can still override the color when the icon
   is communicating semantic meaning. */
.panel-title-v2 :where(i, svg) { color: var(--neutral-500); flex-shrink: 0; }

/* Semantic icon color utilities - use on <i>/<svg> where the icon itself
   is communicating meaning (section markers, inline alerts, etc.).
   Generic enough to drop into headings, badges, buttons, rows. */
.icon-primary { color: var(--color-primary); }
.icon-warning { color: var(--color-warning); }
.icon-success { color: var(--color-success); }
.icon-error   { color: var(--color-error); }
.icon-muted   { color: var(--neutral-500); }
.panel-body-v2 { padding: 16px; }
/* Flush body - strips padding, used when the body is a table or a list of
   rows that carry their own padding (and would otherwise double up). */
.panel-body-v2.flush { padding: 0; }
/* Inline form - zero-layout form used as a wrapper around a single button
   (e.g. CSRF-protected POST actions in row toolbars). Keeps sibling buttons
   visually adjacent without the default block-level gap. */
.inline-form-v2 { display: inline; }

/* Form actions row - sits below a .form-row-v2 and carries the submit
   button(s). Replaces ad-hoc `style="margin-top: 14px;"` wrappers. */
.form-actions-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
/* Bordered variant - used when the form is long enough that the actions
   row needs its own visual separator from the fields above. */
.form-actions-v2.bordered {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-default);
}
/* Right-aligned variant - pushes actions to the trailing edge. Useful for
   confirmation footers where the primary action sits on the right. */
.form-actions-v2.right { justify-content: flex-end; }

/* Inline toolbar row - horizontal group of buttons / controls with a
   compact gap. Replaces ad-hoc `style="display:flex; gap:8px;"`. */
.toolbar-row-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Horizontal-scroll wrapper - used to let wide tables/data scroll without
   forcing the whole page into overflow. */
.scroll-x-v2 { overflow-x: auto; }

/* Narrow panel body - caps the reading width for dense settings forms
   without restricting the outer panel. `--content-max-form: 960px` is the
   site-wide default; a single settings form wants roughly 640px. */
.panel-body-v2.narrow { max-width: 640px; }

/* Page grid - simple responsive multi-column layout for stacking panels
   side-by-side. Collapses to a single column below 900px. Replaces the
   Bootstrap `.row` / `.col-md-*` bridge used during v1→v2 migration. */
.page-grid-v2 {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .page-grid-v2.cols-2 { grid-template-columns: 1fr 1fr; }
    .page-grid-v2.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Member search - input + floating results list used in the attendance
   panels. The results panel is absolutely positioned below the input so
   it doesn't push content. */
.member-search-v2 { position: relative; margin-bottom: 12px; }
.member-search-v2-results {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
}
.member-search-v2-item {
    padding: 8px 12px;
    font-size: var(--fs-sm);
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 6px;
}
.member-search-v2-item:last-child { border-bottom: 0; }
.member-search-v2-item:hover { background: var(--bg-hover); }
.member-search-v2-item i { color: var(--neutral-500); }
.member-search-v2-empty {
    padding: 8px 12px;
    color: var(--neutral-500);
    font-size: var(--fs-sm);
}

/* Promotion "could be promoted to N stripes" hint shown under a member
   name in the promotions list. */
.promotion-skip-pill {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-subtle);
    color: var(--color-primary-active);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
}

/* Belt-promotion pair arrow - sits between the current belt row and the
   proposed next belt row. Negative vertical margins pull the icon in close
   so the pair feels like a single compound item. */
.promotion-belt-arrow {
    margin: -10px 0 -10px 69px;
    color: var(--neutral-500);
}

/* Error hint line inside a table row (e.g. "Missing birthdate" under a
   member name). Smaller than body, error-colored. */
.row-hint-error {
    color: var(--color-error-text);
    font-size: var(--fs-sm);
    margin-top: 2px;
}

/* Photo opt-out stacked icon - camera with a slash overlay. Uses the
   FontAwesome `.fa-stack` sizing but our own spacing so it doesn't rely
   on Bootstrap defaults. */
.photo-opt-out-v2 {
    font-size: 0.7em;
    vertical-align: middle;
    margin-left: 4px;
    display: inline-block;
    position: relative;
    width: 2em;
    height: 2em;
}
.photo-opt-out-v2 .fa-stack-1x,
.photo-opt-out-v2 .fa-stack-2x {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    text-align: center;
    line-height: 2em;
}
.photo-opt-out-v2 .fa-stack-1x { font-size: 1em; }
.photo-opt-out-v2 .fa-stack-2x { font-size: 2em; }

/* Small warning icon overlaid on the member card icon when auto-renew has
   failed - pulled a touch left so it "sticks" on top of the card icon. */
.auto-renew-warning {
    font-size: 10px;
    margin-left: -2px;
}

/* Required marker - small error-colored asterisk shown next to a label when
   a field becomes required conditionally (e.g. short-notice reason). Hidden
   by default; toggle via `hidden` attribute or the `.is-visible` class. */
.required-marker-v2 {
    color: var(--color-error-text);
    margin-left: 4px;
    font-weight: var(--fw-medium);
}

/* Section heading - `.section-title-v2` with the vertical rhythm used
   between stacked panels/lists. Keep the base class at `margin: 0` for the
   in-header uses (legacy pages rely on that); opt in to spacing here. */
.section-title-v2.spaced { margin: 20px 0 10px; }
/* General-sibling variant so a non-panel sibling (e.g. a fixed-position
   modal backdrop) between two panels doesn't break the stacking gap. */
.panel-v2 ~ .panel-v2 { margin-top: 16px; }
/* Form-action rows (e.g. a submit button) following a panel need the same
   gap as stacked panels so the save button doesn't hug the last panel. */
.panel-v2 ~ .form-row-v2 { margin-top: 16px; }

/* ========== RESPONSIVE ========== */
.hamburger { display: none; }
.scrim { display: none; }
@media (max-width: 1080px) {
    .app-v2, html[data-rail="expanded"] .app-v2 { grid-template-columns: var(--rail-width) 1fr; }
    .subnav {
        position: fixed;
        left: var(--rail-width); top: 0;
        transform: translateX(-120%);
        transition: transform var(--transition-base);
        z-index: 40;
        box-shadow: var(--shadow-lg);
        width: var(--subnav-width);
    }
    .app-v2[data-subnav="open"] .subnav { transform: translateX(0); }
    .hamburger {
        display: grid; place-items: center;
        width: 30px; height: 30px;
        border-radius: var(--radius-sm);
        background: transparent;
        border: 0;
        color: var(--neutral-700);
        cursor: pointer;
    }
    .hamburger:hover { background: var(--bg-hover); }
    .hamburger svg,
    .hamburger > i { width: 16px; height: 16px; font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
    .scrim {
        position: fixed;
        inset: 0;
        background: rgba(10, 10, 11, 0.3);
        z-index: 30;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-base);
    }
    .app-v2[data-subnav="open"] .scrim {
        display: block; opacity: 1; pointer-events: auto;
    }
}
/* ========== MOBILE PRIMITIVES (< 768px) ==========
   Touch-friendly, stack-first variants of every v2 primitive, so any
   migrated page built on page-header / panel / form-row / toolbar / modal
   works on a phone without per-page templates. Data-dense tables still
   need case-by-case card-stack treatment (see design-standards.md); this
   layer only fixes the shell + primitives. */
@media (max-width: 768px) {
    .environment-banner-v2 span { display: none; }
    .content-v2 { padding: 12px 12px 32px; }

    /* Page header stacks: title above actions, actions span full row. */
    .content-v2 .page-header,
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-actions { width: 100%; }
    .page-actions > .btn-v2,
    .page-actions > a.btn-v2 { flex: 1 1 auto; justify-content: center; }

    /* Form fields: one per row so labels/inputs aren't cramped. */
    .form-field-v2,
    .form-field-v2.narrow,
    .form-field-v2.wide { flex: 1 1 100%; }

    /* Panels lose the desktop border-radius and eat less horizontal
       padding so data reaches closer to the screen edge. */
    .panel-v2 { border-radius: var(--radius-sm); }
    .panel-header-v2 { padding: 10px 12px; }
    .panel-body-v2 { padding: 12px; }
    .panel-body-v2.narrow { max-width: none; }

    /* Filter chip / toolbar rows scroll horizontally instead of wrapping
       into multiple lines - keeps the page short on phones. */
    .toolbar-row-v2 {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
.toolbar-row-v2::-webkit-scrollbar { height: 4px; }
.toolbar-row-v2 > * { flex-shrink: 0; }

    /* Safety net: any flush panel body (usually a table) scrolls
       horizontally so a wide table can't force the whole page wider
       than the viewport. */
    .panel-body-v2.flush { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Topbar: trim padding so breadcrumbs don't push chips off-screen. */
    .topbar { padding: 0 10px; gap: 8px; }

    /* Rail stops being a persistent strip; the hamburger opens a single
       drawer that contains both the rail (with labels, wide logo) and
       the subnav (current module's sections). The scrim and the
       [data-subnav="open"] state from LayoutV2 drive both in tandem. */
    .app-v2,
    html[data-rail="collapsed"] .app-v2,
    html[data-rail="expanded"] .app-v2 { grid-template-columns: 1fr; }
    .rail {
        position: fixed;
        left: 0; top: 0;
        height: 100vh;
        width: 168px;
        padding: 10px 8px;
        z-index: 45;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }
    .app-v2[data-subnav="open"] .rail { transform: translateX(0); }
    .subnav {
        left: 168px;
        width: min(calc(94vw - 168px), 240px);
        /* Override the tablet's `translateX(-120%)` so the subnav hides
           fully off-screen regardless of its (now smaller) width. */
        transform: translateX(calc(-100% - 168px));
    }

    /* Force rail into its expanded layout inside the drawer (labels,
       wide academy logo) regardless of the persisted desktop preference.
       The selectors match the specificity of the collapsed-state rules
       they need to override. */
    html[data-rail="collapsed"] .app-v2 .rail-btn .rail-btn-label,
    html[data-rail="collapsed"] .app-v2 .rail-group-label,
    html[data-rail="collapsed"] .app-v2 .rail-brand-text,
    html[data-rail="collapsed"] .app-v2 .rail-user-info { display: block; }
    html[data-rail="collapsed"] .app-v2 .rail-btn {
        justify-content: flex-start;
        padding: 0 10px;
        width: 100%;
        margin: 0;
    }
    html[data-rail="collapsed"] .app-v2 .rail-brand-icon { display: none; }
    html[data-rail="collapsed"] .app-v2 .rail-brand-logo { display: block; }
    html[data-rail="collapsed"] .app-v2 .rail-brand-mark-collapsed-only { display: none; }
    html[data-rail="collapsed"] .app-v2 .rail-header {
        flex-direction: row;
        justify-content: flex-start;
        gap: 4px;
        padding: 4px 4px 10px;
    }
    html[data-rail="collapsed"] .app-v2 .rail-brand { justify-content: flex-start; }
    html[data-rail="collapsed"] .app-v2 .rail-brand-wrap { flex: 1; min-width: 0; }
    html[data-rail="collapsed"] .app-v2 .rail-user {
        padding: 10px 8px 6px;
        justify-content: flex-start;
    }
    /* Show the chevron so the academy switcher still indicates its
       dropdown affordance when the rail is in mobile-expanded mode. */
    html[data-rail="collapsed"] .app-v2 .rail-brand-chevron { display: inline-flex; }
    /* Expand/collapse toggle is meaningless inside a drawer. */
    .rail-toggle { display: none; }
}

/* ========== MOBILE COMPACT (< 640px) ==========
   Modals become bottom sheets and the breadcrumb trims further. */
@media (max-width: 640px) {
    /* Modals as bottom sheets: snap to bottom edge, full width,
       rounded top only. Safer thumb reach than a centered dialog. */
    .modal-v2-backdrop { padding: 0; align-items: flex-end; }
    .modal-v2 {
        max-width: 100%;
        max-height: 92vh;
        border-top-left-radius: var(--radius-lg);
        border-top-right-radius: var(--radius-lg);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    /* dl rows stack label above value; 90px label column is too tight
       on phones. */
    .modal-v2-body dl {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }
    .modal-v2-body dt { padding-top: 6px; }

    /* Breadcrumb: drop parent crumb, keep the leaf so the topbar stays
       usable next to impersonation / viewing-as chips. */
    .breadcrumb-v2 .crumb:not(.current),
    .breadcrumb-v2 .sep { display: none; }

    /* Topbar chips lose the emphasised label (already hidden at 720px,
       kept here for the tightened padding). */
    .topbar-chip { padding: 0 8px; }
}

/* ========== TOUCH TARGETS (< 480px) ==========
   Bump interactive heights to the 40px accessibility floor on the
   smallest screens by re-scoping the shared sizing tokens inside the
   content area. */
@media (max-width: 480px) {
    .content-v2 {
        --input-height: 40px;
        --button-height-md: 40px;
        --button-height-sm: 34px;
    }
    .btn-v2 { padding: 0 14px; }
}

/* =========================================================
   CALENDAR · Week view with mat lanes & absolute-positioned events
   Used by /planning, /absences/calendar, /content/calendar.
   Hour height is configurable via --cal-hour; defaults to 48px.
   ========================================================= */

.cal-v2 {
    --cal-hour: 48px;
    --cal-start-hour: 6;
    --cal-end-hour: 22;
    --cal-time-col: 64px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.cal-v2-header {
    display: grid;
    grid-template-columns: var(--cal-time-col) repeat(7, 1fr);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 5;
}
.cal-v2-header-time {
    padding: 8px;
    border-right: 1px solid var(--border-default);
}
.cal-v2-header-day {
    border-right: 1px solid var(--border-default);
    text-align: left;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--neutral-700);
    display: flex;
    flex-direction: column;
}
.cal-v2-header-day:last-child { border-right: 0; }
.cal-v2-header-day-main {
    padding: 8px 10px 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.cal-v2-header-day .dow {
    color: var(--neutral-900);
    font-weight: var(--fw-semibold);
}
.cal-v2-header-day .date {
    color: var(--neutral-500);
    font-weight: var(--fw-regular);
    margin-left: 4px;
}
.cal-v2-header-day.today {
    background: var(--color-primary-subtle);
}
.cal-v2-header-day.today .dow,
.cal-v2-header-day.today .date {
    color: var(--color-primary-active);
}
.cal-v2-header-day-mats {
    display: flex;
    border-top: 1px solid var(--border-subtle);
    font-size: 10px;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-surface);
}
.cal-v2-header-day-mats .mat-label {
    flex: 1;
    padding: 3px 8px;
    border-right: 1px dashed var(--border-subtle);
    text-align: left;
}
.cal-v2-header-day-mats .mat-label:last-child { border-right: 0; }
.cal-v2-header-day-mats:empty { display: none; }
.cal-v2-today-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: 1px;
}
.cal-v2-past-badge {
    display: inline-block;
    margin-left: 2px;
    padding: 1px 6px;
    background: var(--neutral-200);
    color: var(--neutral-600);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: 1px;
}

.cal-v2-body {
    display: grid;
    grid-template-columns: var(--cal-time-col) repeat(7, 1fr);
    position: relative;
}

.cal-v2-times {
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
}
.cal-v2-hour {
    height: var(--cal-hour);
    padding: 4px 8px 0 0;
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.cal-v2-day {
    position: relative;
    border-right: 1px solid var(--border-default);
    background-image: repeating-linear-gradient(
        to bottom,
        var(--border-subtle) 0,
        var(--border-subtle) 1px,
        transparent 1px,
        transparent var(--cal-hour)
    );
    display: flex;
}
.cal-v2-day:last-child { border-right: 0; }
.cal-v2-day.today { background-color: rgba(30, 111, 255, 0.02); }

.cal-v2-lane {
    flex: 1;
    min-width: 0;
    position: relative;
    border-right: 1px dashed var(--border-subtle);
}
.cal-v2-lane:last-child { border-right: 0; }

.cal-v2-event {
    --cal-event-bg: var(--neutral-500);
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 4px 3px 4px 6px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    cursor: pointer;
    overflow: hidden;
    border: 0;
    background: var(--cal-event-bg);
    color: #fff;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
    box-shadow: var(--shadow-xs);
    text-align: left;
    font-family: inherit;
    min-height: 22px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    box-sizing: border-box;
}
.cal-v2-event:hover {
    box-shadow: var(--shadow-md);
    z-index: 10;
    transform: translateY(-1px);
    filter: brightness(1.06);
    text-decoration: none;
}
.cal-v2-event .cal-event-title {
    font-size: 11px;
    font-weight: var(--fw-semibold);
    color: #fff;
    line-height: 1.2;
    letter-spacing: 0;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.cal-v2-event .cal-event-meta {
    color: rgba(255, 255, 255, 0.85);
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.cal-v2-event .cal-event-warn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-0);
    background: var(--color-error-text);
    border-radius: var(--radius-pill);
    width: 14px;
    height: 14px;
    padding: 1px;
    flex-shrink: 0;
    margin-left: 4px;
    vertical-align: middle;
}
.cal-v2-event .cal-event-warn svg { width: 9px; height: 9px; }

/* Short events (< 38px) only show title; < 26px trim aggressively */
.cal-v2-event.h-sm { padding: 3px 3px 3px 6px; }
.cal-v2-event.h-xs .cal-event-meta { display: none; }
.cal-v2-event.h-xs .cal-event-title { font-size: 10px; }

/* Spanning events render as direct children of .cal-v2-day, so they cover
   the entire day column (not just one mat lane). */
.cal-v2-event.span-all {
    left: 2px;
    right: 2px;
    z-index: 3;
    outline: 1px dashed rgba(255, 255, 255, 0.5);
    outline-offset: -3px;
}

/* Lesson-type palette, saturated like bjjlabzurich.ch schedule.
   Border-left is a slightly darker shade of the bg for depth. */
.cal-v2-event.type-fundamentals { --cal-event-bg: #1E6FFF; --cal-event-border: #134199; }
.cal-v2-event.type-advanced     { --cal-event-bg: #7C3AED; --cal-event-border: #5B21B6; }
.cal-v2-event.type-basics       { --cal-event-bg: #60A5FA; --cal-event-border: #1D4ED8; }
.cal-v2-event.type-kids-small   { --cal-event-bg: #FACC15; --cal-event-border: #A16207; color: #1C1E22; }
.cal-v2-event.type-kids-mid     { --cal-event-bg: #F97316; --cal-event-border: #9A3412; }
.cal-v2-event.type-kids-big     { --cal-event-bg: #22C55E; --cal-event-border: #15803D; }
.cal-v2-event.type-nogi         { --cal-event-bg: #14B8A6; --cal-event-border: #115E59; }
.cal-v2-event.type-competition  { --cal-event-bg: #DC2626; --cal-event-border: #7F1D1D; }
.cal-v2-event.type-women        { --cal-event-bg: #EC4899; --cal-event-border: #9D174D; }
.cal-v2-event.type-open         { --cal-event-bg: #525252; --cal-event-border: #262626; }
.cal-v2-event.type-wrestling    { --cal-event-bg: #1E3A8A; --cal-event-border: #172554; }
.cal-v2-event.type-judo         { --cal-event-bg: #8B5CF6; --cal-event-border: #5B21B6; }
.cal-v2-event.type-drilling     {
    --cal-event-bg: var(--neutral-100);
    --cal-event-border: var(--neutral-500);
    color: var(--neutral-900);
}
.cal-v2-event.type-drilling .cal-event-title { color: var(--neutral-900); }
.cal-v2-event.type-drilling .cal-event-meta  { color: var(--neutral-600); }
.cal-v2-event.type-drilling .cal-event-time  { color: var(--neutral-500); }
.cal-v2-event.type-drilling .cal-event-warn  { color: var(--color-error); background: transparent; }
.cal-v2-event.type-kids-small .cal-event-title { color: #1C1E22; }
.cal-v2-event.type-kids-small .cal-event-meta  { color: rgba(28, 30, 34, 0.75); }
.cal-v2-event.type-kids-small .cal-event-time  { color: rgba(28, 30, 34, 0.6); }

/* Mine: user is instructor or assistant on this class. */
.cal-v2-event.mine {
    box-shadow: var(--shadow-xs);
}

/* Absent coach warning: make coverage gaps read as critical at a glance. */
.cal-v2-event.absent {
    --cal-event-bg: var(--color-error-subtle);
    --cal-event-border: var(--color-error-text);
    background:
        repeating-linear-gradient(
            135deg,
            var(--color-error-subtle) 0,
            var(--color-error-subtle) var(--space-2),
            var(--neutral-0) var(--space-2),
            var(--neutral-0) var(--space-6)
        );
    border: 1px solid var(--color-error);
    border-left: var(--space-2) solid var(--color-error);
    color: var(--color-error-text);
    box-shadow: 0 0 0 var(--space-1) var(--color-error-subtle), var(--shadow-md);
    outline: 1px solid var(--color-error-text);
    outline-offset: 0;
}
.cal-v2-event.absent .cal-event-title,
.cal-v2-event.absent .cal-event-meta {
    color: var(--color-error-text);
}
.cal-v2-event.absent .cal-event-warn {
    color: var(--neutral-0);
    background: var(--color-error);
}
.cal-v2-event.absent-pending {
    background:
        repeating-linear-gradient(
            135deg,
            var(--color-warning-subtle) 0,
            var(--color-warning-subtle) var(--space-2),
            var(--neutral-0) var(--space-2),
            var(--neutral-0) var(--space-6)
        );
    border: 1px solid var(--color-warning);
    border-left: var(--space-2) solid var(--color-warning);
    color: var(--color-warning-text);
    box-shadow: 0 0 0 var(--space-1) var(--color-warning-subtle), var(--shadow-md);
    outline: 1px solid var(--color-warning-text);
    outline-offset: 0;
}
.cal-v2-event.absent-pending .cal-event-title,
.cal-v2-event.absent-pending .cal-event-meta {
    color: var(--color-warning-text);
}
.cal-v2-event.absent-pending .cal-event-warn {
    color: var(--neutral-0);
    background: var(--color-warning);
}

/* Highlight / dim: JS adds .dimmed to events that don't match the
   current filter (my classes / a specific coach). Pointer events stay
   enabled so dimmed classes are still clickable. */
.cal-v2-event.dimmed {
    background: var(--bg-surface);
    box-shadow: none;
    filter: none;
}
.cal-v2-event.dimmed:hover {
    box-shadow: var(--shadow-xs);
    filter: none;
}
.cal-v2-event.dimmed::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--cal-event-bg);
    border-radius: inherit;
    opacity: 0.3;
    z-index: 0;
}
.cal-v2-event.dimmed:hover::before {
    opacity: 0.6;
}
.cal-v2-event.dimmed .cal-event-title,
.cal-v2-event.dimmed .cal-event-meta {
    opacity: 0.6;
}

/* Past days / past events. Greyed so the eye lands on today + upcoming,
   but still fully legible and clickable (attendance, lesson plans). */
.cal-v2-header-day.past {
    background: var(--neutral-100);
}
.cal-v2-header-day.past .dow,
.cal-v2-header-day.past .date {
    color: var(--neutral-500);
}
.cal-v2-day.past {
    background-color: var(--neutral-50);
    background-image:
        repeating-linear-gradient(
            to bottom,
            var(--border-default) 0,
            var(--border-default) 1px,
            transparent 1px,
            transparent var(--cal-hour)
        ),
        repeating-linear-gradient(
            -45deg,
            transparent 0,
            transparent 10px,
            var(--border-subtle) 10px,
            var(--border-subtle) 11px
        );
}
.cal-v2-event.past {
    filter: grayscale(0.75);
    box-shadow: none;
}
.cal-v2-event.past:hover {
    filter: grayscale(0.2);
}

/* Current-time indicator: rendered only inside today's column. */
.cal-v2-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 2px solid var(--color-error);
    z-index: 4;
    pointer-events: none;
}
.cal-v2-now-line::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -5px;
    width: 8px;
    height: 8px;
    background: var(--color-error);
    border-radius: 50%;
}

/* Compact filter row that sits above the calendar. */
.cal-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
}
.cal-filter-label {
    color: var(--neutral-600);
    font-weight: var(--fw-medium);
}
.cal-filter-select {
    height: 28px;
    padding: 0 26px 0 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font: inherit;
    font-size: var(--fs-sm);
    color: var(--neutral-800);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}
.cal-filter-select:hover { border-color: var(--neutral-300); }
.cal-filter-select:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--shadow-focus); }
.cal-filter-select.active {
    border-color: var(--color-primary-border);
    background-color: var(--color-primary-subtle);
    color: var(--color-primary-active);
}

/* =========================================================
   CHEVRON UTILITIES
   Use .chev-right / .chev-left on text links/buttons to append/prepend
   a chevron. Never use unicode arrows (→ ←) in UI chrome - the glyph
   renders inconsistently across fonts/weights. The SVG is applied as
   a CSS mask so it inherits currentColor automatically.
   ========================================================= */

.chev-right::after,
.chev-left::before {
    content: '';
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    background-color: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    vertical-align: -0.1em;
    flex-shrink: 0;
}
.chev-right::after {
    margin-left: 4px;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
}
.chev-left::before {
    margin-right: 4px;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>");
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>");
}

/* =========================================================
   MODAL · generic centered dialog for the calendar and other v2 pages
   ========================================================= */

.modal-v2-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 11, 0.5);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.modal-v2-backdrop.open { display: flex; }

.modal-v2 {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border-top: 4px solid var(--neutral-500);
    transition: border-top-color var(--transition-fast);
}
.modal-v2-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.modal-v2-header-main { flex: 1; min-width: 0; }
.modal-v2-title {
    font-size: var(--fs-h2);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.modal-v2-subtitle {
    margin: 4px 0 0;
    font-size: var(--fs-sm);
    color: var(--neutral-500);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.modal-v2-subtitle .sep { color: var(--neutral-300); }
.modal-v2-close {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--neutral-500);
    cursor: pointer;
    flex-shrink: 0;
}
.modal-v2-close:hover { background: var(--bg-hover); color: var(--neutral-900); }
.modal-v2-close svg { width: 16px; height: 16px; stroke-width: 2; }
.image-lightbox-v2 {
    width: fit-content;
    max-width: min(100%, var(--image-lightbox-max-width));
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.image-lightbox-v2 > img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: var(--image-lightbox-max-height);
    flex-shrink: 0;
    object-fit: contain;
    border-radius: var(--radius-md);
}
.image-lightbox-v2 > .modal-v2-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--bg-surface);
}
.modal-v2-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.modal-v2-body dl {
    display: grid;
    grid-template-columns: 90px 1fr;
    row-gap: 10px;
    column-gap: 14px;
    margin: 0;
    font-size: var(--fs-sm);
}
.modal-v2-body dt {
    color: var(--neutral-500);
    font-weight: var(--fw-medium);
    padding-top: 1px;
}
.modal-v2-body dd {
    margin: 0;
    color: var(--neutral-800);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.modal-v2-body dd.empty { color: var(--neutral-400); font-style: italic; }
.modal-v2-body .coach-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px 2px 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-pill);
    font-size: var(--fs-caption);
    color: var(--neutral-800);
    font-weight: var(--fw-medium);
}
.modal-v2-body a.coach-chip {
    cursor: pointer;
    border-color: var(--color-primary-border);
    background: var(--color-primary-subtle);
    color: var(--color-primary-active);
    text-decoration: none;
}
.modal-v2-body a.coach-chip:hover,
.modal-v2-body a.coach-chip:focus {
    border-color: var(--color-primary);
    color: var(--color-primary-active);
    background: var(--neutral-0);
    text-decoration: none;
}
.modal-v2-body a.coach-chip:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
}
.modal-v2-body .coach-chip .coach-avatar {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b7280, #4a5059);
    color: #fff;
    display: grid; place-items: center;
    font-size: 10px;
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
}
.modal-v2-body a.coach-chip .coach-avatar {
    background: var(--color-primary);
    color: var(--neutral-0);
}
.modal-v2-body .pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: var(--fs-caption);
    color: var(--neutral-700);
}
.modal-v2-body .pill.pill-level { background: var(--color-primary-subtle); color: var(--color-primary-active); }
.modal-v2-body .pill.pill-sport { background: var(--neutral-100); color: var(--neutral-700); }
.modal-v2-alert {
    margin-top: 14px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--color-error-subtle);
    border-left: 3px solid var(--color-error);
    color: var(--color-error-text);
    font-size: var(--fs-sm);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.modal-v2-alert svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
.modal-v2-alert-warning {
    background: var(--color-warning-subtle);
    border-left-color: var(--color-warning);
    color: var(--color-warning-text);
}
.modal-v2-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-default);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
/* Left-aligned footer action - pushes to the leading edge, leaving primary
   actions on the right. Use for secondary "open in..." style links. */
.modal-v2-footer .align-left { margin-right: auto; }

/* Narrow confirm modal - 460px cap for simple yes/no dialogs where the
   default 640px would look oversized. */
.modal-v2.narrow { max-width: 460px; }

/* Plain message inside a modal body - resets margin and applies the
   default body color without creating typography drift. */
.modal-v2-body .message {
    margin: 0;
    color: var(--neutral-700);
    font-size: var(--fs-body);
}

.topic-history-button {
    width: fit-content;
}

.topic-history-modal {
    max-width: 640px;
}

.topic-history-table td:last-child,
.topic-history-table th:last-child {
    width: 100%;
}

.topic-history-table td:last-child {
    color: var(--neutral-800);
    font-weight: var(--fw-medium);
}

/* Legend strip below the calendar */
.cal-v2-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 16px;
    font-size: var(--fs-caption);
    color: var(--neutral-600);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    margin-top: 14px;
}
.cal-v2-legend .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cal-v2-legend .swatch {
    width: 10px; height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* =========================================================
   MY-CLASSES · list view grouped by day
   Uses the same type- palette as the calendar events for the
   left accent bar, so both views feel like the same app.
   ========================================================= */

.myc-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-default);
}
.myc-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: -1px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--neutral-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.myc-tab:hover { color: var(--neutral-900); text-decoration: none; }
.myc-tab.active {
    color: var(--color-primary-active);
    border-bottom-color: var(--color-primary);
}
.myc-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    color: var(--neutral-600);
    background: var(--bg-secondary);
    border-radius: 9px;
    font-variant-numeric: tabular-nums;
}
.myc-tab.active .myc-tab-count {
    color: var(--color-primary-active);
    background: var(--color-primary-subtle);
}

.myc-list { display: flex; flex-direction: column; gap: 18px; }

.myc-day {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.myc-day-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-secondary);
}
.myc-day-header .dow {
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    letter-spacing: -0.005em;
}
.myc-day-header.today .dow { color: var(--color-primary-active); }
.myc-day-header .date {
    font-size: var(--fs-sm);
    color: var(--neutral-500);
    font-variant-numeric: tabular-nums;
}
.myc-day-header .count {
    margin-left: auto;
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    font-variant-numeric: tabular-nums;
}

.myc-items { display: flex; flex-direction: column; }

.myc-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    border-left: 3px solid var(--neutral-400);
    transition: background var(--transition-fast);
    text-decoration: none;
    color: inherit;
}
.myc-item:last-child { border-bottom: 0; }
.myc-item:hover { background: var(--bg-secondary); text-decoration: none; color: inherit; }

.myc-item-time {
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--neutral-800);
    letter-spacing: -0.005em;
}
.myc-item-time .ago {
    display: block;
    font-size: var(--fs-caption);
    font-weight: var(--fw-regular);
    color: var(--neutral-500);
    margin-top: 2px;
}

.myc-item-main { min-width: 0; }
.myc-item-title {
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    letter-spacing: -0.005em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.myc-item-title .myc-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    background: var(--neutral-100);
    color: var(--neutral-700);
    border-radius: var(--radius-sm);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    letter-spacing: normal;
}
.myc-item-title .myc-badge.mine { background: var(--color-primary-subtle); color: var(--color-primary-active); }
.myc-item-title .myc-badge.absent { background: var(--color-error-subtle); color: var(--color-error-text); }
.myc-item-title .myc-badge.cross-academy { background: var(--color-warning-subtle); color: var(--color-warning-text); }
.myc-badge.cross-academy { background: var(--color-warning-subtle); color: var(--color-warning-text); }
.myc-item-meta {
    font-size: var(--fs-sm);
    color: var(--neutral-500);
    margin-top: 2px;
}

.myc-item-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}
.myc-item-actions a { font-size: var(--fs-caption); }

/* Colored left bar mirrors the calendar-event palette. The type- class
   sets the border-left-color; the block stays on the neutral bg for
   readability. */
.myc-item.type-fundamentals { border-left-color: #1E6FFF; }
.myc-item.type-advanced     { border-left-color: #7C3AED; }
.myc-item.type-basics       { border-left-color: #60A5FA; }
.myc-item.type-kids-small   { border-left-color: #FACC15; }
.myc-item.type-kids-mid     { border-left-color: #F97316; }
.myc-item.type-kids-big     { border-left-color: #22C55E; }
.myc-item.type-nogi         { border-left-color: #14B8A6; }
.myc-item.type-competition  { border-left-color: #DC2626; }
.myc-item.type-women        { border-left-color: #EC4899; }
.myc-item.type-open         { border-left-color: #525252; }
.myc-item.type-wrestling    { border-left-color: #1E3A8A; }
.myc-item.type-judo         { border-left-color: #8B5CF6; }
.myc-item.type-drilling     { border-left-color: var(--neutral-400); }

.myc-item.absent { border-left-color: var(--color-error) !important; border-left-width: 4px; }

.planning-view-tabs {
    margin-bottom: var(--cell-padding-y);
}
.planning-list-main {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    font: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.planning-list-main:hover .myc-item-title {
    color: var(--color-primary-active);
}
.planning-list-item.past {
    background: var(--neutral-50);
}
.planning-list-item {
    border-left-color: transparent;
}
.planning-list-item .myc-badge.mine {
    background: var(--color-primary-subtle);
    color: var(--color-primary-active);
}
.planning-list-item.mine {
    box-shadow: none;
}
.planning-list-item.absent {
    background: var(--color-error-subtle);
    border-left-color: var(--color-error) !important;
    border-left-width: var(--space-2);
    box-shadow: inset 0 0 0 1px var(--color-error);
}
.planning-list-item.absent:hover {
    background: var(--color-error-subtle);
}
.planning-list-item.absent .myc-item-time,
.planning-list-item.absent .myc-item-title {
    color: var(--color-error-text);
}
.planning-list-item.absent .myc-item-time .ago,
.planning-list-item.absent .myc-item-meta {
    color: var(--color-error-text);
}
.planning-list-item.absent .myc-badge.absent {
    background: var(--color-error);
    color: var(--neutral-0);
}

.myc-empty {
    background: var(--bg-surface);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    color: var(--neutral-500);
    font-size: var(--fs-sm);
}

/* Next-class hero card - shown at top of /my-classes when there's a class
   coming up today or tomorrow */
.myc-hero {
    background: linear-gradient(135deg, #1E6FFF 0%, #1857CC 100%);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    box-shadow: 0 4px 10px rgba(30, 111, 255, 0.25);
}
.myc-hero-label { font-size: var(--fs-caption); opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--fw-semibold); }
.myc-hero-title { font-size: var(--fs-h2); font-weight: var(--fw-semibold); margin-top: 4px; letter-spacing: -0.01em; }
.myc-hero-meta { font-size: var(--fs-sm); opacity: 0.9; margin-top: 2px; }
/* Higher specificity so these beat .content-v2 a.btn-v2 (0,2,1) - otherwise
   anchor buttons on the hero card inherit the content-area dark text colour. */
.content-v2 .myc-hero a.btn-v2,
.content-v2 .myc-hero a.btn-v2:visited {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
}
.content-v2 .myc-hero a.btn-v2:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 720px) {
    .myc-item { grid-template-columns: 80px 1fr; }
    .myc-item-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; }
    .myc-hero { grid-template-columns: 1fr; }
}

/* Responsive: stack mat lanes vertically on narrow screens */
@media (max-width: 1280px) {
    .cal-v2 { --cal-time-col: 52px; --cal-hour: 44px; }
    .cal-v2-event .cal-event-meta { display: none; }
}
@media (max-width: 900px) {
    /* On small screens, the calendar becomes horizontally scrollable */
    .cal-v2 { overflow-x: auto; }
    .cal-v2-header, .cal-v2-body {
        grid-template-columns: var(--cal-time-col) repeat(7, 140px);
        min-width: calc(var(--cal-time-col) + 7 * 140px);
    }
}

/* =========================================================
   REPORTS · KPI cards, data tables, toolbars, badges
   Scoped under .content-v2 so they never collide with legacy
   Bootstrap `.panel`, `.btn`, `.badge`, `.table` styles that
   the v2 shell still loads for unmigrated pages.
   ========================================================= */

/* ---------- KPI grid ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.kpi-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1280px) {
    .kpi-grid,
    .kpi-grid.cols-3,
    .kpi-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .kpi-grid,
    .kpi-grid.cols-2,
    .kpi-grid.cols-3,
    .kpi-grid.cols-5 { grid-template-columns: 1fr; }
}

.kpi-card-v2 {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 80px;
}
.kpi-card-v2 .kpi-label {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    font-weight: var(--fw-medium);
    letter-spacing: 0;
    text-transform: none;
    margin: 0;
}
.kpi-card-v2 .kpi-value {
    font-size: 26px;
    line-height: 1.15;
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    margin: 2px 0 0;
}
.kpi-card-v2 .kpi-delta {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.kpi-card-v2 .kpi-delta.up { color: var(--color-success); }
.kpi-card-v2 .kpi-delta.down { color: var(--color-error); }
.kpi-card-v2 .kpi-delta.warn { color: var(--color-warning-text); }

/* Invoiced memberships report */
.memberships-summary-grid {
    margin-bottom: var(--cell-padding-x);
}
.memberships-summary-grid .kpi-card-v2 {
    padding: var(--cell-padding-x);
}
.memberships-detail-grid {
    align-items: start;
}
.memberships-detail-grid > .panel-v2 {
    margin-top: 0;
}
.memberships-filter-panel {
    margin-bottom: var(--cell-padding-x);
}
.memberships-filter-panel .toolbar-v2 {
    border-bottom: 0;
}
.memberships-monthly-chart {
    padding-top: 20px;
}
.memberships-monthly-chart .bar-value {
    white-space: nowrap;
}
.memberships-report-panel .panel-header-v2 {
    padding: 12px 16px;
}
.memberships-report-panel .panel-title-v2 {
    line-height: 20px;
}
.memberships-report-panel .panel-body-v2 {
    padding-top: 16px;
}
.memberships-comparison-grid .section-title-v2 {
    margin-bottom: 14px;
}
@media (max-width: 767px) {
    .memberships-monthly-chart {
        gap: 4px;
    }
    .memberships-monthly-chart .bar-value {
        display: none;
    }
    .memberships-monthly-chart-labels {
        gap: 4px;
    }
}

/* ---------- Data tables ---------- */
.table-wrap-v2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table-v2 {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums;
}
.data-table-v2 thead th {
    background: var(--neutral-50);
    border-bottom: 1px solid var(--border-default);
    padding: 10px 14px;
    font-size: var(--fs-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-600);
    font-weight: var(--fw-semibold);
    text-align: left;
    white-space: nowrap;
}
.data-table-v2 tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--neutral-700);
    vertical-align: middle;
}
.data-table-v2 tbody tr:hover td { background: var(--neutral-25); }
.data-table-v2 tbody tr:last-child td { border-bottom: 0; }
.data-table-v2 th.num,
.data-table-v2 td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table-v2 th.nowrap,
.data-table-v2 td.nowrap { white-space: nowrap; }
.data-table-v2 th.col-belt,
.data-table-v2 td.col-belt { width: 200px; }
.data-table-v2 th.center,
.data-table-v2 td.center { text-align: center; }
.data-table-v2 th.cell-right,
.data-table-v2 td.cell-right { text-align: right; }
.data-table-v2 td.strong { color: var(--neutral-900); font-weight: var(--fw-medium); }
.data-table-v2 td.muted { color: var(--neutral-500); }
.data-table-v2 tfoot td {
    padding: 10px 14px;
    background: var(--neutral-25);
    border-top: 1px solid var(--border-default);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
}
.data-table-v2 tr.total td {
    background: var(--color-primary-subtle);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
}
.data-table-v2 tr.subtotal td {
    background: var(--neutral-25);
    font-weight: var(--fw-medium);
    color: var(--neutral-900);
}

/* ---------- Badges / pills ---------- */
.badge-v2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    background: var(--neutral-100);
    color: var(--neutral-700);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1.5;
}
.badge-success-v2 { background: var(--color-success-subtle); color: var(--color-success-text); }
.badge-warning-v2 { background: var(--color-warning-subtle); color: var(--color-warning-text); }
.badge-error-v2   { background: var(--color-error-subtle);   color: var(--color-error-text); }
.badge-info-v2    { background: var(--color-primary-subtle); color: var(--color-primary-active); }
.badge-neutral-v2 { background: var(--neutral-100); color: var(--neutral-700); }
.badge-accent-v2  { background: #F3E8FF; color: #6D28D9; }
/* Stacked variant - forces block layout and adds a small top gap so a
   badge can sit below content like a card title or belt row without an
   inline `style="margin-top: 6px"`. */
.badge-v2.stacked {
    display: inline-flex;
    margin-top: 6px;
}

/* Status dot inside a badge - used for row status columns */
.badge-v2 .badge-dot-v2 {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* ---------- Belt pill (color swatch + label) ---------- */
.belt-pill-v2 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--neutral-800);
    white-space: nowrap;
}
.belt-swatch-v2 {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.belt-swatch-v2.c-white  { background: #F6F7F8; border-color: #C8CCD2; }
.belt-swatch-v2.c-grey   { background: #919495; }
.belt-swatch-v2.c-yellow { background: #FFC740; }
.belt-swatch-v2.c-orange { background: #ED7C39; }
.belt-swatch-v2.c-green  { background: #007D45; }
.belt-swatch-v2.c-blue   { background: #1E6FFF; }
.belt-swatch-v2.c-purple { background: #7C3AED; }
.belt-swatch-v2.c-brown  { background: #78350F; }
.belt-swatch-v2.c-black  { background: #0A0A0B; }
.belt-swatch-v2.c-red    { background: #C8342F; }

/* ---------- Avatar (initials) ---------- */
.avatar-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: var(--fw-semibold);
    letter-spacing: 0;
    flex-shrink: 0;
    user-select: none;
}
.avatar-sm-v2   { width: 28px; height: 28px; font-size: 11px; }
.avatar-md-v2   { width: 36px; height: 36px; font-size: 13px; }
.avatar-list-v2 { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg-v2   { width: 48px; height: 48px; font-size: 16px; }
.avatar-img-v2 { object-fit: cover; background: var(--neutral-100); }

/* Legacy belt renderer, scaled-down variant for v2 member cells. Horizontal
   layout is compressed (90px bar → 60px, 8px stripes → 6px) so the belt
   reads comfortably as a secondary line under a member name. Heights stay
   at the belts.css default. Scoped to .belt-cell-v2 so the belt graphic
   on profile / promotion / kanban pages renders at its normal size. */
.belt-cell-v2 { width: 200px; max-width: 200px; }
.belt-cell-v2 .belt,
.pipeline-belt .belt,
.req-belt-swatch .belt { margin: 0; width: 100%; height: 18px; }
.belt-cell-v2 .belt::before,
.pipeline-belt .belt::before,
.req-belt-swatch .belt::before {
    width: 60px;
    height: 16px;
    margin-left: 15px;
}
.belt-cell-v2 .belt .belt-stripes,
.pipeline-belt .belt .belt-stripes,
.req-belt-swatch .belt .belt-stripes { margin-left: -60px; }
.belt-cell-v2 .belt .belt-stripes .stripe,
.pipeline-belt .belt .belt-stripes .stripe,
.req-belt-swatch .belt .belt-stripes .stripe {
    width: 6px;
    height: 16px;
    margin-left: 7px;
}

/* Black-belt variants have their own :before selector (red/white/black bar
   styles) which beat the default .belt::before, so each variant needs its
   own scaled override here - otherwise the bar falls back to the 90px size
   on top of an 18px tall belt and overflows. */
.belt-cell-v2 .belt.black-belt::before,
.belt-cell-v2 .belt.black-belt-red-bar::before,
.belt-cell-v2 .belt.black-belt-white-bar::before,
.pipeline-belt .belt.black-belt::before,
.pipeline-belt .belt.black-belt-red-bar::before,
.pipeline-belt .belt.black-belt-white-bar::before,
.req-belt-swatch .belt.black-belt::before,
.req-belt-swatch .belt.black-belt-red-bar::before,
.req-belt-swatch .belt.black-belt-white-bar::before {
    width: 60px;
    height: 16px;
    margin-left: 15px;
}
/* Red bar on black-belt has white side-borders; scale those with the rest. */
.belt-cell-v2 .belt.black-belt::before,
.pipeline-belt .belt.black-belt::before,
.req-belt-swatch .belt.black-belt::before {
    border-left-width: 5px;
    border-right-width: 5px;
}
/* Black belts use narrower stripes + a tighter stripe margin to sit inside
   the 8px white side-borders - scale both to match the 60px bar. */
.belt-cell-v2 .belt.black-belt .belt-stripes,
.pipeline-belt .belt.black-belt .belt-stripes,
.req-belt-swatch .belt.black-belt .belt-stripes { margin-left: -53px; }
.belt-cell-v2 .belt.black-belt .belt-stripes .stripe,
.pipeline-belt .belt.black-belt .belt-stripes .stripe,
.req-belt-swatch .belt.black-belt .belt-stripes .stripe {
    width: 4px;
    margin-left: 4px;
}

/* Academy flask on the left colored portion - scale to fit the 15px left
   band before the bar. Slightly chunkier than a strict proportional scale
   so the flask reads clearly at this size. */
.belt-cell-v2 .belt .belt-logo,
.pipeline-belt .belt .belt-logo,
.req-belt-swatch .belt .belt-logo {
    width: 8px;
    left: 3px;
}

/* Inline belt pill shown as secondary text under a member name - smaller
   type + muted tone so it reads as metadata, not primary content. */
.belt-pill-inline-v2 {
    font-size: var(--fs-caption);
    color: var(--neutral-600);
    margin-top: 2px;
}

/* Member cell: avatar + name/meta stack */
.member-cell-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
}
.member-cell-v2 .member-name-v2 {
    color: var(--neutral-900);
    font-weight: var(--fw-medium);
    line-height: 1.25;
}
.member-cell-v2 .member-email-v2 {
    color: var(--neutral-500);
    font-size: var(--fs-caption);
    line-height: 1.25;
    margin-top: 1px;
}
/* Belt visual when shown as the secondary line under the name - space it
   from the name so the two read as a stack. */
.member-cell-v2 .belt-cell-v2 { margin-top: 4px; }

/* Clickable table rows (row-as-link pattern) */
.data-table-v2 tbody tr.row-link-v2 { cursor: pointer; }
.data-table-v2 tbody tr.row-link-v2:hover td { background: var(--bg-hover); }

/* ---------- Two-column layout ---------- */
.two-col-v2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 960px) {
    .two-col-v2 { grid-template-columns: 1fr; }
}

/* ---------- Info card ---------- */
.info-card-v2 {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-xs);
    margin-bottom: 16px;
}
.info-card-v2:last-child { margin-bottom: 0; }
.info-card-v2 + .info-card-v2 { margin-top: 12px; }
.info-card-v2 h3 {
    margin: 0 0 10px;
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
}
/* Inline title - like the h3 but lightweight, no margin-bottom blowout. */
.info-card-v2-title {
    font-weight: var(--fw-semibold);
    margin-bottom: 6px;
    color: var(--neutral-900);
}
/* Inline row of badges used to summarise config inside an info-card. */
.badge-row-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.info-list-v2 {
    list-style: none;
    padding: 0;
    margin: 0;
}
.info-list-v2 li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--fs-sm);
}
.info-list-v2 li:last-child { border-bottom: 0; }
.info-list-v2 .label { color: var(--neutral-600); }
.info-list-v2 .value { color: var(--neutral-900); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }

/* ---------- Toolbar + filter chips ---------- */
.toolbar-v2 {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-default);
    align-items: center;
    flex-wrap: wrap;
    background: var(--bg-secondary);
}
.toolbar-v2-spacer { flex: 1; }
.toolbar-panel-v2 { margin-bottom: var(--space-4); }
.toolbar-panel-v2 > .toolbar-v2 { border-bottom: 0; }
.toolbar-v2-count {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
}
.table-actions-v2 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-2);
}
@media (max-width: 767px) {
    .table-actions-v2 { justify-content: flex-start; }
}
.filter-chip-v2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--neutral-700);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.filter-chip-v2:hover { border-color: var(--neutral-300); color: var(--neutral-900); text-decoration: none; }
.filter-chip-v2.active {
    background: var(--color-primary-subtle);
    border-color: var(--color-primary-border);
    color: var(--color-primary-active);
}

/* ---------- Franchise academy comparison ---------- */
.fr-legend .fr-health-dot {
    margin-top: 0;
}

.fr-health-period-v2 {
    padding: var(--space-2) var(--space-4);
    border-bottom: var(--border-width) solid var(--border-default);
    color: var(--text-secondary);
    background: var(--bg-surface);
    font-size: var(--fs-caption);
}

.fr-status-guide-v2 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-bottom: var(--border-width) solid var(--border-default);
    background: var(--bg-secondary);
}

.fr-status-guide-item-v2 {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: var(--space-2);
}

.fr-status-guide-item-v2 .fr-health-dot {
    margin-top: var(--space-1);
}

.fr-status-guide-copy-v2 strong {
    display: block;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
}

.fr-status-guide-copy-v2 span {
    display: block;
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
    line-height: 1.4;
}

@media (max-width: 767px) {
    .fr-status-guide-v2 {
        grid-template-columns: 1fr;
    }
}

/* Auto-renew failed: fixed-term overrun review */
.auto-renew-filter-panel-v2 { margin-bottom: var(--space-2); }
.auto-renew-overrun-payments-v2 {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-default);
}
.auto-renew-overrun-payments-header-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    color: var(--text-primary);
    font-size: var(--fs-sm);
}
.auto-renew-overrun-payments-heading-v2 {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}
.auto-renew-overrun-payment-list-v2 {
    display: grid;
    gap: var(--space-1);
    margin-top: var(--space-2);
}
.auto-renew-overrun-payment-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--neutral-25);
}
.auto-renew-overrun-payment-main-v2,
.auto-renew-overrun-payment-status-v2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.auto-renew-overrun-payment-main-v2 {
    color: var(--text-secondary);
    font-size: var(--fs-caption);
}
.auto-renew-overrun-payment-main-v2 strong { color: var(--text-primary); }
.auto-renew-overrun-payment-status-v2 { justify-content: flex-end; }
.auto-renew-overrun-membership-action-v2 { display: inline-flex; }
.auto-renew-overrun-confirmation-note-v2 {
    margin: var(--space-3) 0 0;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}
.auto-renew-overrun-message-v2 {
    margin-top: var(--space-2);
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}
.auto-renew-overrun-message-v2.is-warning { color: var(--color-warning-text); }

.inactive-subscription-summary-v2 { margin-bottom: var(--space-4); }
.inactive-subscription-summary-row-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}
.inactive-subscription-summary-row-v2 > div {
    display: grid;
    gap: var(--space-1);
}
.inactive-subscription-summary-row-v2 span:not(.badge-v2) {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}
.inactive-subscription-list-v2 {
    display: grid;
    gap: var(--space-3);
}
.inactive-subscription-card-grid-v2 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--space-4);
}
.inactive-subscription-photo-v2 {
    width: calc(var(--space-10) + var(--space-2));
    height: calc(var(--space-10) + var(--space-2));
    border-radius: var(--radius-pill);
    object-fit: cover;
    background: var(--neutral-100);
}
.inactive-subscription-card-main-v2 {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}
.inactive-subscription-card-title-v2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.inactive-subscription-card-title-v2 > a {
    color: var(--text-primary);
    font-weight: var(--fw-semibold);
}
.inactive-subscription-facts-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    margin: 0;
}
.inactive-subscription-facts-v2 div { display: grid; gap: var(--space-1); }
.inactive-subscription-facts-v2 dt {
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
    font-weight: var(--font-medium);
}
.inactive-subscription-facts-v2 dd {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--fs-sm);
}
.inactive-subscription-identifier-v2 {
    overflow: hidden;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: var(--fs-caption);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inactive-subscription-actions-v2 {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-2);
}

@media (max-width: 767px) {
    .inactive-subscription-summary-row-v2 { align-items: flex-start; flex-direction: column; }
    .inactive-subscription-card-grid-v2 { grid-template-columns: auto minmax(0, 1fr); }
    .inactive-subscription-actions-v2 {
        grid-column: 1 / -1;
        justify-content: flex-start;
        max-width: none;
    }
    .inactive-subscription-actions-v2 .btn-v2 { min-height: var(--button-height-touch); }
}

@media (max-width: 767px) {
    .auto-renew-overrun-payments-header-v2 { align-items: flex-start; flex-direction: column; }
    .auto-renew-overrun-payment-v2 { align-items: flex-start; flex-direction: column; }
    .auto-renew-overrun-payment-status-v2 { justify-content: flex-start; }
}
.filter-stack-v2 {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space-6) / 2);
}
.filter-group-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.filter-group-label-v2 {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
}
.filter-group-label-v2 small {
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
    font-weight: var(--fw-regular);
}
.filter-options-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.filter-month-grid-v2 {
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
}
.filter-month-grid-v2 .filter-chip-v2 {
    justify-content: center;
    padding-inline: var(--space-1);
}
.filter-status-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(var(--space-6) / 2);
}
.active-filter-summary-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: calc(var(--space-6) / 2) 0;
    padding: var(--space-2) var(--space-6);
    border: 1px solid var(--color-primary-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--color-primary-subtle);
    font-size: var(--fs-sm);
}
.active-filter-summary-v2 > div:not(.active-filter-summary-icon-v2) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
}
.active-filter-summary-v2 strong,
.active-filter-summary-v2 b {
    color: var(--text-primary);
    font-weight: var(--fw-semibold);
}
.active-filter-summary-icon-v2 {
    flex: 0 0 auto;
    color: var(--color-primary);
}

/* Labelled select filters used in data-table toolbars (members, leads).
   Pair a .toolbar-filter-label with a .toolbar-filter-select inside
   a .toolbar-filter-group so the label sits inline and the select
   matches the 30px button-sm height used by other toolbar controls. */
.toolbar-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.toolbar-filter-group .toolbar-filter-select { flex: 1 1 auto; }
.toolbar-filter-label {
    line-height: 1;
    white-space: nowrap;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    color: var(--neutral-700);
    display: inline-flex;
    align-items: center;
}
.toolbar-filter-select {
    height: var(--button-height-sm);
    padding: 0 28px 0 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--neutral-800);
    font-family: inherit;
    font-size: var(--fs-sm);
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}
.toolbar-filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

@media (max-width: 767px) {
    .filter-stack-v2 .filter-chip-v2,
    .filter-clear-v2 {
        min-height: var(--button-height-touch);
    }
    .filter-month-grid-v2 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .filter-status-grid-v2 {
        grid-template-columns: minmax(0, 1fr);
    }
    .active-filter-summary-v2 {
        align-items: flex-start;
        padding: var(--space-2);
    }
}

/* ---------- Bar chart (pure-DOM) ---------- */
.bar-chart-v2 {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 220px;
    padding: 4px 0;
}
.bar-chart-v2 .bar {
    flex: 1;
    background: var(--color-primary-subtle);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    min-height: 2px;
    transition: background var(--transition-fast);
}
.bar-chart-v2 .bar.current { background: var(--color-primary); }
.bar-chart-v2 .bar-value {
    position: absolute;
    top: -18px;
    left: 0; right: 0;
    text-align: center;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-medium);
    color: var(--neutral-600);
}
.bar-chart-v2-labels {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    font-size: var(--fs-caption);
    color: var(--neutral-500);
}
.bar-chart-v2-labels > span {
    flex: 1;
    text-align: center;
}
.bar-chart-v2-labels > span.current { color: var(--color-primary-active); font-weight: var(--fw-medium); }

/* ---------- Funnel ---------- */
.funnel-v2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.funnel-v2 .funnel-step {
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    color: #fff;
    background: var(--color-primary);
    font-size: var(--fs-sm);
    transition: width var(--transition-base);
}
.funnel-v2 .funnel-step .label { font-weight: var(--fw-medium); }
.funnel-v2 .funnel-step .value {
    font-weight: var(--fw-semibold);
    font-variant-numeric: tabular-nums;
}
.funnel-v2 .funnel-step.step-final { background: var(--color-success); }

/* ---------- Member cell (avatar + name) ---------- */
.member-cell-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.avatar-v2 {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    background: var(--neutral-500);
    flex-shrink: 0;
}
.avatar-v2.sm { width: 22px; height: 22px; font-size: 10px; }

/* ---------- Inline helpers ---------- */
.content-v2 .num-v2 { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.content-v2 .muted-v2 { color: var(--neutral-500); }
.content-v2 .strong-v2 { color: var(--neutral-900); font-weight: var(--fw-medium); }

.section-title-v2 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    margin: 0 0 10px;
}
.section-subtitle-v2 {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    margin: 0 0 14px;
}

/* Dashboard section grouping (Business Dashboard) */
.reports-group-v2 { margin-bottom: 24px; }
.reports-group-v2 .group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 10px;
    gap: 10px;
}
.reports-group-v2 .group-title {
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    margin: 0;
}
.reports-group-v2 .group-links {
    display: inline-flex;
    gap: 10px;
    font-size: var(--fs-caption);
}
.reports-group-v2 .group-links a {
    color: var(--neutral-500);
    text-decoration: none;
}
.reports-group-v2 .group-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Report-tile grid used by Overview index */
.report-tile-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.report-tile-v2 {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    text-decoration: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    min-height: 58px;
}
.report-tile-v2:hover {
    border-color: var(--color-primary-border);
    background: var(--color-primary-subtle);
    text-decoration: none;
}
.report-tile-v2 .title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--neutral-900);
}
.report-tile-v2 .subtitle {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
}

/* Small helper: right-aligned cluster inside panel header */
.panel-header-v2 .right {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

/* Funnel card (dashboard acquisition step) */
.funnel-card-v2 {
    padding: 14px 16px;
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--neutral-400);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.funnel-card-v2 .funnel-card-label {
    font-size: var(--fs-caption);
    color: var(--neutral-600);
    font-weight: var(--fw-medium);
    margin: 0;
}
.funnel-card-v2 .funnel-card-value {
    font-size: 26px;
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.funnel-card-v2 .funnel-card-bar {
    background: var(--neutral-100);
    border-radius: var(--radius-sm);
    height: 4px;
    overflow: hidden;
}
.funnel-card-v2 .funnel-bar-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    min-width: 2px;
    transition: width var(--transition-base);
    background: var(--color-primary);
}
.funnel-card-v2 .funnel-card-rate {
    font-size: var(--fs-caption);
    color: var(--neutral-600);
}
.funnel-card-v2 .funnel-card-rate strong { color: var(--neutral-900); font-weight: var(--fw-semibold); }
.funnel-card-v2.accent-leads   { border-left-color: var(--neutral-400); }
.funnel-card-v2.accent-leads   .funnel-bar-fill { background: var(--neutral-500); }
.funnel-card-v2.accent-trials  { border-left-color: var(--color-info); }
.funnel-card-v2.accent-trials  .funnel-bar-fill { background: var(--color-info); }
.funnel-card-v2.accent-started { border-left-color: var(--color-warning); }
.funnel-card-v2.accent-started .funnel-bar-fill { background: var(--color-warning); }
.funnel-card-v2.accent-closed  { border-left-color: var(--color-success); }
.funnel-card-v2.accent-closed  .funnel-bar-fill { background: var(--color-success); }

/* MTD (month-to-date) incomplete-period badge */
.mtd-badge-v2 {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    background: var(--color-warning-subtle);
    color: var(--color-warning-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.trial-report-kpis {
    margin-bottom: 16px;
}

.trial-summary-table .trial-table-muted {
    display: block;
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}

.trial-summary-table .trial-source-link {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-caption);
    font-weight: var(--fw-regular);
}

.trial-summary-table .trial-delta-up {
    color: var(--color-success);
}

.trial-summary-table .trial-delta-down {
    color: var(--color-error);
}

@media (max-width: 767px) {
    .referral-summary-table thead,
    .trial-summary-table thead {
        display: none;
    }

    .referral-summary-table tbody,
    .referral-summary-table tr,
    .referral-summary-table td,
    .trial-summary-table tbody,
    .trial-summary-table tr,
    .trial-summary-table td {
        display: block;
        width: 100%;
    }

    .referral-summary-table tbody tr,
    .trial-summary-table tbody tr {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border-default);
    }

    .referral-summary-table tbody tr:last-child,
    .trial-summary-table tbody tr:last-child {
        border-bottom: 0;
    }

    .referral-summary-table tbody td,
    .trial-summary-table tbody td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 4px 0;
        border-bottom: 0;
        text-align: right;
    }

    .referral-summary-table tbody td::before,
    .trial-summary-table tbody td::before {
        content: attr(data-label);
        color: var(--text-tertiary);
        font-size: var(--fs-caption);
        font-weight: var(--fw-medium);
        text-align: left;
    }

    .referral-summary-table tbody td:first-child,
    .trial-summary-table tbody td:first-child {
        padding-bottom: 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--border-subtle);
        color: var(--text-primary);
        font-size: var(--fs-h3);
    }
}

/* Month pager (prev / today / next in page header) */
.month-pager-v2 {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.month-pager-v2 .current {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--neutral-700);
    padding: 0 10px;
}

/* Legacy .table inside a v2 panel - tone it down while we migrate */
.panel-v2 .table,
.panel-v2 table.table {
    margin: 0;
    background: transparent;
    font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums;
}
.panel-v2 .table > thead > tr > th,
.panel-v2 table.table > thead > tr > th {
    background: var(--neutral-50);
    border-bottom: 1px solid var(--border-default);
    border-top: 0;
    font-size: var(--fs-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-600);
    font-weight: var(--fw-semibold);
    padding: 10px 14px;
}
.panel-v2 .table > tbody > tr > td,
.panel-v2 table.table > tbody > tr > td {
    padding: 10px 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: var(--fs-sm);
    color: var(--neutral-700);
    vertical-align: middle;
}

/* Row state highlights for data-table-v2 (Bootstrap class names, scoped) */
.data-table-v2 tbody tr.warning td { background: var(--color-warning-subtle); }
.data-table-v2 tbody tr.warning:hover td { background: var(--color-warning-subtle); filter: brightness(0.98); }
.data-table-v2 tbody tr.danger td { background: var(--color-error-subtle); }
.data-table-v2 tbody tr.danger:hover td { background: var(--color-error-subtle); filter: brightness(0.98); }
.data-table-v2 tbody tr.success td { background: var(--color-success-subtle); }
.data-table-v2 tbody tr.success:hover td { background: var(--color-success-subtle); filter: brightness(0.98); }
.data-table-v2 tbody tr.info td {
    background: var(--color-primary-subtle);
    box-shadow: inset 2px 0 0 var(--color-primary);
}
.data-table-v2 tbody tr.info:hover td { background: var(--color-primary-subtle); filter: brightness(0.98); }

/* =========================================================
   PROMOTION PIPELINE · member cards grouped by belt
   ========================================================= */
.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    align-items: start;
}
.pipeline-col {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.pipeline-belt-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-secondary);
}
.pipeline-belt { display: inline-flex; align-items: center; width: 90px; flex-shrink: 0; }
.pipeline-arrow { width: 16px; height: 16px; color: var(--neutral-500); flex-shrink: 0; }
.pipeline-belt-count {
    margin-left: auto;
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    font-variant-numeric: tabular-nums;
}
.pipeline-members { display: flex; flex-direction: column; }
.pipeline-member {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--fs-sm);
    position: relative;
}
.pipeline-member:last-child { border-bottom: 0; }
.pipeline-member.marked { background: var(--color-success-subtle); }
.pipeline-member.unmarked { background: var(--color-warning-subtle); }
.pipeline-member.held { box-shadow: inset 3px 0 0 var(--color-error); }
.pipeline-member.needs-approval { box-shadow: inset 3px 0 0 var(--color-warning); }
.pipeline-member-name {
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    text-decoration: none;
}
.pipeline-member-name:hover { text-decoration: underline; color: var(--color-primary-active); }
.pipeline-member-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    font-size: var(--fs-body);
}
.pipeline-member-actions a {
    color: var(--neutral-600);
    text-decoration: none;
    line-height: 1;
}
.pipeline-member-actions a:hover { color: var(--color-primary); }
.pipeline-member-name { padding-right: 56px; display: block; }
.pipeline-member-stats {
    margin: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: var(--fs-caption);
    color: var(--neutral-600);
}
.pipeline-member-stats dt { font-weight: var(--fw-medium); color: var(--neutral-700); }
.pipeline-member-stats dd { margin: 0; color: var(--neutral-600); font-variant-numeric: tabular-nums; }
.pipeline-member-stats > div { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.pipeline-member-stats > div dt::after { content: ':'; }

/* =========================================================
   BELT REQUIREMENTS · side-by-side adult/kids matrices
   ========================================================= */
.req-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 960px) {
    .req-grid { grid-template-columns: 1fr; }
}
.req-group-title {
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    margin: 0 0 10px;
    letter-spacing: -0.005em;
}
.req-belt {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.req-belt-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.req-belt-swatch { display: inline-flex; align-items: center; width: 160px; flex-shrink: 0; }
.req-belt-name {
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
}
.req-table { width: 100%; font-size: var(--fs-sm); }
.req-table th { font-weight: var(--fw-medium); color: var(--neutral-600); }
.req-table td { font-variant-numeric: tabular-nums; }
.req-note {
    display: block;
    font-size: var(--fs-caption);
    font-weight: var(--fw-regular);
    color: var(--neutral-500);
}
.req-meta {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.req-totals {
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    font-size: var(--fs-caption);
}
.req-totals > div { display: flex; gap: 6px; align-items: baseline; }
.req-totals dt { font-weight: var(--fw-medium); color: var(--neutral-700); margin: 0; }
.req-totals dt::after { content: ':'; }
.req-totals dd { margin: 0; color: var(--neutral-800); font-variant-numeric: tabular-nums; }

/* =========================================================
   ABSENCES · type/status pills, list rows, pending/rejected panels
   ========================================================= */
.section-title-v2 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.005em;
}
.absence-type-pill,
.absence-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    color: #fff;
    white-space: nowrap;
}
.absence-legend-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
    font-size: var(--fs-sm);
    color: var(--neutral-600);
}
.absence-legend-item-v2 { display: inline-flex; align-items: center; gap: 6px; }
.absence-legend-dot-v2 { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* List rows on /my-absences */
.absence-list-v2 {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.absence-row-v2 {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.absence-row-v2:last-child { border-bottom: 0; }
.absence-row-v2.is-past { opacity: 0.55; }
.absence-stripe {
    width: 4px;
    align-self: stretch;
    border-radius: 4px;
    flex-shrink: 0;
}
.absence-row-main { flex: 1; min-width: 0; }
.absence-row-dates {
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.absence-row-meta { font-size: var(--fs-sm); color: var(--neutral-500); margin-top: 2px; }
.absence-row-actions { flex-shrink: 0; }

/* Pending/rejected tinted panels */
.pending-panel-v2 {
    background: var(--color-warning-subtle);
    border-color: var(--color-warning);
}
.pending-panel-v2 .panel-header-v2 { border-bottom-color: rgba(181, 117, 14, 0.2); }
.pending-panel-v2 .panel-title-v2 { color: var(--color-warning-text); }
/* Pending/rejected tinted panels: let title icons inherit the semantic
   text color rather than the default muted gray. */
.pending-panel-v2 .panel-title-v2 :where(i, svg),
.rejected-panel-v2 .panel-title-v2 :where(i, svg) { color: inherit; }
.rejected-panel-v2 {
    background: var(--color-error-subtle);
    border-color: var(--color-error);
}
.rejected-panel-v2 .panel-alert-text { color: var(--color-error-text); }

/* Alert-style panel body - a single horizontal row of "message + actions".
   Used for headerless pending/rejected strips (absence detail, etc.).
   Wraps to a column on narrow viewports. */
.panel-body-v2.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.panel-alert-text { flex: 1; min-width: 0; }
.panel-alert-text-sub { color: var(--neutral-600); margin-top: 2px; font-size: var(--fs-sm); }
.panel-alert-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Pending approval rows (team view) */
.pending-row-v2 {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--color-warning);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.pending-row-v2:last-child { margin-bottom: 0; }
.pending-row-main { flex: 1; min-width: 0; }
.pending-row-name {
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pending-row-name a { color: var(--neutral-900); text-decoration: none; }
.pending-row-name a:hover { color: var(--color-primary-active); text-decoration: underline; }
.pending-row-meta { font-size: var(--fs-sm); color: var(--neutral-500); margin-top: 2px; }
.pending-row-reason { font-size: var(--fs-sm); color: var(--neutral-600); font-style: italic; margin-top: 4px; }
.pending-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* View toggle button group - placed between a panel and the view it toggles,
   so it carries its own vertical rhythm. */
.view-toggle-v2 {
    display: inline-flex;
    gap: 4px;
    margin: 20px 0 12px;
}
.view-toggle-v2 .btn-v2.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.view-toggle-v2 .btn-v2.active:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

/* Coverage rows (shown on /my-absences when other staff are covering) */
.coverage-group-label-v2 {
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-500);
    margin-bottom: 6px;
}
/* Second+ group label in the same panel gets a top gap to separate from
   the rows above. */
.coverage-group-label-v2 ~ .coverage-group-label-v2 { margin-top: 16px; }
.coverage-row-v2 {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--fs-sm);
    flex-wrap: wrap;
}
.coverage-row-v2:last-child { border-bottom: 0; }

/* Replacement rows on /absences/{id} */
.replacement-row-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    border-left: 3px solid var(--neutral-300);
}
.replacement-row-v2:last-child { border-bottom: 0; }
.replacement-row-v2.resolved { border-left-color: var(--color-success); }
.replacement-row-v2.unresolved { border-left-color: var(--color-error); }
.replacement-row-v2.skipped { border-left-color: var(--neutral-400); opacity: 0.65; }
.replacement-row-main { flex: 1; min-width: 0; }
.replacement-row-actions { flex-shrink: 0; }
/* Metadata beneath the main row title - smaller, muted. */
.replacement-row-sub {
    font-size: var(--fs-sm);
    color: var(--neutral-500);
    margin-top: 2px;
}
/* Inline role badge sitting next to the row title. */
.replacement-row-main .badge-v2 { margin-left: 6px; }

/* Inline assignment form inside a replacement row. Replaces the Bootstrap
   `.form-inline` + scattered inline styles for select widths and button
   margins. Wraps to multiple lines on narrow viewports. */
.assign-form-v2 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.assign-form-v2 select { min-width: 180px; }

/* Short-notice hint on the absence form */
.short-notice-hint {
    display: none;
    color: var(--color-warning-text);
    font-size: var(--fs-caption);
    margin-top: 4px;
}
.short-notice-hint.visible { display: block; }

/* Plan-preview table - denser variant used on /planning/plan/preview
   where the goal is "review a lot of rows quickly." Shares visual
   language with .data-table-v2 (eyebrow headers, subtle borders) but
   with tighter padding and row-group separators. */
.plan-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums;
}
.plan-preview-table thead th {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    padding: 8px 14px;
    text-align: left;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-600);
}
.plan-preview-table tbody td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--neutral-700);
}
/* Row-group separators: a thick line marks the start of a new ISO week,
   a thin line marks a new day within the same week. */
.plan-preview-table tr.week-start td { border-top: 3px solid var(--neutral-300); }
.plan-preview-table tr.day-start td  { border-top: 1px solid var(--neutral-300); }

/* Detail grid used on /absences/{id} header card */
.detail-grid-v2 {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.detail-grid-v2 > div { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.detail-grid-v2 dt {
    margin: 0;
    min-width: 100px;
    font-size: var(--fs-sm);
    color: var(--neutral-500);
    font-weight: var(--fw-medium);
}
.detail-grid-v2 dd {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--neutral-900);
}

/* =========================================================
   FULLCALENDAR · v2 restyle for #absence-calendar.
   Scoped to this one instance so other FullCalendar widgets (if any)
   keep their stock look. Overrides the plugin's 2015-era chrome to
   match the v2 design system: Inter typography, v2 borders and
   surfaces, btn-v2 styling on toolbar buttons, tabular numerals.
   ========================================================= */
#absence-calendar {
    font-family: inherit;
    color: var(--neutral-800);
    font-size: var(--fs-sm);
}

/* --- Toolbar --- */
#absence-calendar .fc-toolbar {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
#absence-calendar .fc-toolbar .fc-left,
#absence-calendar .fc-toolbar .fc-center,
#absence-calendar .fc-toolbar .fc-right { float: none; display: inline-flex; align-items: center; gap: 6px; }
#absence-calendar .fc-toolbar .fc-center { flex: 1; justify-content: center; }
#absence-calendar .fc-toolbar h2 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    margin: 0;
    letter-spacing: -0.005em;
    font-variant-numeric: tabular-nums;
}

/* --- Toolbar buttons (prev/next/today + month/agendaWeek toggle) --- */
#absence-calendar .fc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--button-height-sm);
    min-height: var(--button-height-sm);
    padding: 0 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--neutral-800);
    font-family: inherit;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    line-height: 1;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
#absence-calendar .fc-button:hover {
    background: var(--bg-secondary);
    border-color: var(--neutral-300);
}
#absence-calendar .fc-button:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}
#absence-calendar .fc-button.fc-state-active,
#absence-calendar .fc-button.fc-state-down {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: none;
}
#absence-calendar .fc-button.fc-state-disabled {
    background: var(--bg-secondary);
    color: var(--neutral-400);
    border-color: var(--border-default);
    cursor: not-allowed;
}

/* Button group: flush borders */
#absence-calendar .fc-button-group {
    display: inline-flex;
    gap: 0;
}
#absence-calendar .fc-button-group .fc-button {
    border-radius: 0;
    margin: 0;
}
#absence-calendar .fc-button-group .fc-button:first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
#absence-calendar .fc-button-group .fc-button:last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
#absence-calendar .fc-button-group .fc-button + .fc-button { margin-left: -1px; }
#absence-calendar .fc-button-group .fc-button:hover,
#absence-calendar .fc-button-group .fc-button:focus { z-index: 1; }

/* --- Grid surface + borders --- */
#absence-calendar .fc-view,
#absence-calendar .fc-view > table {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
}
#absence-calendar .fc td,
#absence-calendar .fc th,
#absence-calendar .fc-widget-header,
#absence-calendar .fc-widget-content,
#absence-calendar .fc hr,
#absence-calendar .fc-row {
    border-color: var(--border-default);
}

/* --- Day headers (Mon, Tue, …) --- */
#absence-calendar .fc-day-header {
    background: var(--bg-secondary);
    padding: 8px 6px;
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    color: var(--neutral-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

/* --- Day cells + numbers --- */
#absence-calendar .fc-day-number {
    padding: 6px 8px;
    font-size: var(--fs-caption);
    color: var(--neutral-600);
    font-variant-numeric: tabular-nums;
}
#absence-calendar .fc-day-top.fc-other-month .fc-day-number,
#absence-calendar .fc-other-month { color: var(--neutral-400); opacity: 1; }
#absence-calendar .fc-today {
    background: var(--color-primary-subtle) !important;
}
#absence-calendar .fc-today .fc-day-number {
    color: var(--color-primary-active);
    font-weight: var(--fw-semibold);
}

/* --- Time grid (agendaWeek view) --- */
#absence-calendar .fc-axis,
#absence-calendar .fc-time-grid .fc-slats td {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    font-variant-numeric: tabular-nums;
}
#absence-calendar .fc-time-grid .fc-slats .fc-minor td { border-top-style: dotted; border-top-color: var(--border-subtle); }

/* --- Events: colored pills. Background comes from AbsenceType::color
       as an inline style, so we only set geometry + typography here. --- */
#absence-calendar .fc-event,
#absence-calendar .fc-event:hover,
#absence-calendar .fc-event:focus,
#absence-calendar .fc-event:active,
#absence-calendar .fc-event:visited,
#absence-calendar a.fc-event,
#absence-calendar a.fc-event:hover,
#absence-calendar a.fc-event:focus,
#absence-calendar a.fc-event:active,
#absence-calendar a.fc-event:visited,
#absence-calendar .fc-event .fc-title,
#absence-calendar .fc-event .fc-time {
    color: #fff;
    text-decoration: none;
}
#absence-calendar .fc-event {
    position: relative;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    margin: 1px 2px;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    line-height: 1.4;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
#absence-calendar .fc-event .fc-time { font-weight: var(--fw-semibold); margin-right: 4px; }
#absence-calendar .fc-event.fc-allday,
#absence-calendar .fc-event.fc-day-grid-event { padding: 2px 6px; }
#absence-calendar .fc-event:hover { filter: brightness(0.95); }

/* Per-day unresolved warning pills. Rendered as absolutely-positioned
   children inside the absence bar (see AbsenceGateway::findForCalendar +
   IndexV2 eventRender). Each pill spans ~one day-column width and sits at
   the bottom of the bar, so the absence's type color + title stay fully
   visible above. An unresolved event also gains .fc-event-unresolved for
   the tooltip and extra bottom padding to keep the title off the pills. */
#absence-calendar .fc-event-unresolved {
    padding-bottom: 20px;
    min-height: 38px;
}
#absence-calendar .fc-event-day-warnings {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    height: 15px;
    pointer-events: none;
}
#absence-calendar .fc-event-day-warning {
    position: absolute;
    top: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 4px;
    background: var(--color-error);
    color: #fff;
    border-radius: 3px;
    font-size: 10px;
    font-weight: var(--fw-semibold);
    line-height: 1;
    letter-spacing: -0.005em;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
    overflow: hidden;
    white-space: nowrap;
}
#absence-calendar .fc-event-day-warning svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    display: block;
}
/* Label collapses away on narrow day columns so the icon stays readable.
   container queries aren't safe in 2015-era FC markup, so we rely on the
   pill's own overflow: hidden - the label ellipses/clips, icon is always
   centered first because it's flex-gap-aligned. */
#absence-calendar .fc-event-day-warning-label {
    overflow: hidden;
    text-overflow: clip;
    min-width: 0;
}

/* =========================================================
   V2 FORMS · inputs, labels, horizontal form rows.
   Use these instead of Bootstrap's .form-control / .form-group
   on v2 pages so inputs match the v2 shell (height, radius,
   focus ring). Bootstrap is still loaded for legacy pages.
   ========================================================= */
.form-label-v2 {
    display: block;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    color: var(--neutral-600);
    margin: 0 0 6px;
}
.form-label-v2 .form-label-hint {
    font-weight: var(--fw-regular);
    color: var(--neutral-400);
    margin-left: 4px;
}
.input-v2 {
    display: block;
    width: 100%;
    height: var(--input-height);
    padding: 0 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--neutral-800);
    font-size: var(--fs-sm);
    font-family: inherit;
    line-height: calc(var(--input-height) - 2px);
    box-shadow: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}
.input-v2:hover { border-color: var(--neutral-300); }
.input-v2:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}
.input-v2::placeholder { color: var(--neutral-400); }
select.input-v2 {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 32px;
    cursor: pointer;
}
textarea.input-v2 { height: auto; padding: 8px 10px; resize: vertical; min-height: 80px; line-height: 1.5; }

/* Horizontal form rows - wrap responsively. Each field is a .form-field-v2
   that can take .narrow / .wide / .auto modifiers to tune flex-basis. */
.form-row-v2 {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.form-row-v2 + .form-row-v2 { margin-top: 12px; }
.form-field-v2 { flex: 1 1 180px; min-width: 0; }
.form-field-v2.narrow { flex: 0 1 150px; }
.form-field-v2.wide   { flex: 2 1 240px; }
.form-field-v2.auto   { flex: 0 0 auto; }
.form-field-v2 .form-control { /* if a legacy input still uses .form-control, give it v2 shape */
    height: var(--input-height);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

/* =========================================================
   COMBOBOX-V2 · custom searchable dropdown built from scratch.
   Progressive enhancement for `<select data-searchable>`; the JS in
   /js/combobox-v2.js hides the native select and builds this UI next to
   it, syncing the select's `.value` on choice so form submission works
   normally. No dependency on jQuery or select2.
   ========================================================= */
.combobox-v2 {
    position: relative;
    width: 100%;
    font-family: inherit;
}

/* The input doubles as trigger + search field. Styled identically to
   .input-v2 so it slots into .form-row-v2 alongside other fields. Right
   padding reserves space for the absolutely-positioned chevron. */
.combobox-v2-input {
    display: block;
    width: 100%;
    height: var(--input-height);
    padding: 0 32px 0 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--neutral-800);
    font-family: inherit;
    font-size: var(--fs-sm);
    line-height: calc(var(--input-height) - 2px);
    box-shadow: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}
.combobox-v2-input:hover { border-color: var(--neutral-300); }
.combobox-v2-input:focus,
.combobox-v2.is-open .combobox-v2-input {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}
.combobox-v2-input::placeholder { color: var(--neutral-400); }

/* Chevron sits inside the input's right padding via absolute positioning.
   mousedown handler on it preventDefaults so the input keeps focus when
   the chevron is clicked. */
.combobox-v2-chevron {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    background: var(--neutral-500);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat center / contain;
    cursor: pointer;
    transition: transform var(--transition-fast);
}
.combobox-v2.is-open .combobox-v2-chevron { transform: rotate(180deg); }

/* Popover lives on <body> (appended by JS) with position: fixed (set
   inline by JS), so it escapes overflow: hidden containers and renders
   above other v2 chrome. */
.combobox-v2-popover {
    z-index: 1000;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Options list */
.combobox-v2-options {
    list-style: none;
    margin: 0;
    padding: 4px;
    max-height: 260px;
    overflow-y: auto;
}
.combobox-v2-option {
    padding: 6px 10px;
    font-size: var(--fs-sm);
    color: var(--neutral-800);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.combobox-v2-option:hover,
.combobox-v2-option.is-active {
    background: var(--color-primary);
    color: #fff;
}
.combobox-v2-option[aria-selected="true"] {
    background: var(--color-primary-subtle);
    color: var(--color-primary-active);
    font-weight: var(--fw-medium);
}
.combobox-v2-option[aria-selected="true"]:hover,
.combobox-v2-option[aria-selected="true"].is-active {
    background: var(--color-primary);
    color: #fff;
}
.combobox-v2-empty {
    list-style: none;
    padding: 10px 12px;
    color: var(--neutral-500);
    font-size: var(--fs-sm);
    text-align: center;
}

/* Hide the underlying <select> while keeping it in the DOM for submission */
select[data-searchable][data-combobox-init="1"] {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   MEMBER DETAIL · identity header + tab strip
   ========================================================================== */
.member-header-v2 {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: 0;
}
.member-header-v2 .member-avatar-v2 {
    flex: 0 0 auto;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: grid; place-items: center;
    color: #fff;
    font-size: 16px;
    font-weight: var(--fw-semibold);
    background: var(--neutral-500);
    overflow: hidden;
}
.member-header-v2 .member-avatar-v2 img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.member-header-v2 .member-identity { flex: 1 1 auto; min-width: 0; }
.member-header-v2 .member-name {
    font-size: var(--fs-h2);
    font-weight: var(--fw-semibold);
    color: var(--neutral-900);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.member-header-v2 .member-meta {
    margin-top: 4px;
    font-size: var(--fs-sm);
    color: var(--neutral-600);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.member-header-v2 .member-meta a {
    color: var(--neutral-700);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.member-header-v2 .member-meta a:hover { color: var(--color-primary); }
.member-header-v2 .member-meta .sep { color: var(--neutral-300); }
.member-header-v2 .member-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.member-tabstrip-v2 {
    display: flex;
    gap: 2px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-top: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 0 12px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.member-tabstrip-v2 a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    margin-bottom: -1px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--neutral-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.member-tabstrip-v2 a:hover { color: var(--neutral-900); }
.member-tabstrip-v2 a.active {
    color: var(--color-primary-active);
    border-bottom-color: var(--color-primary);
}
.member-tabstrip-v2 a svg {
    width: 14px; height: 14px;
    stroke-width: 2;
}

/* Member-detail requirements + stats grid  */
.member-req-list { margin: 0; padding: 0; list-style: none; }
.member-req-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    font-size: var(--fs-sm);
    color: var(--neutral-700);
    border-bottom: 1px solid var(--border-subtle);
}
.member-req-list li:last-child { border-bottom: 0; }
.member-req-list .req-icon {
    flex: 0 0 16px;
    width: 16px; height: 16px;
    display: grid; place-items: center;
    color: var(--neutral-400);
}
.member-req-list .req-icon.done { color: var(--color-success); }
.member-req-list .req-label { flex: 1 1 auto; color: var(--neutral-800); font-weight: var(--fw-medium); }
.member-req-list .req-value { color: var(--neutral-500); font-variant-numeric: tabular-nums; }
.member-req-bar {
    margin: 4px 0 2px 24px;
    height: 4px;
    background: var(--neutral-100);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.member-req-bar > span {
    display: block;
    height: 100%;
    background: var(--color-primary);
    border-radius: inherit;
}

.member-stat-list { margin: 0; padding: 0; list-style: none; }
.member-stat-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    font-size: var(--fs-sm);
    border-bottom: 1px solid var(--border-subtle);
}
.member-stat-list li:last-child { border-bottom: 0; }
.member-stat-list .label { color: var(--neutral-600); }
.member-stat-list .value { color: var(--neutral-900); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }

/* Row-item cards (for Notes, Promotions, Codes, Tests) */
.row-item-v2 {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.row-item-v2:last-child { border-bottom: 0; }
.row-item-v2 .row-item-main { flex: 1 1 auto; min-width: 0; }
.row-item-v2 .row-item-meta {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.row-item-v2 .row-item-meta strong {
    color: var(--neutral-700);
    font-weight: var(--fw-medium);
    margin-right: 2px;
}
.row-item-v2 .row-item-body {
    font-size: var(--fs-sm);
    color: var(--neutral-800);
    white-space: pre-wrap;
}
.row-item-v2 .row-item-actions { flex: 0 0 auto; }
.icon-btn-v2 {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px;
    border: 0;
    background: transparent;
    color: var(--neutral-500);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.icon-btn-v2:hover { background: var(--bg-hover); color: var(--color-error); }
.icon-btn-v2 svg { width: 14px; height: 14px; stroke-width: 2; }
.empty-state-v2 {
    padding: 20px;
    text-align: center;
    color: var(--neutral-500);
    font-size: var(--fs-sm);
}

/* Small compact input, same visual language as .input-v2 but sized for
   inline grids (variant matrix, quantity cells). */
.input-sm-v2 {
    height: 28px;
    padding: 0 6px;
    font-size: var(--fs-sm);
    font-family: var(--font-ui);
    color: var(--neutral-800);
    background: var(--bg-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-variant-numeric: tabular-nums;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input-sm-v2:hover { border-color: var(--neutral-300); }
.input-sm-v2:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

/* Small round color swatch. Used inline anywhere a color variant is shown
   (catalog, inventory, promotion belt legend). */
.color-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    margin-right: 4px;
}

/* Compact matrix table for variant quantities (color × size). Reused for the
   inventory read view and the add/adjust modals. */
.variant-matrix-v2 {
    width: auto;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.variant-matrix-v2 th,
.variant-matrix-v2 td {
    padding: 4px 6px;
    border: 1px solid var(--border-subtle);
}
.variant-matrix-v2 thead th {
    background: var(--bg-muted);
    font-weight: var(--fw-medium);
    color: var(--neutral-600);
    font-size: var(--fs-caption);
    text-align: center;
}
.variant-matrix-v2 td.num,
.variant-matrix-v2 th.num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}
/* Adjust-mode cell: current qty stacked above delta input. */
.variant-matrix-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.variant-matrix-cell .variant-matrix-current {
    font-size: var(--fs-caption);
    color: var(--neutral-500);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.inventory-snapshot-filter {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

.inventory-snapshot-filter .input-v2 {
    width: 160px;
}

.inventory-snapshot-table th,
.inventory-snapshot-table td {
    white-space: nowrap;
}

.inventory-snapshot-table th:first-child,
.inventory-snapshot-table td:first-child {
    white-space: normal;
}

.inventory-snapshot-table tfoot td {
    padding: 12px 14px;
    background: var(--neutral-50);
    border-top: 1px solid var(--border-strong);
    border-bottom: 0;
    color: var(--neutral-900);
    font-weight: var(--fw-semibold);
    vertical-align: middle;
}

.inventory-snapshot-product-code {
    font-size: var(--fs-caption);
}

.inventory-snapshot-deleted-badge {
    margin-left: var(--space-2);
}

.inventory-snapshot-empty {
    padding: var(--space-10) var(--space-6);
    text-align: center;
}

.inventory-snapshot-empty-icon {
    color: var(--neutral-400);
    margin-bottom: var(--space-2);
}

.inventory-snapshot-empty-icon svg {
    width: 32px;
    height: 32px;
}

.inventory-snapshot-empty-title {
    font-size: var(--fs-h3);
    margin-bottom: var(--space-1);
}

:root { --inventory-adjust-dialog-width: 860px; }
.inventory-adjust-dialog-v2 { max-width: var(--inventory-adjust-dialog-width); }
.inventory-adjust-dialog-v2 > form { display: flex; flex-direction: column; min-height: 0; }
.inventory-adjust-dialog-v2 .modal-v2-header, .inventory-adjust-dialog-v2 .modal-v2-footer { flex-shrink: 0; }
.inventory-adjust-matrix-v2 { overflow-x: auto; max-width: 100%; padding-bottom: var(--space-2); }
.inventory-adjust-scroll-hint-v2 { font-size: var(--fs-caption); margin: 0 0 var(--space-2); }
.inventory-adjust-matrix-v2:focus-visible { outline: var(--border-width) solid var(--color-primary); outline-offset: var(--space-1); }
.inventory-adjust-matrix-v2 .variant-matrix-v2 td:first-child { white-space: nowrap; }
.adjust-no-changes { color: var(--color-warning-text); font-size: var(--fs-sm); margin-top: var(--space-2); text-align: center; }
@media (max-width: 767px) {
    .inventory-adjust-dialog-v2 .adjust-inv-input, .inventory-adjust-dialog-v2 .btn-v2 { min-height: var(--button-height-touch); }
}
.inventory-filters-v2 { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); padding: var(--space-5); }
.inventory-filters-v2 .form-field-v2 { flex: 1 1 calc(var(--shop-filter-width) - var(--space-4)); min-width: 0; margin: 0; }
.inventory-filter-actions-v2 { display: flex; gap: var(--space-2); }
.inventory-filters-v2 .inventory-search-v2 { flex: 2 1 var(--shop-sort-width); }
.inventory-filters-v2 .inventory-page-size-v2 { flex: 0 1 calc(var(--space-10) + var(--space-6)); }
.inventory-results-v2, .inventory-pagination-v2 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-5); border-top: var(--border-width) solid var(--border-default); color: var(--text-secondary); font-size: var(--fs-sm); }
.inventory-pagination-v2 { justify-content: flex-end; }
.inventory-product-table-v2 { table-layout: fixed; width: 100%; }
.inventory-product-table-v2 > thead > tr > th:first-child { width: 38%; }
.inventory-product-table-v2 > thead > tr > th:nth-child(3) { width: 12%; }
.inventory-product-table-v2 > tbody > tr > td { vertical-align: middle; overflow-wrap: anywhere; }
.inventory-product-identity-v2 { display: flex; gap: var(--space-3); align-items: center; min-width: 0; }
.inventory-product-identity-v2 > div { min-width: 0; }
.inventory-product-image-v2, .inventory-product-placeholder-v2 { width: var(--space-10); height: var(--space-10); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); object-fit: contain; flex-shrink: 0; }
.inventory-product-placeholder-v2 { display: grid; place-items: center; background: var(--bg-canvas); color: var(--text-tertiary); }
.inventory-product-code-v2 { display: block; margin-top: var(--space-1); color: var(--text-secondary); font-size: var(--fs-caption); font-weight: var(--fw-regular); }
.inventory-product-actions-v2 { text-align: right; }
.inventory-breakdown-content-v2 { display: grid; gap: var(--space-3); padding: var(--space-3); background: var(--bg-canvas); font-size: var(--fs-sm); }
.inventory-matrix-scroll-v2 { max-width: 100%; overflow-x: auto; }
.inventory-breakdown-row-v2[hidden] { display: none; }
.inventory-list-empty-v2 { text-align: center; padding: var(--space-10) var(--space-5); }
@media (max-width: 767px) {
    .inventory-filters-v2 { padding: var(--space-4); gap: var(--space-3); }
    .inventory-filters-v2 .form-field-v2 { flex-basis: calc(50% - var(--space-3)); }
    .inventory-filters-v2 .inventory-search-v2 { flex-basis: 100%; }
    .inventory-browser-v2 .input-v2, .inventory-browser-v2 .btn-v2, .inventory-results-v2 .switch-v2 { min-height: var(--button-height-touch); }
    .inventory-product-table-v2 > thead { display: none; }
    .inventory-product-table-v2, .inventory-product-table-v2 > tbody { display: block; width: 100%; }
    .inventory-product-row-v2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-4); border-top: var(--border-width) solid var(--border-default); }
    .inventory-product-table-v2 > tbody > .inventory-product-row-v2 > td { display: block; padding: var(--space-2) 0; border: 0; }
    .inventory-product-row-v2 > td:first-child { grid-column: 1 / -1; }
    .inventory-product-row-v2 > td:nth-child(3)::before { content: 'Units: '; font-weight: var(--fw-regular); color: var(--text-secondary); }
    .inventory-breakdown-row-v2 { display: block; }
    .inventory-product-table-v2 > tbody > .inventory-breakdown-row-v2 > td { display: block; padding: 0 var(--space-4) var(--space-4); }
    .inventory-pagination-v2 { justify-content: space-between; padding: var(--space-4); }
}

.inventory-current-table tbody tr:last-child td {
    border-bottom: 1px solid var(--border-subtle);
}

.ranked-rashguard-color-name {
    align-items: center;
    color: var(--neutral-900);
    display: inline-flex;
    font-weight: var(--fw-medium);
    gap: var(--space-1);
    min-width: 0;
}

.ranked-rashguard-color-dot {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-pill);
    display: inline-block;
    flex: 0 0 auto;
    height: var(--fs-caption);
    width: var(--fs-caption);
}

.ranked-rashguard-color-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.ranked-rashguard-color-nav-link {
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    white-space: nowrap;
}

.content-v2 a.ranked-rashguard-color-nav-link {
    color: var(--neutral-700);
}

.ranked-rashguard-color-nav-link:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

.ranked-rashguard-nav-count {
    color: var(--neutral-500);
    font-size: var(--fs-caption);
    font-variant-numeric: tabular-nums;
}

.ranked-rashguard-color-sections {
    display: grid;
    gap: var(--space-2);
}

.ranked-rashguard-color-panel {
    scroll-margin-top: var(--topbar-height);
}

.ranked-rashguard-panel-header {
    padding: var(--space-2) var(--space-2);
}

.ranked-rashguard-panel-title {
    line-height: 1.2;
}

.ranked-rashguard-panel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    justify-content: flex-end;
}

.ranked-rashguard-panel-body {
    padding: var(--space-2);
}

.ranked-rashguard-table {
    font-size: var(--fs-caption);
}

.ranked-rashguard-table thead th,
.ranked-rashguard-table tbody td {
    padding: var(--space-1) var(--space-2);
}

.ranked-rashguard-table tbody tr:hover td {
    background: transparent;
}

.ranked-rashguard-table tbody tr:hover td.ranked-rashguard-stock-cell.is-empty {
    background: var(--color-error-subtle);
}

.ranked-rashguard-table tbody tr:hover td.ranked-rashguard-stock-cell.is-low {
    background: var(--color-warning-subtle);
}

.ranked-rashguard-sleeve-matrix tbody tr:last-child td,
.ranked-rashguard-model-table tbody tr:last-child td {
    border-bottom: 1px solid var(--border-subtle);
}

.ranked-rashguard-model-detail {
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-2);
}

.ranked-rashguard-model-detail summary {
    align-items: center;
    color: var(--neutral-500);
    cursor: pointer;
    display: inline-flex;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    gap: var(--space-1);
    list-style: none;
    padding: var(--space-1) 0;
}

.ranked-rashguard-model-detail summary::-webkit-details-marker {
    display: none;
}

.ranked-rashguard-model-detail summary svg {
    height: var(--fs-caption);
    width: var(--fs-caption);
}

.ranked-rashguard-model-detail[open] summary {
    margin-bottom: var(--space-1);
}

.ranked-rashguard-product-code,
.ranked-rashguard-available {
    font-size: var(--fs-caption);
}

.ranked-rashguard-available {
    color: var(--neutral-500);
    display: block;
}

.ranked-rashguard-sleeve-matrix,
.ranked-rashguard-model-table {
    min-width: max-content;
}

.ranked-rashguard-stock-cell.is-empty {
    background: var(--color-error-subtle);
    color: var(--color-error-text);
    font-weight: var(--fw-semibold);
}

.ranked-rashguard-stock-cell.is-low {
    background: var(--color-warning-subtle);
    color: var(--color-warning-text);
    font-weight: var(--fw-semibold);
}

@media (max-width: 767px) {
    .inventory-snapshot-header {
        align-items: stretch;
        flex-direction: column;
    }

    .ranked-rashguard-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ranked-rashguard-panel-meta {
        justify-content: flex-start;
    }

    .ranked-rashguard-table,
    .ranked-rashguard-table tbody,
    .ranked-rashguard-table tr,
    .ranked-rashguard-table td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .ranked-rashguard-table thead {
        display: none;
    }

    .ranked-rashguard-table tbody tr {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        margin-bottom: var(--space-1);
        overflow: hidden;
    }

    .ranked-rashguard-table tbody td {
        align-items: center;
        display: flex;
        gap: var(--space-2);
        justify-content: space-between;
        text-align: right;
    }

    .ranked-rashguard-table tbody td::before {
        color: var(--neutral-500);
        content: attr(data-label);
        font-size: var(--fs-caption);
        font-weight: var(--fw-medium);
        text-align: left;
    }

    .ranked-rashguard-table tbody td:first-child {
        background: var(--neutral-50);
        display: block;
        text-align: left;
    }

    .ranked-rashguard-table tbody td:first-child::before {
        content: none;
    }

    .ranked-rashguard-table tbody td:last-child {
        background: var(--neutral-50);
    }

    .inventory-snapshot-filter {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-snapshot-filter .input-v2 {
        width: 100%;
    }

    .inventory-snapshot-table thead {
        display: none;
    }

    .inventory-snapshot-table,
    .inventory-snapshot-table tbody,
    .inventory-snapshot-table tfoot,
    .inventory-snapshot-table tr,
    .inventory-snapshot-table td,
    .inventory-snapshot-table th {
        display: block;
        width: 100%;
    }

    .inventory-snapshot-table tbody tr,
    .inventory-snapshot-table tfoot tr {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
        padding: var(--space-2) var(--space-2);
        border-bottom: 1px solid var(--border-default);
    }

    .inventory-snapshot-table tbody td,
    .inventory-snapshot-table tfoot td {
        padding: 0;
        border-bottom: 0;
        font-size: var(--fs-sm);
        white-space: normal;
    }

    .inventory-snapshot-table tfoot td {
        background: transparent;
        border-top: 0;
    }

    .inventory-snapshot-table tbody td:first-child,
    .inventory-snapshot-table tfoot td:first-child {
        grid-column: 1 / -1;
    }

    .inventory-snapshot-table .inventory-snapshot-total-spacer {
        display: none;
    }

    .inventory-snapshot-table tbody td:not(:first-child)::before,
    .inventory-snapshot-table tfoot td:not(:first-child)::before {
        content: attr(data-label);
        display: block;
        color: var(--text-tertiary);
        font-size: var(--fs-eyebrow);
        font-weight: var(--fw-medium);
        text-align: right;
    }
}

.product-deleted-badge {
    margin-left: var(--space-2);
}

.product-deleted-notice {
    margin-bottom: var(--space-2);
}

/* Topbar chips: impersonation, franchise view-as. Sit in the topbar so they
   stay pinned while scrolling and don't push page content down. */
.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 10px;
    margin-left: 8px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    border: 1px solid transparent;
    white-space: nowrap;
}
.topbar-chip i,
.topbar-chip .fa {
    flex-shrink: 0;
}
.topbar-chip form {
    margin: 0;
    display: inline;
}
.topbar-chip-link {
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.topbar-chip-link:hover {
    color: inherit;
    text-decoration: none;
}
.topbar-chip-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-chip-time {
    white-space: nowrap;
}
.topbar-chip-action {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.topbar-chip-action:hover {
    opacity: 0.8;
}
.topbar-chip-warn {
    background: var(--color-warning-subtle);
    color: var(--color-warning-text);
    border-color: var(--color-warning);
}
.topbar-chip-info {
    background: var(--color-primary-subtle);
    color: var(--color-primary-active);
    border-color: var(--color-primary-border);
}
@media (max-width: 720px) {
    .topbar-chip strong { display: none; }
    .topbar-chip-active-lesson strong { display: inline; }
    .topbar-chip-active-lesson .topbar-chip-action { display: none; }
}

/* ========== CHECKBOX / RADIO LABELS ==========
   Minimal label wrappers for native checkbox/radio inputs so they pair
   cleanly with .form-field-v2 rows. Use .checkbox-label-v2 for checkboxes
   and .radio-label-v2 for radio buttons. For task-key multi-pickers,
   wrap the checkbox rows in .task-keys-picker to get the inset padding.
*/
.checkbox-label-v2,
.radio-label-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    color: var(--neutral-800);
    cursor: pointer;
    user-select: none;
    margin: 4px 0;
    line-height: 1.3;
}
.checkbox-label-v2 input,
.radio-label-v2 input {
    margin: 0;
    flex-shrink: 0;
}
.app-v2 label.checkbox-label-v2 {
    font-weight: var(--fw-regular);
}
.app-v2 .checkbox-label-v2 input[type="checkbox"] {
    position: static;
    margin: 0;
}
.app-v2 .legacy-checkbox-control-v2 {
    display: flex;
    align-items: center;
    min-height: calc(
        var(--input-height) + var(--space-1) + var(--space-1) + var(--space-1)
    );
}
.app-v2 .legacy-checkbox-control-v2 .checkbox-label-v2 {
    margin: 0;
}
.radio-label-v2 {
    display: flex;
    align-items: flex-start;
}
.radio-label-v2 input {
    margin-top: 2px;
}
.radio-hint-v2 {
    display: block;
    font-size: var(--fs-caption);
    color: var(--neutral-600);
    font-weight: normal;
    margin-top: 2px;
}
.scope-task-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}
.task-keys-picker {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    margin: 4px 0 0 20px;
    background: var(--neutral-50);
    border-left: 2px solid var(--color-primary-border);
    border-radius: var(--radius-sm);
}
.detail-time-v2 {
    font-weight: normal;
    color: var(--neutral-600);
    margin-left: 4px;
}

/* Responsive data table. Add data-label to every body cell. */
@media (max-width: 767px) {
    .responsive-card-table-v2,
    .responsive-card-table-v2 tbody,
    .responsive-card-table-v2 tr,
    .responsive-card-table-v2 td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .responsive-card-table-v2 thead {
        display: none;
    }

    .responsive-card-table-v2 tbody tr {
        border-bottom: 1px solid var(--border-default);
        padding: var(--space-2);
    }

    .responsive-card-table-v2 tbody tr:last-child {
        border-bottom: 0;
    }

    .responsive-card-table-v2 tbody td {
        align-items: baseline;
        border-bottom: 0;
        display: flex;
        gap: var(--space-2);
        justify-content: space-between;
        padding: var(--space-1) 0;
        text-align: right;
        white-space: normal;
    }

    .responsive-card-table-v2 tbody td::before {
        color: var(--text-tertiary);
        content: attr(data-label);
        flex-shrink: 0;
        font-size: var(--fs-caption);
        font-weight: var(--fw-medium);
        text-align: left;
    }

    .responsive-card-table-v2 tbody td:first-child {
        display: block;
        text-align: left;
    }

    .responsive-card-table-v2 tbody td:first-child::before,
    .responsive-card-table-v2 tbody td[data-label=""]::before {
        content: none;
    }
}
/* Cashbook */
.cashbook-toolbar-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.cashbook-month-navigation-v2 {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.cashbook-month-navigation-v2 .btn-v2 {
    width: var(--button-height-md);
    padding: 0;
}

.cashbook-month-label-v2 {
    min-width: calc(var(--space-10) * 4);
    color: var(--neutral-900);
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
    text-align: center;
}

.cashbook-entry-list-v2 {
    display: grid;
    gap: var(--space-1);
}

.cashbook-entry-v2 {
    display: grid;
    grid-template-columns: minmax(calc(var(--space-10) * 2), auto) minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    font-size: var(--fs-sm);
}

.cashbook-entry-date-v2 {
    color: var(--neutral-500);
    font-size: var(--fs-caption);
    font-variant-numeric: tabular-nums;
}

.cashbook-entry-description-v2 {
    min-width: 0;
    color: var(--neutral-900);
    font-weight: var(--fw-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cashbook-entry-amount-v2 {
    min-width: calc(var(--space-10) * 2);
    font-variant-numeric: tabular-nums;
    font-weight: var(--fw-semibold);
    text-align: right;
}

.cashbook-entry-amount-v2.income,
.cashbook-value-success-v2 {
    color: var(--color-success);
}

.cashbook-entry-amount-v2.expense,
.cashbook-value-error-v2 {
    color: var(--color-error);
}

.cashbook-entry-actions-v2 {
    display: flex;
    gap: var(--space-1);
}

.cashbook-entry-meta-v2 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.cashbook-validation-error-v2 {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-error-border);
    border-radius: var(--radius-md);
    background: var(--color-error-subtle);
    color: var(--color-error-text);
    font-size: var(--fs-sm);
}

.cashbook-allocation-list-v2 {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.cashbook-allocation-row-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(calc(var(--space-10) * 2), calc(var(--space-10) * 3));
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--neutral-25);
}

.cashbook-import-form-v2 {
    display: flex;
    align-items: end;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.cashbook-import-form-v2 .form-field-v2 {
    flex: 1;
    min-width: calc(var(--space-10) * 5);
}

.cashbook-batch-labels-v2,
.cashbook-batch-row-v2 {
    display: grid;
    grid-template-columns: calc(var(--space-10) * 2.5) calc(var(--space-10) * 2.25) calc(var(--space-10) * 2) minmax(calc(var(--space-10) * 3), 1fr) calc(var(--space-10) * 2.75) calc(var(--space-10) * 2.25) auto;
    gap: var(--space-2);
    align-items: center;
}

.cashbook-batch-labels-v2 {
    margin-bottom: var(--space-2);
    color: var(--neutral-600);
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cashbook-batch-row-v2 {
    margin-bottom: var(--space-2);
}

.cashbook-batch-row-v2 input[type="file"] {
    min-width: 0;
    width: 100%;
    font-size: var(--fs-caption);
}

.cashbook-document-match-list-v2 {
    display: grid;
    gap: var(--space-2);
}

.cashbook-document-match-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.cashbook-document-match-v2 strong,
.cashbook-document-match-v2 span {
    display: block;
}

.cashbook-document-match-v2 span {
    color: var(--neutral-500);
    font-size: var(--fs-sm);
}

@media (max-width: 767px) {
    .cashbook-entry-v2 {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .cashbook-entry-description-v2,
    .cashbook-entry-meta-v2,
    .cashbook-entry-actions-v2 {
        grid-column: 1 / -1;
    }

    .cashbook-entry-meta-v2 {
        justify-content: flex-start;
    }

    .cashbook-entry-actions-v2 .btn-v2 {
        min-height: var(--space-10);
    }

    .cashbook-batch-labels-v2 {
        display: none;
    }

    .cashbook-batch-row-v2 {
        grid-template-columns: minmax(0, 1fr);
        padding: var(--space-3);
        border: 1px solid var(--border-default);
        border-radius: var(--radius-md);
        background: var(--neutral-25);
    }

    .cashbook-allocation-row-v2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .cashbook-document-match-v2 {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ========== LIFECYCLE RETENTION ========== */
.panel-subtitle-v2 {
    margin: var(--space-1) 0 0;
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
    font-weight: var(--fw-regular);
}

.retention-filter-panel-v2 {
    margin-bottom: var(--space-4);
}

.retention-filter-v2 {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.retention-filter-v2 .toolbar-filter-group {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1);
}

.retention-funnel-v2,
.retention-checkpoints-v2 {
    display: grid;
    gap: var(--space-4);
}

.retention-funnel-v2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.retention-funnel-step-v2,
.retention-checkpoint-card-v2 {
    padding: var(--space-4);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
}

.retention-funnel-label-v2,
.retention-funnel-meta-v2,
.retention-checkpoint-heading-v2 span,
.retention-comparison-v2 span {
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}

.retention-funnel-value-v2 {
    margin: var(--space-1) 0 var(--space-2);
    color: var(--text-primary);
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
}

.retention-funnel-meta-v2 {
    margin-top: var(--space-2);
}

.retention-rate-bar-v2 {
    height: var(--space-2);
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--neutral-200);
}

.retention-rate-bar-v2 > span {
    display: block;
    width: var(--retention-rate);
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
}

.retention-checkpoint-heading-v2,
.retention-comparison-v2 > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2);
}

.retention-checkpoint-heading-v2 {
    margin-bottom: var(--space-4);
}

.retention-checkpoint-heading-v2 strong {
    color: var(--text-primary);
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
}

.retention-comparison-v2 + .retention-comparison-v2 {
    margin-top: var(--space-4);
}

.retention-comparison-v2 .retention-rate-bar-v2 {
    margin-top: var(--space-2);
}

.retention-comparison-v2 strong {
    color: var(--text-primary);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
}

.retention-comparison-v2.membership .retention-rate-bar-v2 > span {
    background: var(--neutral-500);
}

.retention-promotion-summary-v2 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}

.retention-promotion-summary-v2 strong {
    color: var(--text-primary);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
}

.retention-detail-intro-v2 {
    margin: var(--space-6) 0 var(--space-3);
}

.retention-detail-intro-v2 .section-title-v2 {
    margin-bottom: var(--space-1);
}

.retention-detail-intro-v2 p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: var(--fs-sm);
}

.retention-disclosure-v2 > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--button-height-touch);
    gap: var(--space-4);
    padding: var(--space-4);
    cursor: pointer;
    list-style: none;
}

.retention-disclosure-v2 > summary::-webkit-details-marker {
    display: none;
}

.retention-disclosure-v2 > summary:hover {
    background: var(--bg-hover);
}

.retention-disclosure-v2 > summary:focus-visible {
    outline: 0;
    box-shadow: inset var(--shadow-focus);
}

.retention-disclosure-action-v2 {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: var(--space-2);
    color: var(--text-link);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
}

.retention-disclosure-action-v2::after {
    content: '';
    width: var(--space-3);
    height: var(--space-3);
    background-color: currentColor;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    transition: transform var(--transition-fast);
}

.retention-disclosure-v2[open] .retention-disclosure-action-v2::after {
    transform: rotate(90deg);
}

.retention-disclosure-action-v2 .when-open {
    display: none;
}

.retention-disclosure-v2[open] .retention-disclosure-action-v2 .when-closed {
    display: none;
}

.retention-disclosure-v2[open] .retention-disclosure-action-v2 .when-open {
    display: inline;
}

.retention-disclosure-body-v2 {
    padding: var(--space-4);
    border-top: var(--border-width) solid var(--border-default);
}

.retention-detail-section-v2 + .retention-detail-section-v2 {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: var(--border-width) solid var(--border-default);
}

.retention-detail-heading-v2 {
    margin-bottom: var(--space-3);
}

.retention-detail-heading-v2 h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--fs-h3);
    font-weight: var(--fw-semibold);
}

.retention-detail-heading-v2 p {
    margin: var(--space-1) 0 0;
    color: var(--text-tertiary);
    font-size: var(--fs-caption);
}

.retention-detail-heading-split-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.retention-method-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.retention-method-v2 > div {
    padding: var(--space-4);
    border: var(--border-width) solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
}

.retention-method-v2 strong {
    color: var(--text-primary);
    font-weight: var(--fw-semibold);
}

.retention-method-v2 p {
    margin: var(--space-1) 0 0;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

.empty-cell-v2 {
    padding: var(--space-6);
    color: var(--text-tertiary);
    text-align: center;
}

@media (max-width: 767px) {
    .retention-filter-v2,
    .retention-promotion-summary-v2 {
        align-items: stretch;
        flex-direction: column;
    }

    .retention-filter-v2 .toolbar-filter-group,
    .retention-filter-v2 .btn-v2 {
        width: 100%;
        min-height: var(--button-height-touch);
    }

    .retention-filter-v2 .toolbar-filter-select {
        width: 100%;
        min-height: var(--button-height-touch);
    }

    .retention-funnel-v2,
    .retention-checkpoints-v2,
    .retention-method-v2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .retention-disclosure-v2 > summary,
    .retention-detail-heading-split-v2 {
        align-items: flex-start;
        flex-direction: column;
    }

    .retention-disclosure-action-v2 {
        min-height: var(--button-height-touch);
    }
}

@media (max-width: 767px) {
    .checkin-review-v2 .btn-v2,
    .checkin-review-v2 .modal-v2-close { min-height: var(--button-height-touch); }
    .checkin-review-v2 .modal-v2-close { min-width: var(--button-height-touch); }
}

/* Lesson coverage task */
.lesson-coverage-v2 [hidden] { display: none !important; }
.coverage-tabs-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.coverage-tabs-v2 .filter-chip-v2 { min-height: var(--button-height-md); gap: var(--space-2); }
.coverage-tabs-v2 [data-coverage-count] { font-variant-numeric: tabular-nums; }
.coverage-reminder-v2 { display: flex; align-items: baseline; gap: var(--space-2); color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: var(--space-5); }
.coverage-feedback-v2 { padding: var(--space-3) var(--space-4); background: var(--color-success-subtle); color: var(--color-success-text); border-radius: var(--radius-md); font-size: var(--fs-sm); }
.coverage-date-v2 { margin: var(--space-5) 0 var(--space-3); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-secondary); }
.coverage-card-v2 { margin-bottom: var(--space-3); }
.coverage-class-v2 { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.coverage-class-v2 > div { min-width: 0; overflow-wrap: anywhere; }
.coverage-class-v2 .badge-v2 { flex-shrink: 0; }
.coverage-meta-v2 { margin: var(--space-1) 0 0; color: var(--text-secondary); font-size: var(--fs-sm); }
.coverage-assignment-v2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--space-3); align-items: end; margin-top: var(--space-4); }
.coverage-assignment-v2 .form-field-v2 { min-width: 0; margin: 0; }
.coverage-resolution-v2 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); font-size: var(--fs-sm); }
@media (max-width: 767px) {
    .coverage-assignment-v2 { grid-template-columns: minmax(0, 1fr); }
    .lesson-coverage-v2 .btn-v2, .lesson-coverage-v2 .filter-chip-v2, .lesson-coverage-v2 select { min-height: var(--button-height-touch); }
}
.video-workflow-navigation-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.info-notice-v2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-4); margin-bottom: var(--space-5); border: var(--border-width) solid var(--color-primary-border); border-left: var(--space-1) solid var(--color-primary); border-radius: var(--radius-md); background: var(--color-primary-subtle); color: var(--text-primary); font-size: var(--fs-body); }
.info-notice-v2 h2 { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--color-primary-active); font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
.info-notice-v2 p { grid-column: 1 / -1; margin: 0; }
.info-notice-v2 form { grid-column: 2; grid-row: 1; margin: 0; }
.info-notice-v2 button { min-height: var(--button-height-touch); }
.info-notice-v2 .info-notice-error-v2 { color: var(--color-error-text); }
@media print { .info-notice-v2 { display: none; } }

.video-ready-notice-v2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); margin-bottom: var(--space-5); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); }
.video-ready-notice-v2 strong { font-weight: var(--fw-semibold); color: var(--color-success); }
.video-ready-notice-v2 p { margin: var(--space-1) 0 0; color: var(--text-secondary); }


/* Scheduled shop sales. */
.shop-credit-totals-v2 { margin: var(--space-4) 0 0; }
.shop-credit-totals-v2 > div { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-2); }
.shop-credit-totals-v2 dd { margin: 0; text-align: right; }
.shop-checkout-review-total-v2 { white-space: pre-line; }
.shop-sale-editor-v2 { border: 0; border-top: var(--border-width) solid var(--border-default); padding: var(--space-5) 0; margin: var(--space-5) 0; min-width: 0; }
.shop-sale-editor-v2 legend { padding-top: var(--space-4); }
.shop-sale-prices-v2 { display: flex; align-items: flex-start; flex-wrap: wrap; gap: var(--space-3) var(--space-4); margin: var(--space-2) 0 0; }
.shop-sale-price-group-v2 { display: flex; flex-direction: column; gap: var(--space-1); }
.shop-sale-amounts-v2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.shop-sale-amounts-v2 > strong, .shop-sale-amounts-v2 > span, .shop-sale-amounts-v2 del { white-space: nowrap; }
.shop-sale-amounts-v2 del { color: var(--text-secondary); font-weight: var(--fw-regular); font-size: var(--fs-sm); }
.shop-sale-price-active-v2:not(.shop-sale-retail-v2) .shop-sale-amounts-v2 > strong { color: var(--shop-sale-accent); }
.shop-sale-retail-v2 { color: var(--text-secondary); }
.shop-sale-price-label-v2 { font-size: var(--fs-caption); line-height: var(--shop-line-height); }
.shop-sale-prices-detail-v2 { margin: var(--space-5) 0; font-size: var(--shop-product-price-size); }
.shop-sale-prices-detail-v2 .shop-sale-retail-v2 { font-size: inherit; }
.shop-sale-prices-detail-v2 .shop-sale-amounts-v2 del { font-size: var(--fs-h3); }
.shop-sale-details-v2 { margin: calc(-1 * var(--space-2)) 0 var(--space-5); font-size: var(--fs-sm); }
.shop-sale-details-v2 p { margin: var(--space-1) 0; }
.shop-sale-details-v2 .shop-sale-saving-v2 { display: inline-block; padding: var(--space-1) var(--space-2); margin-bottom: var(--space-2); border-radius: var(--radius-sm); color: var(--shop-sale-accent); background: var(--shop-sale-subtle); font-weight: var(--fw-semibold); }
.shop-sale-details-v2 [data-sale-deadline] { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.shop-product-badge-sale-v2 { background: var(--shop-sale-accent); color: var(--shop-sale-contrast); font-size: var(--fs-sm); padding: var(--space-1) var(--space-2); font-weight: var(--fw-semibold); }
.shop-card-badges-v2 .shop-product-badge-sale-v2 { order: -1; }
.shop-cart-price-v2:has(.shop-cart-original-price-v2), .shop-public [data-cart-savings] { color: var(--shop-sale-accent); }
.shop-cart-original-price-v2 { display: block; color: var(--text-secondary); font-size: var(--fs-sm); font-weight: var(--fw-regular); margin-bottom: var(--space-1); }

.shop-sale-announcement-v2 { display: flex; align-items: center; justify-content: center; gap: var(--space-2); background: var(--neutral-900); color: var(--neutral-0); padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); text-align: center; text-decoration: none; }
.shop-sale-announcement-v2:hover, .shop-sale-announcement-v2:focus { color: var(--neutral-0); text-decoration: underline; }

/* Video production workspace. */
.video-priority-v2 { display: inline-flex; align-items: center; width: fit-content; padding: var(--space-1) var(--space-2); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: var(--fs-caption); font-weight: var(--fw-medium); }
.video-priority-v2--high { border-color: var(--color-warning); color: var(--color-warning-text); background: var(--color-warning-subtle); }
.video-priority-v2--low { color: var(--text-tertiary); }
.video-priority-form-v2 { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.video-priority-form-v2 .input-v2 { width: auto; }
:root { --download-error-width: 560px; }
.download-error-page-v2 { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: var(--space-5); box-sizing: border-box; background: var(--bg-secondary); color: var(--text-primary); font-family: var(--font-ui); }
.download-error-page-v2 .panel-v2 { width: 100%; max-width: var(--download-error-width); }
.download-error-page-v2 p { margin: var(--space-4) 0; line-height: var(--shop-line-height); }
.video-order-controls-v2 { display: flex; gap: var(--space-1); }
.video-order-controls-v2[hidden] { display: none; }
.video-order-controls-v2 form { margin: 0; }
.video-order-controls-v2 .btn-v2:disabled { color: var(--text-tertiary); background: var(--bg-secondary); border-color: var(--border-subtle); cursor: default; }
@media (max-width: 767px) {
    .video-editing-row-v2 > .btn-v2 { margin-left: auto; }
}
:root {
    --video-summary-width: 320px;
    --video-tile-size: 48px;
    --video-player-height: 480px;
    --video-clip-list-height: 360px;
    --video-line-height: 1.5;
    --video-preview-width: 104px;
    --video-preview-aspect: 16 / 9;
    --video-preview-dialog-width: 960px;
    --video-media-card-width: 240px;
    --video-project-toolbar-layer: 5;
    --video-font-body: 16px;
    --video-font-secondary: 14px;
    --video-font-title: 26px;
    --video-font-heading: 20px;
    --video-font-subheading: 18px;
}
.video-workspace-v2 {
    --fs-body: var(--video-font-body);
    --fs-sm: var(--video-font-secondary);
    --fs-caption: var(--video-font-secondary);
    --fs-h1: var(--video-font-title);
    --fs-h2: var(--video-font-heading);
    --fs-h3: var(--video-font-subheading);
    --input-height: var(--button-height-touch);
    --button-height-md: var(--button-height-touch);
    --button-height-sm: var(--button-height-touch);
    color: var(--text-primary);
    font-size: var(--fs-body);
    line-height: var(--video-line-height);
}
.video-workspace-v2 .page-header { align-items: flex-start; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-6); }
.video-workspace-v2 .page-title { margin: 0 0 var(--space-2); }
.video-workspace-v2 .page-subtitle { font-size: var(--fs-body); line-height: var(--video-line-height); }
.video-workspace-v2 .page-actions { gap: var(--space-2); align-items: center; }
.video-workspace-v2 .btn-v2 { height: auto; min-height: var(--button-height-touch); max-height: none; min-width: max-content; flex-shrink: 0; padding: var(--space-2) var(--space-4); gap: var(--space-2); border-radius: var(--radius-lg); font-size: var(--fs-body); line-height: var(--video-line-height); white-space: nowrap; }
.video-workspace-v2 .video-download-all-v2 { min-height: var(--space-10); padding-inline: var(--space-5); font-weight: var(--fw-semibold); }
.video-workspace-v2 .input-v2 { border-radius: var(--radius-lg); font-size: var(--fs-body); font-weight: var(--fw-regular); }
.video-workspace-v2 textarea.input-v2 { line-height: var(--video-line-height); }
.video-workspace-v2 .form-label-v2 { font-size: var(--fs-body); margin-bottom: var(--space-2); }
.video-workspace-v2 .panel-header-v2 { padding: var(--space-4) var(--space-5); }
.video-workspace-v2 .panel-body-v2:where(:not(.flush, .video-handoff-body-v2)) { padding: var(--space-5); }
.video-workspace-v2 .filter-chip-v2 { min-height: var(--button-height-touch); padding: var(--space-2) var(--space-3); gap: var(--space-2); border-radius: var(--radius-lg); font-size: var(--fs-body); }
.video-workspace-v2 .video-workflow-navigation-v2 { gap: var(--space-4); border-bottom: var(--border-width) solid var(--border-default); margin-bottom: var(--space-5); }
.video-workflow-navigation-v2 .filter-chip-v2 { background: transparent; border: 0; border-bottom: calc(var(--border-width) * 2) solid transparent; border-radius: 0; color: var(--text-secondary); }
.video-workflow-navigation-v2 .filter-chip-v2.active { background: transparent; border-bottom-color: var(--color-primary); color: var(--text-primary); }
.video-workflow-navigation-v2 .filter-chip-v2:hover { background: var(--bg-hover); }
.video-workflow-navigation-v2 .video-status-v2 { padding-inline: var(--space-2); background: var(--bg-hover); }
.video-workflow-navigation-v2 .filter-chip-v2 { gap: var(--space-2); padding: var(--space-3); height: auto; min-height: var(--button-height-touch); }
.video-workflow-navigation-v2 .video-status-v2 { flex-shrink: 0; line-height: var(--video-line-height); }
.video-overview-v2 .video-project-heading-v2 { display: grid; gap: var(--space-3); min-width: 0; }
.video-overview-v2 .video-project-heading-v2 p { margin: 0; }
.video-overview-v2 .panel-title-v2 a { color: var(--text-primary); }
.video-overview-v2 .panel-title-v2 a:hover { color: var(--color-primary-active); }
.video-overview-v2 .video-meta-v2 { gap: var(--space-2) var(--space-4); }
.video-overview-v2 .video-project-row-v2 .video-row-content-v2 { display: grid; gap: var(--space-3); }
.video-overview-v2 .video-project-row-v2 h3 { margin: 0; }
.video-overview-v2 .video-row-summary-v2 { flex-shrink: 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.video-overview-v2 .video-panel-toolbar-v2 { gap: var(--space-5); }
.video-deliverable-icon-v2 { color: var(--text-tertiary); width: var(--space-5); flex-shrink: 0; text-align: center; }
.video-overview-v2 .video-queue-row-v2 { padding: var(--space-4) var(--space-5); }
.video-overview-v2 .video-queue-row-v2 h3 { font-size: var(--fs-body); font-weight: var(--fw-medium); overflow-wrap: anywhere; }
.video-priority-edit-v2 { flex-shrink: 0; font-size: var(--fs-sm); }
.video-priority-edit-v2 > summary { cursor: pointer; padding: var(--space-3); color: var(--text-secondary); min-height: var(--button-height-touch); }
.video-priority-edit-v2 form { padding-top: var(--space-2); }
.video-more-v2 { border-top: var(--border-width) solid var(--border-subtle); }
.video-more-v2 > summary { cursor: pointer; padding: var(--space-4) var(--space-5); color: var(--color-primary-active); font-size: var(--fs-sm); min-height: var(--button-height-touch); }
.video-more-v2[open] > summary { border-bottom: var(--border-width) solid var(--border-subtle); }
.video-publish-actions-v2 { flex-shrink: 0; flex-wrap: nowrap; }
.video-publish-actions-v2 form { margin: 0; }
.video-project-priority-v2 { margin: 0; }
.video-project-priority-v2 .input-v2 { width: auto; }
.video-project-drag-v2 { cursor: grab; touch-action: none; flex-shrink: 0; color: var(--text-tertiary); }
.video-project-drag-v2:active { cursor: grabbing; }
[data-queue-project] .video-project-heading-v2 { flex: 1; }
.video-dragging-v2 { outline: var(--border-width) solid var(--color-primary); }
.video-drop-before-v2 { border-top: var(--space-1) solid var(--color-primary); }
.video-drop-after-v2 { border-bottom: var(--space-1) solid var(--color-primary); }
.video-workspace-v2 input[type="checkbox"] { width: var(--space-5); height: var(--space-5); flex-shrink: 0; accent-color: var(--color-primary); }
.video-workspace-v2 .video-actions-v2 .btn-v2[aria-label], .video-media-view-v2 .btn-v2 { min-width: var(--button-height-touch); padding: var(--space-2); }
.video-workspace-v2 [hidden] { display: none !important; }
.video-workspace-v2 #deleteConfirmError { white-space: pre-line; color: var(--color-error-text); margin-top: var(--space-4); }
.video-workspace-v2 :is(h1, h2, h3, p, a, dd, span) { overflow-wrap: anywhere; }
.video-workspace-v2 .page-header > div { min-width: 0; }
.video-workspace-v2 textarea.input-v2 { height: auto; padding: var(--space-3); resize: vertical; }
.video-workspace-v2 input[type="file"] { height: auto; padding: 0; font-size: var(--fs-caption); }
.video-workspace-v2 input[type="file"]::file-selector-button { border: 0; border-right: var(--border-width) solid var(--border-default); background: var(--bg-secondary); color: var(--text-primary); padding: var(--space-2) var(--space-3); margin-right: var(--space-2); min-height: var(--input-height); font: inherit; cursor: pointer; }
.video-workspace-v2 .panel-v2 { margin-bottom: 0; min-width: 0; border-radius: var(--radius-lg); }
.video-workspace-v2 .form-field-v2 { margin: 0; min-width: 0; }
:is(.video-project-detail-v2, .video-deliverable-detail-v2) :is(.video-meta-v2, .video-muted-v2, .video-help-v2, .video-brief-v2, .video-details-v2 dt, .video-details-v2 dd, .form-label-v2) { font-size: var(--fs-body); }
:is(.video-project-detail-v2, .video-deliverable-detail-v2) .panel-title-v2 { font-size: var(--fs-h3); }
:is(.video-project-detail-v2, .video-deliverable-detail-v2) .video-brief-v2 { line-height: var(--video-line-height); }
.video-project-detail-v2 .video-handoff-v2 { margin-bottom: var(--space-6); }
.video-handoff-body-v2 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-5); padding: var(--space-6); }
.video-handoff-copy-v2 { flex: 1; min-width: min(100%, var(--video-summary-width)); }
.video-handoff-copy-v2 h2 { margin: var(--space-3) 0 var(--space-2); font-size: var(--fs-h2); font-weight: var(--fw-semibold); }
.video-handoff-copy-v2 p { margin: 0; font-size: var(--fs-body); color: var(--text-secondary); }
.video-handoff-actions-v2 { display: grid; gap: var(--space-2); }
.video-handoff-actions-v2 form { margin: 0; }
.video-handoff-actions-v2 .btn-v2 { width: 100%; min-height: var(--button-height-touch); font-size: var(--fs-body); }
.video-layout-v2 { display: grid; grid-template-columns: minmax(0, 1fr) var(--video-summary-width); align-items: start; gap: var(--space-5); }
.video-template-layout-v2 { grid-template-columns: var(--video-summary-width) minmax(0, 1fr); }
.video-template-layout-v2 .deliverable-row { flex-wrap: wrap; }
.video-template-layout-v2 .video-template-format-v2 { width: 100%; min-width: 0; }
.video-layout-v2 > *, .video-stack-v2 > * { min-width: 0; }
.video-stack-v2 { display: grid; gap: var(--space-5); align-content: start; }
.video-stack-v2 > .panel-v2, .video-layout-v2 > .panel-v2 { margin-top: 0; }
.video-filters-v2, .video-actions-v2, .video-meta-v2 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.video-filters-v2 { margin-bottom: var(--space-4); }
.video-actions-v2 form { margin: 0; }
.video-panel-toolbar-v2 { flex-wrap: wrap; gap: var(--space-3); }
.video-ready-toolbar-v2 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
.video-search-v2 { width: var(--video-summary-width); max-width: 100%; }
.video-search-v2 .input-v2 { width: 100%; }
.video-list-row-v2 { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5); border-bottom: var(--border-width) solid var(--border-subtle); min-width: 0; color: var(--text-primary); }
.video-list-row-v2:last-child { border-bottom: 0; }
a.video-list-row-v2 { text-decoration: none; }
a.video-list-row-v2:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.video-tile-v2 { display: grid; place-items: center; flex: none; width: var(--video-tile-size); height: var(--video-tile-size); border-radius: var(--radius-md); background: var(--bg-canvas); color: var(--text-tertiary); font-size: var(--fs-h2); overflow: hidden; }
.video-tile-v2 img { width: 100%; height: 100%; object-fit: cover; }
.video-row-content-v2 { flex: 1; min-width: 0; }
.video-row-content-v2 h3, .video-empty-v2 h3 { margin: 0 0 var(--space-2); font-size: var(--fs-h3); font-weight: var(--fw-medium); color: var(--text-primary); }
.video-row-content-v2 h3 a { color: var(--text-primary); }
.video-row-content-v2 p { margin: var(--space-1) 0 0; }
.video-meta-v2, .video-muted-v2, .video-help-v2 { color: var(--text-secondary); font-size: var(--fs-caption); font-weight: var(--fw-regular); }
.video-help-v2 { margin: var(--space-2) 0 0; }
.video-row-summary-v2 { display: grid; justify-items: end; gap: var(--space-2); }
.video-status-v2 { display: inline-flex; width: fit-content; align-items: center; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--bg-canvas); color: var(--text-secondary); font-size: var(--fs-caption); font-weight: var(--fw-medium); line-height: var(--video-line-height); }
.video-status-v2--review, .video-status-v2--in_review { background: var(--color-warning-subtle); color: var(--color-warning-text); }
.video-status-v2--approved, .video-status-v2--scheduled, .video-status-v2--publish_ready, .video-status-v2--published { background: var(--color-success-subtle); color: var(--color-success-text); }
.video-status-v2--editing, .video-status-v2--in_editing, .video-status-v2--footage_uploaded { background: var(--color-primary-subtle); color: var(--color-primary-active); }
.video-empty-v2 { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-10) var(--space-5); }
.video-empty-v2 p { margin: 0; color: var(--text-secondary); }
.video-note-v2 { padding: var(--space-4); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-secondary); font-size: var(--fs-sm); }
.video-note-v2 p { margin: var(--space-2) 0 0; color: var(--text-secondary); }
.video-details-v2 { margin: 0; display: grid; gap: var(--space-4); }
.video-details-v2 > div { display: flex; justify-content: space-between; gap: var(--space-4); }
.video-details-v2 dt { color: var(--text-secondary); font-size: var(--fs-sm); font-weight: var(--fw-regular); }
.video-details-v2 dd { text-align: right; margin: 0; font-size: var(--fs-sm); }
.video-brief-v2 { white-space: pre-wrap; margin: 0; font-size: var(--fs-sm); }
.video-disclosure-v2 > summary { cursor: pointer; padding: var(--space-4) var(--space-5); font-size: var(--fs-body); font-weight: var(--fw-medium); min-height: var(--button-height-touch); }
.video-disclosure-v2 > summary::after { content: ''; float: right; width: var(--space-2); height: var(--space-2); margin: var(--space-2) 0 0 var(--space-3); border-right: var(--border-width) solid currentColor; border-bottom: var(--border-width) solid currentColor; transform: rotate(45deg); }
.video-disclosure-v2[open] > summary::after { transform: rotate(225deg); }
.video-disclosure-v2[open] > summary { border-bottom: var(--border-width) solid var(--border-subtle); }
.video-disclosure-v2 .panel-body-v2 { padding: var(--space-5); }
.video-file-row-v2 .video-actions-v2 { flex-shrink: 0; }
.video-dropzone-v2 { display: grid; justify-items: center; gap: var(--space-2); width: 100%; padding: var(--space-6); background: var(--bg-secondary); border: var(--border-width) dashed var(--border-strong); border-radius: var(--radius-md); color: var(--text-primary); cursor: pointer; text-align: center; font: inherit; }
.video-dropzone-v2:hover, .video-dropzone-v2.dragover { border-color: var(--color-primary); background: var(--color-primary-subtle); }
.video-dropzone-v2:focus-visible, .video-disclosure-v2 > summary:focus-visible { outline: var(--border-width) solid var(--color-primary); outline-offset: var(--space-1); }
.video-dropzone-v2:disabled { cursor: wait; color: var(--text-secondary); }
.video-upload-progress-v2 { display: grid; gap: var(--space-3); }
.video-upload-progress-v2:empty { display: none; }
.video-upload-progress-v2 progress { width: 100%; height: var(--space-2); accent-color: var(--color-primary); display: block; margin: var(--space-2) 0; }
.video-error-v2 { color: var(--color-error-text); font-size: var(--fs-sm); }
.video-player-v2 { display: block; width: 100%; max-height: var(--video-player-height); aspect-ratio: 16 / 9; background: var(--neutral-900); border-radius: var(--radius-md); }
.video-player-v2[hidden], .video-stream-preview-v2[hidden] { display: none; }
.video-settings-navigation-v2 { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-4); }
.video-source-entry-v2 { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; }
.video-source-entry-v2 > a { min-width: 0; flex: 1; }
.video-stream-preview-v2 { display: flex; flex-direction: column; flex: none; gap: var(--space-1); width: var(--video-preview-width); }
.video-stream-open-v2 { display: grid; padding: 0; width: 100%; aspect-ratio: var(--video-preview-aspect); overflow: hidden; border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-canvas); color: var(--text-secondary); cursor: pointer; font: inherit; font-size: var(--fs-caption); }
.video-stream-open-v2:disabled { cursor: default; }
.video-stream-open-v2:focus-visible { outline: var(--border-width) solid var(--color-primary); outline-offset: var(--space-1); }
.video-stream-open-v2 img { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.video-stream-play-v2 { grid-area: 1 / 1; align-self: end; justify-self: stretch; display: flex; align-items: center; justify-content: center; gap: var(--space-1); padding: var(--space-1); background: var(--neutral-900); color: var(--neutral-0); }
.video-stream-open-v2:disabled .video-stream-play-v2 { background: var(--bg-canvas); color: var(--text-secondary); align-self: center; }
.video-stream-preview-v2--featured { width: 100%; }
.video-stream-preview-v2--featured .video-stream-open-v2 { max-height: var(--video-player-height); }
.video-stream-preview-v2--featured .video-stream-play-v2 { padding: var(--space-3); font-size: var(--fs-body); }
.video-stream-modal-v2 { width: var(--video-preview-dialog-width); max-width: 100%; }
.video-stream-modal-v2 .modal-v2-title { overflow-wrap: anywhere; }
.video-stream-player-v2 { display: block; width: 100%; aspect-ratio: var(--video-preview-aspect); border: 0; background: var(--neutral-900); }
.video-file-row-v2.has-stream-preview { display: grid; grid-template-columns: var(--video-preview-width) minmax(0, 1fr); }
.video-file-row-v2.has-stream-preview > .video-stream-preview-v2 { grid-column: 1; grid-row: 1 / 3; }
.video-file-row-v2.has-stream-preview > .video-row-content-v2, .video-file-row-v2.has-stream-preview > .video-actions-v2 { grid-column: 2; }
.video-thumbnail-v2 { display: block; width: 100%; max-height: var(--video-summary-width); object-fit: contain; border-radius: var(--radius-sm); background: var(--bg-canvas); }
.video-clip-list-v2 { max-height: var(--video-clip-list-height); overflow-y: auto; }
.video-source-upload-v2 { border-top: var(--border-width) solid var(--border-subtle); }
.video-source-compact-v2 .video-file-row-v2 { gap: var(--space-3); padding: var(--space-3) var(--space-4); flex-wrap: wrap; }
.video-source-compact-v2 .video-tile-v2 { display: none; }
.video-source-compact-v2 .video-file-row-v2 .video-row-content-v2 { flex-basis: 100%; }
.video-source-compact-v2 .video-file-row-v2 .video-actions-v2 { margin-left: auto; }
.video-source-compact-v2 .video-clip-list-v2 { max-height: var(--video-summary-width); }
.video-source-download-v2 { display: flex; align-items: baseline; gap: var(--space-3); min-height: var(--button-height-touch); padding: var(--space-2) 0; }
.video-source-download-v2 span { min-width: 0; }
.video-source-download-v2 > i { flex-shrink: 0; }
.video-source-compact-v2 [data-linked-source-downloads] { max-height: var(--video-summary-width); overflow-y: auto; gap: var(--space-1); }
.video-source-compact-v2 [data-linked-source-downloads]:empty { display: none; }
.video-deliverable-actions-v2 { margin-bottom: var(--space-5); }
.video-deliverable-actions-v2 + .video-help-v2 { margin-bottom: var(--space-5); }
.video-deliverable-detail-v2 .video-details-v2 { grid-template-columns: repeat(auto-fit, minmax(calc(var(--video-summary-width) / 2), 1fr)); }
.video-deliverable-detail-v2 .video-details-v2 > div { display: block; }
.video-deliverable-detail-v2 .video-details-v2 dd { text-align: left; }
.video-deliverable-detail-v2 #editVideoBrief form { padding-top: var(--space-4); }
.video-deliverable-layout-v2 { grid-template-areas: 'brief sources' 'cut extras' 'feedback extras'; }
.video-deliverable-brief-v2 { grid-area: brief; }
.video-deliverable-sources-v2 { grid-area: sources; }
.video-deliverable-cut-v2 { grid-area: cut; }
.video-deliverable-extras-v2 { grid-area: extras; }
.video-deliverable-layout-v2 > #comments { grid-area: feedback; }
.video-comment-v2 { padding-bottom: var(--space-4); border-bottom: var(--border-width) solid var(--border-subtle); }
.video-comment-v2:last-child { border-bottom: 0; padding-bottom: 0; }
.video-comment-v2 p { margin: var(--space-2) 0 0; white-space: pre-wrap; }
.video-comment-v2--revision_request { border-left: var(--space-1) solid var(--color-warning); padding-left: var(--space-3); }
.video-check-v2 { display: flex; align-items: center; gap: var(--space-3); min-height: var(--button-height-touch); margin: 0; font-weight: var(--fw-regular); }
.video-steps-v2 { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 var(--space-5); gap: var(--space-2) var(--space-5); font-size: var(--fs-caption); color: var(--text-secondary); }
.video-steps-v2 li { display: flex; align-items: center; gap: var(--space-2); }
.video-steps-v2 [aria-current] { color: var(--text-primary); font-weight: var(--fw-semibold); }
.video-steps-v2 .video-step-number-v2 { display: grid; place-items: center; width: var(--space-6); height: var(--space-6); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-pill); }
.video-steps-v2 [aria-current] .video-step-number-v2 { border-color: var(--text-primary); }
.video-project-detail-v2 .page-header { margin-bottom: var(--space-4); }
.video-project-detail-v2 .page-title { margin-bottom: var(--space-2); }
.video-project-actions-v2 .video-handoff-body-v2 { padding: 0; justify-content: flex-end; }
.video-project-actions-v2 .video-handoff-actions-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.video-project-more-v2 { position: relative; }
.video-project-more-v2 > div { position: absolute; right: 0; top: 100%; z-index: var(--video-project-toolbar-layer); padding: var(--space-3); min-width: var(--video-media-card-width); background: var(--bg-surface); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.video-workspace-v2 .video-project-brief-v2 { margin-bottom: var(--space-5); }
.video-project-brief-header-v2 { flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.video-project-brief-header-v2 > h2 { flex: 1; min-width: 0; }
.video-workspace-v2 .video-project-brief-edit-v2 { flex-shrink: 0; white-space: nowrap; overflow-wrap: normal; }
.video-project-brief-meta-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; }
.video-project-brief-meta-v2 > div { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.video-project-brief-meta-v2 dt { color: var(--text-secondary); font-weight: var(--fw-regular); }
.video-project-brief-meta-v2 dd { margin: 0; }
.video-project-brief-instructions-v2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--video-summary-width)), 1fr)); gap: var(--space-5); align-items: start; }
.video-project-brief-instructions-v2 > div { min-width: 0; }
.video-project-brief-instructions-v2 > div + div { padding: var(--space-4); border-radius: var(--radius-lg); background: var(--bg-secondary); }
.video-project-brief-v2 .panel-body-v2 .panel-title-v2 { margin-bottom: var(--space-2); }
.video-project-tabs-v2 { display: flex; gap: var(--space-5); border-bottom: var(--border-width) solid var(--border-default); margin-bottom: var(--space-4); }
.video-project-tabs-v2 a { display: flex; align-items: center; gap: var(--space-2); min-height: var(--button-height-touch); padding: var(--space-3) var(--space-2); border-bottom: calc(var(--border-width) * 2) solid transparent; color: var(--text-secondary); text-decoration: none; font-weight: var(--fw-medium); }
.video-project-tabs-v2 a[aria-selected="true"] { color: var(--text-primary); border-color: var(--color-primary); }
.video-project-tabs-v2 a:hover { text-decoration: none; }
.video-people-picker-v2 { border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-md); }
.video-people-picker-v2 summary { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); cursor: pointer; font-weight: var(--fw-medium); }
.video-people-options-v2 { padding: 0 var(--space-3) var(--space-3); }
.video-people-list-v2 { max-height: var(--video-media-card-width); overflow-y: auto; margin-top: var(--space-2); }
.video-person-option-v2 { display: flex; align-items: center; gap: var(--space-2); min-height: var(--button-height-touch); padding: var(--space-1) var(--space-2); cursor: pointer; border-radius: var(--radius-sm); }
.video-person-option-v2:hover { background: var(--bg-secondary); }
.video-person-option-v2[hidden], .video-mentions-v2[hidden] { display: none; }
.video-person-option-v2 small { display: block; }
.video-mentions-v2 { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.video-mention-v2 { padding: var(--space-1) var(--space-2); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: var(--fs-caption); overflow-wrap: anywhere; }
button.video-mention-v2 { cursor: pointer; }
.video-project-detail-v2 #footage { overflow: visible; }
.video-project-tabs-v2 a > span { font-size: var(--fs-caption); padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--bg-secondary); font-variant-numeric: tabular-nums; }
.video-project-tabs-v2 a[aria-selected="true"] > span { background: var(--color-primary-subtle); color: var(--color-primary-active); }
.video-unread-v2 { background: var(--color-primary-subtle); color: var(--color-primary-active); border-radius: var(--radius-sm); padding: var(--space-1); }
.video-project-detail-v2 .video-project-row-v2 { padding: var(--space-5); gap: var(--space-4); }
.video-project-detail-v2 .video-project-row-v2 .video-tile-v2 { width: var(--button-height-md); height: var(--button-height-md); font-size: var(--fs-body); }
.video-project-row-v2 > .video-deliverable-format-v2, .video-project-row-v2 > .video-deliverable-sources-v2 { color: var(--text-secondary); font-size: var(--fs-caption); flex-shrink: 0; }
.video-project-detail-v2 .video-row-summary-v2 { display: flex; align-items: center; gap: var(--space-2); }
.video-media-toolbar-v2 { position: sticky; top: var(--topbar-height); z-index: var(--video-project-toolbar-layer); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-4); border-bottom: var(--border-width) solid var(--border-subtle); background: var(--bg-surface); }
.video-media-toolbar-v2 label { margin: 0; }
.video-media-selection-v2 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); padding: var(--space-2) var(--space-4); border-bottom: var(--border-width) solid var(--border-subtle); }
.video-media-selection-v2 .video-check-v2 { margin-right: auto; font-size: var(--fs-caption); color: var(--text-secondary); }
.video-media-search-v2 { flex: 1; min-width: min(100%, var(--video-media-card-width)); }
.video-media-view-v2 { display: flex; gap: var(--space-1); }
.video-media-view-v2 [aria-pressed="true"] { background: var(--color-primary-subtle); border-color: var(--color-primary); color: var(--color-primary-active); }
.video-media-list-v2 { display: grid; }
.video-media-row-v2 { display: grid; grid-template-columns: var(--space-5) var(--video-preview-width) minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: var(--border-width) solid var(--border-subtle); }
.video-media-row-v2:last-child { border-bottom: 0; }
.video-media-row-v2:hover { background: var(--bg-hover); }
.video-media-row-v2.is-selected { background: var(--color-primary-subtle); }
.video-media-checkbox-v2 { grid-column: 1; margin: 0; accent-color: var(--color-primary); width: var(--space-4); height: var(--space-4); }
.video-media-preview-v2 { display: grid; grid-column: 2; min-width: 0; }
.video-media-preview-v2 > * { grid-area: 1 / 1; }
.video-media-preview-v2 .video-stream-preview-v2 { width: 100%; }
.video-media-preview-v2 .video-stream-preview-v2:not([hidden]) + .video-media-placeholder-v2 { display: none; }
.video-media-placeholder-v2 { display: grid; place-items: center; aspect-ratio: var(--video-preview-aspect); background: var(--bg-canvas); border-radius: var(--radius-sm); color: var(--text-tertiary); }
.video-media-name-v2 { grid-column: 3; min-width: 0; }
.video-media-name-v2 h3 { font-size: var(--fs-body); margin: 0; font-weight: var(--fw-medium); overflow-wrap: anywhere; }
.video-media-metadata-v2 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-1); }
.video-media-duration-v2:empty { display: none; }
.video-media-row-v2 > .video-actions-v2 { grid-column: 4; flex-wrap: nowrap; gap: var(--space-1); }
.video-media-duration-v2, .video-media-size-v2 { font-size: var(--fs-caption); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.video-media-usage-v2 { margin-top: var(--space-1); font-size: var(--fs-caption); color: var(--text-secondary); }
.video-media-usage-v2 summary { cursor: pointer; }
.video-media-usage-v2 a { display: block; margin-top: var(--space-1); }
[data-project-media][data-view="grid"] .video-media-list-v2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--video-media-card-width)), 1fr)); gap: var(--space-4); padding: var(--space-4); }
[data-project-media][data-view="grid"] .video-media-row-v2 { grid-template-columns: var(--space-5) minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-lg); align-content: start; }
[data-project-media][data-view="grid"] .video-media-preview-v2 { grid-column: 1 / -1; grid-row: 1; }
[data-project-media][data-view="grid"] .video-media-name-v2 { grid-column: 1 / -1; grid-row: 2; }
[data-project-media][data-view="grid"] .video-media-checkbox-v2 { grid-column: 1; grid-row: 3; }
[data-project-media][data-view="grid"] .video-media-row-v2 > .video-actions-v2 { grid-column: 2; grid-row: 3; justify-content: flex-end; }
.video-preview-toolbar-v2 { display: flex; justify-content: space-between; gap: var(--space-3); }
.video-stream-modal-v2 [data-stream-message]:empty { display: none; }
@media (max-width: 767px) {
    .video-project-tabs-v2 { gap: var(--space-1); }
    .video-project-tabs-v2 a { gap: var(--space-1); padding-inline: var(--space-1); font-size: var(--fs-body); }
    .video-project-tabs-v2 a > span { padding-inline: var(--space-1); }
    .video-workspace-v2 .video-workflow-navigation-v2 { display: flex; flex-wrap: wrap; gap: var(--space-1); }
    .video-workspace-v2 .video-workflow-navigation-v2 .filter-chip-v2 { justify-content: flex-start; padding-inline: var(--space-2); white-space: normal; height: auto; min-height: var(--button-height-touch); }
    .video-project-tabs-v2 .video-unread-v2 { padding: 0; background: transparent; }
    .video-project-detail-v2 .video-project-row-v2 { flex-wrap: wrap; gap: var(--space-2); }
    .video-project-detail-v2 .video-project-row-v2 > .video-row-content-v2 { flex-basis: calc(100% - var(--button-height-md) - var(--space-2)); }
    .video-project-detail-v2 .video-project-row-v2 .video-row-summary-v2 { flex-basis: auto; margin-left: auto; }
    .video-media-toolbar-v2 { position: static; gap: var(--space-2); }
    .video-media-search-v2 { flex-basis: 100%; }
    .video-media-view-v2 { margin-left: auto; }
    .video-media-row-v2 { grid-template-columns: var(--space-5) var(--video-preview-width) minmax(0, 1fr); gap: var(--space-2); }
    .video-media-checkbox-v2 { grid-row: 1 / 3; }
    .video-media-preview-v2 { grid-row: 1 / 3; }
    .video-media-name-v2 { grid-row: 1; }
    .video-media-row-v2 > .video-actions-v2 { grid-column: 3; grid-row: 2; justify-content: flex-end; }
}
@media (max-width: 991px) {
    .video-layout-v2 { grid-template-columns: minmax(0, 1fr); }
    .video-deliverable-layout-v2 { grid-template-areas: 'brief' 'sources' 'cut' 'feedback' 'extras'; }
}
@media (max-width: 767px) {
    .video-list-row-v2 { gap: var(--space-3); padding: var(--space-4); flex-wrap: wrap; }
    [data-queue-project] .video-panel-toolbar-v2 > .video-actions-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    [data-queue-project] .video-actions-v2 .input-v2 { width: 100%; padding-left: var(--space-3); }
    [data-queue-project] .video-actions-v2 .btn-v2 { padding-left: var(--space-3); padding-right: var(--space-3); }
    .video-overview-v2 .video-queue-row-v2 { display: grid; grid-template-columns: var(--space-5) minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); }
    .video-queue-row-v2 > .video-deliverable-icon-v2 { align-self: start; padding-top: var(--space-1); }
    .video-queue-row-v2 > :is(.btn-v2, .video-priority-edit-v2, .video-publish-actions-v2) { grid-column: 2; justify-self: start; }
    .video-queue-row-v2 > .video-publish-actions-v2 { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: var(--space-2); }
    .video-publish-actions-v2 .btn-v2 { width: 100%; }
    .video-overview-v2 .video-project-row-v2 > .video-row-content-v2 { flex-basis: 100%; }
    .video-template-layout-v2 .d-title { flex-basis: 100%; }
    .video-handoff-actions-v2 { width: 100%; }
    .video-project-row-v2 .video-row-summary-v2 { flex-basis: 100%; display: flex; justify-content: space-between; align-items: center; }
    .video-project-row-v2 > .chev-right { display: none; }
    .video-row-content-v2 { flex-basis: calc(100% - var(--video-tile-size) - var(--space-3)); }
    .video-file-row-v2 .video-row-content-v2 { flex-basis: 0; }
    .video-file-row-v2 .video-actions-v2 { flex-basis: 100%; justify-content: flex-end; }
    .video-search-v2 { width: 100%; }
    .video-workspace-v2 .page-actions { flex-wrap: wrap; }
    .video-workspace-v2 .video-download-all-v2 { width: 100%; }
    .video-steps-v2 { gap: var(--space-2) var(--space-3); }
}

.check-in-error-notice {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: var(--space-6);
    background: var(--neutral-0);
    color: var(--color-error);
    font-size: var(--fs-display);
    font-weight: inherit;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--check-in-notice-transition), visibility var(--check-in-notice-transition);
}
.check-in-error-notice.is-visible {
    opacity: 1;
    visibility: visible;
}
.lesson-structure-preview {
    padding: var(--space-4);
    margin-top: var(--space-4);
    border: var(--border-width) solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    font-size: var(--fs-body);
}
.lesson-structure-blocks { list-style: none; padding: 0; margin: var(--space-4) 0; }
.lesson-structure-blocks li + li { margin-top: var(--space-3); }
.lesson-structure-blocks strong { font-weight: var(--fw-medium); }
.lesson-structure-blocks span { display: block; color: var(--text-secondary); font-size: var(--fs-sm); }
.lesson-structure-note { margin-bottom: 0; color: var(--text-secondary); font-size: var(--fs-sm); }
.weekly-topic-option { margin-top: var(--space-4); }
