/* Hajipur Production Head PMR Management Stylesheet */

.hajipur-prod-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1A1A1A;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* Page Header */
.hajipur-prod-header {
    margin-bottom: 4px;
}

.hajipur-prod-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.hajipur-prod-desc {
    font-size: 12px;
    font-weight: 400;
    color: #9CA3AF;
    margin: 0;
    line-height: 1.3;
}

/* Filter Row (9 Dropdowns in single white card container) */
.hajipur-prod-filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    background-color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #d9e0e7;
    box-sizing: border-box;
    align-items: center;
    height: 65px;
    width: 100%;
}

.hajipur-prod-select-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
    box-sizing: border-box;
}

.hajipur-prod-filter-select {
    width: 100%;
    height: 36px;
    padding: 0 20px 0 8px;
    font-size: 11px;
    color: #555555;
    background-color: #ffffff;
    border: 1px solid #d9e0e7;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-sizing: border-box;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.hajipur-prod-filter-select:focus {
    outline: none;
    border-color: #9CA3AF;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

.hajipur-prod-select-chevron {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    color: #999999;
}

.hajipur-prod-select-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
}

/* Table Card Container */
.hajipur-prod-table-card {
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.hajipur-prod-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hajipur-prod-table-scroll::-webkit-scrollbar {
    height: 6px;
}

.hajipur-prod-table-scroll::-webkit-scrollbar-track {
    background: #F1F5F9;
}

.hajipur-prod-table-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.hajipur-prod-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.hajipur-prod-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-style: normal;
    font-size: 12px;
}

.hajipur-prod-table thead {
    background-color: var(--page-bg, #F5F5FF);
    border-bottom: 1px solid #EAEAEA;
}

.hajipur-prod-table th {
    padding: 12px 10px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-style: normal !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #555555 !important;
    text-align: left;
    white-space: nowrap;
    background-color: var(--page-bg, #F5F5FF);
}

.hajipur-prod-table td {
    padding: 12px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #F1F5F9;
    color: #151515;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.hajipur-prod-table tr:last-child td {
    border-bottom: none;
}

.hajipur-prod-table th.status-col,
.hajipur-prod-table td.status-col,
.hajipur-prod-table th.action-col,
.hajipur-prod-table td.action-col,
.hajipur-prod-table th.text-center,
.hajipur-prod-table td.text-center {
    text-align: center !important;
}

.hajipur-prod-pmr-no {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    color: #151515;
}



/* Action Eye Icon Button (Hajipur Production Head) */
.hajipur-prod-container .action-view-btn,
.hajipur-prod-table .action-view-btn,
.hajipur-prod-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #EAEAEA;
    background-color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.hajipur-prod-container .action-view-btn:hover,
.hajipur-prod-table .action-view-btn:hover,
.hajipur-prod-view-btn:hover {
    background-color: #EEF2FF;
    border-color: #A5B4FC;
}

.hajipur-prod-container .action-view-btn svg,
.hajipur-prod-table .action-view-btn svg,
.hajipur-prod-view-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #0405AB;
    stroke-width: 2;
}

/* Hajipur Pagination Style */
.hajipur-prod-pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #EAEAEA;
    background-color: #FFFFFF;
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
}

.hajipur-prod-pagination-info {
    font-size: 12px;
    color: #9CA3AF;
}

.hajipur-prod-pagination-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hajipur-prod-pagination-btn {
    min-width: 28px;
    height: 28px;
    border: 1px solid #E2E8F0;
    background-color: #FFFFFF;
    border-radius: 6px;
    color: #64748B;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.hajipur-prod-pagination-btn:hover:not(:disabled) {
    background-color: #F8FAFC;
    border-color: #CBD5E1;
}

.hajipur-prod-pagination-btn.active {
    background-color: #0405AB;
    border-color: #0405AB;
    color: #FFFFFF;
}

.hajipur-prod-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hajipur-prod-pagination-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* ================================================================
   HAJIPUR PRODUCTION HEAD PMR DETAIL VIEW STYLES
   ================================================================ */

.hph-pmr-detail-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1A1A1A;
    width: 100%;
}

/* Card base */
.hph-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 16px 20px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
}

/* Header Back Icon Button */
.header-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #111827;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.header-back-btn:hover {
    background-color: #F3F4F6;
}

.header-back-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Top Card: PMR Information */
.hph-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.hph-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hph-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
    line-height: 1.2;
}

.hph-info-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hph-info-icon {
    width: 16px;
    height: 16px;
}

.hph-codification-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 12px;
    background-color: #FFF4ED;
    border: 1px solid #FF7A00;
    color: #FF7A00;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 14px;
    margin-left: 4px;
}

/* PMR Info Grid (4 cols x 2 rows) */
.hph-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 16px;
    column-gap: 20px;
}

.hph-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hph-info-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #4B5563;
}

.hph-info-value {
    font-size: 13px;
    font-weight: 400;
    color: #6B7280;
}

/* Main Detail Grid (2 columns: Left ~74%, Right ~26%) */
.hph-detail-grid {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 14px;
    align-items: stretch;
}

.hph-left-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hph-right-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hph-card-subtitle {
    font-size: 12px;
    color: #9CA3AF;
    margin: 4px 0 14px 0;
}

/* Raw Material Table */
.hph-rm-table-wrap {
    margin-bottom: 14px;
    overflow-x: auto;
}

.hph-rm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.hph-rm-thead-row {
    background-color: #F8FAFC;
    height: 36px;
}

.hph-rm-table th {
    font-size: 11.5px;
    font-weight: 500;
    color: #6B7280;
    padding: 0 12px;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
}

.hph-rm-table th:first-child {
    border-left: 1px solid #F1F5F9;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.hph-rm-table th:last-child {
    border-right: 1px solid #F1F5F9;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.hph-th-left {
    text-align: left;
}

.hph-th-right {
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    height: 36px;
}

.hph-edit-pen-icon {
    width: 14px;
    height: 14px;
    stroke: #2563EB;
    stroke-width: 2.2;
    cursor: pointer;
}

.hph-td-mat {
    padding-right: 6px;
}

.hph-td-pct {
    padding-left: 6px;
    text-align: right;
}

.hph-select-wrapper {
    position: relative;
    width: 100%;
}

.hph-select {
    width: 100%;
    height: 38px;
    padding: 0 28px 0 12px;
    font-size: 12.5px;
    color: #374151;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-sizing: border-box;
}

.hph-select-chevron {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    color: #9CA3AF;
}

.hph-select-chevron svg {
    width: 16px;
    height: 16px;
}

.hph-pct-input {
    width: 100px;
    height: 38px;
    padding: 0 12px;
    font-size: 12.5px;
    color: #374151;
    text-align: right;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Total Weight & Cost Row */
.hph-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #F3F4F6;
}

.hph-total-label {
    font-size: 13px;
    font-weight: 700;
    color: #1A1A1A;
}

.hph-total-pills {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hph-pill-weight {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 32px;
    padding: 0 16px;
    background-color: #F3F4F6;
    color: #6B7280;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    box-sizing: border-box;
}

.hph-pill-cost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 32px;
    padding: 0 16px;
    background-color: #FAF5FF;
    color: #DC2626;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Bottom Actions Row */
.hph-left-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hph-actions-group-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hph-actions-group-right {
    display: flex;
    align-items: center;
}

.hph-btn-black {
    height: 38px;
    padding: 0 18px;
    background-color: #111827;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.hph-btn-black:hover {
    background-color: #1F2937;
}

.hph-btn-outline {
    height: 38px;
    padding: 0 20px;
    background-color: #FFFFFF;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.hph-btn-outline:hover {
    background-color: #F9FAFB;
    border-color: #9CA3AF;
}

/* Cost Summary Card */
.hph-cost-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hph-cost-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hph-badge-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #2563EB;
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 4px;
}

.hph-divider {
    border: 0;
    border-top: 1px solid #EAEAEA;
    margin: 10px 0 16px 0;
}

.hph-cost-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hph-cost-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hph-cost-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.hph-cost-input {
    width: 110px;
    height: 34px;
    padding: 0 12px;
    font-size: 12.5px;
    color: #374151;
    text-align: right;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    box-sizing: border-box;
}

.hph-cost-input.disabled {
    background-color: #F3F4F6;
    color: #6B7280;
    border-color: transparent;
}

.hph-right-actions {
    width: 100%;
}

.hph-btn-submit-marketing {
    width: 100%;
    height: 40px;
    background-color: #0000D1;
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.hph-btn-submit-marketing:hover {
    background-color: #0000B0;
}

/* Rounded Footer Card Container (Bottom Attached Frosted Glass Dock) */
.hph-footer-card {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 0 !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04) !important;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 0 !important;
    width: auto !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .hph-footer-card {
    left: 70px;
}

@media (max-width: 768px) {
    .hph-footer-card {
        left: 0;
    }
}

.hph-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hph-footer-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hph-footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.hph-btn-black-upload {
    height: 38px;
    padding: 0 20px;
    background-color: #161D27;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
    white-space: nowrap;
}

.hph-btn-black {
    height: 27px;
    padding: 0 10px;
    background-color: #161D27;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
    white-space: nowrap;
}

.hph-btn-black:hover {
    background-color: #202936;
}

.hph-btn-black-upload:hover {
    background-color: #202936;
}

.hph-btn-outline {
    height: 38px;
    padding: 0 20px;
    background-color: #FFFFFF;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.hph-btn-outline:hover {
    background-color: #F9FAFB;
    border-color: #9CA3AF;
}

.hph-btn-outline:disabled,
.hph-btn-outline.disabled {
    background-color: #F9FAFB;
    border-color: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    opacity: 0.7;
}

.hph-btn-blue-marketing {
    height: 38px;
    padding: 0 24px;
    background-color: #0000D1;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
    white-space: nowrap;
}

.hph-btn-blue-marketing:hover {
    background-color: #0000B0;
}

.hph-btn-blue-marketing:disabled,
.hph-btn-blue-marketing.disabled {
    background-color: #B5B5F0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Card Title Row & Header Badges on Same Line */
.hpdv-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.hpdv-card-title-row .hpdv-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.hpdv-info-badge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
}

.hpdv-info-badge-btn img,
.hpdv-info-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.hpdv-codification-badge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.hpdv-codification-badge-btn:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.hpdv-codification-badge-btn img,
.hpdv-codification-icon {
    width: 31px;
    height: 18px;
    display: block;
}

/* Codification Tag Badge */
.hpdv-codification-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 12px;
    background-color: #FFF4ED;
    border: 1px solid #FF7A00;
    color: #FF7A00;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 14px;
    line-height: 1.4;
    vertical-align: middle;
}

/* Cost Summary Field Inputs */
input.hpdv-cost-input-gray,
.hpdv-cost-input-gray {
    width: 110px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    color: #808080;
    background-color: #EFEFEF;
    border: none;
    border-radius: 6px;
    text-align: right;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

input.hpdv-cost-input-white,
.hpdv-cost-input-white {
    width: 110px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    color: #151515;
    background-color: #FFFFFF;
    border: 1px solid #E2E2E6;
    border-radius: 6px;
    text-align: right;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

input.hpdv-cost-input-white::placeholder,
.hpdv-cost-input-white::placeholder {
    text-align: right !important;
}

input.hpdv-cost-input-white:focus {
    border-color: #9CA3AF;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

input.hpdv-cost-input-white.hpdv-input-error,
.hpdv-cost-input-white.hpdv-input-error {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
    color: #B91C1C;
}

input.hpdv-cost-input-white.hpdv-input-error:focus,
.hpdv-cost-input-white.hpdv-input-error:focus {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18) !important;
}

.hpdv-cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    min-height: 32px;
}

.hpdv-cost-label {
    font-size: 12px;
    font-weight: 500;
    color: #151515;
    font-family: inherit;
    flex-shrink: 0;
    margin-right: 8px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.hpdv-cost-selling-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.hpdv-cost-selling-section.hpdv-cost-total-row {
    margin-top: 4px;
    padding: 10px 12px;
    border-top: 1px dashed rgba(4, 5, 171, 0.22);
    background-color: rgba(4, 5, 171, 0.04);
    border-radius: 8px;
    box-sizing: border-box;
}

.hpdv-cost-selling-section.hpdv-cost-total-row .hpdv-cost-label {
    font-weight: 700;
    color: #0405AB;
}

.hpdv-cost-selling-section.hpdv-cost-total-row .hpdv-cost-input-white:not(.hpdv-input-error) {
    font-weight: 700;
    font-size: 13.5px;
    color: #0405AB;
    border-color: rgba(4, 5, 171, 0.22);
}

.hpdv-cost-selling-section .hpdv-cost-row {
    width: 100%;
}

.hpdv-cost-error-wrap {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

.hpdv-error-icon {
    display: none;
}

.hpdv-cost-input-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
}

.hpdv-error-text {
    font-size: 11px;
    color: #DC2626;
    font-weight: 500;
    text-align: right;
    line-height: 1.35;
    word-break: normal;
    margin: 0;
    display: block;
}

@keyframes hpdvSlideDown {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

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

/* Table column proportions and alignments for Production Head PMR Detail View (2-column table) */
.prodhead-pmr-page .hpdv-rm-table .hpdv-col-material,
.prodhead-rm-table .hpdv-col-material,
.hpdv-rm-table:not(.admin-rm-table):not(:has(.hpdv-col-price)) .hpdv-col-material {
    width: 78%;
}

.prodhead-pmr-page .hpdv-rm-table .hpdv-col-pct,
.prodhead-rm-table .hpdv-col-pct,
.hpdv-rm-table:not(.admin-rm-table):not(:has(.hpdv-col-price)) .hpdv-col-pct {
    width: 22%;
    text-align: right;
}

.hpdv-th-right {
    text-align: right;
}

.hpdv-td-right {
    text-align: right;
}

.hpdv-edit-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    outline: none;
}

.hpdv-edit-btn:hover .hpdv-edit-icon {
    opacity: 0.8;
}

.hpdv-th-right img.hpdv-edit-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    vertical-align: middle;
    margin-left: 4px;
}

.prodhead-pmr-page .hpdv-plain-text,
.prodhead-rm-table .hpdv-plain-text {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    height: 32px;
    width: 100px;
    padding: 0 8px;
    font-size: 12px;
    color: #808080;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid #E0E0E6;
    border-radius: 5px;
    background-color: #F4F5F7;
    box-sizing: border-box;
    text-align: right;
    user-select: none;
}

.prodhead-pmr-page .hpdv-rm-table input.hpdv-plain-val,
.prodhead-pmr-page .hpdv-rm-table .hpdv-plain-val,
.prodhead-rm-table input.hpdv-plain-val,
.prodhead-rm-table .hpdv-plain-val,
.hpdv-rm-table:not(.admin-rm-table):not(:has(.hpdv-col-price)) input.hpdv-plain-val,
.hpdv-rm-table:not(.admin-rm-table):not(:has(.hpdv-col-price)) .hpdv-plain-val {
    width: 100px;
    height: 32px;
    text-align: right;
    box-sizing: border-box;
}

.prodhead-pmr-page .hpdv-rm-table input.hpdv-plain-val::placeholder,
.prodhead-pmr-page .hpdv-rm-table .hpdv-plain-val::placeholder,
.prodhead-rm-table input.hpdv-plain-val::placeholder,
.prodhead-rm-table .hpdv-plain-val::placeholder {
    text-align: right !important;
}

/* ==========================================================================
   Hajipur Production Head Dialogs (Upload PO & Codification Modals)
   ========================================================================== */
.hph-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 20px;
    box-sizing: border-box;
}

.hph-upload-po-card {
    background-color: #FFFFFF;
    border-radius: 14px;
    width: 480px;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.85);
    overflow: hidden;
    position: relative;
}

.hph-upload-po-card::before {
    content: "";
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, rgba(4, 5, 171, 0.85) 0%, rgba(4, 5, 171, 0.25) 30%, transparent 80%);
    flex-shrink: 0;
}

.hph-codification-card {
    background-color: #FFFFFF;
    border-radius: 14px;
    width: 820px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.85);
    overflow: hidden;
    position: relative;
}

.hph-codification-card::before {
    content: "";
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, rgba(4, 5, 171, 0.85) 0%, rgba(4, 5, 171, 0.25) 30%, transparent 80%);
    flex-shrink: 0;
}

.hph-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #F1F5F9;
    flex-shrink: 0;
    background-color: #FAFCFF;
}

.hph-dialog-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.hph-dialog-close-btn {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    font-size: 18px;
    color: #64748B;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hph-dialog-close-btn:hover {
    color: var(--primary-color, #0405AB);
    background-color: var(--primary-bg, #EEF0FF);
    border-color: var(--primary-color, #0405AB);
    transform: rotate(90deg) scale(1.08);
}

.hph-dialog-body {
    padding: 18px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    scroll-behavior: smooth;
}

.hph-dialog-body::-webkit-scrollbar {
    width: 6px;
}

.hph-dialog-body::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 4px;
}

.hph-dialog-body::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.hph-dialog-body::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Upload PO Box Container */
.hph-up-box {
    border: 1px solid #EBEBEE;
    border-radius: 10px;
    overflow: hidden;
    background-color: #FFFFFF;
    flex-shrink: 0;
}

.hph-up-header-bar {
    background-color: #F7F7FD;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #EBEBEE;
}

.hph-up-header-title {
    font-size: 13px;
    font-weight: 600;
    color: #151515;
}

.hph-up-header-count {
    font-size: 11px;
    color: #8E8EA9;
}

.hph-up-dropzone {
    border: 1px dashed #D6D6E0;
    border-radius: 8px;
    margin: 12px;
    padding: 18px 12px;
    text-align: center;
    background-color: #FAFAFD;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hph-up-dropzone--invalid {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
}

.hph-up-box-error {
    margin: -4px 12px 10px 14px;
}

.hph-up-icon {
    width: 24px;
    height: 24px;
    color: #4338CA;
    margin-bottom: 4px;
}

.hph-up-text {
    font-size: 12px;
    color: #666666;
}

.hph-up-blue-link {
    color: #0000D1;
    font-weight: 700;
    cursor: pointer;
}

.hph-up-subtext {
    font-size: 11px;
    color: #999999;
}

.hph-up-files-list {
    padding: 0 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 190px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F8FAFC;
}

.hph-up-files-list::-webkit-scrollbar {
    width: 6px;
}

.hph-up-files-list::-webkit-scrollbar-track {
    background: #F8FAFC;
    border-radius: 4px;
}

.hph-up-files-list::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.hph-up-files-list::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.hph-up-file-item {
    border: 1px solid #EEEEEF;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hph-up-file-item:hover {
    background-color: #FAFAFD;
    border-color: #CBD5E1;
}

.hph-up-file-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.hph-up-file-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #EFF6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hph-up-file-icon-box svg {
    width: 18px;
    height: 18px;
}

.hph-up-file-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
    overflow: hidden;
}

.hph-up-file-name {
    font-size: 12px;
    font-weight: 600;
    color: #151515;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.hph-up-file-size {
    font-size: 11px;
    color: #999999;
    line-height: 1;
}

.hph-up-file-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.hph-up-file-delete-btn:hover {
    background-color: #FEE2E2;
}

.hph-up-file-delete-btn svg {
    width: 16px;
    height: 16px;
}

.hph-up-user-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.hph-up-user-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.hph-up-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #151515;
    cursor: pointer;
    min-height: 36px;
}

.hph-up-select-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 220px;
}

.hph-up-validation-error {
    font-size: 11px;
    font-weight: 500;
    color: #EF4444;
    margin-top: 4px;
    display: block;
    width: 100%;
    text-align: left;
    padding-left: 2px;
}

.hph-up-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #0000D1;
    border-radius: 4px;
    cursor: pointer;
}

.hph-up-select-wrap {
    position: relative;
    width: 220px;
}

.hph-up-select {
    width: 100%;
    height: 36px;
    padding: 0 30px 0 12px;
    border: 1px solid #E2E2E8;
    border-radius: 8px;
    font-size: 12px;
    color: #888888;
    background-color: #FFFFFF;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.hph-up-select-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 14px;
    height: 14px;
    color: #888888;
}

.hph-up-select-chevron svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

/* Custom Checkbox Dropdown */
.hph-custom-dd {
    position: relative;
    width: 220px;
}

.hph-custom-dd-trigger {
    width: 100%;
    height: 36px;
    padding: 0 10px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF;
    border: 1px solid #E2E2E8;
    border-radius: 8px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    outline: none;
}

.hph-custom-dd-trigger:hover,
.hph-custom-dd--open .hph-custom-dd-trigger {
    border-color: #CBD5E1;
}

.hph-custom-dd--disabled .hph-custom-dd-trigger {
    background-color: #F8FAFC;
    cursor: not-allowed;
    opacity: 0.6;
}

.hph-custom-dd--invalid .hph-custom-dd-trigger {
    border-color: #EF4444 !important;
}

.hph-custom-dd--invalid .hph-custom-dd-trigger:hover,
.hph-custom-dd--invalid .hph-custom-dd-trigger:focus,
.hph-custom-dd--invalid.hph-custom-dd--open .hph-custom-dd-trigger {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.hph-custom-dd-text {
    font-size: 12px;
    color: #344054;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
}

.hph-custom-dd-placeholder {
    color: #888888;
}

.hph-custom-dd-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: #888888;
    stroke-width: 2;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.hph-custom-dd--open .hph-custom-dd-chevron {
    transform: rotate(180deg);
}

.hph-custom-dd-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    max-height: 180px;
    box-sizing: border-box;
    animation: hphPanelIn 0.12s ease-out;
}

@keyframes hphPanelIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

.hph-custom-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.12s;
    box-sizing: border-box;
    width: 100%;
}

.hph-custom-dd-item:hover {
    background-color: #F8FAFC;
}

.hph-custom-dd-item--all {
    background-color: #F1F5F9;
    border-bottom: 1px solid #E2E8F0;
}

.hph-custom-dd-item--all:hover {
    background-color: #E9EEF5;
}

.hph-custom-dd-divider {
    height: 1px;
    background-color: #E2E8F0;
}

.hph-custom-dd-checkbox {
    width: 15px;
    height: 15px;
    accent-color: #0405AB;
    cursor: pointer;
    flex-shrink: 0;
}

.hph-custom-dd-label {
    font-size: 12px;
    color: #344054;
    line-height: 1.3;
}

.hph-custom-dd-label-all {
    font-size: 12px;
    font-weight: 700;
    color: #151515;
}

.hph-custom-dd-empty {
    padding: 10px 12px;
    font-size: 12px;
    color: #94A3B8;
    margin: 0;
}

/* Codification Table Styles */
.hph-cod-table-wrap {
    border: 1px solid #F0F0F5;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 145px;
    background-color: #FFFFFF;
}

.hph-cod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.hph-cod-tr-head {
    background-color: #F8F9FA;
    border-bottom: 1px solid #F0F0F5;
    position: sticky;
    top: 0;
    z-index: 1;
}

.hph-cod-th {
    padding: 10px 12px;
    font-weight: 500;
    color: #808080;
    font-size: 11px;
    white-space: nowrap;
}

.hph-cod-tr {
    border-bottom: 1px solid #F5F5F8;
}

.hph-cod-tr:last-child {
    border-bottom: none;
}

.hph-cod-td {
    padding: 10px 12px;
    color: #151515;
    font-size: 12px;
    font-weight: 400;
    vertical-align: middle;
    white-space: nowrap;
}

.hph-cod-th.text-center,
.hph-cod-td.text-center {
    text-align: center;
}

.hph-cod-bold {
    font-weight: 600;
}

.hph-cod-input {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #EBEBEE;
    border-radius: 6px;
    font-size: 11px;
    color: #888888;
    background-color: #FFFFFF;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.hph-cod-input:focus {
    border-color: #9CA3AF;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
    color: #151515;
}

.hph-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #F0F0F5;
    background-color: #FFFFFF;
    flex-shrink: 0;
}

.hph-dialog-cancel-btn {
    height: 36px;
    padding: 0 18px;
    border: 1px solid #E2E2E8;
    border-radius: 6px;
    background-color: #FFFFFF;
    color: #151515;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.hph-dialog-submit-btn {
    height: 38px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color, #0405AB);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(4, 5, 171, 0.35);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.hph-dialog-submit-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-0.5px);
    box-shadow: 0 4px 12px rgba(4, 5, 171, 0.45);
}

.hph-dialog-submit-pmr-btn {
    height: 38px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color, #0405AB);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(4, 5, 171, 0.35);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.hph-dialog-submit-pmr-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-0.5px);
    box-shadow: 0 4px 12px rgba(4, 5, 171, 0.45);
}

/* Confirm Codification Dialog Styles */
.hph-confirm-codification-card {
    background-color: #FFFFFF;
    border-radius: 14px;
    width: 440px;
    max-width: 92vw;
    padding: 24px 28px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.85);
    position: relative;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
}

.hph-confirm-codification-card::before {
    content: "";
    display: block;
    height: 3px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(90deg, rgba(4, 5, 171, 0.85) 0%, rgba(4, 5, 171, 0.25) 30%, transparent 80%);
}

.hph-confirm-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    font-size: 18px;
    color: #64748B;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hph-confirm-close-btn:hover {
    color: var(--primary-color, #0405AB);
    background-color: var(--primary-bg, #EEF0FF);
    border-color: var(--primary-color, #0405AB);
    transform: rotate(90deg) scale(1.08);
}

.hph-confirm-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hph-confirm-title {
    margin: 12px 0 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: #151515;
}

.hph-confirm-desc {
    font-size: 12.5px;
    color: #999999;
    line-height: 1.45;
    margin: 0 0 24px 0;
    max-width: 380px;
}

.hph-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.hph-confirm-cancel-btn {
    height: 38px;
    padding: 0 24px;
    border: 1px solid #E2E2E8;
    border-radius: 6px;
    background-color: #FFFFFF;
    color: #151515;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.hph-confirm-cancel-btn:hover {
    background-color: #F8F9FA;
}

.hph-confirm-okay-btn {
    height: 38px;
    padding: 0 28px;
    border: none;
    border-radius: 6px;
    background-color: var(--primary-color, #0405AB);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.hph-confirm-okay-btn:hover {
    opacity: 0.9;
}