.stocktaking-page .stocktaking-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    padding: 22px 18px 26px;
    margin-bottom: 26px;
}

.stocktaking-page .stocktaking-header {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.stocktaking-page .required-star {
    color: #ff3b30;
    font-weight: 700;
}

.stocktaking-page .stocktaking-filter-actions,
.stocktaking-page .stocktaking-grid-actions,
.stocktaking-page .stocktaking-grid-top-actions {
    /*display: flex;
   // align-items: end;*/
/*    gap: 10px;*/
    /*flex-wrap: wrap;*/
}

.stocktaking-page .stocktaking-filter-actions {
    min-height: 74px;
}

.stocktaking-page .stocktaking-grid-top-actions {
    margin-top: 12px;
    margin-bottom: 16px;
}

.stocktaking-page.stocktaking-figma-page .stocktaking-master-card,
.stocktaking-page.stocktaking-figma-page .stocktaking-grid-card {
    padding: 26px 18px;
}

.stocktaking-page.stocktaking-figma-page .stocktaking-master-field label,
.stocktaking-page.stocktaking-figma-page .stocktaking-filter-col label,
.stocktaking-page.stocktaking-figma-page  label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 700;
    font-size: 13px;
}

.stocktaking-page.stocktaking-figma-page .stocktaking-master-card .form-control,
.stocktaking-page.stocktaking-figma-page .stocktaking-master-card .form-select,
.stocktaking-page.stocktaking-figma-page .stocktaking-grid-card .form-control,
.stocktaking-page.stocktaking-figma-page .stocktaking-grid-card .form-select {
    height: 40px;
    border-radius: 4px;
    border: 1px solid #dfe5ec;
    box-shadow: none;
}

.stocktaking-page.stocktaking-figma-page .select2-container {
    width: 100% !important;
}

.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--single,
.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--multiple {
    min-height: 40px;
    border: 1px solid #dfe5ec;
    border-radius: 4px;
    box-shadow: none;
    display: flex;
    align-items: center;
    padding: 4px 12px;
}

.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--multiple {
    flex-wrap: wrap;
    gap: 4px;
}

.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--single .select2-selection__rendered,
.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
    margin: 0;
    line-height: 1.6;
}

.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--multiple .select2-search--inline .select2-search__field,
.stocktaking-page.stocktaking-figma-page .select2-container .select2-selection--multiple .select2-selection__choice {
    margin-top: 0;
}

.stocktaking-page.stocktaking-figma-page textarea.form-control {
    height: 74px;
    resize: none;
    padding-top: 12px;
}

.stocktaking-page .stocktaking-field-error {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    color: #d93025;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.stocktaking-page .stocktaking-input-invalid {
    border-color: #d93025 !important;
    background: #fff6f6;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12);
}

.stocktaking-page .stocktaking-input-invalid:focus {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.18);
}

.stocktaking-page.stocktaking-figma-page .stocktaking-grid-filter-head {
    align-items: end;
    margin-bottom: 14px;
}

.stocktaking-page.stocktaking-figma-page .stocktaking-grid-top-actions-inline {
    justify-content: flex-start;
    margin-top: 0;
    margin-bottom: 0;
}

.stocktaking-page.stocktaking-figma-page .stocktaking-grid-search-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
/*    column-gap: 36px;
    row-gap: 12px;
    margin-bottom: 10px;*/
}

.stocktaking-page.stocktaking-figma-page .stocktaking-grid-actions {
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 0;
    flex-wrap: nowrap;
    padding-inline-end: 0;
    padding-inline-start: 0;
}

.stocktaking-page.stocktaking-figma-page .stocktaking-grid-search-col {
/*    padding-inline-end: 18px;*/
    padding-inline-start: 0;
}

.stocktaking-page .stocktaking-btn-warning {
    background: #f6a623;
    border-color: #f6a623;
    color: #fff;
}

.stocktaking-page .stocktaking-btn-secondary {
    background: #9aa1aa;
    border-color: #9aa1aa;
    color: #fff;
}

.stocktaking-page .stocktaking-btn-secondary:hover,
.stocktaking-page .stocktaking-btn-secondary:focus {
    background: #868d96;
    border-color: #868d96;
    color: #fff;
}

.stocktaking-page #btnAddItem:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.stocktaking-page .stocktaking-btn-info {
    background: #26a9e0;
    border-color: #26a9e0;
    color: #fff;
}

.stocktaking-page .stocktaking-grid-actions {
/*    margin-bottom: 16px;*/
}

.stocktaking-page .stocktaking-grid-wrapper {
    margin-top: 14px;
}

.stocktaking-page .stocktaking-actions-dropdown {
    display: inline-block;
}

.stocktaking-page .stocktaking-actions-dropdown .dropdown-content {
    min-width: 165px;
    text-align: right;
}

.stocktaking-page .stocktaking-actions-dropdown .dropdown-content a {
    display: block;
    white-space: nowrap;
}

.stocktaking-page .stocktaking-table > thead > tr > th {
    background: #f1f3f6;
    color: #555;
    font-weight: 700;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 12px;
}

.stocktaking-page .stocktaking-table tbody td {
    vertical-align: middle;
    font-size: 12px;
    white-space: normal;
    padding: 10px 8px;
    line-height: 1.45;
}

.stocktaking-page .stocktaking-table .form-control {
    min-width: 90px;
    text-align: center;
}

.stocktaking-page .stocktaking-table {
    table-layout: fixed;
}

.stocktaking-page .stocktaking-item-cell {
    min-width: 250px;
    text-align: center;
}

.stocktaking-page .stocktaking-item-name {
    display: block;
    font-weight: 700;
    word-break: break-word;
}

.stocktaking-page .stocktaking-item-code {
    display: block;
    margin-top: 2px;
    color: #6f7b8a;
    word-break: break-word;
}

.stocktaking-page .stocktaking-table tbody tr.stocktaking-scan-highlight {
    animation: stocktaking-row-highlight 1.2s ease;
}

@keyframes stocktaking-row-highlight {
    0% {
        background-color: #d9f6e5;
    }

    100% {
        background-color: transparent;
    }
}

.stocktaking-page .stocktaking-grid-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    font-weight: 700;
}

.stocktaking-page .stocktaking-clickable-row {
    cursor: pointer;
}

.stocktaking-page .stocktaking-clickable-row:hover {
    background: #f7fbff;
}

.stocktaking-page .stocktaking-reference-code {
    font-size: 32px;
    font-weight: 800;
    color: #18324b;
    margin-bottom: 8px;
    text-align: right;
}

.stocktaking-page .stocktaking-details-outline-card {
    border: 2px solid #2b9cff;
    box-shadow: none;
}

.stocktaking-page.stocktaking-figma-page .stocktaking-grid-footer {
    padding-top: 4px;
}

.stocktaking-page .stocktaking-editor-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
    direction: rtl;
}

.stocktaking-page .stocktaking-editor-actions .btn {
    min-width: 190px;
    border-radius: 8px;
    height: 44px;
    font-weight: 700;
}

.stocktaking-page .stocktaking-primary-action {
    background: #109b4b;
    border-color: #109b4b;
}

.stocktaking-page .stocktaking-match-action {
    min-width: 230px;
    padding: 0 24px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(16, 155, 75, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.stocktaking-page .stocktaking-match-action:hover,
.stocktaking-page .stocktaking-match-action:focus {
    background: #109b4b;
    border-color: #109b4b;
    color: #fff;
    box-shadow: 0 14px 28px rgba(16, 155, 75, 0.24);
    transform: translateY(-1px);
}

.stocktaking-page .stocktaking-match-action i {
    font-size: 16px;
}

.stocktaking-page .stocktaking-secondary-action {
    background: #f6a623;
    border-color: #f6a623;
    color: #fff;
}

.stocktaking-page .stocktaking-post-match-outline-primary {
    min-width: 160px;
    background: #fff;
    border: 1px solid #2f82c3;
    color: #2f82c3;
    border-radius: 10px;
}

.stocktaking-page .stocktaking-post-match-outline-primary:hover,
.stocktaking-page .stocktaking-post-match-outline-primary:focus {
    background: #f4f9fd;
    border-color: #2f82c3;
    color: #2f82c3;
}

.stocktaking-page .stocktaking-post-match-solid-success {
    min-width: 160px;
    background: #4b8e17;
    border: 1px solid #4b8e17;
    color: #fff;
    border-radius: 10px;
}

.stocktaking-page .stocktaking-post-match-solid-success:hover,
.stocktaking-page .stocktaking-post-match-solid-success:focus {
    background: #417a13;
    border-color: #417a13;
    color: #fff;
}

.stocktaking-page .stocktaking-post-match-outline-success {
    min-width: 160px;
    background: #fff;
    border: 1px solid #7eb85a;
    color: #4b8e17;
    border-radius: 10px;
}

.stocktaking-page .stocktaking-post-match-outline-success:hover,
.stocktaking-page .stocktaking-post-match-outline-success:focus {
    background: #f6fbf2;
    border-color: #7eb85a;
    color: #4b8e17;
}

.stocktaking-page .stocktaking-readonly-field {
    background: #edf1f5;
    border: 1px solid #d9e2ea;
    border-radius: 6px;
    padding: 10px 14px;
    min-height: 42px;
    display: flex;
    align-items: center;
    color: #303133;
}

.stocktaking-page .stocktaking-notes-field {
    min-height: 74px;
    align-items: flex-start;
}

.stocktaking-page .stocktaking-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    font-weight: 700;
    padding: 8px 10px 2px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-header {
    justify-content: flex-start;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-master-card,
.stocktaking-page.stocktaking-details-page .stocktaking-details-grid-card {
    padding: 26px 18px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-field label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 700;
    font-size: 13px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-field {
    margin-bottom: 16px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-readonly-field {
    justify-content: flex-start;
    text-align: right;
    min-height: 30px;
    padding: 13px 14px;
    font-size: 12px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-notes-field {
    min-height: 74px;
    justify-content: flex-start;
    text-align: right;
}

.stocktaking-page.stocktaking-details-page .stocktaking-readonly-field-select {
    position: relative;
    justify-content: flex-start;
    padding-inline-start: 32px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-readonly-field-select::before {
    content: "\f107";
    font-family: FontAwesome;
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8c96a0;
    font-size: 14px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-grid-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-grid-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-search-col label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 700;
    font-size: 13px;
    text-align: right;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-search-col {
    margin-inline-start: auto;
}

.stocktaking-page.stocktaking-adjustment-review-page .stocktaking-adjustment-summary-card,
.stocktaking-page.stocktaking-adjustment-review-page .stocktaking-adjustment-grid-card {
    padding: 26px 18px;
}

.stocktaking-page.stocktaking-adjustment-review-page .stocktaking-details-field {
    margin-bottom: 16px;
}

.stocktaking-page.stocktaking-adjustment-review-page .stocktaking-details-field label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 700;
    font-size: 13px;
}

.stocktaking-page .stocktaking-readonly-field-date {
    position: relative;
    padding-inline-start: 38px;
}

.stocktaking-page .stocktaking-readonly-field-date::before {
    content: "\f073";
    font-family: FontAwesome;
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8c96a0;
    font-size: 14px;
}

.stocktaking-page .stocktaking-adjustment-reason {
    min-height: 74px;
    resize: vertical;
    border-radius: 6px;
}

.stocktaking-page .stocktaking-adjustment-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.stocktaking-page .stocktaking-cancel-action {
    min-width: 96px;
    border-radius: 10px;
}

.stocktaking-page .stocktaking-diff-positive {
    color: #2490c7;
    font-weight: 700;
}

.stocktaking-page .stocktaking-diff-negative {
    color: #d9534f;
    font-weight: 700;
}

.stocktaking-page .stocktaking-serial-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.stocktaking-page .stocktaking-serial-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.stocktaking-page .stocktaking-serial-status-pending {
    background: #fff7e6;
    color: #b26a00;
}

.stocktaking-page .stocktaking-serial-status-complete {
    background: #eaf8ec;
    color: #188038;
}

.stocktaking-page .stocktaking-serial-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.stocktaking-page .stocktaking-serial-modal-subtitle {
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
}

.stocktaking-page .stocktaking-serial-modal-alert {
    margin-bottom: 14px;
}

.stocktaking-page .stocktaking-serial-picker-meta {
    margin-top: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.stocktaking-page .stocktaking-serial-modal .select2-container {
    width: 100% !important;
}

.stocktaking-page .stocktaking-serial-modal .select2-search--inline {
    display: none;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-search-col .form-control {
    height: 40px;
    border-radius: 4px;
    border: 1px solid #dfe5ec;
    box-shadow: none;
}

.stocktaking-page.stocktaking-details-page .stocktaking-table tbody td {
    padding: 11px 10px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-grid-footer {
    justify-content: flex-start;
    margin-top: 10px;
}

.stocktaking-page.stocktaking-details-page .stocktaking-details-meta-row {
    padding-top: 16px;
    align-items: flex-start;
}

.stocktaking-page.stocktaking-details-page .stocktaking-meta-group {
    min-width: 240px;
    text-align: right;
    line-height: 1.9;
}

.stocktaking-page.stocktaking-details-page .stocktaking-meta-group-created {
    margin-inline-start: auto;
}

.stocktaking-page .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
}

.stocktaking-page .status-pill.pending {
    background: #f0f2f5;
    color: #525252;
}

.stocktaking-page .status-pill.approved-without {
    background: #eaf8ec;
    color: #188038;
}

.stocktaking-page .status-pill.approved-with {
    background: #e9f5ff;
    color: #1677c6;
}

.stocktaking-page .status-pill.canceled {
    background: #fff1f0;
    color: #d93025;
}

.stocktaking-page .match-text.match-equal {
    color: #222;
    font-weight: 700;
}

.stocktaking-page .match-text.match-increase {
    color: #3b82f6;
    font-weight: 700;
}

.stocktaking-page .match-text.match-decrease {
    color: #d93025;
    font-weight: 700;
}

.stocktaking-page .stocktaking-checkbox-col {
    width: 40px;
}

.stocktaking-page .stocktaking-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stocktaking-page .stocktaking-delete-btn {
    background: transparent;
    border: 0;
    color: #ef4444;
    padding: 0;
    width: 18px;
    height: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.stocktaking-page .stocktaking-delete-btn:hover,
.stocktaking-page .stocktaking-delete-btn:focus {
    color: #dc2626;
    background: transparent;
    border: 0;
    outline: none;
}

.stocktaking-page .stocktaking-delete-btn i {
    font-size: 14px;
}

.stocktaking-page .stocktaking-empty-row {
    padding: 30px 10px;
    color: #8b8f97;
    font-weight: 600;
}

.stocktaking-page .quantity-validation {
    color: #d93025;
    font-size: 11px;
    margin-top: 4px;
}

@media (max-width: 991px) {
    .stocktaking-page .stocktaking-filter-actions,
    .stocktaking-page .stocktaking-grid-actions,
    .stocktaking-page .stocktaking-grid-top-actions,
    .stocktaking-page .stocktaking-editor-actions {
        align-items: stretch;
    }

    .stocktaking-page .stocktaking-editor-actions .btn {
        min-width: 0;
        width: 100%;
    }

    .stocktaking-page .stocktaking-meta-row {
        flex-direction: column;
    }

    .stocktaking-page.stocktaking-figma-page .stocktaking-grid-actions {
        flex-wrap: wrap;
        padding-inline-start: 0;
        padding-inline-end: 0;
    }

    .stocktaking-page.stocktaking-figma-page .stocktaking-grid-search-col {
        padding-inline-end: 0;
    }

    .stocktaking-page.stocktaking-figma-page  {
        padding-inline-start: 0;
        padding-inline-end: 0;
    }

    .stocktaking-page.stocktaking-details-page .stocktaking-details-grid-toolbar,
    .stocktaking-page.stocktaking-details-page .stocktaking-details-grid-actions {
        display: block;
    }

    .stocktaking-page.stocktaking-details-page .stocktaking-details-grid-actions .btn {
        margin-bottom: 8px;
    }

    .stocktaking-page.stocktaking-details-page .stocktaking-meta-group,
    .stocktaking-page.stocktaking-details-page .stocktaking-meta-group-created {
        min-width: 0;
        margin-inline-start: 0;
    }
}
