/*
 * Created Date/By: 2026-10-03 / OpenAI for Jonathan Kilburn
 * Description: Manufacturer Portal deltas on top of the shared Nimble 2.0 visual system.
 * PURPOSE: Preserve Clinic Portal look and feel while identifying Manufacturer workflows.
 */
.portal-auth { min-height: 100vh; }
.auth-brand-logo { display:flex; align-items:center; gap:12px; margin-bottom:34px; }
.auth-brand-logo img { width:58px; height:42px; filter:drop-shadow(0 3px 8px rgba(0,0,0,.18)); }
.auth-brand-logo strong { color:#fff; font-size:1.35rem; letter-spacing:-.03em; }
.auth-brand-logo small { display:block; color:rgba(255,255,255,.72); font-size:.8rem; }
.auth-feature { border:1px solid rgba(255,255,255,.18); border-radius:14px; padding:14px; height:100%; background:rgba(255,255,255,.05); }
.auth-feature .bi { font-size:1.25rem; margin-bottom:7px; display:block; }
.auth-utility-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.auth-utility-actions .btn { width:100%; }
.portal-user .avatar,.account-avatar { display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.page-heading-wrap { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:22px; }
.page-heading-wrap .page-heading { margin-bottom:0 !important; }
.page-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.portal-table-card { padding:0; overflow:visible; }
.portal-table-card .table-toolbar { padding:15px 17px; border-bottom:1px solid var(--portal-border); display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.portal-table-card .table-responsive { border:0 !important; border-radius:0 !important; }
.portal-table-card table { margin-bottom:0; }
.portal-table-card tbody tr[data-row-id] { cursor:pointer; }
.portal-table-card tbody tr[data-row-id]:hover { background:#e9f2ff; }
.manufacturer-dashboard-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.manufacturer-dashboard-grid .quick-action-card { display:flex; flex-direction:column; }
.manufacturer-dashboard-grid .quick-action-card .btn { margin-top:auto; }
.dashboard-count { font-size:2rem; font-weight:750; color:#0b2c51; margin:10px 0 5px; }
.status-badge { text-transform:capitalize; }
.detail-card { margin-top:22px; }
.detail-card .detail-heading { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--portal-border); padding-bottom:14px; margin-bottom:18px; }
.field-label { display:block; color:#526a86; font-size:.73rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; margin-bottom:4px; }
.metric-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-bottom:22px; }
.metric-grid .metric-card { padding:20px; }
.metric-grid .metric-value { margin-top:7px; }
.form-check-card { border:1px solid var(--portal-border); border-radius:10px; padding:12px 14px; background:#f8fbff; }
.stock-total { font-size:1.1rem; color:#102e53; }
#toast { position:fixed; left:50%; top:18px; transform:translateX(-50%); z-index:2000; min-width:min(460px,calc(100vw - 32px)); max-width:680px; pointer-events:none; }
#toast .toast-message { background:#102e53; color:#fff; border-radius:10px; box-shadow:0 8px 24px rgba(13,45,84,.2); padding:12px 16px; text-align:center; }
.account-links button { width:100%; border:0; background:transparent; text-align:left; }
.portal-sidebar .portal-user { color:#fff; }
.top-pill.system-admin { background:#e9f2ff; color:#075db7; }
.empty-state { padding:36px 22px; color:var(--portal-muted); text-align:center; }
.support-article { border:1px solid var(--portal-border); border-radius:12px; padding:16px; background:#fff; }
@media (max-width:1199.98px){ .manufacturer-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:767.98px){ .manufacturer-dashboard-grid,.metric-grid{grid-template-columns:1fr;} .page-heading-wrap{display:block;} .page-actions{margin-top:14px;} .auth-utility-actions{grid-template-columns:1fr;} }

/* M1e workflow detail and administration surfaces */
.review-summary-grid,
.payment-summary-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.review-summary-grid > div,
.payment-summary-grid > div {
    min-width:0;
    border:1px solid var(--portal-border);
    border-radius:10px;
    background:#f8fbff;
    padding:12px 14px;
}
.review-summary-grid > div > span,
.payment-summary-grid > div > span {
    display:block;
    color:#526a86;
    font-size:.72rem;
    font-weight:700;
    letter-spacing:.055em;
    text-transform:uppercase;
    margin-bottom:4px;
}
.review-summary-grid > div > strong,
.payment-summary-grid > div > strong {
    display:block;
    color:#102e53;
    font-size:.96rem;
    overflow-wrap:anywhere;
}
.review-section {
    padding:18px 0;
    border-top:1px solid var(--portal-border);
}
.review-section:first-of-type { border-top:0; }
.review-section h3 {
    color:#102e53;
    font-size:1rem;
    font-weight:750;
    margin:0 0 14px;
}
.structured-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 18px;
}
.structured-row {
    min-width:0;
    border-bottom:1px solid #e8eef6;
    padding:8px 0 10px;
    overflow-wrap:anywhere;
}
.structured-row > div { color:#243b55; }
.subrecord-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
.subrecord-card {
    border:1px solid var(--portal-border);
    border-radius:10px;
    background:#fff;
    padding:14px;
    min-width:0;
}
.subrecord-card strong { color:#102e53; }
.decision-section {
    margin-top:20px;
    border:1px solid #c8d9ec;
    border-radius:12px;
    background:#f4f8fd;
    padding:18px;
}
.decision-section h3 { color:#102e53; font-size:1rem; font-weight:750; }
.nested-form {
    border:1px solid #d5e2f0;
    border-radius:12px;
    background:#f8fbff;
    padding:16px;
}
.support-thread {
    display:flex;
    flex-direction:column;
    gap:10px;
}
.support-message {
    border:1px solid var(--portal-border);
    border-radius:10px;
    background:#fff;
    padding:12px 14px;
}
.support-message.internal { background:#fff8e8; border-color:#eed9a4; }
.support-message .support-message-meta {
    color:#687d94;
    font-size:.78rem;
    margin-bottom:6px;
}
.support-message p { white-space:pre-wrap; margin:0; }

@media (max-width:1199.98px) {
    .review-summary-grid,
    .payment-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .subrecord-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767.98px) {
    .review-summary-grid,
    .payment-summary-grid,
    .structured-grid,
    .subrecord-grid { grid-template-columns:1fr; }
}

/* M1e6 onboarding, change-letter and hierarchical metrics surfaces */
.metric-filter-panel .form-label {
    color:#274766;
    font-size:.78rem;
    font-weight:700;
    letter-spacing:.035em;
    text-transform:uppercase;
}
.metric-grid-four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.metric-hierarchy-table { margin-bottom:0; }
.metric-hierarchy-table thead th {
    background:#eaf3ff;
    color:#173a60;
    border-bottom:1px solid #bed3eb;
    font-size:.76rem;
    letter-spacing:.035em;
    text-transform:uppercase;
    white-space:nowrap;
}
.metric-hierarchy-table tbody td { vertical-align:middle; }
.metric-level-distributor td {
    background:#eef6ff;
    border-top:2px solid #c1d8ef;
    color:#123b67;
}
.metric-level-manufacturer td { background:#f8fbff; }
.metric-level-product td:first-child { padding-left:2.25rem; }
.metric-tree-manufacturer { display:inline-block; padding-left:1rem; }
.metric-tree-product { display:inline-block; }
.metric-product-meta { margin-left:1.5rem; margin-top:2px; }
.change-letter-body {
    border:1px solid var(--portal-border);
    border-radius:10px;
    background:#fff;
    padding:18px;
    line-height:1.6;
}
.change-letter-body > :last-child { margin-bottom:0; }
.onboarding-file-list .list-group-item { background:#fff; }
.demo-data-note {
    border:1px dashed #9dbbdd;
    border-radius:10px;
    background:#f7fbff;
    color:#365879;
    padding:12px 14px;
}
@media (max-width:1199.98px) {
    .metric-grid-four { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767.98px) {
    .metric-grid-four { grid-template-columns:1fr; }
    .metric-level-product td:first-child { padding-left:1rem; }
    .metric-tree-manufacturer { padding-left:.35rem; }
}

/* M1e7b Toast T1: isolate Manufacturer Portal notifications from shared portal toast rules. */
#toast.nimble-toast-host:not(:empty) {
    position: fixed !important;
    top: max(16px, env(safe-area-inset-top)) !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 5000 !important;
    display: block !important;
    width: max-content !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: min(560px, calc(100vw - 32px)) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    pointer-events: none !important;
}
#toast.nimble-toast-host .nimble-toast-message {
    display: block;
    width: max-content;
    height: auto;
    max-width: min(560px, calc(100vw - 32px));
    margin: 0;
    padding: 12px 16px;
    background: #102e53;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(13,45,84,.2);
    text-align: center;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
@media (max-width: 575.98px) {
    #toast.nimble-toast-host:not(:empty),
    #toast.nimble-toast-host .nimble-toast-message {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
    }
}

/* M1E7B_TOAST_STANDARDIZATION_T2_STYLES
 * Severity colors for compact top-center Manufacturer Portal notifications.
 */
#toast.nimble-toast-host .nimble-toast-message {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.28);
}
#toast.nimble-toast-host .nimble-toast-message > i {
    flex: 0 0 auto;
    font-size: 1rem;
}
#toast.nimble-toast-host[data-type="success"] .nimble-toast-message {
    background: #146c43;
    border-color: #0f5132;
}
#toast.nimble-toast-host[data-type="error"] .nimble-toast-message {
    background: #b02a37;
    border-color: #842029;
}
#toast.nimble-toast-host[data-type="warning"] .nimble-toast-message {
    background: #997404;
    border-color: #664d03;
}
#toast.nimble-toast-host[data-type="info"] .nimble-toast-message {
    background: #0c5460;
    border-color: #055160;
}

/* NIMBLE-MFG-DASHBOARD-D2-BEGIN
 * Compact Manufacturer dashboard cards and real-data business analytics.
 */
.manufacturer-dashboard-grid { gap:12px; }
.manufacturer-dashboard-grid .mfg-workload-card {
    --mfg-accent:#0d6efd;
    --mfg-soft:#e8f2ff;
    border-left:4px solid var(--mfg-accent);
    padding:13px 14px 12px;
    min-height:0;
}
.mfg-accent-onboarding { --mfg-accent:#7b4dd8; --mfg-soft:#f0eaff; }
.mfg-accent-ivr { --mfg-accent:#dd7a13; --mfg-soft:#fff0de; }
.mfg-accent-orders { --mfg-accent:#0d6efd; --mfg-soft:#e8f2ff; }
.mfg-accent-distributors { --mfg-accent:#198754; --mfg-soft:#e4f6ee; }
.mfg-workload-head { display:flex; align-items:center; gap:10px; }
.mfg-workload-card .dashboard-icon {
    width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
    border-radius:10px; color:var(--mfg-accent); background:var(--mfg-soft); flex:0 0 auto;
}
.mfg-workload-card .quick-card-heading { margin:0; color:#39577c; font-size:.78rem; font-weight:750; }
.mfg-workload-card .dashboard-count { margin:1px 0 0; font-size:1.55rem; line-height:1; }
.mfg-workload-track { height:5px; margin:10px 0 8px; border-radius:999px; background:#edf2f7; overflow:hidden; }
.mfg-workload-track > span { display:block; height:100%; min-width:3px; border-radius:999px; background:var(--mfg-accent); }
.mfg-workload-copy { font-size:.76rem; line-height:1.35; margin:0 0 9px; }
.mfg-workload-card .btn { align-self:flex-start; padding:.3rem .65rem; font-size:.76rem; }
.mfg-business-heading { margin-top:2px; }
.mfg-business-dashboard { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.mfg-analytics-card {
    --mfg-analytics-accent:#0d6efd; --mfg-analytics-soft:#e8f2ff;
    background:#fff; border:1px solid var(--portal-border); border-left:4px solid var(--mfg-analytics-accent);
    border-radius:12px; padding:16px 16px 14px; box-shadow:0 5px 16px rgba(20,60,105,.08); min-width:0;
}
.mfg-analytics-sales { --mfg-analytics-accent:#0d6efd; --mfg-analytics-soft:#e8f2ff; }
.mfg-analytics-best { --mfg-analytics-accent:#198754; --mfg-analytics-soft:#e4f6ee; }
.mfg-analytics-balances { --mfg-analytics-accent:#7b4dd8; --mfg-analytics-soft:#f0eaff; }
.mfg-analytics-card > header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.mfg-analytics-card > header > div:first-child { min-width:0; }
.mfg-analytics-eyebrow { display:block; color:#526a86; font-size:.72rem; font-weight:750; letter-spacing:.045em; text-transform:uppercase; margin-bottom:3px; }
.mfg-analytics-card > header strong { display:block; color:#102e53; font-size:1.45rem; line-height:1.15; overflow-wrap:anywhere; }
.mfg-analytics-card .dashboard-icon {
    width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center;
    border-radius:10px; color:var(--mfg-analytics-accent); background:var(--mfg-analytics-soft); flex:0 0 auto;
}
.mfg-analytics-subtitle { color:#687d94; font-size:.74rem; margin:7px 0 12px; }
.mfg-analytics-empty {
    min-height:112px; display:flex; align-items:center; justify-content:center; color:#687d94; font-size:.8rem;
    text-align:center; border:1px dashed #d5e2f0; border-radius:9px; background:#f8fbff; padding:12px;
}
.mfg-daily-bars { height:132px; display:flex; align-items:stretch; gap:3px; overflow-x:auto; padding:4px 1px 0; border-bottom:1px solid #dce6f1; }
.mfg-daily-bar-col { flex:1 0 6px; min-width:6px; display:flex; flex-direction:column; justify-content:flex-end; align-items:stretch; height:100%; }
.mfg-daily-bar { display:block; background:var(--mfg-analytics-accent); border-radius:4px 4px 1px 1px; min-height:1px; }
.mfg-daily-bar-col small { display:block; min-height:16px; color:#778ba2; text-align:center; font-size:.6rem; line-height:16px; }
.mfg-ranking-bars { display:flex; flex-direction:column; gap:9px; }
.mfg-ranking-label { display:flex; justify-content:space-between; gap:10px; font-size:.74rem; color:#294665; }
.mfg-ranking-label > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mfg-ranking-label > strong { flex:0 0 auto; }
.mfg-ranking-track, .mfg-balance-track { height:7px; background:#edf2f7; border-radius:999px; overflow:hidden; }
.mfg-ranking-track > span { display:block; height:100%; min-width:3px; background:var(--mfg-analytics-accent); border-radius:999px; }
.mfg-ranking-revenue { margin-top:2px; color:#71859b; font-size:.67rem; }
.mfg-balance-bars { display:flex; flex-direction:column; gap:13px; }
.mfg-balance-row > div:first-child { display:flex; justify-content:space-between; gap:12px; color:#526a86; font-size:.75rem; margin-bottom:5px; }
.mfg-balance-row strong { color:#102e53; }
.mfg-balance-track > span { display:block; height:100%; min-width:3px; border-radius:999px; }
.mfg-balance-track.invoiced > span { background:#0d6efd; }
.mfg-balance-track.received > span { background:#198754; }
.mfg-outstanding { margin-top:3px; border-top:1px solid #e0e8f1; padding-top:11px; display:flex; justify-content:space-between; gap:12px; color:#526a86; font-size:.78rem; }
.mfg-outstanding strong { color:#a25706; font-size:1rem; }
.mfg-secondary-dashboard-link { padding:16px 18px; }
.mfg-secondary-dashboard-link p { font-size:.82rem; margin-bottom:10px; }
@media (max-width:1199.98px) {
    .mfg-business-dashboard { grid-template-columns:1fr 1fr; }
    .mfg-analytics-balances { grid-column:1 / -1; }
}
@media (max-width:767.98px) {
    .mfg-business-dashboard { grid-template-columns:1fr; }
    .mfg-analytics-balances { grid-column:auto; }
}
/* NIMBLE-MFG-DASHBOARD-D2-END */

/* NIMBLE-MFG-DASHBOARD-ORDER-D3-BEGIN
 * Clinic-style Manufacturer workload sparklines, receivable visibility, and boxed Order review sections.
 */
.manufacturer-dashboard-grid .mfg-workload-card {
    padding:12px 14px 11px;
    min-height:132px;
    display:flex;
    flex-direction:column;
}
.mfg-workload-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; min-width:0; }
.mfg-workload-identity { display:flex; align-items:center; gap:9px; min-width:0; }
.mfg-workload-card .dashboard-icon { width:36px; height:36px; }
.mfg-workload-card .dashboard-count { font-size:1.45rem; }
.mfg-workload-sparkline { width:104px; min-width:72px; height:48px; margin-left:auto; color:var(--mfg-accent); overflow:visible; }
.mfg-workload-spark-empty { width:104px; min-width:72px; height:48px; }
.mfg-spark-baseline { stroke:#dfe8f1; stroke-width:1; }
.mfg-spark-line { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.mfg-spark-area { fill:currentColor; opacity:.10; }
.mfg-workload-sparkline circle { fill:currentColor; }
.mfg-workload-track { display:none !important; }
.mfg-workload-copy { margin:7px 0 8px; min-height:1.05rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mfg-workload-footer { margin-top:auto; display:flex; align-items:center; }
.mfg-workload-card .btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    line-height:1;
    padding:.42rem .72rem;
    vertical-align:middle;
}
.mfg-balance-track.orders > span { background:#0d6efd; }
.mfg-balance-track.invoiced > span { background:#7b4dd8; }
.mfg-pending-invoice { display:flex; justify-content:space-between; gap:12px; color:#687d94; font-size:.75rem; border-top:1px dashed #dce6f1; padding-top:9px; }
.mfg-pending-invoice strong { color:#7a4d00; }
.mfg-order-review-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.mfg-order-review-field {
    min-width:0;
    border:1px solid var(--portal-border);
    border-radius:10px;
    background:#f8fbff;
    padding:12px 14px;
    overflow-wrap:anywhere;
}
.mfg-order-review-field > div { color:#102e53; line-height:1.4; }
.mfg-order-review-field-wide { grid-column:1 / -1; }
.order-lines-review th, .order-lines-review td { vertical-align:top; }
.order-lines-review .order-line-notes { min-width:190px; max-width:320px; white-space:normal; overflow-wrap:anywhere; }
@media (max-width:1199.98px) {
    .mfg-order-review-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767.98px) {
    .mfg-workload-sparkline, .mfg-workload-spark-empty { width:86px; min-width:64px; }
    .mfg-workload-copy { white-space:normal; }
    .mfg-order-review-grid { grid-template-columns:1fr; }
    .mfg-order-review-field-wide { grid-column:auto; }
}
/* NIMBLE-MFG-DASHBOARD-ORDER-D3-END */

/* NIMBLE-MFG-DASHBOARD-D3A-BEGIN
 * Final dashboard polish: vertically center text inside the secondary dashboard action buttons.
 */
.mfg-secondary-dashboard-link .btn,
.mfg-secondary-dashboard-link a.btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    line-height:1;
    text-align:center;
    padding:.42rem .72rem;
    vertical-align:middle;
}
/* NIMBLE-MFG-DASHBOARD-D3A-END */

/* NIMBLE-MFG-ORDER-WORKFLOW-D4-BEGIN */
.mfg-order-workflow-track {
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:10px;
    margin:10px 0 8px;
}
.mfg-order-workflow-stage {
    min-height:86px;
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    border:1px solid var(--portal-border);
    border-radius:10px;
    background:#f8fbff;
}
.mfg-order-workflow-stage strong { display:block; color:#17365d; }
.mfg-order-workflow-stage small { display:block; margin-top:3px; color:#687d94; line-height:1.25; }
.mfg-order-workflow-icon {
    width:34px;
    height:34px;
    flex:0 0 34px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#e8eef5;
    color:#6c7f94;
}
.mfg-order-workflow-stage.complete { border-color:#9bd5b6; background:#f3fbf6; }
.mfg-order-workflow-stage.complete .mfg-order-workflow-icon { background:#dff4e8; color:#168653; }
.mfg-order-workflow-stage.available { border-color:#9dc8f8; background:#f3f8ff; }
.mfg-order-workflow-stage.available .mfg-order-workflow-icon { background:#dfedff; color:#0d6efd; }
.mfg-order-workflow-stage.warning { border-color:#f1c27d; background:#fff8eb; }
.mfg-order-workflow-stage.warning .mfg-order-workflow-icon { background:#ffedc8; color:#9b6200; }
.mfg-order-workflow-stage.locked { opacity:.72; }
.mfg-order-workflow-rule { color:#687d94; font-size:.78rem; }
.mfg-workflow-warning ul { margin:.4rem 0 0 1.1rem; }
.mfg-order-action-grid { display:grid; gap:12px; }
.mfg-order-action-card {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:14px;
    border:1px solid var(--portal-border);
    border-radius:10px;
    background:#fbfdff;
}
.mfg-order-action-card > div > strong { display:block; color:#17365d; }
.mfg-order-action-card small { display:block; margin-top:4px; color:#687d94; }
.mfg-order-action-card .btn { min-width:130px; align-self:center; }
@media (max-width: 991.98px) {
    .mfg-order-workflow-track { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767.98px) {
    .mfg-order-workflow-track { grid-template-columns:1fr; }
    .mfg-order-action-card { align-items:stretch; flex-direction:column; }
    .mfg-order-action-card .btn { width:100%; }
}
/* NIMBLE-MFG-ORDER-WORKFLOW-D4-END */

/* NIMBLE-MFG-PAYMENT-RECONCILIATION-D5-BEGIN */
.mfg-reversed-row {
    background:#f7f8fa;
    color:#6c757d;
}
.mfg-reversed-row > td:not(:last-child) {
    opacity:.82;
}
.mfg-adjustment-reason {
    min-width:220px;
    white-space:normal;
}
.mfg-reconciliation-form {
    border-left:4px solid #dc3545;
}
.mfg-balance-adjustments {
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding-top:8px;
    margin-top:8px;
    border-top:1px dashed #c7d7e8;
    font-size:.82rem;
}
.mfg-balance-adjustments strong {
    color:#17365d;
}
/* NIMBLE-MFG-PAYMENT-RECONCILIATION-D5-END */

/* NIMBLE-MFG-RECONCILIATION-POPUP-UAT-BEGIN
 * Payment and balance-adjustment reversals must appear immediately as a centered
 * application popup rather than rendering at the bottom of the Order workspace.
 */
.nimble-modal-backdrop {
    position:fixed;
    inset:0;
    z-index:2000;
    background:rgba(11,45,92,.52);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}
.nimble-modal-dialog {
    width:min(560px,100%);
    max-height:calc(100vh - 48px);
    overflow:auto;
    background:#fff;
    border:1px solid var(--portal-border);
    border-radius:16px;
    box-shadow:0 24px 70px rgba(15,23,42,.28);
}
.nimble-modal-header {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:20px 22px;
    border-bottom:1px solid var(--portal-border);
}
.nimble-modal-body { padding:22px; }
.nimble-modal-footer {
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:16px 22px;
    border-top:1px solid var(--portal-border);
    background:#f8fafc;
}
@media (max-width: 575.98px) {
    .nimble-modal-backdrop { padding:12px; }
    .nimble-modal-header,
    .nimble-modal-body,
    .nimble-modal-footer { padding-left:16px; padding-right:16px; }
}
/* NIMBLE-MFG-RECONCILIATION-POPUP-UAT-END */
