/* ==========================================================================
   CLAUDE.CSS — Valianna Inventory System
   Shared design system for all portal blade views.
   Covers: crm-purchase (lpo-*) and crm-requisition (req-*) packages.
   Loaded globally via portal layout after portal-theme.css.
   ========================================================================== */


/* ==========================================================================
   SECTION 1: LPO (crm-purchase) DESIGN SYSTEM
   ========================================================================== */

/* ── 1.1 Page Headers ── */
.lpo-page-hdr {
    background: #0c2040; border-radius: 12px 12px 0 0;
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.lpo-page-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.lpo-page-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.lpo-new-hdr,
.lpo-show-hdr,
.lpo-edit-hdr,
.lpo-dlv-hdr,
.lpo-stk-hdr {
    background: #0c2040; border-radius: 12px; padding: 20px 24px;
    margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.lpo-new-hdr h4,  .lpo-show-hdr h4,  .lpo-edit-hdr h4,
.lpo-dlv-hdr h4,  .lpo-stk-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.lpo-new-hdr p,   .lpo-show-hdr p,   .lpo-edit-hdr p,
.lpo-dlv-hdr p,   .lpo-stk-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.lpo-show-hdr { align-items: flex-start; gap: 14px; }

.lpo-pay-hdr {
    background: #0c2040; border-radius: 12px 12px 0 0;
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.lpo-pay-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.lpo-pay-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.lpo-add-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 8px;
    padding: 8px 18px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s ease;
}
.lpo-add-btn:hover { background: #0284c7; color: #fff; }

/* ── 1.2 Analytics / Stat Cards ── */
.lpo-wrap {
    background: #f8fafc; border: 1px solid #e2e8f0; border-bottom: none;
    border-radius: 12px 12px 0 0; overflow: hidden;
}
.lpo-analytics {
    display: flex; gap: 12px; flex-wrap: wrap; padding: 18px 20px 0; background: #f8fafc;
}
.lpo-stat-card {
    flex: 1; min-width: 140px; background: #fff; border-radius: 10px;
    border: 1px solid #e2e8f0; border-top: 3px solid #e2e8f0;
    padding: 14px 18px; display: flex; flex-direction: column; gap: 4px;
}
.lpo-stat-card.sc-total   { border-top-color: #0ea5e9; }
.lpo-stat-card.sc-draft   { border-top-color: #94a3b8; }
.lpo-stat-card.sc-pending { border-top-color: #f59e0b; }
.lpo-stat-card.sc-approved{ border-top-color: #2563eb; }
.lpo-stat-card.sc-done    { border-top-color: #16a34a; }
.lpo-stat-card .sc-icon   { font-size: 1.1rem; margin-bottom: 4px; opacity: 0.7; }
.lpo-stat-card .sc-val    { font-size: 1.5rem; font-weight: 800; color: #0c2040; line-height: 1; }
.lpo-stat-card .sc-label  { font-size: 0.72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.lpo-stat-card .sc-sub    { font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }

/* ── 1.3 Filter Bar ── */
.lpo-filter-bar {
    background: #fff; padding: 14px 20px;
    border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; border-top: 1px solid #e2e8f0;
}
.lpo-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.lpo-filter-group { display: flex; flex-direction: column; gap: 4px; }
.lpo-filter-group label { font-size: 0.72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.lpo-filter-input, .lpo-filter-select {
    border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 7px 11px;
    font-size: 0.8125rem; color: #1e293b; background: #fff; outline: none;
    transition: border-color 0.15s ease;
}
.lpo-filter-input:focus, .lpo-filter-select:focus { border-color: #0ea5e9; }
.lpo-filter-btn {
    background: #0c2040; color: #fff; border: none; border-radius: 8px;
    padding: 7px 16px; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
}
.lpo-reset-btn {
    background: #f1f5f9; color: #475569; border: none; border-radius: 8px;
    padding: 7px 16px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
    transition: background 0.15s ease;
}
.lpo-reset-btn:hover { background: #e2e8f0; color: #334155; }

/* ── 1.4 Table Cards & Tables ── */
.lpo-table-card {
    background: #fff; border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0; border-top: none; overflow: hidden;
}
.lpo-table-inner { padding: 16px 20px 20px; }

.lpo-pay-card {
    background: #fff; border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0; border-top: none; overflow: hidden;
}
.lpo-pay-inner { padding: 20px; }

.lpo-tbl { width: 100%; border-collapse: collapse; }
.lpo-tbl thead th {
    background: #0c2040; color: #7dd3fc;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 14px 18px; border: none; white-space: nowrap;
}
.lpo-tbl tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.lpo-tbl tbody tr:hover { background: #f0f9ff; box-shadow: inset 4px 0 0 #0ea5e9; }
.lpo-tbl tbody td { padding: 13px 18px; font-size: 0.8125rem; color: #334155; border: none; vertical-align: middle; }

/* Cart table (create / edit views) */
.lpo-cart-table { width: 100%; border-collapse: collapse; }
.lpo-cart-table thead th {
    background: #0c2040; color: #7dd3fc;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 13px 18px; border: none;
}
.lpo-cart-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.lpo-cart-table tbody tr:hover { background: #f0f9ff; }
.lpo-cart-table tbody td { padding: 12px 18px; font-size: 0.875rem; color: #334155; border: none; vertical-align: middle; }

/* Detail items table */
.lpo-items-tbl { width: 100%; border-collapse: collapse; }
.lpo-items-tbl thead th {
    background: #0c2040; color: #7dd3fc;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 13px 18px; border: none;
}
.lpo-items-tbl tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.lpo-items-tbl tbody tr:hover { background: #f0f9ff; }
.lpo-items-tbl tbody td { padding: 12px 18px; font-size: 0.8125rem; color: #334155; border: none; vertical-align: middle; }
.lpo-items-tbl tfoot td { padding: 11px 18px; font-size: 0.82rem; border-top: 2px solid #e0f2fe; background: #f0f9ff; }
.lpo-items-tbl tfoot .lbl { font-weight: 700; color: #0c2040; }
.lpo-items-tbl tfoot .val { font-weight: 700; color: #0c2040; font-family: monospace; text-align: right; }
.lpo-items-tbl tfoot .grand { color: #1d4ed8; }

/* Delivery table */
.lpo-dlv-tbl { width: 100%; border-collapse: collapse; }
.lpo-dlv-tbl thead th {
    background: #0c2040; color: #7dd3fc;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 13px 18px; border: none;
}
.lpo-dlv-tbl tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.lpo-dlv-tbl tbody tr:hover { background: #f0f9ff; }
.lpo-dlv-tbl tbody td { padding: 12px 18px; font-size: 0.8125rem; color: #334155; border: none; vertical-align: middle; }
.lpo-dlv-tbl tfoot td { padding: 11px 18px; font-size: 0.82rem; border-top: 2px solid #e0f2fe; background: #f0f9ff; }
.lpo-dlv-tbl tfoot .lbl { font-weight: 700; color: #0c2040; }
.lpo-dlv-tbl tfoot .val { font-weight: 700; color: #0c2040; font-family: monospace; }
.lpo-dlv-tbl tfoot .grand { color: #1d4ed8; }

/* Stock verification table */
.lpo-stk-tbl { width: 100%; border-collapse: collapse; }
.lpo-stk-tbl thead th {
    background: #0c2040; color: #7dd3fc;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 13px 18px; border: none;
}
.lpo-stk-tbl tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.lpo-stk-tbl tbody tr:hover { background: #f0f9ff; }
.lpo-stk-tbl tbody td { padding: 12px 18px; font-size: 0.8125rem; color: #334155; border: none; vertical-align: middle; }

/* DataTable overrides */
.lpo-dt-table thead th {
    background: #0c2040 !important; color: #7dd3fc !important;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 13px 18px; border: none !important;
}
.lpo-dt-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.lpo-dt-table tbody tr:hover { background: #f0f9ff; box-shadow: inset 4px 0 0 #0ea5e9; }
.lpo-dt-table tbody td { padding: 12px 18px; font-size: 0.8125rem; color: #334155; border: none; vertical-align: middle; }
.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid #e2e8f0 !important; border-radius: 8px !important;
    padding: 7px 12px !important; font-size: 0.8125rem !important; outline: none !important;
    transition: border-color 0.15s ease !important;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: #0ea5e9 !important; }
.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid #e2e8f0 !important; border-radius: 8px !important;
    padding: 6px 10px !important; font-size: 0.8125rem !important;
}
.dataTables_wrapper .dataTables_info { font-size: 0.78rem; color: #94a3b8; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0ea5e9 !important; color: #fff !important; border-radius: 6px !important; border: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f0f9ff !important; color: #0ea5e9 !important; border-radius: 6px !important; border: 1px solid #bae6fd !important;
}

/* Table footer rows */
.lpo-tfoot-row td { padding: 11px 18px; font-size: 0.82rem; border-top: 2px solid #e0f2fe; border-bottom: none; background: #f0f9ff; }
.lpo-tfoot-label  { font-weight: 700; color: #0c2040; text-align: right; }
.lpo-tfoot-val    { font-weight: 700; color: #0c2040; font-family: monospace; }
.lpo-grand-val    { color: #1d4ed8; }

/* ── 1.5 Status & Payment Badges ── */
.lpo-order-badge {
    display: inline-block; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
    border-radius: 6px; padding: 3px 10px; font-family: monospace; font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.lpo-order-badge:hover { background: #dbeafe; color: #1d4ed8; }

.lpo-status-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}
.lpo-status-pill.draft                      { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.lpo-status-pill.pending-approval           { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.lpo-status-pill.queried                    { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.lpo-status-pill.approved                   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.lpo-status-pill.pending-delivery           { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.lpo-status-pill.pending-delivery-verification { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.lpo-status-pill.delivered                  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.lpo-status-pill.pending-processing         { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.lpo-status-pill.pending-new-stock-verification { background: #f0fdf4; color: #065f46; border: 1px solid #a7f3d0; }
.lpo-status-pill.processed                  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.lpo-status-pill.cancelled                  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lpo-status-pill.pending-acknowledgement    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.lpo-status-pill.pending-expense-confirmation { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

.lpo-pay-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 600;
}
.lpo-pay-pill.paid    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.lpo-pay-pill.unpaid  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lpo-pay-pill.partial { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.lpo-pay-pill.credit  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.lpo-stk-status {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
}
.lpo-stk-status.awaiting  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.lpo-stk-status.confirmed { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── 1.6 Action Buttons ── */
.lpo-action-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lpo-act-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 8px; padding: 7px 15px; font-size: 0.8rem; font-weight: 600;
    text-decoration: none; transition: all 0.15s ease; border: none; cursor: pointer; white-space: nowrap;
}
.lpo-act-btn.success { background: #22c55e; color: #fff; }
.lpo-act-btn.success:hover { background: #16a34a; color: #fff; }
.lpo-act-btn.primary { background: #2563eb; color: #fff; }
.lpo-act-btn.primary:hover { background: #1d4ed8; color: #fff; }
.lpo-act-btn.sky { background: #0ea5e9; color: #fff; }
.lpo-act-btn.sky:hover { background: #0284c7; color: #fff; }
.lpo-act-btn.warning { background: #f59e0b; color: #fff; }
.lpo-act-btn.warning:hover { background: #d97706; color: #fff; }
.lpo-act-btn.danger { background: #ef4444; color: #fff; }
.lpo-act-btn.danger:hover { background: #dc2626; color: #fff; }
.lpo-act-btn.slate { background: #64748b; color: #fff; }
.lpo-act-btn.slate:hover { background: #475569; color: #fff; }
.lpo-act-btn.ghost { background: rgba(255,255,255,0.1); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.2); }
.lpo-act-btn.ghost:hover { background: rgba(255,255,255,0.2); color: #fff; text-decoration: none; }
.lpo-act-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.15); margin: 0 2px; }

.lpo-hdr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lpo-hdr-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 8px; padding: 7px 16px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; transition: background 0.15s ease; border: none; cursor: pointer;
}
.lpo-hdr-btn.ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1.5px solid rgba(255,255,255,0.2); }
.lpo-hdr-btn.ghost:hover { background: rgba(255,255,255,0.18); color: #fff; text-decoration: none; }
.lpo-hdr-btn.danger { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.lpo-hdr-btn.danger:hover { background: rgba(239,68,68,0.3); color: #fff; }

.lpo-view-btn {
    background: #eff6ff; color: #0369a1; border: none; border-radius: 6px;
    padding: 5px 12px; font-size: 0.78rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
    transition: background 0.15s ease;
}
.lpo-view-btn:hover { background: #dbeafe; color: #0369a1; }

.lpo-tbl-btn {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 6px; padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
    border: none; cursor: pointer; transition: background 0.12s; text-decoration: none;
}
.lpo-tbl-btn.edit    { background: #eff6ff; color: #1d4ed8; }
.lpo-tbl-btn.edit:hover { background: #dbeafe; }
.lpo-tbl-btn.rmv     { background: #fef2f2; color: #dc2626; }
.lpo-tbl-btn.rmv:hover { background: #fee2e2; }
.lpo-tbl-btn.add     { background: #f0fdf4; color: #166534; }
.lpo-tbl-btn.add:hover { background: #dcfce7; }
.lpo-tbl-btn.confirm { background: #eff6ff; color: #1d4ed8; }
.lpo-tbl-btn.confirm:hover { background: #dbeafe; }

.lpo-add-row-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0;
    border-radius: 7px; padding: 5px 14px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: background 0.12s;
}
.lpo-add-row-btn:hover { background: #dcfce7; }

.lpo-edit-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.1); color: #fff; border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 8px; padding: 7px 16px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; transition: background 0.15s ease; cursor: pointer;
}
.lpo-edit-back:hover { background: rgba(255,255,255,0.18); color: #fff; text-decoration: none; }

.lpo-edit-dlv-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: #eff6ff; color: #1d4ed8; border: none; border-radius: 6px;
    padding: 5px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: background 0.12s;
}
.lpo-edit-dlv-btn:hover { background: #dbeafe; }

.lpo-rm-btn {
    background: #fef2f2; color: #dc2626; border: none; border-radius: 5px;
    padding: 4px 10px; font-size: 0.75rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 3px; transition: background 0.12s;
}
.lpo-rm-btn:hover { background: #fee2e2; }

/* ── 1.7 Cards ── */
.lpo-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px; }
.lpo-card-hdr {
    background: #f0f9ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.lpo-card-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.lpo-card-body { padding: 20px; }
.lpo-card-footer {
    padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.lpo-detail-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px; }
.lpo-detail-hdr {
    background: #f0f9ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.lpo-detail-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.lpo-detail-body  { padding: 20px; }

/* Meta grid (detail view) */
.lpo-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.lpo-meta-col  { padding: 16px 20px; }
.lpo-meta-col:first-child { border-right: 1px solid #e2e8f0; }
.lpo-meta-row  { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.82rem; }
.lpo-meta-row:last-child { border-bottom: none; }
.lpo-meta-label { color: #64748b; font-weight: 500; }
.lpo-meta-val   { color: #0c2040; font-weight: 700; text-align: right; }
.lpo-meta-mono  { font-family: monospace; }

/* Total summary boxes */
.lpo-total-box {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
    padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0;
}
.lpo-total-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 16px; }
.lpo-total-item .t-label { font-size: 0.7rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.lpo-total-item .t-val   { font-size: 2rem; font-weight: 800; color: #0c2040; font-family: monospace; }
.lpo-total-item.t-grand  { border-color: #bfdbfe; background: #eff6ff; }
.lpo-total-item.t-grand .t-label { color: #1d4ed8; }
.lpo-total-item.t-grand .t-val   { color: #1d4ed8; }
.lpo-total-item.t-due   { border-color: #fecaca; background: #fef2f2; }
.lpo-total-item.t-due .t-label { color: #b91c1c; }
.lpo-total-item.t-due .t-val   { color: #b91c1c; }
.lpo-total-item.t-paid  { border-color: #bbf7d0; background: #f0fdf4; }
.lpo-total-item.t-paid .t-label { color: #166534; }
.lpo-total-item.t-paid .t-val   { color: #166534; }

/* ── 1.8 Info Strip ── */
.lpo-info-strip { display: flex; gap: 24px; flex-wrap: wrap; padding: 14px 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.lpo-info-item  { display: flex; flex-direction: column; gap: 2px; }
.lpo-info-item .lbl  { font-size: 0.68rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.lpo-info-item .val  { font-size: 0.875rem; font-weight: 700; color: #0c2040; }
.lpo-info-item .mono { font-family: monospace; }
.lpo-info-item .val.mono { font-family: monospace; }

/* ── 1.9 Form Fields ── */
.lpo-field-group { margin-bottom: 16px; }
.lpo-field-group label {
    display: block; font-size: 0.78rem; font-weight: 600; color: #374151;
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.lpo-input, .lpo-select, .lpo-textarea {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: 9px 12px; font-size: 0.875rem; color: #1e293b; background: #fff;
    outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lpo-input:focus, .lpo-select:focus, .lpo-textarea:focus {
    border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}
.lpo-input[readonly] { background: #f8fafc; color: #64748b; cursor: default; }
.lpo-textarea { resize: vertical; min-height: 80px; }

.lpo-item-input {
    border: 1.5px solid #e2e8f0; border-radius: 6px; padding: 6px 10px;
    font-size: 0.83rem; color: #1e293b; background: #fff; outline: none; width: 100%;
    transition: border-color 0.15s ease;
}
.lpo-item-input:focus { border-color: #0ea5e9; }
.lpo-item-input[readonly] { background: #f8fafc; color: #64748b; }

/* Quantity controls */
.lpo-qty-ctrl { display: flex; align-items: center; gap: 6px; }
.lpo-qty-btn {
    width: 28px; height: 28px; border-radius: 6px; border: 1.5px solid #e2e8f0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.12s; flex-shrink: 0; background: none;
}
.lpo-qty-btn.minus { background: #f1f5f9; color: #475569; }
.lpo-qty-btn.minus:hover { background: #e2e8f0; border-color: #cbd5e1; }
.lpo-qty-btn.plus  { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.lpo-qty-btn.plus:hover  { background: #dbeafe; }
.lpo-qty-num {
    width: 50px; text-align: center; border: 1.5px solid #e2e8f0;
    border-radius: 6px; padding: 4px 6px; font-size: 0.875rem; font-weight: 600;
}

/* ── 1.10 Alerts ── */
.lpo-alert {
    border-radius: 8px; padding: 10px 14px; font-size: 0.8125rem; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.lpo-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lpo-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.lpo-refund-note {
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 20px;
    display: flex; align-items: flex-start; gap: 10px; font-size: 0.82rem; color: #92400e;
}

/* ── 1.11 Submit Buttons ── */
.lpo-submit-btn {
    background: #0c2040; color: #fff; border: none; border-radius: 8px;
    padding: 10px 24px; font-size: 0.875rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px; transition: background 0.15s ease;
}
.lpo-submit-btn:hover { background: #1e3a5f; }
.lpo-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── 1.12 Modals (crm-purchase) ── */
.lpo-modal-content { border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
.lpo-modal-header  {
    padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
}
.lpo-modal-header h5 { font-size: 0.9rem; font-weight: 700; margin: 0; color: #fff; }
.lpo-modal-header.navy-hdr  { background: #0c2040; }
.lpo-modal-header.green-hdr { background: #166534; }
.lpo-modal-header.red-hdr   { background: #b91c1c; }
.lpo-modal-header.sky-hdr   { background: #0369a1; }
.lpo-modal-body   { padding: 20px; background: #fff; }
.lpo-modal-footer { padding: 14px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 10px; }
.lpo-modal-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 8px; padding: 9px 20px; font-size: 0.875rem; font-weight: 600;
    border: none; cursor: pointer; transition: background 0.15s ease;
}
.lpo-modal-btn.success { background: #16a34a; color: #fff; }
.lpo-modal-btn.success:hover { background: #15803d; }
.lpo-modal-btn.danger  { background: #dc2626; color: #fff; }
.lpo-modal-btn.danger:hover  { background: #b91c1c; }
.lpo-modal-btn.primary { background: #2563eb; color: #fff; }
.lpo-modal-btn.primary:hover { background: #1d4ed8; }
.lpo-modal-btn.sky     { background: #0ea5e9; color: #fff; }
.lpo-modal-btn.sky:hover { background: #0284c7; }
.lpo-modal-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── 1.13 Miscellaneous ── */
.lpo-section-label {
    font-size: 0.7rem; font-weight: 700; color: #0ea5e9; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #e0f2fe;
}
.lpo-count-row { font-size: 0.78rem; color: #94a3b8; }
.lpo-amount { font-weight: 700; color: #0c2040; font-variant-numeric: tabular-nums; }

.lpo-empty-state { padding: 36px; text-align: center; color: #94a3b8; }
.lpo-empty-state i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: 0.4; }
.lpo-empty-cart { padding: 40px; text-align: center; color: #94a3b8; }
.lpo-empty-cart i { font-size: 2rem; display: block; margin-bottom: 10px; opacity: 0.4; }
.lpo-empty-cart p { font-size: 0.875rem; margin: 0; }

.lpo-portion-tag {
    display: inline-block; background: #f1f5f9; border: 1px solid #e2e8f0;
    border-radius: 6px; padding: 3px 10px; font-size: 0.75rem; color: #475569; margin: 2px;
}
.lpo-portion-meta { font-size: 0.72rem; color: #94a3b8; margin: 2px 0; }


/* ==========================================================================
   SECTION 2: REQ (crm-requisition) DESIGN SYSTEM
   ========================================================================== */

/* ── 2.1 Page Headers ── */
.req-page-hdr {
    background: #0c2040; border-radius: 12px 12px 0 0;
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.req-page-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.req-page-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.req-show-hdr {
    background: #0c2040; border-radius: 12px; padding: 20px 24px;
    margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.req-show-hdr-left h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.req-show-hdr-left p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }
.req-show-hdr-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.req-new-hdr {
    background: #0c2040; border-radius: 12px; padding: 20px 24px;
    margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.req-new-hdr-left h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.req-new-hdr-left p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.req-rcv-hdr {
    background: #0c2040; border-radius: 12px; padding: 20px 24px;
    margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.req-rcv-hdr-left h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.req-rcv-hdr-left p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.req-dept-page-hdr {
    background: #0c2040; border-radius: 12px; padding: 24px; margin-bottom: 24px;
}
.req-dept-page-hdr h4 { color: #fff; font-size: 1.1rem; font-weight: 700; margin: 0; }
.req-dept-page-hdr p  { color: #7dd3fc; font-size: 0.83rem; margin: 6px 0 0; }

.req-add-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 8px;
    padding: 8px 18px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s ease;
}
.req-add-btn:hover { background: #0284c7; color: #fff; }

.req-cancel-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.1); color: #fff; border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 8px; padding: 7px 16px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; transition: background 0.15s ease;
}
.req-cancel-btn:hover { background: rgba(255,255,255,0.18); color: #fff; text-decoration: none; }

/* ── 2.2 Analytics Bar ── */
.req-analytics-bar {
    display: flex; gap: 0; background: #fff;
    border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; border-top: 1px solid #e2e8f0;
}
.req-stat {
    flex: 1; padding: 14px 18px; border-right: 1px solid #e2e8f0;
    display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.req-stat:last-child { border-right: none; }
.req-stat .st-label { font-size: 0.68rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.req-stat .st-val   { font-size: 1.35rem; font-weight: 800; color: #0c2040; line-height: 1; }
.req-stat .st-sub   { font-size: 0.68rem; color: #94a3b8; }
.req-stat.total    .st-val { color: #0c2040; }
.req-stat.draft    .st-val { color: #475569; }
.req-stat.pending  .st-val { color: #92400e; }
.req-stat.approved .st-val { color: #1d4ed8; }
.req-stat.received .st-val { color: #166534; }
.req-stat.queried  .st-val { color: #9a3412; }
.req-stat .st-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
.req-stat.total    .st-dot { background: #0c2040; }
.req-stat.draft    .st-dot { background: #94a3b8; }
.req-stat.pending  .st-dot { background: #f59e0b; }
.req-stat.approved .st-dot { background: #3b82f6; }
.req-stat.received .st-dot { background: #22c55e; }
.req-stat.queried  .st-dot { background: #f97316; }

/* ── 2.3 Filter Bar ── */
.req-filter-bar {
    background: #f8fafc; padding: 14px 20px;
    border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; border-top: 1px solid #e0f2fe;
}
.req-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.req-filter-group { display: flex; flex-direction: column; gap: 4px; }
.req-filter-group label { font-size: 0.72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.req-filter-input, .req-filter-select {
    border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 7px 11px;
    font-size: 0.8125rem; color: #1e293b; background: #fff; outline: none;
    transition: border-color 0.15s ease;
}
.req-filter-input:focus, .req-filter-select:focus { border-color: #0ea5e9; }
.req-filter-btn {
    background: #0c2040; color: #fff; border: none; border-radius: 8px;
    padding: 7px 16px; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
}
.req-reset-btn {
    background: #f1f5f9; color: #475569; border: none; border-radius: 8px;
    padding: 7px 16px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
    transition: background 0.15s ease;
}
.req-reset-btn:hover { background: #e2e8f0; color: #334155; }

/* ── 2.4 Table Cards & Tables ── */
.req-table-card {
    background: #fff; border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0; border-top: none; overflow: hidden;
}
.req-table-inner { padding: 16px 20px 20px; }

.req-tbl { width: 100%; border-collapse: collapse; }
.req-tbl thead th {
    background: #0c2040; color: #7dd3fc;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 14px 18px; border: none; white-space: nowrap;
}
.req-tbl tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.req-tbl tbody tr:hover { background: #f0f9ff; box-shadow: inset 4px 0 0 #0ea5e9; }
.req-tbl tbody td { padding: 13px 18px; font-size: 0.8125rem; color: #334155; border: none; vertical-align: middle; }
.req-tbl tfoot td { padding: 10px 18px; font-size: 0.78rem; color: #94a3b8; border: none; background: #f8fafc; }

.req-item-table { width: 100%; border-collapse: collapse; }
.req-item-table thead th {
    background: #0c2040; color: #fff; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 16px; border: none;
}
.req-item-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.req-item-table tbody tr:hover { background: #f0f9ff; }
.req-item-table tbody td { padding: 10px 16px; font-size: 0.875rem; color: #334155; vertical-align: middle; border: none; }

.req-rcv-table { width: 100%; border-collapse: collapse; }
.req-rcv-table thead th {
    background: #0c2040; color: #fff; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 16px; border: none;
}
.req-rcv-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.req-rcv-table tbody tr:hover { background: #f0f9ff; }
.req-rcv-table tbody td { padding: 12px 16px; font-size: 0.875rem; color: #334155; vertical-align: middle; border: none; }

/* Logs table */
.req-log-tbl { width: 100%; border-collapse: collapse; }
.req-log-tbl thead th {
    background: #0c2040; color: #7dd3fc;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 13px 18px; border: none;
}
.req-log-tbl tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s; }
.req-log-tbl tbody tr:hover { background: #f0f9ff; box-shadow: inset 4px 0 0 #0ea5e9; }
.req-log-tbl tbody td { padding: 12px 18px; font-size: 0.8125rem; color: #334155; border: none; vertical-align: middle; }

/* ── 2.5 Status Badges ── */
.req-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.req-badge.draft            { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.req-badge.pending-approval { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.req-badge.queried          { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.req-badge.approved         { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.req-badge.pending-receive  { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.req-badge.received         { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.req-badge.cancelled        { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.req-status-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}
.req-status-pill.draft            { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.req-status-pill.pending-approval { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.req-status-pill.queried          { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.req-status-pill.approved         { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.req-status-pill.pending-receive  { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.req-status-pill.received         { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.req-status-pill.cancelled        { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.req-rcv-status {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
    background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd;
}

.req-ref-badge {
    display: inline-block; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
    border-radius: 6px; padding: 3px 10px; font-family: monospace; font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.req-ref-badge:hover { background: #dbeafe; color: #1d4ed8; }
.req-ref-badge.danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

/* ── 2.6 Action Buttons ── */
.req-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
    border: none; cursor: pointer; text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}
.req-action-btn:hover { transform: translateY(-1px); text-decoration: none; }
.req-action-btn.ab-success { background: #16a34a; color: #fff; }
.req-action-btn.ab-success:hover { background: #15803d; color: #fff; }
.req-action-btn.ab-danger  { background: #dc2626; color: #fff; }
.req-action-btn.ab-danger:hover  { background: #b91c1c; color: #fff; }
.req-action-btn.ab-info    { background: #0369a1; color: #fff; }
.req-action-btn.ab-info:hover    { background: #1d4ed8; color: #fff; }
.req-action-btn.ab-slate   { background: #475569; color: #fff; }
.req-action-btn.ab-slate:hover   { background: #334155; color: #fff; }

.req-view-btn {
    background: #eff6ff; color: #0369a1; border: none; border-radius: 6px;
    padding: 5px 12px; font-size: 0.78rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
    transition: background 0.15s ease;
}
.req-view-btn:hover { background: #dbeafe; color: #0369a1; }

.req-add-item-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 6px;
    padding: 6px 14px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; transition: background 0.15s ease;
}
.req-add-item-btn:hover { background: #0284c7; }

.req-edit-row-btn {
    background: #eff6ff; color: #0369a1; border: none; border-radius: 5px;
    padding: 4px 10px; font-size: 0.72rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s ease;
}
.req-edit-row-btn:hover { background: #dbeafe; }

.req-rm-row-btn {
    background: #fef2f2; color: #dc2626; border: none; border-radius: 5px;
    padding: 4px 10px; font-size: 0.72rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s ease;
}
.req-rm-row-btn:hover { background: #fee2e2; }

.req-rm-btn {
    background: #fef2f2; color: #dc2626; border: none; border-radius: 5px;
    padding: 4px 10px; font-size: 0.75rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 3px; transition: background 0.12s;
}
.req-rm-btn:hover { background: #fee2e2; }

/* ── 2.7 Cards ── */
.req-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px; }
.req-card-hdr { background: #f0f9ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe; display: flex; align-items: center; gap: 8px; }
.req-card-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.req-card-body { padding: 20px; }
.req-card-footer {
    padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.req-meta-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px; }
.req-meta-hdr  { background: #eff6ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe; }
.req-meta-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.req-meta-body { padding: 16px 20px; }
.req-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .req-meta-grid { grid-template-columns: 1fr; } }
.req-meta-item .lbl { font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.req-meta-item .val { font-size: 0.875rem; font-weight: 600; color: #1e293b; }

.req-items-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
.req-items-hdr  {
    background: #eff6ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.req-items-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }

.req-rcv-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px; }
.req-rcv-card-hdr { background: #f0f9ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe; display: flex; align-items: center; gap: 8px; }
.req-rcv-card-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.req-rcv-card-body { padding: 20px; }

.req-rcv-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 4px; }
@media (max-width: 768px) { .req-rcv-meta-grid { grid-template-columns: 1fr; } }
.req-rcv-meta-item .lbl { font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.req-rcv-meta-item .val { font-size: 0.875rem; font-weight: 600; color: #1e293b; }

.req-rcv-footer {
    padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 12px;
}
.req-rcv-confirm-btn {
    background: #16a34a; color: #fff; border: none; border-radius: 8px;
    padding: 10px 24px; font-size: 0.875rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px; transition: background 0.15s ease;
}
.req-rcv-confirm-btn:hover { background: #15803d; }
.req-rcv-confirm-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── 2.8 Form Fields ── */
.req-field-group { margin-bottom: 16px; }
.req-field-group label {
    display: block; font-size: 0.78rem; font-weight: 600; color: #374151;
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.req-input, .req-select, .req-textarea {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: 9px 12px; font-size: 0.875rem; color: #1e293b; background: #fff;
    outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.req-input:focus, .req-select:focus, .req-textarea:focus {
    border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}
.req-input[readonly] { background: #f8fafc; color: #64748b; cursor: default; }
.req-textarea { resize: vertical; min-height: 80px; }

/* Receive-page form fields */
.req-rcv-field-group { margin-bottom: 16px; }
.req-rcv-field-group label {
    display: block; font-size: 0.78rem; font-weight: 600; color: #374151;
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.req-rcv-input, .req-rcv-textarea {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: 9px 12px; font-size: 0.875rem; color: #1e293b; background: #fff;
    outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.req-rcv-input:focus, .req-rcv-textarea:focus {
    border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}
.req-rcv-textarea { resize: vertical; min-height: 80px; }

/* Item-table inline inputs */
.req-item-input {
    border: 1.5px solid #e2e8f0; border-radius: 6px; padding: 6px 10px;
    font-size: 0.83rem; color: #1e293b; background: #fff; outline: none; width: 100%;
    transition: border-color 0.15s ease;
}
.req-item-input:focus { border-color: #0ea5e9; }
.req-item-input[readonly] { background: #f8fafc; color: #64748b; }

/* ── 2.9 Alerts ── */
.req-alert {
    border-radius: 8px; padding: 10px 14px; font-size: 0.8125rem; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.req-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.req-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.req-rcv-alert {
    border-radius: 8px; padding: 10px 14px; font-size: 0.8125rem; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.req-rcv-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.req-rcv-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── 2.10 Modals (crm-requisition) ── */
.req-modal-content { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.18); }
.req-modal-header  { padding: 18px 22px; border-bottom: none; display: flex; align-items: center; justify-content: space-between; }
.req-modal-header.create-hdr { background: #0c2040; }
.req-modal-header.edit-hdr   { background: #0369a1; }
.req-modal-header.teal-hdr   { background: #0f766e; }
.req-modal-header.danger-hdr { background: #991b1b; }
.req-modal-header.info-hdr   { background: #1e40af; }
.req-modal-header h5 { color: #fff; font-size: 0.9375rem; font-weight: 700; margin: 0; }
.req-modal-header .btn-close { filter: invert(1); opacity: 0.8; }
.req-modal-body  { padding: 22px; }
.req-modal-footer {
    padding: 16px 22px; background: #f8fafc; border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* Modal form fields */
.req-modal-field { margin-bottom: 16px; }
.req-modal-label {
    display: block; font-size: 0.78rem; font-weight: 600; color: #374151;
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.req-modal-input {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: 9px 12px; font-size: 0.875rem; color: #1e293b; background: #fff;
    outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.req-modal-input:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }

/* Danger body (delete modal) */
.req-danger-body { text-align: center; padding: 10px 0 6px; }
.req-danger-icon {
    width: 56px; height: 56px; background: #fef2f2; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px; font-size: 1.5rem; color: #dc2626;
}
.req-danger-body h6 { font-size: 0.9375rem; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.req-danger-body p  { font-size: 0.8125rem; color: #64748b; }

/* Modal buttons */
.req-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 8px;
    padding: 9px 22px; font-size: 0.875rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s ease;
}
.req-btn:hover             { background: #0284c7; }
.req-btn.edit-btn          { background: #0369a1; }
.req-btn.edit-btn:hover    { background: #1d4ed8; }
.req-btn.primary-btn       { background: #2563eb; }
.req-btn.primary-btn:hover { background: #1d4ed8; }
.req-btn.success-btn       { background: #16a34a; }
.req-btn.success-btn:hover { background: #15803d; }
.req-btn.danger-btn        { background: #dc2626; }
.req-btn.danger-btn:hover  { background: #b91c1c; }
.req-btn.outline-btn       { background: #f8fafc; color: #475569; border: 1.5px solid #e2e8f0; }
.req-btn.outline-btn:hover { background: #f1f5f9; }

/* ── 2.11 Submit Buttons ── */
.req-submit-btn {
    background: #0c2040; color: #fff; border: none; border-radius: 8px;
    padding: 10px 24px; font-size: 0.875rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px; transition: background 0.15s ease;
}
.req-submit-btn:hover { background: #1e3a5f; }
.req-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── 2.12 Department Selector ── */
.req-dept-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px;
}
.req-dept-card {
    background: #fff; border: 1.5px solid #e2e8f0; border-radius: 12px;
    padding: 20px 16px; text-align: center; text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.req-dept-card:hover {
    border-color: #0ea5e9; box-shadow: 0 4px 16px rgba(14,165,233,0.15);
    transform: translateY(-3px); text-decoration: none;
}
.req-dept-icon {
    width: 48px; height: 48px; background: #eff6ff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #0369a1;
    transition: background 0.2s ease, color 0.2s ease;
}
.req-dept-card:hover .req-dept-icon { background: #0ea5e9; color: #fff; }
.req-dept-name {
    font-size: 0.8125rem; font-weight: 700; color: #1e293b;
    text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.3;
}
.req-dept-card:hover .req-dept-name { color: #0369a1; }
.req-dept-arrow { font-size: 0.72rem; color: #94a3b8; display: flex; align-items: center; gap: 4px; }
.req-dept-card:hover .req-dept-arrow { color: #0ea5e9; }

/* ── 2.13 Miscellaneous ── */
.req-section-label {
    font-size: 0.7rem; font-weight: 700; color: #0ea5e9; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #e0f2fe;
}
.req-rcv-section-label {
    font-size: 0.7rem; font-weight: 700; color: #0ea5e9; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #e0f2fe;
}
.req-count-row { font-size: 0.78rem; color: #94a3b8; }

.req-empty-cart { padding: 40px; text-align: center; color: #94a3b8; }
.req-empty-cart i { font-size: 2rem; display: block; margin-bottom: 10px; opacity: 0.4; }
.req-empty-cart p { font-size: 0.875rem; margin: 0; }
.req-empty-state { padding: 40px; text-align: center; color: #94a3b8; }
.req-empty-state i { font-size: 2rem; display: block; margin-bottom: 10px; opacity: 0.4; }

/* Print overrides (requisition views) */
@media print {
    .req-show-hdr-actions, .req-add-item-btn, .req-edit-row-btn, .req-rm-row-btn,
    .req-rcv-hdr, .req-rcv-footer, .no-print,
    .main-sidebar, .main-header, .main-footer, .content-header { display: none !important; }
    .req-show-hdr { background: #fff !important; }
    .req-show-hdr-left h4, .req-show-hdr-left p { color: #000 !important; }
    .req-rcv-card { box-shadow: none; border: none; }
}


/* ==========================================================================
   SECTION 3: STK (crm-stock) DESIGN SYSTEM
   ========================================================================== */

/* ── 3.1 Stat cards ── */
.stk-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 992px) { .stk-stats-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px)  { .stk-stats-row { grid-template-columns: 1fr; } }

.stk-stat {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.stk-stat:hover { box-shadow: 0 4px 16px rgba(14,165,233,0.1); transform: translateY(-2px); }

.stk-stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; flex-shrink: 0;
}
.si-navy   { background: #eff6ff; color: #0c2040; }
.si-green  { background: #f0fdf4; color: #16a34a; }
.si-slate  { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.si-red    { background: #fef2f2; color: #dc2626; }
.si-amber  { background: #fffbeb; color: #d97706; }
.si-orange { background: #fff7ed; color: #ea580c; }
.si-purple { background: #faf5ff; color: #7c3aed; }

.stk-stat-body .stk-stat-value {
    font-size: 1.6rem; font-weight: 800; color: #0f172a; line-height: 1;
    letter-spacing: -0.03em;
}
.stk-stat-body .stk-stat-label {
    font-size: 0.75rem; font-weight: 600; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px;
}
.stk-stat-body .stk-stat-sub { font-size: 0.72rem; color: #cbd5e1; margin-top: 2px; }

/* Navy variants (index page) */
.stk-stat.st-total    { border-top: 3px solid #0ea5e9; }
.stk-stat.st-active   { border-top: 3px solid #16a34a; }
.stk-stat.st-inactive { border-top: 3px solid #94a3b8; }
.stk-stat.st-alert    { border-top: 3px solid #dc2626; }
/* Red variants (out-of-stock page) */
.stk-stat.st-critical { border-top: 3px solid #dc2626; }
.stk-stat.st-zero     { border-top: 3px solid #ea580c; }
.stk-stat.st-below    { border-top: 3px solid #d97706; }
.stk-stat.st-cat      { border-top: 3px solid #7c3aed; }

/* ── 3.2 Warning banner (out-of-stock page) ── */
.stk-warn-banner {
    background: #fff7ed; border: 1px solid #fed7aa;
    border-left: 4px solid #f97316; border-radius: 10px;
    padding: 14px 18px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 12px;
    font-size: 0.875rem; color: #9a3412;
}
.stk-warn-banner i { font-size: 1.1rem; flex-shrink: 0; color: #f97316; }
.stk-warn-banner strong { font-weight: 700; }

/* ── 3.3 Page header ── */
.stk-page-hdr {
    background: #0c2040;
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.stk-page-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.stk-page-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

/* Out-of-stock page overrides (scoped) */
.stk-oos-page .stk-page-hdr { background: #7f1d1d; }
.stk-oos-page .stk-page-hdr p { color: #fca5a5; }

.stk-add-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 8px;
    padding: 8px 18px; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s ease;
}
.stk-add-btn:hover { background: #0284c7; }

.stk-nav-btn {
    background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 8px; padding: 7px 16px; font-size: 0.8rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s ease;
}
.stk-nav-btn:hover { background: rgba(255,255,255,0.2); color: #fff; text-decoration: none; }

/* ── 3.4 Show-page header ── */
.stk-show-hdr {
    background: #0c2040; border-radius: 12px; padding: 20px 24px;
    margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.stk-show-hdr-left h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.stk-show-hdr-left p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }
.stk-show-hdr-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stk-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
    border: none; cursor: pointer; text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}
.stk-action-btn:hover { transform: translateY(-1px); text-decoration: none; }
.stk-action-btn.ab-edit   { background: #0369a1; color: #fff; }
.stk-action-btn.ab-edit:hover   { background: #1d4ed8; color: #fff; }
.stk-action-btn.ab-danger { background: #dc2626; color: #fff; }
.stk-action-btn.ab-danger:hover { background: #b91c1c; color: #fff; }
.stk-action-btn.ab-slate  { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; }
.stk-action-btn.ab-slate:hover  { background: #e2e8f0; color: #334155; }

/* ── 3.5 Info cards (show page) ── */
.stk-info-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px; }
.stk-info-hdr  { background: #f0f9ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe; display: flex; align-items: center; gap: 8px; }
.stk-info-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.stk-info-body { padding: 20px; }

.stk-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .stk-info-grid { grid-template-columns: 1fr; } }
.stk-info-item .lbl { font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.stk-info-item .val { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.stk-info-item .val.mono { font-family: monospace; }

.stk-uom-box {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px;
    padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 12px;
}
.stk-uom-box .uom-eq    { font-size: 2rem; font-weight: 700; color: #0c2040; }
.stk-uom-box .uom-label { font-size: 0.75rem; color: #0369a1; font-weight: 600; }

.stk-dept-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; }
.stk-dept-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: #eff6ff; color: #0369a1; border: 1px solid #bfdbfe;
    border-radius: 6px; padding: 4px 12px; font-size: 0.78rem; font-weight: 600;
}

/* ── 3.6 Filter bar ── */
.stk-filter-bar {
    background: #fff;
    padding: 14px 20px;
    border: 1px solid #e2e8f0; border-top: none;
}
.stk-filter-row  { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.stk-filter-group { display: flex; flex-direction: column; gap: 4px; }
.stk-filter-group label { font-size: 0.72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.stk-filter-input, .stk-filter-select {
    border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 8px 12px;
    font-size: 0.8125rem; color: #1e293b; background: #fff; outline: none;
    transition: border-color 0.15s ease;
}
.stk-filter-input:focus, .stk-filter-select:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.1); }
.stk-filter-btn {
    background: #0c2040; color: #fff; border: none; border-radius: 8px;
    padding: 8px 16px; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
}
.stk-reset-btn {
    background: #f1f5f9; color: #475569; border: none; border-radius: 8px;
    padding: 8px 16px; font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
    transition: background 0.15s ease;
}
.stk-reset-btn:hover { background: #e2e8f0; color: #334155; }
/* Out-of-stock filter button override */
.stk-oos-page .stk-filter-btn { background: #7f1d1d; }

/* ── 3.7 Table card & table ── */
.stk-table-card {
    background: #fff; border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0; border-top: none; overflow: hidden;
}
.stk-table-inner { padding: 0; }

.stk-tbl { width: 100%; border-collapse: collapse; }
.stk-tbl thead tr { background: #0c2040; }
.stk-tbl thead th {
    padding: 14px 18px; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #7dd3fc; border: none; white-space: nowrap;
}
.stk-tbl thead th:first-child { padding-left: 22px; }
.stk-tbl thead th:last-child  { padding-right: 22px; }

.stk-tbl tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.12s ease; }
.stk-tbl tbody tr:hover { background: #f0f9ff; }
.stk-tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #0ea5e9; }

.stk-tbl tbody td {
    padding: 14px 18px; font-size: 0.875rem; color: #334155;
    vertical-align: middle; border: none;
}
.stk-tbl tbody td:first-child { padding-left: 22px; }
.stk-tbl tbody td:last-child  { padding-right: 22px; }
.stk-tbl tbody tr:last-child  { border-bottom: none; }

/* Out-of-stock table overrides */
.stk-oos-page .stk-tbl thead tr          { background: #7f1d1d; }
.stk-oos-page .stk-tbl thead th          { color: #fca5a5; }
.stk-oos-page .stk-tbl tbody tr          { border-bottom-color: #fef2f2; }
.stk-oos-page .stk-tbl tbody tr:hover    { background: #fff7ed; }
.stk-oos-page .stk-tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #dc2626; }

/* ── 3.8 Cell-specific styles ── */
.stk-item-name {
    color: #0369a1; font-weight: 600; text-decoration: none;
    display: flex; align-items: center; gap: 8px;
}
.stk-item-name:hover { color: #0c2040; text-decoration: none; }
.stk-item-name .item-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #0ea5e9; flex-shrink: 0;
}
/* Out-of-stock item name with pulsing dot */
.stk-oos-page .stk-item-name { color: #b91c1c; }
.stk-oos-page .stk-item-name:hover { color: #7f1d1d; }
.stk-oos-page .stk-item-name .item-dot {
    background: #dc2626;
    animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.75); }
}

.stk-code-cell {
    font-family: 'Courier New', monospace; font-size: 0.78rem; color: #64748b;
    background: #f8fafc; padding: 3px 8px; border-radius: 5px; display: inline-block;
}

.stk-stock-cell { font-size: 0.9rem; font-weight: 700; }
.stk-stock-low  { color: #dc2626; }
.stk-stock-ok   { color: #16a34a; }
.stk-stock-zero { font-size: 0.875rem; font-weight: 800; color: #dc2626; }
.stk-min-cell   { font-size: 0.82rem; color: #94a3b8; font-style: italic; }

.stk-badge-active   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.stk-badge-inactive { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.stk-badge-active::before   { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #16a34a; display: inline-block; }
.stk-badge-inactive::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #94a3b8; display: inline-block; }

.stk-alert-zero { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 3px 10px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 4px; }
.stk-alert-low  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; padding: 3px 10px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 4px; }

/* ── 3.9 Action buttons ── */
.stk-btn-row { display: flex; gap: 5px; align-items: center; flex-wrap: nowrap; }
.stk-view-btn    { background: #eff6ff; color: #0369a1; border: none; border-radius: 6px; padding: 5px 10px; font-size: 0.72rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; transition: background 0.12s; white-space: nowrap; }
.stk-view-btn:hover { background: #dbeafe; color: #0369a1; }
.stk-restock-btn { background: #f0fdf4; color: #166534; border: none; border-radius: 6px; padding: 5px 10px; font-size: 0.72rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; transition: background 0.12s; white-space: nowrap; }
.stk-restock-btn:hover { background: #dcfce7; }
.stk-wastage-btn { background: #fff7ed; color: #9a3412; border: none; border-radius: 6px; padding: 5px 10px; font-size: 0.72rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; transition: background 0.12s; white-space: nowrap; }
.stk-wastage-btn:hover { background: #ffedd5; }

/* ── 3.10 LPO bar ── */
.stk-lpo-bar {
    padding: 14px 22px; border-top: 1px solid #e0f2fe; background: #f0f9ff;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.stk-lpo-btn {
    background: #0c2040; color: #fff; border: none; border-radius: 8px;
    padding: 9px 20px; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s ease;
}
.stk-lpo-btn:hover { background: #1e3a5f; }
/* Out-of-stock LPO bar overrides */
.stk-oos-page .stk-lpo-bar { border-top-color: #fee2e2; background: #fef2f2; }
.stk-oos-page .stk-lpo-btn { background: #7f1d1d; }
.stk-oos-page .stk-lpo-btn:hover { background: #991b1b; }

/* ── 3.11 Alerts ── */
.stk-alert { border-radius: 8px; padding: 10px 14px; font-size: 0.8125rem; align-items: center; gap: 8px; }
.stk-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; display: flex; }
.stk-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; display: flex; }

/* ── 3.12 Modals ── */
.stk-modal-content { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.18); }
.stk-modal-header  { padding: 18px 22px; border-bottom: none; display: flex; align-items: center; justify-content: space-between; }
.stk-modal-header.create-hdr  { background: #0c2040; }
.stk-modal-header.restock-hdr { background: #0f766e; }
.stk-modal-header.wastage-hdr { background: #92400e; }
.stk-modal-header.edit-hdr    { background: #0369a1; }
.stk-modal-header.danger-hdr  { background: #991b1b; }
.stk-modal-header h5 { color: #fff; font-size: 0.9375rem; font-weight: 700; margin: 0; }
.stk-modal-header .btn-close { filter: invert(1); opacity: 0.8; }
.stk-modal-body  { padding: 22px; }
.stk-modal-footer { padding: 16px 22px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── 3.13 Modal form fields ── */
.stk-section-label { font-size: 0.7rem; font-weight: 700; color: #0ea5e9; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #e0f2fe; }
.stk-field-group { margin-bottom: 16px; }
.stk-field-group label { display: block; font-size: 0.78rem; font-weight: 600; color: #374151; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.stk-input, .stk-select, .stk-textarea { width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 9px 12px; font-size: 0.875rem; color: #1e293b; background: #fff; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.stk-input:focus, .stk-select:focus, .stk-textarea:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
.stk-input[readonly] { background: #f8fafc; color: #64748b; cursor: default; }

.stk-btn { background: #0ea5e9; color: #fff; border: none; border-radius: 8px; padding: 9px 22px; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.15s ease; }
.stk-btn:hover             { background: #0284c7; }
.stk-btn.restock-btn       { background: #0f766e; }
.stk-btn.restock-btn:hover { background: #115e59; }
.stk-btn.wastage-btn       { background: #b45309; }
.stk-btn.wastage-btn:hover { background: #92400e; }
.stk-btn.edit-btn          { background: #0369a1; }
.stk-btn.edit-btn:hover    { background: #1d4ed8; }
.stk-btn.danger-btn        { background: #dc2626; }
.stk-btn.danger-btn:hover  { background: #b91c1c; }

.stk-dept-check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer; transition: background 0.1s; }
.stk-dept-check:hover { background: #f0f9ff; border-color: #bae6fd; }
.stk-dept-check input { accent-color: #0ea5e9; width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.stk-dept-check span  { font-size: 0.83rem; color: #374151; cursor: pointer; margin: 0; }

/* ── 3.14 Danger modal elements ── */
.stk-danger-body { text-align: center; padding: 10px 0 6px; }
.stk-danger-icon { width: 56px; height: 56px; background: #fef2f2; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 1.5rem; color: #dc2626; }
.stk-ref-badge   { display: inline-block; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 6px; padding: 3px 10px; font-family: monospace; font-size: 0.875rem; font-weight: 600; }

/* ── 3.15 Footer / pagination ── */
.stk-table-footer {
    padding: 14px 22px; border-top: 1px solid #f1f5f9;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px; background: #fafbfc;
}
.stk-count-row { font-size: 0.78rem; color: #94a3b8; }

/* ── 3.16 Empty state ── */
.stk-empty-state { padding: 48px 24px; text-align: center; color: #94a3b8; }
.stk-empty-state i { font-size: 2.5rem; display: block; margin-bottom: 12px; opacity: 0.35; }
.stk-empty-state p { font-size: 0.875rem; margin: 0; }

/* ── 3.17 Wastage module specifics ── */
/* Approve modal header */
.stk-modal-header.approve-hdr { background: #15803d; }

/* Wastage status pills */
.wst-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.wst-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.wst-badge-pending    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.wst-badge-pending::before    { background: #f59e0b; }
.wst-badge-approved   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.wst-badge-approved::before   { background: #16a34a; }
.wst-badge-cancelled  { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.wst-badge-cancelled::before  { background: #94a3b8; }
.wst-badge-escalated  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.wst-badge-escalated::before  { background: #dc2626; }

/* Wastage type pill */
.wst-type-badge { display: inline-block; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: 6px; padding: 3px 9px; font-size: 0.72rem; font-weight: 600; }

/* Filter page layout */
.wst-filter-card {
    background: #fff; border-radius: 12px;
    border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px;
}
.wst-filter-card-hdr {
    background: #0c2040; padding: 16px 20px;
    display: flex; align-items: center; gap: 8px;
}
.wst-filter-card-hdr h5 { color: #fff; font-size: 0.9rem; font-weight: 700; margin: 0; }
.wst-filter-card-hdr p  { color: #7dd3fc; font-size: 0.75rem; margin: 3px 0 0; }
.wst-filter-card-body   { padding: 20px; }
.wst-filter-card-footer { padding: 14px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0; }

/* Wastage overview stat cards (right panel on index) */
.wst-ov-card {
    background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
    padding: 18px 20px; display: flex; align-items: center; gap: 16px;
    margin-bottom: 14px; transition: box-shadow 0.2s ease;
}
.wst-ov-card:last-child { margin-bottom: 0; }
.wst-ov-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); }
.wst-ov-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wst-ov-icon.oi-green  { background: #f0fdf4; color: #16a34a; }
.wst-ov-icon.oi-amber  { background: #fffbeb; color: #d97706; }
.wst-ov-icon.oi-slate  { background: #f8fafc; color: #64748b; }
.wst-ov-val   { font-size: 1.5rem; font-weight: 800; color: #0f172a; line-height: 1; letter-spacing: -0.02em; }
.wst-ov-label { font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; }

/* Converted-to cell */
.wst-conv-cell { font-size: 0.8125rem; color: #1e293b; }
.wst-conv-cell .conv-qty { font-size: 0.72rem; color: #64748b; margin-top: 2px; }

/* Item name cell in table */
.wst-item-cell .item-name { font-weight: 600; color: #1e293b; font-size: 0.875rem; }
.wst-item-cell .item-uom  { font-size: 0.72rem; color: #94a3b8; margin-top: 2px; }

/* Table approve/cancel action buttons */
.wst-approve-btn { background: #f0fdf4; color: #15803d; border: none; border-radius: 6px; padding: 5px 12px; font-size: 0.72rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: background 0.12s; white-space: nowrap; }
.wst-approve-btn:hover { background: #dcfce7; }
.wst-cancel-btn  { background: #fef2f2; color: #b91c1c; border: none; border-radius: 6px; padding: 5px 12px; font-size: 0.72rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: background 0.12s; white-space: nowrap; }
.wst-cancel-btn:hover  { background: #fee2e2; }

/* Report page header (re-use stk-page-hdr but add specific button) */
.wst-filter-link {
    background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 8px; padding: 7px 16px; font-size: 0.8rem; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s ease;
}
.wst-filter-link:hover { background: rgba(255,255,255,0.2); color: #fff; text-decoration: none; }


/* ==========================================================================
   SECTION 4: EXP (crm-expense) DESIGN SYSTEM
   ========================================================================== */

.exp-input, .exp-textarea {
    width: 100%; padding: 10px 14px; border: 1.5px solid #cbd5e1; border-radius: 9px;
    font-size: 13.5px; color: #1e293b; background: #f8fafc; outline: none;
    -webkit-appearance: none; font-family: inherit;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.exp-input:focus, .exp-textarea:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.11); }
.exp-input:disabled, .exp-textarea:disabled { background: #f1f5f9; color: #475569; cursor: default; border-color: #e2e8f0; }
.exp-textarea { resize: vertical; min-height: 80px; }
.exp-select {
    width: 100%; padding: 10px 38px 10px 14px; border: 1.5px solid #cbd5e1; border-radius: 9px;
    font-size: 13.5px; color: #1e293b; outline: none; cursor: pointer; font-family: inherit;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232563eb' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.exp-select:focus { border-color: #2563eb; background-color: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.11); }
.exp-select:disabled { background-color: #f1f5f9; color: #475569; cursor: default; border-color: #e2e8f0; }

.exp-field-group { margin-bottom: 18px; }
.exp-field-group label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .65px; color: #475569; margin-bottom: 7px; }
.exp-section-sep { display: flex; align-items: center; gap: 10px; margin: 4px 0 20px; }
.exp-section-sep .sep-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #94a3b8; white-space: nowrap; }
.exp-section-sep .sep-line  { flex: 1; height: 1px; background: #e2e8f0; }

.exp-alert { border-radius: 9px; padding: 11px 15px; font-size: 13px; font-weight: 500; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; border: none; }
.exp-alert.error   { background: #fef2f2; color: #b91c1c; border-left: 4px solid #ef4444; }
.exp-alert.success { background: #f0fdf4; color: #15803d; border-left: 4px solid #22c55e; }

.exp-modal-content { border: none; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(15,23,42,.18); }
.exp-modal-header { padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.exp-modal-header::before { content: ''; position: absolute; top: -50px; right: -50px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.06); }
.exp-modal-header-left { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.exp-modal-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0; }
.exp-modal-header .modal-meta-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: .6; color: #fff; margin-bottom: 3px; }
.exp-modal-header h4 { margin: 0; font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.exp-modal-close { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: #fff; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; position: relative; z-index: 1; transition: background .2s; flex-shrink: 0; }
.exp-modal-close:hover { background: rgba(255,255,255,.25); }
.exp-modal-header.create-hdr { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%); }
.exp-modal-header.edit-hdr   { background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 55%, #0ea5e9 100%); }
.exp-modal-header.show-hdr   { background: linear-gradient(135deg, #1e293b 0%, #334155 55%, #475569 100%); }
.exp-modal-header.danger-hdr { background: linear-gradient(135deg, #450a0a 0%, #991b1b 55%, #dc2626 100%); }
.exp-modal-body   { padding: 24px 28px 8px; }
.exp-modal-footer { padding: 16px 28px 22px; display: flex; align-items: center; gap: 12px; background: #f8fafc; border-top: 1px solid #e2e8f0; }

.btn-exp { display: inline-flex; align-items: center; gap: 7px; padding: 10px 22px; border-radius: 9px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; font-family: inherit; transition: opacity .2s, transform .15s, box-shadow .2s; letter-spacing: .1px; }
.btn-exp:hover    { opacity: .88; transform: translateY(-1px); }
.btn-exp:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-exp-submit { background: linear-gradient(135deg,#2563eb,#1d4ed8); color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,.3); }
.btn-exp-update { background: linear-gradient(135deg,#0369a1,#0284c7); color: #fff; box-shadow: 0 3px 10px rgba(3,105,161,.3); }
.btn-exp-delete { background: linear-gradient(135deg,#b91c1c,#dc2626); color: #fff; box-shadow: 0 3px 10px rgba(185,28,28,.3); }
.btn-exp-cancel { background: #f1f5f9; color: #64748b; border: 1.5px solid #e2e8f0; }
.btn-exp-cancel:hover { background: #e2e8f0; opacity: 1; }

.exp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid #e2e8f0; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.exp-info-row { padding: 13px 18px; border-bottom: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 3px; }
.exp-info-row:nth-last-child(-n+2) { border-bottom: none; }
.exp-info-row.full-width { grid-column: 1 / -1; }
.exp-info-row .info-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: #94a3b8; }
.exp-info-row .info-value { font-size: 14px; font-weight: 600; color: #1e293b; }
.exp-info-row .info-value.amount { color: #dc2626; font-size: 16px; }

.exp-delete-body { padding: 30px 28px 10px; text-align: center; }
.exp-delete-icon-wrap { width: 68px; height: 68px; background: #fef2f2; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #dc2626; margin: 0 auto 18px; border: 3px solid #fecaca; }
.exp-delete-body h5 { font-size: 16px; font-weight: 700; color: #1e293b; margin: 0 0 8px; }
.exp-delete-body p  { font-size: 13px; color: #64748b; margin: 0; line-height: 1.6; }
.exp-ref-badge { display: inline-block; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 6px; padding: 2px 10px; font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700; margin-top: 8px; }

.exp-page-header { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%); border-radius: 16px; padding: 28px 36px; margin-bottom: 24px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.exp-page-header::before { content: ''; position: absolute; top: -70px; right: -70px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.05); }
.exp-page-header::after  { content: ''; position: absolute; bottom: -80px; left: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.04); }
.exp-page-header-left { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.exp-page-icon { width: 52px; height: 52px; background: rgba(255,255,255,.15); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0; }
.exp-page-header .ph-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; opacity: .6; color: #fff; margin-bottom: 4px; }
.exp-page-header h2 { margin: 0; font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.4px; }
.exp-page-header-right { position: relative; z-index: 1; }
.btn-exp-add { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .2s, transform .15s; letter-spacing: .1px; backdrop-filter: blur(4px); }
.btn-exp-add:hover { background: rgba(255,255,255,.25); transform: translateY(-1px); }

.exp-table-card { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; border-top: 3px solid #2563eb; overflow: hidden; box-shadow: 0 2px 12px rgba(37,99,235,.06); }
.exp-table-toolbar { padding: 16px 24px; background: #eff6ff; border-bottom: 1px solid #dbeafe; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.exp-toolbar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #1e40af; display: flex; align-items: center; gap: 8px; }
.exp-table-card .table-responsive { padding: 0 4px 4px; }
.exp-table-card table.dataTable thead th { background: #1e293b !important; color: #fff !important; font-size: 11px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .7px !important; padding: 13px 16px !important; border: none !important; white-space: nowrap; }
.exp-table-card table.dataTable tbody tr { border-bottom: 1px solid #f1f5f9 !important; transition: background .15s; }
.exp-table-card table.dataTable tbody tr:hover { background: #eff6ff !important; box-shadow: inset 4px 0 0 #2563eb; }
.exp-table-card table.dataTable tbody td { padding: 13px 16px !important; font-size: 13.5px; color: #334155; vertical-align: middle; border: none !important; }
.exp-table-card .dataTables_wrapper .dataTables_filter input { border: 1.5px solid #cbd5e1 !important; border-radius: 8px !important; padding: 6px 12px !important; font-size: 13px !important; outline: none !important; background: #f8fafc; }
.exp-table-card .dataTables_wrapper .dataTables_filter input:focus { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,.1) !important; }
.exp-table-card .dataTables_wrapper .dataTables_length select { border: 1.5px solid #cbd5e1 !important; border-radius: 8px !important; padding: 5px 28px 5px 10px !important; font-size: 13px !important; outline: none !important; }
.exp-table-card .dataTables_wrapper { padding: 16px 20px 20px; }


/* ==========================================================================
   SECTION 5: ERPT (crm-report/expenses) DESIGN SYSTEM
   ========================================================================== */

.erpt-hero { background: linear-gradient(135deg, #1c0533 0%, #6b21a8 55%, #9333ea 100%); border-radius: 16px; padding: 40px 48px; color: #fff; margin-bottom: 28px; position: relative; overflow: hidden; }
.erpt-hero::before { content: ''; position: absolute; top: -60px; right: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.06); }
.erpt-hero::after  { content: ''; position: absolute; bottom: -80px; left: -40px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.04); }
.erpt-hero .hero-icon { width: 56px; height: 56px; background: rgba(255,255,255,.15); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px; }
.erpt-hero h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.3px; }
.erpt-hero p  { margin: 0; opacity: .72; font-size: 14px; }

.erpt-filter-card { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; border-top: 3px solid #9333ea; box-shadow: 0 2px 12px rgba(147,51,234,.07); overflow: hidden; }
.erpt-filter-card .filter-header { background: #faf5ff; padding: 18px 28px; border-bottom: 1px solid #e9d5ff; display: flex; align-items: center; gap: 10px; }
.erpt-filter-card .filter-header h5 { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #7e22ce; }
.erpt-filter-card .filter-icon { width: 30px; height: 30px; background: #9333ea; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; flex-shrink: 0; }
.erpt-filter-body { padding: 28px 28px 24px; }
.erpt-field-group { margin-bottom: 20px; }
.erpt-field-group label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #475569; margin-bottom: 8px; }
.erpt-input { width: 100%; padding: 11px 14px; border: 1.5px solid #cbd5e1; border-radius: 9px; font-size: 14px; color: #1e293b; background: #f8fafc; outline: none; -webkit-appearance: none; font-family: inherit; transition: border-color .2s, box-shadow .2s, background .2s; }
.erpt-input:focus { border-color: #9333ea; background: #fff; box-shadow: 0 0 0 3px rgba(147,51,234,.12); }
.erpt-select { width: 100%; padding: 11px 38px 11px 14px; border: 1.5px solid #cbd5e1; border-radius: 9px; font-size: 14px; color: #1e293b; outline: none; cursor: pointer; font-family: inherit; -webkit-appearance: none; -moz-appearance: none; appearance: none; background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239333ea' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.erpt-select:focus { border-color: #9333ea; background-color: #fff; box-shadow: 0 0 0 3px rgba(147,51,234,.12); }
.erpt-divider { height: 1px; background: #f1f5f9; margin: 4px 0 22px; }
.erpt-date-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #64748b; margin-bottom: 16px; }
.erpt-date-label span.badge-range { background: #faf5ff; color: #9333ea; border-radius: 20px; padding: 2px 10px; font-size: 10px; letter-spacing: .5px; font-weight: 700; }
.erpt-filter-footer { padding: 18px 28px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; align-items: center; gap: 12px; }
.btn-erpt-submit { display: inline-flex; align-items: center; gap: 8px; padding: 11px 28px; background: linear-gradient(135deg, #9333ea, #7e22ce); color: #fff; border: none; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; letter-spacing: .2px; font-family: inherit; transition: opacity .2s, transform .15s, box-shadow .2s; box-shadow: 0 3px 10px rgba(147,51,234,.3); }
.btn-erpt-submit:hover    { opacity: .92; transform: translateY(-1px); box-shadow: 0 5px 15px rgba(147,51,234,.35); }
.btn-erpt-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.erpt-hint { font-size: 12px; color: #94a3b8; }
.erpt-alert { border-radius: 9px; padding: 12px 16px; font-size: 13px; font-weight: 500; margin-bottom: 18px; border: none; display: flex; align-items: center; gap: 9px; }
.erpt-alert.error   { background: #fef2f2; color: #b91c1c; border-left: 4px solid #ef4444; }
.erpt-alert.success { background: #f0fdf4; color: #15803d; border-left: 4px solid #22c55e; }

.erpt-side-info { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; overflow: hidden; height: 100%; }
.erpt-side-info .side-header { background: linear-gradient(135deg, #1c0533, #6b21a8); padding: 22px 24px; color: #fff; }
.erpt-side-info .side-header h6 { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; opacity: .7; }
.erpt-side-info .side-header p { margin: 0; font-size: 15px; font-weight: 600; }
.erpt-tip-list { list-style: none; padding: 20px 24px; margin: 0; }
.erpt-tip-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; color: #475569; }
.erpt-tip-list li:last-child { border-bottom: none; }
.erpt-tip-list li .tip-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.tip-purple { background: #faf5ff; color: #9333ea; }
.tip-amber  { background: #fffbeb; color: #d97706; }
.tip-green  { background: #f0fdf4; color: #16a34a; }
.tip-blue   { background: #eff6ff; color: #2563eb; }
.tip-sky    { background: #f0f9ff; color: #0284c7; }
.erpt-tip-list li .tip-text strong { display: block; font-weight: 600; color: #1e293b; margin-bottom: 2px; }

.erpt-wrap { width: 100%; padding: 24px 0 40px; }
.erpt-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.erpt-actions .erpt-breadcrumb { font-size: 13px; color: #64748b; }
.erpt-actions .erpt-breadcrumb a { color: #9333ea; text-decoration: none; font-weight: 500; }
.erpt-actions .erpt-breadcrumb a:hover { text-decoration: underline; }
.erpt-actions .erpt-breadcrumb span { margin: 0 6px; }
.btn-erpt-action { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border-radius: 9px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: opacity .2s, transform .15s; text-decoration: none; font-family: inherit; }
.btn-erpt-action:hover { opacity: .88; transform: translateY(-1px); }
.btn-erpt-print { background: linear-gradient(135deg,#9333ea,#7e22ce); color: #fff; box-shadow: 0 3px 10px rgba(147,51,234,.28); }
.btn-erpt-back  { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; }

.erpt-card { background: #fff; border-radius: 16px; border: 1px solid #e2e8f0; overflow: hidden; box-shadow: 0 4px 20px rgba(15,23,42,.07); }
.erpt-header { background: linear-gradient(135deg, #1c0533 0%, #6b21a8 55%, #9333ea 100%); padding: 36px 40px 32px; color: #fff; position: relative; overflow: hidden; }
.erpt-header::before { content: ''; position: absolute; top: -80px; right: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.05); }
.erpt-header::after  { content: ''; position: absolute; bottom: -100px; left: -50px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.04); }
.erpt-header-inner { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.erpt-header-left .erpt-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; opacity: .6; margin-bottom: 8px; }
.erpt-header-left h2 { font-size: 26px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.5px; }
.erpt-meta-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.erpt-meta-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 500; }
.erpt-header-right .erpt-period-box { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 16px 20px; text-align: right; min-width: 180px; }
.erpt-period-box .period-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: .65; margin-bottom: 6px; }
.erpt-period-box .period-from, .erpt-period-box .period-to { font-size: 13px; font-weight: 600; }
.erpt-period-box .period-sep { font-size: 10px; opacity: .55; margin: 3px 0; }

.erpt-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #e2e8f0; }
.erpt-stat-item { padding: 22px 28px; border-right: 1px solid #e2e8f0; }
.erpt-stat-item:last-child { border-right: none; }
.erpt-stat-item .stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: #64748b; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.erpt-stat-item .stat-label .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-purple { background: #9333ea; }
.dot-amber  { background: #d97706; }
.dot-slate  { background: #475569; }
.dot-blue   { background: #2563eb; }
.dot-green  { background: #16a34a; }
.dot-red    { background: #dc2626; }
.erpt-stat-item .stat-value { font-size: 22px; font-weight: 800; color: #1e293b; letter-spacing: -.5px; }
.erpt-stat-item .stat-value.total { color: #7e22ce; }
.erpt-stat-item .stat-sub { font-size: 11px; color: #94a3b8; margin-top: 4px; }

.erpt-table-toolbar { padding: 18px 28px; background: #faf5ff; border-bottom: 1px solid #e9d5ff; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.erpt-table-toolbar .toolbar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #7e22ce; display: flex; align-items: center; gap: 8px; }
.erpt-table-wrap table.dataTable thead th { background: #1e293b !important; color: #fff !important; font-size: 11px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .7px !important; padding: 14px 20px !important; border: none !important; white-space: nowrap; }
.erpt-table-wrap table.dataTable thead th:first-child { padding-left: 28px !important; }
.erpt-table-wrap table.dataTable thead th:last-child  { padding-right: 28px !important; }
.erpt-table-wrap table.dataTable tbody tr { border-bottom: 1px solid #f1f5f9 !important; transition: background .15s; }
.erpt-table-wrap table.dataTable tbody tr:hover { background: #faf5ff !important; box-shadow: inset 4px 0 0 #9333ea; }
.erpt-table-wrap table.dataTable tbody td { padding: 13px 20px !important; font-size: 13.5px; color: #334155; vertical-align: middle; border: none !important; }
.erpt-table-wrap table.dataTable tbody td:first-child { padding-left: 28px !important; }
.erpt-table-wrap table.dataTable tbody td:last-child  { padding-right: 28px !important; }
.erpt-table-wrap .dataTables_wrapper { padding: 16px 24px 20px; }
.erpt-table-wrap .dataTables_wrapper .dataTables_filter input { border: 1.5px solid #cbd5e1 !important; border-radius: 8px !important; padding: 6px 12px !important; font-size: 13px !important; outline: none !important; background: #f8fafc; }
.erpt-table-wrap .dataTables_wrapper .dataTables_filter input:focus { border-color: #9333ea !important; box-shadow: 0 0 0 3px rgba(147,51,234,.1) !important; }
.erpt-table-wrap .dataTables_wrapper .dataTables_length select { border: 1.5px solid #cbd5e1 !important; border-radius: 8px !important; padding: 5px 28px 5px 10px !important; font-size: 13px !important; outline: none !important; }
.erpt-footer { padding: 18px 28px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #94a3b8; }
.erpt-footer strong { color: #475569; }
@media print {
    .erpt-actions, .no-print { display: none !important; }
    .erpt-card { box-shadow: none; border: none; }
    .erpt-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .erpt-table-wrap table.dataTable thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 768px) {
    .erpt-stats { grid-template-columns: 1fr 1fr; }
    .erpt-header { padding: 24px 20px; }
    .erpt-stat-item { padding: 16px 20px; }
}


/* ==========================================================================
   SECTION 6: STMT / RPT (crm-account) DESIGN SYSTEM
   ========================================================================== */

.stmt-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%); border-radius: 16px; padding: 40px 48px; color: #fff; margin-bottom: 28px; position: relative; overflow: hidden; }
.stmt-hero::before { content: ''; position: absolute; top: -60px; right: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.stmt-hero::after  { content: ''; position: absolute; bottom: -80px; left: -40px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,0.04); }
.stmt-hero .hero-icon { width: 56px; height: 56px; background: rgba(255,255,255,0.15); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px; }
.stmt-hero h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.3px; }
.stmt-hero p  { margin: 0; opacity: 0.72; font-size: 14px; }

.stmt-filter-card { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; border-top: 3px solid #2563eb; box-shadow: 0 2px 12px rgba(37,99,235,0.07); overflow: hidden; }
.stmt-filter-card .filter-header { background: #eff6ff; padding: 18px 28px; border-bottom: 1px solid #dbeafe; display: flex; align-items: center; gap: 10px; }
.stmt-filter-card .filter-header h5 { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #1e40af; }
.stmt-filter-card .filter-header .filter-icon { width: 30px; height: 30px; background: #2563eb; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; flex-shrink: 0; }
.stmt-filter-body { padding: 28px 28px 24px; }
.stmt-field-group { margin-bottom: 20px; }
.stmt-field-group label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: #475569; margin-bottom: 8px; }
.stmt-input { width: 100%; padding: 11px 14px; border: 1.5px solid #cbd5e1; border-radius: 9px; font-size: 14px; color: #1e293b; background: #f8fafc; outline: none; -webkit-appearance: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.stmt-input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.stmt-select { width: 100%; padding: 11px 38px 11px 14px; border: 1.5px solid #cbd5e1; border-radius: 9px; font-size: 14px; color: #1e293b; outline: none; cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232563eb' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center; transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s; }
.stmt-select:focus { border-color: #2563eb; background-color: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.stmt-divider { height: 1px; background: #f1f5f9; margin: 4px 0 22px; }
.stmt-date-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #64748b; margin-bottom: 16px; }
.stmt-date-label span.badge-range { background: #eff6ff; color: #2563eb; border-radius: 20px; padding: 2px 10px; font-size: 10px; letter-spacing: 0.5px; font-weight: 700; }
.stmt-filter-footer { padding: 18px 28px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; align-items: center; gap: 12px; }
.btn-stmt-submit { display: inline-flex; align-items: center; gap: 8px; padding: 11px 28px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; border: none; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; letter-spacing: 0.2px; transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s; box-shadow: 0 3px 10px rgba(37,99,235,0.3); }
.btn-stmt-submit:hover    { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 5px 15px rgba(37,99,235,0.35); }
.btn-stmt-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.stmt-hint { font-size: 12px; color: #94a3b8; }
.stmt-alert { border-radius: 9px; padding: 12px 16px; font-size: 13px; font-weight: 500; margin-bottom: 18px; border: none; display: flex; align-items: center; gap: 9px; }
.stmt-alert.error   { background: #fef2f2; color: #b91c1c; border-left: 4px solid #ef4444; }
.stmt-alert.success { background: #f0fdf4; color: #15803d; border-left: 4px solid #22c55e; }
.stmt-side-info { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; overflow: hidden; height: 100%; }
.stmt-side-info .side-header { background: linear-gradient(135deg, #0f172a, #1e3a8a); padding: 22px 24px; color: #fff; }
.stmt-side-info .side-header h6 { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; opacity: 0.7; }
.stmt-side-info .side-header p { margin: 0; font-size: 15px; font-weight: 600; }
.stmt-tip-list { list-style: none; padding: 20px 24px; margin: 0; }
.stmt-tip-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; color: #475569; }
.stmt-tip-list li:last-child { border-bottom: none; }
.stmt-tip-list li .tip-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.stmt-tip-list li .tip-text strong { display: block; font-weight: 600; color: #1e293b; margin-bottom: 2px; }

.rpt-wrap { width: 100%; padding: 24px 0 40px; }
.rpt-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.rpt-actions .rpt-breadcrumb { font-size: 13px; color: #64748b; }
.rpt-actions .rpt-breadcrumb a { color: #2563eb; text-decoration: none; font-weight: 500; }
.rpt-actions .rpt-breadcrumb a:hover { text-decoration: underline; }
.rpt-actions .rpt-breadcrumb span { margin: 0 6px; }
.btn-rpt { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border-radius: 9px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.2s, transform 0.15s; text-decoration: none; }
.btn-rpt:hover    { opacity: 0.88; transform: translateY(-1px); }
.btn-rpt-print { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,0.28); }
.btn-rpt-back  { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; }

.rpt-card { background: #fff; border-radius: 16px; border: 1px solid #e2e8f0; overflow: hidden; box-shadow: 0 4px 20px rgba(15,23,42,0.07); }
.rpt-header { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%); padding: 36px 40px 32px; color: #fff; position: relative; overflow: hidden; }
.rpt-header::before { content: ''; position: absolute; top: -80px; right: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.rpt-header::after  { content: ''; position: absolute; bottom: -100px; left: -50px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,0.04); }
.rpt-header-inner { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.rpt-header-left .rpt-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; opacity: 0.6; margin-bottom: 8px; }
.rpt-header-left h2 { font-size: 26px; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.5px; }
.rpt-meta-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rpt-meta-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 500; }
.rpt-header-right .rpt-period-box { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; padding: 16px 20px; text-align: right; min-width: 180px; }
.rpt-period-box .period-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.65; margin-bottom: 6px; }
.rpt-period-box .period-from, .rpt-period-box .period-to { font-size: 13px; font-weight: 600; }
.rpt-period-box .period-sep { font-size: 10px; opacity: 0.55; margin: 3px 0; }
.rpt-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #e2e8f0; }
.rpt-stat-item { padding: 22px 28px; border-right: 1px solid #e2e8f0; position: relative; }
.rpt-stat-item:last-child { border-right: none; }
.rpt-stat-item .stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: #64748b; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.rpt-stat-item .stat-label .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rpt-stat-item .stat-value { font-size: 20px; font-weight: 800; color: #1e293b; letter-spacing: -0.5px; }
.rpt-stat-item .stat-value.credit { color: #16a34a; }
.rpt-stat-item .stat-value.debit  { color: #dc2626; }
.rpt-stat-item .stat-sub { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.rpt-table-section { padding: 0; }
.rpt-table-toolbar { padding: 18px 28px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.rpt-table-toolbar .toolbar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #1e40af; display: flex; align-items: center; gap: 8px; }
.rpt-table-toolbar .tx-count { background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 9px; }
.rpt-table { width: 100%; border-collapse: collapse; }
.rpt-table thead tr th { background: #1e293b; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 14px 20px; white-space: nowrap; border: none; }
.rpt-table thead tr th:first-child { padding-left: 28px; }
.rpt-table thead tr th:last-child  { padding-right: 28px; }
.rpt-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.15s; }
.rpt-table tbody tr:last-child { border-bottom: none; }
.rpt-table tbody tr:hover { background: #eff6ff; box-shadow: inset 4px 0 0 #2563eb; }
.rpt-table tbody tr td { padding: 14px 20px; font-size: 13.5px; color: #334155; vertical-align: middle; }
.rpt-table tbody tr td:first-child { padding-left: 28px; }
.rpt-table tbody tr td:last-child  { padding-right: 28px; }
.rpt-table .td-date { font-size: 12px; color: #64748b; white-space: nowrap; }
.rpt-table .td-desc { font-weight: 500; color: #1e293b; max-width: 220px; }
.tx-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.tx-badge.credit { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tx-badge.debit  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.td-ref     { font-family: 'Courier New', monospace; font-size: 12px; color: #64748b; background: #f8fafc; padding: 3px 8px !important; border-radius: 5px; }
.td-amount  { font-weight: 700; text-align: right; white-space: nowrap; }
.td-amount.credit { color: #16a34a; }
.td-amount.debit  { color: #dc2626; }
.td-balance { font-weight: 700; text-align: right; white-space: nowrap; color: #1e293b; }
.rpt-empty { text-align: center; padding: 60px 20px; color: #94a3b8; }
.rpt-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.rpt-empty p { font-size: 14px; margin: 0; }
.rpt-footer { padding: 18px 28px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #94a3b8; }
.rpt-footer strong { color: #475569; }
@media print {
    .rpt-actions, .no-print { display: none !important; }
    .rpt-card { box-shadow: none; border: none; }
    .rpt-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .rpt-table thead tr th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 768px) {
    .rpt-stats { grid-template-columns: repeat(2, 1fr); }
    .rpt-header { padding: 24px 20px; }
    .rpt-stat-item { padding: 16px 20px; }
    .rpt-table-toolbar { padding: 14px 16px; }
    .rpt-table thead tr th, .rpt-table tbody tr td { padding: 12px 14px; }
    .rpt-table thead tr th:first-child, .rpt-table tbody tr td:first-child { padding-left: 16px; }
}


/* ==========================================================================
   SECTION 7: AUTH (crm-ui/layout-auth) DESIGN SYSTEM
   body display:flex scoped to .auth-layout to avoid portal conflicts
   ========================================================================== */

.auth-layout body {
    font-family: 'Montserrat', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    background: #f1f5f9;
    overflow-x: hidden;
}

.auth-panel {
    display: none; width: 52%; min-height: 100vh;
    background: #0a0f1e; position: relative; overflow: hidden;
    flex-direction: column; justify-content: space-between; padding: 48px;
}
@media (min-width: 1024px) { .auth-panel { display: flex; } }

.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.18; animation: drift 12s ease-in-out infinite alternate; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, #0c2040, #0891b2); top: -120px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, #3b82f6, #8b5cf6); bottom: -80px; right: -80px; animation-delay: -4s; }
.orb-3 { width: 260px; height: 260px; background: radial-gradient(circle, #f59e0b, #ef4444); top: 40%; left: 55%; animation-delay: -8s; }
@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.08); }
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgb(12, 32, 64), color-mix(in srgb, rgb(12, 32, 64) 70%, rgb(99, 102, 241)));
    border-radius: 24px;
    overflow: hidden;
    text-align: center;
}

.auth-brand { position: relative; z-index: 10; }
.auth-brand-logo { display: inline-flex; align-items: center; justify-content: center; background: #ffffff; border-radius: 10px; padding: 6px 14px; }
.auth-brand-logo img { height: 40px; width: auto; object-fit: contain; display: block; }

.auth-hero { position: relative; z-index: 10; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 32px; }
.auth-hero h2 { color: #fff; font-size: 2.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.auth-hero h2 span { background: linear-gradient(90deg, #0c2040, #38bdf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-hero p { color: #94a3b8; font-size: 0.9375rem; line-height: 1.7; max-width: 380px; }

.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feat-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px; backdrop-filter: blur(6px); transition: background 0.2s ease; }
.feat-card:hover { background: rgba(255,255,255,0.08); }
.feat-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; margin-bottom: 10px; }
.feat-card h4 { color: #e2e8f0; font-size: 0.8125rem; font-weight: 600; margin-bottom: 3px; }
.feat-card p  { color: #64748b; font-size: 0.75rem; line-height: 1.5; }
.auth-panel-footer { position: relative; z-index: 10; color: #475569; font-size: 0.75rem; }

.auth-form-side { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; background: #fff; min-height: 100vh; }
@media (min-width: 1024px) { .auth-form-side { width: 48%; } }
.auth-form-inner { width: 100%; max-width: 400px; }
.mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
@media (min-width: 1024px) { .mobile-brand { display: none; } }
.mobile-brand-logo { display: inline-flex; align-items: center; justify-content: center; }
.mobile-brand-logo img { height: 36px; width: auto; object-fit: contain; display: block; }

.auth-form-inner .field-group { margin-bottom: 18px; }
.auth-form-inner label { display: block; font-size: 0.8125rem; font-weight: 500; color: #374151; margin-bottom: 6px; }
.auth-form-inner .input-wrap { position: relative; }
.auth-form-inner .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 0.875rem; pointer-events: none; }
.auth-form-inner input[type="email"],
.auth-form-inner input[type="password"],
.auth-form-inner input[type="text"] { width: 100%; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 11px 12px 11px 38px; font-size: 0.875rem; font-family: 'Montserrat', system-ui, sans-serif; color: #1e293b; background: #fff; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.auth-form-inner input:focus { border-color: #0c2040; box-shadow: 0 0 0 3px rgba(20,184,166,0.12); }
.auth-form-inner .input-action { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #94a3b8; font-size: 0.875rem; transition: color 0.15s ease; }
.auth-form-inner .input-action:hover { color: #0c2040; }

.auth-submit-btn { width: 100%; background: linear-gradient(135deg, #0c2040, #0891b2); color: #fff; border: none; border-radius: 10px; padding: 13px; font-size: 0.9375rem; font-weight: 600; font-family: 'Montserrat', system-ui, sans-serif; cursor: pointer; transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; margin-top: 6px; }
.auth-submit-btn:hover  { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,184,166,0.35); }
.auth-submit-btn:active { transform: scale(0.98); }

.auth-alert { border-radius: 10px; padding: 11px 14px; font-size: 0.8125rem; margin-bottom: 18px; display: none; align-items: flex-start; gap: 8px; }
.auth-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.auth-alert.show    { display: flex; }

.check-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.check-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: #0c2040; }
.check-row label { margin: 0; font-size: 0.8125rem; color: #6b7280; cursor: pointer; }
.auth-footer-copy { text-align: center; margin-top: 32px; font-size: 0.75rem; color: #94a3b8; }


/* ==========================================================================
   SECTION 9: DASH (crm-dashboard) DESIGN SYSTEM
   Prefix: dash-, hc-, chart-, action-
   ========================================================================== */

/* ── 9.1 Section labels ── */
.dash-section-label {
    font-size: 0.6875rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: #94a3b8; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}
.dash-section-label::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* ── 9.2 Health-check big number cards ── */
.hc-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 20px 22px; display: flex; align-items: flex-start; gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05); margin-bottom: 20px;
    transition: box-shadow 0.18s ease;
}
.hc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.09); }
.hc-icon {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.hc-value { font-size: 1.55rem; font-weight: 800; color: #0f172a; line-height: 1.1; letter-spacing: -0.02em; }
.hc-label { font-size: 0.78rem; color: #64748b; margin-top: 3px; font-weight: 500; }
.hc-sub   { font-size: 0.71rem; color: #94a3b8; margin-top: 4px; }

/* ── 9.3 Chart wrapper cards ── */
.chart-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.05); margin-bottom: 20px;
}
.chart-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid #f1f5f9;
    font-size: 1rem; font-weight: 700; color: #1e293b;
}
.chart-card-header .ch-icon {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.chart-card-header .ch-sub { font-size: 1rem; color: #94a3b8; font-weight: 400; margin-left: auto; }
.chart-body { padding: 16px 18px; }

/* ── 9.4 Action alert cards ── */
.action-alert-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.05); margin-bottom: 20px;
}
.action-alert-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px; border-bottom: 1px solid #f1f5f9;
}
.action-alert-title { display: flex; align-items: center; gap: 9px; font-size: 0.875rem; font-weight: 700; color: #1e293b; }
.action-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700; padding: 0 6px;
}
.action-item-list { max-height: 170px; overflow-y: auto; }
.action-item-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 18px; border-bottom: 1px solid #f8fafc; font-size: 0.8125rem;
}
.action-item-row:last-child { border-bottom: none; }
.action-item-name { color: #1e293b; font-weight: 500; }
.action-item-qty { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 5px; }
.action-empty { padding: 18px; font-size: 0.8125rem; color: #94a3b8; text-align: center; }


/* ==========================================================================
   SECTION 10: STR (crm-store) DESIGN SYSTEM
   Prefix: str-
   Covers: index (list), show (store detail), modals
   ========================================================================== */

/* ── 10.1 Page header ── */
.str-page-hdr {
    background: #0c2040; border-radius: 12px 12px 0 0;
    padding: 20px 24px; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.str-page-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; letter-spacing: 0.02em; }
.str-page-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.str-add-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 8px;
    padding: 8px 18px; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s ease;
}
.str-add-btn:hover { background: #0284c7; color: #fff; }

/* ── 10.2 Table card ── */
.str-table-card { background: #fff; border-radius: 0 0 12px 12px; border: 1px solid #e2e8f0; border-top: none; overflow: hidden; }
.str-table-inner { padding: 20px; }

/* ── 10.3 Show-page hero ── */
.str-store-hero {
    background: #0c2040; border-radius: 12px; padding: 24px;
    margin-bottom: 20px; display: flex; align-items: center; gap: 16px;
}
.str-store-hero-icon {
    width: 52px; height: 52px; background: rgba(14,165,233,0.2);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #0ea5e9; flex-shrink: 0;
}
.str-store-hero h3 { color: #fff; font-size: 1.25rem; font-weight: 700; margin: 0; }
.str-store-hero p  { color: #7dd3fc; font-size: 0.8rem; margin: 3px 0 0; }

/* ── 10.4 Info cards ── */
.str-info-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 20px; }
.str-info-hdr  { background: #eff6ff; padding: 14px 20px; border-bottom: 1px solid #e0f2fe; }
.str-info-hdr h6 { font-size: 0.8rem; font-weight: 700; color: #0c2040; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.str-info-body { padding: 16px 20px; }
.str-info-row  { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.str-info-row:last-child { border-bottom: none; }
.str-info-row .lbl { font-size: 0.78rem; font-weight: 600; color: #64748b; min-width: 120px; text-transform: uppercase; letter-spacing: 0.03em; padding-top: 1px; }
.str-info-row .val { font-size: 0.875rem; color: #1e293b; font-weight: 500; }

/* ── 10.5 Actions sidebar card ── */
.str-action-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; position: sticky; top: 20px; }
.str-action-hdr  { background: #0c2040; padding: 16px 20px; }
.str-action-hdr h5 { color: #fff; font-size: 0.875rem; font-weight: 700; margin: 0; }
.str-action-hdr p  { color: #7dd3fc; font-size: 0.75rem; margin: 3px 0 0; }
.str-action-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.str-action-btn  {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px;
    border-radius: 8px; font-size: 0.8125rem; font-weight: 600; border: none;
    cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
    text-decoration: none; width: 100%; justify-content: center;
}
.str-action-btn:hover { transform: translateY(-1px); text-decoration: none; }
.str-action-btn.ab-primary { background: #eff6ff; color: #0369a1; }
.str-action-btn.ab-primary:hover { background: #dbeafe; color: #0369a1; }
.str-action-btn.ab-teal    { background: #f0fdf4; color: #0f766e; }
.str-action-btn.ab-teal:hover    { background: #dcfce7; color: #0f766e; }
.str-action-btn.ab-danger  { background: #fef2f2; color: #dc2626; }
.str-action-btn.ab-danger:hover  { background: #fee2e2; color: #dc2626; }
.str-action-btn.ab-slate   { background: #f8fafc; color: #475569; }
.str-action-btn.ab-slate:hover   { background: #f1f5f9; color: #475569; }
.str-divider { height: 1px; background: #f1f5f9; margin: 4px 0; }

/* ── 10.6 Modals ── */
.str-modal-content { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.18); }
.str-modal-header  { padding: 18px 22px; border-bottom: none; display: flex; align-items: center; justify-content: space-between; }
.str-modal-header.create-hdr { background: #0c2040; }
.str-modal-header.edit-hdr   { background: #0369a1; }
.str-modal-header.teal-hdr   { background: #0f766e; }
.str-modal-header.danger-hdr { background: #991b1b; }
.str-modal-header h5 { color: #fff; font-size: 0.9375rem; font-weight: 700; margin: 0; }
.str-modal-header .btn-close { filter: invert(1); opacity: 0.8; }
.str-modal-body  { padding: 22px; }

/* ── 10.7 Modal form fields ── */
.str-section-label {
    font-size: 0.7rem; font-weight: 700; color: #0ea5e9;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #e0f2fe;
}
.str-field-group { margin-bottom: 16px; }
.str-field-group label { display: block; font-size: 0.78rem; font-weight: 600; color: #374151; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.str-input, .str-select, .str-textarea {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: 9px 12px; font-size: 0.875rem; color: #1e293b;
    background: #fff; outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.str-input:focus, .str-select:focus, .str-textarea:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
.str-input[readonly], .str-select[readonly] { background: #f8fafc; color: #64748b; cursor: default; }

/* ── 10.8 Modal footer & buttons ── */
.str-modal-footer { padding: 16px 22px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.str-btn { background: #0ea5e9; color: #fff; border: none; border-radius: 8px; padding: 9px 22px; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.15s ease; }
.str-btn:hover          { background: #0284c7; }
.str-btn.edit-btn       { background: #0369a1; }
.str-btn.edit-btn:hover { background: #1d4ed8; }
.str-btn.teal-btn       { background: #0f766e; }
.str-btn.teal-btn:hover { background: #115e59; }
.str-btn.danger-btn     { background: #dc2626; }
.str-btn.danger-btn:hover { background: #b91c1c; }
.str-btn.back-btn       { background: #475569; }
.str-btn.back-btn:hover { background: #334155; }

/* ── 10.9 Alerts ── */
.str-alert { border-radius: 8px; padding: 10px 14px; font-size: 0.8125rem; margin-bottom: 16px; align-items: center; gap: 8px; }
.str-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; display: flex; }
.str-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; display: flex; }

/* ── 10.10 Danger modal elements ── */
.str-danger-body { text-align: center; padding: 10px 0 6px; }
.str-danger-icon { width: 56px; height: 56px; background: #fef2f2; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 1.5rem; color: #dc2626; }
.str-danger-body h6 { font-size: 0.9375rem; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.str-danger-body p  { font-size: 0.8125rem; color: #64748b; }
.str-ref-badge { display: inline-block; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: 6px; padding: 3px 10px; font-family: monospace; font-size: 0.875rem; font-weight: 600; }


/* ==========================================================================
   SECTION 8: RM (crm-user-management) DESIGN SYSTEM
   Prefix: rm-
   Covers: Roles list, Create role modal, Edit role + permissions, Delete modal
   ========================================================================== */

/* ── 8.1 Page Header ── */
.rm-page-hdr {
    background: #0c2040; border-radius: 12px 12px 0 0;
    padding: 20px 24px; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.rm-page-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; letter-spacing: 0.02em; }
.rm-page-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.rm-add-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 8px;
    padding: 8px 18px; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s ease;
}
.rm-add-btn:hover { background: #0284c7; color: #fff; }

/* ── 8.2 Table Card ── */
.rm-table-card {
    background: #fff; border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0; border-top: none; overflow: hidden;
}
.rm-table-inner { padding: 20px; }

/* ── 8.3 Edit Page Header ── */
.rm-edit-hdr {
    background: #0c2040; border-radius: 12px 12px 0 0;
    padding: 20px 24px; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.rm-edit-hdr h4 { color: #fff; font-size: 2rem; font-weight: 700; margin: 0; }
.rm-edit-hdr p  { color: #7dd3fc; font-size: 0.78rem; margin: 3px 0 0; }

.rm-edit-card {
    background: #fff; border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0; border-top: none; overflow: hidden;
}
.rm-edit-body { padding: 24px; }

/* ── 8.4 Section Labels ── */
.rm-section-label {
    font-size: 0.7rem; font-weight: 700; color: #0ea5e9;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 14px; padding-bottom: 8px;
    border-bottom: 1px solid #e0f2fe;
}

/* ── 8.5 Form Fields ── */
.rm-field-group { margin-bottom: 18px; }
.rm-field-group label {
    display: block; font-size: 0.78rem; font-weight: 600; color: #374151;
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.rm-input, .rm-select, .rm-textarea {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: 9px 12px; font-size: 0.875rem; color: #1e293b;
    background: #fff; outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rm-input:focus, .rm-select:focus, .rm-textarea:focus {
    border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}

/* ── 8.6 Permissions Grid ── */
.rm-perm-section { margin-top: 24px; }

.rm-perm-group {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
    margin-bottom: 16px; overflow: hidden;
}
.rm-perm-group-hdr {
    background: #eff6ff; padding: 10px 16px; border-bottom: 1px solid #e0f2fe;
    display: flex; align-items: center; gap: 8px;
}
.rm-perm-group-hdr span {
    font-size: 0.78rem; font-weight: 700; color: #0369a1;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.rm-perm-group-hdr .rm-group-count {
    background: #0ea5e9; color: #fff; font-size: 0.68rem; font-weight: 700;
    border-radius: 10px; padding: 2px 8px;
}
.rm-perm-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px; padding: 12px 16px;
}
.rm-checkbox-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 7px; cursor: pointer;
    transition: background 0.12s ease;
}
.rm-checkbox-item:hover { background: #e0f2fe; }
.rm-checkbox-item input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: #0ea5e9;
    cursor: pointer; flex-shrink: 0;
}
.rm-checkbox-item label {
    font-size: 0.8125rem; color: #1e293b; cursor: pointer;
    margin: 0; text-transform: none; letter-spacing: normal; font-weight: 500;
}

/* ── 8.7 Form Footer ── */
.rm-form-footer {
    padding: 16px 24px; background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* ── 8.8 Buttons ── */
.rm-btn {
    background: #0ea5e9; color: #fff; border: none; border-radius: 8px;
    padding: 9px 22px; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: background 0.15s ease;
    display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none;
}
.rm-btn:hover            { background: #0284c7; color: #fff; }
.rm-btn.rm-btn-danger    { background: #dc2626; }
.rm-btn.rm-btn-danger:hover { background: #b91c1c; }
.rm-btn.rm-btn-slate     { background: #475569; }
.rm-btn.rm-btn-slate:hover  { background: #334155; color: #fff; }
.rm-btn.rm-btn-dark      { background: #0c2040; }
.rm-btn.rm-btn-dark:hover   { background: #0f2d56; color: #fff; }

/* ── 8.9 Alert Messages ── */
.rm-alert {
    border-radius: 8px; padding: 10px 14px; font-size: 0.8125rem;
    margin-bottom: 16px; display: none; align-items: center; gap: 8px;
}
.rm-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; display: flex; }
.rm-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; display: flex; }

/* ── 8.10 Modal Shared ── */
.rm-modal-content { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.18); }
.rm-modal-header  {
    padding: 18px 22px; border-bottom: none;
    display: flex; align-items: center; justify-content: space-between;
}
.rm-modal-header.create-hdr { background: #0c2040; }
.rm-modal-header.edit-hdr   { background: #0369a1; }
.rm-modal-header.danger-hdr { background: #991b1b; }
.rm-modal-header h5 { color: #fff; font-size: 0.9375rem; font-weight: 700; margin: 0; }
.rm-modal-header .btn-close { filter: invert(1); opacity: 0.8; }
.rm-modal-body  { padding: 22px; }
.rm-modal-footer {
    padding: 16px 22px; background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 10px;
}

/* ── 8.11 Delete Danger Body ── */
.rm-danger-body  { text-align: center; padding: 10px 0 6px; }
.rm-danger-icon  {
    width: 60px; height: 60px; background: #fef2f2; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px; font-size: 1.6rem; color: #dc2626;
}
.rm-danger-body h6   { font-size: 0.9375rem; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.rm-danger-body p    { font-size: 0.8125rem; color: #64748b; margin-bottom: 0; }
.rm-danger-name      {
    display: inline-block; background: #fef2f2; color: #dc2626;
    border: 1px solid #fecaca; border-radius: 6px;
    padding: 3px 10px; font-weight: 700; font-size: 0.875rem;
}


/* ═══════════════════════════════════════════════════════════════
   crm-sale — new.blade.php / receipt.blade.php
   ═══════════════════════════════════════════════════════════════ */

/* ── Scoped form controls ──────────────────────────────── */
.sale-form .sale-field {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: .9rem;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    height: auto;
    line-height: 1.5;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: auto;
    -webkit-appearance: auto;
}
.sale-form .sale-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.sale-form .sale-field::placeholder {
    color: #94a3b8;
}
.sale-form .sale-label {
    display: block;
    margin-bottom: 6px;
    font-size: .78rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.sale-form .sale-btn {
    display: block;
    width: 100%;
    padding: 11px 20px;
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .02em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, opacity .2s;
    text-align: center;
}
.sale-btn-primary { background: #2563eb; color: #fff; }
.sale-btn-primary:hover { background: #1d4ed8; }
.sale-btn-success { background: #16a34a; color: #fff; }
.sale-btn-success:hover { background: #15803d; }

/* Override portal-theme's .box-body { padding:0 !important } */
.sale-card .box-header.with-border { padding: 16px 24px !important; }
.sale-card .box-body { padding: 24px !important; }


/* ═══════════════════════════════════════════════════════════════
   crm-report — sales/detail.blade.php
   ═══════════════════════════════════════════════════════════════ */

/* ── Sale Detail Page ─────────────────────────────────────────── */
.sd-wrap { max-width: 960px; margin: 0 auto; padding: 28px 20px 48px; }

/* Breadcrumb / action bar */
.sd-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.sd-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #64748b;
}
.sd-breadcrumb a {
    color: #2563eb; text-decoration: none; font-weight: 500;
    display: flex; align-items: center; gap: 5px;
}
.sd-breadcrumb a:hover { color: #1d4ed8; }
.sd-breadcrumb span { color: #cbd5e1; }

/* Main card */
.sd-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Card header */
.sd-card-header {
    background: #0f172a;
    padding: 32px 36px 28px;
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px;
}
.sd-invoice-label {
    font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
    color: #94a3b8; text-transform: uppercase; margin-bottom: 6px;
}
.sd-invoice-number {
    font-size: 26px; font-weight: 700; color: #f1f5f9;
    letter-spacing: -0.5px; margin-bottom: 10px;
}
.sd-header-meta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sd-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px; border-radius: 99px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
}
.sd-badge-completed { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.25); }
.sd-badge-pending   { background: rgba(245,158,11,0.15);  color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.sd-badge-cancelled { background: rgba(239,68,68,0.15);   color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.sd-badge-dot {
    width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.sd-header-date {
    font-size: 12px; color: #94a3b8;
    display: flex; align-items: center; gap: 6px;
}
.sd-header-right { text-align: right; flex-shrink: 0; }
.sd-total-label {
    font-size: 11px; font-weight: 600; letter-spacing: 1px;
    color: #64748b; text-transform: uppercase; margin-bottom: 4px;
}
.sd-total-amount {
    font-size: 30px; font-weight: 800; color: #38bdf8;
    letter-spacing: -1px;
}
.sd-total-currency {
    font-size: 14px; font-weight: 600; color: #64748b; margin-left: 2px;
}

/* Info section */
.sd-info-section {
    padding: 28px 36px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfd;
}
.sd-section-title {
    font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
    text-transform: uppercase; color: #94a3b8;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 18px;
}
.sd-section-title::after {
    content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.sd-info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.sd-info-label {
    font-size: 11px; font-weight: 600; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px;
}
.sd-info-value {
    font-size: 14px; font-weight: 600; color: #1e293b;
}

/* Items table section */
.sd-items-section { padding: 28px 36px; }
.sd-table-wrap { overflow-x: auto; margin-top: 4px; }
.sd-table { width: 100%; border-collapse: collapse; }
.sd-table thead tr { background: #0f172a; }
.sd-table thead th {
    padding: 12px 16px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
    text-transform: uppercase; color: #94a3b8;
    text-align: left; white-space: nowrap;
}
.sd-table thead th:last-child { text-align: right; }
.sd-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.sd-table tbody tr:hover { background: #f0f9ff; }
.sd-table tbody td { padding: 14px 16px; font-size: 13.5px; color: #334155; }
.sd-table tbody td:last-child { text-align: right; font-weight: 600; color: #1e293b; }
.sd-table .td-item-name { font-weight: 600; color: #1e293b; }
.sd-qty-pill {
    display: inline-block; background: #eff6ff; color: #2563eb;
    border: 1px solid #bfdbfe; padding: 2px 10px; border-radius: 99px;
    font-size: 12px; font-weight: 700;
}
.sd-unit-text { font-size: 12px; color: #64748b; }

/* Grand total row */
.sd-total-row td {
    padding: 16px 16px !important;
    background: #f8fafc !important;
    border-top: 2px solid #e2e8f0 !important;
}
.sd-total-row .total-label {
    font-size: 13px; font-weight: 700; color: #0f172a;
    text-transform: uppercase; letter-spacing: 0.8px;
}
.sd-total-row .total-value {
    font-size: 16px; font-weight: 800; color: #2563eb;
    text-align: right;
}

/* Card footer */
.sd-card-footer {
    padding: 16px 36px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
}
.sd-footer-text { font-size: 12px; color: #94a3b8; }
.sd-footer-text strong { color: #64748b; }

/* Back / print buttons */
.btn-sd-back {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 18px; border-radius: 8px;
    background: #fff; border: 1px solid #e2e8f0;
    color: #475569; font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all 0.15s;
}
.btn-sd-back:hover {
    background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; text-decoration: none;
}
.btn-sd-print {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 18px; border-radius: 8px;
    background: #2563eb; border: 1px solid #2563eb;
    color: #fff; font-size: 13px; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: all 0.15s;
}
.btn-sd-print:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

@media print {
    .sd-actions, .btn-sd-print, .btn-sd-back { display: none !important; }
    .sd-card { box-shadow: none; border: none; }
}
@media (max-width: 600px) {
    .sd-card-header { flex-direction: column; gap: 16px; }
    .sd-header-right { text-align: left; }
    .sd-info-section, .sd-items-section, .sd-card-footer { padding-left: 20px; padding-right: 20px; }
}

/* ═══════════════════════════════════════════════
   User Profile Show Page  (crm-users::show)
   ═══════════════════════════════════════════════ */

/* ── Page wrapper ── */
.up-page { padding: 28px 32px; background: #f8fafc; min-height: calc(100vh - 64px); }

/* ── Breadcrumb bar ── */
.up-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #94a3b8;
    margin-bottom: 22px;
}
.up-breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color .15s;
}
.up-breadcrumb a:hover { color: #2563eb; }
.up-breadcrumb .sep { color: #cbd5e1; font-size: 11px; }
.up-breadcrumb .current { color: #334155; font-weight: 500; }

/* ── Hero card ── */
.up-hero {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 36px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.up-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(37,99,235,0.28);
}
.up-hero-info { flex: 1; min-width: 0; }
.up-hero-name {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.2;
}
.up-hero-sub {
    font-size: 13.5px;
    color: #64748b;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.up-hero-sub .dot { color: #cbd5e1; }
.up-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
}
.up-status-badge.active   { background: #dcfce7; color: #15803d; }
.up-status-badge.inactive { background: #fef2f2; color: #dc2626; }
.up-status-badge.pending  { background: #fef9c3; color: #a16207; }
.up-status-badge .dot-ind {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; display: inline-block;
}

/* ── Hero actions ── */
.up-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.up-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all .18s;
    white-space: nowrap;
}
.up-btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.22);
}
.up-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}
.up-btn-danger {
    background: #fff;
    color: #dc2626;
    border: 1.5px solid #fca5a5;
}
.up-btn-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
    transform: translateY(-1px);
    color: #dc2626;
    text-decoration: none;
}
.up-btn-ghost {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.up-btn-ghost:hover {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
    text-decoration: none;
}

/* ── Info grid ── */
.up-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) { .up-grid { grid-template-columns: 1fr; } }

/* ── Info card ── */
.up-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    overflow: hidden;
}
.up-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbff;
}
.up-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 14px;
}
.up-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.up-card-body { padding: 4px 0; }

/* ── Field row ── */
.up-field {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 13px 22px;
    border-bottom: 1px solid #f8fafc;
    gap: 12px;
}
.up-field:last-child { border-bottom: none; }
.up-field:hover { background: #f8fafc; }
.up-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.up-field-value {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    text-align: right;
    word-break: break-word;
}
.up-field-value.empty { color: #cbd5e1; font-style: italic; font-weight: 400; }

/* ── Role / type pills ── */
.up-pill {
    display: inline-block;
    padding: 2px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.up-pill-blue  { background: #eff6ff; color: #1d4ed8; }
.up-pill-slate { background: #f1f5f9; color: #475569; }
.up-pill-green { background: #dcfce7; color: #15803d; }
