/* =========================================
   ALERT DIALOGS / MODAL OVERLAY STYLES
   Figma Mockup Compliant
   ========================================= */

/* Lock background scrolling while any dialog overlay is open */
html.dialog-open-no-scroll,
body.dialog-open-no-scroll,
html:has(.hrrd-overlay),
body:has(.hrrd-overlay) {
    overflow: hidden !important;
}

/* Custom Grey Scrollbar */
.dialog-overlay,
.dialog-card,
.dialog-body,
.dialog-overlay *,
.dialog-card * {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1 !important;
    border-radius: 3px !important;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: #94a3b8 !important;
    }

::-webkit-scrollbar-track {
    background-color: #f8fafc !important;
}

.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);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: dialogFadeIn 0.18s ease-out;
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dialog-card {
    background-color: #ffffff;
    width: 440px;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.85);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: dialogScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Branch-accented jewel crest at top edge */
.dialog-card::before {
    content: "";
    display: block;
    height: 3px;
    width: 100%;
    background: var(--dialog-crest-gradient, linear-gradient(90deg, rgba(220, 38, 38, 0.85) 0%, rgba(220, 38, 38, 0.25) 30%, transparent 80%));
    flex-shrink: 0;
}

    .dialog-card form {
        display: flex;
        width: 100%;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

@keyframes dialogScaleIn {
    from {
        transform: scale(0.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Header */
.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    background-color: #FAFCFF;
    flex-shrink: 0;
}


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


.dialog-close-btn {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    font-size: 18px;
    line-height: 1;
    color: #64748B;
    cursor: pointer;
    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);
}

    .dialog-close-btn:hover {
        color: var(--primary-color, #FF0000);
        background-color: var(--primary-bg, #FFE5E5);
        border-color: var(--primary-color, #FF0000);
        transform: rotate(90deg) scale(1.08);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .dialog-close-btn:active {
        transform: rotate(90deg) scale(0.95);
    }

/* Body */
.dialog-body {
    padding: 20px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}


.dialog-form-group {
    display: flex;
    flex-direction: column;
}

.dialog-label {
    font-size: 13px;
    font-weight: 600;
    color: #151515;
    margin-bottom: 6px;
}

    .dialog-label .required-star {
        color: #ef4444;
        margin-left: 2px;
    }

.dialog-input,
.dialog-select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 13px;
    color: #151515;
    background-color: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .dialog-input::placeholder,
    .dialog-select::placeholder {
        color: #808080;
    }

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

textarea.dialog-input {
    min-height: 80px;
    max-height: 160px;
    min-width: 100%;
    max-width: 100%;
    resize: vertical;
    overflow-y: auto;
}

/* Toggle Switch */
.dialog-status-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dialog-toggle {
    position: relative;
    width: 38px;
    height: 20px;
    display: inline-block;
}

    .dialog-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.dialog-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dialog-toggle input:checked + .dialog-toggle-slider {
    background-color: #22c55e;
}

.dialog-toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.dialog-toggle input:checked + .dialog-toggle-slider::before {
    transform: translateX(18px);
}

.dialog-input:disabled,
.dialog-input[readonly],
.dialog-select:disabled,
.dialog-select[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.dialog-toggle input:disabled + .dialog-toggle-slider,
.dialog-toggle.disabled .dialog-toggle-slider,
.dialog-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    background-color: #FAFCFF;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    flex-shrink: 0;
}

.dialog-cancel-btn {
    background-color: #ffffff;
    border: 1px solid #CBD5E1;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 22px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

    .dialog-cancel-btn:hover {
        background-color: #F8FAFC;
        border-color: #94A3B8;
        color: #0F172A;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        transform: translateY(-0.5px);
    }

    .dialog-cancel-btn:active {
        transform: translateY(0);
        background-color: #F1F5F9;
    }

.dialog-submit-btn {
    background-color: var(--primary-color, #0405AB);
    border: 1px solid transparent;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 24px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

    .dialog-submit-btn:hover {
        opacity: 0.94;
        filter: brightness(96%);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: translateY(-0.5px);
    }

    .dialog-submit-btn:active {
        transform: translateY(0);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

/* =========================================
   CUSTOM SELECT WRAPPER (chevron overlay)
   ========================================= */

.dialog-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .dialog-select-wrapper .dialog-select {
        appearance: none;
        -webkit-appearance: none;
        padding-right: 36px;
        /* room for chevron */
    }

.dialog-select-chevron {
    position: absolute;
    right: 10px;
    pointer-events: none;
    display: flex;
    align-items: center;
    color: #6b7280;
}

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

/* =========================================
   ADD CUSTOMER DIALOG — wider card
   ========================================= */

.add-customer-dialog-card {
    width: 680px;
}

/* Two-column grid row */
.dialog-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* =========================================
   EMAIL TAG INPUT
   ========================================= */

.dialog-tag-input-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    background-color: #ffffff;
    cursor: text;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

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

.dialog-email-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #ffffff;
    border: 1px solid var(--primary-color, #0405AB);
    color: var(--primary-color, #0405AB);
    border-radius: 20px;
    padding: 2px 8px 2px 10px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.dialog-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color, #0405AB);
    font-size: 14px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.dialog-tag-input {
    flex: 1;
    min-width: 80px;
    border: none;
    outline: none;
    font-size: 13px;
    color: #151515;
    background: transparent;
    padding: 0;
}

    .dialog-tag-input::placeholder {
        color: #808080;
    }

/* =========================================
   RADIO BUTTONS (Local / Outside)
   ========================================= */

.dialog-radio-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

.dialog-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

    .dialog-radio-label input[type="radio"] {
        display: none;
    }

.dialog-radio-custom {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

    .dialog-radio-custom::after {
        content: '';
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: var(--radio-color, #0405AB);
        opacity: 0;
        transition: opacity 0.15s;
    }

.dialog-radio-label input[type="radio"]:checked + .dialog-radio-custom {
    border-color: var(--radio-color, #0405AB);
}

    .dialog-radio-label input[type="radio"]:checked + .dialog-radio-custom::after {
        opacity: 1;
    }

.dialog-inline-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    user-select: none;
}

    .dialog-inline-toggle-row .dialog-label {
        margin-bottom: 0;
        font-size: 13px;
        font-weight: 600;
        color: #151515;
        line-height: 1;
        cursor: pointer;
    }

/* Red submit button utility */
.dialog-submit-btn.red-btn {
    background-color: #ff0000 !important;
}

/* Upload Document Dialog Styles */
.upload-doc-card {
    width: 480px;
    max-width: 95vw;
}

.ud-outer-container {
    border: 1px solid #fee2e2;
    border-radius: 10px;
    background-color: #ffffff;
    overflow: hidden;
}

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

.ud-header-title {
    font-weight: 600;
    font-size: 13.5px;
    color: #1f2937;
}

.ud-header-count {
    font-size: 12px;
    color: #9ca3af;
}

.ud-dropzone {
    border: 1.5px dashed #e5e7eb;
    border-radius: 8px;
    background-color: #fafafa;
    padding: 24px;
    text-align: center;
    margin: 12px;
    cursor: pointer;
    transition: border-color 0.15s;
}

    .ud-dropzone:hover {
        border-color: #ff0000;
    }

.ud-upload-icon {
    width: 24px;
    height: 24px;
    color: #374151;
    margin-bottom: 8px;
}

.ud-drop-text {
    font-size: 13px;
    color: #6b7280;
}

.ud-highlight-text {
    color: #ff0000;
    font-weight: 600;
}

.ud-subtext {
    font-size: 11.5px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Add Rate Dialog Styles */
.add-rate-card {
    width: 440px;
    max-width: 95vw;
}

/* Change Rate Dialog Styles */
.change-rate-card {
    width: 980px;
    max-width: 95vw;
}

    .change-rate-card .dialog-header {
        padding: 10px 18px;
    }

    .change-rate-card .dialog-title {
        font-size: 15px;
        font-weight: 600;
    }

.cr-body {
    padding: 14px 18px;
}

.cr-table-wrapper {
    overflow-x: auto;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    max-height: 360px;
    overflow-y: auto;
}

.cr-table {
    width: 100%;
    border-collapse: collapse;
}

    .cr-table th {
        background-color: #f9fafb;
        padding: 8px 12px;
        text-align: left;
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        border-bottom: 1px solid #e5e7eb;
        white-space: nowrap;
    }

    .cr-table td {
        padding: 7px 12px;
        font-size: 12.5px;
        color: #1f2937;
        border-bottom: 1px solid #f3f4f6;
        vertical-align: middle;
        white-space: nowrap;
    }

.cr-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ff0000;
}

.cr-input {
    width: 160px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    color: #1f2937;
    outline: none;
    box-sizing: border-box;
}

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

.cr-percent-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 280px;
    margin-left: auto;
}

.cr-percent-input {
    width: 100%;
}

/* Selected row highlight */
.cr-row-selected td {
    background-color: #fff5f5;
}

/* New Price preview text inside the selected row */
.cr-preview-price {
    font-weight: 600;
    color: #dc2626;
}

.cr-preview-placeholder {
    color: #9ca3af;
}

/* Error border on the percentage input */
.dialog-input.input-error {
    border-color: #ef4444;
}

/* Confirm Price Change Icon Wrap */
.cpc-icon-wrap {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.cpc-icon {
    width: 32px;
    height: 32px;
}

.cpc-icon-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

/* Confirm IP Bypass Icon Wrap */
.cib-icon-wrap {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.cib-icon-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.cib-icon-svg {
    width: 32px;
    height: 32px;
}

/* =========================================
   PMR HISTORY ALERT DIALOG STYLES
   ========================================= */

.pmr-history-dialog-card {
    width: 380px;
    max-width: 95vw;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.ph-dialog-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.ph-dialog-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.ph-dialog-body {
    padding: 16px 20px 20px 20px;
}

.ph-table-wrapper {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    background: #ffffff;
}

    /* Custom scrollbar for PMR History dialog */
    .ph-table-wrapper::-webkit-scrollbar {
        width: 6px;
    }

    .ph-table-wrapper::-webkit-scrollbar-track {
        background: #f8fafc;
        border-radius: 8px;
    }

    .ph-table-wrapper::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 8px;
    }

        .ph-table-wrapper::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

.ph-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

    .ph-table th {
        background-color: #fafafa;
        color: #9ca3af;
        font-weight: 600;
        font-size: 13px;
        text-align: left;
        padding: 12px 16px;
        border-bottom: 1px solid #f1f5f9;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .ph-table td {
        padding: 14px 16px;
        border-bottom: 1px solid #f3f4f6;
        color: #151515;
        font-weight: 400;
        vertical-align: middle;
    }

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

/* ================================================================
   HAJIPUR ADD COMMENT DIALOG & PMR SUBMITTED SUCCESS DIALOG
   ================================================================ */

.hajipur-comment-dialog {
    width: 440px;
    max-width: 92vw;
    border-radius: 12px;
}

    .hajipur-comment-dialog .dialog-header {
        padding: 10px 16px;
    }

    .hajipur-comment-dialog .dialog-title {
        font-size: 18px;
        font-weight: 600;
    }


    .hajipur-comment-dialog .dialog-body {
        padding: 14px 16px 14px 16px;
    }


.dialog-textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 12px;
    font-size: 13px;
    color: #151515;
    background: #FFFFFF;
    border: 1px solid #E5E5EE;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.15s;
}

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

    .dialog-textarea::placeholder {
        color: #A0A0A0;
    }

.dialog-btn.cancel-hajipur {
    background-color: #FFFFFF;
    color: #151515;
    border: 1px solid #E5E5EE;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s;
}

    .dialog-btn.cancel-hajipur:hover {
        background-color: #F8F9FA;
    }

.dialog-btn.submit-hajipur {
    background-color: #0405AB;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s;
}

    .dialog-btn.submit-hajipur:hover {
        background-color: #030490;
    }

/* PMR Submitted Success Dialog */
.hajipur-success-dialog {
    width: 440px;
    max-width: 92vw;
    border-radius: 12px;
    padding-bottom: 24px;
}

.dialog-header-clean {
    display: flex;
    justify-content: flex-end;
    padding: 12px 14px 0 14px;
}

.text-center-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px 16px 24px;
}

.dialog-success-icon-wrap {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-success-img {
    width: 80px;
    height: 80px;
    display: block;
}

.dialog-success-title {
    font-size: 18px;
    font-weight: 700;
    color: #151515;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.dialog-success-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: #808080;
    margin: 0;
    line-height: 1.5;
    max-width: 320px;
}

/* ================================================================
   EMAIL TO MARKETING USER DIALOG (input_file_0.png)
   ================================================================ */
.email-marketing-dialog {
    width: 1100px;
    max-width: 95vw;
    border-radius: 12px;
}

.email-mkt-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.email-mkt-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.email-mkt-filter-item {
    flex: 1;
    position: relative;
}

.email-mkt-select {
    width: 100%;
    height: 36px;
    padding: 0 28px 0 10px;
    font-size: 12px;
    color: #555555;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-sizing: border-box;
}

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

    .email-mkt-chevron svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

.email-mkt-table-wrapper {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 320px;
    overflow-y: auto;
}

.email-mkt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .email-mkt-table th {
        background-color: #FAFBFD;
        color: #808080;
        font-weight: 500;
        font-size: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid #E5E7EB;
        white-space: nowrap;
        text-align: left;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .email-mkt-table td {
        padding: 8px 12px;
        border-bottom: 1px solid #F3F4F6;
        color: #151515;
        white-space: nowrap;
        vertical-align: middle;
    }

    .email-mkt-table tbody tr:hover {
        background-color: #F9FAFB;
    }

.email-mkt-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #FF0000;
    cursor: pointer;
}

.email-mkt-prod-link {
    color: #151515;
    text-decoration: underline;
    text-decoration-color: #B0B0B0;
    text-underline-offset: 3px;
    font-weight: 400;
    cursor: pointer;
}

/* Status Badges - PMR List Standard (Squircle Tag 6px, uniform 105px width) */
.email-mkt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 105px;
    height: 26px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 24px;
    white-space: nowrap;
    letter-spacing: 0.2px;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.email-mkt-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}




.badge-submitted {
    background-color: #FFF7ED;
    border: 1px solid #FED7AA;
    color: #F97316;
}

.badge-material-added {
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: #6B7280;
}

.badge-costing-done {
    background-color: #F3E8FF;
    border: 1px solid #E9D5FF;
    color: #9333EA;
}

.badge-negotiating {
    background-color: #FEF3C7;
    border: 1px solid #FDE68A;
    color: #D97706;
}

.badge-price-approved {
    background-color: #FCE7F3;
    border: 1px solid #FBCFE8;
    color: #EC4899;
}

.badge-in-production {
    background-color: #FAE8FF;
    border: 1px solid #F5D0FE;
    color: #D946EF;
}

.badge-completed {
    background-color: #DCFCE7;
    border: 1px solid #BBF7D0;
    color: #16A34A;
}

.badge-discarded {
    background-color: #FEE2E2;
    border: 1px solid #FECACA;
    color: #EF4444;
}

.dialog-btn.email-mkt-submit-btn {
    background-color: #FF0000;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s;
}

.dialog-btn.santej-create-pmr-submit-btn:hover {
    background-color: #D60000;
}

/* ================================================================
   SANTEJ PMR DETAILS DIALOG (input_file_0.png)
   ================================================================ */
.santej-pmr-details-dialog {
    width: 880px;
    max-width: 95vw;
    border-radius: 12px;
    /* Bound the card to the viewport so header/footer stay fixed
       and only the body scrolls */
    max-height: 90vh;
    overflow: hidden;
}

    /* Keep header and footer from shrinking so the body absorbs
       the scrolling area */
    .santej-pmr-details-dialog .spmrd-header,
    .santej-pmr-details-dialog .spmrd-footer {
        flex-shrink: 0;
    }

.spmrd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.spmrd-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spmrd-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(90vh - 120px);
    overflow-y: auto !important;
    overflow-x: hidden !important;
}


.spmrd-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 20px;
    row-gap: 14px;
    width: 100%;
}

.spmrd-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.spmrd-info-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #151515;
    line-height: 1.3;
}

.spmrd-info-value {
    font-size: 12.5px;
    font-weight: 400;
    color: #808080;
    line-height: 1.4;
    word-break: break-all;
}

.spmrd-col-span-full {
    grid-column: span 3;
}

.spmrd-card {
    background-color: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 14px 18px;
    box-sizing: border-box;
}

.spmrd-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #151515;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.spmrd-card-subtitle {
    font-size: 11.5px;
    font-weight: 400;
    color: #808080;
    margin: 0 0 10px 0;
}

.spmrd-cost-val {
    font-size: 12.5px;
    font-weight: 500;
    color: #151515;
}

.spmrd-cost-bold {
    font-size: 16px;
    font-weight: 700;
    color: #151515;
    margin-left: 4px;
}

.spmrd-cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    width: 100%;
}

.spmrd-cost-diff {
    font-size: 12.5px;
    color: #6B7280;
}

.spmrd-cost-diff-bold {
    font-size: 16px;
    font-weight: 700;
    color: #FF0000;
    margin-left: 4px;
}

.spmrd-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    width: 100%;
}

.spmrd-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #151515;
}

.spmrd-field-input {
    width: 100%;
    height: 38px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 12.5px;
    color: #151515;
    background-color: #FFFFFF;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s;
}

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

/* ================================================================
   SANTEJ SELLING COST PER KG HIGHLIGHT BOX (Red Theme)
   ================================================================ */
.spmr-selling-cost-highlight,
.santej-pmr-details-dialog .hpmr-selling-cost-highlight {
    width: 38%;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 3.5px solid #FF0000;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(255, 0, 0, 0.05);
    overflow: hidden;
}

.spmr-selling-cost-label-wrap,
.santej-pmr-details-dialog .hpmr-selling-cost-label-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.spmr-selling-cost-label,
.santej-pmr-details-dialog .hpmr-selling-cost-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #0F172A;
    letter-spacing: 0.1px;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.spmr-selling-cost-sublabel,
.santej-pmr-details-dialog .hpmr-selling-cost-sublabel {
    font-size: 10px;
    font-weight: 500;
    color: #64748B;
    line-height: 1.2;
    white-space: nowrap;
}

.spmr-selling-cost-value-wrap,
.santej-pmr-details-dialog .hpmr-selling-cost-value-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background-color: #FFFFFF;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #FECACA;
    box-shadow: 0 1px 3px rgba(255, 0, 0, 0.06);
    min-width: 0;
    max-width: calc(100% - 115px);
    box-sizing: border-box;
    flex-shrink: 1;
}

.spmr-selling-cost-currency,
.santej-pmr-details-dialog .hpmr-selling-cost-currency {
    font-size: 12px;
    font-weight: 700;
    color: #0F172A;
    flex-shrink: 0;
}

.spmr-selling-cost-value,
.santej-pmr-details-dialog .hpmr-selling-cost-value {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

@media (max-width: 600px) {
    .spmr-selling-cost-highlight,
    .santej-pmr-details-dialog .hpmr-selling-cost-highlight {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 12px;
    }

    .spmr-selling-cost-value-wrap,
    .santej-pmr-details-dialog .hpmr-selling-cost-value-wrap {
        align-self: flex-start;
        max-width: 100%;
    }
}

/* Progress Stepper Animations & Interactivity */
@keyframes stepperPulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes stepperLineShimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Progress Stepper */
.hnd-stepper-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    position: relative;
    padding: 6px 12px;
    box-sizing: border-box;
}

.hnd-step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    width: 110px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hnd-step-node:hover {
    transform: translateY(-2px);
}

.hnd-step-node:active {
    transform: translateY(0) scale(0.96);
}

.hnd-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hnd-circle-green {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: #FFFFFF;
    animation: stepperPulseGreen 2.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.hnd-step-node:hover .hnd-circle-green {
    transform: scale(1.14);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.22), 0 4px 12px rgba(22, 163, 74, 0.4);
}

.hnd-circle-gray {
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
    color: #FFFFFF;
}

.hnd-step-node:hover .hnd-circle-gray {
    transform: scale(1.12);
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.2);
}

.hnd-circle svg {
    width: 15px;
    height: 15px;
    transition: transform 0.25s ease;
}

.hnd-step-node:hover .hnd-circle svg {
    transform: scale(1.12);
}

.hnd-step-label {
    font-size: 11.5px;
    text-align: center;
    line-height: 1.3;
    transition: color 0.2s ease, transform 0.2s ease;
}

.hnd-step-node:hover .hnd-step-label {
    transform: translateY(-1px);
}

.hnd-connector {
    flex: 1;
    height: 3px;
    margin-top: 13px;
    margin-left: -35px;
    margin-right: -35px;
    border-radius: 999px;
    z-index: 1;
    transition: background 0.3s ease;
}

.hnd-line-green {
    background: linear-gradient(90deg, #16A34A, #4ADE80, #16A34A);
    background-size: 200% 100%;
    animation: stepperLineShimmer 3s ease infinite;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
}

.hnd-line-gray {
    background-color: #E2E8F0;
}

.hnd-text-dark {
    font-weight: 700;
    color: #0F172A;
}

.hnd-step-node:hover .hnd-text-dark {
    color: #0405AB;
}

.hnd-text-gray {
    font-weight: 500;
    color: #64748B;
}

.hnd-step-node:hover .hnd-text-gray {
    color: #334155;
}



/* Footer Action Buttons */
.dialog-footer.spmrd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 20px;
    box-sizing: border-box;
}

.spmrd-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spmrd-btn-approve {
    background-color: #FF0000;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s;
}

    .spmrd-btn-approve:hover {
        background-color: #D60000;
    }

.spmrd-btn-email-mkt {
    background-color: #FFFFFF;
    color: #151515;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s;
}

    .spmrd-btn-email-mkt:hover {
        background-color: #F8F9FA;
    }

.spmrd-btn-submit-admin {
    background-color: #151515;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s;
}

    .spmrd-btn-submit-admin:hover {
        background-color: #2D2D2D;
    }



/* ================================================================
   SANTEJ CREATE PMR DIALOG (input_file_0.png)
   ================================================================ */
.santej-create-pmr-dialog {
    width: 980px;
    max-width: 95vw;
    border-radius: 12px;
}

.scpmr-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}


.scpmr-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 18px;
    row-gap: 14px;
    width: 100%;
}

.scpmr-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.scpmr-label {
    font-size: 12px;
    font-weight: 600;
    color: #151515;
    line-height: 1.3;
}

.req-star {
    color: #EF4444;
    font-weight: 700;
}

.scpmr-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    color: #151515;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

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

    /* Error / invalid state — red border, no outline */
    .scpmr-input.invalid,
    .scpmr-input.is-invalid {
        border-color: #dc3545 !important;
        box-shadow: none;
        outline: none;
    }

    /* Invalid + focused — keep red border, add subtle shadow */
    .scpmr-input.invalid:focus,
    .scpmr-input.is-invalid:focus {
        border-color: #dc3545 !important;
        box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
        outline: none;
    }

/* Suppress Blazor's green "valid+modified" outline; invalid fields
   already have the red border above so no outline needed there either. */
.dialog-card .scpmr-input.valid.modified,
.dialog-card .dialog-input.valid.modified,
.dialog-card .dialog-input.modified,
.dialog-card .rz-dropdown.valid.modified,
.dialog-card .rz-dropdown.modified,
.dialog-card .scpmr-input.modified {
    outline: none !important;
}

.dialog-card .rz-dropdown {
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    outline: none !important;
}

.dialog-card .rz-dropdown:hover {
    border-color: #d1d5db !important;
}

/* Suppress unused outline */
.dialog-card .dummy-unused {
    outline: none !important;
}

/* Color table: InputNumber + InputText invalid state (Blazor adds class="invalid") */
.scpmr-color-table td .scpmr-input.invalid,
.scpmr-color-table td .scpmr-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: none;
    outline: none;
}

.scpmr-color-table td .scpmr-input.invalid:focus,
.scpmr-color-table td .scpmr-input.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
    outline: none;
}

/* Color table: Radzen dropdown invalid state */
.scpmr-color-table td .scpmr-select-radzen.rz-dropdown.invalid,
.scpmr-color-table td .scpmr-select-radzen.rz-dropdown.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: none !important;
    outline: none;
}

.scpmr-input::placeholder {
    color: #9CA3AF;
}

/* =========================================
   PMR FORM — UNIFORM FIELD HEIGHT
   All searchable inputs (dialog-input.form-control inside
   input-group), date inputs, and Radzen dropdowns should
   render at the same 36px height.
   ========================================= */
.scpmr-form-grid .input-group .dialog-input.form-control {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    box-sizing: border-box;
}

.scpmr-form-grid .input-group .btn {
    height: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.scpmr-form-grid .scpmr-date-wrap .scpmr-input {
    height: 36px !important;
}

.scpmr-form-grid .scpmr-select-radzen.rz-dropdown {
    min-height: 36px !important;
    max-height: 36px !important;
}

.scpmr-form-grid .scpmr-select-radzen .rz-dropdown-label,
.scpmr-form-grid .scpmr-select-radzen .rz-inputtext {
    /*        line-height: 34px !important;*/
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px !important;
}

.scpmr-select-wrap,
.scpmr-date-wrap {
    position: relative;
    width: 100%;
}

.scpmr-select {
    width: 100%;
    height: 36px;
    padding: 0 28px 0 12px;
    font-size: 12px;
    color: #151515;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .scpmr-select:focus {
        border-color: #9CA3AF;
        box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.15);
    }

    /* Error / invalid state (red border, like the Add Customer dialog) */
    .scpmr-select.invalid:not(:focus),
    .scpmr-select.is-invalid:not(:focus) {
        border-color: #dc3545;
        box-shadow: none;
    }

    .scpmr-select.invalid:focus,
    .scpmr-select.is-invalid:focus {
        border-color: #9CA3AF;
        box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.15);
    }

/* Radzen dropdowns (State / Customer / City) — match the native fields.
   Radzen's theme (default.css) loads after this file and uses high-specificity
   rules, so these overrides use !important to win. */
.dialog-card .scpmr-select-radzen.rz-dropdown {
    width: 100%;
    min-height: 36px;
    border: 1px solid #E5E7EB !important;
    border-radius: 6px !important;
    background-color: #FFFFFF !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dialog-card .scpmr-select-radzen .rz-dropdown-label-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Grey focus, same as the other fields */
.dialog-card .scpmr-select-radzen.rz-dropdown:focus,
.dialog-card .scpmr-select-radzen.rz-dropdown.rz-state-focused,
.dialog-card .scpmr-select-radzen.rz-dropdown:focus-within {
    border-color: #9CA3AF !important;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.15) !important;
    outline: none !important;
}

/* Error / invalid state (red border, like the Add Customer dialog) */
.dialog-card .scpmr-select-radzen.rz-dropdown.rz-state-invalid,
.dialog-card .scpmr-select-radzen.rz-dropdown.invalid,
.dialog-card .scpmr-select-radzen.rz-dropdown.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: none !important;
}

    /* Invalid + focused = metallic / dark gray, matching the other fields */
    .dialog-card .scpmr-select-radzen.rz-dropdown.rz-state-invalid.rz-state-focused,
    .dialog-card .scpmr-select-radzen.rz-dropdown.rz-state-invalid:focus-within {
        border-color: #9CA3AF !important;
        box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.15) !important;
    }

.scpmr-chevron,
.scpmr-calendar-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    color: #9CA3AF;
}

    .scpmr-chevron svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

/* Searchable free-text dropdown (Received From / Product Name) */
.scpmr-searchable-wrapper {
    position: relative;
    width: 100%;
}

.scpmr-searchable-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .scpmr-searchable-input-wrap .scpmr-input {
        padding-right: 30px;
    }

.scpmr-searchable-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #9CA3AF;
    line-height: 1;
}

    .scpmr-searchable-clear-btn:hover {
        color: #374151;
    }

.scpmr-searchable-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
    z-index: 1000;
    max-height: 180px;
    overflow-y: auto;
}

.scpmr-searchable-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .scpmr-searchable-item:hover {
        background-color: #F3F4F6;
    }

    /* Empty-state item (e.g. "No matching cities. Type to add new.") */
    .scpmr-searchable-item.scpmr-searchable-empty {
        cursor: default;
        color: #6B7280;
        font-style: italic;
    }

        .scpmr-searchable-item.scpmr-searchable-empty:hover {
            background-color: transparent;
        }

/* Color Card Section */
.scpmr-color-card {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
}

.scpmr-color-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
    background-color: #FFFFFF;
    gap: 12px;
}

.scpmr-color-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #151515;
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.scpmr-color-subtitle {
    font-size: 11.5px;
    font-weight: 400;
    color: #808080;
    margin: 0;
}

.scpmr-btn-add-color {
    flex-shrink: 0;
    background-color: #FFFFFF;
    color: #151515;
    border: 1px solid #DC2626;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    margin-top: 2px;
}

    .scpmr-btn-add-color:hover {
        background-color: #FFF5F5;
        border-color: #DC2626;
    }

.scpmr-color-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Section-level validation banner for the color card */
.scpmr-color-error {
    display: block;
    margin: 0;
    padding: 8px 16px;
    background-color: #FEF2F2;
    border-top: 1px solid #FECACA;
    border-bottom: 1px solid #FECACA;
    color: #DC2626;
    font-size: 12.5px;
    font-weight: 500;
    /* keep it flush with the card header above */
    border-left: none;
    border-right: none;
}

.scpmr-color-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

    .scpmr-color-table th {
        background-color: #FAFBFD;
        color: #808080;
        font-weight: 500;
        font-size: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid #E5E7EB;
        white-space: nowrap;
        text-align: left;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .scpmr-color-table td {
        padding: 6px 8px;
        border-bottom: 1px solid #F3F4F6;
        vertical-align: top;
    }

        /* Wrap input + validation message so the input stays top-aligned
           and the message flows naturally below it without disrupting row height */
        .scpmr-color-table td > .scpmr-input,
        .scpmr-color-table td > .scpmr-select-radzen {
            display: block;
        }

        /* Reserve consistent top padding so delete icon stays centred
           even when other cells grow with a validation message */
        .scpmr-color-table td:last-child {
            vertical-align: middle;
            text-align: center;
        }

        /* Validation messages in color table cells */
        .scpmr-color-table td .text-danger.small {
            display: block;
            margin-top: 3px;
            font-size: 11px;
            line-height: 1.3;
            white-space: normal;
        }

        /* All inputs / Radzen dropdowns inside the color table fill the cell */
        .scpmr-color-table td .scpmr-input {
            width: 100%;
            height: 34px;
            font-size: 12px;
            padding: 0 8px;
            box-sizing: border-box;
        }

        .scpmr-color-table td .scpmr-select-radzen.rz-dropdown {
            width: 100% !important;
            min-height: 34px !important;
            max-height: 34px !important;
            font-size: 12px !important;
            border: 1px solid #E5E7EB !important;
            border-radius: 6px !important;
            background-color: #FFFFFF !important;
            box-shadow: none !important;
            display: inline-flex !important;
            align-items: center !important;
            padding: 0 !important;
            box-sizing: border-box !important;
        }

        .scpmr-color-table td .scpmr-select-radzen .rz-dropdown-label,
        .scpmr-color-table td .scpmr-select-radzen .rz-inputtext,
        .scpmr-color-table td .scpmr-select-radzen .rz-dropdown-label-container {
            font-size: 12px !important;
            padding: 0 8px !important;
            line-height: 34px !important;
            height: 34px !important;
            width: 100% !important;
            box-sizing: border-box !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .scpmr-color-table td .scpmr-select-radzen.rz-dropdown:focus,
        .scpmr-color-table td .scpmr-select-radzen.rz-dropdown.rz-state-focused,
        .scpmr-color-table td .scpmr-select-radzen.rz-dropdown:focus-within {
            border-color: #9CA3AF !important;
            box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.15) !important;
            outline: none !important;
        }

.scpmr-btn-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.12s;
}

    .scpmr-btn-delete:hover {
        background-color: #FEE2E2;
    }

        .scpmr-btn-delete:hover svg {
            stroke: #EF4444;
        }

.dialog-btn.santej-create-pmr-submit-btn {
    background-color: #FF0000;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s;
}

    .dialog-btn.santej-create-pmr-submit-btn:hover {
        background-color: #D60000;
    }

/* ================================================================
   SANTEJ PRODUCTION PMR DETAILS DIALOG STYLES
   ================================================================ */
.prod-pmr-details-dialog {
    width: 680px;
    max-width: 94vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.prod-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #EAEAEA;
}

.prod-dialog-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prod-dialog-body {
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Section 1: Product Code Box */
.prod-code-box {
    background-color: #F8FAFC;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prod-code-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #151515;
}

.prod-code-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prod-code-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    box-sizing: border-box;
}

    .prod-code-input::placeholder {
        color: #9CA3AF;
    }

.prod-btn-save-code {
    background-color: #1A1A1A;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 0 18px;
    height: 36px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .prod-btn-save-code:hover {
        background-color: #000000;
    }

/* Section 2: 3-Column Info Grid */
.prod-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 16px;
    row-gap: 10px;
}

.prod-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 8px;
}

.prod-info-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #151515;
}

.prod-info-value {
    font-size: 12.5px;
    font-weight: 400;
    color: #808080;
}

/* Section 3: Raw Material Weights Card (Grey Outer Box) */
.prod-rm-weights-card {
    background-color: #F8FAFC;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prod-rm-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.prod-rm-title {
    font-size: 14px;
    font-weight: 700;
    color: #151515;
    margin: 0 0 2px 0;
}

.prod-rm-subtitle {
    font-size: 11.5px;
    color: #9CA3AF;
    margin: 0;
}

.prod-rm-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prod-toggle-text {
    font-size: 12px;
    font-weight: 500;
    color: #333333;
}

.prod-recommended-pill {
    background-color: #F3E8FF;
    border: 1px solid #C084FC;
    color: #9333EA;
    border-radius: 12px;
    padding: 0 12px;
    font-size: 10.5px;
    font-weight: 500;
    min-width: 105px;
    width: 105px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 24px;
    box-sizing: border-box;
    vertical-align: middle;
    white-space: nowrap;
}

.prod-rm-table-wrapper {
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 6px;
    overflow: hidden;
}

.prod-rm-table {
    width: 100%;
    border-collapse: collapse;
}

    .prod-rm-table thead {
        background-color: #FAFAFA;
        border-bottom: 1px solid #EAEAEA;
    }

    .prod-rm-table th {
        font-size: 11.5px;
        font-weight: 500;
        color: #64748B;
        padding: 8px 12px;
        text-align: left;
    }

    .prod-rm-table td {
        padding: 8px 12px;
        vertical-align: middle;
        border-bottom: 1px solid #F1F5F9;
        font-size: 12px;
        font-weight: 400;
        color: #151515;
    }

    .prod-rm-table tfoot td {
        border-bottom: none;
        background-color: #FAFAFA;
    }

    /* Keeps header, row values and total in the weight column aligned identically */
    .prod-rm-table th.prod-rm-weight-col,
    .prod-rm-table td.prod-rm-weight-col {
        text-align: center;
        white-space: nowrap;
    }

    .prod-rm-table tfoot td.prod-total-label,
    .prod-rm-table tfoot td.prod-total-value {
        font-weight: 600;
    }

    /* New Formula Weight column (Change Weight ON): inputs and total are right-aligned */
    .prod-rm-table td.prod-rm-new-weight-col {
        text-align: right;
        white-space: nowrap;
    }

    /* Line the total up with the input text (td padding + input padding) */
    .prod-rm-table tfoot td.prod-rm-new-weight-col {
        padding-right: 22px;
    }

.prod-weight-input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    box-sizing: border-box;
    text-align: right;
}

    .prod-weight-input:focus {
        outline: none;
        border-color: #CBD5E1;
    }

.prod-old-weight-input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    color: #555555;
    background-color: #FAFAFA;
    border: 1px solid #E5E5EE;
    border-radius: 6px;
    box-sizing: border-box;
    cursor: not-allowed;
    text-align: right;
}

    .prod-old-weight-input:focus {
        outline: none;
    }

.prod-field-error {
    color: #dc2626;
    font-size: 11px;
    font-weight: 400;
    margin-top: 4px;
    display: block;
    line-height: 1.2;
    text-align: left;
}

.prod-input-error,
.prod-input-error.prod-code-input,
.prod-input-error.prod-weight-input {
    border-color: #dc2626 !important;
}

/* Footer Actions */
.prod-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid #EAEAEA;
    background-color: #FFFFFF;
}

.prod-btn-close {
    background-color: #FFFFFF;
    border: 1px solid #D9E0E7;
    border-radius: 6px;
    padding: 8px 22px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1A1A1A;
    cursor: pointer;
    height: 36px;
    transition: all 0.15s ease;
}

    .prod-btn-close:hover {
        background-color: #F8FAFC;
        border-color: #CBD5E1;
    }

.prod-btn-submit-admin {
    background-color: #FF0000;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px 22px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    height: 36px;
    transition: background-color 0.15s ease;
}

    .prod-btn-submit-admin:hover {
        background-color: #CC0000;
    }

/* ================================================================
   PRODUCTION RECOMMENDED DIALOG STYLES
   ================================================================ */
.prod-recommended-dialog {
    width: 480px;
    max-width: 90vw;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.prod-rec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #F1F5F9;
}

.prod-rec-body {
    padding: 18px 20px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prod-rec-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

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

.prod-rec-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #151515;
}

.prod-rec-value {
    font-size: 12.5px;
    font-weight: 400;
    color: #808080;
}

.prod-rec-divider {
    height: 1px;
    background-color: #F1F5F9;
    width: 100%;
}

.prod-rec-note-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prod-rec-note-text {
    font-size: 12.5px;
    font-weight: 400;
    color: #808080;
    margin: 0;
    line-height: 1.45;
}

/* ==========================================================================
   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;
}

.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: center;
    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;
}

.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;
    }

/* 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;
    }

/* Hajipur Dispatch User PMR Details Dialog Styles (hdpd-*) */
.hdpd-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    width: 780px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.hdpd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid #F0F0F5;
}

.hdpd-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hdpd-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #151515;
}

.hdpd-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    background-color: #FFF0F0;
    border: 1px solid #FFC2C2;
    color: #F04438;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 14px;
}

.hdpd-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.hdpd-body {
    padding: 22px;
    overflow-y: auto;
}

.hdpd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 28px;
    row-gap: 20px;
}

.hdpd-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid #F5F5F8;
    padding-bottom: 12px;
}

.hdpd-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #151515;
}

.hdpd-value {
    font-size: 13px;
    color: #808080;
    font-weight: 400;
}

.hdpd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-top: 1px solid #F0F0F5;
    background-color: #FFFFFF;
}

.hdpd-btn-completed {
    height: 38px;
    padding: 0 20px;
    background-color: #151515;
    border: none;
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

    .hdpd-btn-completed:hover {
        background-color: #000000;
    }

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

    .hdpd-btn-upload-invoice:hover {
        opacity: 0.9;
    }


/* ================================================================
   PMR QUOTATION EMAIL TEMPLATE
   Scoped styles to avoid conflicts with existing application CSS
   ================================================================ */

.pmr-email-template {
    font-family: "IBM Plex Sans", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #555555;
    width: 100%;
}

    .pmr-email-template table {
        border-collapse: collapse;
    }

    .pmr-email-template .email-container {
        width: 650px;
        max-width: 100%;
        margin: 20px auto;
        background-color: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

    .pmr-email-template .email-header {
        border-bottom: 4px solid #A7805D;
        padding: 20px;
    }

    .pmr-email-template .email-content {
        padding: 20px;
    }

    .pmr-email-template .email-details {
        width: 100%;
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 20px;
    }

        .pmr-email-template .email-details td {
            vertical-align: top;
        }

    .pmr-email-template .email-label {
        width: 70px;
        font-weight: 600;
        color: #333333;
    }

    .pmr-email-template .company-name {
        font-size: 18px;
        font-weight: 700;
        text-decoration: underline;
        color: #333333;
    }

    .pmr-email-template .sample-table {
        width: 100%;
        margin: 20px 0;
        border: 1px solid #555555;
        font-size: 14px;
    }

        .pmr-email-template .sample-table th,
        .pmr-email-template .sample-table td {
            border: 1px solid #555555;
            padding: 8px;
            text-align: center;
            vertical-align: middle;
        }

        .pmr-email-template .sample-table th {
            font-weight: 700;
            background-color: #f5f5f5;
            color: #333333;
        }

        .pmr-email-template .sample-table td {
            color: #333333;
        }

    .pmr-email-template .price {
        font-weight: 700;
    }

    .pmr-email-template .signature {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
    }

@media only screen and (max-width: 650px) {
    .pmr-email-template .email-container {
        width: 100% !important;
        margin: 0 !important;
    }

    .pmr-email-template .email-content {
        padding: 15px !important;
    }

    .pmr-email-template .sample-table {
        font-size: 11px !important;
    }

        .pmr-email-template .sample-table th,
        .pmr-email-template .sample-table td {
            padding: 5px !important;
        }
}

/* =========================================
   DELETE CONFIRMATION DIALOG
   ========================================= */
.dialog-delete-card {
    width: 375px;
    max-width: calc(100vw - 32px);
    border-radius: 12px;
    box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    background-color: #ffffff;
    overflow: hidden;
}

.dialog-delete-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dialog-delete-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background-color: #fef2f2;
    flex-shrink: 0;
}

.dialog-delete-card .dialog-title {
    font-size: 14.5px !important;
    font-weight: 600;
}

.dialog-delete-body {
    padding: 18px 20px 14px 20px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0 !important;
    box-sizing: border-box;
}

/* Layered danger icon badge with smooth ring & subtle glow */
.delete-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 2px auto 10px auto;
    border-radius: 50%;
    background-color: #fff1f2;
    box-shadow: 0 0 0 5px #fff5f5, 0 0 0 6px #fee2e2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.delete-icon-wrapper:hover {
    transform: scale(1.04);
    box-shadow: 0 0 0 6px #fff1f2, 0 0 0 7px #fecaca;
}

.delete-icon-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
}

/* Primary question title - compact font size */
.dialog-delete-title {
    font-size: 13.5px !important;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    padding: 0 4px;
    margin: 0;
    box-sizing: border-box;
    text-align: center;
}


/* Warning alert callout banner matching reference image */
.dialog-delete-alert-callout {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background-color: #fff8f8;
    border: 1px solid #fecaca;
    border-left: 3.5px solid #dc2626;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.dialog-delete-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    flex-shrink: 0;
    margin-top: 1px;
}

.dialog-delete-alert-text {
    font-size: 12px;
    line-height: 1.45;
    color: #991b1b;
    font-weight: 500;
    margin: 0;
    word-break: break-word;
}

.dialog-delete-msg {
    font-size: 12px;
    color: #64748b;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    box-sizing: border-box;
}

/* Footer & Buttons */
.dialog-delete-footer {
    padding: 10px 16px !important;
    background-color: #f8fafc !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.dialog-delete-card .dialog-cancel-btn {
    font-size: 12px !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
}

.dialog-delete-submit-btn {
    background-color: #dc2626 !important;
    border: 1px solid #dc2626 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 6px 18px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    box-shadow: 0 1px 2px 0 rgba(220, 38, 38, 0.25) !important;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease !important;
}

.dialog-delete-submit-btn:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    box-shadow: 0 3px 6px -1px rgba(220, 38, 38, 0.35) !important;
    transform: translateY(-1px);
}

.dialog-delete-submit-btn:active {
    transform: translateY(0);
}


/* =========================================
   CUSTOMER DIALOG - INPUT VALIDATION
   ========================================= */

/* Default / untouched / empty */
.dialog-card .dialog-input,
.dialog-card .dialog-input.form-control {
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    outline: none !important;
}

    /* =========================================
   FOCUS
   ========================================= */

    .dialog-card .dialog-input:focus,
    .dialog-card .dialog-input.form-control:focus,
    .dialog-card .dialog-select:focus {
        border-color: var(--primary-color, #0405AB) !important;
        outline: none !important;
        box-shadow: 0 0 0 3px var(--primary-bg, rgba(4, 5, 171, 0.15)) !important;
    }

    /* =========================================
   VALID - ONLY AFTER VALUE IS ENTERED
   ========================================= */

    .dialog-card:not(.user-dialog-card) .dialog-input.valid:not(:focus):not(:placeholder-shown):not(.rz-dropdown),
    .dialog-card:not(.user-dialog-card) .dialog-input.is-valid:not(:focus):not(:placeholder-shown):not(.rz-dropdown) {
        border-color: #198754 !important;
    }

    /* Suppress green valid border for dropdowns and user dialog inputs */
    .dialog-card .rz-dropdown,
    .dialog-card .rz-dropdown.valid,
    .dialog-card .rz-dropdown.is-valid,
    .dialog-card .rz-dropdown.valid.modified,
    .dialog-card .rz-dropdown.modified,
    .user-dialog-card .dialog-input.valid,
    .user-dialog-card .dialog-input.is-valid,
    .user-dialog-card .rz-dropdown.valid,
    .user-dialog-card .rz-dropdown.is-valid {
        border-color: #e5e7eb !important;
        box-shadow: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    /* =========================================
   INVALID
   ========================================= */

    .dialog-card .dialog-input.invalid,
    .dialog-card .dialog-input.is-invalid,
    .dialog-card .dialog-select.invalid,
    .dialog-card .dialog-select.is-invalid {
        border-color: #dc3545 !important;
        box-shadow: none !important;
        outline: none !important;
        /* override Bootstrap's background-image warning icon */
        background-image: none !important;
    }

    /* =========================================
   FOCUS - VALID / INVALID
   ========================================= */

    /* Valid + focused = metallic / dark gray (also readonly inputs & Add Rate inputs) */
    .dialog-card .dialog-input.valid:focus,
    .dialog-card .dialog-input.is-valid:focus,
    .dialog-card .dialog-select.valid:focus,
    .dialog-card .dialog-select.is-valid:focus,
    .dialog-card .dialog-input[readonly]:focus,
    .add-rate-card .dialog-input:not(.invalid):not(.is-invalid):focus {
        border-color: #9CA3AF !important;
        box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.15) !important;
    }

    /* Invalid + focused — keep red border */
    .dialog-card .dialog-input.invalid:focus,
    .dialog-card .dialog-input.is-invalid:focus,
    .dialog-card .dialog-select.invalid:focus,
    .dialog-card .dialog-select.is-invalid:focus {
        border-color: #dc3545 !important;
        box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15) !important;
        outline: none !important;
    }

.dialog-dropdown.rz-dropdown {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.dialog-dropdown .rz-dropdown-label-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.dialog-dropdown .rz-dropdown-label {
    font-size: 13px !important;
    color: #9ca3af !important;
}

    .dialog-dropdown .rz-dropdown-label:not(.rz-placeholder) {
        color: #111827 !important;
    }

/*Production Confirm Dialog*/
.production-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.production-confirm-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    min-height: 200px;
    padding: 36px 32px 28px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
    text-align: center;
    box-sizing: border-box;
}

.production-confirm-close {
    position: absolute;
    top: 10px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    background: transparent;
    color: #333;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.production-confirm-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.production-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    color: #ff4545;
    background: #ffe5e5;
    border-radius: 50%;
    position: relative;
}

    .production-icon-circle::after {
        content: "";
        position: absolute;
        top: -4px;
        right: -4px;
        width: 20px;
        height: 20px;
        background: #fff0f0;
        border-radius: 50%;
    }

    .production-icon-circle svg {
        position: relative;
        z-index: 1;
        width: 32px;
        height: 32px;
    }

.production-confirm-title {
    margin: 0 0 8px;
    color: #252525;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.production-confirm-description {
    max-width: 320px;
    margin: 0 auto 20px;
    color: #a0a0a0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.production-confirm-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

    .production-confirm-actions button {
        min-width: 130px;
        height: 38px;
        padding: 0 20px;
        border-radius: 4px;
        font-family: inherit;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

.production-btn-discard {
    color: #333;
    background: #fff;
    border: 1px solid #d2d2d2;
}

    .production-btn-discard:hover {
        background: #f5f5f5;
    }

.production-btn-submit {
    color: #fff;
    background: #ff0808;
    border: 1px solid #ff0808;
}

    .production-btn-submit:hover {
        background: #dc0000;
        border-color: #dc0000;
    }

@media (max-width: 360px) {
    .production-confirm-modal {
        max-width: 100%;
    }

    .production-confirm-title {
        font-size: 15px;
    }

    .production-confirm-description {
        font-size: 12px;
    }
}

/* =========================================
   Change Password — info message
   ========================================= */

.change-password-info-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}

/* Santej amber/orange variant -- matches the Settings page warning note */
.change-password-info-msg--warning {
    background-color: #fffbeb;
    border-color: #fef3c7;
    color: #d97706;
}

.change-password-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    line-height: 1;
}

.change-password-info-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}
