/* Orders table UI: search, header controls, table rows, inline editing and column filters */
#orders-table tbody td {
    font-variant-numeric: tabular-nums;
}

.table-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    width: 300px;
    max-width: min(42vw, 420px);
    padding: 3px 8px 3px 30px;
    border: 1.5px solid #e8eaed;
    border-radius: 8px;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, width 0.2s;
}

.table-search-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    font-size: 0.8rem;
    pointer-events: none;
}

.table-search-wrap:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: #fff;
    width: 360px;
}

.table-search-chips {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 70%;
    overflow-x: auto;
    scrollbar-width: none;
}

.table-search-chips::-webkit-scrollbar {
    display: none;
}

.table-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    max-width: 130px;
    padding: 0 6px 0 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.table-search-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-search-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6366f1;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1;
}

.table-search-input {
    border: 0;
    border-radius: 0;
    padding: 0;
    height: 28px;
    font-size: 0.82rem;
    width: 100%;
    min-width: 90px;
    flex: 1 1 90px;
    outline: none;
    background: transparent;
    color: #374151;
}

.table-search-input:focus {
    box-shadow: none;
    background: transparent;
    width: 100%;
}

.table-search-input::placeholder {
    color: #94a3b8;
}

.reset-order-filters-btn {
    color: #64748b;
}

.reset-order-filters-btn.has-filters {
    color: #4f46e5;
    background: #eef2ff;
}

.mobile-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-search-row .form-control {
    min-width: 0;
}

.mobile-search-row .reset-order-filters-btn {
    flex: 0 0 auto;
}

.ch-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    min-width: 190px;
}

.ch-divider {
    width: 1px;
    height: 20px;
    background: #e5e7eb;
    flex-shrink: 0;
    margin: 0 8px;
}

.ch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.13s, box-shadow 0.13s, opacity 0.13s;
    font-family: inherit;
}

.ch-btn-primary {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 1px 4px rgba(99,102,241,0.25);
}

.ch-btn-primary:hover {
    background: #4f46e5;
}

.ch-btn-success {
    background: #059669;
    color: #fff;
    box-shadow: 0 1px 4px rgba(5,150,105,0.2);
}

.ch-btn-success:hover {
    background: #047857;
}

.ch-btn-export {
    background: #fff;
    color: #64748b;
    border: 1.5px solid #d8e0ea;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.ch-btn-export:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.ch-btn-export-expand {
    width: 38px;
    min-width: 38px;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
    overflow: hidden;
    justify-content: flex-start;
    gap: 0.5rem;
    transition: width 0.18s ease, background 0.13s, box-shadow 0.13s, opacity 0.13s, border-color 0.13s;
}

.ch-btn-export-label {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.18s ease, opacity 0.12s ease;
}

.ch-btn-export i {
    color: #94a3b8;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.ch-btn-export-expand:hover,
.ch-btn-export-expand:focus-visible {
    width: 132px;
    min-width: 132px;
}

.ch-btn-export-expand:hover .ch-btn-export-label,
.ch-btn-export-expand:focus-visible .ch-btn-export-label {
    max-width: 84px;
    opacity: 1;
}

.ch-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}

.ch-btn-ghost:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.ch-btn-ghost.active {
    background: #ede9fe;
    color: #7C3AED;
    border-color: #c4b5fd;
}

.board-user-filters {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    max-width: min(38vw, 360px);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.board-user-filters::-webkit-scrollbar {
    display: none;
}

.board-user-chip {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1.5px solid #dbe4ee;
    border-radius: 999px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: transform 0.13s, border-color 0.13s, box-shadow 0.13s, background 0.13s;
    flex-shrink: 0;
    position: relative;
}

.board-user-chip:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    transform: translateY(-1px);
}

.board-user-chip.active {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.board-user-chip-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    flex-shrink: 0;
    overflow: hidden;
}

.board-user-chip-avatar.has-image {
    background: #e2e8f0;
    color: transparent;
}

.board-user-chip-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.board-user-chip--all .board-user-chip-avatar {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #334155;
}

.board-user-chip-count {
    position: absolute;
    right: -2px;
    bottom: -2px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.63rem;
    font-weight: 700;
    color: #475569;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    padding: 0 4px;
    line-height: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin .6s linear;
}

table {
    font-size: 0.875rem;
    position: relative;
}

#orders-table {
    table-layout: auto;
    width: 100%;
    min-width: max(100%, 900px);
    font-size: 0.9rem;
    border-collapse: separate !important;
    border-spacing: 0 3px !important;
}

.table {
    margin-bottom: 0;
}

.table-responsive-adaptive {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

#orders-table tbody tr {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease, transform 0.12s ease;
    position: relative;
}

#orders-table tbody tr:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09) !important;
    transform: translateY(-1px);
    z-index: 5;
}

#orders-table tbody tr.row-editing {
    background: #fffbeb !important;
    box-shadow: 0 0 0 2px #f59e0b, 0 4px 16px rgba(245,158,11,0.15) !important;
    transform: none !important;
}

#orders-table tbody td {
    padding: 0.8rem 0.75rem !important;
    vertical-align: middle;
    border: none !important;
    color: #374151;
    font-size: inherit;
}

#orders-table tbody td:first-child {
    border-radius: 8px 0 0 8px;
}

#orders-table tbody td:last-child {
    border-radius: 0 8px 8px 0;
}

.table td,
.table th {
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#orders-table thead th {
    white-space: nowrap;
}

#orders-table td:nth-child(5) {
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#orders-table td:nth-child(5):hover::after {
    content: attr(data-full-text);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: normal;
    z-index: 9999;
    max-width: 350px;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.4;
    pointer-events: none;
}

#orders-table td:nth-child(5):hover::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 0, 0, 0.9);
    z-index: 10000;
    pointer-events: none;
}

.status-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: inherit !important;
    font-weight: 600 !important;
    white-space: nowrap;
    width: auto !important;
    text-align: left !important;
    letter-spacing: 0.01em;
}

.status-badge::before {
    display: none;
}

.status-new { background: #dbeafe !important; color: #1d4ed8 !important; }
.status-processing { background: #fef3c7 !important; color: #b45309 !important; }
.status-paid { background: #d1fae5 !important; color: #065f46 !important; }
.status-shipping { background: #ede9fe !important; color: #5b21b6 !important; }
.status-done { background: #dcfce7 !important; color: #14532d !important; }
.status-cancelled { background: #f1f5f9 !important; color: #64748b !important; }
.status-default { background: #f1f5f9 !important; color: #64748b !important; }

.editable-field {
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.editable-field:hover {
    background-color: #f8f9fa;
}

.status-cell.editable-field:hover {
    background-color: #e3f2fd;
}

.status-cell.editable-field:hover .status-badge {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.editable-field.editing {
    padding: 0;
    background-color: transparent;
    vertical-align: middle;
}

.editable-field.editing input,
.editable-field.editing select {
    margin: 0;
    line-height: 1.4;
    height: 34px;
    display: inline-block;
    vertical-align: middle;
}

.editable-field input,
.editable-field select {
    width: 100%;
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.9rem;
    background-color: #fff;
    vertical-align: middle;
    box-sizing: border-box;
    height: auto;
    min-height: 34px;
}

.status-cell.editing select {
    font-size: 0.8rem;
    padding: 4px 6px;
}

.editable-field input:focus,
.editable-field select:focus {
    outline: none;
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 0.2rem rgba(26, 122, 66, 0.2);
}

tr .actions .save-btn,
tr .actions .cancel-btn,
.actions .save-btn,
.actions .cancel-btn {
    display: none !important;
}

tr.row-editing .actions .edit-btn,
tr.row-editing .actions .delete-btn,
.row-editing .actions .edit-btn,
.row-editing .actions .delete-btn {
    display: none !important;
}

tr.row-editing .actions .save-btn,
tr.row-editing .actions .cancel-btn,
.row-editing .actions .save-btn,
.row-editing .actions .cancel-btn {
    display: inline-flex !important;
}

.comment {
    max-width: 250px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    font-size: 0.85rem;
    color: #6c757d;
    padding: 0.5rem !important;
}

.comment-address {
    color: #334155;
    font-style: normal;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.comment-note {
    color: #6c757d;
    font-style: italic;
}

.comment:empty::before {
    content: "-";
    color: #dee2e6;
    font-style: italic;
}

.comment.editable-field:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.comment.editing input {
    min-height: 60px;
    resize: vertical;
}

.price,
.quantity {
    padding: 0.25rem 0.5rem !important;
}

.status-cell {
    padding: 0.25rem 0.5rem !important;
    min-width: 120px;
    text-align: center;
}

.row-number {
    font-size: inherit !important;
    color: #94a3b8 !important;
    font-weight: 500;
    text-align: center;
}

.customer-phone {
    font-size: inherit !important;
    color: #64748b !important;
    letter-spacing: 0.01em;
}

.customer-name {
    font-size: inherit !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

.product-name {
    font-size: inherit;
    color: #374151;
}

.unit-price {
    font-size: inherit;
    color: #64748b;
    text-align: right;
}

.quantity {
    font-size: inherit;
    color: #64748b;
    text-align: center;
}

td.total-price {
    font-size: inherit !important;
    font-weight: 700 !important;
    color: #059669 !important;
    white-space: nowrap;
    text-align: right;
}

.manager {
    font-size: inherit !important;
    font-weight: 500 !important;
    color: #6366f1 !important;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment {
    font-size: inherit !important;
    color: #94a3b8 !important;
    font-style: italic;
}

.created-at {
    line-height: 1.25 !important;
    white-space: normal !important;
}

.date-main {
    display: block;
    font-size: inherit;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.date-time {
    display: block;
    font-size: 0.85em;
    color: #94a3b8;
    margin-top: 1px;
    white-space: nowrap;
}

.table td {
    padding: 0.5rem;
    vertical-align: middle;
}

tr[data-is-decomposed="true"] {
    border-left: 3px solid var(--color-primary);
}

tr[data-is-decomposed="true"]:not([data-product-index="0"]) {
    border-top: 1px dashed #d4e6da;
}

tr[data-is-decomposed="true"]:not([data-product-index="0"]) td {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

tr[data-is-decomposed="true"][data-product-index="0"] {
    border-top: 2px solid var(--color-primary);
}

tr[data-is-decomposed="true"] td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--color-primary);
}

tr[data-is-decomposed="true"]:not([data-product-index="0"]) .row-number,
tr[data-is-decomposed="true"]:not([data-product-index="0"]) .customer-name,
tr[data-is-decomposed="true"]:not([data-product-index="0"]) .customer-phone,
tr[data-is-decomposed="true"]:not([data-product-index="0"]) .manager,
tr[data-is-decomposed="true"]:not([data-product-index="0"]) .status-badge,
tr[data-is-decomposed="true"]:not([data-product-index="0"]) .comment,
tr[data-is-decomposed="true"]:not([data-product-index="0"]) .created-at,
tr[data-is-decomposed="true"]:not([data-product-index="0"]) .actions {
    visibility: hidden;
}

tr[data-is-decomposed="true"]:hover ~ tr[data-original-order-id],
tr[data-is-decomposed="true"]:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.grouped-order {
    background-color: #f7faf8;
    border-left: 4px solid var(--color-primary);
}

.grouped-order:hover {
    background-color: #eef5f1;
}

.product-row {
    background-color: #ffffff;
    border-left: 4px solid #16a34a;
    margin-left: 20px;
    animation: slideIn 0.3s ease-out;
}

.product-row:hover {
    background-color: #f8f9fa;
}

.product-row td:first-child {
    padding-left: 30px;
}

.order-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #6b7280;
    border-radius: 4px;
    padding: 0;
    margin-right: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.order-expand-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.order-expand-btn i {
    transition: transform 0.2s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grouped-order.row-editing {
    background-color: #fef9e8;
    border-left-color: #d97706;
}

.product-row.row-editing {
    background-color: #e8f4f8;
    border-left-color: #0891b2;
}

@media (min-width: 1024px) {
    #orders-table thead th {
        text-align: left !important;
        vertical-align: middle !important;
        font-weight: 700 !important;
        font-size: inherit !important;
        text-transform: uppercase !important;
        letter-spacing: 0.07em !important;
        background: #f8fafc !important;
        color: #94a3b8 !important;
        border: none !important;
        padding: 0.65rem 0.75rem !important;
    }

    #orders-table thead th:first-child { border-radius: 8px 0 0 8px; }
    #orders-table thead th:last-child  { border-radius: 0 8px 8px 0; }

    #orders-table th:nth-child(1),
    #orders-table th:nth-child(2),
    #orders-table th:nth-child(6),
    #orders-table th:nth-child(7),
    #orders-table th:nth-child(8),
    #orders-table th:nth-child(9),
    #orders-table th:nth-child(10),
    #orders-table th:nth-child(12) {
        text-align: center !important;
    }

    #orders-table thead tr th:nth-child(8) {
        text-align: center !important;
        text-align-last: center !important;
    }

    #orders-table td.status-cell,
    #orders-table td:nth-child(10) {
        text-align: center !important;
    }

    #orders-table td.status-cell .status-badge {
        display: inline-block;
        margin: 0 auto;
    }

    .actions .btn .btn-text,
    .actions .btn-sm .btn-text,
    .actions .save-btn .btn-text,
    .actions .cancel-btn .btn-text,
    .actions .edit-btn .btn-text,
    .actions .delete-btn .btn-text {
        display: none !important;
    }

    .actions .btn {
        font-size: 0 !important;
    }

    .actions .btn i {
        font-size: 0.6rem !important;
    }

    .actions .btn span:not(.icon):not([class*="bi"]):not([class*="fa"]) {
        display: none !important;
    }

    .actions .btn {
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 1023.98px) {
    .comment {
        max-width: 200px;
    }

    .price,
    .quantity {
        padding: 0.2rem 0.4rem !important;
    }

    .status-badge {
        font-size: 0.72rem;
        padding: 0.2em 0.5em;
    }

    .status-cell.editing select {
        font-size: 0.75rem;
        padding: 2px 4px;
    }

    #orders-table thead th {
        text-align: left;
        font-size: 0.875rem;
    }

    .table td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }
}

.row-actions-overlay {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    gap: 4px;
    align-items: center;
    background: linear-gradient(to right, transparent, #fff 20%);
    padding: 2px 0 2px 24px;
    border-radius: 0 8px 8px 0;
}

#orders-table tbody tr:hover .row-actions-overlay {
    display: flex;
}

#orders-table tbody tr.row-editing .row-actions-overlay {
    display: none !important;
}

.row-actions-overlay .btn-row-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.13s, color 0.13s, border-color 0.13s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.row-actions-overlay .btn-row-act:hover {
    background: #f1f5f9;
    color: #374151;
    border-color: #cbd5e1;
}

.row-actions-overlay .btn-row-act.btn-share:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #93c5fd;
}

.row-actions-overlay .btn-row-act.btn-delete:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fca5a5;
}

#orders-table .th-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

#orders-table .th-sortable:hover {
    color: #6366f1 !important;
}

#orders-table .th-sort-active {
    color: #6366f1 !important;
}

#orders-table .sort-icon {
    font-style: normal;
    font-size: 0.75em;
    opacity: 0.8;
}

.th-manager-col {
    white-space: nowrap;
}

#orders-table th.th-filter-active {
    background: inherit;
    color: inherit;
    box-shadow: none;
}

#orders-table th.th-filter-active .th-col-title {
    color: inherit;
}

.th-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0 2px;
    margin-left: 4px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    vertical-align: middle;
}

.th-filter-btn:hover {
    color: #6366f1;
    background: #f1f5f9;
}

.th-filter-btn.active {
    color: #5b21b6;
    background: transparent;
}

.th-filter-dropdown {
    display: none;
    position: fixed;
    z-index: 1055;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 0;
    overflow: hidden;
}

.th-filter-dropdown.open {
    display: block;
}

.th-filter-header {
    padding: 8px 14px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #f1f5f9;
}

.th-filter-search-wrap {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
}

.th-filter-search {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 0.78rem;
    outline: none;
    color: #374151;
    font-family: inherit;
}

.th-filter-search:focus {
    border-color: #6366f1;
}

.th-filter-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 200px;
    overflow-y: auto;
}

.th-filter-item {
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.12s;
    font-family: inherit;
}

.th-filter-item:hover {
    background: #f8fafc;
}

.th-filter-item.active {
    color: #6366f1;
    font-weight: 600;
    background: #eef2ff;
}

.th-filter-footer {
    border-top: 1px solid #f1f5f9;
    padding: 6px 8px;
    text-align: right;
}

.th-filter-clear {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 5px;
    font-family: inherit;
    transition: color 0.13s, background 0.13s;
}

.th-filter-clear:hover {
    color: #ef4444;
    background: #fef2f2;
}

#orders-table th:nth-child(12),
#orders-table td:nth-child(12) {
    overflow: visible;
    padding: 0.4rem 0.25rem;
    text-align: center;
}

.actions {
    padding: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.actions-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.actions .btn {
    margin: 0 !important;
    font-size: 0.6rem !important;
    padding: 0.15rem 0.25rem !important;
    white-space: nowrap !important;
    min-width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.2rem !important;
    line-height: 1 !important;
    width: 24px !important;
    height: 24px !important;
}

.actions .btn i {
    font-size: 0.6rem !important;
    margin: 0 !important;
}

.actions .edit-btn {
    background: transparent !important;
    border: 1.5px solid #e0e3ea !important;
    color: #6366f1 !important;
}

.actions .edit-btn:hover {
    background: #ebe9ff !important;
    border-color: #c7d2fe !important;
}

.actions .share-btn {
    background: transparent !important;
    border: 1.5px solid #e0e3ea !important;
    color: #2563eb !important;
}

.actions .share-btn:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.actions .delete-btn {
    background: transparent !important;
    border: 1.5px solid #e0e3ea !important;
    color: #ef4444 !important;
}

.actions .delete-btn:hover {
    background: #fff0f0 !important;
    border-color: #ffd0d0 !important;
}

.actions .save-btn {
    background: transparent !important;
    border: 1.5px solid #e0e3ea !important;
    color: #059669 !important;
}

.actions .save-btn:hover {
    background: #f0fdf4 !important;
    border-color: #a7f3d0 !important;
}

.actions .cancel-btn {
    background: transparent !important;
    border: 1.5px solid #e0e3ea !important;
    color: #94a3b8 !important;
}

.actions .cancel-btn:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

#search-orders {
    width: 210px;
    border-radius: 2rem;
    padding-left: 1rem;
    border: 1px solid #d4e6da;
    background-color: #f7faf8;
    transition: all 0.2s ease;
}

#search-orders:focus {
    background-color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 122, 66, 0.15);
}

tr.row-editing td {
    vertical-align: middle;
}

@media (min-width: 1024px) and (max-width: 1600px) {
    #orders-table,
    #orders-table th,
    #orders-table td,
    #orders-table tbody td,
    #orders-table thead th {
        font-size: 0.78rem !important;
    }

    #orders-table th,
    #orders-table td {
        padding: 0.4rem 0.35rem !important;
    }
}

@media (min-width: 1024px) and (max-width: 1460px) {
    #orders-table,
    #orders-table th,
    #orders-table td,
    #orders-table tbody td,
    #orders-table thead th {
        font-size: 0.72rem !important;
    }

    #orders-table th,
    #orders-table td {
        padding: 0.35rem 0.28rem !important;
    }
}

@media (min-width: 1024px) and (max-width: 1280px) {
    #orders-table,
    #orders-table th,
    #orders-table td,
    #orders-table tbody td,
    #orders-table thead th {
        font-size: 0.67rem !important;
    }

    #orders-table th,
    #orders-table td {
        padding: 0.28rem 0.22rem !important;
    }
}

@media (max-width: 1023.98px) {
    #orders-table td:nth-child(5):hover::after,
    #orders-table td:nth-child(5):hover::before {
        display: none;
    }

    #orders-table th:nth-child(12),
    #orders-table td:nth-child(12) {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
    }

    .actions .btn {
        font-size: 0.5rem !important;
        padding: 0.1rem 0.2rem !important;
        width: 18px !important;
        height: 18px !important;
    }

    .actions .btn i {
        font-size: 0.5rem !important;
    }

    .actions .btn .btn-text {
        display: none !important;
    }
}
