/* ============================================================
   POLIKA PLATFORM — PRODUCT MANAGEMENT UI ENGINE
   Design System: ui-craft-minimal (Linear / Vercel Aesthetic)
   Craft Level: 8 | Motion: 3 | Density: 2 | Hairline Geometry
   ============================================================ */

:root {
    --pm-canvas: #09090b;
    --pm-surface: #121214;
    --pm-surface-elevated: #18181b;
    --pm-surface-subtle: #1c1c20;
    --pm-border: rgba(255, 255, 255, 0.08);
    --pm-border-hover: rgba(255, 255, 255, 0.16);
    --pm-border-focus: rgba(255, 255, 255, 0.35);
    --pm-text-primary: #f4f4f5;
    --pm-text-secondary: #a1a1aa;
    --pm-text-muted: #71717a;
    --pm-accent: #ffffff;
    --pm-accent-fg: #09090b;
    --pm-radius-sm: 6px;
    --pm-radius-md: 8px;
    --pm-radius-lg: 14px;
    --pm-radius-sheet: 20px;
    --pm-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --pm-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ============================================================
   1. COMMAND HEADER
   ============================================================ */
.products-command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--pm-border);
    gap: 1rem;
}

.products-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-header-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--pm-radius-sm);
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    color: var(--pm-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.products-main-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--pm-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.products-count-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pm-text-muted);
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    padding: 2px 7px;
    border-radius: 12px;
}

.products-header-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.82rem;
    color: var(--pm-text-muted);
    line-height: 1.4;
}

.products-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* View Mode Switcher (Tablet & Mobile only) */
.products-view-switcher {
    display: none;
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    padding: 2px;
    gap: 2px;
}

.btn-view-toggle {
    background: transparent;
    border: none;
    color: var(--pm-text-muted);
    padding: 6px 10px;
    min-height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-view-toggle:hover {
    color: var(--pm-text-primary);
}

.btn-view-toggle.active {
    background: var(--pm-surface-elevated);
    color: var(--pm-text-primary);
    border: 1px solid var(--pm-border-hover);
}

/* Primary Action Button */
.btn-add-product {
    background: var(--pm-accent) !important;
    color: var(--pm-accent-fg) !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    border: none !important;
    border-radius: var(--pm-radius-sm) !important;
    padding: 0 14px !important;
    min-height: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: opacity 0.15s ease !important;
    box-shadow: none !important;
}

.btn-add-product:hover {
    opacity: 0.92;
    transform: none !important;
}

/* Desktop: enforce Table Only */
@media (min-width: 1025px) {
    .products-view-switcher {
        display: none !important;
    }
    .products-table-wrapper {
        display: block !important;
    }
    .products-cards-wrapper {
        display: none !important;
    }
}

/* Tablet & Mobile: allow switcher */
@media (max-width: 1024px) {
    .products-view-switcher {
        display: inline-flex !important;
    }
}

/* ============================================================
   2. REFINED METRICS STRIP (4-CARD KPI HUB)
   ============================================================ */
.products-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

.pm-metric-card {
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: border-color 0.15s ease;
}

.pm-metric-card:hover {
    border-color: var(--pm-border-hover);
}

.pm-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pm-metric-label {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pm-text-muted);
}

.pm-metric-icon {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: var(--pm-surface-elevated);
    color: var(--pm-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.pm-metric-value {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--pm-text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pm-metric-subtext {
    font-size: 0.74rem;
    color: var(--pm-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   3. MINIMAL FILTER & SEARCH TOOLBAR
   ============================================================ */
.products-filter-bar {
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    padding: 12px 14px;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.products-filter-main-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-search-box {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.products-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pm-text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.products-search-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    padding: 8px 32px 8px 34px;
    font-size: 0.85rem;
    color: var(--pm-text-primary);
    min-height: 38px;
    transition: border-color 0.15s ease;
}

.products-search-input:focus {
    outline: none;
    border-color: var(--pm-border-focus);
}

.products-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--pm-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    display: none;
    padding: 4px;
}

.btn-filter-drawer-toggle {
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    color: var(--pm-text-secondary);
    padding: 0 12px;
    min-height: 38px;
    height: 38px;
    border-radius: var(--pm-radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-filter-drawer-toggle:hover {
    color: var(--pm-text-primary);
    border-color: var(--pm-border-hover);
}

.btn-filter-drawer-toggle.active {
    background: var(--pm-surface-subtle);
    border-color: var(--pm-border-hover);
    color: var(--pm-text-primary);
}

.filter-active-count-badge {
    background: var(--pm-accent);
    color: var(--pm-accent-fg);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 10px;
}

/* Filter Chips Row */
.products-chips-row {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.products-chips-row::-webkit-scrollbar {
    display: none;
}

.pm-chip {
    background: transparent;
    border: 1px solid var(--pm-border);
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--pm-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.15s ease;
    user-select: none;
}

.pm-chip:hover {
    color: var(--pm-text-primary);
    border-color: var(--pm-border-hover);
}

.pm-chip.active {
    background: var(--pm-surface-elevated);
    border-color: var(--pm-border-focus);
    color: var(--pm-text-primary);
    font-weight: 500;
}

.pm-chip .chip-count {
    font-size: 0.68rem;
    opacity: 0.7;
}

/* Collapsible Filter Tray */
.products-filter-tray {
    display: none;
    border-top: 1px solid var(--pm-border);
    padding-top: 10px;
    margin-top: 2px;
}

.products-filter-tray.is-open {
    display: block;
}

.filter-tray-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.products-select-control {
    width: 100%;
    box-sizing: border-box;
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    padding: 8px 10px;
    font-size: 0.82rem;
    color: var(--pm-text-primary);
    min-height: 38px;
    cursor: pointer;
}

.products-select-control:focus {
    outline: none;
    border-color: var(--pm-border-focus);
}

.btn-filter-reset {
    background: transparent;
    border: 1px solid var(--pm-border);
    color: var(--pm-text-muted);
    padding: 0 12px;
    min-height: 38px;
    border-radius: var(--pm-radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-filter-reset:hover {
    color: var(--pm-text-primary);
    border-color: var(--pm-border-hover);
}

/* ============================================================
   4. DATA TABLE (DESKTOP)
   ============================================================ */
.products-table-wrapper {
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.products-modern-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--pm-text-primary);
}

.products-modern-table th {
    background: var(--pm-surface);
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pm-text-muted);
    border-bottom: 1px solid var(--pm-border);
    white-space: nowrap;
    text-align: left;
}

.products-modern-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--pm-border);
    font-size: 0.84rem;
    vertical-align: middle;
}

.products-modern-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.products-modern-table tr:last-child td {
    border-bottom: none;
}

.pm-thumb-container {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    cursor: pointer;
}

.pm-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pm-product-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pm-product-title {
    font-weight: 500;
    color: var(--pm-text-primary);
    line-height: 1.3;
}

.pm-author-badge {
    font-size: 0.72rem;
    color: var(--pm-text-muted);
}

.pm-copy-code {
    font-family: var(--pm-font-mono);
    font-size: 0.75rem;
    background: var(--pm-surface-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--pm-border);
    color: var(--pm-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.pm-copy-code:hover {
    border-color: var(--pm-border-hover);
    color: var(--pm-text-primary);
}

.pm-price-val {
    font-weight: 500;
    color: var(--pm-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Minimal Status & Stock Dots */
.pm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
}

.pm-status-approved { color: #34d399; }
.pm-status-pending { color: #60a5fa; }
.pm-status-revision { color: #fbbf24; }
.pm-status-rejected { color: #f87171; }

.pm-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.pm-stock-healthy { color: #34d399; }
.pm-stock-low { color: #fbbf24; }
.pm-stock-out { color: #f87171; }

.pm-table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pm-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--pm-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pm-action-btn:hover {
    color: var(--pm-text-primary);
    background: var(--pm-surface-elevated);
    border-color: var(--pm-border);
}

/* Switch Component (Minimalist) */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--pm-surface-subtle);
    border: 1px solid var(--pm-border);
    transition: .18s;
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--pm-text-muted);
    transition: .18s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #27272a;
    border-color: rgba(255, 255, 255, 0.25);
}

input:checked + .slider:before {
    transform: translateX(14px);
    background-color: #ffffff;
}

/* ============================================================
   5. MOBILE COMPACT PRODUCT CARD & SLIDE RAIL
   ============================================================ */
.products-cards-wrapper {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.products-cards-wrapper.active,
.products-cards-wrapper.force-show {
    display: grid !important;
}

.pm-swipe-card-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: var(--ui-surface, #ffffff);
    border: 1px solid var(--ui-border, var(--pm-border));
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pm-swipe-card-wrapper:hover {
    border-color: var(--ui-border-strong, var(--pm-border-hover));
}

/* Action Rail: Fixed Behind the Front Card */
.pm-swipe-action-rail {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 220px;
    display: flex;
    align-items: stretch;
    z-index: 1;
    background: var(--ui-surface-subtle, #f1f5f9);
}

.pm-rail-btn {
    flex: 1 1 0;
    border: none;
    background: var(--pm-surface-elevated);
    border-left: 1px solid var(--pm-border);
    color: var(--pm-text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
    text-decoration: none;
    font-family: inherit;
}

.pm-rail-btn:hover, .pm-rail-btn:active {
    background: var(--pm-surface-subtle);
    color: var(--pm-text-primary);
}

.pm-rail-btn i {
    font-size: 1rem;
}

/* Distinct subtle tones for rail buttons */
.rail-btn-view { color: #93c5fd; }
.rail-btn-edit { color: #e4e4e7; }
.rail-btn-barcode { color: #c4b5fd; }
.rail-btn-approve { color: #86efac; }
.rail-btn-delete { color: #fca5a5; }

/* Front Card Surface */
.pm-swipe-card-front {
    position: relative;
    z-index: 2;
    background: var(--pm-surface);
    border-radius: var(--pm-radius-md);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: pan-y;
}

.pm-swipe-card-front.is-open {
    transform: translateX(-220px);
}

.pm-card-compact-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
    min-height: 56px;
}

.pm-card-mini-thumb {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    cursor: pointer;
    flex-shrink: 0;
}

.pm-card-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pm-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--pm-surface);
}

.pm-status-dot.approved { background: #34d399; }
.pm-status-dot.pending { background: #60a5fa; }
.pm-status-dot.revision { background: #fbbf24; }
.pm-status-dot.rejected { background: #f87171; }

.pm-card-main-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: default;
}

.pm-card-top-line {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.pm-card-compact-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--pm-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.pm-card-price-stock-line {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    color: var(--pm-text-muted);
}

.pm-card-price-tag {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pm-text-primary);
    font-variant-numeric: tabular-nums;
}

.pm-bullet-sep {
    color: var(--pm-border);
    font-size: 0.6rem;
}

.pm-compact-stock {
    font-size: 0.72rem;
    font-weight: 400;
}

.pm-compact-stock.healthy { color: #34d399; }
.pm-compact-stock.low { color: #fbbf24; }
.pm-compact-stock.out { color: #f87171; }

.pm-card-category-tag {
    color: var(--pm-text-muted);
    font-size: 0.72rem;
}

.pm-card-right-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pm-compact-switch {
    transform: scale(0.75);
    transform-origin: right center;
}

/* Accordion Drawer */
.pm-card-expanded-drawer {
    display: none;
    border-top: 1px solid var(--pm-border);
    background: var(--pm-surface-elevated);
}

.pm-drawer-inner {
    padding: 10px 14px 12px 14px;
}

.pm-drawer-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.pm-drawer-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-label {
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pm-text-muted);
}

.drawer-val {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--pm-text-primary);
}

.drawer-val.text-accent {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Expand Bar Button at Bottom */
.btn-card-expand-bar {
    width: 100%;
    background: transparent;
    border: none;
    border-top: 1px solid var(--pm-border);
    color: var(--pm-text-muted);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: inherit;
    border-radius: 0 0 var(--pm-radius-md) var(--pm-radius-md);
}

.btn-card-expand-bar:hover {
    color: var(--pm-text-primary);
}

.btn-card-expand-bar.is-expanded {
    color: var(--pm-text-primary);
}

.btn-card-expand-bar i {
    font-size: 0.65rem;
    transition: transform 0.18s ease;
}

.btn-card-expand-bar.is-expanded i {
    transform: rotate(180deg);
}

/* ============================================================
   6. PAGINATION
   ============================================================ */
.products-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-md);
    margin-bottom: 2rem;
    gap: 12px;
}

.pm-pagination-info {
    font-size: 0.8rem;
    color: var(--pm-text-muted);
}

.pm-pagination-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pm-btn-page {
    background: var(--pm-surface-elevated);
    border: 1px solid var(--pm-border);
    color: var(--pm-text-secondary);
    padding: 6px 12px;
    border-radius: var(--pm-radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.pm-btn-page:hover:not(:disabled) {
    color: var(--pm-text-primary);
    border-color: var(--pm-border-hover);
}

.pm-btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pm-page-badge {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pm-text-primary);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   7. MOBILE BOTTOM-SHEET MODALS & SLIDE-DOWN DISMISS
   ============================================================ */
/* ==========================================================================
   POLIKA PLATFORM: UNIFIED TOP-TIER MODALS & BOTTOM SHEET DRAWERS (LINEAR MINIMAL)
   ========================================================================== */

/* Universal Modal Overlay */
.modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 9999 !important;
    box-sizing: border-box !important;
}

.bottom-sheet-handle {
    display: none;
}

/* ==========================================================================
   DESKTOP MODAL LAYOUT (> 1024px)
   ========================================================================== */
@media (min-width: 1025px) {
    .modal {
        display: none;
        align-items: center !important;
        justify-content: center !important;
        padding: 24px !important;
    }

    .modal[style*="display: flex"],
    .modal.show,
    .modal.open {
        display: flex !important;
    }

    #product-modal .product-modal-dialog {
        width: 980px !important;
        max-width: 95vw !important;
        height: 86vh !important;
        max-height: 86vh !important;
        margin: auto !important;
        background: var(--pm-surface) !important;
        border: 1px solid var(--pm-border) !important;
        border-radius: var(--pm-radius-lg) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
    }

    #product-details-modal .details-fullscreen-dialog {
        width: 1160px !important;
        max-width: 96vw !important;
        height: 88vh !important;
        max-height: 88vh !important;
        margin: auto !important;
        background: var(--pm-surface) !important;
        border: 1px solid var(--pm-border) !important;
        border-radius: var(--pm-radius-lg) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
    }

    #barcode-view-modal .barcode-modal-dialog {
        width: 440px !important;
        max-width: 95vw !important;
        margin: auto !important;
        background: var(--pm-surface) !important;
        border: 1px solid var(--pm-border) !important;
        border-radius: var(--pm-radius-lg) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    }

    #revision-modal .revision-modal-dialog {
        width: 520px !important;
        max-width: 95vw !important;
        margin: auto !important;
        background: var(--pm-surface) !important;
        border: 1px solid var(--pm-border) !important;
        border-radius: var(--pm-radius-lg) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    }

    /* Desktop close buttons */
    .product-modal-close-btn,
    .details-close-btn,
    .sheet-close-btn,
    .modal .close-modal {
        width: 32px !important;
        height: 32px !important;
        border-radius: var(--pm-radius-sm) !important;
        background: transparent !important;
        border: 1px solid transparent !important;
        color: var(--pm-text-muted) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 1.25rem !important;
        line-height: 1 !important;
        transition: all 0.15s ease !important;
    }

    .product-modal-close-btn:hover,
    .details-close-btn:hover,
    .sheet-close-btn:hover,
    .modal .close-modal:hover {
        background: var(--pm-surface-hover) !important;
        color: var(--pm-text-primary) !important;
        border-color: var(--pm-border) !important;
    }
}

/* ==========================================================================
   MOBILE & TABLET BOTTOM SHEET DRAWERS (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .modal {
        display: none;
        align-items: flex-end !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .modal[style*="display: flex"],
    .modal.show,
    .modal.open {
        display: flex !important;
    }

    .bottom-sheet-handle {
        display: block !important;
        width: 38px !important;
        height: 4px !important;
        border-radius: 2px !important;
        background: rgba(255, 255, 255, 0.22) !important;
        margin: 10px auto 4px auto !important;
        flex-shrink: 0 !important;
        cursor: grab !important;
    }

    /* All bottom sheet containers become clean slide-up drawers */
    #product-modal .product-modal-dialog,
    #product-details-modal .details-fullscreen-dialog {
        width: 100% !important;
        max-width: 100% !important;
        height: 92vh !important;
        height: 92dvh !important;
        max-height: 92dvh !important;
        margin: 0 !important;
        border-radius: var(--pm-radius-sheet) var(--pm-radius-sheet) 0 0 !important;
        background: var(--pm-surface) !important;
        border: 1px solid var(--pm-border) !important;
        border-bottom: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.75) !important;
        touch-action: pan-y;
        animation: pmSheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    #barcode-view-modal .barcode-modal-dialog,
    #revision-modal .revision-modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 85vh !important;
        max-height: 85dvh !important;
        margin: 0 !important;
        border-radius: var(--pm-radius-sheet) var(--pm-radius-sheet) 0 0 !important;
        background: var(--pm-surface) !important;
        border: 1px solid var(--pm-border) !important;
        border-bottom: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.75) !important;
        touch-action: pan-y;
        animation: pmSheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Suppress (X) close buttons on mobile / tablet drawers - swipe down or backdrop dismisses */
    #product-modal .product-modal-close-btn,
    #product-modal .close-modal,
    #product-details-modal .details-close-btn,
    #product-details-modal .close-modal,
    #barcode-view-modal .close-modal,
    #barcode-view-modal .sheet-close-btn,
    #revision-modal .close-modal {
        display: none !important;
    }

    /* Responsive grid collapses */
    .products-metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .filter-tray-grid {
        grid-template-columns: 1fr !important;
    }

    .products-command-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

@keyframes pmSheetSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ==========================================================================
   1. PRODUCT ADD / EDIT MODAL & DRAWER SYSTEM
   ========================================================================== */

/* Pinned Header (Never Scrolls) */
#product-modal .product-modal-header {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 20px 12px 20px !important;
    background: var(--pm-surface) !important;
    border-bottom: 1px solid var(--pm-border) !important;
    margin: 0 !important;
}

#product-modal .product-modal-header-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#product-modal .header-icon-badge {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--pm-radius-sm) !important;
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    color: var(--pm-text-secondary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
}

#product-modal-title {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: var(--pm-text-primary) !important;
    letter-spacing: -0.01em !important;
}

/* Pinned Horizontal Segmented Tabs Bar */
#product-modal .product-modal-tabs {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    margin: 12px 20px 0 20px !important;
    padding: 3px !important;
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-md) !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: none !important;
}

#product-modal .product-modal-tabs::-webkit-scrollbar {
    display: none !important;
}

#product-modal .product-tab-btn {
    flex: 0 0 auto !important;
    min-width: auto !important;
    min-height: 34px !important;
    padding: 6px 12px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--pm-radius-sm) !important;
    color: var(--pm-text-muted) !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
}

#product-modal .product-tab-btn i {
    font-size: 0.85rem !important;
    transform: none !important;
}

#product-modal .product-tab-btn:hover {
    color: var(--pm-text-primary) !important;
    background: var(--pm-surface-hover) !important;
}

#product-modal .product-tab-btn.active {
    background: #27272a !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

#product-modal .product-tab-btn.active i {
    color: #ffffff !important;
    transform: none !important;
}

/* Form Flex Container (Takes Remainder of Dialog) */
#product-modal #add-product-form {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tab Panes (Only the Active Pane Scrolls) */
#product-modal .product-tab-pane {
    display: none !important;
}

#product-modal .product-tab-pane.active {
    display: block !important;
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    min-height: 0 !important;
    padding: 16px 20px 24px 20px !important;
}

#product-modal .product-tab-pane.active::-webkit-scrollbar {
    width: 4px !important;
}

#product-modal .product-tab-pane.active::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 2px !important;
}

/* Form Inputs, Labels & Grids */
#product-modal .form-field-group,
#product-modal .form-group {
    margin-bottom: 14px !important;
}

#product-modal label {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    color: var(--pm-text-secondary) !important;
    margin-bottom: 6px !important;
}

#product-modal label .label-hint {
    font-size: 0.72rem !important;
    color: var(--pm-text-muted) !important;
    font-weight: 400 !important;
}

#product-modal .form-control,
#product-modal input[type="text"],
#product-modal input[type="number"],
#product-modal select,
#product-modal textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-sm) !important;
    color: var(--pm-text-primary) !important;
    font-size: 0.9rem !important;
    padding: 10px 12px !important;
    min-height: 42px !important;
    line-height: 1.4 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

#product-modal textarea.form-control {
    min-height: 70px !important;
}

#product-modal input:focus,
#product-modal select:focus,
#product-modal textarea:focus {
    outline: none !important;
    border-color: var(--pm-border-focus) !important;
    box-shadow: 0 0 0 1px var(--pm-border-focus) !important;
}

/* Price Input Prefix Isolation (Fixes Overlapping Bug) */
#product-modal .input-with-prefix {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

#product-modal .input-prefix-badge {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--pm-text-secondary) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    pointer-events: none !important;
    z-index: 3 !important;
}

#product-modal .input-with-prefix .form-control,
#product-modal .input-with-prefix input[type="number"] {
    padding-left: 48px !important;
}

/* Action Input Group (SKU & Barcode Generators) */
#product-modal .input-action-group {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

#product-modal .input-action-group .form-control {
    flex: 1 !important;
}

#product-modal .btn-input-action {
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-sm) !important;
    color: var(--pm-text-primary) !important;
    padding: 0 12px !important;
    min-height: 42px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
}

#product-modal .btn-input-action:hover {
    background: var(--pm-surface-hover) !important;
}

/* Dropzones & Media Containers */
#product-modal .product-image-dropzone,
#product-modal .print-file-batch-dropzone {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px dashed var(--pm-border) !important;
    border-radius: var(--pm-radius-md) !important;
    padding: 20px 14px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

#product-modal .product-image-dropzone:hover,
#product-modal .print-file-batch-dropzone:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

#product-modal .dropzone-icon i {
    font-size: 1.5rem !important;
    color: var(--pm-text-muted) !important;
    margin-bottom: 6px !important;
}

#product-modal .dropzone-title {
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    color: var(--pm-text-primary) !important;
}

#product-modal .dropzone-subtitle {
    font-size: 0.72rem !important;
    color: var(--pm-text-muted) !important;
    margin-top: 4px !important;
}

/* Pinned Footer Action Bar (Never Scrolls) */
#product-modal .product-modal-footer {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 12px 20px max(14px, env(safe-area-inset-bottom)) 20px !important;
    background: var(--pm-surface) !important;
    border-top: 1px solid var(--pm-border) !important;
    margin: 0 !important;
    z-index: 50 !important;
}

#product-modal .product-modal-footer .footer-left-actions,
#product-modal .product-modal-footer .footer-right-actions {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

#product-modal .product-modal-footer .footer-left-actions {
    flex: 1 !important;
}

#product-modal .product-modal-footer .footer-right-actions {
    flex: 2 !important;
    justify-content: flex-end !important;
}

#product-modal .btn-form-cancel {
    width: 100% !important;
    min-height: 42px !important;
    background: transparent !important;
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-sm) !important;
    color: var(--pm-text-secondary) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

#product-modal .btn-form-cancel:hover {
    color: var(--pm-text-primary) !important;
    background: var(--pm-surface-hover) !important;
}

#product-modal .btn-form-save {
    width: 100% !important;
    min-height: 42px !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: var(--pm-radius-sm) !important;
    color: #000000 !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.15s ease !important;
}

#product-modal .btn-form-save:hover {
    opacity: 0.9 !important;
}

/* Navigation step button */
.btn-step-nav {
    background: transparent !important;
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-sm) !important;
    color: var(--pm-text-secondary) !important;
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
}

.btn-step-nav:hover {
    color: var(--pm-text-primary) !important;
    background: var(--pm-surface-hover) !important;
}

/* ==========================================================================
   2. PRODUCT DETAILS MODAL (FULLSCREEN & BOTTOM SHEET)
   ========================================================================== */

#product-details-modal .details-modal-header {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 20px 12px 20px !important;
    background: var(--pm-surface) !important;
    border-bottom: 1px solid var(--pm-border) !important;
    margin: 0 !important;
}

#product-details-modal .details-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

#product-details-modal .details-header-badge-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--pm-radius-sm) !important;
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    color: var(--pm-text-secondary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
}

#product-details-modal .details-header-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#product-details-modal .details-header-title-row h3 {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: var(--pm-text-primary) !important;
}

#product-details-modal .details-header-subtitle {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 4px !important;
}

#product-details-modal .details-meta-pill {
    font-size: 0.72rem !important;
    color: var(--pm-text-muted) !important;
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* Scrollable Details Body */
#product-details-modal .details-grid-container {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    min-height: 0 !important;
    padding: 16px 20px 24px 20px !important;
}

@media (min-width: 1025px) {
    #product-details-modal .details-grid-container {
        display: grid !important;
        grid-template-columns: 360px 1fr !important;
        gap: 20px !important;
    }
}

@media (max-width: 1024px) {
    #product-details-modal .details-grid-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
    }
}

#product-details-modal .details-hero-image-card {
    border-radius: var(--pm-radius-md) !important;
    border: 1px solid var(--pm-border) !important;
    overflow: hidden !important;
    background: #000000 !important;
    max-height: 280px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#product-details-modal .details-hero-image-card img {
    max-width: 100% !important;
    max-height: 280px !important;
    object-fit: contain !important;
}

#product-details-modal .details-info-section-card,
#product-details-modal .details-file-section-panel {
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-md) !important;
    padding: 14px 16px !important;
    margin-top: 12px !important;
}

#product-details-modal .details-modal-footer {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 12px 20px max(14px, env(safe-area-inset-bottom)) 20px !important;
    background: var(--pm-surface) !important;
    border-top: 1px solid var(--pm-border) !important;
    margin: 0 !important;
}

#product-details-modal .details-footer-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

#product-details-modal .btn-action-approve {
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    padding: 8px 16px !important;
    min-height: 40px !important;
    border-radius: var(--pm-radius-sm) !important;
    cursor: pointer !important;
}

#product-details-modal .btn-action-revision,
#product-details-modal .btn-action-reject {
    background: transparent !important;
    border: 1px solid var(--pm-border) !important;
    color: var(--pm-text-secondary) !important;
    font-size: 0.82rem !important;
    padding: 8px 12px !important;
    min-height: 40px !important;
    border-radius: var(--pm-radius-sm) !important;
    cursor: pointer !important;
}

/* ==========================================================================
   3. BARCODE VIEW MODAL
   ========================================================================== */

#barcode-view-modal .barcode-modal-header {
    padding: 12px 20px !important;
    border-bottom: 1px solid var(--pm-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--pm-surface) !important;
    margin: 0 !important;
}

#barcode-view-modal .modal-header-icon-badge {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--pm-radius-sm) !important;
    background: var(--pm-surface-elevated) !important;
    border: 1px solid var(--pm-border) !important;
    color: var(--pm-text-secondary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
}

#barcode-view-modal #barcode-modal-title {
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--pm-text-primary) !important;
}

#barcode-view-modal .barcode-modal-product-name {
    margin: 2px 0 0 0 !important;
    font-size: 0.78rem !important;
    color: var(--pm-text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 240px !important;
}

#barcode-view-modal .barcode-preview-card {
    background: #ffffff !important;
    border-radius: var(--pm-radius-md) !important;
    padding: 18px 14px 14px 14px !important;
    margin: 16px 20px !important;
    text-align: center !important;
}

#barcode-view-modal #barcode-display {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

#barcode-view-modal .barcode-code-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px dashed rgba(0, 0, 0, 0.15) !important;
}

#barcode-view-modal .barcode-code-text {
    font-family: var(--pm-font-mono) !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    color: #0b0d13 !important;
}

#barcode-view-modal .btn-copy-barcode-mini {
    background: rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    color: #111827 !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
}

#barcode-view-modal .barcode-modal-actions {
    padding: 12px 20px max(14px, env(safe-area-inset-bottom)) 20px !important;
    border-top: 1px solid var(--pm-border) !important;
    display: flex !important;
    gap: 10px !important;
}

#barcode-view-modal .btn-sheet-primary {
    flex: 2 !important;
    min-height: 42px !important;
    border-radius: var(--pm-radius-sm) !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

#barcode-view-modal .btn-sheet-secondary {
    flex: 1 !important;
    min-height: 42px !important;
    background: transparent !important;
    border: 1px solid var(--pm-border) !important;
    color: var(--pm-text-secondary) !important;
    border-radius: var(--pm-radius-sm) !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
}

/* ==========================================================================
   4. REVISION REQUEST MODAL
   ========================================================================== */

#revision-modal .revision-modal-dialog {
    padding: 0 !important;
}

#revision-modal .modal-header {
    padding: 12px 20px !important;
    border-bottom: 1px solid var(--pm-border) !important;
    background: var(--pm-surface) !important;
}

#revision-modal .modal-header h3 {
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

#revision-modal #revision-form {
    padding: 16px 20px max(14px, env(safe-area-inset-bottom)) 20px !important;
}
