/* Inline carting grid — flat cells, no boxed form-input look */

.ocm-carting-sheet {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ocm-carting-sheet__table {
    width: 100%;
    min-width: 1320px;
    border-collapse: collapse;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.ocm-carting-sheet__th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #334155;
    font-weight: 600;
    text-align: left;
    padding: 0.5rem 0.45rem;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e8ecf0;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.ocm-carting-sheet__th:last-child {
    border-right: none;
}

.ocm-carting-sheet__td {
    padding: 0;
    border-bottom: 1px solid #eef2f6;
    border-right: 1px solid #f1f5f9;
    vertical-align: middle;
    background: #fff;
}

.ocm-carting-sheet__td:last-child {
    border-right: none;
}

.ocm-carting-sheet__row:nth-child(even) .ocm-carting-sheet__td {
    background: #fafbfc;
}

.ocm-carting-sheet__row:hover .ocm-carting-sheet__td {
    background: #f4f8fb;
}

.ocm-carting-sheet__td--sl {
    width: 2.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    font-weight: 500;
    padding: 0.35rem 0.25rem !important;
    background: #f8fafc !important;
    border-right: 1px solid #e8ecf0 !important;
}

.ocm-carting-sheet__td--action {
    padding: 0.35rem 0.45rem !important;
    text-align: center;
    white-space: nowrap;
    background: #fafbfc !important;
}

.ocm-carting-sheet__td--action .btn {
    vertical-align: middle;
}

/* Flat inputs — fill cell, no rounded boxes */
.ocm-carting-sheet__table .ocm-carting-sheet__td--warehouse,
.ocm-carting-sheet__table .ocm-carting-sheet__td--supplier {
    min-width: 9.5rem;
    max-width: 14rem;
}

.ocm-carting-sheet__table .ocm-carting-sheet__td--inv-no {
    min-width: 6.5rem;
}

.ocm-carting-sheet__table .ocm-carting-sheet__td--inv-date {
    min-width: 9.5rem;
}

.ocm-carting-sheet__table input.ocm-carting-cell,
.ocm-carting-sheet__table select.ocm-carting-cell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0.4rem 0.45rem;
    font-size: inherit;
    font-family: inherit;
    color: #0f172a;
    box-shadow: none;
}

/* Keep native date / file chrome; flatten plain text + number */
.ocm-carting-sheet__table input.ocm-carting-cell:not([type="date"]):not([type="file"]) {
    -webkit-appearance: none;
    appearance: none;
}

.ocm-carting-sheet__table select.ocm-carting-cell {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    padding-right: 1.35rem;
}

.ocm-carting-sheet__table select.ocm-carting-cell:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(13, 148, 136, 0.35);
}

.ocm-carting-sheet__table input.ocm-carting-cell::placeholder {
    color: #94a3b8;
}

.ocm-carting-sheet__table input.ocm-carting-cell:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 0 2px rgba(13, 148, 136, 0.35);
}

.ocm-carting-sheet__table input.ocm-carting-cell[readonly] {
    background: rgba(241, 245, 249, 0.85);
    color: #475569;
    cursor: default;
}

.ocm-carting-sheet__table input.ocm-carting-cell[readonly]:focus {
    box-shadow: none;
}

.ocm-carting-sheet__table input[type="number"].ocm-carting-cell {
    -moz-appearance: textfield;
}

.ocm-carting-sheet__table input[type="number"].ocm-carting-cell::-webkit-outer-spin-button,
.ocm-carting-sheet__table input[type="number"].ocm-carting-cell::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Numeric columns — compact but readable */
.ocm-carting-sheet__table .ocm-carting-sheet__td--num {
    width: 4.25rem;
    min-width: 4rem;
}

.ocm-carting-sheet__table .ocm-carting-sheet__td--date {
    min-width: 9.5rem;
}

.ocm-carting-sheet__table .ocm-carting-sheet__td--file {
    min-width: 7rem;
    max-width: 9rem;
}

.ocm-carting-sheet__table input[type="file"].ocm-carting-cell {
    padding: 0.25rem 0.35rem;
    font-size: 0.7rem;
    cursor: pointer;
}

.ocm-carting-sheet__table input[type="file"].ocm-carting-cell::file-selector-button {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    margin-right: 0.4rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.2rem;
    background: #fff;
    color: #475569;
    cursor: pointer;
}

.ocm-carting-sheet__table input[type="file"].ocm-carting-cell::file-selector-button:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
