/* Compatibility layer: Bootstrap-shaped utility shims and legacy aliases
   while Twig templates are migrated to semantic V3 classes.
   Delete rules here when template references reach zero.
*/

/* ===== Utility shim (replaces Bootstrap utilities used across templates) ===== */
body.v3 .d-none {
    display: none !important;
}
body.v3 .d-block {
    display: block !important;
}
body.v3 .d-flex {
    display: flex !important;
}
body.v3 .d-inline-flex {
    display: inline-flex !important;
}
body.v3 .d-grid {
    display: grid !important;
}
body.v3 .d-inline {
    display: inline !important;
}
body.v3 .d-inline-block {
    display: inline-block !important;
}
@media (min-width: 576px) {
    body.v3 .d-sm-inline-flex {
        display: inline-flex !important;
    }
}
@media (min-width: 768px) {
    body.v3 .d-md-none {
        display: none !important;
    }
    body.v3 .d-md-block {
        display: block !important;
    }
    body.v3 .d-md-flex {
        display: flex !important;
    }
    body.v3 .d-md-inline {
        display: inline !important;
    }
    body.v3 .d-md-inline-flex {
        display: inline-flex !important;
    }
}
@media (min-width: 992px) {
    body.v3 .d-lg-none {
        display: none !important;
    }
    body.v3 .d-lg-block {
        display: block !important;
    }
    body.v3 .d-lg-flex {
        display: flex !important;
    }
    body.v3 .d-lg-inline {
        display: inline !important;
    }
}
@media (max-width: 991.98px) {
    body.v3 .d-none.d-lg-block {
        display: none !important;
    }
}
body.v3 .app-responsive-desktop {
    display: none;
}
body.v3 .app-responsive-mobile {
    display: block;
}
@media (min-width: 992px) {
    body.v3 .app-responsive-desktop {
        display: block;
    }
    body.v3 .app-responsive-mobile {
        display: none;
    }
}

body.v3 .flex-column {
    flex-direction: column !important;
}
body.v3 .flex-row {
    flex-direction: row !important;
}
body.v3 .flex-wrap {
    flex-wrap: wrap !important;
}
body.v3 .flex-nowrap {
    flex-wrap: nowrap !important;
}
body.v3 .flex-grow-1 {
    flex-grow: 1 !important;
}
body.v3 .flex-shrink-0 {
    flex-shrink: 0 !important;
}
body.v3 .flex-fill {
    flex: 1 1 auto !important;
}
body.v3 .align-items-start {
    align-items: flex-start !important;
}
body.v3 .align-items-center {
    align-items: center !important;
}
body.v3 .align-items-end {
    align-items: flex-end !important;
}
body.v3 .justify-content-between {
    justify-content: space-between !important;
}
body.v3 .justify-content-center {
    justify-content: center !important;
}
body.v3 .justify-content-end {
    justify-content: flex-end !important;
}
body.v3 .justify-content-start {
    justify-content: flex-start !important;
}

body.v3 .gap-1 {
    gap: 4px !important;
}
body.v3 .gap-2 {
    gap: 8px !important;
}
body.v3 .gap-3 {
    gap: 12px !important;
}
body.v3 .gap-4 {
    gap: 16px !important;
}
body.v3 .gap-5 {
    gap: 20px !important;
}
body.v3 .row-gap-2 {
    row-gap: 8px !important;
}

body.v3 .m-0 {
    margin: 0 !important;
}
body.v3 .mb-0 {
    margin-bottom: 0 !important;
}
body.v3 .mb-1 {
    margin-bottom: 4px !important;
}
body.v3 .mb-2 {
    margin-bottom: 8px !important;
}
body.v3 .mb-3 {
    margin-bottom: 12px !important;
}
body.v3 .mb-4 {
    margin-bottom: 16px !important;
}
body.v3 .mb-5 {
    margin-bottom: 24px !important;
}
body.v3 .mt-0 {
    margin-top: 0 !important;
}
body.v3 .mt-1 {
    margin-top: 4px !important;
}
body.v3 .mt-2 {
    margin-top: 8px !important;
}
body.v3 .mt-3 {
    margin-top: 12px !important;
}
body.v3 .mt-4 {
    margin-top: 16px !important;
}
body.v3 .ms-0 {
    margin-left: 0 !important;
}
body.v3 .ms-1 {
    margin-left: 4px !important;
}
body.v3 .ms-2 {
    margin-left: 8px !important;
}
body.v3 .ms-3 {
    margin-left: 12px !important;
}
body.v3 .ms-auto {
    margin-left: auto !important;
}
body.v3 .me-0 {
    margin-right: 0 !important;
}
body.v3 .me-1 {
    margin-right: 4px !important;
}
body.v3 .me-2 {
    margin-right: 8px !important;
}
body.v3 .me-3 {
    margin-right: 12px !important;
}
body.v3 .me-auto {
    margin-right: auto !important;
}
body.v3 .mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

body.v3 .p-0 {
    padding: 0 !important;
}
body.v3 .p-2 {
    padding: 8px !important;
}
body.v3 .p-3 {
    padding: 12px !important;
}
body.v3 .p-4 {
    padding: 16px !important;
}
body.v3 .pb-0 {
    padding-bottom: 0 !important;
}
body.v3 .pb-2 {
    padding-bottom: 8px !important;
}
body.v3 .pb-3 {
    padding-bottom: 12px !important;
}
body.v3 .pt-2 {
    padding-top: 8px !important;
}
body.v3 .pt-3 {
    padding-top: 12px !important;
}
body.v3 .pt-4 {
    padding-top: 16px !important;
}
body.v3 .px-2 {
    padding-left: 8px !important;
    padding-right: 8px !important;
}
body.v3 .px-3 {
    padding-left: 12px !important;
    padding-right: 12px !important;
}
body.v3 .px-4 {
    padding-left: 16px !important;
    padding-right: 16px !important;
}
body.v3 .py-2 {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
body.v3 .py-3 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
body.v3 .py-4 {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

body.v3 .w-100 {
    width: 100% !important;
}
body.v3 .min-w-0 {
    min-width: 0 !important;
}
body.v3 .h-100 {
    height: 100% !important;
}
body.v3 .min-vh-100 {
    min-height: 100vh !important;
}
body.v3 .overflow-hidden {
    overflow: hidden !important;
}
body.v3 .overflow-auto {
    overflow: auto !important;
}
body.v3 .overflow-x-auto {
    overflow-x: auto !important;
}

body.v3 .text-center {
    text-align: center !important;
}
body.v3 .text-end {
    text-align: right !important;
}
body.v3 .text-start {
    text-align: left !important;
}
body.v3 .text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.v3 .text-nowrap {
    white-space: nowrap !important;
}
body.v3 .text-wrap {
    white-space: normal !important;
}
body.v3 .text-break {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

body.v3 .fw-bold {
    font-weight: 700 !important;
}
body.v3 .fw-600 {
    font-weight: 600 !important;
}
body.v3 .fw-500 {
    font-weight: 500 !important;
}
body.v3 .fw-normal {
    font-weight: 400 !important;
}
body.v3 .fst-italic {
    font-style: italic !important;
}
body.v3 .small {
    font-size: 12px !important;
}
body.v3 .fs-5 {
    font-size: 20px !important;
}
body.v3 .fs-6 {
    font-size: 16px !important;
}

body.v3 .text-muted {
    color: var(--fg-4) !important;
}
body.v3 .text-secondary {
    color: var(--fg-3) !important;
}
body.v3 .text-primary {
    color: var(--accent) !important;
}
body.v3 .text-success {
    color: var(--success) !important;
}
body.v3 .text-warning {
    color: var(--warn) !important;
}
body.v3 .text-danger {
    color: var(--danger) !important;
}
body.v3 .text-info {
    color: var(--info) !important;
}

body.v3 .border-top {
    border-top: 1px solid var(--border) !important;
}
body.v3 .border-bottom {
    border-bottom: 1px solid var(--border) !important;
}
body.v3 .border {
    border: 1px solid var(--border) !important;
}
body.v3 .border-0 {
    border: 0 !important;
}
body.v3 .rounded {
    border-radius: 8px !important;
}
body.v3 .rounded-3 {
    border-radius: 12px !important;
}
body.v3 .rounded-4 {
    border-radius: 16px !important;
}
body.v3 .rounded-circle {
    border-radius: 50% !important;
}

body.v3 .position-relative {
    position: relative !important;
}
body.v3 .position-absolute {
    position: absolute !important;
}
body.v3 .position-fixed {
    position: fixed !important;
}
body.v3 .top-0 {
    top: 0 !important;
}
body.v3 .start-0 {
    left: 0 !important;
}

body.v3 .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
body.v3 .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Grid */
body.v3 .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
}
body.v3 .row.g-2 > * {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 8px;
}
body.v3 .row.g-3 > * {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 12px;
}
body.v3 .row.g-4 > * {
    padding-left: 16px;
    padding-right: 16px;
    margin-bottom: 16px;
}
body.v3 .col {
    flex: 1 0 0%;
    min-width: 0;
}
body.v3 .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}
body.v3 .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}
body.v3 .col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}
body.v3 .col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}
body.v3 .col-auto {
    flex: 0 0 auto;
    width: auto;
}
@media (min-width: 768px) {
    body.v3 .col-md-auto {
        flex: 0 0 auto;
        width: auto;
    }
    body.v3 .col-md {
        flex: 1 0 0%;
        min-width: 0;
    }
    body.v3 .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    body.v3 .col-md-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    body.v3 .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}
@media (min-width: 992px) {
    body.v3 .col-lg {
        flex: 1 0 0%;
        min-width: 0;
    }
    body.v3 .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    body.v3 .col-lg-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    body.v3 .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Container */
body.v3 .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
body.v3 .container-fluid {
    width: 100%;
    padding: 0 16px;
}

/* Legacy alias classes for old BS table wrappers */
body.v3 .app-table-wrap {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
body.v3 .app-table-wrap > .table-responsive {
    margin-bottom: 0;
}
body.v3 .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
body.v3 table.app-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-2);
    font-size: var(--t-body);
}
body.v3 table.app-table thead {
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border-bottom: 1px solid var(--border-2);
}
body.v3 table.app-table thead th {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-3);
    padding: 12px 16px;
    white-space: nowrap;
    border: none;
    vertical-align: middle;
}
body.v3 table.app-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
    height: var(--d-row-h);
}
body.v3 table.app-table tbody tr:last-child {
    border-bottom: 0;
}
body.v3 table.app-table tbody tr:hover {
    background: var(--bg-3);
}
body.v3 table.app-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}
body.v3 table.app-table tbody td {
    font-size: 13.5px;
    color: var(--fg);
    padding: var(--d-pad-cell);
    vertical-align: middle;
    border: none;
}
body.v3 table.app-table tbody td:has(.card-thumb-zoom) {
    overflow: visible;
}
body.v3 table.app-table tbody tr:has(.card-thumb-zoom.is-preview-active) {
    position: relative;
    z-index: 220;
}
body.v3 table.app-table tbody td:has(.card-thumb-zoom.is-preview-active) {
    position: relative;
    z-index: 2;
}
body.v3 table.app-table tr[data-drawer-url] {
    cursor: pointer;
}
body.v3 table.app-table tbody tr .app-row-actions {
    opacity: 0;
    transition: opacity 0.15s;
}
body.v3 table.app-table tbody tr:hover .app-row-actions {
    opacity: 1;
}
@media (hover: none) {
    body.v3 table.app-table tbody tr .app-row-actions,
    body.v3 .app-row-actions {
        opacity: 1;
    }
}
body.v3 .app-table--fixed {
    table-layout: fixed !important;
}

/* Legacy badge classes for templates not yet updated */
body.v3 .app-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
body.v3 .app-badge--dot::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    flex-shrink: 0;
}
body.v3 .app-badge--success {
    color: var(--success);
    background: var(--success-soft);
    border: 1px solid rgba(74, 222, 128, 0.3);
}
body.v3 .app-badge--warning {
    color: var(--warn);
    background: var(--warn-soft);
    border: 1px solid rgba(251, 191, 36, 0.3);
}
body.v3 .app-badge--danger {
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid rgba(251, 113, 133, 0.3);
}
body.v3 .app-badge--info {
    color: var(--info);
    background: var(--info-soft);
    border: 1px solid rgba(96, 165, 250, 0.3);
}
body.v3 .app-badge--neutral {
    color: var(--fg-3);
    background: var(--bg-3);
    border: 1px solid var(--border-2);
}
body.v3 .app-badge--accent {
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}

/* Legacy button classes */
body.v3 .btn-app-primary {
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.12s;
}
body.v3 .btn-app-primary:hover,
body.v3 .btn-app-primary:focus-visible {
    background: var(--accent-2);
    color: var(--bg);
    text-decoration: none;
}
body.v3 .btn-app-ghost {
    background: transparent;
    color: var(--fg-2);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.12s;
}
body.v3 .btn-app-ghost:hover,
body.v3 .btn-app-ghost:focus-visible {
    background: var(--bg-3);
    color: var(--fg);
    border-color: var(--border-strong);
    text-decoration: none;
}
body.v3 .btn-app-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(251, 113, 133, 0.3);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.12s;
}
body.v3 .btn-app-danger:hover {
    background: rgba(251, 113, 133, 0.2);
    color: var(--danger);
    text-decoration: none;
}
body.v3 .app-btn--compact {
    font-size: 0.8rem;
    padding: 6px 12px;
}
body.v3 .btn-app-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--fg-4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
    text-decoration: none;
}
body.v3 .btn-app-icon:hover {
    background: var(--bg-3);
    color: var(--fg);
}
body.v3 .dash-widget__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}
body.v3 .dash-widget__drag-handle {
    cursor: grab;
}

/* Legacy surface/card/page classes */
body.v3 .app-surface {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}
body.v3 .app-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
body.v3 .app-card:has([data-controller="select-autocomplete"]) {
    overflow: visible;
    position: relative;
    z-index: 3;
}
body.v3 .app-card-header {
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
body.v3 .app-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--fg);
    margin: 0;
}
body.v3 .app-card-body {
    padding: 20px;
}
body.v3 .app-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
body.v3 .app-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg);
    margin: 0;
    line-height: 1.2;
}
body.v3 .app-page-subtitle {
    font-size: 12px;
    color: var(--fg-4);
    margin: 4px 0 0;
}
body.v3 .app-stat-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
}
body.v3 .app-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body.v3 .app-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fg);
    line-height: 1;
}
body.v3 .app-stat-label {
    font-size: 12px;
    color: var(--fg-4);
    margin-top: 4px;
}
body.v3 .app-empty-state {
    text-align: center;
    padding: 64px 0;
    color: var(--fg-4);
}
body.v3 .app-filter-panel {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
body.v3 .app-filter-panel__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--fg);
}

/* Advanced filter panel (V3) */
body.v3 .adv-filter-panel {
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: 18px 20px 16px;
}
body.v3 .adv-filter-panel__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
body.v3 .adv-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 16px;
    align-items: end;
}
body.v3 .adv-filter-field {
}
body.v3 .adv-filter-field--wide {
    grid-column: span 2;
}
body.v3 .adv-filter-panel__foot {
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}
@media (max-width: 991.98px) {
    body.v3 .adv-filter-grid {
        grid-template-columns: 1fr 1fr;
    }
    body.v3 .adv-filter-field--wide {
        grid-column: span 2;
    }
}
@media (max-width: 576px) {
    body.v3 .adv-filter-grid {
        grid-template-columns: 1fr;
    }
    body.v3 .adv-filter-field--wide {
        grid-column: span 1;
    }
}

/* Alerts legacy */
/* [hidden] must override display:flex on .alert — otherwise empty alert rows stay visible */
body.v3 .alert[hidden],
body.v3 .dashboard-home-inline-feedback[hidden],
body.v3 .requests-list-inline-feedback[hidden],
body.v3 .dashboard-quick-fulfill-error[hidden],
body.v3 .request-list-quick-mutation-error[hidden] {
    display: none !important;
}
body.v3 .alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    border: 1px solid transparent;
}
body.v3 .alert-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.3);
}
body.v3 .alert-danger,
body.v3 .alert-error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.3);
}
body.v3 .alert-warning {
    background: var(--warn-soft);
    color: var(--warn);
    border-color: rgba(251, 191, 36, 0.3);
}
body.v3 .alert-info {
    background: var(--info-soft);
    color: var(--info);
    border-color: rgba(96, 165, 250, 0.3);
}
body.v3 .alert-light {
    background: var(--bg-3);
    border-color: var(--border-strong) !important;
    color: var(--fg);
}
body.v3 .alert-dismissible {
    position: relative;
}
body.v3 .btn-close {
    background: transparent;
    border: none;
    color: currentColor;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
    display: inline-flex;
    align-items: center;
}
body.v3 .btn-close:hover {
    opacity: 1;
}

/* Pagination legacy */
body.v3 .pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}
body.v3 .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-2);
    background: var(--bg-3);
    color: var(--fg-2);
    text-decoration: none;
    transition: all 0.12s;
}
body.v3 .page-link:hover {
    background: var(--bg-4);
    color: var(--fg);
    text-decoration: none;
}
body.v3 .page-item.active .page-link {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
body.v3 .page-item.disabled .page-link {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Breadcrumb */
body.v3 .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
    font-size: 12px;
    color: var(--fg-3);
}
body.v3 .breadcrumb-item a {
    color: var(--fg-3);
    text-decoration: none;
}
body.v3 .breadcrumb-item a:hover {
    color: var(--fg);
}
body.v3 .breadcrumb-item.active {
    color: var(--fg-4);
}
body.v3 .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--fg-4);
    padding-right: 4px;
}

/* Nav tabs */
body.v3 .nav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}
body.v3 .nav-tabs .nav-link {
    padding: 8px 14px;
    color: var(--fg-3);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 13.5px;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition:
        color 0.15s,
        border-color 0.15s;
}
body.v3 .nav-tabs .nav-link:hover {
    color: var(--fg);
    border-bottom-color: var(--border-strong);
}
body.v3 .nav-tabs .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Modal */
body.v3 .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
}
body.v3 .modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
body.v3 .modal.show,
body.v3 .modal.is-open {
    display: flex;
}
body.v3 .modal-dialog {
    width: 100%;
    max-width: 520px;
}
body.v3 .modal-content {
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    color: var(--fg);
}
body.v3 .modal-header {
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 14px 14px 0 0;
}
body.v3 .modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    margin: 0;
}
body.v3 .modal-body {
    padding: 20px;
}
body.v3 .modal-footer {
    background: var(--bg-3);
    border-top: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-radius: 0 0 14px 14px;
}

/* Dropdowns */
body.v3 .dropdown {
    position: relative;
}
body.v3 .dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 300;
    min-width: 160px;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 6px;
    display: none;
}
body.v3 .dropdown-menu.show {
    display: block;
}
body.v3 .dropdown-item {
    display: block;
    padding: 8px 10px;
    font-size: 13.5px;
    color: var(--fg-2);
    border-radius: 6px;
    text-decoration: none;
    transition:
        background 0.1s,
        color 0.1s;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}
body.v3 .dropdown-item:hover,
body.v3 .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--fg);
}
body.v3 .dropdown-item.active {
    background: var(--accent-soft);
    color: var(--accent);
}
body.v3 .dropdown-divider {
    border-top: 1px solid var(--border);
    margin: 4px 0;
}
body.v3 .is-open .dropdown-menu,
body.v3 [data-dropdown-open="true"] .dropdown-menu {
    display: block;
}
body.v3 .app-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    top: 100%;
    z-index: 300;
    min-width: 160px;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: none;
}
body.v3 .app-menu--end {
    right: 0;
}
body.v3 .is-open .app-menu,
body.v3 [data-dropdown-open="true"] .app-menu {
    display: block;
}
body.v3 .app-menu__item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    font-size: 13.5px;
    color: var(--fg-2);
    border-radius: 6px;
    text-decoration: none;
    transition:
        background 0.1s,
        color 0.1s;
    cursor: pointer;
    background: transparent;
    border: none;
    text-align: left;
}
body.v3 .app-menu__item:hover,
body.v3 .app-menu__item:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--fg);
    text-decoration: none;
}
body.v3 .app-request-actions__trigger {
    width: 2.75rem;
    height: 2.75rem;
}
body.v3 .app-request-actions__form,
body.v3 .app-request-actions__inline-form,
body.v3 .app-request-actions__whatsapp-wrap {
    display: inline-block;
}
body.v3 .app-request-actions-inline-grid {
    display: inline-grid;
    grid-template-columns: repeat(4, 2.5rem);
    align-items: center;
    justify-items: center;
    gap: 0;
}
body.v3 .app-request-actions__slot-placeholder {
    display: inline-block;
    width: 2.25rem;
    height: 2.25rem;
    pointer-events: none;
    visibility: hidden;
}
body.v3 .app-request-actions__menu-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}
body.v3 .app-request-actions__menu-item--disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    opacity: 0.55;
    cursor: not-allowed;
}
body.v3 .app-request-actions__disabled-icon {
    opacity: 0.3;
}
body.v3 .app-request-actions__whatsapp-btn {
    color: var(--success);
}
body.v3 .btn-app-icon[data-request-action-tone="success"] {
    color: var(--success);
}
body.v3 .btn-app-icon[data-request-action-tone="accent"] {
    color: var(--accent);
}

/* List group */
body.v3 .list-group {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
body.v3 .list-group-item {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    color: var(--fg);
    padding: 10px 14px;
    font-size: 13.5px;
}
body.v3 .list-group-item:last-child {
    border-bottom: 0;
}
body.v3 .list-group-item:hover {
    background: var(--bg-3);
}
body.v3 .list-group-item-action {
    cursor: pointer;
    text-decoration: none;
    display: block;
}
body.v3 .list-group-flush {
    border: 0;
    border-radius: 0;
}
body.v3 .list-group-flush .list-group-item {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
}

/* Input group */
body.v3 .input-group {
    display: flex;
    align-items: stretch;
}
body.v3 .input-group > .form-control {
    flex: 1;
    border-radius: 0;
}
body.v3 .input-group > .form-control:first-child {
    border-radius: 8px 0 0 8px;
}
body.v3 .input-group > .form-control:last-child {
    border-radius: 0 8px 8px 0;
}
body.v3 .input-group > .btn,
body.v3 .input-group > button {
    border-radius: 0 8px 8px 0;
}
body.v3 .input-group-text {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-right: none;
    color: var(--fg-3);
    padding: 0 12px;
    display: flex;
    align-items: center;
}
body.v3 .input-group .input-group-text + .form-control {
    border-left: 0;
    border-radius: 0;
}

/* Form utils */
body.v3 .form-switch .form-check-input,
body.v3 .form-switch .app-form-check-input,
body.v3 .app-form-switch .form-check-input,
body.v3 .app-form-switch .app-form-check-input {
    width: 36px;
    height: 18px;
    cursor: pointer;
    position: relative;
    appearance: none;
    background: var(--bg-4);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    transition: background 0.12s;
}
body.v3 .form-switch .form-check-input:checked,
body.v3 .form-switch .app-form-check-input:checked,
body.v3 .app-form-switch .form-check-input:checked,
body.v3 .app-form-switch .app-form-check-input:checked {
    background: var(--accent);
    border-color: var(--accent);
}
body.v3 .form-switch .form-check-input::after,
body.v3 .form-switch .app-form-check-input::after,
body.v3 .app-form-switch .form-check-input::after,
body.v3 .app-form-switch .app-form-check-input::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.12s;
}
body.v3 .form-switch .form-check-input:checked::after,
body.v3 .form-switch .app-form-check-input:checked::after,
body.v3 .app-form-switch .form-check-input:checked::after,
body.v3 .app-form-switch .app-form-check-input:checked::after {
    left: 19px;
}
body.v3 .form-check,
body.v3 .app-form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}
body.v3 .form-text,
body.v3 .app-form-help {
    font-size: 11.5px;
    color: var(--fg-4);
    margin-top: 4px;
    display: block;
}
body.v3 select.form-select,
body.v3 select.app-form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    appearance: none;
    cursor: pointer;
}

/* Misc legacy */
body.v3 .text-body {
    color: var(--fg) !important;
}
body.v3 .text-body-secondary {
    color: var(--fg-2) !important;
}
body.v3 .bg-light {
    background: var(--bg-3) !important;
}
body.v3 .bg-white {
    background: var(--bg-2) !important;
}
body.v3 .shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
body.v3 .card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}
body.v3 .card-header {
    background: var(--bg-3) !important;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    color: var(--fg) !important;
}
body.v3 .card-body {
    padding: 20px;
    color: var(--fg);
}
body.v3 .card .text-muted {
    color: var(--fg-4) !important;
}
body.v3 .card .text-secondary {
    color: var(--fg-3) !important;
}
body.v3 hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}
body.v3 .spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.2em solid var(--border-2);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
body.v3 a {
    color: var(--accent);
}
body.v3 a:hover {
    color: var(--accent-2);
}
body.v3 p {
    margin: 0 0 10px;
}
body.v3 h1,
body.v3 h2,
body.v3 h3,
body.v3 h4,
body.v3 h5,
body.v3 h6 {
    color: var(--fg);
}

/* App-specific legacy wrappers */
body.v3 .app-request-spec {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    line-height: 1.15;
    font-size: 11px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--fg-2);
}
body.v3 .app-request-spec__qty {
    font-weight: 800;
    color: var(--fg);
}
body.v3 .app-request-spec__lang {
    font-weight: 600;
    color: var(--fg-2);
}
body.v3 .app-request-spec__cond {
    font-weight: 500;
    color: var(--fg-3);
}
body.v3 .app-request-spec__tag {
    color: var(--fg-3);
    background: var(--bg-4);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.1rem 0.35rem;
}
body.v3 .app-request-list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 6px;
    font-size: 0.92rem;
    line-height: 1;
    flex-shrink: 0;
}
body.v3 .app-icon-tile-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}
body.v3 .app-fulfillment-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-4);
    overflow: hidden;
}
body.v3 .app-fulfillment-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    transition: width 0.3s;
}
body.v3 .app-pipeline {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}
body.v3 .app-pipeline-step {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    background: var(--bg-3);
    color: var(--fg-4);
    border: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.v3 .app-pipeline-step.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent-line);
}
body.v3 .app-pipeline-step.done {
    background: var(--success-soft);
    color: var(--success);
    border-color: transparent;
}
body.v3 .app-drawer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--fg-4);
    flex-direction: column;
    gap: 12px;
}
body.v3 .app-drawer-section {
    margin-bottom: 20px;
}
body.v3 .app-drawer-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-4);
    margin-bottom: 10px;
}
body.v3 .app-drawer-section--edit {
    container-type: inline-size;
    container-name: request-show-form;
}
body.v3 .app-drawer-section--edit .app-qty-line__row--show-meta {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
body.v3 .app-drawer-section--edit .app-qty-line__field--paid .app-qty-line__label--paid-align {
    display: none;
}
body.v3 .app-drawer-section--edit .app-qty-line__field--paid .app-qty-line__label--paid-section {
    display: block;
}
body.v3 .app-drawer-status-badge {
    width: 100%;
    justify-content: center;
    padding: 6px 0;
    border-radius: 8px;
    margin-bottom: 8px;
}
body.v3 .app-drawer-section--pipeline {
    padding: 16px 20px 0;
}
body.v3 .app-drawer-section--metrics,
body.v3 .app-drawer-section--prices,
body.v3 .app-drawer-section--customer {
    padding: 0 20px;
    margin-top: 16px;
}
body.v3 .app-drawer-section--edit {
    padding: 0 20px;
    margin-top: 20px;
}
body.v3 .app-drawer-alert {
    margin-bottom: 12px;
}
body.v3 .app-drawer-field-value--metric {
    font-size: 1.1rem;
}
body.v3 .app-drawer-field-value--meta {
    font-size: 0.8rem;
    color: var(--fg-3);
}
body.v3 .app-drawer-field-value--success {
    color: var(--success);
}
body.v3 .app-drawer-field-value--warning {
    color: var(--warn);
}
body.v3 .app-drawer-panel {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
}
body.v3 .app-drawer-panel--fulfillment,
body.v3 .app-drawer-panel--prices {
    padding: 12px;
}
body.v3 .app-drawer-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
body.v3 .app-drawer-metric-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}
body.v3 .app-drawer-metric-cell__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-4);
}
body.v3 .app-drawer-metric-cell__value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}
body.v3 .app-drawer-metric-cell__value--meta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fg-2);
}
body.v3 .app-drawer-metric-cell__value--success {
    color: var(--success);
}
body.v3 .app-drawer-metric-cell__value--warning {
    color: var(--warn);
}
body.v3 .app-drawer-fulfillment-progress {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
body.v3 .app-drawer-fulfillment-progress__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
body.v3 .app-drawer-fulfillment-progress__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-4);
}
body.v3 .app-drawer-fulfillment-progress__pct {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--fg-2);
}
body.v3 .app-drawer-lines {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
body.v3 .app-drawer-lines__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
body.v3 .app-drawer-lines__title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-4);
}
body.v3 .app-drawer-lines__count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fg-3);
    font-variant-numeric: tabular-nums;
}
body.v3 .app-drawer-lines__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
body.v3 .app-drawer-line-card {
    background: var(--bg-4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}
body.v3 .app-drawer-line-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
}
body.v3 .app-drawer-line-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fg);
    line-height: 1.3;
    min-width: 0;
}
body.v3 .app-drawer-line-card__specs {
    flex: 1 1 auto;
    min-width: 0;
}
body.v3 .app-drawer-line-card__fulfillment {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
body.v3 .app-drawer-line-card__fulfillment-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-4);
}
body.v3 .app-drawer-line-card__fulfillment--done {
    color: var(--success);
}
body.v3 .app-drawer-line-card__fulfillment--partial {
    color: var(--warn);
}
body.v3 .app-request-line-spec {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.35;
}
body.v3 .app-mobile-card__main .app-request-line-spec {
    margin-top: 4px;
}
body.v3 .app-request-line-spec__item {
    white-space: nowrap;
}
body.v3 .app-request-line-spec__item--condition {
    color: var(--fg-2);
    font-weight: 500;
}
body.v3 .app-request-line-spec__item--foil {
    color: var(--warn);
    font-weight: 600;
}
body.v3 .app-request-line-spec__item--altered {
    color: var(--accent);
    font-weight: 600;
}
body.v3 .app-request-line-spec__item--signed {
    color: var(--info);
    font-weight: 600;
}
body.v3 .app-drawer-panel--customer {
    padding: 0;
    overflow: hidden;
}
body.v3 .app-drawer-customer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}
body.v3 .app-drawer-customer-card:hover {
    background: var(--bg-4);
    text-decoration: none;
    color: inherit;
}
body.v3 .app-drawer-customer-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
body.v3 .app-drawer-customer-card__avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-4);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
body.v3 .app-drawer-customer-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
body.v3 .app-drawer-customer-card__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--fg);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.v3 .app-drawer-customer-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--fg-3);
    line-height: 1.3;
    min-width: 0;
}
body.v3 .app-drawer-customer-card__meta svg {
    flex-shrink: 0;
    color: var(--fg-4);
}
body.v3 .app-drawer-customer-card__meta-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.v3 .app-drawer-customer-card__action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}
body.v3 .app-drawer-customer-card:hover .app-drawer-customer-card__action {
    color: var(--accent-2);
}
body.v3 .app-drawer-metadata-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
body.v3 .app-drawer-action-btn {
    flex: 1;
    min-width: 8rem;
    justify-content: center;
}
body.v3 .app-drawer-action-btn--success {
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.35);
}
body.v3 .app-drawer-links {
    padding: 16px 20px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
body.v3 .app-drawer-link-btn {
    flex: 1;
    justify-content: center;
}
body.v3 .app-drawer-link-btn--success {
    color: var(--success);
}

/* Staff user create/edit: email, password, status on one row */
body.v3 .staff-user-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
}
body.v3 .staff-user-form-row__field {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}
body.v3 .staff-user-form-row__email {
    flex: 1.4 1 14rem;
}
body.v3 .staff-user-form-row__password {
    flex: 1.6 1 16rem;
}
body.v3 .staff-user-form-row__status {
    flex: 0 0 auto;
    min-width: 7.5rem;
}
body.v3 .staff-user-form-row__status .app-form-switch {
    margin: 0;
    padding: 0;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}
body.v3 .staff-user-form-row__help {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--fg-3);
}
body.v3 .staff-user-form-row .form-label {
    margin-bottom: 6px;
}
body.v3 .staff-user-form-row .invalid-feedback {
    margin-top: 4px;
}

body.v3 .app-drawer-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
body.v3 .app-drawer-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.v3 .app-drawer-field-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fg-4);
}
body.v3 .app-drawer-field-value {
    font-size: 13.5px;
    color: var(--fg);
    font-weight: 500;
}
body.v3 .app-drawer-card-img {
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-3);
    display: inline-block;
}
body.v3 .app-drawer-card-img img {
    display: block;
    width: 100%;
    height: auto;
}
body.v3 .app-drawer-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-3);
    flex-wrap: wrap;
    flex-shrink: 0;
}
body.v3 .app-select-autocomplete {
    position: relative;
    width: 100%;
}
body.v3 .app-select-autocomplete .app-form-control {
    width: 100%;
}
body.v3 .app-select-autocomplete-menu {
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin-top: 4px;
    max-height: min(40vh, 320px);
    overflow-y: auto;
    position: absolute;
    width: 100%;
    z-index: 500;
}

/* Autocomplete dropdown items (select_autocomplete_controller) */
body.v3 .app-ac-item {
    display: block;
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--fg-2);
    cursor: pointer;
    background: transparent;
    border: none;
    text-align: left;
    transition:
        background 0.1s,
        color 0.1s;
}
body.v3 .app-ac-item:hover {
    background: var(--bg-4);
    color: var(--fg);
}
body.v3 .app-ac-item--empty {
    color: var(--fg-4);
    cursor: default;
}
body.v3 .app-ac-item--empty:hover {
    background: transparent;
    color: var(--fg-4);
}

body.v3 .app-subtle-link {
    color: var(--fg-3);
    text-decoration: none;
    transition: color 0.12s;
}
body.v3 .app-subtle-link:hover {
    color: var(--fg);
    text-decoration: none;
}

body.v3 .app-request-layout {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}
body.v3 .app-request-layout__main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
body.v3 .app-request-step {
    overflow: visible;
}
body.v3 .app-request-step__header {
    gap: 14px;
}
body.v3 .app-request-step__badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
body.v3 .app-request-step__intro {
    min-width: 0;
}
body.v3 .app-request-step__sub {
    font-size: 12px;
    color: var(--fg-4);
    margin: 2px 0 0;
}
body.v3 .app-request-step__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
body.v3 .app-request-panel-divider {
    border-top: 1px solid var(--border);
}
body.v3 .app-request-customer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
}
body.v3 .app-request-customer-grid__field {
    min-width: 0;
}
body.v3 .app-request-customer-grid__action {
    white-space: nowrap;
}
@media (max-width: 575px) {
    body.v3 .app-request-customer-grid {
        grid-template-columns: 1fr;
    }
}

body.v3 .app-request-search__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
body.v3 .app-request-search__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}
body.v3 .app-request-search__hint {
    font-size: 12px;
    color: var(--fg-3);
    margin: 0;
}
body.v3 .app-request-search__grid {
    display: grid;
    grid-template-columns: minmax(10rem, auto) minmax(0, 1fr);
    gap: 10px 12px;
    align-items: end;
}
body.v3 .app-request-search__grid--stacked {
    grid-template-columns: minmax(9rem, auto) minmax(0, 1fr);
}
body.v3 .app-request-search__field {
    min-width: 0;
}
body.v3 .app-request-search__locale-select {
    width: 100%;
    min-width: 7rem;
}
body.v3 .app-request-search__results {
    margin: 8px 0 0;
    position: relative;
    z-index: 10;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-3);
}
@media (max-width: 767px) {
    body.v3 .app-request-search__grid,
    body.v3 .app-request-search__grid--stacked {
        grid-template-columns: 1fr;
    }
}

/* Request options (quick new card request) */
body.v3 .app-request-options__toolbar {
    margin-bottom: 16px;
}
body.v3 .app-request-options__title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-3);
    display: flex;
    align-items: center;
    gap: 8px;
}
body.v3 .app-request-options__hint {
    font-size: 12px;
    color: var(--fg-4);
    margin: 6px 0 0;
    max-width: 36rem;
    line-height: 1.45;
}
body.v3 .app-request-options__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}
body.v3 .app-request-options__panel--binding {
    grid-column: 1 / -1;
}
@media (max-width: 767px) {
    body.v3 .app-request-options__grid {
        grid-template-columns: 1fr;
    }
}
body.v3 .app-request-options__panel {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 0;
}
body.v3 .app-request-options__label {
    margin-bottom: 10px;
}

body.v3 .app-segment {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 575px) {
    body.v3 .app-segment {
        grid-template-columns: 1fr;
    }
}
body.v3 .app-segment__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-4);
    cursor: pointer;
    transition:
        border-color 0.12s,
        background 0.12s,
        box-shadow 0.12s;
    min-width: 0;
}
body.v3 .app-segment__option:has(.app-segment__input:checked) {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent-line);
}
body.v3 .app-segment__option:has(.app-segment__input:focus-visible) {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
body.v3 .app-segment__icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    color: var(--fg-3);
}
body.v3
    .app-segment__option:has(.app-segment__input:checked)
    .app-segment__icon {
    color: var(--accent);
    border-color: var(--accent-line);
    background: rgba(124, 106, 247, 0.12);
}
body.v3 .app-segment__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
body.v3 .app-segment__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
    line-height: 1.25;
}
body.v3 .app-segment__desc {
    font-size: 11px;
    color: var(--fg-4);
    line-height: 1.35;
}
body.v3
    .app-segment__option:has(.app-segment__input:checked)
    .app-segment__desc {
    color: var(--fg-3);
}

body.v3 .app-priority-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
@media (max-width: 575px) {
    body.v3 .app-priority-chips {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
body.v3 .app-priority-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-4);
    cursor: pointer;
    transition:
        border-color 0.12s,
        background 0.12s,
        color 0.12s;
}
body.v3 .app-priority-chip__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-3);
    text-align: center;
    line-height: 1.2;
}
body.v3 .app-priority-chip:has(.app-priority-chip__input:checked) {
    border-color: var(--accent-line);
    background: var(--accent-soft);
}
body.v3
    .app-priority-chip:has(.app-priority-chip__input:checked)
    .app-priority-chip__label {
    color: var(--fg);
}
body.v3 .app-priority-chip:has(.app-priority-chip__input:focus-visible) {
    box-shadow: 0 0 0 3px var(--accent-soft);
}
body.v3 .app-priority-chip--urgent:has(.app-priority-chip__input:checked) {
    border-color: rgba(251, 113, 133, 0.45);
    background: var(--danger-soft);
}
body.v3
    .app-priority-chip--urgent:has(.app-priority-chip__input:checked)
    .app-priority-chip__label {
    color: var(--danger);
}
body.v3 .app-priority-chip--high:has(.app-priority-chip__input:checked) {
    border-color: rgba(245, 158, 11, 0.45);
    background: var(--warn-soft);
}
body.v3
    .app-priority-chip--high:has(.app-priority-chip__input:checked)
    .app-priority-chip__label {
    color: var(--warn);
}
body.v3 .app-priority-chip--low:has(.app-priority-chip__input:checked) {
    border-color: var(--border-strong);
    background: var(--bg-input);
}
body.v3
    .app-priority-chip--low:has(.app-priority-chip__input:checked)
    .app-priority-chip__label {
    color: var(--fg-2);
}

body.v3 .app-paid-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    cursor: pointer;
    margin: 0;
}
body.v3 .app-paid-toggle__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-4);
    border: 1px solid var(--border-strong);
    color: var(--fg-3);
}
body.v3
    .app-request-options__panel--paid:has(.app-form-check-input:checked)
    .app-paid-toggle__icon {
    color: var(--success);
    border-color: rgba(45, 212, 160, 0.35);
    background: var(--success-soft);
}
body.v3 .app-paid-toggle__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.v3 .app-paid-toggle__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}
body.v3 .app-paid-toggle__hint {
    font-size: 11px;
    color: var(--fg-4);
    line-height: 1.35;
}
body.v3 .app-paid-toggle__switch {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
body.v3 .app-paid-toggle__switch .app-form-check-input {
    margin: 0;
}

/* Quantity breakdown (quick new card request) */
body.v3 .app-qty-breakdown__toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 16px;
}
body.v3 .app-qty-breakdown__title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-3);
    display: flex;
    align-items: center;
    gap: 8px;
}
body.v3 .app-qty-breakdown__hint {
    font-size: 12px;
    color: var(--fg-4);
    margin: 6px 0 0;
    max-width: 36rem;
    line-height: 1.45;
}
body.v3 .app-qty-breakdown__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
body.v3 .app-qty-breakdown__total {
    font-size: 11px;
    min-height: 28px;
    min-width: 7rem;
    justify-content: center;
}
body.v3 .app-qty-breakdown__add {
    font-size: 12px;
    padding: 6px 12px;
}
body.v3 .app-qty-breakdown__lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.v3 .app-qty-line {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}
body.v3 .app-qty-line__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
body.v3 .app-qty-line__badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    padding: 4px 10px;
}
body.v3 .app-qty-line__remove {
    color: var(--fg-4);
    border: 1px solid var(--border);
    margin-left: auto;
}
body.v3 .app-qty-line__remove:hover {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.35);
    background: var(--danger-soft);
}
body.v3 .app-qty-line__remove:disabled {
    opacity: 0.35;
    pointer-events: none;
}

body.v3 .app-qty-stepper {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    background: var(--bg-input);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
body.v3 .app-qty-stepper__btn {
    width: 36px;
    border: none;
    background: var(--bg-4);
    color: var(--fg-2);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.12s,
        color 0.12s;
}
body.v3 .app-qty-stepper__btn:hover {
    background: var(--bg-3);
    color: var(--fg);
}
body.v3 .app-qty-stepper__field {
    min-width: 3.25rem;
}
body.v3 .app-qty-stepper__input {
    width: 100%;
    min-width: 3.25rem;
    text-align: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 8px 6px;
    font-weight: 700;
    font-size: 14px;
    -moz-appearance: textfield;
}
body.v3 .app-qty-stepper__input::-webkit-outer-spin-button,
body.v3 .app-qty-stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
body.v3 .app-qty-stepper__input:focus {
    box-shadow: none;
    border-color: transparent;
}

body.v3 .app-qty-line__row {
    display: grid;
    grid-template-columns: minmax(7.6rem, auto) minmax(10rem, 1.35fr) minmax(
            8.5rem,
            1fr
        ) minmax(11rem, 1.15fr);
    gap: 12px 14px;
    align-items: start;
}
body.v3 .app-qty-line__field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
body.v3 .app-qty-line__label,
body.v3 .app-qty-line__field > .app-form-label {
    margin-bottom: 8px;
    display: block;
}
body.v3 .app-qty-line__control {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
}
@media (max-width: 767px) {
    body.v3 .app-qty-line__row {
        grid-template-columns: minmax(7.6rem, auto) 1fr;
        grid-template-areas:
            "copies languages"
            "condition finishes";
    }
    body.v3 .app-qty-line__field--copies {
        grid-area: copies;
    }
    body.v3 .app-qty-line__field--languages {
        grid-area: languages;
    }
    body.v3 .app-qty-line__field--condition {
        grid-area: condition;
    }
    body.v3 .app-qty-line__field--finishes {
        grid-area: finishes;
    }
}
@media (max-width: 575px) {
    body.v3 .app-qty-line__row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copies"
            "languages"
            "condition"
            "finishes";
    }
}
body.v3 .app-qty-line__field .mb-3 {
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
}
body.v3 .app-qty-line__field--languages {
    position: relative;
}
body.v3 .app-qty-line__field--languages > .app-qty-line__label {
    width: 100%;
}

/* Multi-select with tags (multi_select_tags_controller) */
body.v3 .app-ms-tags {
    position: relative;
    width: 100%;
}
body.v3 .app-ms-tags--open {
    z-index: 1;
}
body.v3 .app-qty-line__field--languages:has(.app-ms-tags--open) {
    z-index: 30;
}
body.v3 .app-qty-line:has(.app-ms-tags--open) {
    position: relative;
    z-index: 25;
    overflow: visible;
}
body.v3 .app-qty-breakdown__lines:has(.app-ms-tags--open) {
    overflow: visible;
}
body.v3 .app-card-body.app-qty-breakdown:has(.app-ms-tags--open) {
    position: relative;
    z-index: 50;
    overflow: visible;
}
body.v3 .app-card:has(.app-ms-tags--open) {
    overflow: visible;
}
body.v3 .app-ms-tags__control {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 34px 5px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    cursor: text;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
body.v3 .app-ms-tags__control:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
body.v3 .app-ms-tags__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
body.v3 .app-ms-tags__chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    padding: 2px 4px 2px 8px;
    border-radius: 6px;
    background: var(--bg-4);
    border: 1px solid var(--border-strong);
    font-size: 12px;
    font-weight: 500;
    color: var(--fg);
    line-height: 1.3;
}
body.v3 .app-ms-tags__chip-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.v3 .app-ms-tags__chip-remove {
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--fg-4);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body.v3 .app-ms-tags__chip-remove:hover {
    background: var(--bg-3);
    color: var(--fg);
}
body.v3 .app-ms-tags__input {
    flex: 1 1 5rem;
    min-width: 5rem;
    width: auto;
    border: none;
    background: transparent;
    padding: 4px 2px;
    font-size: 13px;
    color: var(--fg);
    outline: none;
    box-shadow: none;
}
body.v3 .app-ms-tags__input::placeholder {
    color: var(--fg-4);
}
body.v3 .app-ms-tags__toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--fg-4);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.v3 .app-ms-tags__toggle:hover {
    background: var(--bg-4);
    color: var(--fg-2);
}
body.v3 .app-ms-tags__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 11rem;
    overflow-y: auto;
    z-index: 1;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
body.v3 .app-ms-tags__menu[hidden] {
    display: none;
}
body.v3 .app-ms-tags__option {
    display: block;
    width: 100%;
    padding: 9px 14px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    text-align: left;
    font-size: 13px;
    color: var(--fg-2);
    cursor: pointer;
    transition:
        background 0.1s,
        color 0.1s;
}
body.v3 .app-ms-tags__option:last-child {
    border-bottom: none;
}
body.v3 .app-ms-tags__option:hover {
    background: var(--bg-4);
    color: var(--fg);
}
body.v3 .app-ms-tags__option--empty {
    color: var(--fg-4);
    cursor: default;
}
body.v3 .app-ms-tags__option--empty:hover {
    background: transparent;
    color: var(--fg-4);
}
body.v3 .app-qty-line__field--finishes .app-finish-toggles {
    min-height: 38px;
    align-items: flex-end;
}
body.v3 .app-finish-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
body.v3 .app-finish-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 3.25rem;
}
body.v3 .app-finish-toggle__switch {
    padding-left: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.v3 .app-finish-toggle__switch .app-form-check-input {
    flex-shrink: 0;
    position: static;
    width: 2.5em;
    height: 1.35em;
    margin: 0;
    cursor: pointer;
    background-color: var(--bg-4);
    border: 1px solid var(--border-strong);
    border-radius: 2em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23888'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: calc(1.35em - 2px);
    transition:
        background-position 0.15s ease-in-out,
        background-color 0.15s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
}
body.v3 .app-finish-toggle__switch .app-form-check-input::before,
body.v3 .app-finish-toggle__switch .app-form-check-input::after {
    display: none !important;
    content: none !important;
}
body.v3 .app-finish-toggle__switch .app-form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-position: right center;
}
body.v3 .app-finish-toggle__switch .app-form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
body.v3 .app-finish-toggle__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fg-3);
    text-align: center;
    line-height: 1.3;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}
body.v3
    .app-finish-toggle:has(.app-form-check-input:checked)
    .app-finish-toggle__label {
    color: var(--fg);
}

/* Scryfall picker result items (scryfall_picker_controller) */
body.v3 .app-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--fg-2);
    cursor: pointer;
    transition:
        background 0.1s,
        color 0.1s;
    border-bottom: 1px solid var(--border);
}
body.v3 .app-picker-item:last-child {
    border-bottom: none;
}
body.v3 .app-picker-item:hover {
    background: var(--bg-4);
    color: var(--fg);
}
body.v3 .app-picker-item--state {
    cursor: default;
    color: var(--fg-3);
}
body.v3 .app-picker-item--state:hover {
    background: transparent;
    color: var(--fg-3);
}
body.v3 .app-picker-item--loading::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 50%;
    border: 2px solid var(--border-2);
    border-top-color: var(--accent);
    animation: spin 0.7s linear infinite;
}
body.v3 .app-picker-item--error,
body.v3 .app-picker-item--timeout,
body.v3 .app-picker-item--rate-limited {
    color: var(--warn);
}
body.v3 .app-picker-item--error:hover,
body.v3 .app-picker-item--timeout:hover,
body.v3 .app-picker-item--rate-limited:hover {
    color: var(--warn);
}
body.v3 .app-picker-item__thumb {
    width: 34px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    background: var(--bg-4);
}
body.v3 .app-picker-item__text {
    flex: 1;
    min-width: 0;
}
body.v3 .app-scryfall-picked {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    min-width: 0;
}
body.v3 .app-scryfall-picked--has-card {
    color: var(--fg-2);
}
body.v3 .app-scryfall-picked__zoom {
    --d-thumb: 34px;
    --d-thumb-h: 48px;
    flex-shrink: 0;
}
body.v3 .app-scryfall-picked__zoom:hover,
body.v3 .app-scryfall-picked__zoom.is-preview-active {
    z-index: 50;
}
body.v3 .app-scryfall-picked__text {
    font-size: 13px;
    line-height: 1.45;
    min-width: 0;
}
body.v3 .app-card-body:has(.app-scryfall-picked__zoom) {
    overflow: visible;
}
body.v3 .app-card:has(.app-scryfall-picked__zoom.is-preview-active) {
    overflow: visible;
}
body.v3 .app-main {
    flex: 1;
    min-width: 0;
}
body.v3 .vstack {
    display: flex;
    flex-direction: column;
}
body.v3 .hstack {
    display: flex;
    flex-direction: row;
    align-items: center;
}
body.v3 .list-unstyled {
    list-style: none;
    padding: 0;
    margin: 0;
}
body.v3 .list-inline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
body.v3 .list-inline-item {
    display: inline;
}
body.v3 .fw-semibold {
    font-weight: 600 !important;
}
body.v3 .text-body {
    color: var(--fg) !important;
}
body.v3 .text-body-secondary {
    color: var(--fg-2) !important;
}
body.v3 .font-monospace {
    font-family:
        ui-monospace, "Cascadia Code", "Source Code Pro", monospace !important;
}
body.v3 .dash-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
    text-decoration: none;
    color: var(--fg);
}
body.v3 .dash-row:last-child {
    border-bottom: none;
}
body.v3 .dash-row:hover {
    background: var(--bg-3);
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 6px;
    text-decoration: none;
}
body.v3 .table-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
    user-select: none;
}
body.v3 .table-sort-link:hover {
    color: var(--fg-2);
}
body.v3 .table-sort-icons {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    gap: 2px;
}
body.v3 .table-sort-icons .tri {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.35;
}
body.v3 .table-sort-icons .tri.up {
    border-bottom: 6px solid var(--fg-3);
}
body.v3 .table-sort-icons .tri.down {
    border-top: 6px solid var(--fg-3);
}
body.v3 th.sort-asc .table-sort-icons .tri.up,
body.v3 th.sort-desc .table-sort-icons .tri.down {
    opacity: 1;
    border-bottom-color: var(--accent);
    border-top-color: var(--accent);
}

