/* ============================================
   PROJECT METADATA FORM - MAIN STYLESHEET
   ============================================ */

/* Import Base Styles (Variables, Reset, Typography, Animations) */
@import url('base.css');

/* Import Layout Styles (Page Structure, Header, Container) */
@import url('layout.css');

/* Import Component Styles (All UI Components) */
@import url('components.css');

/* ============================================
   PAGE OVERRIDES & UTILITIES
   ============================================ */

/* Generic Wrappers */
.input-wrapper {
   position: relative;
}

.hidden {
   display: none !important;
}

.form-page__topbar {
   display: flex;
   align-items: center;
   justify-content: flex-start;
   margin-bottom: 1rem;
}

.form-page__back-button {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 10px 14px;
   border-radius: 999px;
   border: 1px solid var(--border-soft);
   background: rgba(15, 23, 42, 0.03);
   color: var(--text-strong);
   font-size: 13px;
   font-weight: 600;
   text-decoration: none;
   transition: background 0.2s var(--transition), border-color 0.2s var(--transition), transform 0.2s var(--transition), box-shadow 0.2s var(--transition);
}

.form-page__back-button:hover,
.form-page__back-button:focus-visible {
   background: rgba(15, 23, 42, 0.06);
   border-color: rgba(15, 23, 42, 0.12);
   transform: translateY(-1px);
   box-shadow: var(--shadow-sm);
   outline: none;
}

/* ============================================
   DECORATION TYPES
   ============================================ */
#decorationTypesContainer {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 1rem;
   margin-top: 0.5rem;
}

.decoration-checkbox-label {
   text-transform: none;
   letter-spacing: 0;
   font-weight: 400;
   margin: 0;
   cursor: pointer;
}

/* ============================================
   TOTAL QUANTITY DISPLAY
   ============================================ */
#totalQuantityDisplay {
   margin-top: 1rem;
   display: none;
}

#totalQuantityValue {
   padding: 0.875rem 1rem;
   background: var(--bg-page);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   font-size: 0.9375rem;
   font-weight: 600;
   color: var(--text-strong);
}

/* ============================================
   ADDITIONAL INFO SECTION
   ============================================ */
#shipToAddressContainer {
   display: none;
   margin-top: 0.5rem;
}

.checkbox-label-regular {
   text-transform: none;
   letter-spacing: 0;
   font-weight: 400;
   margin: 0;
   cursor: pointer;
}

.checkbox-group-wrapper {
   margin-bottom: 0.5rem;
}

/* ============================================
   CLIENT PORTAL ORDER MODE
   ============================================ */
body.client-portal-order-mode #clearClientBtn {
   display: none !important;
}

body.client-portal-order-mode #clientPortalBackButton {
   display: inline-flex !important;
}

body.client-portal-order-mode #clientPortalContactHint {
   display: block !important;
}

body.client-portal-order-mode #importInboxBtn,
body.client-portal-order-mode #togoInboxRailToggle,
body.client-portal-order-mode #togoInboxRail,
body.client-portal-order-mode #togoInboxRailBackdrop {
   display: none !important;
}

/* Portal contact list: JS uses position:fixed so the menu is not clipped by .container overflow-y:auto */
body.client-portal-order-mode #clientPortalContactDropdown.client-dropdown {
   box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

/* ============================================
   PRODUCT MODAL
   ============================================ */
.product-modal-title-custom {
   text-align: left;
   margin-bottom: 0.25rem;
}

.product-modal-header-wrapper {
   margin-bottom: 1rem;
}

.color-selection-label {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   /* Override base label styles from components.css */
   text-transform: none;
   letter-spacing: normal;
   margin-bottom: 0;
}

.color-preview-box {
   display: inline-block;
   width: 24px;
   height: 24px;
   border: 1px solid var(--border-soft);
   border-radius: 3px;
   overflow: hidden;
   background: var(--bg-page);
   flex-shrink: 0;
}

.color-preview-image {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: none;
}

.color-preview-fallback {
   width: 100%;
   height: 100%;
   background: #f1f5f9;
}

.selected-color-text {
   font-weight: 500;
   color: var(--text-strong);
}

.inventory-section-title {
   font-size: 1rem;
   margin-bottom: 0.5rem;
   margin-top: 0.5rem;
}

.warehouse-title {
   margin-top: 0.75rem;
   margin-bottom: 0.5rem;
   font-size: 1rem;
}

.table-responsive {
   overflow-x: auto;
   max-width: 100%;
   /* Default overflow-x: auto for wrapper div */
}

/* JS Dynamic Classes */
.inventory-loading-text {
   padding: 2rem;
   text-align: center;
   color: var(--text-muted);
}

.inventory-error-text {
   padding: 2rem;
   text-align: center;
   color: #dc2626;
}

.row-special-pricing {
   background: #fef3c7;
   color: #92400e;
}

.text-price-highlight {
   font-weight: 600;
   color: #dc2626;
}

.color-fallback-box {
   width: 100%;
   min-height: 60px;
}

.modal-total-wrapper {
   margin-top: 0.5rem;
   padding: 0.5rem;
   background: var(--bg-page);
   border-radius: 4px;
   text-align: right;
   font-size: 0.875rem;
}

.modal-total-quantity-text {
   font-size: 1rem;
   color: var(--accent);
}

/* ============================================
   CUSTOM PRODUCT MODAL
   ============================================ */
.custom-product-modal {
   max-width: 720px;
   /* Slightly wider for the 2-col layout */
}

.custom-product-form {
   padding: 0.5rem 0;
   display: flex;
   flex-direction: column;
   gap: 1.5rem;
}

/* Layout Grid */
.custom-product-layout {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 2rem;
   align-items: start;
}

@media (max-width: 600px) {
   .custom-product-layout {
      grid-template-columns: 1fr;
      gap: 1rem;
   }
}

.custom-col-left,
.custom-col-right {
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

/* Color Presets - Compact & Sexy */
.color-preset-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
   gap: 8px;
   margin-bottom: 1rem;
}

.color-preset-option {
   width: 32px;
   height: 32px;
   border-radius: 4px;
   cursor: pointer;
   border: 2px solid var(--border-soft);
   position: relative;
   transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.color-preset-option:hover {
   transform: scale(1.15);
   z-index: 2;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.color-preset-option.selected {
   border-color: var(--primary);
   box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.2);
   transform: scale(1.1);
}

/* Custom Tooltip for Colors */
.color-preset-option::after {
   content: attr(title);
   position: absolute;
   bottom: 110%;
   left: 50%;
   transform: translateX(-50%) translateY(5px);
   background: #1e293b;
   color: white;
   padding: 6px 10px;
   border-radius: 6px;
   font-size: 0.75rem;
   font-weight: 500;
   white-space: nowrap;
   opacity: 0;
   pointer-events: none;
   transition: all 0.2s;
   z-index: 10;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.color-preset-option:hover::after {
   opacity: 1;
   transform: translateX(-50%) translateY(0);
}

/* Custom Color Input Wrapper */
.custom-color-input-wrapper {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   background: var(--bg-surface);
   padding: 0.5rem 0.75rem;
   border-radius: var(--radius-sm);
   border: 1px solid var(--border-soft);
   transition: border-color 0.2s;
}

.custom-color-input-wrapper:focus-within {
   border-color: var(--primary);
}

.custom-color-input-wrapper .radio-wrapper {
   margin: 0;
   font-size: 0.85rem;
}

.custom-color-input-wrapper input[type="text"] {
   border: none;
   background: transparent;
   padding: 0.25rem;
   height: auto;
   font-size: 0.9rem;
   box-shadow: none;
   /* Remove default input shadow/border */
}

.custom-color-input-wrapper input[type="text"]:focus {
   box-shadow: none;
   outline: none;
}

.custom-color-input-wrapper input[type="text"]:disabled {
   background: transparent;
   cursor: default;
   color: var(--text-muted);
}

/* Size Grid - Clean & Table-like */
.size-section label {
   margin-bottom: 0.75rem;
}

.size-grid-wrapper {
   background: var(--bg-surface);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
   padding: 1.25rem;
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

/* Custom size: trigger + animated panel below (matches artwork workspace) */
.custom-size-add-footer {
   display: flex;
   flex-direction: column;
   gap: 0;
   margin-top: 0.25rem;
}

.custom-size-add-trigger {
   width: 100%;
   margin: 0;
   padding: 0.7rem 1rem;
   font-size: 0.72rem;
   font-weight: 700;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   color: var(--text-strong, #111827);
   background: var(--bg-card);
   border: 1px dashed var(--border-medium);
   border-radius: var(--radius-md);
   cursor: pointer;
   transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, border-radius 0.25s ease;
}

.custom-size-add-trigger:hover {
   background: rgba(15, 23, 42, 0.04);
   border-color: var(--border-strong);
   color: var(--primary, #2563eb);
}

.custom-size-add-footer.is-open .custom-size-add-trigger {
   border-bottom: none;
   border-radius: var(--radius-md) var(--radius-md) 0 0;
   border-style: solid;
   border-color: var(--border-soft);
   background: var(--bg-surface);
}

.custom-size-inline-add-expand {
   display: grid;
   grid-template-rows: 0fr;
   transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-size-add-footer.is-open .custom-size-inline-add-expand {
   grid-template-rows: 1fr;
}

.custom-size-inline-add-expand__inner {
   overflow: hidden;
   min-height: 0;
}

@media (prefers-reduced-motion: reduce) {

   .custom-size-inline-add-expand,
   .custom-size-add-trigger,
   .custom-size-inline-add__input,
   .custom-size-inline-add__btn {
      transition: none;
   }
}

.custom-size-inline-add {
   padding: 1rem 1.1rem 1.1rem;
   background: var(--bg-surface);
   border: 1px solid var(--border-soft);
   border-top: none;
   border-radius: 0 0 var(--radius-md) var(--radius-md);
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.custom-size-inline-add__heading {
   margin: 0 0 0.25rem;
   font-size: 0.68rem;
   font-weight: 700;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: var(--text-muted);
}

.custom-size-inline-add__hint {
   margin: 0 0 0.75rem;
   font-size: 0.8rem;
   line-height: 1.45;
   color: var(--text-muted);
}

.custom-size-inline-add__row {
   display: flex;
   flex-wrap: wrap;
   align-items: stretch;
   gap: 0.65rem;
}

.custom-size-inline-add__input {
   flex: 1 1 140px;
   min-width: 0;
   padding: 0.65rem 0.85rem;
   border: 1px solid var(--border-medium);
   border-radius: var(--radius-sm);
   font-size: 0.9rem;
   background: var(--bg-card);
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-size-inline-add__input:focus {
   outline: none;
   border-color: var(--primary, #2563eb);
   box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.12);
}

.custom-size-inline-add__actions {
   display: flex;
   flex-direction: column;
   justify-content: stretch;
   gap: 0.5rem;
   flex: 0 0 auto;
   min-width: min(100%, 8.25rem);
}

@media (min-width: 520px) {
   .custom-size-inline-add__actions {
      flex-direction: row;
      align-items: stretch;
      min-width: 0;
   }

   .custom-size-inline-add__btn {
      min-width: 6rem;
   }
}

.custom-size-inline-add__btn {
   padding: 0.6rem 1rem;
   font-size: 0.68rem;
   font-weight: 700;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   border-radius: var(--radius-sm);
   cursor: pointer;
   border: 1px solid transparent;
   transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.custom-size-inline-add__btn:active {
   transform: scale(0.98);
}

.custom-size-inline-add__btn--primary {
   background: var(--text-strong, #111827);
   color: var(--bg-card, #fff);
   border-color: var(--text-strong, #111827);
}

.custom-size-inline-add__btn--primary:hover {
   background: #374151;
   border-color: #374151;
}

.custom-size-inline-add__btn--ghost {
   background: transparent;
   color: var(--text-muted);
   border-color: var(--border-medium);
}

.custom-size-inline-add__btn--ghost:hover {
   background: rgba(15, 23, 42, 0.05);
   color: var(--text-strong);
   border-color: var(--border-strong);
}

.size-grid-container {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
   gap: 1rem 0.75rem;
}

.size-grid-item {
   display: flex;
   flex-direction: column;
   gap: 0.25rem;
   align-items: center;
}

.size-grid-item label {
   font-size: 0.75rem;
   font-weight: 600;
   text-align: center;
   color: var(--text-muted);
   margin: 0;
   text-transform: uppercase;
}

.size-grid-item input {
   text-align: center;
   padding: 0.5rem 0.25rem;
   border: 1px solid var(--border-medium);
   border-radius: var(--radius-sm);
   font-weight: 500;
   font-size: 0.95rem;
   transition: all 0.2s;
}

.size-grid-item input:focus {
   border-color: var(--primary);
   box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.1);
   transform: translateY(-1px);
}

.size-grid-item input:not(:placeholder-shown) {
   border-color: var(--border-strong);
   background: #fff;
}

.size-grid-item.custom-added-size {
   grid-column: span 2;
}

.btn-text-action.small {
   font-size: 0.8rem;
   margin-top: 1rem;
   display: inline-flex;
   align-items: center;
   gap: 0.25rem;
   padding: 0.25rem 0.5rem;
   border-radius: 4px;
}

.btn-text-action.small:hover {
   background: var(--bg-surface-hover);
   text-decoration: none;
}

/* Secondary Button Style */
.btn-secondary {
   background: white;
   color: var(--primary);
   border: 1px solid var(--primary);
   padding: 0.5rem 1rem;
   border-radius: var(--radius-sm);
   font-weight: 600;
   font-size: 0.85rem;
   cursor: pointer;
   transition: all 0.2s;
}

.btn-secondary:hover {
   background: #f0f9ff;
   transform: translateY(-1px);
}

/* ============================================
   PRODUCT SEARCH & CUSTOM BUTTON
   ============================================ */

/* Product Search Row Layout */
.product-search-row {
   display: flex;
   gap: 0.5rem;
   align-items: stretch;
}

.product-search-container {
   flex: 1;
}

/* Ensure input fills height */
.product-search-container input {
   height: 100%;
}

/* Custom Product Button - Compact & Styled */
.btn-custom-product {
   background: var(--bg-card);
   color: var(--text-strong);
   border: 1px solid var(--border-soft);
   padding: 0 1rem;
   border-radius: var(--radius-sm);
   font-weight: 600;
   font-size: 0.85rem;
   cursor: pointer;
   transition: all 0.2s;
   white-space: nowrap;
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   margin-top: 0 !important;
   /* Override default button margin */
   width: auto !important;
   /* Override default button width */
}

.btn-custom-product:hover {
   background: var(--bg-page);
   border-color: var(--accent);
   color: var(--accent);
   transform: translateY(-1px);
}

.product-search-actions {
   display: flex;
   gap: 0.5rem;
   flex-shrink: 0;
}

.btn-import-inbox {
   background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(14, 165, 233, 0.08));
   border-color: rgba(15, 118, 110, 0.22);
   color: #0f766e;
}

.btn-import-inbox:hover {
   border-color: rgba(15, 118, 110, 0.45);
   color: #0f766e;
}

.inbox-import-inline-status {
   margin-top: 0.75rem;
   padding: 0.8rem 0.95rem;
   border-radius: var(--radius-sm);
   border: 1px solid rgba(148, 163, 184, 0.3);
   background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
   color: var(--text-strong);
   font-size: 0.875rem;
}

.inbox-import-inline-status[data-state="success"] {
   border-color: #86efac;
   background: #f0fdf4;
   color: #166534;
}

.inbox-import-inline-status[data-state="error"] {
   border-color: #fca5a5;
   background: #fef2f2;
   color: #991b1b;
}

.inbox-import-inline-status[data-state="loading"] {
   border-color: #bfdbfe;
   background: #eff6ff;
   color: #1d4ed8;
}

body.togo-inbox-rail-enabled #importInboxBtn {
   display: none !important;
}

/*
   Viewport lock on body — scroll stays inside .container.
   .form-page uses overflow: visible so descendant box-shadows are not clipped at the padded edge
   (overflow:hidden on an ancestor clips shadows that extend past the content box).
*/
body.togo-inbox-rail-enabled {
   height: 100dvh;
   min-height: 100dvh;
   overflow-x: hidden;
   overflow-y: hidden;
}

/* Full-bleed page: viewport-tall workspace; form scrolls inside .container */
body.togo-inbox-rail-enabled .form-page {
   --togo-intake-page-pad: 24px;
   /* Room for large card shadows (e.g. 0 24px 54px) so blur is not cut off at the viewport */
   --togo-intake-shadow-side-bleed: 30px;
   --togo-intake-shadow-bottom-bleed: 56px;
   max-width: none;
   width: 100%;
   margin: 0;
   box-sizing: border-box;
   min-height: 100vh;
   min-height: 100dvh;
   max-height: 100vh;
   max-height: 100dvh;
   overflow: visible;
   padding-top: calc(var(--togo-intake-page-pad) + var(--togo-intake-shadow-side-bleed));
   padding-left: calc(var(--togo-intake-page-pad) + var(--togo-intake-shadow-side-bleed));
   padding-right: calc(var(--togo-intake-page-pad) + var(--togo-intake-shadow-side-bleed));
   padding-bottom: calc(var(--togo-intake-page-pad) + var(--togo-intake-shadow-bottom-bleed));
   display: flex;
   flex-direction: column;
   gap: 0;
}

.togo-intake-workspace {
   position: relative;
}

.togo-intake-workspace__main {
   display: flex;
   flex-direction: column;
   gap: 32px;
   min-width: 0;
   width: 100%;
}

body.togo-inbox-rail-enabled .togo-intake-workspace__main {
   gap: 24px;
   height: 100%;
   min-height: 0;
   max-height: 100%;
   /* visible: overflow:hidden here clips layout.css box-shadows on .form-page__header / .container at this column edge */
   overflow: visible;
}

body.togo-inbox-rail-enabled .togo-intake-workspace__main > .form-page__header {
   flex-shrink: 0;
}

body.togo-inbox-rail-enabled .togo-intake-workspace__main > .container {
   flex: 1;
   min-height: 0;
   overflow-y: auto;
   -webkit-overflow-scrolling: touch;
}

.togo-intake-workspace__rail-col {
   min-width: 0;
   overflow: hidden;
}

body.togo-inbox-rail-enabled .togo-intake-workspace__rail-col {
   display: flex;
   flex-direction: column;
   min-height: 0;
   height: 100%;
   max-height: 100%;
   /* visible: avoid clipping .togo-inbox-rail__inner box-shadow at the gutter */
   overflow: visible;
}

.togo-inbox-rail,
.togo-inbox-rail-toggle,
.togo-inbox-rail-backdrop {
   display: none;
}

body.togo-inbox-rail-enabled .togo-intake-workspace {
   flex: 1;
   min-height: 0;
   display: grid;
   grid-template-columns: 0fr minmax(0, 1fr);
   grid-template-rows: minmax(0, 1fr);
   gap: 0;
   align-items: stretch;
   transition:
      grid-template-columns 0.44s cubic-bezier(0.22, 1, 0.36, 1),
      gap 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

body.togo-inbox-rail-enabled.togo-inbox-rail-open .togo-intake-workspace {
   grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
   gap: 24px;
}

body.togo-inbox-rail-enabled.togo-inbox-rail-open.togo-inbox-compare-active .togo-intake-workspace {
   grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
   gap: 0;
   align-items: stretch;
   border-radius: 24px;
   overflow: hidden;
   border: 1px solid rgba(203, 213, 225, 0.96);
   box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
   background: var(--bg-card, #ffffff);
}

/* Flatten rail wrapper in layout so PDF + form share one card (no double shadows in gutter) */
body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-intake-workspace__rail-col {
   display: contents;
}

body.togo-inbox-rail-enabled .togo-inbox-rail {
   display: flex;
   flex-direction: column;
   position: relative;
   top: auto;
   width: 100%;
   max-width: 420px;
   height: 100%;
   min-height: 0;
   max-height: 100%;
   align-self: stretch;
   opacity: 0;
   transform: translateX(-12px);
   pointer-events: none;
   /* visible: do not clip .togo-inbox-rail__inner box-shadow; list/pdf areas clip their own overflow */
   overflow: visible;
   transition:
      opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

body.togo-inbox-rail-enabled.togo-inbox-rail-open .togo-inbox-rail {
   opacity: 1;
   transform: translateX(0);
   pointer-events: auto;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail {
   top: auto;
   height: 100%;
   min-height: 0;
   max-height: 100%;
   max-width: none;
   display: flex;
   overflow: visible;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__inner {
   display: none;
}

body.togo-inbox-rail-enabled .togo-inbox-rail-toggle {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   position: fixed;
   left: 0;
   top: 180px;
   z-index: 90;
   margin: 0;
   padding: 0;
   border: 0;
   border-radius: 0 18px 18px 0;
   background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
   color: #fff;
   min-height: 108px;
   width: 56px;
   box-shadow: 0 18px 40px rgba(15, 118, 110, 0.28);
   cursor: pointer;
   transition: opacity 0.2s var(--transition), transform 0.2s var(--transition), box-shadow 0.2s var(--transition);
}

body.togo-inbox-rail-enabled .togo-inbox-rail-toggle:hover {
   transform: translateX(2px);
   box-shadow: 0 22px 44px rgba(15, 118, 110, 0.32);
}

body.togo-inbox-rail-enabled.togo-inbox-rail-open .togo-inbox-rail-toggle {
   opacity: 0;
   pointer-events: none;
   transform: translateX(-10px);
}

.togo-inbox-rail-toggle__icon {
   writing-mode: vertical-rl;
   transform: rotate(180deg);
   font-size: 0.98rem;
   font-weight: 700;
   letter-spacing: 0.12em;
   text-transform: uppercase;
}

.togo-inbox-rail__inner {
   height: 100%;
   display: grid;
   grid-template-rows: auto auto minmax(0, 1fr);
   grid-template-columns: minmax(0, 1fr);
   border-radius: 24px;
   border: 1px solid rgba(203, 213, 225, 0.96);
   background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
   box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
   overflow: hidden;
}

body.togo-inbox-rail-enabled .togo-inbox-rail__inner {
   flex: 1;
   min-height: 0;
}

.togo-inbox-rail__header {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 1rem;
   padding: 1.1rem 1.1rem 0.85rem;
   background: linear-gradient(180deg, #fcfffe 0%, #f0fdfa 100%);
   border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.togo-inbox-rail__header-actions {
   display: flex;
   align-items: center;
   gap: 0.6rem;
}

.togo-inbox-rail__title {
   margin: 0;
   font-size: 1.05rem;
   font-weight: 700;
   color: var(--text-strong);
}

.togo-inbox-rail__subtitle {
   margin: 0.25rem 0 0;
   font-size: 0.82rem;
   line-height: 1.45;
   color: var(--text-muted);
}

.togo-inbox-rail__icon-btn {
   width: 38px;
   height: 38px;
   border-radius: 999px;
   border: 1px solid rgba(203, 213, 225, 0.9);
   background: #fff;
   color: var(--text-strong);
   margin: 0 !important;
   padding: 0;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
   box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
   cursor: pointer;
   transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.togo-inbox-rail__icon-btn:hover {
   background: #f8fafc;
   border-color: rgba(15, 118, 110, 0.28);
}

.togo-inbox-rail__icon-btn:focus-visible {
   outline: none;
   box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15, 118, 110, 0.3);
}

.togo-inbox-rail__close {
   font-size: 1.45rem;
   line-height: 1;
}

.togo-inbox-rail__refresh-btn {
   color: #0f766e;
}

.togo-inbox-rail__refresh-btn svg {
   display: block;
}

.togo-inbox-rail__section {
   min-height: 0;
   display: grid;
   grid-template-rows: auto minmax(0, 1fr);
}

.togo-inbox-rail__section--list {
   transition: border-color 0.28s var(--transition), background 0.28s var(--transition);
   background:
      radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 34%),
      linear-gradient(180deg, #f8fafc 0%, #ffffff 38%);
}

.togo-inbox-rail--list-loading .togo-inbox-rail__section-title {
   position: relative;
   padding-left: 1.1rem;
}

.togo-inbox-rail--list-loading .togo-inbox-rail__section-title::before {
   content: '';
   position: absolute;
   left: 0;
   top: 50%;
   width: 7px;
   height: 7px;
   margin-top: -3.5px;
   border-radius: 50%;
   background: #0f766e;
   animation: inboxRailListPulse 1.1s ease-in-out infinite;
}

@keyframes inboxRailListPulse {

   0%,
   100% {
      opacity: 0.35;
      transform: scale(0.88);
   }

   50% {
      opacity: 1;
      transform: scale(1);
   }
}

/* Off-screen PDF pipeline for rail mode (highlights / lens); not shown in the panel */
.togo-inbox-rail__pdf-host {
   position: absolute;
   left: -10000px;
   top: 0;
   width: 960px;
   min-height: 800px;
   overflow: hidden;
   opacity: 0;
   pointer-events: none;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-host {
   position: relative;
   left: auto;
   top: auto;
   width: 100%;
   flex: 1;
   min-height: 0;
   height: 100%;
   max-height: 100%;
   opacity: 1;
   pointer-events: auto;
   overflow: hidden;
   display: grid;
   grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
   grid-template-columns: minmax(0, 1fr);
   border-radius: 0;
   border: none;
   box-shadow: none;
   background: transparent;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-intake-workspace__main {
   gap: 0;
   border-left: 1px solid rgba(226, 232, 240, 0.95);
   background: transparent;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-intake-workspace__main > .form-page__header {
   box-shadow: none;
   border-radius: 0;
   border: none;
   border-bottom: 1px solid var(--border-soft);
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-intake-workspace__main > .container {
   box-shadow: none;
   border-radius: 0;
   border: none;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-host-header {
   padding: 0.65rem 1rem 0.6rem 1rem;
}

.togo-inbox-rail__pdf-host-header {
   display: grid;
   grid-template-columns: 1fr auto 1fr;
   align-items: center;
   column-gap: 0.5rem;
   padding: 0.5rem 0.65rem 0.55rem;
   border-bottom: 1px solid rgba(226, 232, 240, 0.9);
   background: linear-gradient(180deg, #fcfffe 0%, #f0fdfa 100%);
   flex-shrink: 0;
}

.togo-inbox-rail__pdf-host-title {
   grid-column: 2;
   margin: 0;
   min-width: 0;
   max-width: 100%;
   text-align: center;
   font-size: 0.92rem;
   font-weight: 600;
   letter-spacing: -0.02em;
   line-height: 1.25;
   color: var(--text-strong);
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.togo-inbox-rail__pdf-host-header .togo-inbox-rail__back-icon {
   grid-column: 1;
   justify-self: start;
}

.togo-inbox-rail__pdf-host-header-spacer {
   grid-column: 3;
   justify-self: end;
   width: 34px;
   height: 34px;
   flex-shrink: 0;
   pointer-events: none;
}

.togo-inbox-rail__back-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 34px;
   height: 34px;
   margin: 0;
   padding: 0;
   flex-shrink: 0;
   border-radius: 10px;
   border: 1px solid rgba(203, 213, 225, 0.95);
   background: #fff;
   color: #0f766e;
   cursor: pointer;
   transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.togo-inbox-rail__back-icon:hover {
   background: #f0fdfa;
   border-color: rgba(15, 118, 110, 0.35);
   color: #115e59;
}

.togo-inbox-rail__back-icon:focus-visible {
   outline: none;
   box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15, 118, 110, 0.35);
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-host-meta {
   border-top: 1px solid rgba(226, 232, 240, 0.92);
   border-bottom: 1px solid rgba(226, 232, 240, 0.85);
   max-height: min(38vh, 420px);
   min-height: 0;
   overflow: auto;
}

.togo-inbox-rail__section-header {
   position: relative;
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 0.65rem;
   padding: 0.85rem 1.1rem;
   background: rgba(248, 250, 252, 0.92);
   border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.togo-inbox-rail__section-header-col {
   display: flex;
   flex-direction: column;
   gap: 0.2rem;
   min-width: 0;
   flex: 1;
}

.togo-inbox-rail__upload-btn {
   box-sizing: border-box;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 34px;
   height: 34px;
   min-width: 34px;
   margin: 0;
   padding: 0;
   flex-shrink: 0;
   align-self: flex-start;
   color: #0f766e;
   background: #fff;
   border: 1px solid rgba(203, 213, 225, 0.95);
   border-radius: 8px;
   cursor: pointer;
   transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.togo-inbox-rail__upload-btn:hover {
   background: #f0fdfa;
   border-color: rgba(15, 118, 110, 0.35);
   color: #115e59;
}

.togo-inbox-rail__upload-btn:active {
   background: #ccfbf1;
}

.togo-inbox-rail__upload-btn:focus-visible {
   outline: none;
   box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15, 118, 110, 0.35);
}

.togo-inbox-rail__upload-btn svg {
   display: block;
   flex-shrink: 0;
}

.togo-inbox-rail__upload-btn--loading {
   opacity: 0.65;
   pointer-events: none;
   cursor: default;
}

.togo-inbox-rail__section-title {
   font-size: 0.86rem;
   font-weight: 700;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   color: #334155;
}

.togo-inbox-rail__sync-status {
   font-size: 0.72rem;
   font-weight: 500;
   color: #64748b;
   line-height: 1.35;
   min-height: 1.1em;
}

.togo-inbox-rail__list-stack {
   min-height: 0;
   display: flex;
   flex-direction: column;
}

.togo-inbox-rail__list-stack .inbox-import-day-filter {
   padding: 0 1rem 0.45rem;
   flex-shrink: 0;
}

.togo-inbox-rail__list {
   padding: 0.95rem 1rem 1rem;
   max-height: none;
   overflow: auto;
   flex: 1;
   min-height: 0;
   min-width: 0;
}

.inbox-import-day-filter.hidden {
   display: none !important;
}

.inbox-import-day-filter--tabs .inbox-import-day-filter__inner {
   display: flex;
   flex-wrap: nowrap;
   gap: 0;
   border-radius: 10px;
   border: 1px solid rgba(203, 213, 225, 0.95);
   overflow: hidden;
   background: rgba(255, 255, 255, 0.92);
}

.inbox-import-day-filter__tab {
   appearance: none;
   flex: 1;
   margin: 0;
   border: none;
   border-radius: 0;
   background: transparent;
   color: #64748b;
   font-size: 0.78rem;
   font-weight: 600;
   letter-spacing: 0.02em;
   padding: 0.42rem 0.5rem;
   cursor: pointer;
   line-height: 1.25;
   transition: background 0.15s ease, color 0.15s ease;
}

.inbox-import-day-filter__tab:first-child {
   border-right: 1px solid rgba(203, 213, 225, 0.9);
}

.inbox-import-day-filter__tab:hover {
   color: #0f766e;
   background: rgba(15, 118, 110, 0.06);
}

.inbox-import-day-filter__tab.is-active {
   background: rgba(15, 118, 110, 0.12);
   color: #0f766e;
}

.inbox-import-modal__list-view {
   display: flex;
   flex-direction: column;
   min-height: 0;
}

.inbox-import-modal__list-view .inbox-import-day-filter {
   padding: 0.35rem 1.5rem 0;
   flex-shrink: 0;
}

.inbox-import-modal__list-view .inbox-import-list {
   flex: 1;
   min-height: 0;
}

.togo-inbox-rail__pdf-tabs {
   padding: 0.85rem 1.1rem 0;
}

.togo-inbox-rail__pdf-stage {
   min-height: 0;
   height: 100%;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-tabs {
   padding: 0.65rem 1rem 0;
   flex-shrink: 0;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-stage {
   padding: 0.5rem 1rem 0.75rem;
   overflow: auto;
   min-height: 0;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-host .inbox-import-pdf-empty {
   padding: 0.5rem 1rem 0;
   margin: 0;
   flex-shrink: 0;
}

.inbox-import-card.is-selected {
   border-color: rgba(15, 118, 110, 0.45);
   box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.18), 0 20px 40px rgba(15, 23, 42, 0.08);
}

.inbox-import-card--loading {
   pointer-events: none;
}

.inbox-import-skeleton,
.inbox-import-skeleton-chip {
   position: relative;
   overflow: hidden;
   border-radius: 999px;
   background: linear-gradient(90deg, rgba(226, 232, 240, 0.8) 0%, rgba(248, 250, 252, 1) 45%, rgba(226, 232, 240, 0.8) 100%);
   background-size: 220% 100%;
   animation: inboxImportShimmer 1.4s linear infinite;
}

.inbox-import-skeleton--title {
   width: 210px;
   height: 18px;
   border-radius: 12px;
}

.inbox-import-skeleton--time {
   width: 118px;
   height: 16px;
}

.inbox-import-skeleton--line {
   width: 100%;
   height: 14px;
   border-radius: 10px;
   margin-top: 0.9rem;
}

.inbox-import-skeleton--line.short {
   width: 72%;
   margin-top: 0.5rem;
}

.inbox-import-skeleton-chip {
   display: inline-flex;
   width: 82px;
   height: 28px;
   margin-top: 0.95rem;
}

.inbox-import-pdf-loader {
   min-height: 100%;
   display: grid;
   place-items: center;
   align-content: center;
   gap: 1rem;
   padding: 2rem 1.25rem;
   text-align: center;
}

.inbox-import-pdf-loader__spinner {
   width: 44px;
   height: 44px;
   border-radius: 50%;
   border: 3px solid rgba(15, 118, 110, 0.14);
   border-top-color: #0f766e;
   animation: spin 0.75s linear infinite;
}

.inbox-import-pdf-loader__title {
   font-size: 0.95rem;
   font-weight: 600;
   color: var(--text-strong);
   letter-spacing: -0.01em;
}

.inbox-import-pdf-loader__hint {
   max-width: 280px;
   margin: 0;
   color: var(--text-muted);
   font-size: 0.82rem;
   line-height: 1.5;
}

.inbox-import-modal-overlay {
   z-index: 1200;
   padding: 0;
   align-items: stretch;
   justify-content: stretch;
   background: rgba(15, 23, 42, 0.82);
}

.inbox-import-modal {
   width: 100vw;
   height: 100dvh;
   max-width: none;
   max-height: none;
   min-width: 0;
   min-height: 0;
   background: var(--bg-card);
   border-radius: 0;
   box-shadow: 0 32px 80px rgba(15, 23, 42, 0.24);
   display: grid;
   grid-template-rows: auto auto minmax(0, 1fr) auto;
   overflow: hidden;
}

.inbox-import-modal__header {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 1rem;
   padding: 1.4rem 1.5rem 1rem;
   border-bottom: 1px solid rgba(226, 232, 240, 0.9);
   background: linear-gradient(180deg, #fcfffe 0%, #f7fbfb 100%);
}

.inbox-import-modal__title {
   margin: 0;
   font-size: 1.35rem;
   font-weight: 700;
   color: var(--text-strong);
}

.inbox-import-modal__subtitle {
   margin: 0.35rem 0 0;
   color: var(--text-muted);
   font-size: 0.95rem;
}

.inbox-import-modal__close {
   width: 42px;
   height: 42px;
   border-radius: 999px;
   border: 1px solid rgba(203, 213, 225, 0.9);
   background: #fff;
   color: var(--text-strong);
   margin: 0 !important;
   padding: 0;
   font-size: 1.7rem;
   line-height: 1;
   box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.inbox-import-modal__toolbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1rem;
   padding: 0.9rem 1.5rem 1rem;
   border-bottom: 1px solid rgba(226, 232, 240, 0.9);
   background: #fff;
}

.inbox-import-modal__range {
   font-size: 0.875rem;
   color: var(--text-muted);
}

.inbox-import-modal__refresh {
   padding: 0 1rem;
}

.inbox-import-modal__body {
   min-height: 0;
   overflow: hidden;
   background:
      radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 38%),
      linear-gradient(180deg, #f8fafc 0%, #ffffff 35%);
}

.inbox-import-modal__state {
   margin: 1.5rem;
   padding: 1rem 1.1rem;
   border-radius: 14px;
   border: 1px solid rgba(203, 213, 225, 0.9);
   background: rgba(255, 255, 255, 0.92);
   color: var(--text-strong);
}

/* Inbox list empty state (rail + modal) */
.inbox-import-empty {
   margin: 0.35rem 0 0.25rem;
   padding: 1.35rem 1.1rem 1.2rem;
   border-radius: 16px;
   border: 1px solid rgba(203, 213, 225, 0.88);
   background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(248, 250, 252, 0.95) 52%,
      rgba(240, 253, 250, 0.42) 100%
   );
   box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
   text-align: center;
   max-width: 100%;
   min-width: 0;
}

.inbox-import-empty__icon {
   display: flex;
   align-items: center;
   justify-content: center;
   margin: 0 auto 0.85rem;
   color: #0f766e;
   opacity: 0.9;
}

.inbox-import-empty__title {
   margin: 0;
   font-size: 1.02rem;
   font-weight: 700;
   letter-spacing: -0.02em;
   color: var(--text-strong);
   line-height: 1.3;
}

.inbox-import-empty__lead {
   margin: 0.55rem 0 0;
   font-size: 0.82rem;
   line-height: 1.55;
   color: var(--text-muted);
   max-width: 22rem;
   margin-left: auto;
   margin-right: auto;
}

.inbox-import-empty__range {
   margin: 0.75rem 0 0;
   font-size: 0.8rem;
   color: var(--text-muted);
   line-height: 1.45;
}

.inbox-import-empty__range strong {
   color: #334155;
   font-weight: 600;
}

.inbox-import-empty__actions {
   display: flex;
   flex-wrap: wrap;
   gap: 0.5rem;
   justify-content: center;
   align-items: center;
   margin-top: 1.1rem;
}

.inbox-import-empty__actions--wrap {
   margin-top: 0.55rem;
}

.inbox-import-empty__sub {
   margin: 1rem 0 0;
   font-size: 0.76rem;
   font-weight: 600;
   color: #64748b;
   letter-spacing: 0.02em;
   text-transform: uppercase;
}

.inbox-import-empty__btn-primary,
.inbox-import-empty__btn-secondary {
   font-size: 0.8rem !important;
   padding: 0.45rem 0.85rem !important;
   border-radius: 10px !important;
   white-space: nowrap;
}

.inbox-import-empty__btn-compact {
   padding: 0.38rem 0.65rem !important;
   font-size: 0.76rem !important;
}

.inbox-import-modal__state--error {
   border-color: #fecaca;
   background: #fff1f2;
   color: #9f1239;
}

.inbox-import-list {
   display: grid;
   gap: 1rem;
   padding: 1.5rem;
   max-height: calc(100dvh - 205px);
   overflow: auto;
   min-width: 0;
}

.inbox-import-card {
   border: 1px solid rgba(203, 213, 225, 0.95);
   border-radius: 22px;
   background: rgba(255, 255, 255, 0.94);
   padding: 1.25rem 1.35rem;
   box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
   display: grid;
   gap: 1rem;
   min-width: 0;
}

.inbox-import-card__header {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 1rem;
   min-width: 0;
}

/* Subject + sender stack: must shrink so the timestamp stays inside the card */
.inbox-import-card__header > div:first-child {
   flex: 1 1 auto;
   min-width: 0;
}

.inbox-import-card__subject-row {
   display: flex;
   align-items: flex-start;
   gap: 0.7rem;
   min-width: 0;
}

.inbox-import-card__order-badge {
   flex: 0 0 auto;
   min-width: 2rem;
   height: 2rem;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 999px;
   background: #0f766e;
   color: #fff;
   font-size: 0.92rem;
   font-weight: 700;
   line-height: 1;
}

.inbox-import-card__subject {
   margin: 0;
   font-size: 1rem;
   font-weight: 700;
   color: var(--text-strong);
   overflow-wrap: anywhere;
   word-break: break-word;
   min-width: 0;
}

.inbox-import-card__time {
   flex: 0 1 auto;
   min-width: 0;
   max-width: 46%;
   align-self: flex-start;
   text-align: right;
   line-height: 1.35;
   color: var(--text-muted);
   font-size: 0.95rem;
   font-weight: 500;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

.inbox-import-card__sender {
   color: var(--text-muted);
   font-size: 0.95rem;
}

.inbox-import-card__preview {
   color: var(--text-strong);
   font-size: 0.95rem;
   line-height: 1.7;
   min-width: 0;
   max-width: 100%;
   overflow-wrap: anywhere;
   word-break: break-word;
}

.inbox-import-card__chips,
.inbox-import-review__chips,
.inbox-import-pdf-tabs,
.inbox-import-attachment-chips {
   display: flex;
   flex-wrap: wrap;
   gap: 0.55rem;
}

.inbox-import-chip {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   padding: 0.45rem 0.8rem;
   border-radius: 999px;
   font-size: 0.84rem;
   font-weight: 600;
   background: #ecfeff;
   color: #0f766e;
}

.inbox-import-chip--muted {
   background: #f1f5f9;
   color: #475569;
}

.inbox-import-chip--warn {
   background: #fff7ed;
   color: #c2410c;
}

.inbox-import-chip--danger {
   background: #fef2f2;
   color: #b91c1c;
}

.inbox-import-card__actions {
   display: flex;
   justify-content: flex-end;
}

.inbox-import-card__button {
   margin: 0 !important;
   width: auto !important;
   padding: 0.85rem 1.25rem;
}

.inbox-import-card__button--secondary {
   background: #fff !important;
   color: #0f172a !important;
   border: 1px solid rgba(15, 23, 42, 0.18) !important;
}

.inbox-import-card--no-import {
   opacity: 0.96;
}

.inbox-import-review {
   height: 100%;
   display: grid;
   grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
   gap: 0;
   padding: 0;
}

.inbox-import-review__panel {
   min-height: 0;
   display: grid;
   grid-template-rows: auto minmax(0, 1fr);
   background: rgba(255, 255, 255, 0.96);
   border: 0;
   border-radius: 0;
   overflow: hidden;
   box-shadow: none;
}

.inbox-import-review__panel--details {
   grid-template-rows: auto minmax(0, 1fr);
   border-left: 1px solid rgba(203, 213, 225, 0.95);
}

.inbox-import-review__panel-header {
   padding: 1rem 1.1rem;
   border-bottom: 1px solid rgba(226, 232, 240, 0.9);
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.8rem;
   background: #f8fafc;
   position: sticky;
   top: 0;
   z-index: 2;
}

.inbox-import-review__panel-title {
   font-size: 1rem;
   font-weight: 700;
   color: var(--text-strong);
}

.inbox-import-open-email {
   font-size: 0.86rem;
   color: #0f766e;
   text-decoration: none;
   font-weight: 600;
}

.inbox-import-pdf-tabs {
   justify-content: flex-end;
}

.inbox-import-pdf-tab {
   margin: 0 !important;
   width: auto !important;
   padding: 0.45rem 0.8rem;
   font-size: 0.8rem;
   border-radius: 999px;
   background: #f8fafc;
   color: #475569;
   border: 1px solid rgba(203, 213, 225, 0.95);
}

.inbox-import-pdf-tab.is-active {
   background: #ecfeff;
   color: #0f766e;
   border-color: rgba(15, 118, 110, 0.35);
}

.inbox-import-pdf-frame {
   width: 100%;
   height: 100%;
   min-height: 520px;
   border: 0;
   background: #fff;
}

.inbox-import-pdf-empty {
   margin: 1rem;
   padding: 1rem;
   border-radius: 14px;
   background: #fff7ed;
   color: #9a3412;
}

.inbox-import-pdf-stage,
.inbox-import-pdf-pages,
.inbox-import-products {
   scrollbar-width: thin;
   scrollbar-color: rgba(15, 118, 110, 0.5) transparent;
}

.inbox-import-pdf-stage::-webkit-scrollbar,
.inbox-import-pdf-pages::-webkit-scrollbar,
.inbox-import-products::-webkit-scrollbar {
   width: 4px;
   height: 4px;
}

.inbox-import-pdf-stage::-webkit-scrollbar-track,
.inbox-import-pdf-pages::-webkit-scrollbar-track,
.inbox-import-products::-webkit-scrollbar-track {
   background: transparent;
}

.inbox-import-pdf-stage::-webkit-scrollbar-thumb,
.inbox-import-pdf-pages::-webkit-scrollbar-thumb,
.inbox-import-products::-webkit-scrollbar-thumb {
   background: linear-gradient(180deg, rgba(15, 118, 110, 0.5) 0%, rgba(13, 148, 136, 0.5) 100%);
   border-radius: 999px;
}

.inbox-import-pdf-stage {
   min-height: 0;
   height: 100%;
   overflow: auto;
   padding-top: 0;
   background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.inbox-import-pdf-pages {
   display: grid;
   gap: 0;
}

.inbox-import-pdf-page {
   position: relative;
   display: block;
   width: 100%;
}

.inbox-import-pdf-canvas {
   display: block;
   width: 100%;
   height: auto;
   background: #fff;
}

.inbox-import-pdf-highlight-layer {
   position: absolute;
   inset: 0;
   pointer-events: none;
}

.inbox-import-pdf-highlight {
   position: absolute;
   border-radius: 4px;
   opacity: 1;
   transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease, outline-color .18s ease, background .18s ease;
   /* Layer uses pointer-events: none so the canvas stays the default target; highlights opt in for reverse hover → form sync */
   pointer-events: auto;
   cursor: default;
}

.inbox-import-pdf-highlight--product {
   background: transparent;
   outline: 2px solid var(--inbox-product-accent, #dc2626);
}

.inbox-import-pdf-highlight.is-dimmed {
   opacity: .14;
}

.inbox-import-pdf-highlight--product.is-dimmed {
   opacity: 0;
   outline-color: transparent;
}

.inbox-import-pdf-highlight.is-active {
   opacity: 1;
   box-shadow: 0 0 0 2px color-mix(in srgb, var(--inbox-product-accent, #dc2626) 34%, white);
}

.inbox-import-pdf-highlight--size-target,
.inbox-import-pdf-highlight--meta-target {
   background: transparent;
   outline: 0;
   opacity: 0;
   transition: opacity .16s ease, transform .16s ease, box-shadow .16s ease, background .16s ease, outline .16s ease;
}

.inbox-import-pdf-highlight--size-target.is-active,
.inbox-import-pdf-highlight--meta-target.is-active {
   opacity: 1;
   background: color-mix(in srgb, var(--inbox-product-accent, #dc2626) 12%, transparent);
}

.inbox-import-pdf-highlight--size-target.is-dimmed,
.inbox-import-pdf-highlight--meta-target.is-dimmed {
   opacity: 0;
}

.inbox-import-pdf-highlight--size-target.is-hovered-size,
.inbox-import-pdf-highlight--meta-target.is-hovered-meta {
   opacity: 1;
   background: color-mix(in srgb, var(--inbox-product-accent, #dc2626) 18%, transparent);
   outline: 2px solid var(--inbox-product-accent, #dc2626);
}

.inbox-import-pdf-highlight--size-value,
.inbox-import-pdf-highlight--size-head {
   border-radius: 8px;
}

.inbox-import-pdf-lens {
   position: fixed;
   z-index: 1300;
   width: 220px;
   border-radius: 14px;
   overflow: hidden;
   border: 2px solid rgba(15, 118, 110, 0.5);
   box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
   background: #fff;
   opacity: 0;
   pointer-events: none;
   transition: opacity 0.15s ease;
}

.inbox-import-pdf-lens.is-visible {
   opacity: 1;
}

.inbox-import-pdf-lens__canvas {
   display: block;
   width: 100%;
   height: auto;
}

.inbox-import-review__meta,
.inbox-import-products,
.inbox-import-attachments {
   padding: 1rem 1.1rem;
}

.inbox-import-review__meta {
   display: grid;
   gap: 0.8rem;
   border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .inbox-import-review__meta {
   padding-bottom: 0.85rem;
   gap: 0.65rem;
}

.inbox-import-review__field-grid {
   display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   gap: 0.75rem;
}

.inbox-import-review__field {
   padding: 0.8rem 0.9rem;
   border-radius: 14px;
   background: #f8fafc;
   border: 1px solid rgba(226, 232, 240, 0.95);
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .inbox-import-review__field {
   padding: 0.6rem 0.72rem;
   border-radius: 12px;
}

.inbox-import-review__field-label {
   display: block;
   font-size: 0.72rem;
   font-weight: 700;
   letter-spacing: 0.06em;
   color: #64748b;
   text-transform: uppercase;
   margin-bottom: 0.35rem;
}

.inbox-import-review__field-value {
   font-size: 0.95rem;
   color: var(--text-strong);
   line-height: 1.45;
   word-break: break-word;
}

.inbox-import-warnings {
   margin: 1rem 1.1rem 0;
   padding: 0.85rem 0.95rem;
   border-radius: 14px;
   border: 1px solid #fed7aa;
   background: #fff7ed;
   color: #9a3412;
   font-size: 0.9rem;
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .inbox-import-warnings {
   margin-top: 0.8rem;
   max-height: 120px;
   overflow: auto;
}

.inbox-import-products {
   min-height: 0;
   overflow: auto;
   display: grid;
   gap: 0.9rem;
}

.inbox-import-product-card {
   border: 1px solid rgba(254, 202, 202, 0.9);
   border-radius: 18px;
   padding: 0.95rem 1rem;
   background: #fff;
   box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.04);
   transition: opacity .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease;
   cursor: pointer;
}

.inbox-import-product-card:hover {
   transform: translateY(-1px);
}

.inbox-import-product-card.is-dimmed {
   opacity: .42;
}

.inbox-import-product-card.is-active {
   opacity: 1;
   border-color: var(--inbox-product-accent, #dc2626);
   box-shadow: 0 0 0 1px color-mix(in srgb, var(--inbox-product-accent, #dc2626) 28%, white), 0 8px 18px rgba(17, 17, 17, 0.07);
}

.inbox-import-product-card__header {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 0.8rem;
   margin-bottom: 0.7rem;
}

.inbox-import-product-card__title {
   font-weight: 700;
   color: var(--text-strong);
}

.inbox-import-product-card__subtitle {
   margin-top: 0.25rem;
   color: var(--text-muted);
   font-size: 0.88rem;
}

.inbox-import-product-card__qty {
   padding: 0.42rem 0.75rem;
   border-radius: 999px;
   background: #dc2626;
   color: #fff;
   font-weight: 700;
   font-size: 0.82rem;
   white-space: nowrap;
}

.inbox-import-product-card__sizes {
   display: flex;
   flex-wrap: wrap;
   gap: 0.45rem;
}

.inbox-import-product-card__size {
   padding: 0.35rem 0.6rem;
   border-radius: 999px;
   background: #f8fafc;
   border: 1px solid rgba(226, 232, 240, 0.95);
   font-size: 0.82rem;
   color: #475569;
   transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.inbox-import-product-card__size:hover,
.inbox-import-product-card__size.is-hovered-size {
   transform: translateY(-1px);
   border-color: var(--inbox-product-accent, #dc2626);
   box-shadow: 0 0 0 1px color-mix(in srgb, var(--inbox-product-accent, #dc2626) 20%, white);
}

.inbox-import-product-card__hover-chip {
   cursor: pointer;
   transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.inbox-import-product-card__hover-chip:hover,
.inbox-import-product-card__hover-chip.is-hovered-meta {
   transform: translateY(-1px);
   border-color: var(--inbox-product-accent, #dc2626);
   box-shadow: 0 0 0 1px color-mix(in srgb, var(--inbox-product-accent, #dc2626) 20%, white);
}

.inbox-import-attachments {
   border-top: 1px solid rgba(226, 232, 240, 0.85);
   display: grid;
   gap: 0.6rem;
   overflow: auto;
}

.inbox-process-overlay {
   position: fixed;
   inset: 0;
   z-index: 1800;
   display: none;
   align-items: center;
   justify-content: center;
   padding: 24px;
   background: rgba(15, 23, 42, 0.45);
   backdrop-filter: blur(8px);
}

.inbox-process-overlay.show {
   display: flex;
   animation: fadeIn 0.2s var(--transition);
}

.inbox-process-panel {
   width: min(92vw, 340px);
   padding: 2rem 1.75rem 1.85rem;
   border-radius: 20px;
   border: 1px solid rgba(226, 232, 240, 0.95);
   background: #fff;
   box-shadow:
      0 4px 6px -1px rgba(15, 23, 42, 0.06),
      0 24px 48px -12px rgba(15, 23, 42, 0.18);
   display: grid;
   justify-items: center;
   gap: 1.1rem;
   text-align: center;
   animation: inboxProcessPanelIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.inbox-process-panel__spinner {
   width: 48px;
   height: 48px;
   border-radius: 50%;
   border: 3px solid rgba(15, 118, 110, 0.12);
   border-top-color: #0f766e;
   animation: spin 0.8s linear infinite;
}

.inbox-process-panel__title {
   margin: 0;
   font-size: 1.05rem;
   font-weight: 600;
   letter-spacing: -0.02em;
   color: var(--text-strong);
   line-height: 1.35;
}

.inbox-process-panel__hint {
   margin: 0;
   max-width: 260px;
   font-size: 0.84rem;
   line-height: 1.5;
   color: var(--text-muted);
}

@keyframes inboxProcessPanelIn {
   from {
      opacity: 0;
      transform: translateY(10px) scale(0.97);
   }

   to {
      opacity: 1;
      transform: none;
   }
}

@keyframes inboxImportShimmer {
   from {
      background-position: 220% 0;
   }

   to {
      background-position: -40% 0;
   }
}

.inbox-import-attachments__title {
   font-size: 0.88rem;
   font-weight: 700;
   color: var(--text-strong);
}

.inbox-import-attachment-item {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 1rem;
   padding: 0.8rem 0.9rem;
   border-radius: 14px;
   background: #f8fafc;
   border: 1px solid rgba(226, 232, 240, 0.95);
}

.inbox-import-attachment-item__meta {
   display: grid;
   gap: 0.18rem;
   min-width: 0;
}

.inbox-import-attachment-item__name {
   font-size: 0.9rem;
   color: var(--text-strong);
   word-break: break-word;
}

.inbox-import-attachment-item__size {
   font-size: 0.8rem;
   color: var(--text-muted);
}

.inbox-import-modal__footer {
   display: flex;
   justify-content: flex-end;
   gap: 0.8rem;
   padding: 1rem 1.5rem 1.25rem;
   border-top: 1px solid rgba(226, 232, 240, 0.9);
   background: #fff;
}

.inbox-import-modal__footer .btn-cancel,
.inbox-import-modal__footer .btn-add {
   margin: 0;
   width: auto;
}

@media (max-width: 1024px) {
   body.togo-inbox-rail-enabled .form-page {
      max-width: none;
      min-height: 0;
      max-height: none;
      overflow: visible;
      padding-left: 16px;
      padding-right: 16px;
   }

   body.togo-inbox-rail-enabled .togo-intake-workspace {
      flex: none;
      min-height: 0;
   }

   body.togo-inbox-rail-enabled .togo-intake-workspace__main {
      height: auto;
      max-height: none;
      overflow: visible;
   }

   body.togo-inbox-rail-enabled .togo-intake-workspace__main > .container {
      flex: none;
      min-height: 0;
      overflow-y: visible;
   }

   body.togo-inbox-rail-enabled .togo-intake-workspace__rail-col {
      height: auto;
      max-height: none;
   }

   body.togo-inbox-rail-enabled .togo-intake-workspace,
   body.togo-inbox-rail-enabled.togo-inbox-rail-open .togo-intake-workspace {
      display: block;
   }

   /* Compare “single card” shell is desktop-grid only; avoid clipping / odd stacking on narrow viewports */
   body.togo-inbox-rail-enabled.togo-inbox-rail-open.togo-inbox-compare-active .togo-intake-workspace {
      border-radius: 0;
      overflow: visible;
      border: none;
      box-shadow: none;
      background: transparent;
   }

   body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-intake-workspace__rail-col {
      display: flex;
   }

   body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-intake-workspace__main {
      border-left: none;
      gap: 24px;
   }

   body.togo-inbox-rail-enabled .togo-inbox-rail {
      position: fixed;
      top: 0;
      left: 0;
      height: 100dvh;
      width: min(92vw, 440px);
      max-width: none;
      z-index: 1300;
      transform: translateX(-105%);
      opacity: 1;
      pointer-events: auto;
      transition: transform 0.28s var(--transition);
   }

   body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail {
      display: block;
      height: 100dvh;
      overflow: auto;
   }

   body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-host {
      position: relative;
      left: auto;
      width: 100%;
      min-height: 0;
      height: 100%;
      max-height: none;
      margin: 0;
      border-radius: 0;
      border-left: 0;
      border-right: 0;
      box-shadow: none;
   }

   body.togo-inbox-rail-enabled.togo-inbox-compare-active .togo-inbox-rail__pdf-host-meta {
      max-height: min(42vh, 480px);
   }

   body.togo-inbox-rail-enabled.togo-inbox-rail-open .togo-inbox-rail {
      transform: translateX(0);
   }

   body.togo-inbox-rail-enabled .togo-inbox-rail-backdrop:not(.hidden) {
      display: block;
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.52);
      backdrop-filter: blur(3px);
      z-index: 1200;
   }

   body.togo-inbox-rail-enabled .togo-inbox-rail-toggle {
      top: auto;
      bottom: 24px;
      left: 0;
      min-height: 78px;
   }

   .inbox-import-review {
      grid-template-columns: 1fr;
   }

   .inbox-import-review__panel--details {
      border-left: 0;
      border-top: 1px solid rgba(203, 213, 225, 0.95);
   }

   .inbox-process-panel {
      padding: 1.65rem 1.4rem 1.7rem;
   }
}

@media (max-width: 720px) {
   .product-search-row,
   .product-search-actions,
   .inbox-import-modal__toolbar,
   .inbox-import-card__header,
   .inbox-import-review__field-grid,
   .inbox-import-modal__footer,
   .togo-inbox-rail__header,
   .togo-inbox-rail__section-header {
      flex-direction: column;
      display: flex;
      align-items: stretch;
   }

   .inbox-import-card__time {
      max-width: none;
      align-self: stretch;
      text-align: left;
      white-space: normal;
      overflow: visible;
      text-overflow: unset;
   }

   .product-search-actions .btn-custom-product,
   .inbox-import-card__button,
   .inbox-import-modal__footer .btn-cancel,
   .inbox-import-modal__footer .btn-add {
      width: 100% !important;
   }

   .inbox-import-review {
      padding: 0.75rem;
   }

   .product-item-widget--comparison .product-item-header {
      align-items: stretch;
   }

   .product-item-total-badge {
      align-self: flex-start;
   }
}

/* ============================================
   CUSTOM COLOR PICKER BUTTON
   ============================================ */
.custom-color-picker-btn {
   width: 32px;
   height: 32px;
   border-radius: 4px;
   cursor: pointer;
   border: 2px dashed #94a3b8;
   background: #f8fafc;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   flex-shrink: 0;
}

.custom-color-picker-btn:hover {
   transform: scale(1.15);
   border-color: var(--primary);
   background: var(--bg-card);
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-color-picker-btn.has-color {
   border-style: solid;
   border-color: var(--primary);
   box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.2);
}

.custom-color-picker-btn .custom-color-plus {
   font-size: 1.25rem;
   font-weight: 300;
   color: var(--text-muted);
   line-height: 1;
}

.custom-color-picker-btn:hover .custom-color-plus {
   color: var(--primary);
}

.custom-color-picker-btn.selected {
   border-style: solid;
   border-color: var(--primary);
   box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.2);
   transform: scale(1.1);
}

/* ============================================
   COLOR PICKER MODAL
   ============================================ */
.color-picker-modal-overlay {
   z-index: 1100;
}

.color-picker-modal {
   background: var(--bg-card);
   border-radius: var(--radius-lg);
   max-width: 380px;
   width: 90%;
   max-height: 90vh;
   overflow: hidden;
   position: relative;
   box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.color-picker-modal-content {
   padding: 1.5rem;
}

.color-picker-form {
   display: flex;
   flex-direction: column;
   gap: 1.25rem;
   margin-top: 1rem;
}

.color-picker-container {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   background: var(--bg-surface);
   padding: 0.75rem;
   border-radius: var(--radius-md);
   border: 1px solid var(--border-soft);
}

.color-input-native {
   width: 48px;
   height: 48px;
   padding: 0;
   border: none;
   border-radius: var(--radius-sm);
   cursor: pointer;
   -webkit-appearance: none;
   appearance: none;
   background: transparent;
}

.color-input-native::-webkit-color-swatch-wrapper {
   padding: 0;
}

.color-input-native::-webkit-color-swatch {
   border: 2px solid var(--border-soft);
   border-radius: var(--radius-sm);
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-input-native::-moz-color-swatch {
   border: 2px solid var(--border-soft);
   border-radius: var(--radius-sm);
}

.color-preview-large {
   width: 48px;
   height: 48px;
   border-radius: var(--radius-sm);
   border: 2px solid var(--border-soft);
   background: #6366f1;
   box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
   transition: background-color 0.2s;
}

.color-hex-input {
   flex: 1;
   font-family: 'SF Mono', Monaco, Consolas, monospace;
   font-size: 0.9rem;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   padding: 0.5rem 0.75rem;
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   background: var(--bg-card);
}

.color-hex-input:focus {
   border-color: var(--primary);
   outline: none;
   box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.1);
}

/* ============================================
   SHARED PRINT LOCATIONS
   ============================================ */

.shared-print-locations-form-group {
   margin-top: 1rem;
   position: static;
   clear: both;
}

.shared-print-locations-header {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 1rem;
   margin-bottom: 0.9rem;
}

.btn-add-shared-location {
   flex-shrink: 0;
   min-width: 170px;
   width: auto !important;
   margin-top: 0 !important;
   align-self: flex-start;
   padding: 0.7rem 1rem;
   border: none;
   border-radius: var(--radius-sm);
   background: var(--accent);
   color: #fff;
   font-size: 0.9rem;
   font-weight: 700;
   cursor: pointer;
   transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-add-shared-location:hover {
   transform: translateY(-1px);
   box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.shared-print-locations-container {
   display: flex;
   flex-direction: column;
   gap: 0.85rem;
}

.shared-print-locations-empty {
   padding: 1rem;
   border: 1px dashed var(--border-soft);
   border-radius: var(--radius-md);
   background: var(--bg-surface);
   color: var(--text-muted);
   text-align: center;
   font-size: 0.9rem;
}

.shared-print-locations-list {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 0.9rem;
}

@media (max-width: 1100px) {
   .shared-print-locations-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
   }
}

@media (max-width: 700px) {
   .shared-print-locations-list {
      grid-template-columns: 1fr;
   }
}

.shared-print-location-card {
   --location-accent: var(--accent);
   position: relative;
   border: 1px solid color-mix(in srgb, var(--location-accent) 34%, var(--border-soft));
   border-radius: var(--radius-md);
   background: linear-gradient(180deg,
         color-mix(in srgb, var(--location-accent) 10%, #ffffff),
         color-mix(in srgb, var(--location-accent) 5%, #f8fafc));
   box-shadow: 0 4px 14px color-mix(in srgb, var(--location-accent) 14%, rgba(15, 23, 42, 0.05));
   overflow: hidden;
}

.shared-print-location-card::before {
   content: none;
}

.shared-print-location-card__body {
   padding: 0.7rem 0.75rem;
   display: flex;
   flex-direction: column;
   gap: 0.55rem;
}

.shared-print-location-card__header {
   display: flex;
   justify-content: space-between;
   gap: 0.8rem;
   align-items: flex-start;
}

.shared-print-location-card__title-wrap {
   display: flex;
   flex-direction: column;
   gap: 0.2rem;
}

.shared-print-location-card__title {
   font-size: 0.9rem;
   font-weight: 700;
   color: var(--text-strong);
   letter-spacing: 0.01em;
}

.shared-print-location-card__meta {
   display: flex;
   flex-wrap: wrap;
   gap: 0.4rem;
}

.shared-print-location-pill {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   padding: 0.2rem 0.45rem;
   border-radius: 999px;
   font-size: 0.68rem;
   font-weight: 600;
   background: color-mix(in srgb, var(--location-accent) 14%, #ffffff);
   border: 1px solid color-mix(in srgb, var(--location-accent) 30%, #ffffff);
   color: color-mix(in srgb, var(--location-accent) 46%, #1f2937);
}

.shared-print-location-card__actions {
   display: flex;
   flex-wrap: nowrap;
   gap: 0.35rem;
   justify-content: flex-end;
}

.shared-print-location-card__action-btn {
   width: 1.85rem;
   height: 1.85rem;
   padding: 0;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: var(--radius-sm);
   border: 1px solid var(--border-soft);
   background: var(--bg-card);
   color: var(--text-strong);
   cursor: pointer;
   transition: all 0.2s ease;
}

.shared-print-location-card__action-btn svg {
   width: 14px;
   height: 14px;
   fill: currentColor;
   display: block;
}

.shared-print-location-card__action-btn:hover {
   border-color: var(--accent);
   color: var(--accent);
   transform: translateY(-1px);
}

.shared-print-location-card__action-btn.delete:hover {
   border-color: #dc2626;
   color: #dc2626;
}

.shared-print-location-card__products {
   display: flex;
   flex-direction: column;
   gap: 0.3rem;
}

.shared-print-location-card__section-label {
   font-size: 0.66rem;
   font-weight: 700;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: var(--text-muted);
}

.shared-print-location-card__product-list {
   display: flex;
   flex-wrap: wrap;
   gap: 0.45rem;
}

.shared-print-location-card__product-pill {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   padding: 0.25rem 0.5rem;
   border-radius: 999px;
   background: color-mix(in srgb, var(--location-accent) 10%, white);
   border: 1px solid color-mix(in srgb, var(--location-accent) 28%, white);
   color: var(--text-strong);
   font-size: 0.7rem;
   font-weight: 600;
}

.shared-print-location-card__colors {
   display: flex;
   flex-wrap: wrap;
   gap: 0.45rem;
}

.shared-print-location-card__color-chip {
   display: inline-flex;
   align-items: center;
   gap: 0.45rem;
   padding: 0.22rem 0.45rem;
   border-radius: 999px;
   background: color-mix(in srgb, var(--location-accent) 9%, #ffffff);
   border: 1px solid color-mix(in srgb, var(--location-accent) 24%, #ffffff);
   font-size: 0.7rem;
   color: var(--text-strong);
}

.shared-print-location-card__color-swatch {
   width: 0.72rem;
   height: 0.72rem;
   border-radius: 999px;
   border: 1px solid rgba(15, 23, 42, 0.12);
   flex-shrink: 0;
}

.shared-print-location-card__empty {
   color: var(--text-muted);
   font-style: italic;
   font-size: 0.85rem;
}

.shared-print-location-modal {
   max-width: 980px;
   width: min(980px, 94vw);
}

.shared-print-location-modal-subtitle,
.shared-product-location-modal-subtitle {
   margin: -0.2rem 0 1rem;
   color: var(--text-muted);
   font-size: 0.92rem;
}

.shared-print-location-modal-grid {
   display: grid;
   grid-template-columns: 1fr;
   gap: 0.85rem;
}

.shared-progressive-modal .print-locations-modal-content {
   padding-top: 1.25rem;
}

.shared-progressive-modal .shared-print-step {
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
   background: var(--bg-card);
   overflow: visible;
   transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.shared-progressive-modal .shared-print-step.is-active {
   border-color: color-mix(in srgb, var(--accent) 35%, var(--border-soft));
   box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.shared-progressive-modal .shared-print-step.is-complete {
   border-color: color-mix(in srgb, #16a34a 30%, var(--border-soft));
}

.shared-progressive-modal .print-locations-section-header {
   margin: 0;
   padding: 0.9rem 1rem;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.75rem;
   font-size: 0.76rem;
   position: relative;
   z-index: 1;
}

.shared-progressive-modal .print-locations-section-header::after {
   content: none;
   display: none;
   font-size: 0.68rem;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   border-radius: 999px;
   padding: 0.18rem 0.55rem;
   flex-shrink: 0;
}

.shared-progressive-modal .shared-print-step.is-active .print-locations-section-header::after {
   content: 'Current';
   display: inline-block;
   color: var(--text-muted);
   background: var(--bg-surface);
   border: 1px solid var(--border-soft);
}

.shared-progressive-modal .shared-print-step.is-complete:not(.is-active) .print-locations-section-header::after {
   content: 'Done';
   display: inline-block;
   color: #166534;
   background: #dcfce7;
   border-color: #86efac;
}

.shared-progressive-modal .shared-print-step.is-upcoming .print-locations-section-header::after {
   content: 'Next';
   display: inline-block;
   color: var(--text-muted);
   background: var(--bg-surface);
   border: 1px solid var(--border-soft);
}

.shared-progressive-modal .shared-print-step.is-complete:not(.is-active) .print-locations-section-header {
   cursor: pointer;
   border-radius: var(--radius-md) var(--radius-md) 0 0;
   transition: background 0.15s ease;
}

.shared-progressive-modal .shared-print-step.is-complete:not(.is-active) .print-locations-section-header:hover {
   background: color-mix(in srgb, #16a34a 6%, var(--bg-card));
}

.shared-progressive-modal .shared-print-step.is-upcoming .print-locations-section-header {
   cursor: pointer;
   transition: background 0.15s ease;
}

.shared-progressive-modal .shared-print-step.is-upcoming .print-locations-section-header:hover {
   background: color-mix(in srgb, var(--primary, #2563eb) 5%, var(--bg-card));
}

.shared-progressive-modal .shared-print-step-body {
   max-height: 900px;
   opacity: 1;
   transform: translateY(0);
   overflow: visible;
   padding: 0 1rem 1rem;
   position: relative;
   z-index: 2;
   transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, padding 0.25s ease;
}

.shared-progressive-modal .shared-print-step.is-collapsed .shared-print-step-body {
   max-height: 0;
   opacity: 0;
   transform: translateY(-8px);
   padding-top: 0;
   padding-bottom: 0;
   pointer-events: none;
   overflow: hidden;
}

.shared-progressive-modal .shared-print-step-summary {
   padding: 0 1rem 0.75rem;
   margin-top: -0.15rem;
   border-bottom: 1px solid var(--border-soft);
   background: color-mix(in srgb, var(--bg-surface) 88%, var(--bg-card));
}

.shared-progressive-modal .shared-print-step-summary[hidden] {
   display: none !important;
}

.shared-progressive-modal .shared-print-step-summary__inner {
   font-size: 0.82rem;
   line-height: 1.45;
   color: var(--text-strong);
}

.shared-progressive-modal .shared-print-step-summary__muted {
   color: var(--text-muted);
   font-size: 0.8rem;
}

.shared-progressive-modal .shared-print-step-summary__tag {
   display: inline-block;
   margin-left: 0.25rem;
   padding: 0.08rem 0.35rem;
   font-size: 0.65rem;
   font-weight: 700;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   color: var(--text-muted);
   background: var(--bg-card);
   border: 1px solid var(--border-soft);
   border-radius: 999px;
   vertical-align: middle;
}

.shared-progressive-modal .shared-print-step-summary__line {
   margin-bottom: 0.35rem;
}

.shared-progressive-modal .shared-print-step-summary__line strong {
   display: block;
   font-size: 0.65rem;
   font-weight: 700;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   color: var(--text-muted);
   margin-bottom: 0.2rem;
}

.shared-progressive-modal .shared-print-step-summary__colors {
   display: flex;
   flex-wrap: wrap;
   gap: 0.35rem 0.65rem;
   align-items: center;
}

.shared-progressive-modal .shared-print-step-summary__color {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   font-size: 0.78rem;
   color: var(--text-strong);
}

.shared-progressive-modal .shared-print-step-summary__swatch {
   width: 0.65rem;
   height: 0.65rem;
   border-radius: 2px;
   border: 1px solid var(--border-soft);
   flex-shrink: 0;
}

.shared-progressive-modal .shared-print-step-summary__products {
   font-size: 0.8rem;
   color: var(--text-strong);
   line-height: 1.4;
}

.shared-progressive-modal .shared-print-step-summary__sep {
   color: var(--text-muted);
   font-weight: 400;
}

.shared-progressive-modal .shared-print-step.is-upcoming {
   opacity: 0.92;
}

.shared-print-location-custom {
   margin-top: 1rem;
}

.shared-progressive-modal .print-locations-subsection {
   padding: 0.9rem;
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-md);
   background: linear-gradient(180deg, #ffffff, var(--bg-surface));
   margin-bottom: 0.85rem;
}

.shared-progressive-modal .print-locations-subsection-title {
   margin: 0 0 0.4rem;
   font-size: 0.78rem;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   color: var(--text-muted);
}

.shared-progressive-modal .print-locations-divider {
   margin: 0 0 0.7rem 0;
}

.shared-progressive-modal .print-locations-checkbox-grid {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 0.55rem;
}

.shared-progressive-modal .print-locations-checkbox-item {
   position: relative;
   margin: 0;
   cursor: pointer;
   min-height: 48px;
}

.shared-progressive-modal .print-locations-checkbox-item input[type="radio"] {
   position: absolute;
   opacity: 0;
   width: 0;
   height: 0;
   pointer-events: none;
}

.shared-progressive-modal .print-locations-checkbox-item span {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   min-height: 48px;
   padding: 0.55rem 0.75rem;
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   background: var(--bg-card);
   color: var(--text-strong);
   font-size: 0.79rem;
   font-weight: 600;
   letter-spacing: 0.01em;
   text-align: center;
   transition: all 0.2s ease;
}

.shared-progressive-modal .print-locations-checkbox-item:hover span {
   border-color: color-mix(in srgb, var(--accent) 45%, var(--border-soft));
   background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
   transform: translateY(-1px);
   box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.shared-progressive-modal .print-locations-checkbox-item input[type="radio"]:checked+span {
   border-color: var(--accent);
   background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
   color: var(--text-strong);
   box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.shared-progressive-modal .print-locations-checkbox-item input[type="radio"]:checked+span::before {
   content: '✓';
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 16px;
   height: 16px;
   margin-right: 0.45rem;
   border-radius: 999px;
   background: var(--accent);
   color: #fff;
   font-size: 0.67rem;
   font-weight: 700;
   flex-shrink: 0;
}

.shared-print-location-custom label {
   display: block;
   margin-bottom: 0.45rem;
   font-size: 0.8rem;
   font-weight: 700;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: 0.05em;
}

.shared-print-location-custom-input {
   width: 100%;
}

.shared-print-location-colors {
   margin-top: 1rem;
   margin-bottom: 0.75rem;
}

.shared-assigned-products-toolbar {
   display: flex;
   flex-wrap: nowrap;
   justify-content: flex-end;
   align-items: center;
   gap: 0.35rem;
   margin-bottom: 0.5rem;
}

.shared-assigned-products-toolbar[hidden] {
   display: none !important;
}

.print-assign-toolbar__icon-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 32px;
   height: 32px;
   padding: 0;
   margin: 0;
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   background: var(--bg-card);
   color: var(--text-muted);
   cursor: pointer;
   flex-shrink: 0;
   transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease,
      box-shadow 0.15s ease;
}

.print-assign-toolbar__icon-btn:hover {
   color: var(--primary, #2563eb);
   border-color: var(--border-strong);
   background: var(--bg-surface);
}

.print-assign-toolbar__icon-btn:focus-visible {
   outline: none;
   box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px rgba(var(--primary-rgb, 37, 99, 235), 0.35);
}

.print-assign-toolbar__icon {
   display: block;
   flex-shrink: 0;
}

.shared-print-location-products-empty,
.shared-product-location-empty {
   padding: 0.85rem;
   border: 1px dashed var(--border-soft);
   border-radius: var(--radius-sm);
   background: var(--bg-surface);
   color: var(--text-muted);
   font-size: 0.85rem;
   text-align: center;
}

.shared-print-location-products-list,
.shared-product-location-list {
   display: flex;
   flex-direction: column;
   gap: 0.55rem;
}

.shared-print-location-product-option,
.shared-product-location-option {
   display: flex;
   align-items: flex-start;
   gap: 0.7rem;
   padding: 0.75rem;
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   background: var(--bg-card);
}

.shared-print-location-product-option input,
.shared-product-location-option input {
   margin-top: 0.15rem;
}

.shared-print-location-product-option__meta,
.shared-product-location-option__meta {
   display: flex;
   flex-direction: column;
   gap: 0.15rem;
}

.shared-print-location-product-option__name,
.shared-product-location-option__name {
   font-size: 0.86rem;
   font-weight: 700;
   color: var(--text-strong);
}

.shared-print-location-product-option__details,
.shared-product-location-option__details {
   font-size: 0.78rem;
   color: var(--text-muted);
}

.shared-print-location-branching-hint {
   margin-top: 1rem;
   padding: 0.85rem 1rem;
   border-radius: var(--radius-sm);
   background: #fff7ed;
   border: 1px solid #fdba74;
   color: #9a3412;
   font-size: 0.84rem;
}

.shared-print-location-modal-actions {
   margin-top: 1rem;
}

.shared-print-location-modal .hidden {
   display: none !important;
}

.file-item-source-badge {
   display: inline-flex;
   align-items: center;
   margin-left: 0.5rem;
   padding: 0.12rem 0.42rem;
   border-radius: 999px;
   background: #ecfeff;
   color: #0f766e;
   font-size: 0.68rem;
   font-weight: 700;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   vertical-align: middle;
}

.product-item-heading {
   display: grid;
   gap: 0.32rem;
}

.product-item-total-badge {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 0.45rem 0.78rem;
   border-radius: 999px;
   background: linear-gradient(180deg, color-mix(in srgb, var(--inbox-product-accent, #111111) 90%, white), var(--inbox-product-accent, #111111));
   color: #fff;
   font-weight: 700;
   font-size: 0.78rem;
   white-space: nowrap;
   box-shadow: 0 10px 18px color-mix(in srgb, var(--inbox-product-accent, #111111) 22%, transparent);
}

.product-item-widget--comparison {
   border-color: color-mix(in srgb, var(--inbox-product-accent, #0f766e) 22%, #dbe4ef);
   box-shadow: 0 18px 36px color-mix(in srgb, var(--inbox-product-accent, #0f766e) 8%, transparent);
   transition: opacity .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.product-item-widget--comparison.is-dimmed {
   opacity: 0.4;
}

.product-item-widget--comparison.is-active {
   border-color: var(--inbox-product-accent, #0f766e);
   box-shadow: 0 0 0 1px color-mix(in srgb, var(--inbox-product-accent, #0f766e) 26%, white), 0 18px 36px color-mix(in srgb, var(--inbox-product-accent, #0f766e) 12%, transparent);
}

.product-item-compare-chips,
.product-item-size-pills {
   display: flex;
   flex-wrap: wrap;
   gap: 0.42rem;
}

.product-item-compare-chip,
.product-item-size-pill {
   display: inline-flex;
   align-items: center;
   gap: 0.3rem;
   padding: 0.34rem 0.62rem;
   border-radius: 999px;
   border: 1px solid rgba(226, 232, 240, 0.95);
   background: #f8fafc;
   color: #475569;
   font-size: 0.78rem;
   font-weight: 600;
   line-height: 1;
   transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.product-item-compare-chip--muted {
   background: #f1f5f9;
}

.product-item-widget--comparison [data-hover-kind] {
   cursor: pointer;
}

.product-item-widget--comparison [data-hover-kind]:hover,
.product-item-widget--comparison [data-hover-kind].is-hovered-meta,
.product-item-widget--comparison .product-item-size-pill:hover,
.product-item-widget--comparison .product-item-size-pill.is-hovered-size {
   transform: translateY(-1px);
   border-color: var(--inbox-product-accent, #0f766e);
   box-shadow: 0 0 0 1px color-mix(in srgb, var(--inbox-product-accent, #0f766e) 20%, white);
   background: color-mix(in srgb, var(--inbox-product-accent-bg, rgba(15, 118, 110, .16)) 80%, white);
}

body.togo-inbox-rail-enabled.togo-inbox-compare-active .product-items-container {
   gap: 0.42rem;
}

.product-item-widget--comparison-compact {
   position: relative;
   display: block;
   padding: 0.42rem 4.25rem 2.45rem 0.5rem;
   border-radius: 14px;
   gap: 0;
}

.product-item-compact__main {
   display: flex;
   align-items: flex-start;
   gap: 0.5rem;
   min-width: 0;
}

.product-item-compact__thumb {
   flex-shrink: 0;
   width: 40px;
   height: 40px;
   border-radius: 10px;
   overflow: hidden;
   border: 1px solid rgba(226, 232, 240, 0.95);
   background: #f8fafc;
}

.product-item-compact__thumb-img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
}

.product-item-compact__thumb-ph {
   position: relative;
   width: 100%;
   height: 100%;
   display: grid;
   place-items: center;
   color: #94a3b8;
   background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
}

.product-item-compact__thumb-garment {
   width: 22px;
   height: 22px;
   opacity: 0.88;
}

.product-item-compact__thumb-ph--custom .product-item-compact__thumb-garment {
   opacity: 0.65;
}

.product-item-compact__thumb-ph-c {
   position: absolute;
   right: 2px;
   bottom: 2px;
   min-width: 14px;
   height: 14px;
   padding: 0 3px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 4px;
   font-size: 0.55rem;
   font-weight: 800;
   line-height: 1;
   color: #fff;
   background: #0284c7;
}

.product-item-compact__body {
   flex: 1;
   min-width: 0;
   display: flex;
   flex-direction: column;
   gap: 0.28rem;
}

.product-item-compact__top {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 0.35rem 0.45rem;
   min-width: 0;
}

.product-item-compact__idx {
   flex-shrink: 0;
   width: 22px;
   height: 22px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 999px;
   background: var(--inbox-product-accent, #0f766e);
   color: #fff;
   font-size: 0.68rem;
   font-weight: 800;
   line-height: 1;
}

.product-item-compare-chips--compact {
   flex: 1;
   min-width: 0;
   gap: 0.28rem;
}

.product-item-widget--comparison-compact .product-item-compare-chip {
   padding: 0.18rem 0.45rem;
   font-size: 0.66rem;
   font-weight: 600;
}

.product-item-total-badge--compact {
   padding: 0.22rem 0.55rem;
   font-size: 0.68rem;
}

.product-item-total-badge--compact-pos {
   position: absolute;
   top: 0.42rem;
   right: 0.5rem;
   z-index: 2;
   margin: 0;
}

.product-item-actions--compact {
   display: inline-flex;
   flex-direction: row;
   gap: 0.12rem;
}

.product-item-actions--compact-pos {
   position: absolute;
   bottom: 0.42rem;
   right: 0.5rem;
   z-index: 2;
   margin: 0;
}

.product-item-actions--compact .btn-icon--compact {
   width: 28px;
   height: 28px;
   padding: 0;
   border-radius: 8px;
}

.product-item-compact__title-row {
   display: flex;
   align-items: flex-start;
   gap: 0.35rem;
   min-width: 0;
}

.product-item-compact__dot {
   flex-shrink: 0;
   width: 6px;
   height: 6px;
   margin-top: 0.38rem;
   border-radius: 50%;
   background: var(--inbox-product-accent, #0f766e);
}

.product-item-compact__title {
   font-size: 0.8rem;
   font-weight: 700;
   line-height: 1.35;
   color: var(--text-strong);
   min-width: 0;
}

.product-item-compact__custom {
   font-size: 0.62rem;
   font-weight: 700;
   margin-left: 0.25rem;
   padding: 0.1rem 0.35rem;
   border-radius: 4px;
   background: #e0f2fe;
   color: #0284c7;
   vertical-align: middle;
}

.product-item-widget--comparison-compact .product-item-size-pills {
   gap: 0.28rem;
}

.product-item-widget--comparison-compact .product-item-size-pill {
   padding: 0.16rem 0.42rem;
   font-size: 0.66rem;
}

.product-item-compact__loc-link {
   align-self: flex-start;
   margin: 0.1rem 0 0;
   padding: 0;
   border: 0;
   background: none;
   font-size: 0.68rem;
   font-weight: 600;
   color: #0f766e;
   text-decoration: underline;
   text-underline-offset: 2px;
   cursor: pointer;
}

.product-item-compact__loc-link:hover {
   color: #115e59;
}

.product-items-inbox-expand-row {
   display: flex;
   justify-content: center;
   padding: 0.5rem 0 0.15rem;
}

.product-items-inbox-expand-btn {
   margin: 0;
   padding: 0.4rem 0.95rem;
   border-radius: 999px;
   border: 1px solid rgba(15, 118, 110, 0.28);
   background: #f0fdfa;
   color: #0f766e;
   font-size: 0.8rem;
   font-weight: 600;
   cursor: pointer;
   transition: background 0.15s ease, border-color 0.15s ease;
}

.product-items-inbox-expand-btn:hover {
   background: #ccfbf1;
   border-color: rgba(15, 118, 110, 0.45);
}

/* ============================================
   PRODUCT PRINT LOCATIONS
   ============================================ */

/* Hide the main Print Locations form group */
.print-locations-form-group-hidden {
   display: none !important;
}

/* Print Locations Section in Product Widget */
.product-print-locations-section {
   margin-top: 0.75rem;
   padding-top: 0.75rem;
   border-top: 1px solid var(--border-soft);
}

.product-print-locations-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.75rem;
   margin-bottom: 0.75rem;
   flex-wrap: nowrap;
}

.product-print-locations-label {
   font-size: 11px;
   font-weight: 600;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: 0.05em;
   flex-shrink: 0;
   white-space: nowrap;
}

.btn-print-locations {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   padding: 6px 12px;
   font-size: 11px;
   font-weight: 600;
   background: var(--accent);
   color: var(--bg-card);
   border: 1px solid var(--accent);
   border-radius: var(--radius-sm);
   cursor: pointer;
   transition: all 0.2s;
   text-transform: uppercase;
   letter-spacing: 0.05em;
   box-shadow: none;
   white-space: nowrap;
   flex-shrink: 0;
   width: auto;
   min-width: auto;
   max-width: none;
}

.btn-print-locations:hover {
   background: var(--accent-soft);
   border-color: var(--accent-soft);
   transform: translateY(-1px);
   box-shadow: 0 4px 12px rgba(17, 17, 17, 0.15);
}

.btn-print-locations svg {
   width: 14px;
   height: 14px;
}

.product-print-locations-tags {
   display: flex;
   flex-wrap: wrap;
   gap: 0.5rem;
   min-height: 1.5rem;
   align-items: flex-start;
   width: 100%;
}

.product-location-tag {
   display: inline-flex;
   align-items: center;
   padding: 0.3rem 0.6rem;
   background: linear-gradient(135deg, #ecfdf5, #d1fae5);
   color: #047857;
   font-size: 0.7rem;
   font-weight: 600;
   border-radius: 4px;
   border: 1px solid #a7f3d0;
   text-transform: uppercase;
   letter-spacing: 0.3px;
}

.product-location-tag--shared {
   --location-accent: var(--accent);
   display: inline-flex;
   align-items: center;
   gap: 0.45rem;
   padding: 0.4rem 0.65rem;
   border-radius: 999px;
   background: color-mix(in srgb, var(--location-accent) 10%, white);
   border: 1px solid color-mix(in srgb, var(--location-accent) 25%, white);
   color: var(--text-strong);
   font-size: 0.75rem;
   font-weight: 700;
   text-transform: none;
   letter-spacing: normal;
}

.product-location-tag__accent {
   width: 0.7rem;
   height: 0.7rem;
   border-radius: 999px;
   background: var(--location-accent);
   flex-shrink: 0;
}

.product-location-tag__remove {
   border: none;
   background: transparent;
   color: var(--text-muted);
   cursor: pointer;
   padding: 0;
   display: inline-flex;
   align-items: center;
   justify-content: center;
}

.product-location-tag__remove:hover {
   color: #dc2626;
}

.product-location-tag__remove svg {
   width: 12px;
   height: 12px;
}

.product-location-card {
   --location-accent: var(--accent);
   display: flex;
   flex-direction: column;
   gap: 0.55rem;
   min-width: 220px;
   padding: 0.75rem;
   background: var(--bg-card);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
   position: relative;
}

.product-location-card--shared {
   border-color: color-mix(in srgb, var(--location-accent) 24%, var(--border-soft));
   background: linear-gradient(180deg,
         color-mix(in srgb, var(--location-accent) 7%, white),
         var(--bg-card));
}

.product-location-card__main {
   display: flex;
   align-items: center;
   gap: 0.45rem;
}

.product-location-card__position-wrap {
   display: inline-flex;
   align-items: center;
   gap: 0.45rem;
   min-width: 0;
   margin-right: auto;
}

.product-location-card__accent {
   width: 0.75rem;
   height: 0.75rem;
   border-radius: 999px;
   background: var(--location-accent);
   flex-shrink: 0;
}

.product-location-card__position {
   font-size: 0.75rem;
   font-weight: 700;
   color: var(--text-strong);
   text-transform: uppercase;
   letter-spacing: 0.03em;
}

.product-location-card__size-badge {
   display: inline-flex;
   align-items: center;
   padding: 0.18rem 0.45rem;
   border-radius: 999px;
   background: rgba(15, 23, 42, 0.06);
   color: var(--text-strong);
   font-size: 0.68rem;
   font-weight: 700;
   white-space: nowrap;
}

.product-location-card--shared .product-location-card__size-badge {
   background: color-mix(in srgb, var(--location-accent) 14%, #ffffff);
   border: 1px solid color-mix(in srgb, var(--location-accent) 30%, #ffffff);
   color: color-mix(in srgb, var(--location-accent) 52%, #111827);
}

.product-location-card__size-badge--empty {
   background: rgba(15, 23, 42, 0.04);
   color: var(--text-muted);
   font-weight: 600;
}

.product-location-card__remove {
   border: none;
   background: transparent;
   color: var(--text-muted);
   cursor: pointer;
   padding: 0;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: auto;
   margin: 0;
   min-width: 0;
}

.product-location-card__remove:hover {
   color: #dc2626;
   box-shadow: none;
   transform: none;
   background: transparent;
}

.product-location-card__colors-section {
   padding-top: 0.55rem;
   border-top: 1px dashed color-mix(in srgb, var(--location-accent) 22%, var(--border-soft));
}

.product-location-card__colors-list {
   display: flex;
   flex-direction: column;
   gap: 0.35rem;
}

.product-location-card__color-item {
   display: inline-flex;
   align-items: center;
   gap: 0.4rem;
}

.product-location-card__color-swatch {
   width: 0.78rem;
   height: 0.78rem;
   border-radius: 3px;
   border: 1px solid rgba(15, 23, 42, 0.12);
   flex-shrink: 0;
}

.product-location-card__color-name,
.product-location-card__no-colors {
   font-size: 0.7rem;
   color: var(--text-muted);
}

.product-location-card__no-colors {
   font-style: italic;
}

.no-locations-text {
   font-size: 11px;
   color: var(--text-muted);
   font-style: italic;
}

/* ============================================
   PRODUCT PRINT LOCATIONS MODAL
   ============================================ */
.product-pl-modal-overlay {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(0, 0, 0, 0.5);
   backdrop-filter: blur(4px);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 1050;
   opacity: 0;
   visibility: hidden;
   transition: all 0.3s ease;
}

.product-pl-modal-overlay.show {
   opacity: 1;
   visibility: visible;
}

.product-pl-modal {
   background: var(--bg-card);
   border-radius: var(--radius-lg);
   max-width: 520px;
   width: 90%;
   max-height: 85vh;
   overflow: hidden;
   position: relative;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
   transform: scale(0.95) translateY(20px);
   transition: transform 0.3s ease;
}

.product-pl-modal-overlay.show .product-pl-modal {
   transform: scale(1) translateY(0);
}

.product-pl-modal-close {
   position: absolute;
   top: 0.75rem;
   right: 0.75rem;
   background: none;
   border: none;
   font-size: 1.75rem;
   color: var(--text-muted);
   cursor: pointer;
   line-height: 1;
   padding: 0.5rem;
   border-radius: 4px;
   transition: all 0.2s;
   z-index: 10;
   width: auto;
   height: auto;
   min-width: 2rem;
   min-height: 2rem;
   display: flex;
   align-items: center;
   justify-content: center;
}

.product-pl-modal-close:hover {
   color: var(--text-strong);
   background: var(--bg-surface);
}

.product-pl-modal-content {
   padding: 1.5rem;
   overflow-y: auto;
   max-height: calc(85vh - 80px);
}

.product-pl-modal-title {
   font-size: 1.1rem;
   font-weight: 700;
   color: var(--text-strong);
   margin: 0 0 1.25rem 0;
   padding-right: 3.5rem;
   /* Increased padding to prevent overlap with close button */
   line-height: 1.4;
}

.product-pl-checkboxes {
   display: flex;
   flex-direction: column;
   gap: 1.25rem;
}

.product-pl-section {
   background: var(--bg-surface);
   border-radius: var(--radius-md);
   padding: 1rem;
   border: 1px solid var(--border-soft);
}

.product-pl-section h5 {
   font-size: 0.75rem;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 1px;
   color: var(--text-muted);
   margin: 0 0 0.75rem 0;
   padding-bottom: 0.5rem;
   border-bottom: 1px solid var(--border-soft);
}

.product-pl-grid {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 0.5rem;
}

@media (max-width: 480px) {
   .product-pl-grid {
      grid-template-columns: 1fr;
   }
}

.product-pl-option {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   padding: 0.6rem 0.75rem;
   background: var(--bg-card);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   cursor: pointer;
   transition: all 0.2s;
}

.product-pl-option:hover {
   border-color: var(--primary);
   background: #f0f9ff;
}

.product-pl-option input[type="checkbox"] {
   width: 18px;
   height: 18px;
   accent-color: var(--primary);
   cursor: pointer;
   flex-shrink: 0;
}

.product-pl-option span {
   font-size: 0.85rem;
   font-weight: 500;
   color: var(--text-strong);
}

.product-pl-option:has(input:checked) {
   border-color: var(--primary);
   background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.shared-product-location-option {
   cursor: pointer;
}

.shared-product-location-option:has(input:checked) {
   border-color: var(--primary);
   background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.product-pl-modal-actions {
   display: flex;
   justify-content: flex-end;
   gap: 0.75rem;
   margin-top: 1.5rem;
   padding-top: 1rem;
   border-top: 1px solid var(--border-soft);
}

/* Custom Locations Section */
.product-pl-custom-section {
   margin-top: 0.75rem;
   background: var(--bg-surface);
   border-radius: var(--radius-md);
   padding: 1rem;
   border: 1px solid var(--border-soft);
}

.product-pl-custom-input-group {
   display: flex;
   flex-direction: row;
   gap: 0.75rem;
   margin-bottom: 0.75rem;
   align-items: center;
   width: 100%;
}

.product-pl-custom-input {
   flex: 1 1 auto;
   min-width: 200px;
   width: 100%;
   height: 42px;
   padding: 0 1rem;
   font-size: 0.9rem;
   border: 1px solid #e2e8f0;
   border-radius: var(--radius-sm);
   background: #ffffff;
   color: #1e293b;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   box-sizing: border-box;
}

.product-pl-custom-input:focus {
   outline: none;
   border-color: var(--primary);
   box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.product-pl-custom-input::placeholder {
   color: #94a3b8;
   opacity: 1;
}

.btn-add-custom-location {
   flex: 0 0 auto;
   min-width: 80px;
   width: auto;
   height: 42px;
   padding: 0 1.5rem;
   font-size: 0.9rem;
   font-weight: 600;
   color: #ffffff !important;
   background-color: #3b82f6 !important;
   border: none;
   border-radius: var(--radius-sm);
   cursor: pointer;
   white-space: nowrap;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
   display: inline-flex;
   align-items: center;
   justify-content: center;
   box-sizing: border-box;
}

.btn-add-custom-location:hover {
   background-color: #2563eb !important;
   transform: translateY(-1px);
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-add-custom-location:active {
   transform: translateY(0);
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.product-pl-custom-list {
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
   max-height: 200px;
   overflow-y: auto;
}

.product-pl-custom-item {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 0.6rem 0.75rem;
   background: var(--bg-card);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   font-size: 0.85rem;
   color: var(--text-strong);
}

.product-pl-custom-item span {
   flex: 1;
   font-weight: 500;
}

.product-pl-custom-remove {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 24px;
   height: 24px;
   padding: 0;
   background: transparent;
   border: none;
   border-radius: var(--radius-sm);
   color: var(--text-muted);
   cursor: pointer;
   transition: all 0.2s;
   flex-shrink: 0;
}

.product-pl-custom-remove:hover {
   background: var(--error-light);
   color: var(--error);
}

.product-pl-custom-remove svg {
   width: 14px;
   height: 14px;
}

@media (max-width: 640px) {
   .shared-progressive-modal .print-locations-checkbox-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
   }

   .shared-progressive-modal .print-locations-section-header {
      flex-direction: column;
      align-items: flex-start;
   }

   .shared-progressive-modal .print-locations-section-header::after {
      align-self: flex-start;
   }

   .shared-print-locations-header {
      flex-direction: column;
   }

   .btn-add-shared-location {
      width: 100%;
   }

   .shared-print-location-card__header {
      flex-direction: column;
   }

   .shared-print-location-card__actions {
      width: 100%;
      justify-content: flex-end;
   }
}

@media (max-width: 420px) {
   .shared-progressive-modal .print-locations-checkbox-grid {
      grid-template-columns: 1fr;
   }
}

/* ============================================
   PRODUCT PRINT LOCATION DETAILS MODAL
   ============================================ */
.product-pl-details-modal-overlay {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(0, 0, 0, 0.5);
   backdrop-filter: blur(4px);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 1100;
   opacity: 1;
   visibility: visible;
   transition: all 0.3s ease;
}

.product-pl-details-modal-overlay.hidden {
   opacity: 0;
   visibility: hidden;
}

.product-pl-details-modal {
   background: var(--bg-card);
   border-radius: var(--radius-lg);
   max-width: 480px;
   width: 90%;
   max-height: 85vh;
   overflow: hidden;
   position: relative;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
   padding: 1.5rem;
   display: flex;
   flex-direction: column;
}

.product-pl-details-subtitle {
   font-size: 1rem;
   font-weight: 600;
   color: var(--accent);
   margin: 0 0 1.25rem 0;
   padding-bottom: 0.75rem;
   border-bottom: 2px solid var(--border-soft);
}

.product-pl-details-modal-content {
   overflow-y: auto;
   flex: 1;
   display: flex;
   flex-direction: column;
   gap: 1.25rem;
}

.product-pl-details-section {
   background: var(--bg-surface);
   border-radius: var(--radius-md);
   padding: 1rem;
   border: 1px solid var(--border-soft);
}

.product-pl-details-section-title {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   font-size: 0.85rem;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   color: var(--text-strong);
   margin: 0 0 1rem 0;
}

.product-pl-details-section-title svg {
   color: var(--accent);
}

/* Imprint Size Inputs */
.product-pl-imprint-size-inputs {
   display: flex;
   align-items: flex-end;
   gap: 0.75rem;
}

.product-pl-imprint-size-field {
   flex: 1;
}

.product-pl-imprint-size-field label {
   display: block;
   font-size: 0.75rem;
   font-weight: 600;
   color: var(--text-muted);
   margin-bottom: 0.35rem;
   text-transform: uppercase;
   letter-spacing: 0.5px;
}

.product-pl-imprint-size-input-wrapper {
   display: flex;
   align-items: center;
   background: var(--bg-card);
   border: 1px solid var(--border-medium);
   border-radius: var(--radius-sm);
   overflow: hidden;
   transition: border-color 0.2s;
}

.product-pl-imprint-size-input-wrapper:focus-within {
   border-color: var(--primary);
   box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.product-pl-imprint-size-input-wrapper input {
   flex: 1;
   border: none;
   padding: 0.6rem 0.75rem;
   font-size: 1rem;
   font-weight: 500;
   background: transparent;
   text-align: center;
   min-width: 0;
   height: auto;
   box-shadow: none;
}

.product-pl-imprint-size-input-wrapper input:focus {
   outline: none;
   box-shadow: none;
}

.product-pl-imprint-size-unit {
   padding: 0 0.75rem 0 0;
   font-size: 0.9rem;
   color: var(--text-muted);
   font-weight: 500;
}

.product-pl-imprint-size-separator {
   font-size: 1.25rem;
   color: var(--text-muted);
   font-weight: 300;
}

/* Ink Color Search */
.product-pl-ink-color-search-container {
   position: relative;
   margin-bottom: 0.75rem;
}

.product-pl-ink-color-search-input {
   width: 100%;
   padding: 0.65rem 1rem;
   font-size: 0.9rem;
   border: 1px solid var(--border-medium);
   border-radius: var(--radius-sm);
   background: var(--bg-card);
   transition: border-color 0.2s, box-shadow 0.2s;
}

.product-pl-ink-color-search-input:focus {
   border-color: var(--primary);
   outline: none;
   box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.product-pl-ink-color-dropdown {
   position: absolute;
   top: 100%;
   left: 0;
   right: 0;
   background: var(--bg-card);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
   max-height: 200px;
   overflow-y: auto;
   z-index: 100;
   margin-top: 4px;
}

.product-pl-ink-color-dropdown.hidden {
   display: none;
}

.product-pl-ink-color-dropdown-item {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   padding: 0.65rem 1rem;
   cursor: pointer;
   transition: background 0.15s;
}

.product-pl-ink-color-dropdown-item:hover {
   background: var(--bg-surface);
}

.product-pl-ink-color-dropdown-item__swatch {
   width: 20px;
   height: 20px;
   border-radius: 3px;
   border: 1px solid rgba(0, 0, 0, 0.1);
   flex-shrink: 0;
}

.product-pl-ink-color-dropdown-item__name {
   font-size: 0.85rem;
   font-weight: 500;
   color: var(--text-strong);
}

.product-pl-ink-color-dropdown-empty {
   padding: 1rem;
   text-align: center;
   color: var(--text-muted);
   font-size: 0.85rem;
}

.product-pl-ink-color-dropdown-add-custom {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   padding: 0.75rem 1rem;
   background: #f0f9ff;
   border-top: 1px solid var(--border-soft);
   cursor: pointer;
   font-size: 0.85rem;
   font-weight: 600;
   color: var(--primary);
   transition: background 0.15s;
}

.product-pl-ink-color-dropdown-add-custom:hover {
   background: #dbeafe;
}

/* Selected Ink Colors List */
.product-pl-ink-colors-list {
   display: flex;
   flex-wrap: wrap;
   gap: 0.5rem;
   min-height: 2rem;
}

.product-pl-ink-colors-empty {
   font-size: 0.85rem;
   color: var(--text-muted);
   font-style: italic;
   padding: 0.5rem 0;
}

.product-pl-ink-color-chip {
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   padding: 0.4rem 0.6rem;
   background: var(--bg-card);
   border: 1px solid var(--border-soft);
   border-radius: 999px;
   font-size: 0.8rem;
   font-weight: 500;
   transition: all 0.2s;
}

.product-pl-ink-color-chip:hover {
   border-color: var(--border-medium);
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-pl-ink-color-chip__number {
   min-width: 18px;
   height: 18px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.7rem;
   font-weight: 700;
   background: var(--accent);
   color: var(--bg-card);
   border-radius: 50%;
}

.product-pl-ink-color-chip__swatch {
   width: 16px;
   height: 16px;
   border-radius: 3px;
   border: 1px solid rgba(0, 0, 0, 0.1);
   flex-shrink: 0;
}

.product-pl-ink-color-chip__name {
   color: var(--text-strong);
}

.product-pl-ink-color-chip__remove {
   background: none;
   border: none;
   padding: 0;
   margin: 0;
   width: 18px;
   height: 18px;
   min-width: 18px;
   min-height: 18px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   cursor: pointer;
   color: var(--text-muted);
   transition: all 0.15s;
}

.product-pl-ink-color-chip__remove:hover {
   background: #fee2e2;
   color: #dc2626;
}

.product-pl-ink-color-chip__remove svg {
   width: 14px;
   height: 14px;
}

.product-pl-details-modal-actions {
   display: flex;
   justify-content: flex-end;
   gap: 0.75rem;
   margin-top: 1.25rem;
   padding-top: 1rem;
   border-top: 1px solid var(--border-soft);
}

/* ============================================
   PRODUCT WIDGET - ENHANCED LOCATION CARDS
   ============================================ */
.product-location-cards {
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
   margin-top: 0.5rem;
}

.product-location-card {
   background: var(--bg-surface);
   border: 1px solid var(--border-soft);
   border-radius: var(--radius-sm);
   padding: 0.6rem 0.75rem;
   transition: all 0.2s;
}

.product-location-card:hover {
   border-color: var(--border-medium);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-location-card__main {
   display: flex;
   align-items: center;
   gap: 0.75rem;
}

.product-location-card__position {
   font-size: 0.8rem;
   font-weight: 700;
   color: var(--text-strong);
   text-transform: uppercase;
   letter-spacing: 0.3px;
}

.product-location-card__size-badge {
   font-size: 0.7rem;
   padding: 0.2rem 0.5rem;
   background: linear-gradient(135deg, #ecfdf5, #d1fae5);
   color: #047857;
   border-radius: 4px;
   border: 1px solid #a7f3d0;
   font-weight: 600;
}

.product-location-card__size-badge--empty {
   background: var(--bg-surface);
   color: var(--text-muted);
   border-color: var(--border-soft);
}

.product-location-card__edit-btn {
   margin-left: auto;
   background: none;
   border: none;
   padding: 0.3rem;
   border-radius: 4px;
   cursor: pointer;
   color: var(--text-muted);
   transition: all 0.15s;
   width: auto;
   min-width: auto;
   height: auto;
   min-height: auto;
   display: flex;
   align-items: center;
   justify-content: center;
}

.product-location-card__edit-btn:hover {
   background: var(--bg-card);
   color: var(--accent);
}

.product-location-card__edit-btn svg {
   width: 16px;
   height: 16px;
}

.product-location-card__colors-section {
   margin-top: 0.5rem;
   padding-top: 0.5rem;
   border-top: 1px dashed var(--border-soft);
}

.product-location-card__colors-list {
   display: flex;
   flex-wrap: wrap;
   gap: 0.35rem;
}

.product-location-card__color-item {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
   font-size: 0.7rem;
   padding: 0.15rem 0.4rem;
   background: var(--bg-card);
   border-radius: 3px;
}

.product-location-card__color-swatch {
   width: 10px;
   height: 10px;
   border-radius: 2px;
   border: 1px solid rgba(0, 0, 0, 0.1);
   flex-shrink: 0;
}

.product-location-card__color-name {
   color: var(--text-muted);
   font-weight: 500;
}

.product-location-card__no-colors {
   font-size: 0.7rem;
   color: var(--text-muted);
   font-style: italic;
   margin-top: 0.35rem;
}
