/* ================================================================
   HAJIPUR CREATE PMR / DESIGN INPUT PAGE STYLES (Figma/Mockup)
   ================================================================ */

.cpmr-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a2e;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
}

/* Main Rounded White Box for Customer Details & Design Input */
.cpmr-main-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 24px 28px;
    box-sizing: border-box;
    width: 100%;
}

/* Customer Details Header */
.cpmr-header-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cpmr-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cpmr-badge-rh {
    background-color: #e5e7eb;
    color: #0405AB;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

.cpmr-subtitle {
    font-size: 12.5px;
    color: #9ca3af;
    margin: 0 0 20px 0;
}

/* 4-Column Form Grid */
.cpmr-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 1200px) {
    .cpmr-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cpmr-grid-4 {
        grid-template-columns: 1fr;
    }
}

.cpmr-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cpmr-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
}

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

.cpmr-input,
.cpmr-select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
    color: #111827;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.cpmr-input:focus,
.cpmr-select:focus {
    border-color: #0405AB;
}

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

.cpmr-select-wrapper .cpmr-select {
    appearance: none;
    padding-right: 32px;
}

.cpmr-select-chevron {
    position: absolute;
    right: 10px;
    pointer-events: none;
    color: #9ca3af;
    display: flex;
    align-items: center;
}

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

.cpmr-rh-icon {
    height: 22px;
    width: auto;
    object-fit: contain;
}

/* Outer Soft Lavender Wrapper for Design Input Section (#F5F5FF) */
.cpmr-design-section-wrapper {
    background-color: #F5F5FF;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Design Input Banner Inside Lavender Wrapper */
.cpmr-design-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.cpmr-design-banner-title {
    font-size: 16px;
    font-weight: 700;
    color: #0405AB;
    margin: 0;
}

.cpmr-btn-add-new {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cpmr-btn-add-new:hover {
    border-color: #0405AB;
    color: #0405AB;
}

/* Design Input Item Card (White box inside Lavender container) */
.cpmr-design-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.cpmr-design-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.cpmr-design-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cpmr-design-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpmr-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ef4444;
    padding: 4px;
    display: flex;
    align-items: center;
}

.cpmr-chevron-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    display: flex;
    align-items: center;
}

/* Radio Group Row */
.cpmr-radio-row {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 40px;
}

.cpmr-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

.cpmr-radio-label input[type="radio"] {
    accent-color: #0405AB;
}


/* Custom Table matching media_1787160814986.png */
.cpmr-table-wrapper {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 16px;
    background: #ffffff;
}

.cpmr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cpmr-table th {
    background-color: #EBEBFF;
    color: #111827;
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.cpmr-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

.cpmr-table-type-cell {
    font-weight: 600;
    color: #374151;
    width: 20%;
}

/* Submit Actions Outside Card */
.cpmr-submit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.cpmr-btn-cancel {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cpmr-btn-cancel:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.cpmr-btn-submit {
    background-color: #0405AB;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cpmr-btn-submit:hover {
    background-color: #03048a;
}

/* ================================================================
   OLD PMR SPLIT LAYOUT & RAW MATERIAL WEIGHTS CARD STYLES
   ================================================================ */

.cpmr-old-pmr-select {
    background-color: #f8f9ff !important;
    border-color: #e2e8f0;
}

.cpmr-split-layout {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    align-items: flex-start;
}

.cpmr-split-left {
    flex: 1 1 48%;
    min-width: 0;
    margin-top: 0 !important;
}

.cpmr-raw-material-card {
    flex: 1 1 52%;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cpmr-rm-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cpmr-rm-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.cpmr-rm-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.cpmr-btn-add-material {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cpmr-btn-add-material:hover {
    border-color: #0405AB;
    color: #0405AB;
}

.cpmr-rm-table-wrapper {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.cpmr-rm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.cpmr-rm-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 12px;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.cpmr-rm-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

.cpmr-rm-input {
    height: 36px;
    font-size: 12.5px;
    text-align: right;
}

.cpmr-btn-delete-mat {
    color: #9ca3af;
    padding: 4px;
}

.cpmr-btn-delete-mat:hover {
    color: #ef4444;
}

/* Warning alert box */
.cpmr-warning-alert {
    background-color: #fff7ed;
    border: 1px solid #ffedd5;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cpmr-warning-icon {
    color: #f97316;
    display: flex;
    align-items: center;
    margin-top: 1px;
}

.cpmr-warning-text {
    font-size: 12px;
    color: #c2410c;
    line-height: 1.4;
}

/* Raw Material Footer & Action Buttons */
.cpmr-rm-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
}

.cpmr-rm-footer .cpmr-warning-alert {
    flex: 1;
}

.cpmr-rm-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .cpmr-split-layout {
        flex-direction: column;
    }
    .cpmr-split-left,
    .cpmr-raw-material-card {
        width: 100%;
    }
    .cpmr-rm-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .cpmr-rm-actions {
        justify-content: flex-end;
    }
}

/* ================================================================
   REVISION TABS (Between Customer Details & Design Input)
   ================================================================ */

.cpmr-revision-tabs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.cpmr-rev-tab {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    border-radius: 4px 4px 0 0;
}

.cpmr-rev-tab:hover {
    color: #111827;
}

.cpmr-rev-tab.active {
    background-color: #eef2ff;
    color: var(--primary-color, #0405ab);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color, #0405ab);
}

/* ================================================================
   DESIGN OUTPUT SECTION (Below Submit Actions)
   ================================================================ */

.cpmr-design-output-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-top: 4px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


.cpmr-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

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

.cpmr-output-subtabs {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.cpmr-output-subtab {
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}

.cpmr-output-subtab:hover {
    color: #111827;
}

.cpmr-output-subtab.active {
    color: var(--primary-color, #0405ab);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color, #0405ab);
}

/* Design Output Table */
.cpmr-output-table-wrapper {
    overflow-x: auto;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
}

.cpmr-output-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cpmr-output-table th {
    background-color: #fafbfd;
    color: #6b7280;
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.cpmr-output-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    vertical-align: middle;
    white-space: nowrap;
}

.cpmr-output-table tr:hover {
    background-color: #f9fafb;
}

.cpmr-product-tag {
    display: inline-block;
    background-color: #f0f2ff;
    color: #1e1b4b;
    font-weight: 500;
    font-size: 12.5px;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Pagination Bar */
.cpmr-output-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
}

.cpmr-pagination-info {
    font-size: 12.5px;
    color: #6b7280;
}

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

.cpmr-page-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #374151;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cpmr-page-btn:hover:not(.active) {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.cpmr-page-btn.active {
    background-color: var(--primary-color, #0405ab);
    border-color: var(--primary-color, #0405ab);
    color: #ffffff;
}






/* ── Action bar (Cancel / Submit) ─────────────────────────────────── */
.cpmr-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 8px;
}

/* ── Modal overlay shared by History & Success dialogs ─────────────── */
.cpmr-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cpmr-dialog {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px 24px;
    min-width: 340px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    position: relative;
}

.cpmr-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cpmr-dialog-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cpmr-dialog-body {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.cpmr-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.cpmr-dialog-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.cpmr-dialog-close:hover {
    color: #374151;
    background-color: #f3f4f6;
}

/* ── Success Dialog specifics ─────────────────────────────────────── */
.cpmr-success-dialog {
    text-align: center;
    padding: 36px 40px 28px;
}

.cpmr-success-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.cpmr-success-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

/* outer pale-green bubble */
.cpmr-success-icon-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #dcfce7;
    opacity: 0.6;
}

/* inner circle with border */
.cpmr-success-icon-circle {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2.5px solid #22c55e;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.cpmr-success-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.cpmr-success-subtitle {
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.55;
    margin: 0 0 4px;
}

.cpmr-success-dialog .cpmr-dialog-footer {
    justify-content: center;
}

/* Divider line inside design cards */
.cpmr-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

/* Radzen dropdown styling for PMR form */
.cpmr-radzen-dropdown {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    color: #1f2937;
    box-shadow: none !important;
}

.cpmr-radzen-dropdown:focus-within {
    border-color: #3b82f6;
    outline: 2px solid rgba(59, 130, 246, 0.1);
}

.cpmr-table-dropdown {
    height: 36px;
    font-size: 13px;
}
