/* P224 compact phone layouts for core operational pages. */
body[data-mobile-mode="true"] .mobile-core-card-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table tbody {
    padding: 0 !important;
    background: transparent;
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-card-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 9px;
    padding: 0;
    overflow: hidden;
    border-color: #d9e2ec;
    box-shadow: 0 2px 7px rgba(35, 57, 83, .05);
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-card-row > td {
    min-width: 0;
    min-height: 48px;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 7px 9px !important;
    overflow-wrap: anywhere;
    border-right: 1px solid #edf1f5 !important;
    border-bottom: 1px solid #edf1f5 !important;
    text-align: left !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-card-row > td:nth-child(2n) {
    border-right: 0 !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-card-row > td::before {
    float: none;
    max-width: 100%;
    margin: 0;
    color: #78879a;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-card-row > td code,
body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-card-row > td strong {
    color: #1e3857;
    font-size: 13px;
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-secondary-cell {
    display: none !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table .is-mobile-core-expanded > .mobile-core-secondary-cell {
    display: flex !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"],
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="warehouse"],
body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-detail-cell {
    grid-column: 1 / -1;
    border-right: 0 !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] {
    display: block !important;
    padding: 8px 9px !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"]::before {
    display: block;
    margin-bottom: 6px;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > .d-flex,
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > div:not(.modal) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > form,
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > a,
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > button,
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > .d-flex > form,
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > .d-flex > a,
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > div:not(.modal) > form,
body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > div:not(.modal) > a {
    min-width: 0;
    width: 100%;
    margin: 0 !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] .btn {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 4px 5px;
    white-space: normal;
    font-size: 10px;
    line-height: 1.15;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="warehouse"] form {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="warehouse"] .form-select {
    width: 100% !important;
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-detail-cell {
    min-height: 39px !important;
    padding: 5px 8px !important;
    background: #f8fafc;
}

body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-detail-cell::before { display: none; }

.mobile-core-detail-toggle {
    width: 100%;
    min-height: 30px;
    border: 0;
    background: transparent;
    color: #426381;
    font-size: 11px;
    font-weight: 700;
}

body[data-mobile-mode="true"] .mobile-core-card-table tfoot { display: none !important; }
body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-empty-row {
    padding: 14px 10px;
    text-align: center;
}
body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-empty-row td {
    min-height: 0;
    padding: 0 !important;
    border: 0 !important;
    text-align: center !important;
}
body[data-mobile-mode="true"] .mobile-core-card-table .mobile-core-empty-row td::before { display: none; }
body[data-mobile-mode="true"] .mobile-core-card-table .form-control,
body[data-mobile-mode="true"] .mobile-core-card-table .form-select { width: 100%; min-width: 0; font-size: 12px; }
body[data-mobile-mode="true"] .mobile-core-kind-products .prod-thumb { width: 54px; height: 54px; object-fit: contain; }
body[data-mobile-mode="true"] .mobile-core-kind-products td[data-mobile-key="check"] { min-height: 40px; }

body[data-mobile-mode="true"] .card:has(> .order-table-wrap),
body[data-mobile-mode="true"] .card:has(.mobile-core-card-table),
body[data-mobile-mode="true"] .print-center-section:has(.mobile-core-card-table) {
    overflow: visible;
    border: 0 !important;
    background: transparent !important;
}

body[data-mobile-mode="true"] .mobile-warehouse-heading { gap: 8px; }
body[data-mobile-mode="true"] .mobile-warehouse-heading h4 { display: none; }
body[data-mobile-mode="true"] .mobile-warehouse-heading { justify-content: flex-end !important; }
body[data-mobile-mode="true"] .mobile-warehouse-grid { gap: 9px; margin: 0; }
body[data-mobile-mode="true"] .mobile-warehouse-column { width: 100%; margin: 0 !important; padding: 0; }
body[data-mobile-mode="true"] .mobile-warehouse-card .card-header { gap: 8px; }
body[data-mobile-mode="true"] .mobile-warehouse-card .card-header > div { display: flex; gap: 5px; }
body[data-mobile-mode="true"] .mobile-warehouse-card .card-header .btn { min-height: 31px; padding: 4px 7px; font-size: 11px; }
body[data-mobile-mode="true"] .mobile-warehouse-metrics { margin-bottom: 8px !important; }
body[data-mobile-mode="true"] .mobile-warehouse-metrics > div {
    padding: 7px 8px;
    border-right: 1px solid #edf1f5;
    background: #f8fafc;
}
body[data-mobile-mode="true"] .mobile-warehouse-metrics > div:nth-child(2n) { border-right: 0; }
body[data-mobile-mode="true"] .mobile-warehouse-card .progress { height: 8px !important; }

body[data-mobile-mode="true"] .label-page-header { margin-bottom: 9px; }
body[data-mobile-mode="true"] .label-page-header > div:first-child { display: none; }
body[data-mobile-mode="true"] .label-page-header { justify-content: flex-end; }
body[data-mobile-mode="true"] [data-regional-orders] > h4,
body[data-mobile-mode="true"] [data-regional-products] > h4 { display: none; }
body[data-mobile-mode="true"] [data-regional-products] { justify-content: flex-end !important; }
body[data-mobile-mode="true"] .procurement-toolbar > div:first-child { display: none; }
body[data-mobile-mode="true"] .procurement-toolbar { justify-content: flex-end !important; margin-bottom: 9px !important; }
body[data-mobile-mode="true"] .procurement-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 9px !important;
}
body[data-mobile-mode="true"] .procurement-summary > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 3px;
    text-align: center;
}
body[data-mobile-mode="true"] .procurement-summary > div span { font-size: 9px !important; }
body[data-mobile-mode="true"] .procurement-summary > div strong { font-size: 13px; }
body[data-mobile-mode="true"] .print-center-tabs { margin-bottom: 9px; padding-bottom: 4px; }
body[data-mobile-mode="true"] .print-center-tab { min-height: 34px; padding: 6px 8px; font-size: 11px; }
body[data-mobile-mode="true"] .print-center-stat-grid,
body[data-mobile-mode="true"] .print-center-stat-grid.print-stat-four {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 9px;
}
body[data-mobile-mode="true"] .print-center-stat {
    min-height: 68px;
    padding: 8px 3px;
    text-align: center;
    border-right: 1px solid #e8edf3;
    border-bottom: 0;
}
body[data-mobile-mode="true"] .print-center-stat span { min-height: 24px; font-size: 9px; line-height: 1.2; }
body[data-mobile-mode="true"] .print-center-stat strong { margin-top: 4px; font-size: 18px; }
body[data-mobile-mode="true"] .print-center-stat small { margin-left: 1px; font-size: 8px; }
body[data-mobile-mode="true"] .print-task-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 9px;
    padding: 9px;
}
body[data-mobile-mode="true"] .print-task-search-actions { grid-column: 1 / -1; }

@media (max-width: 359px) {
    body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > .d-flex,
    body[data-mobile-mode="true"] .mobile-core-card-table td[data-mobile-key="actions"] > div:not(.modal) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body[data-mobile-mode="true"] .print-center-stat-grid,
    body[data-mobile-mode="true"] .print-center-stat-grid.print-stat-four {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
