/* SellerFlow ERP — Custom overrides */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Smooth transitions */
a, button { transition: all .15s ease; }

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

.sf-main,
.sf-content,
.sf-card,
.card,
.modal-content,
.dropdown-menu {
    min-width: 0;
}

.btn,
.sf-create-btn,
.sf-sync-pill,
.lx-command-trigger,
.sf-topbar-icon {
    white-space: nowrap;
}

/* Table hover */
.table-hover tbody tr:hover { background: #f8fafc; }

/* Form focus ring */
.form-control:focus,
.form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 .2rem rgba(79,70,229,.15);
}

/* Dropdown shadow */
.dropdown-menu {
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    border-radius: 10px;
    max-width: calc(100vw - 16px);
}

.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    margin-bottom: 0;
}

.modal-dialog {
    max-width: min(var(--bs-modal-width, 500px), calc(100vw - 24px));
}

.modal-content {
    max-height: calc(100vh - 24px);
}

.modal-body {
    overflow: auto;
}

/* App shell uses fixed sidebar/topbar layers; keep Bootstrap modals above them. */
.modal-backdrop {
    z-index: 2990;
}

.modal {
    z-index: 3000;
}

/* Alert */
.alert { border-radius: 10px; border: none; }

/* Badge */
.badge { font-weight: 500; letter-spacing: .2px; }

/* Input group */
.input-group-text {
    background: #f8fafc;
    border-color: #dee2e6;
    color: #64748b;
}

/* Sidebar scrollbar */
.sf-nav::-webkit-scrollbar { width: 4px; }
.sf-nav::-webkit-scrollbar-track { background: transparent; }
.sf-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }

/* Operational top navigation */
.sf-topbar .dropdown-menu { border-radius: 4px; font-size: .84rem; }
.sf-topbar .dropdown-item { padding: .5rem .8rem; color: #222; }

.sf-product-nav {
    height: 100%;
    display: inline-flex;
    align-items: stretch;
}

.sf-product-mega {
    width: min(760px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden;
    border-radius: 4px;
}

.sf-product-mega.show {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
}

.product-mega-left {
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
    padding: 18px 0;
}

.product-mega-main {
    background: #fff;
    padding: 18px 18px 14px;
}

.product-mega-group + .product-mega-group {
    margin-top: 22px;
}

.product-mega-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 14px 10px;
    color: #6b7280;
    font-size: .78rem;
}

.product-mega-title::before {
    content: "";
    width: 2px;
    height: 12px;
    background: #006bff;
    border-radius: 2px;
}

.product-mega-left a {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #111827;
    text-decoration: none;
    padding: 0 24px;
    font-size: .82rem;
}

.product-mega-left a:hover {
    background: #e8f2ff;
    color: #0052c8;
}

.product-mega-left a span,
.product-unauth em {
    color: #f43f5e;
    font-size: .68rem;
    font-style: normal;
    font-weight: 700;
}

.product-market-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: 92px repeat(4, minmax(72px, auto));
    gap: 12px;
    align-items: center;
    border-bottom: 1px dashed #e5e7eb;
}

.product-market-row a {
    color: #111827;
    text-decoration: none;
    white-space: nowrap;
    font-size: .82rem;
}

.product-market-row a:not(.product-market-badge):hover {
    color: #0052c8;
}

.product-market-badge {
    min-height: 30px;
    border: 1px solid #dfe5ee;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-weight: 700;
}

.product-market-badge.shopee { color: #ee4d2d; background: #fff7f4; }
.product-market-badge.amazon { color: #111827; background: #fffaf0; }
.product-market-badge.tiktok { color: #fff; background: #111827; }
.product-market-badge.nuvem { color: #2563eb; background: #eff6ff; }
.product-market-badge.temu { color: #f97316; background: #fff7ed; }
.product-market-badge.magalu { color: #0b78ff; background: #eff6ff; }

.product-unauth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
}

.product-unauth > span {
    flex-basis: 100%;
    color: #6b7280;
    font-size: .78rem;
}

.product-unauth a {
    min-height: 30px;
    border: 1px solid #dfe5ee;
    border-radius: 4px;
    color: #6b7280;
    background: #f9fafb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 9px;
    font-size: .76rem;
}

.sf-current-module {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-left: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.72);
    font-size: .76rem;
    white-space: nowrap;
}

.sf-legacy-topnav {
    display: none !important;
}

.sf-journey-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.sf-journey-nav::-webkit-scrollbar {
    display: none;
}

.sf-journey-dropdown {
    position: static;
}

.sf-journey-nav .sf-topnav-link {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,.78);
    padding: 0 9px;
    font-size: .8rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.sf-journey-nav .sf-topnav-link:hover,
.sf-journey-nav .sf-topnav-link.active,
.sf-journey-dropdown.show .sf-topnav-link {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.sf-journey-nav .sf-topnav-link i {
    font-size: .9rem;
}

.sf-journey-mega {
    position: fixed !important;
    top: calc(var(--sf-topbar-h) + 6px) !important;
    width: min(920px, calc(100vw - 28px));
    left: 50% !important;
    transform: translateX(-50%) translateY(4px) !important;
    padding: 0;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(15, 23, 42, .16);
    animation: lxMenuIn .16s ease both;
    z-index: 1500;
    max-height: min(74vh, 620px);
    overflow: auto;
}

.sf-journey-mega-wide {
    width: min(1040px, calc(100vw - 28px));
}

.sf-mega-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    border-bottom: 1px solid #dfe5ee;
}

.sf-mega-intro strong {
    color: #111827;
    font-size: .95rem;
}

.sf-mega-intro span {
    color: #64748b;
    font-size: .78rem;
    text-align: right;
}

.sf-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    background: #fff;
}

.sf-journey-mega:not(.sf-journey-mega-wide) .sf-mega-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sf-mega-grid section {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 4px;
}

.sf-mega-grid h6,
.sf-dropdown-heading {
    margin: 0 0 4px;
    color: #6b7280;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.sf-dropdown-heading {
    padding: 8px 12px 4px;
}

.sf-mega-grid a {
    min-height: 30px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    color: #111827;
    text-decoration: none;
    padding: 5px 8px;
    font-size: .8rem;
}

.sf-mega-grid a:hover {
    background: #eef6ff;
    color: #0052c8;
}

.sf-create-btn,
.sf-sync-pill {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    font-size: .78rem;
}

.sf-create-btn {
    border: 0;
    background: #0ea5e9;
    color: #fff;
    padding: 0 11px;
    font-weight: 700;
}

.sf-create-btn:hover {
    background: #0284c7;
}

.sf-sync-pill {
    border: 1px solid rgba(34,197,94,.34);
    background: rgba(34,197,94,.12);
    color: #dcfce7;
    padding: 0 9px;
}

.sf-sync-pill strong {
    color: #86efac;
    font-size: .68rem;
}

@keyframes lxMenuIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-2px); }
    to { opacity: 1; transform: translateX(-50%) translateY(4px); }
}

.sf-modulebar {
    min-height: 44px;
    background: #fff;
    border-bottom: 1px solid #dfe5ee;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
    position: sticky;
    top: var(--sf-topbar-h);
    z-index: 80;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.sf-modulebar-title {
    font-size: .86rem;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.sf-modulebar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.sf-modulebar-links::-webkit-scrollbar { display: none; }

.sf-modulebar-links a {
    flex: 0 0 auto;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    padding: 0 10px;
    border-radius: 4px;
    font-size: .82rem;
}

.sf-modulebar-links a:hover,
.sf-modulebar-links a.active {
    background: #e8f2ff;
    color: #0052c8;
}

/* Products workspace */
.product-ops {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-ops-head {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.product-ops-head h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.product-ops-head span {
    display: block;
    color: #6b7280;
    font-size: .8rem;
    margin-top: 2px;
}

.product-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.product-mini-stats > div {
    min-height: 72px;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 4px;
    padding: 12px 14px;
}

.product-mini-stats span {
    color: #6b7280;
    display: block;
    font-size: .78rem;
}

.product-mini-stats strong {
    display: block;
    margin-top: 7px;
    color: #111827;
    font-size: 1.2rem;
}

.product-two-cols,
.product-three-cols {
    display: grid;
    gap: 14px;
}

.product-two-cols {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr);
}

.product-three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-panel-head {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.product-panel-head h6 {
    margin: 0;
    font-size: .92rem;
    font-weight: 700;
}

.product-panel-head span,
.product-panel-head a {
    color: #0052c8;
    font-size: .78rem;
    text-decoration: none;
}

.product-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-channel-card {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #111827;
    text-decoration: none;
    padding: 12px;
}

.product-channel-card:hover {
    border-color: #9ac7ff;
    background: #f7fbff;
}

.product-channel-card strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .88rem;
}

.platform-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.product-channel-card dl {
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.product-channel-card dl div,
.quality-list a,
.store-data-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-channel-card dt,
.quality-list span,
.store-data-list small {
    color: #6b7280;
    font-size: .75rem;
    font-weight: 400;
}

.product-channel-card dd {
    margin: 0;
    font-size: .86rem;
    font-weight: 700;
}

.quality-list,
.store-data-list {
    display: flex;
    flex-direction: column;
}

.quality-list a,
.store-data-list a {
    min-height: 42px;
    color: #111827;
    text-decoration: none;
    border-top: 1px solid #edf0f5;
}

.quality-list a:first-child,
.store-data-list a:first-child {
    border-top: 0;
}

.quality-list strong,
.store-data-list em {
    color: #111827;
    font-style: normal;
    font-weight: 700;
}

.store-data-list strong,
.store-data-list small {
    display: block;
}

.product-ai-form label {
    color: #374151;
    font-weight: 600;
}

.product-ai-empty {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: .86rem;
}

.product-ai-result h6 {
    margin: 14px 0 6px;
    font-size: .82rem;
    font-weight: 700;
}

.product-ai-result h6:first-child {
    margin-top: 0;
}

.product-ai-result pre {
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 10px;
    margin: 0;
    font-size: .8rem;
}

.product-ai-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.product-ai-grid > div {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 10px;
}

.product-ai-grid span {
    display: block;
    color: #6b7280;
    font-size: .72rem;
}

.product-ai-grid strong {
    display: block;
    margin-top: 5px;
    font-size: .82rem;
    overflow-wrap: anywhere;
}

.product-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-pill-list span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dfe5ee;
    border-radius: 4px;
    background: #f9fafb;
    padding: 0 8px;
    font-size: .76rem;
    overflow-wrap: anywhere;
}

@media (max-width: 920px) {
    .sf-product-mega.show {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .product-mega-left {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .product-market-row {
        grid-template-columns: 1fr repeat(2, minmax(0, auto));
        gap: 8px;
        padding: 8px 0;
    }

    .product-market-row .product-market-badge {
        justify-content: flex-start;
        padding-left: 10px;
    }

    .product-two-cols,
    .product-three-cols,
    .product-mini-stats {
        grid-template-columns: 1fr;
    }

    .product-channel-grid,
    .product-ai-grid {
        grid-template-columns: 1fr;
    }
}

/* Orders workspace */
.orders-workspace {
    display: grid;
    grid-template-columns: 218px minmax(0, 1fr);
    gap: 0;
    margin: -20px -24px;
    min-height: calc(100vh - var(--sf-topbar-h));
    background: #f5f7fb;
}

.orders-rail {
    background: #f7f9fc;
    border-right: 1px solid #dfe5ee;
    padding: 14px 8px;
    min-height: calc(100vh - var(--sf-topbar-h));
    position: sticky;
    top: var(--sf-topbar-h);
    align-self: start;
}

.orders-rail-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    padding: 0 10px 10px;
}

.orders-rail-link {
    min-height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #111827;
    text-decoration: none;
    font-size: .83rem;
    padding: 8px 10px;
}

.orders-rail-link:hover,
.orders-rail-link.active {
    background: #e8f2ff;
    color: #0052c8;
}

.orders-rail-link.active-soft { background: #eaf3ff; color: #0052c8; }
.orders-rail-link strong { font-weight: 500; color: #6b7280; font-size: .78rem; }
.orders-rail-section { margin-top: 12px; }

.orders-rail-heading {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    color: #111827;
    font-size: .84rem;
    font-weight: 500;
}

.orders-quick-mode {
    position: sticky;
    top: calc(100vh - 78px);
    margin-top: 22px;
    min-height: 54px;
    background: #eefbf1;
    border: 1px solid #d6f4de;
    border-radius: 6px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #374151;
    font-size: .82rem;
}

.orders-quick-copy { min-width: 0; }
.orders-quick-detail {
    margin-top: 5px;
    color: #4b5563;
    font-size: .74rem;
    line-height: 1.25;
}
.orders-quick-detail button {
    border: 0;
    background: transparent;
    color: #0052c8;
    padding: 0 2px;
    font-size: .74rem;
    vertical-align: baseline;
}
.orders-quick-detail button i { color: inherit; font-size: .78rem; }
.quick-mode-lightning {
    border: 0;
    background: transparent;
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    cursor: pointer;
    white-space: nowrap;
}
.quick-mode-lightning i {
    color: #bff4c9;
    font-size: 1.55rem;
    transition: color .15s ease;
}
.quick-mode-lightning span {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    font-size: .72rem;
    font-weight: 700;
    transition: max-width .15s ease, opacity .15s ease;
}
.quick-mode-lightning:hover span,
.quick-mode-lightning:focus-visible span,
.orders-quick-mode:hover .quick-mode-lightning span {
    max-width: 64px;
    opacity: 1;
}
.orders-workspace.orders-quick-enabled .orders-quick-mode {
    background: #e9fff0;
    border-color: #8fe3a5;
}
.orders-workspace.orders-quick-enabled .quick-mode-lightning i {
    color: #34c759;
}

.quick-mode-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 9px 10px;
    border-radius: 6px;
    background: #eaf4ff;
    color: #1f3b57;
    font-size: .84rem;
    margin-bottom: 12px;
}
.quick-mode-option {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}
.quick-mode-fields {
    margin-left: 24px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.quick-mode-fields .form-select,
.quick-mode-fields .form-control {
    max-width: 170px;
}
.quick-mode-fields span {
    color: #6b7280;
    font-size: .78rem;
}
.quick-mode-fields-grid {
    display: grid;
    grid-template-columns: minmax(130px, 170px) minmax(110px, 140px) 1fr;
}

.orders-main { min-width: 0; padding: 14px 12px 28px; }

.orders-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.orders-titlebar h1 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
}

.orders-titlebar p {
    margin: 2px 0 0;
    font-size: .78rem;
    color: #6b7280;
}

.orders-title-actions { display: flex; align-items: center; gap: 8px; }

.orders-priority-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 8px;
    margin: 0 0 10px;
}

.orders-priority-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 82px;
    padding: 10px;
    border: 1px solid #dfe5ee;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.orders-priority-card:hover,
.orders-priority-card.active {
    transform: translateY(-1px);
    border-color: #9fc5ff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.orders-priority-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #eef6ff;
    color: #0052c8;
    flex: 0 0 auto;
}

.orders-priority-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.orders-priority-copy strong {
    font-size: 1.05rem;
    line-height: 1;
    color: #111827;
}

.orders-priority-copy em {
    font-style: normal;
    font-size: .78rem;
    font-weight: 700;
    color: #111827;
}

.orders-priority-copy small {
    color: #6b7280;
    font-size: .7rem;
    line-height: 1.25;
}

.orders-priority-warning .orders-priority-icon { background: #fff7ed; color: #c2410c; }
.orders-priority-success .orders-priority-icon { background: #ecfdf5; color: #047857; }
.orders-priority-info .orders-priority-icon { background: #e0f2fe; color: #0369a1; }
.orders-priority-danger .orders-priority-icon { background: #fef2f2; color: #b91c1c; }

.orders-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.orders-filterbar > .filter-select,
.orders-filterbar > .form-select {
    flex: 0 0 150px;
}

.orders-filterbar .btn {
    flex: 0 0 auto;
}

.orders-filterbar > .filter-search {
    flex: 1 1 280px;
}

.orders-filterbar > .filter-date {
    flex: 1 1 370px;
}

.orders-filterbar .form-control,
.orders-filterbar .form-select,
.filter-search,
.filter-date {
    height: 36px;
    border-radius: 4px;
    font-size: .82rem;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #d8dee8;
    padding: 0 10px;
}

.filter-search input {
    border: 0;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.filter-search input:focus { box-shadow: none; }
.filter-search i { color: #6b7280; flex: 0 0 auto; }

.filter-date {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #d8dee8;
    padding: 0 8px;
    color: #111827;
    min-width: 0;
}

.filter-date input {
    width: 126px;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.filter-date-type {
    width: 138px;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: .82rem;
    padding: 0;
    outline: 0;
}

.filter-date input:focus,
.filter-date-type:focus {
    box-shadow: none;
}

.orders-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 1px solid #dfe5ee;
    margin-bottom: 0;
    scrollbar-width: thin;
}

.orders-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: #374151;
    text-decoration: none;
    padding: 10px 10px 11px;
    border-bottom: 2px solid transparent;
    font-size: .82rem;
}

.orders-tabs a:hover,
.orders-tabs a.active {
    color: #0052c8;
    border-bottom-color: #006bff;
}

.orders-tabs span {
    color: #6b7280;
    font-size: .72rem;
}

.orders-process-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 10px;
    background: #fff;
    border-left: 1px solid #dfe5ee;
    border-right: 1px solid #dfe5ee;
    border-bottom: 1px solid #edf0f5;
    scrollbar-width: thin;
}

.orders-process-tabs-secondary {
    padding-top: 6px;
    padding-bottom: 6px;
    background: #fbfdff;
}

.orders-process-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: #374151;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: .8rem;
}

.orders-process-tabs a:hover,
.orders-process-tabs a.active {
    color: #0052c8;
    border-color: #9fc5ff;
    background: #eef6ff;
}

.orders-process-tabs span {
    color: #6b7280;
    font-size: .72rem;
}

.orders-grid-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    min-width: 0;
}

.orders-bulkbar {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border-bottom: 1px solid #edf0f5;
    color: #6b7280;
    font-size: .82rem;
}

.orders-bulkbar .btn-link,
.orders-actions .btn-link {
    text-decoration: none;
    color: #0052c8;
    padding-left: 0;
    padding-right: 0;
}

.orders-divider {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: #dfe5ee;
    margin: 0 12px;
    vertical-align: middle;
}

.orders-page-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.orders-sort-dropdown {
    min-width: 258px;
    padding: 8px;
}

.orders-sort-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    padding: 4px 4px 4px 6px;
    color: #374151;
}

.orders-sort-row + .orders-sort-row {
    border-top: 1px solid #f1f3f6;
}

.orders-sort-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-sort-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.orders-sort-action {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3ef;
    border-radius: 4px;
    color: #9ca3af;
    text-decoration: none;
    background: #fff;
}

.orders-sort-action:hover,
.orders-sort-action.active {
    border-color: #0052c8;
    color: #0052c8;
    background: #eef6ff;
}

.orders-sort-current {
    color: #6b7280;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.orders-table {
    min-width: 1420px;
    font-size: .82rem;
}

.orders-table thead th {
    height: 46px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.orders-table thead th:last-child,
.orders-table td.orders-actions {
    position: sticky;
    right: 0;
    z-index: 4;
    box-shadow: -10px 0 18px rgba(15, 23, 42, .08);
}

.orders-table thead th:last-child {
    z-index: 5;
    background: #f9fafb;
}

.orders-table td {
    border-color: #edf0f5;
    vertical-align: top;
    padding: 12px 12px;
}

.orders-store-row td {
    padding: 9px 12px;
    background: #fafafa;
    color: #6b7280;
    border-top: 1px solid #edf0f5;
    border-bottom: 0;
}

.orders-sn {
    font-weight: 500;
    color: #0052c8;
    text-decoration: none;
}

.orders-pill {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    background: #dff2ff;
    color: #0070d9;
    font-size: .72rem;
}

.orders-platform-inline {
    margin-left: 10px;
    color: #6b7280;
    font-size: .78rem;
}

.orders-scope-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 10px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .82rem;
}

.orders-store-name {
    float: right;
    color: #374151;
    font-size: .8rem;
}

.orders-store-name span { color: #6b7280; margin-left: 14px; }

.orders-product {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    max-width: 440px;
}

.orders-product img {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    object-fit: cover;
    background: #f8fafc;
}

.orders-product-name {
    display: block;
    color: #0052c8;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.orders-product-meta,
.orders-mini-muted,
.orders-more-items {
    color: #6b7280;
    font-size: .76rem;
    line-height: 1.35;
}

.orders-process-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    max-width: 260px;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: .72rem;
    line-height: 1.25;
}

.orders-process-note i {
    margin-top: 1px;
}

.orders-process-note-info {
    color: #075985;
    background: #e0f2fe;
}

.orders-process-note-success {
    color: #166534;
    background: #dcfce7;
}

.orders-process-note-danger {
    color: #991b1b;
    background: #fee2e2;
}

.orders-process-note-warning {
    color: #92400e;
    background: #fef3c7;
}

.orders-process-note-action {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.orders-product-price {
    color: #111827;
    font-size: .8rem;
    margin-top: 3px;
}

.orders-product-price span { color: #111827; font-weight: 700; margin-left: 6px; }

.orders-package-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 20px;
    margin-top: 5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #374151;
    font-size: .72rem;
    line-height: 1.2;
}

.orders-package-single_one { background: #ecfdf5; color: #047857; }
.orders-package-single_multi { background: #fff7ed; color: #c2410c; }
.orders-package-multi_items { background: #eef2ff; color: #4338ca; }

.orders-money { color: #111827; font-weight: 500; white-space: nowrap; }
.orders-recipient-cell { min-width: 230px; max-width: 280px; }
.orders-recipient {
    display: block;
    color: #111827;
    font-weight: 500;
    max-width: 240px;
    overflow-wrap: anywhere;
    text-decoration: none;
}
.orders-recipient:hover { color: #0052c8; }
.orders-recipient-line {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    color: #6b7280;
    font-size: .76rem;
    line-height: 1.35;
}
.orders-recipient-line i { color: #9ca3af; font-size: .82rem; }
.orders-recipient-warning {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding: 3px 6px;
    border: 1px solid #fde68a;
    border-radius: 4px;
    background: #fffbeb;
    color: #92400e;
    font-size: .72rem;
    line-height: 1.2;
}
.orders-recipient-warning i { font-size: .78rem; }
.orders-recipient-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.orders-recipient-chip,
.orders-recipient-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    max-width: 178px;
    border: 1px solid #dbe3ef;
    border-radius: 4px;
    background: #f8fafc;
    color: #374151;
    font-size: .72rem;
    line-height: 1;
    text-decoration: none;
}
.orders-recipient-chip { padding: 0 6px; }
.orders-recipient-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.orders-recipient-chip i,
.orders-recipient-copy i { color: #64748b; font-size: .78rem; }
.orders-recipient-chip:hover,
.orders-recipient-copy:hover {
    border-color: #9ec5fe;
    color: #0052c8;
    background: #eff6ff;
}
.orders-recipient-copy {
    justify-content: center;
    width: 24px;
    padding: 0;
    cursor: pointer;
}
.orders-recipient-copy.copied {
    border-color: #86efac;
    color: #15803d;
    background: #f0fdf4;
}
.orders-platform-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #111827; }
.orders-deadline { color: #111827; margin-top: 8px; }
.orders-ship-method { color: #111827; font-weight: 500; max-width: 190px; overflow-wrap: anywhere; }
.orders-actions {
    min-width: 150px;
    white-space: nowrap;
    background: #fff;
}
.orders-bulkbar .dropdown-item { font-size: .82rem; }

.wave-create-page {
    background: #f5f7fb;
    min-height: calc(100vh - 64px);
}

.wave-create-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 14px 22px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.wave-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 12px;
    color: #64748b;
    text-decoration: none;
}

.wave-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.wave-create-body {
    padding: 24px;
}

.wave-rule-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.wave-card-title {
    padding: 16px 18px;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #edf0f4;
}

.wave-rule-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 0;
}

.wave-rule-form {
    padding: 22px 24px;
}

.wave-preview-panel {
    padding: 22px;
    border-left: 1px solid #edf0f4;
    background: #fbfcfe;
}

.wave-field {
    margin-bottom: 18px;
}

.wave-label {
    display: block;
    margin-bottom: 8px;
    font-size: .86rem;
    font-weight: 700;
    color: #475569;
}

.wave-radio-row,
.wave-package-options {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.wave-radio-row label,
.wave-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #111827;
}

.wave-package-options {
    flex-direction: column;
    padding: 14px;
    margin-bottom: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.wave-help {
    color: #64748b;
    font-size: .8rem;
}

.wave-error {
    min-height: 18px;
    margin-top: 8px;
    color: #dc2626;
    font-size: .82rem;
    font-weight: 600;
}

.wave-preview-count {
    margin: 16px 0;
    color: #475569;
}

.wave-preview-count strong {
    color: #2563eb;
}

.wave-preview-empty {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
}

.wave-preview-empty i {
    font-size: 2.2rem;
}

.wave-preview-list {
    display: grid;
    gap: 8px;
}

.wave-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: .84rem;
}

.wave-preview-item span {
    color: #64748b;
    white-space: nowrap;
}

.wave-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #edf0f4;
}

.wave-card-toolbar .wave-card-title {
    padding: 0;
    border: 0;
}

.wave-order-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wave-order-actions .form-control {
    width: 260px;
}

.wave-orders-table-wrap {
    max-height: 560px;
    overflow: auto;
}

.wave-orders-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: #475569;
    font-size: .8rem;
    border-bottom: 1px solid #e5e7eb;
}

.wave-orders-table td {
    font-size: .86rem;
}

.wave-empty-orders {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 56px 20px;
    color: #64748b;
}

.wave-empty-orders i {
    color: #94a3b8;
    font-size: 2.4rem;
}

@media (max-width: 992px) {
    .wave-create-header,
    .wave-card-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .wave-rule-layout {
        grid-template-columns: 1fr;
    }

    .wave-preview-panel {
        border-left: 0;
        border-top: 1px solid #edf0f4;
    }

    .wave-order-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .wave-order-actions .form-control {
        width: 100%;
    }
}

.orders-workspace.orders-quick-enabled .orders-table {
    min-width: 1180px;
    font-size: .78rem;
}

.orders-workspace.orders-quick-enabled .orders-table td {
    padding: 8px 10px;
}

.orders-workspace.orders-quick-enabled .orders-product {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
}

.orders-workspace.orders-quick-enabled .orders-product img {
    width: 36px;
    height: 36px;
}

.orders-workspace.orders-quick-enabled .orders-more-items,
.orders-workspace.orders-quick-enabled .orders-deadline {
    display: none;
}

.orders-workspace.orders-quick-enabled .orders-recipient-chip span { display: none; }
.orders-workspace.orders-quick-enabled .orders-recipient-chip { width: 24px; justify-content: center; padding: 0; }

.orders-empty {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: #6b7280;
}

.orders-empty i { font-size: 2.4rem; color: #aab3c0; }
.orders-empty h2 { font-size: 1rem; margin: 0; color: #111827; }
.orders-empty p { margin: 0 0 8px; font-size: .84rem; }

.orders-pagination {
    min-height: 54px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #edf0f5;
    color: #6b7280;
    font-size: .82rem;
}

@media (max-width: 1180px) {
    .sf-current-module,
    .sf-sync-pill span,
    .sf-sync-pill strong {
        display: none;
    }

    .sf-journey-nav {
        max-width: 54vw;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sf-journey-nav::-webkit-scrollbar {
        display: none;
    }

    .sf-journey-mega,
    .sf-journey-mega-wide {
        width: calc(100vw - 20px);
    }

    .sf-mega-grid,
    .sf-journey-mega:not(.sf-journey-mega-wide) .sf-mega-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orders-workspace {
        grid-template-columns: 1fr;
        margin: -14px -10px;
    }

    .orders-rail {
        position: static;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #dfe5ee;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }

    .orders-rail-title,
    .orders-rail-section,
    .orders-quick-mode {
        grid-column: 1 / -1;
    }

    .orders-filterbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orders-priority-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .filter-date { grid-column: 1 / -1; }
}

@media (max-width: 1536px) {
    .sf-journey-nav .sf-topnav-link {
        padding-left: 7px;
        padding-right: 7px;
        font-size: .76rem;
    }

    .lx-command-trigger {
        max-width: 190px;
    }

    .sf-topbar-actions {
        flex-shrink: 0;
    }

    .orders-titlebar,
    .orders-bulkbar,
    .orders-page-tools,
    .wave-card-toolbar,
    .lx-filter-bar {
        flex-wrap: wrap;
    }

    .orders-title-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 1366px) {
    .sf-appbrand {
        font-size: .94rem;
    }

    .sf-journey-nav {
        max-width: clamp(520px, 50vw, 720px);
    }

    .sf-topbar-icon {
        width: 30px;
        height: 30px;
    }

    .sf-topbar-actions .dropdown-menu {
        max-height: calc(100vh - 54px);
        overflow: auto;
    }

    .orders-filterbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .orders-filterbar > .filter-search {
        grid-column: span 2;
    }

    .orders-table {
        min-width: 1320px;
    }

    .orders-actions {
        min-width: 128px;
    }
}

@media (max-width: 1024px) {
    .sf-journey-nav {
        display: none;
    }

    .sf-current-module,
    .sf-sync-pill span,
    .sf-sync-pill strong,
    .lx-command-trigger span,
    .lx-command-trigger kbd,
    .sf-topbar-user > span:not(.sf-user-avatar) {
        display: none !important;
    }

    .sf-topbar-user,
    .sf-create-btn,
    .sf-sync-pill,
    .lx-command-trigger {
        width: 32px;
        min-width: 32px;
        justify-content: center;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .sf-topbar-user::after {
        display: none;
    }

    .sf-content {
        padding: 14px 10px;
    }

    .sf-modulebar {
        overflow-x: auto;
        gap: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .sf-modulebar-title {
        flex: 0 0 auto;
    }

    .sf-modulebar-links {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .modal-dialog,
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: calc(100vw - 18px);
        margin-left: auto;
        margin-right: auto;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        flex-wrap: wrap;
    }

    .table-responsive {
        border-radius: 10px;
    }

    .orders-filterbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orders-filterbar > .filter-search {
        grid-column: 1 / -1;
    }

    .orders-table {
        min-width: 1180px;
    }

    .orders-actions {
        min-width: 104px;
    }

    .orders-actions .btn {
        max-width: 96px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 720px) {
    .sf-journey-nav {
        display: none;
    }

    .sf-create-btn span,
    .lx-command-trigger span,
    .lx-command-trigger kbd,
    .sf-sync-pill {
        display: none;
    }

    .sf-create-btn,
    .lx-command-trigger {
        min-width: 30px;
        width: 32px;
        justify-content: center;
        padding: 0;
    }

    .sf-mega-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .sf-mega-intro span {
        text-align: left;
    }

    .sf-mega-grid,
    .sf-journey-mega:not(.sf-journey-mega-wide) .sf-mega-grid {
        grid-template-columns: 1fr;
    }

    .lx-command-item small {
        display: none;
    }

    .sf-modulebar {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        padding: 8px 10px;
    }

    .sf-modulebar-links {
        width: 100%;
    }

    .orders-titlebar,
    .orders-bulkbar,
    .orders-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .orders-filterbar {
        grid-template-columns: 1fr;
    }

    .orders-priority-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-date {
        height: auto;
        flex-wrap: wrap;
        padding: 8px;
    }

    .orders-filterbar > .filter-select,
    .orders-filterbar > .form-select,
    .orders-filterbar > .filter-search,
    .orders-filterbar > .filter-date {
        flex-basis: 100%;
    }

    .filter-date input,
    .filter-date-type {
        width: 100%;
    }
    .orders-store-name { float: none; display: block; margin-top: 5px; }
}

@media (max-width: 520px) {
    .sf-topbar {
        gap: 4px;
    }

    .sf-appbar-left {
        gap: 6px;
    }

    .sf-appbrand {
        font-size: .88rem;
        max-width: 94px;
        overflow: hidden;
    }

    .sf-topbar-actions {
        gap: 2px;
    }

    .sf-topbar-icon,
    .sf-create-btn,
    .sf-sync-pill,
    .lx-command-trigger,
    .sf-topbar-user {
        width: 31px;
        min-width: 31px;
        height: 31px;
    }

    .sf-topbar .badge {
        transform: scale(.84);
        transform-origin: top right;
    }

    .sf-content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .sf-card,
    .card {
        border-radius: 10px;
    }

    .orders-tabs,
    .orders-process-tabs,
    .orders-process-tabs-secondary {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .orders-tabs::-webkit-scrollbar,
    .orders-process-tabs::-webkit-scrollbar,
    .orders-process-tabs-secondary::-webkit-scrollbar {
        display: none;
    }

    .orders-tabs a,
    .orders-process-tabs a {
        flex: 0 0 auto;
    }

    .modal-dialog {
        margin: 8px;
        max-width: calc(100vw - 16px);
    }

    .modal-content {
        max-height: calc(100dvh - 16px);
        border-radius: 12px;
    }

    .modal-header {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #fff;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
}

@media (max-width: 520px) {
    .orders-priority-grid {
        grid-template-columns: 1fr;
    }
}

/* Home operations */
.home-ops {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 272px;
    gap: 16px;
    max-width: 1160px;
    margin: 0 auto;
}

.home-main,
.home-side {
    min-width: 0;
}

.home-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-alert {
    min-height: 58px;
    border: 1px solid #ffedb5;
    background: #fff7d9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    color: #111827;
    font-size: .84rem;
}

.home-alert i { color: #f59e0b; }
.home-alert a { color: #0052c8; text-decoration: none; margin-left: auto; white-space: nowrap; }

.home-task-card,
.home-panel,
.side-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 6px;
}

.home-task-card {
    padding: 18px;
}

.home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.home-section-head h1,
.home-section-head h2 {
    margin: 0;
    font-size: .98rem;
    color: #111827;
    font-weight: 700;
}

.home-section-head a {
    color: #0052c8;
    text-decoration: none;
    font-size: .82rem;
    white-space: nowrap;
}

.task-group + .task-group {
    margin-top: 22px;
}

.task-group-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #6b7280;
    font-size: .84rem;
    margin-bottom: 8px;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.task-item {
    min-height: 68px;
    border-right: 1px solid #edf0f5;
    padding: 8px 18px 8px 20px;
    color: #111827;
    text-decoration: none;
}

.task-item:nth-child(4n) {
    border-right: 0;
}

.task-item strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.25;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.task-item span {
    color: #374151;
    font-size: .78rem;
    line-height: 1.35;
}

.task-item:hover {
    background: #f7fbff;
}

.task-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: 1px;
    background: #9ca3af;
}

.task-dot.ok { background: #3ba84a; }
.task-dot.warn { background: #eda708; }
.task-dot.danger { background: #e85064; }

.home-panel {
    padding: 16px 18px;
}

.notice-list {
    display: flex;
    flex-direction: column;
}

.notice-row {
    min-height: 42px;
    border-top: 1px solid #edf0f5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
    align-items: center;
    color: #111827;
    text-decoration: none;
    font-size: .84rem;
}

.notice-row:first-child {
    border-top: 0;
}

.notice-row time {
    color: #6b7280;
    text-align: right;
    font-size: .78rem;
}

.home-two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 16px;
}

.home-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: .84rem;
}

.home-table,
.stock-list {
    display: flex;
    flex-direction: column;
}

.home-table-row,
.stock-row {
    min-height: 48px;
    display: grid;
    gap: 12px;
    align-items: center;
    border-top: 1px solid #edf0f5;
    color: #111827;
    text-decoration: none;
    font-size: .82rem;
}

.home-table-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.home-table-row:first-child,
.stock-row:first-child {
    border-top: 0;
}

.home-table-row strong,
.stock-row span {
    overflow-wrap: anywhere;
}

.home-table-row span:not(.badge) {
    display: block;
    color: #6b7280;
    font-size: .76rem;
    margin-top: 2px;
}

.stock-row {
    grid-template-columns: minmax(0, 1fr) 54px;
}

.stock-row strong {
    justify-self: end;
    min-width: 36px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: .78rem;
}

.stock-row strong.warn { background: #fff6db; color: #9a6700; }
.stock-row strong.danger { background: #ffe4e9; color: #b4233a; }

.side-card {
    padding: 16px;
    overflow: hidden;
}

.side-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.side-card-head strong {
    font-size: .96rem;
    color: #111827;
}

.side-card-head span {
    font-size: .72rem;
    border-radius: 4px;
    padding: 2px 6px;
    background: #eef2ff;
    color: #0052c8;
}

.side-card-head span.ok {
    background: #e8f8ec;
    color: #1f8a3b;
}

.side-card-head span.warn {
    background: #fff5d6;
    color: #a16207;
}

.plan-card dl {
    margin: 0 0 12px;
}

.plan-card dl div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    color: #374151;
    font-size: .82rem;
}

.plan-card dt {
    font-weight: 400;
    color: #6b7280;
}

.plan-card dd {
    margin: 0;
    font-weight: 500;
}

.side-card a {
    color: #0052c8;
    text-decoration: none;
    font-size: .82rem;
}

.metric-card {
    background: linear-gradient(135deg, #0746d8, #008cff);
    color: #fff;
    border: 0;
}

.metric-card span,
.metric-card small {
    display: block;
    color: rgba(255,255,255,.82);
    font-size: .8rem;
}

.metric-card strong {
    display: block;
    color: #fff;
    font-size: 1.45rem;
    margin: 8px 0 2px;
}

.metric-card a {
    display: inline-flex;
    margin-top: 12px;
    color: #fff;
}

.quick-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.quick-card > a {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    border-top: 1px solid #edf0f5;
    padding-top: 9px;
}

.quick-card > a i {
    color: #0052c8;
}

.sync-card {
    background: #eef7ff;
    border-color: #c9e6ff;
}

.sync-card .sync-icon {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background: #d9edff;
    color: #0052c8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.sync-card strong,
.sync-card span {
    display: block;
}

.sync-card span {
    color: #4b5563;
    font-size: .82rem;
    margin: 4px 0 12px;
}

@media (max-width: 1080px) {
    .home-ops {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .home-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .home-task-card,
    .home-panel,
    .side-card {
        border-radius: 4px;
    }

    .task-grid,
    .home-two-cols,
    .home-side {
        grid-template-columns: 1fr;
    }

    .task-item {
        border-right: 0;
        border-top: 1px solid #edf0f5;
    }

    .task-item:first-child {
        border-top: 0;
    }

    .notice-row,
    .home-table-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 0;
    }

    .home-table-row .badge {
        width: fit-content;
        max-width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        justify-self: start;
        white-space: normal;
        text-align: left;
        line-height: 1.2;
    }

    .notice-row time {
        text-align: left;
    }
}

/* Lojexa Design System 2.0
   Tokens :root migrados para /assets/css/lx-tokens.css (carregado antes deste
   arquivo em app/Views/layouts/app.php). Bloco duplicado removido para evitar
   divergência — todos os tokens --lx-* e aliases --sf-* ficam definidos lá. */

body {
    background: var(--lx-background);
    color: var(--lx-text-primary);
}

a:focus-visible,
button:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(7, 87, 216, .22);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--lx-primary);
    border-color: var(--lx-primary);
    box-shadow: 0 8px 18px rgba(7, 87, 216, .16);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--lx-primary-hover);
    border-color: var(--lx-primary-hover);
}

.btn-outline-primary {
    color: var(--lx-primary);
    border-color: rgba(7, 87, 216, .38);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--lx-primary);
    border-color: var(--lx-primary);
}

.dropdown-menu {
    border-radius: var(--lx-radius-md);
    border-color: var(--lx-border);
    box-shadow: var(--lx-shadow-md);
}

.dropdown-item {
    border-radius: var(--lx-radius-sm);
    margin: 1px 4px;
    width: calc(100% - 8px);
}

.lx-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius-lg);
    box-shadow: var(--lx-shadow-sm);
}

.lx-page-header h1,
.lx-page-header h2 {
    margin: 0;
    color: var(--lx-text-primary);
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: 0;
}

.lx-page-header p {
    margin: 5px 0 0;
    color: var(--lx-text-muted);
    max-width: 780px;
    font-size: .9rem;
}

.lx-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: var(--lx-primary);
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.lx-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.lx-card,
.lx-metric-card,
.lx-task-card {
    background: var(--lx-surface);
    border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius-lg);
    box-shadow: var(--lx-shadow-sm);
}

.lx-metric-card,
.lx-task-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    text-decoration: none;
    color: var(--lx-text-primary);
}

.lx-metric-card:hover,
.lx-task-card:hover,
.task-item:hover,
.home-table-row:hover,
.stock-row:hover {
    transform: translateY(-1px);
    box-shadow: var(--lx-shadow-md);
}

.lx-card-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--lx-radius-md);
    background: var(--lx-primary-soft);
    color: var(--lx-primary);
    font-size: 1.05rem;
}

.lx-metric-card strong,
.lx-task-card strong {
    display: block;
    color: var(--lx-text-primary);
    font-size: 1.25rem;
    line-height: 1.15;
}

.lx-metric-card span,
.lx-task-card span {
    display: block;
    color: var(--lx-text-muted);
    font-size: .82rem;
    margin-top: 3px;
}

.lx-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
}

.lx-status-badge.success { background: var(--lx-success-soft); color: var(--lx-success); }
.lx-status-badge.warning { background: var(--lx-warning-soft); color: var(--lx-warning); }
.lx-status-badge.danger { background: var(--lx-danger-soft); color: var(--lx-danger); }
.lx-status-badge.info { background: var(--lx-info-soft); color: var(--lx-info); }
.lx-status-badge.neutral { background: #f1f5f9; color: var(--lx-neutral); }

.lx-empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    padding: 34px 18px;
    color: var(--lx-text-muted);
}

.lx-empty-state i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--lx-radius-lg);
    background: var(--lx-primary-soft);
    color: var(--lx-primary);
    font-size: 1.25rem;
}

.lx-empty-state strong {
    color: var(--lx-text-primary);
    font-size: .98rem;
}

.lx-empty-state p {
    margin: 0;
    max-width: 480px;
    font-size: .86rem;
}

.lx-smart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .84rem;
}

.lx-smart-table th {
    background: var(--lx-surface-soft);
    color: var(--lx-text-secondary);
    font-weight: 700;
    border-bottom: 1px solid var(--lx-border);
}

.lx-smart-table th,
.lx-smart-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.lx-smart-table tbody tr:hover {
    background: #f8fbff;
}

.lx-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    background: var(--lx-surface);
    border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius-lg);
}

.lx-help-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--lx-primary);
    background: var(--lx-primary-soft);
    font-size: .75rem;
    cursor: help;
}

.lx-setup-checklist {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.lx-setup-checklist a,
.lx-action-timeline li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--lx-text-secondary);
    text-decoration: none;
}

.lx-action-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lx-action-timeline li {
    padding: 8px 0;
    border-bottom: 1px solid var(--lx-border);
}

.lx-action-timeline li:last-child {
    border-bottom: 0;
}

.lx-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: var(--lx-radius-lg);
    border: 1px solid rgba(7, 87, 216, .16);
    background:
        linear-gradient(135deg, rgba(7, 87, 216, .08), rgba(18, 179, 168, .08)),
        var(--lx-surface);
    box-shadow: var(--lx-shadow-sm);
}

.lx-dashboard-hero h1 {
    margin: 0;
    color: var(--lx-text-primary);
    font-size: 1.35rem;
    font-weight: 800;
}

.lx-dashboard-hero p {
    margin: 5px 0 0;
    color: var(--lx-text-muted);
    font-size: .92rem;
}

.lx-hero-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.lx-priority-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.lx-priority-card {
    position: relative;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    background: var(--lx-surface);
    color: var(--lx-text-primary);
    text-decoration: none;
    border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius-lg);
    box-shadow: var(--lx-shadow-sm);
    overflow: hidden;
}

.lx-priority-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.lx-priority-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--lx-shadow-md);
}

.lx-priority-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--lx-primary);
}

.lx-priority-card.warning::before { background: var(--lx-warning); }
.lx-priority-card.danger::before { background: var(--lx-danger); }
.lx-priority-card.success::before { background: var(--lx-success); }

.lx-priority-card span {
    color: var(--lx-text-muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.lx-priority-card strong {
    color: var(--lx-text-primary);
    font-size: 1.45rem;
    line-height: 1;
}

.lx-priority-card small {
    color: var(--lx-text-muted);
    font-size: .8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lx-priority-card small .bi {
    opacity: 0;
    transform: translateX(-2px);
    transition: opacity var(--lx-transition-fast), transform var(--lx-transition-fast);
}

.lx-priority-card:hover small .bi {
    opacity: .7;
    transform: translateX(2px);
}

.lx-priority-note {
    color: var(--lx-text-muted);
    font-size: .68rem;
    font-style: normal;
    line-height: 1.2;
    margin-top: 2px;
}

/* Faixa operacional do dashboard — 6 filas acionaveis */
.lx-priority-strip.lx-ops-strip {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.lx-store-split {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.lx-store-split > span {
    flex-basis: 100%;
    color: var(--lx-text-muted);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.lx-store-split a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 4px 7px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 999px;
    background: rgba(37, 99, 235, .07);
    color: #1d4ed8;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
}

.lx-store-split a:hover {
    border-color: rgba(37, 99, 235, .34);
    background: rgba(37, 99, 235, .12);
}

.lx-store-split b {
    overflow: hidden;
    max-width: 110px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lx-store-split strong {
    color: #0f172a;
    font-size: .74rem;
}

.lx-priority-card.info::before { background: var(--lx-info); }

/* KPIs de negocio do dia */
.lx-biz-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.lx-biz-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: var(--lx-surface);
    border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius-lg);
    box-shadow: var(--lx-shadow-sm);
    text-decoration: none;
    color: var(--lx-text-primary);
    min-height: 96px;
    justify-content: space-between;
}

.lx-biz-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--lx-shadow-md);
}

.lx-biz-label {
    color: var(--lx-text-muted);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.lx-biz-card strong {
    color: var(--lx-text-primary);
    font-size: 1.5rem;
    line-height: 1.05;
    font-weight: 800;
}

.lx-biz-foot {
    font-size: .78rem;
}

.lx-biz-muted {
    color: var(--lx-text-muted);
}

/* Bloco de alertas — chips coloridos por severidade */
.lx-alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.lx-alert-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-radius: var(--lx-radius-md);
    border: 1px solid var(--lx-border);
    background: var(--lx-surface);
    text-decoration: none;
    color: var(--lx-text-primary);
    transition: transform var(--lx-transition-fast), box-shadow var(--lx-transition-fast);
}

.lx-alert-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--lx-shadow-md);
}

.lx-alert-chip .bi {
    font-size: 1.1rem;
}

.lx-alert-chip .lx-alert-text {
    flex: 1 1 auto;
    font-size: .84rem;
    font-weight: 600;
    color: var(--lx-text-secondary);
}

.lx-alert-chip strong {
    font-size: 1.05rem;
    font-weight: 800;
    min-width: 26px;
    text-align: right;
}

.lx-alert-chip.danger { border-color: var(--lx-danger-soft); background: var(--lx-danger-soft); }
.lx-alert-chip.danger .bi,
.lx-alert-chip.danger strong { color: var(--lx-danger); }

.lx-alert-chip.warning { border-color: var(--lx-warning-soft); background: var(--lx-warning-soft); }
.lx-alert-chip.warning .bi,
.lx-alert-chip.warning strong { color: var(--lx-warning); }

.lx-alert-chip.info { border-color: var(--lx-info-soft); background: var(--lx-info-soft); }
.lx-alert-chip.info .bi,
.lx-alert-chip.info strong { color: var(--lx-info); }

@media (max-width: 1180px) {
    .lx-priority-strip.lx-ops-strip {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .lx-biz-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .lx-priority-strip.lx-ops-strip {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .lx-biz-grid {
        grid-template-columns: 1fr;
    }
}

.lx-command-trigger {
    min-width: 170px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--lx-radius-md);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.86);
    font-size: .78rem;
}

.lx-command-trigger kbd {
    padding: 1px 5px;
    border: 1px solid rgba(255,255,255,.18);
    border-bottom-width: 2px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.78);
    font-size: .68rem;
}

.lx-command-palette .modal-dialog {
    max-width: 680px;
}

.lx-command-palette .modal-content {
    border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius-lg);
    box-shadow: var(--lx-shadow-lg);
}

.lx-command-input {
    height: 52px;
    border: 0;
    border-bottom: 1px solid var(--lx-border);
    border-radius: var(--lx-radius-lg) var(--lx-radius-lg) 0 0;
    padding: 0 18px;
    font-size: 1rem;
    outline: 0;
}

.lx-command-list {
    max-height: 420px;
    overflow: auto;
    padding: 8px;
}

.lx-command-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: var(--lx-radius-md);
    color: var(--lx-text-primary);
    text-decoration: none;
}

.lx-command-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.lx-command-copy strong {
    color: inherit;
    font-size: .88rem;
    line-height: 1.2;
}

.lx-command-copy em {
    color: var(--lx-text-muted);
    font-size: .72rem;
    font-style: normal;
    line-height: 1.25;
}

.lx-command-item small {
    margin-left: auto;
    color: var(--lx-text-muted);
    font-size: .68rem;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lx-command-item:hover,
.lx-command-item.active {
    background: var(--lx-primary-soft);
    color: var(--lx-primary);
}

.lx-command-item i {
    width: 24px;
    color: var(--lx-primary);
}

.lx-skeleton {
    position: relative;
    overflow: hidden;
    background: #eef2f7;
}

.lx-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.64), transparent);
    animation: lxSkeleton 1.4s infinite;
}

@keyframes lxSkeleton {
    to { transform: translateX(100%); }
}

/* Existing screen uplift */
.sf-card,
.home-task-card,
.home-panel,
.side-card,
.orders-grid-card,
.permcfg-table-wrap,
.nf-panel {
    border-color: var(--lx-border) !important;
    border-radius: var(--lx-radius-lg) !important;
    box-shadow: var(--lx-shadow-sm);
}

.home-task-card,
.home-panel,
.side-card {
    background: var(--lx-surface);
}

.home-section-head h1,
.home-section-head h2 {
    color: var(--lx-text-primary);
    font-weight: 800;
}

.task-item {
    color: var(--lx-text-primary);
    min-height: 76px;
}

.task-item strong {
    color: var(--lx-text-primary);
    font-weight: 800;
}

.task-item span {
    color: var(--lx-text-muted);
}

.task-dot.ok { background: var(--lx-success); }
.task-dot.warn { background: var(--lx-warning); }
.task-dot.danger { background: var(--lx-danger); }

.home-empty,
.permcfg-empty,
.nf-empty {
    color: var(--lx-text-muted);
}

.sf-product-mega {
    border-radius: var(--lx-radius-lg);
    box-shadow: var(--lx-shadow-lg);
}

.product-mega-title {
    color: var(--lx-text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.product-mega-left {
    background: #f7faff;
}

.product-mega-left a,
.product-market-row a {
    border-radius: var(--lx-radius-sm);
}

.product-market-row {
    border-bottom-color: var(--lx-border);
}

.orders-titlebar,
.orders-filterbar,
.orders-tabs,
.orders-process-tabs {
    border-radius: var(--lx-radius-lg);
}

.orders-table thead th {
    background: #f8fafc;
    color: var(--lx-text-secondary);
}

.permcfg-page,
.nf-page {
    background: var(--lx-background);
}

.permcfg-link.active,
.nf-side-link.active,
.nf-tab.active {
    background: var(--lx-primary-soft);
    color: var(--lx-primary);
}

.permcfg-search,
.nf-search .form-control,
.nf-filter .form-select {
    border-radius: var(--lx-radius-md);
}

@media (max-width: 1180px) {
    .lx-priority-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lx-command-trigger {
        min-width: 34px;
        justify-content: center;
    }

    .lx-command-trigger span,
    .lx-command-trigger kbd {
        display: none;
    }
}

@media (max-width: 760px) {
    .lx-page-header,
    .lx-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .lx-priority-strip {
        grid-template-columns: 1fr;
    }

    .lx-page-actions {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================================
   LX UI POLISH v1 (2026-06-23) — micro-animacoes e refino visual global.
   Deixa a interface mais bonita, viva e acolhedora para usuarios leigos, sem
   tocar em HTML/logica. Usa so transform/opacity (performatico). O bloco
   prefers-reduced-motion:reduce acima ja neutraliza tudo (acessibilidade).
   ============================================================================ */

/* Entrada suave do conteudo ao abrir a tela */
.sf-content,
.sf-main > .container-fluid,
main > .container,
main > .container-fluid {
    animation: lxFadeInUp .28s ease-out;
}

/* Modais: o dialogo sobe com leve escala; backdrop suaviza */
.modal.fade .modal-dialog {
    transform: translateY(20px) scale(.985);
    opacity: 0;
    transition: transform .3s cubic-bezier(.16, .84, .44, 1), opacity .26s ease;
}
.modal.show .modal-dialog {
    transform: none;
    opacity: 1;
}
.modal-backdrop.fade { transition: opacity .26s ease; }

/* Refino estatico dos modais (bonito mesmo sem animacao) */
.modal-content {
    border: none;
    border-radius: var(--lx-radius-lg);
    box-shadow: var(--lx-shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--lx-border); align-items: center; }
.modal-footer { border-top: 1px solid var(--lx-border); }
.modal-title {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}
.modal-title .bi { color: var(--lx-primary); font-size: 1.05em; }

/* Cards: leve elevacao no hover + cantos suaves */
.card,
.sf-card,
.lx-card { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover,
.sf-card:hover,
.lx-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--lx-shadow-md);
}

/* Botoes: micro-feedback de toque */
.btn {
    transition: transform .12s ease, box-shadow .15s ease,
        background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }

/* Icones dentro de botoes/links: pequeno movimento no hover */
.btn > .bi,
.nav-link > .bi,
.dropdown-item > .bi { display: inline-block; transition: transform .15s ease; }
.btn:hover > .bi,
.dropdown-item:hover > .bi { transform: translateX(2px); }
.nav-link:hover > .bi { transform: scale(1.08); }

/* Alertas e toasts entram deslizando */
.alert { animation: lxFadeInDown .3s ease both; }
.toast.show { animation: lxToastIn .3s cubic-bezier(.16, .84, .44, 1) both; }

/* Linhas de tabela com realce suave */
.table-hover tbody tr { transition: background-color .14s ease; }

/* Empty states: icone com flutuacao acolhedora */
.lx-empty .bi,
.empty-state .bi,
.sf-empty .bi { display: inline-block; animation: lxFloat 3.4s ease-in-out infinite; }

/* Cobre as variantes de empty-state ja usadas no app (Dashboard, Produtos, Estoque):
   so anima o icone (sem mudar display/layout) — acolhedor p/ usuario leigo. */
.lx-empty-state i,
.shopee-empty i,
.home-empty i { animation: lxFloat 3.4s ease-in-out infinite; }

/* Hooks opcionais: badge pulsante e titulo de secao com icone-acento */
.lx-pulse { animation: lxPulse 1.8s ease-in-out infinite; }
.lx-section-title { display: flex; align-items: center; gap: .5rem; }
.lx-section-title .bi { color: var(--lx-primary); }

/* Keyframes do polish */
@keyframes lxFadeInUp { from { opacity: 0; } to { opacity: 1; } }
@keyframes lxFadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes lxToastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes lxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes lxPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .85; } }

/* ---- Dashboard: cards de prioridade com icone-marca + entrada escalonada ---- */
.lx-priority-card .lx-priority-ic {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1.55rem;
    line-height: 1;
    opacity: .16;
    color: var(--lx-primary);
    text-transform: none;
    letter-spacing: 0;
    transition: opacity .2s ease, transform .2s ease;
}
.lx-priority-card.warning .lx-priority-ic { color: var(--lx-warning); }
.lx-priority-card.danger .lx-priority-ic { color: var(--lx-danger); }
.lx-priority-card.success .lx-priority-ic { color: var(--lx-success); }
.lx-priority-card.info .lx-priority-ic { color: var(--lx-info); }
.lx-priority-card:hover .lx-priority-ic { opacity: .34; transform: scale(1.12); }

/* Entrada escalonada (mais perceptivel) — backwards: nao persiste o transform,
   entao o hover-lift do card continua funcionando depois da animacao. */
.lx-priority-card {
    animation: lxPopIn .5s cubic-bezier(.18, .89, .32, 1.2) backwards;
    animation-delay: calc(var(--lx-i, 0) * .09s);
}
@keyframes lxPopIn {
    0% { opacity: 0; transform: translateY(16px) scale(.95); }
    100% { opacity: 1; transform: none; }
}

/* ============================================================================
   APP SHELL LATERAL NO DESKTOP (Fase J — Etapas 2/3/4) — refinos de apoio.
   O grosso das regras (mostrar a sidebar, larguras xl/xxl, rail, toggle, ocultar
   a journey-nav no desktop) vive no <style> inline de app/Views/layouts/app.php.
   Aqui ficam apenas refinos que dependem do CSS principal. Tudo gated em >=1200px:
   NAO afeta mobile nem o offcanvas (<=991px). Nada e removido; so layout.
   Causa-raiz evitada: no desktop a SIDEBAR e a unica nav primaria; a journey-nav
   (topbar) fica oculta para nunca duplicar a navegacao.
   ============================================================================ */
@media (min-width: 1200px) {
    /* Defesa contra estouro horizontal do conteudo deslocado pelo margin-left.
       O body ja tem overflow-x:hidden global; aqui limitamos a largura do main. */
    .sf-main { max-width: 100%; }
}

/* ============================================================================
   Fase J — Etapas 5/7: sticky actions + skeleton/error state
   ----------------------------------------------------------------------------
   E5) Coluna de acoes sticky-right em tabelas horizontais (>=lg). Mantem os
       botoes de linha acessiveis enquanto o usuario rola para a esquerda para
       ler SKU/titulos longos. Implementacao: position:sticky + right:0; z-index:2
       para ficar acima do conteudo que passa por baixo. Sombra leve a esquerda
       para destacar a coluna do scroll horizontal. Nao afeta mobile (tabela
       vira card <lg via classes ja existentes).
   E7) .lx-skeleton + .lx-error-state: estados visuais reutilizaveis para
       carregamento e erro de listagens. Skeleton usa shimmer (gradiente animado)
       com 1.4s loop; error state usa tokens LOJEXA (--sf-error / --sf-error-bg
       com fallback) e borda tracejada.
   ============================================================================ */

/* E5 — coluna sticky (cabeçalho e celulas). Aplicada em products/index.php */
.shopee-products-table .lx-row-actions,
.shopee-products-table [data-sticky="right"] {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 2;
    box-shadow: -2px 0 4px rgba(0, 0, 0, .04);
    min-width: 110px;
}
.shopee-products-table .lx-row-actions-head {
    z-index: 3; /* acima das celulas */
    background: #f9fafb;
}

/* E5b — botoes de acao diretos (sem dropdown) na coluna Acoes de /products.
   Acoes sao icon-only ou rotuladas, com tooltip nativo (title attr).
   Sem clipe de overflow, sem Bootstrap dropdown, sem Popper. */
.shopee-products-table td.lx-row-actions {
    min-width: 280px;
    white-space: nowrap;
}
.shopee-products-table td.lx-row-actions .btn {
    padding: .15rem .5rem;
    font-size: .8rem;
    line-height: 1.4;
}
.shopee-products-table td.lx-row-actions .replicate-btn {
    min-width: 110px;
}

/* E7 — skeleton com shimmer */
.lx-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: lx-skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
    display: block;
    color: transparent;
}
@keyframes lx-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* E7 — error state reutilizavel */
.lx-error-state {
    padding: 1.5rem;
    border: 1px dashed #dc2626;
    border-radius: 8px;
    color: #dc2626;
    background: #fef2f2;
    margin: 1rem 0;
}
.lx-error-state .lx-error-title {
    font-weight: 600;
    margin: 0 0 .25rem 0;
    font-size: 1rem;
}
.lx-error-state .lx-error-message {
    margin: 0;
    font-size: .875rem;
    color: #991b1b;
}
.lx-error-state .lx-error-actions {
    margin-top: .75rem;
}

/* ============================================================================
   [REMOVIDO em 28-jun-2026] Regras antigas de dropdown clipped do .table-responsive.
   Substituidas por botoes diretos na coluna de acoes (sem dropdown, sem clipe).
   Ver .shopee-products-table td.lx-row-actions acima.
   ============================================================================ */
