/* ============================================================
   RRV3 STYLES — Modules (Greeting + Notifications + JC + AI + Ref Price)
   VERSION: 2.1 (extracted from rrv3-styles.css)
   DATE: 23-06-2026

   Contains:
     - User greeting cards (role-specific)
     - Real-time notification alert system
     - Job Costing module styles
     - AI item-match verdict badge
     - ref_price provenance label

   Loaded AFTER rrv3-styles-core.css (for CSS custom properties).

   ============================================================ */

/* ============================================================
   USER GREETING CARD ROLE-SPECIFIC STYLES (semantic identity)
   ============================================================ */
.rrv3-user-greeting-card {
    display: flex !important;
    align-items: center !important;
    padding: 20px 26px !important;
    border-radius: var(--rr-radius-lg) !important;
    margin-bottom: 25px !important;
    border-left: 6px solid var(--rr-border) !important; /* thicker accent */
    background: var(--rr-bg) !important;
    box-shadow: var(--rr-shadow-md) !important; /* stronger lift */
    box-sizing: border-box !important;
}

.greeting-card-icon {
    font-size: 31px !important;            /* +~30% (24 -> 31) */
    margin-right: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.greeting-card-content {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
}

.greeting-card-label {
    font-size: 14px !important;            /* +~30% (11 -> 14) */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: var(--rr-text-muted) !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 5px !important;
}

.greeting-card-user {
    font-size: 20px !important;            /* +~33% (15 -> 20) */
    font-weight: 600 !important;
    color: var(--rr-text) !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.greeting-username { font-weight: 700 !important; color: var(--rr-text) !important; }

.rrv3-greeting-sbu-badge {
    display: inline-block !important;
    font-size: 14px !important;            /* +~30% (11 -> 14) */
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
}

/* Role theme overrides (backgrounds deepened one tier for stronger contrast
   against the off-white app background) */
.greeting-role-requester { background: #dbeafe !important; border-left-color: #3b82f6 !important; }
.greeting-role-requester .greeting-card-label { color: #2563eb !important; }
.greeting-role-requester .rrv3-greeting-sbu-badge { background-color: #dbeafe !important; color: #1e40af !important; }

.greeting-role-sbu-head { background: #d1fae5 !important; border-left-color: #10b981 !important; }
.greeting-role-sbu-head .greeting-card-label { color: #059669 !important; }
.greeting-role-sbu-head .rrv3-greeting-sbu-badge { background-color: #d1fae5 !important; color: #065f46 !important; }

.greeting-role-pet-centre { background: #fef3c7 !important; border-left-color: #f59e0b !important; }
.greeting-role-pet-centre .greeting-card-label { color: #d97706 !important; }
.greeting-role-pet-centre .rrv3-greeting-sbu-badge { background-color: #fef3c7 !important; color: #92400e !important; }

.greeting-role-purchasing { background: #f3e8ff !important; border-left-color: #a855f7 !important; }
.greeting-role-purchasing .greeting-card-label { color: #7c3aed !important; }
.greeting-role-purchasing .rrv3-greeting-sbu-badge { background-color: #f3e8ff !important; color: #6b21a8 !important; }

.greeting-role-admin { background: var(--rr-ice) !important; border-left-color: var(--rr-navy) !important; }
.greeting-role-admin .greeting-card-label { color: var(--rr-navy) !important; }
.greeting-role-admin .rrv3-greeting-sbu-badge { background-color: var(--rr-ice) !important; color: var(--rr-navy) !important; }

.greeting-role-sales { background: #fce7f3 !important; border-left-color: #eb2f96 !important; }
.greeting-role-sales .greeting-card-label { color: #c41d7f !important; }
.greeting-role-sales .rrv3-greeting-sbu-badge { background-color: #ffd6e7 !important; color: #9e1066 !important; }

/* ============================================================
   REAL-TIME NOTIFICATION ALERT SYSTEM STYLES
   (semantic type colors preserved)
   ============================================================ */

.rrv3-header { justify-content: space-between; }
.rrv3-header-actions { display: flex; align-items: center; }
.rrv3-bell-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.rrv3-bell-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}
.bell-icon { font-size: 20px; line-height: 1; }
.bell-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: var(--rr-white);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 9999px;
    border: 2px solid var(--rr-navy);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: pulseBadge 2s infinite;
}
@keyframes pulseBadge {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Master Slide-out Drawer */
.rrv3-notif-drawer {
    position: fixed;
    top: 0; right: -440px;
    width: 400px; max-width: 90vw;
    height: 100vh;
    background: var(--rr-white);
    box-shadow: -5px 0 30px rgba(0, 40, 85, 0.18);
    z-index: 999999;
    display: flex; flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--rr-border);
}
.rrv3-notif-drawer.open { right: 0; }
.rrv3-notif-drawer-head {
    padding: 18px 22px;
    background: var(--rr-bg);
    border-bottom: 1px solid var(--rr-border);
    display: flex; justify-content: space-between; align-items: center;
}
.rrv3-notif-drawer-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--rr-text); }
.drawer-head-actions { display: flex; align-items: center; gap: 12px; }
.rrv3-drawer-close { font-size: 26px; line-height: 1; color: var(--rr-text-muted); cursor: pointer; transition: color 0.15s; font-weight: bold; }
.rrv3-drawer-close:hover { color: var(--rr-text); }
.rrv3-notif-drawer-body {
    flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--rr-bg);
}
.rrv3-notif-empty { text-align: center; padding: 30px 20px; color: var(--rr-text-muted); font-size: 13px; font-weight: 500; }

/* Notification Tray Cards */
.rrv3-notif-card {
    background: var(--rr-white);
    border: 1px solid var(--rr-border);
    border-radius: var(--rr-radius-lg);
    padding: 14px 16px;
    display: flex; gap: 12px; align-items: flex-start;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--rr-shadow-sm);
}
.rrv3-notif-card:hover {
    border-color: var(--rr-blue);
    box-shadow: var(--rr-shadow-md);
    transform: translateY(-1px);
}
.rrv3-notif-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.notif-type-info::before    { background: #3b82f6; }
.notif-type-success::before { background: #10b981; }
.notif-type-warning::before { background: #f59e0b; }
.notif-type-danger::before  { background: #ef4444; }

.notif-unread { background: #f0fdf4; border-color: #bbf7d0; }
.notif-unread .rrv3-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rr-blue); margin-top: 5px; flex-shrink: 0; }
.notif-read { opacity: 0.85; }
.notif-read .rrv3-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rr-text-muted); margin-top: 5px; flex-shrink: 0; }
.rrv3-notif-content { flex: 1; font-size: 12.5px; color: var(--rr-text); }
.rrv3-notif-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.rrv3-notif-head strong { font-size: 13.5px; color: var(--rr-text); }
.notif-ref-badge { background: var(--rr-bg); color: var(--rr-text); font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.rrv3-notif-msg { color: var(--rr-text); line-height: 1.45; margin-bottom: 6px; }
.rrv3-notif-meta { font-size: 11px; color: var(--rr-text-muted); }

/* Dashboard Activity Banner */
.rrv3-activity-banner {
    background: var(--rr-white);
    border: 1px solid var(--rr-border);
    border-radius: var(--rr-radius-lg);
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--rr-shadow-sm);
    animation: slideDownToast 0.3s ease-out;
    border-left: 5px solid var(--rr-blue);
}
@keyframes slideDownToast {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.banner-type-success { border-left-color: #10b981; background: #f0fdf4; }
.banner-type-warning { border-left-color: #f59e0b; background: #fffbeb; }
.banner-type-danger  { border-left-color: #ef4444; background: #fef2f2; }
.banner-icon { font-size: 22px; flex-shrink: 0; }
.banner-info { flex: 1; font-size: 13px; color: var(--rr-text); }
.banner-info strong { font-weight: 800; color: var(--rr-text); }
.banner-time { font-size: 11.5px; color: var(--rr-text-muted); margin-left: 6px; }
.banner-action { display: flex; align-items: center; gap: 10px; }
.banner-dismiss-btn { margin: 0; }

/* Google Drive Drag & Drop Dropzone Styles */
.rrv3-gdrive-dropzone {
    border: 2px dashed var(--rr-border);
    border-radius: var(--rr-radius);
    padding: 14px 18px;
    background: var(--rr-bg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    user-select: none;
    margin-top: 8px;
}
.rrv3-gdrive-dropzone:hover { border-color: var(--rr-blue); background: var(--rr-blue-soft); }
.rrv3-gdrive-dropzone.dragover { border-color: var(--rr-blue); background: #e0e7ff; transform: scale(1.01); }
.rrv3-gdrive-dropzone.uploading { border-color: #10b981; background: #ecfdf5; cursor: wait; pointer-events: none; }
.dropzone-icon { font-size: 26px; line-height: 1; }
.dropzone-text { font-size: 12.5px; color: var(--rr-text); }
.dropzone-text strong { color: var(--rr-text); }
.dropzone-hint { font-size: 11px; color: var(--rr-text-muted); }
.dropzone-progress { font-size: 12.5px; color: #065f46; font-weight: 600; padding: 6px; }

/* ============================================================
   JOB COSTING MODULE STYLES
   ============================================================ */

/* Status badges (semantic) */
.jc-status-draft     { background-color: #f59e0b; }
.jc-status-finalized { background-color: #16a34a; }

/* Line item tables */
.jc-line-table input[type="text"],
.jc-line-table input[type="number"] {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--rr-border);
    border-radius: 5px;
    font-size: 12px;
    box-sizing: border-box;
    background: var(--rr-white);
    color: var(--rr-text);
}
.jc-line-table input:focus {
    border-color: var(--rr-blue);
    box-shadow: 0 0 0 2px rgba(0, 136, 255, 0.12);
    outline: none;
    background: var(--rr-white);
}
.jc-line-table input:disabled {
    background: var(--rr-bg);
    color: var(--rr-text-muted);
    border-color: var(--rr-border);
}
.jc-line-table .jc-cell-total {
    font-weight: 700;
    text-align: right;
    color: var(--rr-text);
    padding-right: 12px;
}
.jc-mini-table { margin-bottom: 8px; }
.jc-subsection-title { margin: 16px 0 6px; font-size: 13px; color: var(--rr-text); font-weight: 700; }
.jc-add-actions { display: flex; gap: 8px; margin-top: 8px; }

/* Summary section layout */
.jc-summary-section { background: var(--rr-bg); }
.jc-summary-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) { .jc-summary-grid { grid-template-columns: 1fr; } }

/* Settings panel */
.jc-settings-panel h2 { margin-bottom: 14px; }
.jc-contingency-toggle { display: flex; gap: 16px; margin-bottom: 8px; }
.jc-contingency-toggle label {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: var(--rr-text); cursor: pointer;
}
.jc-contingency-input {
    width: 100%; padding: 8px 11px; border: 1px solid var(--rr-border); border-radius: var(--rr-radius);
    font-size: 13px; background: var(--rr-white); color: var(--rr-text);
}

/* Totals box */
.jc-totals-box {
    background: var(--rr-white);
    border: 1px solid var(--rr-border);
    border-radius: var(--rr-radius-lg);
    padding: 18px 22px;
    box-shadow: var(--rr-shadow-sm);
}
.jc-total-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: 13px; color: var(--rr-text);
}
.jc-total-row .jc-val { font-weight: 600; color: var(--rr-text); font-variant-numeric: tabular-nums; }
.jc-divider-row { border-top: 1px solid var(--rr-border); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.jc-grand-total { border-top: 2px solid var(--rr-border); margin-top: 4px; padding-top: 10px; font-size: 15px; font-weight: 800; color: var(--rr-text); }
.jc-grand-total .jc-val { font-size: 17px; color: var(--rr-text); }
.jc-calc-selling { background: var(--rr-blue-soft); margin: 4px -6px; padding: 8px 6px; border-radius: 6px; font-weight: 700; color: var(--rr-blue); }
.jc-calc-selling .jc-val { color: var(--rr-blue); font-size: 15px; }
.jc-revised-row { flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 0; }
.jc-revised-row label { font-size: 11.5px; font-weight: 600; color: var(--rr-text-muted); }
.jc-revised-row input {
    width: 100%; padding: 7px 10px; border: 1px solid #fbbf24; border-radius: 6px;
    font-size: 14px; font-weight: 700; color: #92400e; background: #fffbeb;
}
.jc-revised-row input:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12); outline: none; }
.jc-final-price { border-top: 2px solid #059669; margin-top: 4px; padding-top: 10px; font-size: 16px; font-weight: 800; color: #059669; background: #ecfdf5; margin: 6px -6px 0; padding: 12px 6px; border-radius: var(--rr-radius); }
.jc-final-price .jc-val { color: #059669; font-size: 18px; }

/* Actions bar */
.jc-actions-bar { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding: 16px 0; }

/* Job Costing print styles */
@media print {
    body * { visibility: hidden !important; }
    .jc-builder, .jc-builder * { visibility: visible !important; }
    .jc-builder { position: absolute !important; left: 0; top: 0; width: 100% !important; margin: 0 !important; padding: 0 20px !important; }
    .no-print, .rrv3-header, #wpadminbar, .rrv3-page-header a { display: none !important; }
    .rrv3-section { box-shadow: none !important; border: none !important; page-break-inside: avoid; }
    .jc-line-table input { border: none !important; background: transparent !important; padding: 2px 0 !important; }
    .jc-totals-box { box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* AI PO AUTOFILL STYLES */
.po-ai-filled {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
    transition: all 0.3s ease-in-out;
}
.po-ai-pulse {
    animation: po-ai-pulse-anim 1.5s ease-in-out 2;
}
@keyframes po-ai-pulse-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   CHUNK 4: AI item-match verdict badge + extracted line items
   Shown inside #page-po-match-result on the Enter PO Info page
   after the AI scans the PO document. Colors:
     green  = similar (matches requested item)
     yellow = different (possible wrong item)
     red    = no_match (likely wrong PO)
     grey   = unrated
   ============================================================ */
#page-po-match-result {
    margin-top: 10px;
}
.po-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    line-height: 1.2;
}
.po-match-icon {
    font-size: 15px;
    font-weight: 900;
}
.po-match-good    { background: #f0fdf4; color: #166534; border-color: #86efac; }
.po-match-warn    { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.po-match-bad     { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.po-match-neutral { background: #f8fafc; color: #475569; border-color: #cbd5e1; }
.po-match-note {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--rr-text-muted);
    font-style: italic;
    line-height: 1.4;
}
.po-line-items {
    margin-top: 10px;
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
}
.po-line-items-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}
.po-line-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.po-line-table thead th {
    background: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
    border-bottom: 2px solid #cbd5e1;
    text-align: left;
}
.po-line-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--rr-text);
    vertical-align: middle;
}
.po-line-num   { text-align: center; color: var(--rr-text-muted); width: 32px; }
.po-line-name  { text-align: left; }
.po-line-match { text-align: left; white-space: nowrap; width: 1%; }
.po-line-qty   { text-align: center; white-space: nowrap; color: var(--rr-text-muted); width: 60px; }
.po-line-price { text-align: right; white-space: nowrap; font-weight: 700; width: 90px; }
.po-line-h-num { text-align: center !important; width: 32px; }
.po-line-h-qty { text-align: center !important; width: 60px; }
.po-line-h-price { text-align: right !important; width: 90px; }
.po-line-total-row { background: #f8fafc; }
.po-line-total-label { text-align: right; color: #475569; font-weight: 700; font-size: 11.5px; }
.po-line-total-amount { text-align: right !important; }


/* CHUNK B: per-line match indicators + row tint */
.po-line-matched   { background: #f0fdf4; }
.po-line-unmatched { background: #fffbeb; }
.po-line-tag { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.po-line-tag-ok   { background: #dcfce7; color: #166534; }
.po-line-tag-warn { background: #fef3c7; color: #92400e; }

/* ============================================================
   CHUNK 6: ref_price provenance label (catalog list + edit form)
   ============================================================ */
.price-src {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 6px;
    font-size: 9.5px;
    font-weight: 700;
    border-radius: 3px;
    line-height: 1.5;
    white-space: nowrap;
}
.price-src-text { letter-spacing: 0.2px; }
.price-src-manual { background: #e0f2fe; color: #075985; }
.price-src-quote  { background: #dcfce7; color: #166534; }
.price-src-po     { background: #ffedd5; color: #9a3412; }

/* REQUISITION CARD STYLING REFINEMENTS */
.rrv3-card-section {
    border-radius: var(--rr-radius);
    transition: transform 0.2s, box-shadow 0.2s;
}
.rrv3-card-section:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.rrv3-spec-item {
    background: #fff;
    border: 1px solid var(--rr-border);
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}
.rrv3-quote-row {
    transition: transform 0.15s, background-color 0.15s;
}
.rrv3-quote-row:hover {
    transform: translateY(-1px);
    background-color: #fffbeb !important;
}
.rrv3-quote-row.rrv3-quote-selected:hover {
    background-color: #f0fdf4 !important;
}
.rrv3-procurement-detail-block {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

/* Responsive Overrides for grids inside cards on mobile devices */
@media (max-width: 600px) {
    .rrv3-specs-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .rrv3-procurement-grid {
        grid-template-columns: 1fr !important;
    }
    .rrv3-quote-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
}


/* Greeting card right-aligned user photo/avatar */
.rrv3-user-greeting-card .greeting-card-content {
    flex: 1 1 auto !important;
}
.greeting-card-photo-wrap {
    margin-left: auto !important;
    margin-top: -42px !important;
    margin-bottom: -16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
}
.greeting-user-photo {
    width: 106px !important;
    height: 106px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    overflow: hidden !important;
    border: 3px solid rgba(255,255,255,0.9) !important;
    box-shadow: 0 6px 14px rgba(0, 40, 85, 0.16) !important;
    background: var(--rr-white) !important;
}
.greeting-user-photo-placeholder {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--rr-blue) !important;
    background: var(--rr-white) !important;
    font-weight: 800 !important;
    font-size: 20px !important;
    letter-spacing: 0.03em !important;
}
@media (max-width: 640px) {
    .greeting-card-photo-wrap {
        margin-top: -28px !important;
        margin-bottom: -12px !important;
    }
    .greeting-user-photo {
        width: 90px !important;
        height: 90px !important;
        font-size: 24px !important;
    }
}

/* P.E.T. Fulfill (Add to DN) stock confirmation fields */
#dn-modal-items-table .dn-actual-stock-input,
#dn-modal-items-table .dn-stock-note-input {
    width: 100% !important;
    min-width: 110px !important;
    box-sizing: border-box !important;
}
#dn-modal-items-table .dn-stock-note-input {
    min-width: 180px !important;
}

/* ============================================================
   P.E.T. Partial / Mixed Processing modal readability upgrade
   ============================================================ */
.rrv3-partial-mixed-content {
    max-width: 940px !important;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 38%) !important;
}
.pm-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin: -4px 0 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
    border: 1px solid #bfdbfe;
}
.pm-hero-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(30, 64, 175, 0.12);
    font-size: 28px;
    flex: 0 0 auto;
}
.pm-hero .rrv3-modal-title {
    margin: 0 0 4px !important;
}
.pm-hero p,
.pm-muted {
    margin: 0;
    color: var(--rr-text-muted);
    line-height: 1.45;
}
.pm-helper-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.pm-helper-strip span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--rr-border);
    color: var(--rr-blue-dark);
    font-size: 12px;
    font-weight: 800;
}
.pm-card {
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--rr-shadow-sm);
}
.pm-card-title {
    margin-bottom: 10px;
    color: var(--rr-blue-dark);
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 12px;
}
.pm-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}
.pm-summary-grid > div {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--rr-bg);
    border: 1px solid var(--rr-border);
}
.pm-summary-grid strong,
.pm-summary-grid span {
    display: block;
}
.pm-summary-grid strong {
    margin-bottom: 4px;
    color: var(--rr-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pm-summary-grid span {
    color: var(--rr-text);
    font-weight: 800;
}
.pm-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.pm-action-box {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    border: 2px solid var(--rr-border);
    background: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.pm-action-box:hover {
    transform: translateY(-1px);
    box-shadow: var(--rr-shadow-md);
}
.pm-action-icon {
    font-size: 24px;
}
.pm-action-box strong {
    color: var(--rr-blue-dark);
}
.pm-action-box small {
    color: var(--rr-text-muted);
}
.pm-action-box input {
    margin-top: 6px;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-align: center;
}
.pm-fulfill-box { border-color: #86efac; background: #f0fdf4; }
.pm-purchase-box { border-color: #93c5fd; background: #eff6ff; }
.pm-reject-box { border-color: #fca5a5; background: #fef2f2; }
.pm-details-card .rrv3-form-row,
.pm-stock-card .rrv3-form-row {
    margin-bottom: 0 !important;
}
.pm-reason-group {
    margin-top: 12px !important;
}
.pm-footer {
    position: static !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    background: transparent !important;
    border-top: 1px solid var(--rr-border);
    margin-top: 12px !important;
    padding-top: 14px !important;
}
.pm-footer .rrv3-button,
.pm-footer button {
    margin: 0 !important;
    min-width: 150px;
}
.pm-inline-reason-label {
    display: block;
    margin-top: 8px;
    color: #991b1b;
    font-weight: 800;
    font-size: 12px;
}
.pm-inline-reason-label small {
    display: block;
    margin-top: 2px;
    color: #b91c1c;
    font-weight: 600;
}
.pm-reject-box textarea {
    width: 100% !important;
    min-height: 78px !important;
    box-sizing: border-box !important;
    resize: vertical;
    border-color: #fca5a5 !important;
    background: #fff !important;
}
@media (max-width: 640px) {
    .pm-hero { align-items: flex-start; }
    .pm-hero-icon { width: 44px; height: 44px; font-size: 22px; }
    .pm-action-grid { grid-template-columns: 1fr; }
}


.pm-total-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 2px solid var(--rr-border);
    background: #fff;
    transition: all 0.18s ease;
}
.pm-total-card strong,
.pm-total-card span {
    display: block;
}
.pm-total-card strong {
    margin-bottom: 4px;
    color: var(--rr-blue-dark);
    font-size: 13px;
}
#pm-total-message {
    color: var(--rr-text-muted);
    font-weight: 700;
}
.pm-total-numbers {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--rr-bg);
    font-weight: 900;
    color: var(--rr-blue-dark);
    white-space: nowrap;
}
.pm-total-ok {
    border-color: #22c55e;
    background: #f0fdf4;
}
.pm-total-ok #pm-total-message,
.pm-total-ok .pm-total-numbers {
    color: #15803d;
}
.pm-total-error {
    border-color: #ef4444;
    background: #fef2f2;
}
.pm-total-error #pm-total-message,
.pm-total-error .pm-total-numbers {
    color: #b91c1c;
}
@media (max-width: 640px) {
    .pm-total-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ============================================================
   Fulfill (Add to DN) modal readability upgrade
   ============================================================ */
.rrv3-fulfill-dn-content {
    max-width: 1080px !important;
}
.dn-fulfill-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    border: 1px solid #bbf7d0;
    box-shadow: var(--rr-shadow-sm);
}
.dn-fulfill-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 16px;
    background: #fff;
    font-size: 28px;
    box-shadow: 0 8px 18px rgba(21, 128, 61, 0.12);
}
.dn-fulfill-hero strong,
.dn-fulfill-hero span {
    display: block;
}
.dn-fulfill-hero strong {
    color: var(--rr-blue-dark);
    font-size: 16px;
    margin-bottom: 3px;
}
.dn-fulfill-hero span {
    color: var(--rr-text-muted);
    line-height: 1.45;
}
.dn-fulfill-details {
    padding: 14px !important;
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--rr-shadow-sm);
}
.dn-fulfill-items-card {
    border-radius: 16px !important;
    border: 1px solid var(--rr-border) !important;
    background: #fff !important;
    box-shadow: var(--rr-shadow-sm) !important;
}
.dn-fulfill-items-card h3 {
    margin-top: 0 !important;
    color: var(--rr-blue-dark) !important;
    font-weight: 900 !important;
}
.dn-fulfill-items-card .rrv3-table {
    font-size: 12px;
}
.dn-fulfill-items-card .rrv3-table th {
    white-space: nowrap;
}
.dn-fulfill-form-card {
    padding: 14px 16px;
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: #f8fafc;
    box-shadow: var(--rr-shadow-sm);
}
.dn-fulfill-form-card .rrv3-form-group {
    margin-bottom: 0 !important;
}
.dn-fulfill-form-card label {
    color: var(--rr-blue-dark) !important;
    font-weight: 900 !important;
}
#dn-modal-items-table input[type="number"],
#dn-modal-items-table input[type="text"] {
    border-radius: 10px !important;
    border: 1px solid var(--rr-border) !important;
    padding: 8px 10px !important;
}
#dn-modal-items-table input:disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}
@media (max-width: 720px) {
    .dn-fulfill-hero {
        align-items: flex-start;
    }
    .dn-fulfill-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

/* ============================================================
   Loan + PO modal readability upgrade
   ============================================================ */
.rrv3-loan-content {
    max-width: 620px !important;
}
.loan-modal-hero,
.po-modal-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--rr-border);
    box-shadow: var(--rr-shadow-sm);
}
.loan-modal-hero {
    background: linear-gradient(135deg, #ecfdf5, #f8fafc);
    border-color: #bbf7d0;
}
.po-modal-hero {
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    border-color: #bfdbfe;
}
.loan-modal-icon,
.po-modal-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 16px;
    background: #fff;
    font-size: 28px;
    box-shadow: 0 8px 18px rgba(0, 40, 85, 0.12);
}
.loan-modal-hero strong,
.loan-modal-hero span,
.po-modal-hero strong,
.po-modal-hero span {
    display: block;
}
.loan-modal-hero strong,
.po-modal-hero strong {
    color: var(--rr-blue-dark);
    font-size: 16px;
    margin-bottom: 3px;
}
.loan-modal-hero span,
.po-modal-hero span {
    color: var(--rr-text-muted);
    line-height: 1.45;
}
.loan-form-card,
.po-form-card,
.po-requested-card,
.po-ai-card {
    padding: 16px 18px !important;
    border: 1px solid var(--rr-border) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: var(--rr-shadow-sm) !important;
}
.loan-form-card .rrv3-form-group:last-child,
.po-form-card .rrv3-form-group:last-child {
    margin-bottom: 0 !important;
}
.po-ai-card {
    border-left: 5px solid var(--rr-blue) !important;
    background: linear-gradient(135deg, #eff6ff, #ffffff) !important;
}
.po-requested-card {
    border-left: 5px solid #22c55e !important;
    background: #f0fdf4 !important;
}
.rrv3-po-content {
    max-width: 920px !important;
}
.rrv3-po-content .gdrive-dropzone,
.rrv3-po-content .rrv3-gdrive-dropzone {
    margin-top: 10px !important;
    border-radius: 14px !important;
}
.rrv3-po-content .rrv3-modal-footer,
.rrv3-loan-content .rrv3-modal-footer {
    justify-content: flex-end !important;
}
@media (max-width: 640px) {
    .loan-modal-hero,
    .po-modal-hero {
        align-items: flex-start;
    }
    .loan-modal-icon,
    .po-modal-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

/* ============================================================
   User admin modals: edit/profile/export/batch upload
   ============================================================ */
.rrv3-user-edit-content,
.rrv3-user-profile-content,
.rrv3-user-export-content {
    max-width: 760px !important;
}
.rrv3-user-batch-content {
    max-width: 1080px !important;
}
.user-modal-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #bfdbfe;
    box-shadow: var(--rr-shadow-sm);
}
.user-modal-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 16px;
    background: #fff;
    font-size: 28px;
    box-shadow: 0 8px 18px rgba(0, 40, 85, 0.12);
}
.user-modal-hero strong,
.user-modal-hero span {
    display: block;
}
.user-modal-hero strong {
    color: var(--rr-blue-dark);
    font-size: 16px;
    margin-bottom: 3px;
}
.user-modal-hero span {
    color: var(--rr-text-muted);
    line-height: 1.45;
}
.user-modal-card,
.user-upload-template-card,
.user-upload-drop-card,
#users-batch-preview-wrap,
#users-batch-result {
    padding: 16px 18px !important;
    border: 1px solid var(--rr-border) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: var(--rr-shadow-sm) !important;
}
.user-upload-template-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px !important;
    background: linear-gradient(135deg, #f0fdf4, #fff) !important;
    border-color: #bbf7d0 !important;
}
.user-upload-drop-card {
    border: 2px dashed #93c5fd !important;
    text-align: center !important;
    background: #eff6ff !important;
    margin-bottom: 16px !important;
}
.user-upload-drop-card label {
    display: block !important;
    font-weight: 900 !important;
    margin-bottom: 10px !important;
    cursor: pointer;
    color: var(--rr-blue-dark) !important;
}
.user-upload-drop-card input[type="file"] {
    margin: 0 auto !important;
    max-width: 100%;
}
.rrv3-export-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.rrv3-export-type-options label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 10px;
    border: 1px solid var(--rr-border);
    border-radius: 12px;
    background: var(--rr-bg);
    font-weight: 700 !important;
    cursor: pointer;
}
.rrv3-export-type-options input[type="radio"] {
    width: auto !important;
    margin: 0 !important;
}
.rrv3-user-profile-card {
    border-radius: 18px !important;
    background: linear-gradient(135deg, #eff6ff, #ffffff) !important;
    box-shadow: var(--rr-shadow-sm) !important;
}
.rrv3-profile-detail-grid > div {
    border-radius: 14px !important;
    box-shadow: var(--rr-shadow-sm);
}
#users-batch-preview-wrap h3 {
    margin-top: 0 !important;
    color: var(--rr-blue-dark) !important;
}
@media (max-width: 640px) {
    .user-modal-hero { align-items: flex-start; }
    .user-modal-icon { width: 44px; height: 44px; font-size: 22px; }
    .rrv3-export-type-options { grid-template-columns: 1fr; }
}

/* ============================================================
   Database wipe + stock action/history modal styling
   ============================================================ */
.rrv3-database-wipe-content,
.rrv3-stock-action-content {
    max-width: 720px !important;
}
.rrv3-stock-history-content {
    max-width: 980px !important;
}
.wipe-modal-hero,
.stock-modal-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: var(--rr-shadow-sm);
}
.wipe-modal-hero {
    background: linear-gradient(135deg, #fef2f2, #fff7ed);
    border: 1px solid #fecaca;
}
.stock-modal-hero {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #bfdbfe;
}
.wipe-modal-icon,
.stock-modal-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 16px;
    background: #fff;
    font-size: 28px;
    box-shadow: 0 8px 18px rgba(0, 40, 85, 0.12);
}
.wipe-modal-hero strong,
.wipe-modal-hero span,
.stock-modal-hero strong,
.stock-modal-hero span {
    display: block;
}
.wipe-modal-hero strong {
    color: #991b1b;
    font-size: 16px;
    margin-bottom: 3px;
}
.stock-modal-hero strong {
    color: var(--rr-blue-dark);
    font-size: 16px;
    margin-bottom: 3px;
}
.wipe-modal-hero span,
.stock-modal-hero span {
    color: var(--rr-text-muted);
    line-height: 1.45;
}
.wipe-warning-text {
    border-left-color: #dc2626 !important;
    background: #fef2f2 !important;
}
.wipe-summary-card,
.wipe-options-card,
.stock-form-card,
.stock-history-card,
.stock-current-card {
    padding: 16px 18px !important;
    border: 1px solid var(--rr-border) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: var(--rr-shadow-sm) !important;
}
.wipe-summary-card {
    border-color: #fecaca !important;
    background: #fff7f7 !important;
}
#wipe-summary-list {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 12.5px;
    line-height: 1.5;
}
.wipe-options-card .rrv3-form-group:last-child,
.stock-form-card .rrv3-form-group:last-child {
    margin-bottom: 0 !important;
}
#wipe-confirm-text {
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-color: #fca5a5 !important;
}
.stock-current-card {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px !important;
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #166534;
    font-weight: 800;
}
.stock-form-card select,
.stock-form-card input,
.stock-form-card textarea {
    border-radius: 10px !important;
}
.stock-history-card {
    overflow-x: auto;
}
#stock-history-table th {
    white-space: nowrap;
}
@media (max-width: 640px) {
    .wipe-modal-hero,
    .stock-modal-hero {
        align-items: flex-start;
    }
    .wipe-modal-icon,
    .stock-modal-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

/* ============================================================
   Database wipe collapsible module groups
   ============================================================ */
.wipe-modules-list {
    display: grid;
    gap: 10px;
}
.wipe-module-group {
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--rr-shadow-sm);
    overflow: hidden;
}
.wipe-module-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    padding: 13px 16px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    color: var(--rr-blue-dark);
    font-weight: 900;
}
.wipe-module-group summary::-webkit-details-marker {
    display: none;
}
.wipe-module-group summary::after {
    content: '＋';
    color: var(--rr-blue);
    font-size: 18px;
    margin-left: 6px;
}
.wipe-module-group[open] summary::after {
    content: '−';
}
.wipe-group-title {
    flex: 1;
}
.wipe-group-count {
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--rr-blue-soft);
    color: var(--rr-blue);
    font-size: 12px;
    white-space: nowrap;
}
.wipe-group-items {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--rr-border);
    background: #f8fafc;
}
.wipe-module-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--rr-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.wipe-module-row:hover {
    border-color: var(--rr-blue);
    box-shadow: var(--rr-shadow-sm);
}
.wipe-module-row input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.wipe-module-label {
    font-weight: 900;
    color: var(--rr-blue-dark);
}
.wipe-module-tables {
    color: var(--rr-text-muted);
    font-size: 11.5px;
    overflow-wrap: anywhere;
}
.wipe-module-count {
    justify-self: end;
    color: var(--rr-text-muted);
    font-weight: 800;
    white-space: nowrap;
}
@media (max-width: 760px) {
    .wipe-module-row {
        grid-template-columns: auto 1fr;
    }
    .wipe-module-tables,
    .wipe-module-count {
        grid-column: 2;
        justify-self: start;
    }
}

/* Sales quotation line item readability */
#quotation-items-table {
    table-layout: auto !important;
}
#quotation-items-table .quote-desc-cell {
    width: 52% !important;
    min-width: 360px !important;
}
#quotation-items-table .quote-description-input {
    width: 100% !important;
    min-height: 42px !important;
    resize: vertical !important;
    overflow: hidden !important;
    line-height: 1.45 !important;
    white-space: pre-wrap !important;
}
#quotation-items-table .qty-input,
#quotation-items-table .price-input {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}
#quotation-items-table .item-amount,
#quote-grand-total {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Sales Client management UI */
.rrv3-clients-panel .rrv3-page-header {
    margin-bottom: 14px;
}
.rrv3-clients-panel #client-form-wrap {
    margin-bottom: 18px;
}
.rrv3-clients-panel #clients-table td,
.rrv3-clients-panel #clients-table th {
    vertical-align: middle;
}
.rrv3-clients-panel textarea {
    resize: vertical;
}

/* Quotation client selector */
#quote-client-select {
    font-weight: 700;
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
}

/* Quotation Settings tab */
.rrv3-quotation-settings-panel .rrv3-section {
    border-radius: 16px;
    box-shadow: var(--rr-shadow-sm);
}
.rrv3-quotation-settings-panel .rrv3-info-box {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--rr-blue-dark);
}
.rrv3-quotation-settings-panel textarea {
    resize: vertical;
}


/* Quotation bottom actions */
.rrv3-quote-bottom-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--rr-border);
}
.rrv3-quote-bottom-actions .quote-action-tab-title,
.rrv3-quote-bottom-actions .quote-action-tab-hint {
    display: none;
}

/* Quotation Settings preset libraries */
.quote-preset-library {
    margin-top: 18px;
}
.quote-preset-form {
    padding: 14px 16px;
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: #f8fafc;
    margin-bottom: 14px;
}
.quote-preset-button-group {
    display: flex;
    align-items: flex-end;
}
.quote-preset-button-group .rrv3-button {
    width: 100%;
}
.quote-presets-table td,
.quote-presets-table th {
    vertical-align: top;
}

/* New Requisition custom item styled like catalog item form */
.rrv3-custom-catalog-style {
    padding: 16px 18px !important;
    border-radius: 18px !important;
    border: 1px solid var(--rr-border) !important;
    background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
    box-shadow: var(--rr-shadow-sm) !important;
}
.rrv3-custom-catalog-style .rrv3-custom-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.custom-catalog-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border: 1px solid #bfdbfe;
}
.custom-catalog-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #fff;
    font-size: 22px;
    box-shadow: var(--rr-shadow-sm);
}
.custom-catalog-hero strong,
.custom-catalog-hero span {
    display: block;
}
.custom-catalog-hero strong {
    color: var(--rr-blue-dark);
    margin-bottom: 2px;
}
.custom-catalog-hero span {
    color: var(--rr-text-muted);
    line-height: 1.4;
}
.rrv3-custom-catalog-style .custom-name-group {
    flex: 2 1 360px;
}
.rrv3-custom-catalog-style textarea {
    width: 100%;
    resize: vertical;
}
.custom-quotation-group {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

/* Quotation title and unit column */
.quote-title-above-items {
    margin: 18px 0 10px;
    padding: 12px 14px;
    border-left: 5px solid var(--rr-blue);
    border-radius: 10px;
    background: #eff6ff;
    color: var(--rr-blue-dark);
    font-size: 16px;
    font-weight: 900;
}
#quotation-items-table .quote-unit-select {
    min-width: 92px;
}

/* Quotation print restriction before approval */
@media print {
    .rrv3-quote-print-view.quotation-not-approved .rrv3-quote-document {
        display: none !important;
    }
    .rrv3-quote-print-view.quotation-not-approved::before {
        content: 'Printing disabled until SBU Head approval.';
        display: block !important;
        visibility: visible !important;
        font-size: 22px;
        font-weight: 900;
        color: #b91c1c;
        padding: 40px;
    }
}

/* Quotation Job Costing picker modal */
.quote-selected-job-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: #fff7ed;
    box-shadow: var(--rr-shadow-sm);
}
.quote-selected-job-card.has-selection {
    background: #f0fdf4;
    border-color: #86efac;
}
.quote-selected-job-card strong,
.quote-selected-job-card span {
    display: block;
}
.quote-selected-job-card strong {
    color: var(--rr-blue-dark);
    margin-bottom: 3px;
}
.quote-selected-job-card span {
    color: var(--rr-text-muted);
    font-size: 12.5px;
}
.quote-job-picker-content {
    max-width: 980px !important;
}
.quote-job-picker-list {
    display: grid;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
}
.quote-job-picker-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--rr-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--rr-shadow-sm);
}
.quote-job-picker-card strong,
.quote-job-picker-card span,
.quote-job-picker-card small {
    display: block;
}
.quote-job-picker-card strong {
    color: var(--rr-blue-dark);
    margin-bottom: 3px;
}
.quote-job-picker-card span,
.quote-job-picker-card small {
    color: var(--rr-text-muted);
}
@media (max-width: 640px) {
    .quote-selected-job-card,
    .quote-job-picker-card {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Quotation Client picker modal */
.quote-selected-client-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: #fff7ed;
    box-shadow: var(--rr-shadow-sm);
    margin-bottom: 14px;
}
.quote-selected-client-card.has-selection {
    background: #eff6ff;
    border-color: #93c5fd;
}
.quote-selected-client-card strong,
.quote-selected-client-card span {
    display: block;
}
.quote-selected-client-card strong {
    color: var(--rr-blue-dark);
    margin-bottom: 3px;
}
.quote-selected-client-card span {
    color: var(--rr-text-muted);
    font-size: 12.5px;
}
.quote-client-picker-content {
    max-width: 980px !important;
}
.quote-client-picker-list {
    display: grid;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
}
.quote-client-picker-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--rr-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--rr-shadow-sm);
}
.quote-client-picker-card strong,
.quote-client-picker-card span,
.quote-client-picker-card small {
    display: block;
}
.quote-client-picker-card strong {
    color: var(--rr-blue-dark);
    margin-bottom: 3px;
}
.quote-client-picker-card span,
.quote-client-picker-card small {
    color: var(--rr-text-muted);
}
@media (max-width: 640px) {
    .quote-selected-client-card,
    .quote-client-picker-card {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Quotation Audit Log */
.rrv3-quotation-audit-panel #quotation-audit-table td {
    vertical-align: top;
}
.rrv3-quotation-audit-panel small {
    color: var(--rr-text-muted);
}
.audit-event-view { background: #dbeafe; color: #1d4ed8; }
.audit-event-print { background: #dcfce7; color: #15803d; }
.audit-event-copy-source,
.audit-event-copy-created { background: #fef3c7; color: #b45309; }

/* Admin Super Dashboard any-role switcher */
.rrv3-admin-any-role-switcher {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}
.rrv3-admin-any-role-switcher span {
    color: var(--rr-blue-dark);
}

/* Sales / Job Costing status badges readability */
.jc-status-draft {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fbbf24 !important;
}
.jc-status-pending_sbu_approval,
.jc-status-pending-sbu-approval {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
}
.jc-status-approved,
.jc-status-finalized,
.jc-status-sent {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
}
.jc-status-rejected {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

/* Client status badge readability */
.status-active {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
}
.status-inactive {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Admin SBU management table */
.rrv3-sbu-management-table .rrv3-color-chip {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    vertical-align: middle;
    margin-right: 8px;
}
.rrv3-sbu-management-table td {
    vertical-align: middle;
}
#sbu-edit-modal .rrv3-modal-content {
    max-width: 560px;
}

/* Admin Panel module grouping */
.rrv3-admin-module-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 10px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: var(--rr-radius-lg);
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}
.rrv3-admin-module-button {
    border: 1px solid #bfdbfe;
    background: #ffffff;
    color: var(--rr-blue-dark);
    border-radius: 999px;
    padding: 9px 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rrv3-admin-module-button:hover,
.rrv3-admin-module-button.active {
    background: var(--rr-blue);
    border-color: var(--rr-blue);
    color: #ffffff;
    box-shadow: var(--rr-shadow-sm);
}
.rrv3-admin-subtabs {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #cbd5e1;
}

/* SBU Head Dashboard module grouping */
.rrv3-sbu-module-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 10px;
    padding: 10px;
    border: 1px solid #bbf7d0;
    border-radius: var(--rr-radius-lg);
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}
.rrv3-sbu-module-button {
    border: 1px solid #86efac;
    background: #ffffff;
    color: #166534;
    border-radius: 999px;
    padding: 9px 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rrv3-sbu-module-button:hover,
.rrv3-sbu-module-button.active {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: var(--rr-shadow-sm);
}
.rrv3-sbu-subtabs {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #cbd5e1;
}

/* Softer typography for grouped module buttons */
.rrv3-admin-module-button,
.rrv3-sbu-module-button {
    font-family: inherit !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

/* Database Migration Export / Import UI */
.rrv3-db-tool-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}
.rrv3-db-tool-tab {
    border: 1px solid #bfdbfe;
    background: #ffffff;
    color: var(--rr-blue-dark);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}
.rrv3-db-tool-tab.active {
    background: var(--rr-blue);
    border-color: var(--rr-blue);
    color: #ffffff;
}
.rrv3-db-tool-tab.danger {
    border-color: #fecaca;
    color: #991b1b;
}
.rrv3-db-tool-tab.danger.active {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}
.rrv3-db-tool-panel {
    display: none;
}
.rrv3-db-tool-panel.active {
    display: block;
}
.rrv3-migration-actions,
.rrv3-migration-export-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}
.migration-module-group {
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    margin-bottom: 10px;
    background: #ffffff;
    overflow: hidden;
}
.migration-module-group summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 12px 14px;
    background: #f8fafc;
    font-weight: 800;
}
.migration-group-count {
    color: #64748b;
    font-weight: 700;
}
.migration-group-items {
    padding: 8px;
}
.migration-module-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}
.migration-module-row:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.migration-module-main small,
.migration-module-main em {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}
.migration-module-main em {
    color: #92400e;
}
.migration-module-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    color: #475569;
    font-size: 12px;
    white-space: nowrap;
}
.rrv3-migration-import-box {
    max-width: 680px;
    padding: 14px;
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    background: #eff6ff;
}

/* Migration import preview */
.migration-import-preview {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #ffffff;
}
.migration-import-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    color: #475569;
}
.migration-import-meta p {
    margin: 0;
}
.migration-import-module-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.migration-import-module-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
}
.migration-import-module-row small {
    display: block;
    color: #64748b;
    margin-top: 3px;
}

/* P.E.T. Centre requisition card view */
.rrv3-pet-summary-section .rrv3-section-title {
    margin-bottom: 16px;
}
.rrv3-pet-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.rrv3-pet-summary-card {
    border: 1px solid var(--rr-border, #dbe3ef);
    border-radius: 16px;
    background: #ffffff;
    padding: 16px;
    box-shadow: var(--rr-shadow-sm, 0 2px 8px rgba(15, 23, 42, 0.06));
}
.rrv3-pet-summary-card h3 {
    margin: 0 0 12px;
    color: var(--rr-navy, #1a365d);
}
.rrv3-pet-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px 14px;
}
.rrv3-pet-card-grid label,
.rrv3-pet-info-block label {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rrv3-pet-card-grid strong {
    color: #0f172a;
    font-size: 13px;
}
.rrv3-pet-wide {
    grid-column: 1 / -1;
}
.rrv3-pet-card-table {
    border-collapse: separate !important;
    border-spacing: 0 14px !important;
    border: 0 !important;
    background: transparent !important;
}
.rrv3-pet-card-table thead {
    display: none;
}
.rrv3-pet-card-table tbody,
.rrv3-pet-card-table tr,
.rrv3-pet-card-table td {
    display: block;
}
.rrv3-pet-card-table tr {
    position: relative;
    border: 1px solid var(--rr-border, #dbe3ef);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--rr-shadow-sm, 0 2px 8px rgba(15, 23, 42, 0.06));
    overflow: hidden;
}
.rrv3-pet-card-table td {
    border: 0 !important;
    padding: 0 !important;
}
.rrv3-pet-card-select {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}
.rrv3-pet-card-select .item-checkbox {
    width: 20px;
    height: 20px;
}
.rrv3-pet-request-id,
.rrv3-pet-hidden-cell {
    display: none !important;
}
.rrv3-pet-item-card {
    padding: 16px 16px 16px 52px;
}
.rrv3-pet-item-header {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5edf7;
}
.rrv3-pet-item-img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border: 1px solid #e5edf7;
    border-radius: 14px;
    background: #f8fafc;
}
.rrv3-pet-item-kicker {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.rrv3-pet-item-title-wrap h3 {
    margin: 3px 0 8px;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.25;
}
.rrv3-pet-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    color: #475569;
    font-size: 12.5px;
}
.rrv3-pet-current-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    min-width: 150px;
}
.rrv3-pet-item-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    padding: 14px 0;
}
.rrv3-pet-info-block {
    border: 1px solid #e5edf7;
    border-radius: 14px;
    background: #f8fafc;
    padding: 11px 12px;
    min-height: 54px;
}
.rrv3-pet-info-block .pet-description-display {
    display: block;
    margin-top: 6px;
}
.rrv3-pet-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e5edf7;
}
.rrv3-pet-actions {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 30px rgba(15,23,42,.12);
}
@media (max-width: 760px) {
    .rrv3-pet-item-header {
        grid-template-columns: 72px 1fr;
    }
    .rrv3-pet-current-status {
        grid-column: 1 / -1;
        align-items: flex-start;
    }
    .rrv3-pet-item-img {
        width: 72px;
        height: 72px;
    }
}

/* Simplified collapsible P.E.T. item card sections */
.rrv3-pet-item-sections {
    display: grid;
    gap: 10px;
    padding-top: 14px;
}
.rrv3-pet-item-section {
    border: 1px solid #e5edf7;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}
.rrv3-pet-item-section summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 11px 13px;
    font-size: 13px;
    font-weight: 900;
    color: #1f2937;
    background: #f8fafc;
    user-select: none;
}
.rrv3-pet-item-section summary::-webkit-details-marker {
    display: none;
}
.rrv3-pet-item-section summary::before {
    content: '▸';
    display: inline-block;
    transition: transform .16s ease;
    color: #64748b;
    margin-right: 2px;
}
.rrv3-pet-item-section[open] summary::before {
    transform: rotate(90deg);
}
.rrv3-pet-item-section summary span {
    flex: 1;
}
.rrv3-pet-item-section summary em {
    font-style: normal;
    font-size: 10.5px;
    border-radius: 999px;
    padding: 3px 8px;
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}
.rrv3-pet-item-section.section-request summary {
    background: #eff6ff;
    color: #1e3a8a;
}
.rrv3-pet-item-section.section-identification summary {
    background: #fffbeb;
    color: #92400e;
}
.rrv3-pet-item-section.section-supporting summary {
    background: #f8fafc;
    color: #334155;
}
.rrv3-pet-item-section.section-actions summary {
    background: #f0fdf4;
    color: #166534;
}
.rrv3-pet-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    padding: 12px;
}
.rrv3-pet-item-section > .rrv3-field-hint {
    padding: 12px 13px;
    margin: 0;
}
.rrv3-pet-item-section .description-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.rrv3-pet-item-section .description-edit .pet-description-input {
    flex: 1 1 260px;
}
.rrv3-pet-item-section .rrv3-pet-card-actions {
    border-top: 0;
    padding: 12px;
}

/* P.E.T. card visual alignment with Requisition Sales/SBU card view */
.rrv3-pet-card-table {
    display: block !important;
    width: 100% !important;
}
.rrv3-pet-card-table tbody {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}
.rrv3-pet-card-table tr {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    border-radius: var(--rr-radius-lg) !important;
    box-shadow: none !important;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.rrv3-pet-card-table tr:hover {
    box-shadow: var(--rr-shadow-md) !important;
    border-color: var(--rr-blue, #2563eb) !important;
}
.rrv3-pet-card-table tr.service-item-disabled {
    opacity: 0.78;
}
.rrv3-pet-card-main,
.rrv3-pet-item-card {
    height: 100%;
}
.rrv3-pet-item-card {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}
.rrv3-pet-card-select {
    top: 10px !important;
    left: 10px !important;
}
.rrv3-pet-card-select .item-checkbox {
    width: 18px !important;
    height: 18px !important;
}
.rrv3-pet-item-header {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: start !important;
    padding: 10px 12px 10px 40px !important;
    background-color: var(--rr-bg, #f8fafc);
    border-bottom: 1px solid var(--rr-border, #dbe3ef) !important;
}
.rrv3-pet-item-img {
    width: 58px !important;
    height: 58px !important;
    border-radius: 10px !important;
}
.rrv3-pet-item-title-wrap h3 {
    margin: 2px 0 6px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    color: var(--rr-text, #111827) !important;
}
.rrv3-pet-item-kicker {
    font-size: 10px !important;
    letter-spacing: .04em !important;
}
.rrv3-pet-item-meta {
    gap: 5px !important;
    font-size: 11.5px !important;
}
.rrv3-pet-current-status {
    grid-column: 1 / -1;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center !important;
    min-width: 0 !important;
    gap: 6px !important;
    margin-top: 2px;
}
.rrv3-pet-item-sections {
    flex: 1;
    gap: 8px !important;
    padding: 10px 12px 12px !important;
}
.rrv3-pet-item-section {
    border-radius: 10px !important;
}
.rrv3-pet-item-section summary {
    padding: 8px 10px !important;
    font-size: 12px !important;
}
.rrv3-pet-item-section summary em {
    font-size: 9.5px !important;
    padding: 2px 6px !important;
}
.rrv3-pet-section-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 9px !important;
}
.rrv3-pet-info-block {
    min-height: 0 !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    font-size: 12px;
}
.rrv3-pet-info-block label {
    font-size: 9.5px !important;
}
.rrv3-pet-item-section .rrv3-pet-card-actions {
    padding: 9px !important;
    gap: 7px !important;
}
.rrv3-pet-item-section .rrv3-pet-card-actions .rrv3-field-hint {
    flex-basis: 100%;
    font-size: 11.5px;
}
.rrv3-pet-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rrv3-pet-summary-card {
    border-radius: var(--rr-radius-lg, 14px) !important;
    box-shadow: none !important;
}
.rrv3-pet-summary-card h3 {
    font-size: 13px;
}
.rrv3-pet-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rrv3-pet-wide {
    grid-column: 1 / -1;
}

@media (max-width: 1280px) {
    .rrv3-pet-card-table tbody,
    .rrv3-pet-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 820px) {
    .rrv3-pet-card-table tbody,
    .rrv3-pet-summary-cards {
        grid-template-columns: 1fr;
    }
    .rrv3-pet-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Compact P.E.T. item Request Details chips */
.rrv3-pet-item-section.section-request .rrv3-pet-section-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px !important;
    padding: 8px 9px !important;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: 0 !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    font-size: 11.5px;
    line-height: 1.2;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block label {
    display: inline !important;
    margin: 0 !important;
    font-size: 9px !important;
    line-height: 1 !important;
    white-space: nowrap;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block label::after {
    content: ':';
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block div {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block .stock-badge,
.rrv3-pet-item-section.section-request .rrv3-pet-info-block .reserved-note,
.rrv3-pet-item-section.section-request .rrv3-pet-info-block .type-badge {
    margin: 0;
    font-size: 10.5px;
    line-height: 1.15;
}

/* Pastel colour treatment for the 3 P.E.T. Requisition Details cards */
.rrv3-pet-summary-cards .rrv3-pet-summary-card:nth-child(1) {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.rrv3-pet-summary-cards .rrv3-pet-summary-card:nth-child(1) h3 {
    color: #1e40af;
}
.rrv3-pet-summary-cards .rrv3-pet-summary-card:nth-child(2) {
    background: #ecfdf5;
    border-color: #bbf7d0;
}
.rrv3-pet-summary-cards .rrv3-pet-summary-card:nth-child(2) h3 {
    color: #166534;
}
.rrv3-pet-summary-cards .rrv3-pet-summary-card:nth-child(3) {
    background: #fff7ed;
    border-color: #fed7aa;
}
.rrv3-pet-summary-cards .rrv3-pet-summary-card:nth-child(3) h3 {
    color: #9a3412;
}
.rrv3-pet-summary-cards .rrv3-pet-summary-card {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
}

/* P.E.T. item card refinement: right-aligned status and clean request details rows */
.rrv3-pet-item-header {
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
}
.rrv3-pet-current-status {
    grid-column: auto !important;
    justify-self: end !important;
    align-items: flex-end !important;
    text-align: right;
    min-width: 150px !important;
}
.rrv3-pet-current-status .view-existing-dn-btn {
    align-self: flex-end;
}

.rrv3-pet-item-section.section-request .rrv3-pet-section-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 18px !important;
    padding: 10px 12px !important;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block {
    display: grid !important;
    grid-template-columns: minmax(118px, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 0 !important;
    padding: 4px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 12.5px;
    line-height: 1.25;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block label {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    color: #334155 !important;
    font-size: 11.5px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block label::after {
    content: ':';
    margin-left: auto;
    color: #64748b;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block div {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: #0f172a;
    font-size: 12.5px;
    white-space: normal;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block div strong {
    font-weight: 900;
}
.rrv3-pet-item-section.section-request .rrv3-pet-info-block .stock-badge,
.rrv3-pet-item-section.section-request .rrv3-pet-info-block .reserved-note,
.rrv3-pet-item-section.section-request .rrv3-pet-info-block .type-badge {
    margin: 0;
    font-size: 11px;
    line-height: 1.15;
}

@media (max-width: 820px) {
    .rrv3-pet-item-header {
        grid-template-columns: 72px 1fr !important;
    }
    .rrv3-pet-current-status {
        grid-column: 1 / -1 !important;
        justify-self: stretch !important;
        align-items: flex-start !important;
        text-align: left;
    }
    .rrv3-pet-item-section.section-request .rrv3-pet-section-grid {
        grid-template-columns: 1fr !important;
    }
}

/* P.E.T. card header: item no + status/DN on one top line, title uses full width */
.rrv3-pet-item-header {
    display: block !important;
    padding: 10px 12px 11px 40px !important;
}
.rrv3-pet-item-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    min-height: 24px;
}
.rrv3-pet-item-topline .rrv3-pet-item-kicker {
    flex: 1 1 auto;
    padding-top: 3px;
}
.rrv3-pet-item-topline .rrv3-pet-current-status {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start !important;
    gap: 6px !important;
    min-width: 0 !important;
    text-align: right;
    margin-top: 0 !important;
}
.rrv3-pet-item-identity {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}
.rrv3-pet-item-identity .rrv3-pet-item-title-wrap {
    min-width: 0;
}
.rrv3-pet-item-identity .rrv3-pet-item-title-wrap h3 {
    width: 100%;
}
.rrv3-pet-item-identity .rrv3-pet-item-meta {
    margin-top: 4px;
}
@media (max-width: 820px) {
    .rrv3-pet-item-topline {
        align-items: flex-start;
    }
    .rrv3-pet-item-topline .rrv3-pet-current-status {
        justify-content: flex-start;
        text-align: left;
    }
}

/* P.E.T. Sales Order type and supporting document links */
.rrv3-pet-so-type-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1.15;
    border: 1px solid transparent;
}
.rrv3-pet-so-type-pill.is-emergency {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}
.rrv3-pet-so-type-pill.is-normal {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}
.rrv3-pet-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--rr-blue, #2563eb);
    font-weight: 800;
    text-decoration: none;
    margin-top: 3px;
}
.rrv3-pet-doc-link:hover {
    text-decoration: underline;
}

/* P.E.T. Supporting Info compact layout */
.rrv3-pet-supporting-info {
    padding: 10px 12px 12px;
    display: grid;
    gap: 8px;
}
.rrv3-pet-supporting-line {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    font-size: 12.5px;
}
.rrv3-pet-supporting-line > label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #334155;
    font-weight: 900;
    white-space: nowrap;
}
.rrv3-pet-supporting-line > label::after {
    content: ':';
    color: #64748b;
    margin-left: auto;
}
.rrv3-pet-supplier-quote-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 3px 0;
}
.rrv3-pet-supplier-quote-line.is-selected {
    color: #166534;
}
.rrv3-pet-supplier-quote-line strong {
    white-space: nowrap;
}
.rrv3-pet-supporting-quotes .quotations-btn {
    margin-top: 7px;
}
.rrv3-pet-doc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}
@media (max-width: 760px) {
    .rrv3-pet-supporting-line {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    .rrv3-pet-supporting-line > label {
        justify-content: flex-start;
    }
}

/* Larger item photo in P.E.T. item cards */
.rrv3-pet-item-identity {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 12px !important;
}
.rrv3-pet-item-img {
    width: 92px !important;
    height: 92px !important;
    border-radius: 14px !important;
}
@media (max-width: 820px) {
    .rrv3-pet-item-identity {
        grid-template-columns: 78px minmax(0, 1fr) !important;
    }
    .rrv3-pet-item-img {
        width: 78px !important;
        height: 78px !important;
    }
}

/* 50% larger P.E.T. item photo + centered title area */
.rrv3-pet-item-identity {
    grid-template-columns: 138px minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: center !important;
}
.rrv3-pet-item-img {
    width: 138px !important;
    height: 138px !important;
    border-radius: 16px !important;
    cursor: zoom-in;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.rrv3-pet-item-img:hover,
.rrv3-pet-item-img:focus {
    transform: scale(1.025);
    border-color: var(--rr-blue, #2563eb) !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
    outline: none;
}
.rrv3-pet-item-identity .rrv3-pet-item-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
}

/* P.E.T. full-screen-ish photo modal */
.rrv3-pet-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}
.rrv3-pet-photo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
}
.rrv3-pet-photo-modal-content {
    position: absolute;
    inset: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    pointer-events: none;
}
.rrv3-pet-photo-modal-title {
    max-width: min(980px, 88vw);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.rrv3-pet-photo-modal-img {
    max-width: 94vw;
    max-height: 84vh;
    object-fit: contain;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}
.rrv3-pet-photo-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
}
@media (max-width: 820px) {
    .rrv3-pet-item-identity {
        grid-template-columns: 117px minmax(0, 1fr) !important;
    }
    .rrv3-pet-item-img {
        width: 117px !important;
        height: 117px !important;
    }
    .rrv3-pet-photo-modal-content {
        inset: 16px;
    }
}

.rrv3-notif-open-hint {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    font-size: 10px;
    font-weight: 900;
    vertical-align: middle;
}

/* Requisition WhatsApp approval token panel */
.rrv3-req-approval-token-panel {
    border-left: 4px solid #16a34a;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 76%);
}
.rrv3-req-approval-token-panel h3 {
    margin-top: 0;
    color: #166534;
}
.rrv3-req-token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.rrv3-req-token-grid > div {
    padding: 10px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #ffffff;
}
.rrv3-req-token-grid label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.rrv3-req-token-grid strong {
    color: #0f172a;
}

/* Requisition WhatsApp approval share panel */
.rrv3-req-approval-share-panel {
    margin: 16px 0 18px;
    padding: 18px;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #16a34a;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 78%);
    box-shadow: 0 10px 26px rgba(22, 163, 74, .10);
}
.rrv3-req-approval-share-panel h3 {
    margin: 0 0 8px;
    color: #166534;
}
.rrv3-req-approval-share-panel p {
    margin: 7px 0;
    color: #334155;
}
.rrv3-req-approval-message {
    margin-top: 12px;
}
.rrv3-req-approval-message label {
    display: block;
    margin-bottom: 5px;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.rrv3-req-approval-message pre {
    white-space: pre-wrap;
    overflow: auto;
    max-height: 300px;
    margin: 0;
    padding: 12px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.45;
}
.rrv3-req-approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}
.rrv3-req-token-warning {
    color: #b91c1c !important;
    font-weight: 800;
}
@media (max-width: 640px) {
    .rrv3-req-approval-actions .rrv3-button,
    .rrv3-req-approval-actions a.rrv3-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* UAT / System Readiness tools */
.rrv3-uat-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}
.rrv3-uat-summary-card {
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 14px;
    box-shadow: 0 3px 10px rgba(15,23,42,.05);
}
.rrv3-uat-summary-card label {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.rrv3-uat-summary-card strong {
    color: #0f172a;
    font-size: 22px;
}
.rrv3-uat-summary-card.is-ok { border-left: 4px solid #16a34a; }
.rrv3-uat-summary-card.is-warning { border-left: 4px solid #f59e0b; }
.rrv3-uat-summary-card.is-missing { border-left: 4px solid #dc2626; }
.rrv3-uat-summary-card.is-info { border-left: 4px solid #2563eb; }
.rrv3-uat-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 900;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}
.rrv3-uat-ok {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}
.rrv3-uat-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}
.rrv3-uat-missing {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.rrv3-uat-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}
.rrv3-uat-readiness-table code {
    white-space: normal;
    font-size: 11px;
}

/* UAT role-based test guide */
.rrv3-uat-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.rrv3-uat-guide-card {
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15,23,42,.06);
    overflow: hidden;
}
.rrv3-uat-guide-head {
    padding: 14px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-bottom: 1px solid #dbeafe;
}
.rrv3-uat-guide-head span {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rrv3-uat-guide-head h3 {
    margin: 8px 0 5px;
    color: #0f172a;
}
.rrv3-uat-guide-head p {
    margin: 0;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
}
.rrv3-uat-step-list {
    margin: 0;
    padding: 14px 16px 16px 34px;
}
.rrv3-uat-step-list li {
    margin-bottom: 10px;
    color: #0f172a;
    font-weight: 750;
}
.rrv3-uat-step-list li small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-weight: 650;
    line-height: 1.35;
}

/* UAT issue reporting */
.rrv3-uat-report-issue-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99990;
    border: 1px solid #f59e0b;
    border-radius: 999px;
    background: #f97316;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(249, 115, 22, .25);
    cursor: pointer;
}
.rrv3-uat-report-issue-float:hover {
    background: #ea580c;
}
.rrv3-uat-issues-table td {
    vertical-align: top;
}
.rrv3-uat-issues-table small {
    color: #64748b;
    font-weight: 700;
}
@media (max-width: 720px) {
    .rrv3-uat-report-issue-float {
        right: 10px;
        bottom: 10px;
        padding: 9px 12px;
    }
}

/* Requisition flow progress pills */
.rrv3-requisition-progress-panel {
    border-left: 4px solid #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 78%);
}
.rrv3-requisition-progress-panel h3 {
    margin-top: 0;
    color: #1e3a8a;
}
.rrv3-requisition-progress-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 34px;
    margin-top: 12px;
}
.rrv3-requisition-progress-pill {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    width: min(100%, 230px);
    min-height: 66px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: inherit;
    cursor: pointer;
    text-align: left;
}
.rrv3-requisition-progress-pill:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 22px;
    font-weight: 1000;
    pointer-events: none;
}
.rrv3-requisition-progress-pill:hover,
.rrv3-requisition-progress-pill:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.rrv3-requisition-progress-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #94a3b8;
    color: #ffffff;
    font-weight: 1000;
    box-shadow: 0 0 0 4px #e2e8f0;
}
.rrv3-requisition-progress-text strong,
.rrv3-requisition-progress-text small {
    display: block;
}
.rrv3-requisition-progress-text strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.2;
}
.rrv3-requisition-progress-text small {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
}
.rrv3-requisition-progress-pill.is-complete {
    border-color: #86efac;
    background: #f0fdf4;
}
.rrv3-requisition-progress-pill.is-complete .rrv3-requisition-progress-dot {
    background: #16a34a;
    box-shadow: 0 0 0 4px #dcfce7;
}
.rrv3-requisition-progress-pill.is-complete .rrv3-requisition-progress-text strong {
    color: #166534;
}
.rrv3-requisition-progress-pill.is-alert {
    border-color: #fca5a5;
    background: #fff7ed;
}
.rrv3-requisition-progress-pill.is-alert .rrv3-requisition-progress-dot {
    background: #dc2626;
    box-shadow: 0 0 0 4px #fee2e2;
}
.rrv3-requisition-progress-pill.is-alert .rrv3-requisition-progress-text strong {
    color: #991b1b;
}
.rrv3-requisition-progress-highlight {
    animation: rrv3-requisition-progress-pulse 1.4s ease-out 1;
}
@keyframes rrv3-requisition-progress-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37,99,235,.34); }
    100% { box-shadow: 0 0 0 14px rgba(37,99,235,0); }
}
@media (max-width: 640px) {
    .rrv3-requisition-progress-flow { gap: 26px; }
    .rrv3-requisition-progress-pill { width: 100%; border-radius: 18px; }
    .rrv3-requisition-progress-pill:not(:last-child)::after {
        content: "↓";
        right: 50%;
        top: auto;
        bottom: -24px;
        transform: translateX(50%);
    }
}

/* Expanded UAT guide copy controls */
.rrv3-uat-copy-source {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.rrv3-uat-guide-head .rrv3-uat-copy-btn {
    margin-top: 10px;
}
.rrv3-uat-before-box {
    margin: 12px 14px 0;
    padding: 10px 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    background: #f8fafc;
}
.rrv3-uat-before-box strong {
    display: block;
    color: #1e3a8a;
    margin-bottom: 5px;
}
.rrv3-uat-before-box ul {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}
.rrv3-uat-step-list li span {
    display: block;
}
@media print {
    .rrv3-uat-copy-btn {
        display: none !important;
    }
}

/* P.E.T. dashboard lazy-tab loading placeholders */
.rrv3-pet-lazy-tab {
    border-left: 4px solid #0ea5e9;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 78%);
}
.rrv3-pet-lazy-tab h2 {
    margin-top: 0;
    color: #1e3a8a;
}

/* Purchasing Item Card — item-focused buyer view */
.rrv3-purchasing-item-card-page .rrv3-instructions {
    max-width: 980px;
}
.rrv3-purchasing-item-card,
.rrv3-purchasing-procurement-card {
    border: 1px solid #dbeafe;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}
.rrv3-purchasing-item-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #ecfeff 100%);
    border: 1px solid #bfdbfe;
    margin-bottom: 18px;
}
.rrv3-purchasing-item-photo {
    flex: 0 0 156px;
    width: 156px;
    height: 156px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.rrv3-purchasing-item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rrv3-purchasing-item-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    background: repeating-linear-gradient(135deg, #f8fafc, #f8fafc 10px, #eef2ff 10px, #eef2ff 20px);
    font-weight: 900;
}
.rrv3-purchasing-item-photo-placeholder span {
    font-size: 42px;
    line-height: 1;
}
.rrv3-purchasing-item-title {
    flex: 1 1 auto;
    min-width: 220px;
}
.rrv3-purchasing-item-hero h2 {
    margin: 10px 0 4px;
    color: #0f172a;
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.18;
}
.rrv3-purchasing-item-hero p {
    margin: 0;
    color: #64748b;
    font-weight: 700;
}
.rrv3-purchasing-item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 260px;
}
.rrv3-purchasing-item-actions .rrv3-button[disabled] {
    opacity: .62;
    cursor: not-allowed;
    filter: grayscale(.15);
}
.rrv3-purchasing-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.rrv3-purchasing-card-field,
.rrv3-purchasing-doc-card {
    min-height: 84px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}
.rrv3-purchasing-card-field label,
.rrv3-purchasing-doc-card span {
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 1000;
}
.rrv3-purchasing-card-field strong {
    font-size: 18px;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}
.rrv3-purchasing-doc-card.missing-document {
    border-color: #fed7aa;
    background: #fff7ed;
}
.rrv3-purchasing-doc-card.missing-document strong {
    color: #9a3412;
    font-size: 15px;
    font-style: italic;
}
.rrv3-purchasing-doc-card.has-document {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.rrv3-purchasing-doc-card.has-document a {
    color: #166534;
    font-weight: 900;
    text-decoration: none;
}
.rrv3-purchasing-detail-grid .rrv3-purchasing-card-field strong {
    font-size: 15px;
}
@media (max-width: 720px) {
    .rrv3-purchasing-item-hero {
        flex-direction: column;
    }
    .rrv3-purchasing-item-photo {
        width: 100%;
        height: 220px;
        flex-basis: auto;
    }
    .rrv3-purchasing-item-title {
        min-width: 0;
        width: 100%;
    }
    .rrv3-purchasing-item-actions {
        width: 100%;
        min-width: 0;
        justify-content: stretch;
    }
    .rrv3-purchasing-item-actions .rrv3-button {
        width: 100%;
        justify-content: center;
    }
}


/* 1307-07: Mobile notification drawer guard */
@media (max-width: 760px) {
    .rrv3-notif-drawer {
        width: 100vw !important;
        max-width: 100vw !important;
        right: -105vw;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
    .rrv3-notif-drawer.open { right: 0 !important; }
    .rrv3-notif-drawer-head {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 12px 14px;
        gap: 8px;
        align-items: flex-start;
    }
    .rrv3-notif-drawer-head h3 {
        font-size: 14px;
        line-height: 1.25;
        word-break: break-word;
    }
    .drawer-head-actions {
        flex-shrink: 0;
        gap: 8px;
    }
    .drawer-head-actions .rrv3-button {
        padding: 7px 9px;
        font-size: 11px;
        white-space: nowrap;
    }
    .rrv3-notif-drawer-body {
        padding: 10px;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .rrv3-notif-card {
        padding: 12px;
        gap: 8px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}

/* 1307-07: Make SBU module buttons visually consistent with normal dashboard tabs */
.rrv3-sbu-module-tabs {
    border-color: var(--rr-border) !important;
    background: var(--rr-white) !important;
    box-shadow: var(--rr-shadow-sm);
}
.rrv3-sbu-module-button {
    border: 1px solid var(--rr-border) !important;
    background: var(--rr-ice) !important;
    color: var(--rr-text) !important;
    border-radius: var(--rr-radius) !important;
    padding: 10px 16px !important;
    font-weight: 700 !important;
}
.rrv3-sbu-module-button:hover,
.rrv3-sbu-module-button.active {
    background: var(--rr-blue) !important;
    border-color: var(--rr-blue) !important;
    color: #ffffff !important;
}

/* 1307-11 to 14: Summary / gamification cards */
.rrv3-summary-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.rrv3-summary-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%, #fff7ed 100%);
    border: 1px solid #bfdbfe;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.rrv3-summary-hero h2 {
    margin: 0 0 6px;
    color: #0f172a;
}
.rrv3-summary-hero p {
    margin: 0;
    color: #64748b;
    font-weight: 700;
}
.rrv3-summary-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}
.rrv3-summary-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #dbeafe;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.rrv3-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    font-size: 24px;
    flex: 0 0 48px;
}
.rrv3-summary-card label {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.rrv3-summary-card strong {
    display: block;
    margin-top: 3px;
    font-size: 23px;
    color: #0f172a;
    line-height: 1.15;
}
.rrv3-summary-card small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-weight: 700;
}
.rrv3-summary-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}
.rrv3-summary-panel {
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.rrv3-summary-panel h3 {
    margin-top: 0;
}
.rrv3-summary-bar-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 11px 0;
}
.rrv3-summary-rank {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    flex: 0 0 28px;
}
.rrv3-summary-bar-main {
    flex: 1;
    min-width: 0;
}
.rrv3-summary-bar-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 5px;
}
.rrv3-summary-bar-head span {
    color: #2563eb;
    font-weight: 900;
    white-space: nowrap;
}
.rrv3-summary-bar-track {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.rrv3-summary-bar-track div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22c55e);
}
.rrv3-summary-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.rrv3-summary-badge {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.rrv3-summary-badge span {
    font-size: 24px;
}
.rrv3-summary-badge strong,
.rrv3-summary-badge small {
    display: block;
}
.rrv3-summary-badge.earned {
    border-color: #86efac;
    background: #f0fdf4;
}
.rrv3-summary-badge.locked {
    opacity: .58;
    filter: grayscale(.5);
}
.rrv3-summary-big-number {
    font-size: 32px;
    font-weight: 1000;
    color: #f97316;
    margin: 8px 0;
}
html.rrv3-dark-mode .rrv3-summary-hero,
html.rrv3-dark-mode .rrv3-summary-card,
html.rrv3-dark-mode .rrv3-summary-panel,
html.rrv3-dark-mode .rrv3-summary-badge {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}
html.rrv3-dark-mode .rrv3-summary-card strong,
html.rrv3-dark-mode .rrv3-summary-hero h2,
html.rrv3-dark-mode .rrv3-summary-bar-head strong {
    color: #f8fafc !important;
}
html.rrv3-dark-mode .rrv3-summary-icon {
    background: #0b2a4a;
}

/* Sales Summary month filter */
.rrv3-summary-month-filter {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.rrv3-summary-month-filter label {
    font-size: 12px;
    font-weight: 900;
    color: #1e3a8a;
}
.rrv3-summary-month-filter input[type="month"] {
    max-width: 170px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
}
html.rrv3-dark-mode .rrv3-summary-month-filter label {
    color: #bfdbfe !important;
}

/* Sales Summary widget customizer and extra widgets */
.rrv3-summary-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}
.rrv3-summary-customize-panel {
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    background: #f8fafc;
}
.rrv3-summary-widget-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 10px 0;
}
.rrv3-summary-widget-options label,
.rrv3-summary-attention-list li,
.rrv3-summary-mini-list li {
    font-weight: 750;
    color: #334155;
}
.rrv3-summary-attention-list,
.rrv3-summary-mini-list {
    margin: 0;
    padding-left: 18px;
}
.rrv3-summary-attention-list li,
.rrv3-summary-mini-list li {
    margin: 8px 0;
    line-height: 1.35;
}
.rrv3-summary-mini-list span {
    color: #2563eb;
    font-weight: 900;
}
.rrv3-summary-funnel {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 12px;
    align-items: stretch;
}
.rrv3-summary-funnel > div {
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #eff6ff;
    text-align: center;
}
.rrv3-summary-funnel > span {
    align-self: center;
    color: #2563eb;
    font-size: 24px;
    font-weight: 1000;
}
.rrv3-summary-funnel label,
.rrv3-summary-funnel strong,
.rrv3-summary-funnel small {
    display: block;
}
.rrv3-summary-funnel strong {
    font-size: 28px;
    color: #0f172a;
}
@media (max-width: 760px) {
    .rrv3-summary-funnel {
        grid-template-columns: 1fr;
    }
    .rrv3-summary-funnel > span {
        transform: rotate(90deg);
        justify-self: center;
    }
}
html.rrv3-dark-mode .rrv3-summary-customize-panel,
html.rrv3-dark-mode .rrv3-summary-funnel > div {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}
html.rrv3-dark-mode .rrv3-summary-widget-options label,
html.rrv3-dark-mode .rrv3-summary-attention-list li,
html.rrv3-dark-mode .rrv3-summary-mini-list li,
html.rrv3-dark-mode .rrv3-summary-funnel strong {
    color: #e5e7eb !important;
}

/* Summary Needs Attention widgets: light yellow card + red pulsing border */
@keyframes rrv3-summary-attention-pulse {
    0%, 100% {
        border-color: #ef4444;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, .30), 0 10px 24px rgba(15, 23, 42, .06);
    }
    50% {
        border-color: #b91c1c;
        box-shadow: 0 0 0 5px rgba(239, 68, 68, .12), 0 10px 24px rgba(15, 23, 42, .08);
    }
}
.rrv3-summary-attention-widget,
.rrv3-summary-panel:has(.rrv3-summary-attention-list) {
    background: #fefce8 !important;
    border: 2px solid #ef4444 !important;
    animation: rrv3-summary-attention-pulse 1.7s ease-in-out infinite;
}
.rrv3-summary-attention-widget h3,
.rrv3-summary-panel:has(.rrv3-summary-attention-list) h3 {
    color: #991b1b !important;
}
.rrv3-summary-attention-widget .rrv3-summary-attention-list li,
.rrv3-summary-panel:has(.rrv3-summary-attention-list) .rrv3-summary-attention-list li {
    color: #713f12 !important;
}
html.rrv3-dark-mode .rrv3-summary-attention-widget,
html.rrv3-dark-mode .rrv3-summary-panel:has(.rrv3-summary-attention-list) {
    background: #3f2f05 !important;
    border-color: #f87171 !important;
    color: #fef3c7 !important;
}
html.rrv3-dark-mode .rrv3-summary-attention-widget h3,
html.rrv3-dark-mode .rrv3-summary-panel:has(.rrv3-summary-attention-list) h3,
html.rrv3-dark-mode .rrv3-summary-attention-widget .rrv3-summary-attention-list li,
html.rrv3-dark-mode .rrv3-summary-panel:has(.rrv3-summary-attention-list) .rrv3-summary-attention-list li {
    color: #fef3c7 !important;
}
@media (prefers-reduced-motion: reduce) {
    .rrv3-summary-attention-widget,
    .rrv3-summary-panel:has(.rrv3-summary-attention-list) {
        animation: none !important;
    }
}

/* Approved Revision status pill */
.jc-status-approved_revision,
.jc-status-approved-revision,
.status-approved_revision,
.status-approved-revision {
    background-color: #ede9fe !important;
    color: #5b21b6 !important;
    border: 1px solid #c4b5fd !important;
}

/* 1507-14: stronger Needs Attention styling + better indentation */
@keyframes rrv3-summary-attention-pulse-strong {
    0%, 100% {
        border-color: #dc2626;
        box-shadow: 0 0 0 0 rgba(220, 38, 38, .50), 0 14px 32px rgba(127, 29, 29, .16);
    }
    50% {
        border-color: #7f1d1d;
        box-shadow: 0 0 0 8px rgba(220, 38, 38, .18), 0 18px 38px rgba(127, 29, 29, .22);
    }
}
.rrv3-summary-attention-widget,
.rrv3-summary-panel:has(.rrv3-summary-attention-list) {
    border-width: 3px !important;
    animation: rrv3-summary-attention-pulse-strong 1.25s ease-in-out infinite !important;
}
.rrv3-summary-attention-list {
    padding-left: 30px !important;
    padding-right: 16px !important;
    margin-top: 12px !important;
    margin-bottom: 4px !important;
}
.rrv3-summary-attention-list li {
    padding-left: 6px !important;
    margin: 10px 0 !important;
    line-height: 1.45 !important;
}
.rrv3-summary-attention-list li::marker {
    color: #dc2626;
    font-size: 1.15em;
}
html.rrv3-dark-mode .rrv3-summary-attention-list li::marker {
    color: #fca5a5;
}
@media (prefers-reduced-motion: reduce) {
    .rrv3-summary-attention-widget,
    .rrv3-summary-panel:has(.rrv3-summary-attention-list) {
        animation: none !important;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, .22) !important;
    }
}

/* 1507-15: Compact desktop layout for Summary Needs Attention cards */
@media (min-width: 900px) {
    .rrv3-summary-two-col {
        align-items: start;
    }
    .rrv3-summary-attention-widget,
    .rrv3-summary-panel:has(.rrv3-summary-attention-list) {
        align-self: start;
    }
    .rrv3-summary-attention-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
        padding-left: 0 !important;
        padding-right: 0 !important;
        list-style: none !important;
    }
    .rrv3-summary-attention-list li {
        margin: 0 !important;
        padding: 8px 10px 8px 28px !important;
        border-radius: 10px;
        background: rgba(255, 255, 255, .62);
        border: 1px solid rgba(251, 191, 36, .65);
        position: relative;
        min-height: 40px;
    }
    .rrv3-summary-attention-list li::before {
        content: '⚠️';
        position: absolute;
        left: 8px;
        top: 8px;
        font-size: 13px;
    }
    html.rrv3-dark-mode .rrv3-summary-attention-list li {
        background: rgba(17, 24, 39, .66) !important;
        border-color: rgba(251, 191, 36, .45) !important;
    }
}

/* 1507-16: clickable Summary Needs Attention items */
.rrv3-summary-attention-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: inherit !important;
    text-decoration: none !important;
    width: 100%;
}
.rrv3-summary-attention-link span {
    min-width: 0;
}
.rrv3-summary-attention-link em {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
}
.rrv3-summary-attention-list li:hover .rrv3-summary-attention-link em {
    background: #7f1d1d;
}
html.rrv3-dark-mode .rrv3-summary-attention-link em {
    background: #f87171;
    color: #111827;
}

/* 1607-12: Price Reference Library catalog matching */
.rrv3-price-ref-catalog-cell {
    min-width: 190px;
}
.rrv3-price-ref-catalog-current {
    margin-bottom: 6px;
    line-height: 1.35;
}
.rrv3-price-ref-result-list {
    display: grid;
    gap: 8px;
    max-height: 440px;
    overflow: auto;
}
.rrv3-price-ref-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.rrv3-price-ref-result-card strong,
.rrv3-price-ref-result-card small {
    display: block;
}
.rrv3-price-ref-result-card small {
    color: #64748b;
    margin-top: 3px;
}
html.rrv3-dark-mode .rrv3-price-ref-result-card {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode .rrv3-price-ref-result-card small {
    color: #94a3b8;
}

/* 1607-13: Catalog item price history view */
.rrv3-price-ref-history-head {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.rrv3-price-ref-history-head > div {
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.rrv3-price-ref-history-head label,
.rrv3-price-ref-history-head strong,
.rrv3-price-ref-history-head small {
    display: block;
}
.rrv3-price-ref-history-head label {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rrv3-price-ref-history-head strong {
    margin-top: 3px;
    color: #0f172a;
}
.rrv3-price-ref-history-head small {
    margin-top: 3px;
    color: #64748b;
}
.rrv3-price-ref-history-detail-table td {
    vertical-align: top;
}
html.rrv3-dark-mode .rrv3-price-ref-history-head > div {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode .rrv3-price-ref-history-head strong {
    color: #e2e8f0;
}
html.rrv3-dark-mode .rrv3-price-ref-history-head label,
html.rrv3-dark-mode .rrv3-price-ref-history-head small {
    color: #94a3b8;
}

/* 1607-16: latest matched price reference suggestion in Job Costing */
.jc-latest-price-ref,
.jc-latest-price-ref-note {
    margin-top: 5px;
    padding: 6px 8px;
    border-left: 3px solid #16a34a;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    font-size: 11px;
    line-height: 1.35;
}
.jc-latest-price-ref strong,
.jc-latest-price-ref-note strong {
    color: #14532d;
}
html.rrv3-dark-mode .jc-latest-price-ref,
html.rrv3-dark-mode .jc-latest-price-ref-note {
    background: #052e16;
    border-left-color: #22c55e;
    color: #dcfce7;
}
html.rrv3-dark-mode .jc-latest-price-ref strong,
html.rrv3-dark-mode .jc-latest-price-ref-note strong {
    color: #bbf7d0;
}

/* 1607-17: Price Reference validity / expiry alerts */
.rrv3-price-ref-validity-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.2;
    border: 1px solid transparent;
    white-space: nowrap;
}
.rrv3-price-ref-validity-badge.validity-valid {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}
.rrv3-price-ref-validity-badge.validity-expiring,
.rrv3-price-ref-validity-badge.validity-due_today {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.rrv3-price-ref-validity-badge.validity-expired {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.rrv3-price-ref-validity-badge.validity-no_date {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}
.price-ref-validity-row.validity-expired td {
    background: #fff7f7;
}
.price-ref-validity-row.validity-expiring td,
.price-ref-validity-row.validity-due_today td {
    background: #fffdf3;
}
html.rrv3-dark-mode .rrv3-price-ref-validity-badge.validity-no_date {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}
html.rrv3-dark-mode .price-ref-validity-row.validity-expired td {
    background: rgba(127, 29, 29, 0.22);
}
html.rrv3-dark-mode .price-ref-validity-row.validity-expiring td,
html.rrv3-dark-mode .price-ref-validity-row.validity-due_today td {
    background: rgba(120, 53, 15, 0.18);
}

/* 1607-19: Manual Price Reference entry */
.rrv3-price-ref-manual-panel details {
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
    padding: 0;
    overflow: hidden;
}
.rrv3-price-ref-manual-panel summary {
    cursor: pointer;
    padding: 12px 14px;
    background: #eff6ff;
    color: #0f172a;
}
.rrv3-price-ref-manual-panel summary small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-weight: 600;
}
.rrv3-price-ref-manual-form {
    padding: 14px;
}
html.rrv3-dark-mode .rrv3-price-ref-manual-panel details,
html.rrv3-dark-mode .rrv3-price-ref-manual-panel summary {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
html.rrv3-dark-mode .rrv3-price-ref-manual-panel summary small {
    color: #94a3b8;
}

/* 1607-23: Archived Price Reference review */
.rrv3-price-ref-archived-section details {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}
.rrv3-price-ref-archived-section summary {
    cursor: pointer;
    padding: 12px 14px;
    background: #f1f5f9;
    color: #0f172a;
}
.rrv3-price-ref-archived-section summary small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-weight: 600;
}
.rrv3-price-ref-archived-body {
    padding: 14px;
}
html.rrv3-dark-mode .rrv3-price-ref-archived-section details,
html.rrv3-dark-mode .rrv3-price-ref-archived-section summary {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
html.rrv3-dark-mode .rrv3-price-ref-archived-section summary small {
    color: #94a3b8;
}

/* 1607-24: Compact Price Reference dashboard widgets */
.rrv3-price-ref-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.rrv3-price-ref-widget-head h3 {
    margin: 0;
}
.rrv3-price-ref-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.rrv3-price-ref-mini-grid > div {
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.rrv3-price-ref-mini-grid > div.needs-attention {
    border-color: #facc15;
    background: #fffbeb;
}
.rrv3-price-ref-mini-grid label,
.rrv3-price-ref-mini-grid strong {
    display: block;
}
.rrv3-price-ref-mini-grid label {
    font-size: 10px;
    color: #64748b;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rrv3-price-ref-mini-grid strong {
    margin-top: 3px;
    color: #0f172a;
    font-size: 18px;
}
.rrv3-price-ref-widget-alerts {
    margin-top: 10px;
}
html.rrv3-dark-mode .rrv3-price-ref-mini-grid > div {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode .rrv3-price-ref-mini-grid > div.needs-attention {
    background: rgba(120, 53, 15, 0.22);
    border-color: #92400e;
}
html.rrv3-dark-mode .rrv3-price-ref-mini-grid label {
    color: #94a3b8;
}
html.rrv3-dark-mode .rrv3-price-ref-mini-grid strong {
    color: #e2e8f0;
}

/* 1607-28: Price reference backup visibility in approval pages */
.rrv3-price-ref-related-box {
    border-left: 4px solid #2563eb;
    background: #f8fbff;
}
.rrv3-price-ref-related-table td {
    vertical-align: top;
}
.rrv3-cwr-price-ref-section > .rrv3-price-ref-related-box {
    margin: 0;
    box-shadow: none;
}
html.rrv3-dark-mode .rrv3-price-ref-related-box {
    background: #0f172a;
    border-left-color: #60a5fa;
}

/* 1607-29: Price references inside Quotation / Sales Order review pages */
.rrv3-so-sbu-review-price-ref .rrv3-price-ref-related-box {
    margin: 0;
    box-shadow: none;
}
.rrv3-quote-print-view .rrv3-price-ref-related-box {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

/* 1607-30: Supplier/vendor detail view */
.rrv3-price-ref-supplier-head {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.rrv3-price-ref-supplier-head > div,
.rrv3-price-ref-supplier-catalog-list > div {
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.rrv3-price-ref-supplier-head label,
.rrv3-price-ref-supplier-head strong,
.rrv3-price-ref-supplier-head small,
.rrv3-price-ref-supplier-catalog-list strong,
.rrv3-price-ref-supplier-catalog-list small {
    display: block;
}
.rrv3-price-ref-supplier-head label {
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rrv3-price-ref-supplier-head strong {
    margin-top: 3px;
    color: #0f172a;
}
.rrv3-price-ref-supplier-catalog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.rrv3-price-ref-supplier-catalog-list small {
    color: #64748b;
    margin-top: 3px;
}
.rrv3-price-ref-supplier-table td {
    vertical-align: top;
}
.supplier-ref-status-archived td {
    opacity: .72;
    background: #f8fafc;
}
html.rrv3-dark-mode .rrv3-price-ref-supplier-head > div,
html.rrv3-dark-mode .rrv3-price-ref-supplier-catalog-list > div,
html.rrv3-dark-mode .supplier-ref-status-archived td {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode .rrv3-price-ref-supplier-head strong,
html.rrv3-dark-mode .rrv3-price-ref-supplier-catalog-list strong {
    color: #e2e8f0;
}
html.rrv3-dark-mode .rrv3-price-ref-supplier-head label,
html.rrv3-dark-mode .rrv3-price-ref-supplier-catalog-list small {
    color: #94a3b8;
}

/* 1607-31: Price Reference possible duplicate detection */
.rrv3-price-ref-duplicates-section details {
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: #fffbeb;
    overflow: hidden;
}
.rrv3-price-ref-duplicates-section summary {
    cursor: pointer;
    padding: 12px 14px;
    background: #fef3c7;
    color: #78350f;
}
.rrv3-price-ref-duplicates-section summary small {
    display: block;
    margin-top: 3px;
    color: #92400e;
    font-weight: 600;
}
.rrv3-price-ref-duplicates-body {
    padding: 14px;
}
.rrv3-price-ref-duplicate-group {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #facc15;
    border-radius: 12px;
    background: #ffffff;
}
.rrv3-price-ref-duplicate-group h4 {
    margin: 0 0 10px;
    color: #78350f;
}
.rrv3-price-ref-duplicate-group h4 small {
    color: #92400e;
    font-weight: 700;
}
html.rrv3-dark-mode .rrv3-price-ref-duplicates-section details,
html.rrv3-dark-mode .rrv3-price-ref-duplicate-group {
    background: #0f172a;
    border-color: #92400e;
}
html.rrv3-dark-mode .rrv3-price-ref-duplicates-section summary {
    background: rgba(120, 53, 15, 0.3);
    color: #fde68a;
}
html.rrv3-dark-mode .rrv3-price-ref-duplicates-section summary small,
html.rrv3-dark-mode .rrv3-price-ref-duplicate-group h4,
html.rrv3-dark-mode .rrv3-price-ref-duplicate-group h4 small {
    color: #fcd34d;
}

/* 1607-34: Extracted price reference line catalog matching */
.rrv3-price-ref-lines-head {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.rrv3-price-ref-lines-table td {
    vertical-align: top;
}
.price-ref-line-current-match strong,
.price-ref-line-current-match small {
    display: block;
}
.price-ref-line-current-match small {
    color: #64748b;
    margin-top: 2px;
}
html.rrv3-dark-mode .rrv3-price-ref-lines-head {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode .price-ref-line-current-match small {
    color: #94a3b8;
}

/* 1607-35: line-level matched prices in catalog history */
.rrv3-price-ref-level-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10.5px;
    font-weight: 900;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    white-space: nowrap;
}
.rrv3-price-ref-level-badge.level-line {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}
.rrv3-price-ref-level-badge.level-document {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
html.rrv3-dark-mode .rrv3-price-ref-level-badge.level-line {
    background: #052e16;
    border-color: #166534;
    color: #bbf7d0;
}
html.rrv3-dark-mode .rrv3-price-ref-level-badge.level-document {
    background: #172554;
    border-color: #1d4ed8;
    color: #dbeafe;
}

/* 1607-39: AI classification / applicability for extracted price reference lines */
.rrv3-price-ref-lines-table select.rrv3-price-ref-line-category,
.rrv3-price-ref-lines-table select.rrv3-price-ref-line-applicability {
    width: 100%;
    min-width: 135px;
    padding: 5px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 11.5px;
    background: #ffffff;
}
.rrv3-price-ref-review-status {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
}
.rrv3-price-ref-ai-reason {
    max-width: 260px;
    color: #475569;
    font-size: 11.5px;
    line-height: 1.35;
}
html.rrv3-dark-mode .rrv3-price-ref-lines-table select.rrv3-price-ref-line-category,
html.rrv3-dark-mode .rrv3-price-ref-lines-table select.rrv3-price-ref-line-applicability {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
html.rrv3-dark-mode .rrv3-price-ref-review-status,
html.rrv3-dark-mode .rrv3-price-ref-ai-reason {
    color: #94a3b8;
}

/* 1607-40: Split Admin Panel hub and subpages */
.rrv3-admin-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.rrv3-admin-hub-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 150px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    text-decoration: none !important;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.rrv3-admin-hub-card:hover {
    transform: translateY(-2px);
    border-color: #60a5fa;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
}
.rrv3-admin-hub-icon {
    font-size: 28px;
    line-height: 1;
}
.rrv3-admin-hub-card strong {
    font-size: 16px;
    font-weight: 900;
}
.rrv3-admin-hub-card small {
    color: #64748b;
    line-height: 1.4;
}
.rrv3-admin-hub-card em {
    margin-top: auto;
    color: #1d4ed8;
    font-style: normal;
    font-size: 11.5px;
    font-weight: 800;
}
.rrv3-admin-mini-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.rrv3-admin-mini-nav a {
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    color: #334155;
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}
.rrv3-admin-mini-nav a.active,
.rrv3-admin-mini-nav a:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}
html.rrv3-dark-mode .rrv3-admin-hub-card,
html.rrv3-dark-mode .rrv3-admin-mini-nav {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
html.rrv3-dark-mode .rrv3-admin-hub-card small,
html.rrv3-dark-mode .rrv3-admin-hub-card em {
    color: #93c5fd;
}
html.rrv3-dark-mode .rrv3-admin-mini-nav a {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

/* 1607-43: Storage settings */
.rrv3-storage-settings code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #e2e8f0;
    color: #0f172a;
}
.rrv3-storage-settings pre {
    font-size: 12px;
    line-height: 1.45;
    overflow: auto;
}
html.rrv3-dark-mode .rrv3-storage-settings code,
html.rrv3-dark-mode .rrv3-storage-settings pre {
    background: #0f172a !important;
    color: #e2e8f0;
    border-color: #334155 !important;
}

/* 2007-01: UAT issue management modal */
.rrv3-uat-manage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 14px;
}
#rrv3-uat-manage-modal .rrv3-modal-content {
    max-width: 1180px;
}
#rrv3-uat-manage-description-text {
    white-space: pre-wrap;
    word-break: break-word;
}
#rrv3-uat-manage-modal .rrv3-cwr-text-block {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
#rrv3-uat-manage-modal .rrv3-cwr-text-block label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
@media (max-width: 820px) {
    .rrv3-uat-manage-grid {
        grid-template-columns: 1fr;
    }
}
html.rrv3-dark-mode #rrv3-uat-manage-modal .rrv3-cwr-text-block {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode #rrv3-uat-manage-modal .rrv3-cwr-text-block label {
    color: #94a3b8;
}

/* 2007-02: UAT evidence preview */
.rrv3-uat-evidence-preview {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.rrv3-uat-evidence-preview h4 {
    margin: 0 0 10px;
    color: #0f172a;
}
.rrv3-uat-evidence-image-link {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}
.rrv3-uat-evidence-image-link img {
    display: block;
    max-width: 100%;
    max-height: 420px;
    margin: 0 auto;
    object-fit: contain;
}
.rrv3-uat-evidence-file-card {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}
.rrv3-uat-evidence-file-card span {
    color: #64748b;
    font-size: 12px;
    word-break: break-all;
}
html.rrv3-dark-mode .rrv3-uat-evidence-preview,
html.rrv3-dark-mode .rrv3-uat-evidence-file-card,
html.rrv3-dark-mode .rrv3-uat-evidence-image-link {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode .rrv3-uat-evidence-preview h4 {
    color: #e2e8f0;
}
html.rrv3-dark-mode .rrv3-uat-evidence-file-card span {
    color: #94a3b8;
}

/* 2007-07: UAT quick status actions */
.rrv3-uat-quick-actions {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.rrv3-uat-quick-actions > label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
html.rrv3-dark-mode .rrv3-uat-quick-actions {
    background: #0f172a;
    border-color: #334155;
}
html.rrv3-dark-mode .rrv3-uat-quick-actions > label {
    color: #94a3b8;
}
