/**
 * Oil Stock ERP — accounting-friendly workspace
 * Inter. Warm paper surfaces, teal ledger accent, tabular figures in grids.
 */

:root {
    --erp-slate-950: #020617;
    --erp-slate-900: #0f172a;
    --erp-slate-800: #1e293b;
    --erp-slate-700: #334155;
    --erp-slate-500: #64748b;
    --erp-slate-200: #e2e8f0;
    --erp-slate-100: #f1f5f9;
    /* Ledger-style surfaces: warm paper, easy long sessions */
    --erp-surface: #f3f1ec;
    --erp-surface-elevated: #fffef9;
    --erp-paper-border: #e6e3db;
    --erp-accent: #1e5a52;
    --erp-accent-soft: #2d6a60;
    --erp-accent-ring: rgba(30, 90, 82, 0.22);
    --erp-sidebar-w: 16.5rem;
    --erp-radius: 0.5rem;
    --erp-radius-lg: 0.75rem;
    --erp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 18px rgba(15, 23, 42, 0.03);
    --erp-shadow-md: 0 2px 8px rgba(15, 23, 42, 0.045), 0 1px 2px rgba(15, 23, 42, 0.03);
}

html {
    font-size: 15px;
}

body.app-shell {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--erp-surface);
    background-image: radial-gradient(ellipse 130% 90% at 50% -35%, rgba(30, 90, 82, 0.06), transparent 55%);
    color: var(--erp-slate-800);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.011em;
}

/* —— Top navigation —— */
.navbar-erp {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, var(--erp-shadow);
    min-height: 3.35rem;
}

.navbar-erp .navbar-brand {
    color: var(--erp-slate-900) !important;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.navbar-erp .navbar-brand .brand-sub {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--erp-slate-700);
    letter-spacing: 0.02em;
    margin-top: 0.1rem;
}

.navbar-erp .user-chip {
    font-size: 0.8rem;
    color: var(--erp-slate-700);
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-nav-logout {
    border-color: var(--erp-slate-200);
    color: var(--erp-slate-800);
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.35rem 0.85rem;
}

.btn-nav-logout:hover {
    background: var(--erp-slate-100);
    border-color: var(--erp-slate-200);
    color: var(--erp-slate-900);
}

.btn-sidebar-toggle {
    border-color: var(--erp-slate-200);
    color: var(--erp-slate-800);
}

/* —— Sidebar —— */
.sidebar-lg {
    width: var(--erp-sidebar-w) !important;
    background: linear-gradient(180deg, var(--erp-slate-900) 0%, var(--erp-slate-950) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar-brand-block {
    padding: 1.1rem 1rem 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 0.45rem;
}

.sidebar-brand-block .sb-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.sidebar-brand-block .sb-sub {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.35rem;
}

.sidebar-lg .nav {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.sidebar-lg .nav-link {
    border-radius: var(--erp-radius);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.76) !important;
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.sidebar-lg .nav-link i {
    opacity: 0.88;
    font-size: 1rem;
}

.sidebar-lg .section-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    margin-top: 1.15rem;
    margin-bottom: 0.4rem;
    padding: 0 0.75rem;
}

.sidebar-lg .nav-link:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff !important;
}

.sidebar-active {
    background: rgba(45, 106, 96, 0.28) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 0 rgba(167, 243, 208, 0.9), inset 0 0 0 1px rgba(110, 231, 183, 0.14);
}

.offcanvas.bg-dark {
    background: linear-gradient(180deg, var(--erp-slate-900) 0%, var(--erp-slate-950) 100%) !important;
}

/* —— Sidebar accordion groups (fewer visible links) —— */
#sidebarOffcanvas.offcanvas-start {
    background: linear-gradient(180deg, var(--erp-slate-900) 0%, var(--erp-slate-950) 100%);
}

.sidebar-group {
    margin-bottom: 0.12rem;
}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.48rem 0.75rem;
    margin: 0 0.65rem;
    border-radius: var(--erp-radius);
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-group-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.sidebar-group-toggle .sidebar-chevron {
    opacity: 0.65;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.sidebar-group-toggle[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
}

.sidebar-group-body {
    padding-bottom: 0.3rem;
}

.sidebar-lg .nav-link.sidebar-sub {
    padding: 0.4rem 0.65rem 0.4rem 1.2rem;
    margin-left: 0.65rem;
    margin-right: 0.65rem;
    font-size: 0.765rem;
    font-weight: 500;
}

.sidebar-offcanvas-scroll {
    max-height: calc(100vh - 4.25rem);
    overflow-y: auto;
    background: linear-gradient(180deg, var(--erp-slate-900) 0%, var(--erp-slate-950) 100%);
    -webkit-overflow-scrolling: touch;
}

.sidebar-group-toggle--mobile {
    margin: 0.2rem 0;
    padding: 0.5rem 0.8rem;
    border-radius: var(--erp-radius);
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-group-toggle--mobile:hover {
    background: rgba(255, 255, 255, 0.11);
}

/* —— Date fields: auto calendar icon (.erp-date-input) —— */
.erp-date-input-group-auto {
    min-width: 0;
}

.erp-date-input-group-auto > .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.erp-date-input-group-auto > .erp-date-cal-btn {
    flex-shrink: 0;
    margin-left: -1px;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

/* —— Focused report / workspace panels —— */
.erp-workspace-hero {
    border-radius: var(--erp-radius-lg);
    background: linear-gradient(130deg, #fffef9 0%, #f8faf8 45%, #ecfdf5 100%);
    border: 1px solid var(--erp-paper-border);
    box-shadow: var(--erp-shadow-md);
    padding: 1.2rem 1.3rem 1.1rem;
    margin-bottom: 1.2rem;
}

@media (min-width: 768px) {
    .erp-workspace-hero {
        padding: 1.35rem 1.55rem 1.2rem;
    }
}

.erp-workspace-hero .erp-hero-title {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.032em;
    color: var(--erp-slate-900);
    margin: 0 0 0.3rem;
}

.erp-workspace-hero .erp-hero-lead {
    font-size: 0.8125rem;
    color: var(--erp-slate-500);
    max-width: 42rem;
    line-height: 1.5;
    margin: 0;
}

.erp-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    color: var(--erp-slate-600);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.erp-stat-pill strong {
    color: var(--erp-slate-900);
    font-weight: 700;
}

.erp-table-card {
    border-radius: var(--erp-radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: var(--erp-shadow-md);
    overflow: hidden;
    background: #fff;
}

.erp-table-card .table {
    margin-bottom: 0;
}

.erp-table-card .table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    font-weight: 600;
    color: var(--erp-slate-500);
    border-bottom-width: 1px;
    background: #f8fafc;
    white-space: nowrap;
}

.erp-table-card .table tbody td {
    font-size: 0.8125rem;
    vertical-align: middle;
}

/* —— Main content —— */
main.app-main {
    padding: 1.5rem 1.35rem 2rem !important;
}

@media (min-width: 992px) {
    main.app-main {
        padding: 1.65rem 2rem 2.25rem !important;
    }
}

.page-heading {
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--erp-slate-900);
    letter-spacing: -0.035em;
    margin-bottom: 0.2rem;
    line-height: 1.25;
}

.page-heading-sub {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--erp-slate-500);
    line-height: 1.45;
    margin-bottom: 1.35rem;
    max-width: 52rem;
}

/* Screen titles using Bootstrap type scale */
.app-main > h1.h3,
.app-main > h1.h4,
.app-main > h1.h5 {
    color: var(--erp-slate-900);
    font-weight: 700;
    letter-spacing: -0.032em;
    margin-bottom: 1rem;
}

.app-main > h1.h5 + .text-muted,
.app-main > h1.h5 + p.text-muted {
    margin-top: -0.35rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

/* —— Cards & tables —— */
.card-soft,
.card-erp {
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: var(--erp-radius-lg);
    box-shadow: var(--erp-shadow-md);
    background: var(--erp-surface-elevated);
    overflow: hidden;
}

.card-erp .card-header,
.card-soft .card-header {
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--erp-slate-900);
    padding: 0.9rem 1.1rem;
}

/* Item add/edit — cohesive form shell */
.item-form-page .item-form-card-head {
    background: linear-gradient(110deg, #f8fafc 0%, #e0f2fe 42%, #eef2ff 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.item-form-page .item-form-card-head .item-form-id-pill {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.item-form-page .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--erp-slate-700);
    margin-bottom: 0.35rem;
}
.item-form-page .form-control,
.item-form-page .form-select {
    border-radius: 0.5rem;
}
.item-form-page .item-form-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.75rem;
}
.item-form-page .nag-unit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

/* Items list — category blocks + Nag display */
.item-form-page .items-category-block {
    background: #fff;
}
.item-form-page .items-category-block--break {
    border-top: 3px solid rgba(14, 165, 233, 0.15);
}
.item-form-page .items-cat-ribbon {
    background: linear-gradient(110deg, rgba(14, 165, 233, 0.08) 0%, rgba(255, 255, 255, 0) 72%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.item-form-page .items-cat-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
}
.item-form-page .items-cat-nag-tile,
.item-form-page .items-grand-nag-tile {
    min-width: 8rem;
}
.item-form-page .items-nag-display {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: #0369a1;
    letter-spacing: -0.02em;
}
.item-form-page .items-nag-display--grand {
    font-size: 2rem;
    color: #0c4a6e;
}
.item-form-page .items-nag-display--cell {
    font-size: 1.35rem;
    font-weight: 700;
}
.item-form-page .items-nag-display--subtotal {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f766e;
}
.item-form-page .items-col-nag {
    min-width: 7.5rem;
}
.item-form-page .items-cat-subtotal-row td {
    background: rgba(15, 118, 110, 0.06);
    border-top: 2px solid rgba(15, 118, 110, 0.2);
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}
.item-form-page .items-table thead th {
    padding: 0.85rem 1.1rem;
}
.item-form-page .items-table tbody td {
    padding: 0.8rem 1.1rem;
    vertical-align: middle;
}
.item-form-page .items-table tbody tr.items-data-row td {
    border-top: 1px solid var(--erp-slate-200, #e2e8f0);
}
.item-form-page .card + .card {
    margin-top: 1.25rem;
}

.table {
    --bs-table-border-color: var(--erp-slate-200);
}

.table thead th {
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--erp-slate-500);
    background: linear-gradient(180deg, var(--erp-slate-100) 0%, #eef2f6 100%);
    border-bottom-width: 1px;
    padding: 0.7rem 0.8rem;
}

.table tbody td {
    padding: 0.65rem 0.8rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.55);
}

/* Forms */
.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--erp-slate-700);
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-color: rgba(203, 213, 225, 0.85);
    font-size: 0.875rem;
    border-radius: var(--erp-radius);
    padding: 0.5rem 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: var(--erp-slate-500);
    opacity: 0.65;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--erp-accent-soft);
    box-shadow: 0 0 0 3px var(--erp-accent-ring);
}

.btn-primary {
    --bs-btn-bg: var(--erp-accent);
    --bs-btn-border-color: var(--erp-accent);
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn {
    border-radius: var(--erp-radius);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.btn-sm {
    border-radius: 0.5rem;
    font-weight: 600;
}

.btn-link {
    font-weight: 600;
}

.btn-outline-secondary {
    border-color: rgba(148, 163, 184, 0.65);
    color: var(--erp-slate-700);
    font-weight: 600;
}

.btn-outline-secondary:hover {
    background: var(--erp-slate-100);
    border-color: var(--erp-slate-200);
    color: var(--erp-slate-900);
}

/* Alerts */
.alert {
    border-radius: var(--erp-radius-lg);
    font-size: 0.875rem;
    border: 1px solid transparent;
    box-shadow: var(--erp-shadow);
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    color: #991b1b;
    border-color: rgba(248, 113, 113, 0.25);
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    color: #1e40af;
    border-color: rgba(96, 165, 250, 0.25);
}

/* Footer */
.footer-erp {
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.75rem;
    color: var(--erp-slate-500);
}

/* —— Login page (see auth/login.php) —— */
body.login-portal {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(145deg, var(--erp-slate-100) 0%, #e0e7ef 50%, var(--erp-slate-100) 100%);
    -webkit-font-smoothing: antialiased;
}

.login-card {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--erp-radius-lg);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    background: #fff;
}

.login-card .login-brand {
    background: linear-gradient(135deg, var(--erp-slate-900) 0%, #1e3a5f 100%);
    color: #fff;
    padding: 2rem 1.5rem;
    text-align: center;
}

.login-card .login-brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}

.login-card .login-brand p {
    font-size: 0.75rem;
    opacity: 0.85;
    margin: 0.5rem 0 0;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-card .login-body {
    padding: 2rem 1.75rem 1.75rem;
}

.login-icon-wrap {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-icon-wrap i {
    font-size: 1.5rem;
}

/* KPI cards on dashboard — optional hook */
.kpi-card .display-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--erp-slate-900);
}

.kpi-card .kpi-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--erp-slate-700);
}

/* —— Daily stock entry — clearer grid & no clipped “In / Damage” columns —— */
.stock-entry-shell .stock-entry-hero {
    background: linear-gradient(135deg, #fff 0%, var(--erp-slate-100) 100%);
    border: 1px solid var(--erp-slate-200);
    border-radius: var(--erp-radius);
}

.stock-entry-shell .stock-entry-toolbar {
    background: #fff;
    border: 1px solid var(--erp-slate-200);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
}

.stock-entry-shell .stock-entry-toolbar .form-label {
    margin-bottom: 0.25rem;
}

.stock-entry-shell .table-responsive-stock {
    border-radius: 0 0 var(--erp-radius) var(--erp-radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stock-entry-shell .table-stock-entry {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
}

.stock-entry-shell .table-stock-entry thead th {
    white-space: normal;
    vertical-align: bottom;
    padding: 0.65rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
    background: linear-gradient(180deg, var(--erp-slate-100) 0%, #eef2f6 100%);
    border-bottom-color: var(--erp-slate-200);
}

.stock-entry-shell .table-stock-entry .th-stack .th-main {
    display: block;
}

.stock-entry-shell .table-stock-entry .th-stack .th-sub {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--erp-slate-700);
    margin-top: 0.15rem;
}

.stock-entry-shell .table-stock-entry tbody td {
    padding: 0.5rem 0.55rem;
    vertical-align: middle;
}

.stock-entry-shell .table-stock-entry .col-cat {
    min-width: 7rem;
    max-width: 11rem;
    white-space: normal;
}

.stock-entry-shell .table-stock-entry .col-item {
    min-width: 10rem;
    max-width: 16rem;
    white-space: normal;
}

.stock-entry-shell .table-stock-entry .col-unit {
    min-width: 4.25rem;
    white-space: nowrap;
}

.stock-entry-shell .table-stock-entry .col-num-ro {
    min-width: 5.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stock-entry-shell .table-stock-entry .col-num-edit {
    min-width: 7.25rem;
    width: 7.25rem;
}

.stock-entry-shell .table-stock-entry .col-num-edit .form-control {
    min-width: 6.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stock-entry-shell .table-stock-entry .col-diff {
    min-width: 4.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stock-entry-shell .table-stock-entry .col-remark {
    min-width: 9rem;
    max-width: 14rem;
}

.stock-entry-shell .table-stock-entry .tbody-divider:not(:first-child) td {
    box-shadow: inset 0 1px 0 var(--erp-slate-100);
}

.stock-entry-shell .card-stock-table {
    overflow: hidden;
}

.stock-entry-shell .tiny-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.stock-entry-shell .erp-stock-hero-icon {
    width: 3rem;
    height: 3rem;
}

.stock-entry-shell .erp-godown-strip {
    gap: 0.5rem;
}

.stock-entry-shell .erp-godown-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--erp-slate-200);
    background: #fff;
    text-decoration: none;
    color: inherit;
    min-width: 8.5rem;
    max-width: 14rem;
    transition: box-shadow 0.15s ease, transform 0.12s ease, border-color 0.12s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.stock-entry-shell .erp-godown-chip:hover {
    border-color: var(--erp-slate-300);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    color: inherit;
}

.stock-entry-shell .erp-godown-chip-active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
}

.stock-entry-shell .erp-godown-chip-ok:not(.erp-godown-chip-active) {
    border-left: 3px solid #198754;
}

.stock-entry-shell .erp-godown-chip-warn:not(.erp-godown-chip-active) {
    border-left: 3px solid #fd7e14;
}

.stock-entry-shell .erp-godown-chip-danger:not(.erp-godown-chip-active) {
    border-left: 3px solid #dc3545;
}

.stock-entry-shell .erp-godown-chip-locked:not(.erp-godown-chip-active) {
    border-left: 3px solid #6c757d;
    opacity: 0.92;
}

.stock-entry-shell .erp-godown-chip-muted:not(.erp-godown-chip-active) {
    border-left: 3px solid var(--erp-slate-300);
}

.stock-entry-shell .erp-godown-chip-title {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
}

.stock-entry-shell .erp-godown-chip-sub {
    font-size: 0.68rem;
    color: var(--erp-slate-700);
}

.stock-entry-shell .erp-godown-chip-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--erp-slate-700);
}

.stock-entry-shell .erp-godown-chip-meta {
    font-size: 0.65rem;
    color: var(--erp-slate-700);
}

.stock-entry-shell .table-stock-entry tr.erp-row-needs-physical .in-phys {
    border-color: #fd7e14;
    background: #fff8f0;
}

.stock-entry-shell .table-stock-entry tr.erp-row-phys-invalid .in-phys,
.recon-master-card tr.erp-row-phys-invalid .in-phys {
    border-color: var(--bs-danger);
    background: #fff5f5;
}

.stock-entry-shell .erp-phys-row-err,
.recon-master-card .erp-phys-row-err {
    display: block;
    font-size: 0.7rem;
    line-height: 1.25;
    color: var(--bs-danger);
    max-width: 11rem;
}

.stock-entry-shell .stock-import-details summary::-webkit-details-marker {
    display: none;
}

.stock-entry-shell .stock-import-details summary {
    list-style: none;
}

/* Daily stock ledger — stock/daily_entry.php (scoped; does not affect GdwnSum / recon) */
.daily-stock-ledger .dsl-page-icon {
    width: 3.5rem;
    height: 3.5rem;
}

.daily-stock-ledger .dsl-hero-card .dsl-hero-main {
    border-bottom: 1px solid var(--erp-slate-200);
}

@media (min-width: 992px) {
    .daily-stock-ledger .dsl-hero-card .dsl-hero-main {
        border-bottom: none;
        border-right: 1px solid var(--erp-slate-200);
    }
}

.daily-stock-ledger .dsl-hero-stat-inner {
    padding: 1rem 1.25rem;
    height: 100%;
    min-height: 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
}

.daily-stock-ledger .dsl-hero-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--erp-slate-700);
}

.daily-stock-ledger .dsl-hero-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--erp-slate-900);
}

@media (max-width: 991.98px) {
    .daily-stock-ledger .dsl-hero-stat-first {
        border-right: 1px solid var(--erp-slate-200);
    }
}

@media (min-width: 992px) {
    .daily-stock-ledger .dsl-hero-stat-first {
        border-bottom: 1px solid var(--erp-slate-200);
    }
}

.daily-stock-ledger .dsl-formula-card {
    background: linear-gradient(135deg, #fff 0%, var(--erp-slate-100) 100%);
}

.daily-stock-ledger .dsl-formula-step {
    background: #fff;
    border: 1px solid var(--erp-slate-200);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem;
    min-width: 7.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.daily-stock-ledger .dsl-formula-step-accent {
    border-color: rgba(13, 110, 253, 0.35);
    background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
}

.daily-stock-ledger .dsl-formula-step-ic {
    color: var(--erp-slate-600);
    font-size: 1rem;
    line-height: 1;
}

.daily-stock-ledger .dsl-formula-step-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--erp-slate-900);
}

.daily-stock-ledger .dsl-formula-step-desc {
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--erp-slate-700);
}

.daily-stock-ledger .dsl-formula-op {
    padding: 0 0.15rem;
    font-size: 1.1rem;
    min-width: 1rem;
    text-align: center;
}

.daily-stock-ledger .dsl-ledger-scroll {
    max-height: min(72vh, 860px);
    overflow: auto;
}

.daily-stock-ledger .dsl-ledger-card .table-stock-entry thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.12);
    background: linear-gradient(180deg, var(--erp-slate-100) 0%, #eef2f6 100%);
}

.daily-stock-ledger .dsl-ledger-card-head {
    border-left: 4px solid #0d6efd;
}

.daily-stock-ledger .dsl-cat-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 0.2rem 0.45rem;
    border-radius: 0.35rem;
    background: var(--erp-slate-100);
    color: var(--erp-slate-800);
    max-width: 100%;
    word-break: break-word;
}

.daily-stock-ledger .dsl-save-footer {
    border-left: 3px solid #198754;
    background: linear-gradient(180deg, #fafdfb 0%, #fff 100%);
}

.daily-stock-ledger .dsl-hero-gradient {
    background: linear-gradient(125deg, #fff 0%, #f0f7ff 45%, #faf8ff 100%);
}

.daily-stock-ledger .dsl-filters-card-elevated {
    box-shadow: 0 0.35rem 1.25rem rgba(15, 23, 42, 0.07);
    border: 1px solid rgba(13, 110, 253, 0.08);
}

.daily-stock-ledger .dsl-sticky-save-bar {
    position: sticky;
    bottom: 0;
    z-index: 96;
    backdrop-filter: blur(8px);
    box-shadow: 0 -0.5rem 1.5rem rgba(15, 23, 42, 0.09);
}

.daily-stock-ledger .dsl-save-btn {
    min-width: 10.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.daily-stock-ledger .dsl-save-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0.35rem 1rem rgba(25, 135, 84, 0.35);
}

.daily-stock-ledger .dsl-save-toast-wrap {
    z-index: 1090;
}

/* Stock item unit — Nag highlighted in grids */
.erp-unit-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.22rem 0.55rem;
    border-radius: 0.45rem;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
}

.erp-unit-badge--nag {
    color: #fff;
    background: linear-gradient(135deg, #0e7490 0%, #1d4ed8 52%, #5b21b6 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.12),
        0 2px 8px rgba(14, 116, 144, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-shadow: 0 1px 0 rgba(15, 23, 42, 0.2);
}

.erp-unit-badge--muted {
    background: var(--erp-slate-100);
    color: var(--erp-slate-700);
    border: 1px solid var(--erp-slate-200);
    letter-spacing: 0.07em;
    font-weight: 600;
}

/* —— SAI TRADING COMPANY branding —— */
.brand-logo-img {
    width: 2.875rem;
    height: 2.875rem;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0.7rem;
    border: 1px solid rgba(30, 90, 82, 0.14);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 2px 10px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(251, 191, 36, 0.22);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 45%);
}

.navbar-brand-sai .navbar-brand {
    max-width: min(100%, 22rem);
}

@media (max-width: 991.98px) {
    .navbar-brand-sai .navbar-brand {
        max-width: calc(100% - 3.5rem);
    }
}

.brand-company-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--erp-slate-900);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-app-line {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--erp-slate-700);
}

.navbar-brand-sai .brand-sub {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--erp-slate-700);
}

.sidebar-brand-logo {
    border-radius: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(251, 191, 36, 0.18);
}

.sidebar-brand-block .sb-secondary {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.15rem;
}

.sidebar-brand-block .sb-location {
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.35;
    margin-top: 0.35rem;
}

.login-banner-wrap {
    line-height: 0;
    background: linear-gradient(180deg, #431407 0%, #0f172a 100%);
    border-bottom: 4px solid #f59e0b;
    box-shadow: 0 6px 28px rgba(67, 20, 7, 0.32);
}

.login-banner-img {
    display: block;
    max-height: 220px;
    object-fit: cover;
    object-position: center 35%;
}

@media (max-width: 575.98px) {
    .login-banner-img {
        max-height: 150px;
        object-position: 20% 35%;
    }
}

.login-portal-sai {
    padding-top: 0 !important;
}

.login-brand-logo {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(251, 191, 36, 0.25);
}

.login-brand-sai.login-brand-sai {
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 55%, #0f172a 100%);
}

.login-brand-sai h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-card-sai.login-card {
    overflow: visible;
}

.login-brand-sai p.text-warning {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.72rem !important;
}

/* —— Dashboard: subsection + insight rows + smart panel —— */
.dash-subsection-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #475569;
    margin: 0 0 0.25rem;
}

.dash-subsection-lead {
    max-width: 52rem;
}

.dashboard-pred-section .dashboard-pred-card {
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: 0.85rem !important;
    border-left: 4px solid #3b82f6 !important;
    background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-pred-section .dashboard-pred-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
}

.dashboard-data-insights {
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: 1rem !important;
    overflow: hidden;
}

.dashboard-data-insights__head {
    padding: 1.1rem 1.35rem 1rem !important;
    background: linear-gradient(118deg, #fffbeb 0%, #fff 42%, #f0f9ff 100%);
    border-bottom: 1px solid rgba(251, 191, 36, 0.35) !important;
}

.dashboard-data-insights__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #b45309;
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.12);
    flex-shrink: 0;
}

.dashboard-data-insights__kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b45309;
    margin-bottom: 0.2rem;
}

.dashboard-data-insights__title {
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.dashboard-data-insights__lead {
    color: #64748b;
    max-width: 48rem;
}

.dash-insight-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dash-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    line-height: 1.45;
    font-size: 0.9rem;
}

.dash-insight-item__icon {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.dash-insight-item__text {
    flex: 1;
    min-width: 0;
    color: #1e293b;
}

.dash-insight-item--info {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, #eff6ff 0%, #fff 28%);
}

.dash-insight-item--info .dash-insight-item__icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.dash-insight-item--warning {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(90deg, #fffbeb 0%, #fff 28%);
}

.dash-insight-item--warning .dash-insight-item__icon {
    background: #fef3c7;
    color: #b45309;
}

.dash-insight-item--danger {
    border-left: 4px solid #ef4444;
    background: linear-gradient(90deg, #fef2f2 0%, #fff 28%);
}

.dash-insight-item--danger .dash-insight-item__icon {
    background: #fee2e2;
    color: #b91c1c;
}

.dash-insight-item--success {
    border-left: 4px solid #22c55e;
    background: linear-gradient(90deg, #f0fdf4 0%, #fff 28%);
}

.dash-insight-item--success .dash-insight-item__icon {
    background: #dcfce7;
    color: #15803d;
}

.dash-insight-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #fff;
}

.dash-insight-table-cap {
    padding: 0.5rem 0.85rem;
    margin: 0;
    letter-spacing: 0.06em;
    color: #475569;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.dash-insight-table {
    font-size: 0.82rem;
}

.dash-insight-table thead th {
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none !important;
    padding: 0.5rem 0.75rem !important;
}

.dash-insight-table tbody td {
    border-color: #e2e8f0 !important;
    vertical-align: middle;
    padding: 0.45rem 0.75rem !important;
}

.dash-insight-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.dashboard-smart-card {
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    border-radius: 1rem !important;
}

.dashboard-smart-head {
    background: linear-gradient(125deg, #312e81 0%, #4338ca 38%, #1e1b4b 88%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.dashboard-smart-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 80% at 100% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

.dashboard-smart-head__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.2rem 1.35rem 1.15rem;
}

.dashboard-smart-head__kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.35rem;
}

.dashboard-smart-head__title {
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.dashboard-smart-head__lead {
    color: rgba(255, 255, 255, 0.78);
    max-width: 36rem;
}

.dashboard-smart-badge {
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.4em 0.85em;
}

.dashboard-smart-badge--on {
    background: #fbbf24 !important;
    color: #1e1b4b !important;
}

.dashboard-smart-badge--rules {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.dashboard-smart-body {
    padding-top: 1.15rem !important;
    background: linear-gradient(180deg, #fafafa 0%, #fff 14%);
}

.dashboard-ai-setup-hint {
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px dashed rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
}

.dashboard-ai-setup-hint__title {
    font-weight: 700;
    font-size: 0.82rem;
    color: #4338ca;
    margin-bottom: 0.35rem;
}

.ai-brief-pane {
    white-space: pre-wrap;
    background: var(--erp-slate-100);
    border: 1px solid var(--erp-slate-200);
    color: var(--erp-slate-800);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Physical reconciliation sheet */
.recon-context-strip {
    border-color: var(--bs-border-color) !important;
}

.reconciliation-shell .recon-page-tabs {
    border-bottom: 1px solid var(--bs-border-color);
}

.reconciliation-shell .recon-page-tabs .nav-link {
    color: var(--bs-secondary-color);
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: 0.35rem 0.35rem 0 0;
}

.reconciliation-shell .recon-page-tabs .nav-link.active {
    color: var(--erp-accent);
    border-bottom-color: var(--erp-accent);
    background: rgba(30, 90, 82, 0.06);
}

.reconciliation-shell .recon-factory-parent-bar {
    background: linear-gradient(90deg, rgba(30, 90, 82, 0.09) 0%, rgba(30, 90, 82, 0.02) 55%, transparent 100%);
    border-left: 4px solid var(--erp-accent);
}

.reconciliation-shell .recon-sum-factory-row th {
    background: rgba(30, 90, 82, 0.1);
    border-bottom: 1px solid rgba(30, 90, 82, 0.18);
    font-weight: 600;
}

.reconciliation-shell .recon-sum-cat-row td.recon-sum-cat-cell {
    padding-left: 1.5rem !important;
    border-left: 3px solid rgba(13, 110, 253, 0.35);
    background: rgba(255, 255, 255, 0.55);
}

.reconciliation-shell .recon-sum-tree {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    opacity: 0.55;
}

.recon-quick-card {
    background: var(--bs-body-bg);
}

.reconciliation-shell .recon-rollup-card > summary {
    list-style: none;
}

.reconciliation-shell .recon-rollup-card > summary::-webkit-details-marker {
    display: none;
}

.recon-hero-gradient {
    background: linear-gradient(118deg, #0f766e 0%, #065f46 42%, #0f172a 100%);
}

.recon-stat-pill .recon-stat-num {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.1;
}

.recon-stat-pill .recon-stat-lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

.recon-import-file {
    max-width: min(100%, 22rem);
}

.recon-mini-table-wrap {
    overflow: hidden;
}

.recon-day-history-card .recon-day-history-table-wrap {
    max-height: 16rem;
    overflow-y: auto;
}

.recon-day-history-table tr.recon-day-row--current {
    background: rgba(var(--bs-primary-rgb), 0.08);
}

.recon-day-import-block {
    background: rgba(var(--bs-primary-rgb), 0.04);
    border-radius: 0.5rem;
    padding: 0.75rem 0.5rem 0.25rem;
}

.recon-tally-sync-check {
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    background: rgba(var(--bs-primary-rgb), 0.06);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    max-width: 42rem;
}

.recon-tally-import-form .recon-import-file {
    max-width: min(100%, 22rem);
}

.recon-day-history-table tr.recon-day-row--has-var td {
    background: rgba(var(--bs-warning-rgb), 0.06);
}

.recon-variance-reminder-alert {
    animation: recon-var-pulse 2.5s ease-in-out 2;
}

@keyframes recon-var-pulse {
    0%, 100% { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
    50% { box-shadow: 0 0 0 0.35rem rgba(var(--bs-warning-rgb), 0.35); }
}

.recon-variance-list-card .recon-variance-list-table .text-danger {
    font-variant-numeric: tabular-nums;
}

.sidebar-var-badge {
    font-size: 0.65rem;
    vertical-align: middle;
}

.recon-period-report-shell .recon-period-kpi {
    min-height: 5.5rem;
}

.recon-period-report-shell .recon-period-item-table-wrap,
.recon-period-report-shell .recon-period-detail-table-wrap {
    max-height: 22rem;
    overflow-y: auto;
}

.recon-period-report-shell .recon-period-table .font-monospace {
    font-variant-numeric: tabular-nums;
}

.reconciliation-shell .recon-col-b {
    background: rgba(13, 110, 253, 0.06);
}

/* Nag qty — large readable numbers (reconciliation / GdwnSum import) */
.reconciliation-shell .recon-nag-qty {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: #0369a1;
}
.reconciliation-shell .recon-nag-qty--md {
    font-size: 1.35rem;
}
.reconciliation-shell .recon-nag-qty--lg {
    font-size: 1.85rem;
    color: #0c4a6e;
}
.reconciliation-shell .recon-sys-book-wrap {
    font-size: 1rem;
    line-height: 1.35;
    display: inline-block;
    text-align: end;
}
.reconciliation-shell .recon-sys-book-wrap .recon-nag-qty {
    color: inherit;
}
.reconciliation-shell .recon-cat-ribbon {
    background: linear-gradient(110deg, rgba(14, 165, 233, 0.1) 0%, rgba(255, 255, 255, 0) 72%);
}
.reconciliation-shell .recon-cat-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
}
.reconciliation-shell .recon-cat-nag-tile {
    min-width: 8.5rem;
}
.reconciliation-shell .recon-grand-nag-tile {
    min-width: 7rem;
}
.reconciliation-shell .recon-cat-subtotal-row td {
    background: rgba(15, 118, 110, 0.06);
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
    border-top: 2px solid rgba(14, 165, 233, 0.2);
}
.reconciliation-shell .recon-category-block + .recon-category-block {
    border-top: 3px solid rgba(14, 165, 233, 0.12);
}

.reconciliation-shell .recon-sys-book-num {
    font-weight: 500;
}

.reconciliation-shell .recon-cat-ribbon-sys-total .recon-sys-book-wrap {
    font-size: 1rem;
}

.reconciliation-shell .recon-cat-ribbon-sys-total .recon-sys-book-wrap .erp-unit-badge--nag {
    font-size: 0.72rem;
}

.reconciliation-shell .recon-grand-strip .recon-sys-book-wrap {
    font-size: 1rem;
}

.reconciliation-shell .recon-col-c {
    background: rgba(25, 135, 84, 0.07);
}

.recon-row-alert {
    background-color: rgba(251, 191, 36, 0.08);
}

.recon-badge-match,
.recon-badge-var {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.recon-badge-match {
    color: #047857;
    background: rgba(16, 185, 129, 0.2);
}

.recon-badge-var {
    color: #c2410c;
    background: rgba(251, 191, 36, 0.35);
}

.recon-badge-pending {
    color: #475569;
    background: rgba(148, 163, 184, 0.28);
}

.recon-row-pending {
    background-color: rgba(148, 163, 184, 0.1);
}

.recon-master-card {
    border-radius: 0.85rem;
}

.recon-category-block:last-child {
    border-bottom: none !important;
}

.recon-cat-ribbon {
    background: linear-gradient(105deg, #f8fafc 0%, #f1f5f9 45%, #eef2ff 100%);
}

.recon-inner-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    border-bottom-width: 1px;
}

.recon-inner-table .recon-col-item {
    padding-left: 1.25rem;
}

.recon-cat-live-foot td {
    vertical-align: middle;
}

.recon-review-col {
    min-width: 11rem;
    vertical-align: middle;
}

.recon-review-ta {
    min-width: 10rem;
    max-width: 16rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
}

.reconciliation-shell .recon-diff-zero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.25rem 0.45rem;
    border-radius: 0.5rem;
    color: #fff;
    background: linear-gradient(145deg, #22c55e, #16a34a);
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.35);
    font-size: 1.05rem;
    line-height: 1;
    vertical-align: middle;
}

.reconciliation-shell .recon-diff-zero i {
    display: block;
    line-height: 1;
}

.reconciliation-shell .recon-diff-var {
    display: inline-block;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.95);
    border: 1px solid rgba(248, 113, 113, 0.85);
    border-radius: 0.4rem;
    padding: 0.15rem 0.45rem;
    line-height: 1.25;
}

.reconciliation-shell .td-diff {
    vertical-align: middle;
}

.gdwnsum-hero {
    background: linear-gradient(120deg, #f8fafc 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9 !important;
}

.gdwnsum-workflow {
    border-left: 4px solid #6366f1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    overflow: hidden;
}

.gdwnsum-guide-card {
    border-radius: 1rem !important;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

.gdwnsum-guide-accent {
    height: 5px;
    background: linear-gradient(90deg, #0ea5e9, #6366f1, #22c55e, #f59e0b);
    opacity: 0.95;
}

.gdwnsum-guide-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
}

.gdwnsum-guide-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.25;
}

.gdwnsum-guide-lead {
    font-size: 0.82rem;
    color: #64748b;
}

.gdwnsum-ctx-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f172a;
    background: linear-gradient(145deg, #fff, #f1f5f9);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.65rem;
    padding: 0.4rem 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.gdwnsum-ctx-pill i {
    color: #0ea5e9;
    opacity: 0.9;
}

.gdwnsum-ctx-pill--godown i {
    color: #6366f1;
}

.gdwnsum-guide-card .gdwnsum-workflow-head {
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.9) 0%, rgba(255, 255, 255, 0.98) 45%, rgba(238, 242, 255, 0.75) 100%);
}

.gdwnsum-guide-card .gdwnsum-workflow-step {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    padding-top: 1rem;
}

.gdwnsum-guide-card .gdwnsum-workflow-ico {
    position: relative;
}

.gdwnsum-guide-card .gdwnsum-step-num {
    position: absolute;
    top: -0.4rem;
    left: -0.4rem;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.2rem;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.2rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #334155, #0f172a);
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
    z-index: 1;
}

.gdwnsum-step-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #475569;
}

.gdwnsum-step-list li {
    margin-bottom: 0.35rem;
}

.gdwnsum-step-list li:last-child {
    margin-bottom: 0;
}

.gdwnsum-workflow .gdwnsum-workflow-head {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%);
}

.gdwnsum-workflow-step {
    position: relative;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gdwnsum-workflow-step:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.gdwnsum-workflow-ico {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.gdwnsum-workflow-ico--1 {
    background: rgba(14, 165, 233, 0.15);
    color: #0369a1;
}

.gdwnsum-workflow-ico--2 {
    background: rgba(99, 102, 241, 0.15);
    color: #4338ca;
}

.gdwnsum-workflow-ico--3 {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.gdwnsum-workflow-ico--4 {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.gdwnsum-workflow-step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.gdwnsum-workflow-step p {
    font-size: 0.875rem;
    line-height: 1.45;
    color: #475569;
}

.gdwnsum-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.gdwnsum-table thead th.th-stack {
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    vertical-align: bottom;
    line-height: 1.25;
}

.gdwnsum-table .th-stack .th-main {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
}

.gdwnsum-table .th-stack .th-sub {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--erp-slate-700, #334155);
    margin-top: 0.15rem;
}

.gdwnsum-crosscheck-table .gdwn-item-block--catbreak .gdwn-row-closing {
    border-top: 3px solid #cbd5e1;
}

.gdwnsum-crosscheck-table .gdwn-row-physical.gdwn-var .gdwn-review-ta {
    border-color: #f59e0b;
    box-shadow: 0 0 0 0.05rem rgba(245, 158, 11, 0.25);
}

.gdwn-double-check .bi-check-lg {
    font-size: 0.82rem;
}

.gdwn-double-check .bi-check-lg + .bi-check-lg {
    margin-left: -0.15rem;
}

.gdwn-pending {
    background: rgba(241, 245, 249, 0.95);
}

.gdwn-var {
    background: rgba(254, 243, 199, 0.4);
}

.gdwnsum-crosscheck-table .gdwn-cat-summary td,
.gdwnsum-crosscheck-table .gdwn-grand-summary td {
    vertical-align: middle;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.gdwnsum-crosscheck-table .gdwn-cat-summary.gdwn-pending,
.gdwnsum-crosscheck-table .gdwn-grand-summary.gdwn-pending {
    background: rgba(241, 245, 249, 0.98);
}

.gdwnsum-crosscheck-table .gdwn-cat-summary.gdwn-var,
.gdwnsum-crosscheck-table .gdwn-grand-summary.gdwn-var {
    background: rgba(254, 243, 199, 0.35);
}

.gdwn-review-ta {
    min-width: 9rem;
    font-size: 0.82rem;
    border-radius: 0.5rem;
}

.recon-status-col {
    width: 1%;
    white-space: nowrap;
}

.recon-dash-card .recon-dash-inner,
.recon-dash-card .card-body.recon-dash-inner {
    background: linear-gradient(125deg, #134e4a 0%, #0f766e 40%, #0f172a 100%);
}

.recon-dash-inner .btn-light:hover {
    background: #f8fafc;
}

.stretched-link-overlay {
    display: inline-block;
    margin-top: 0.85rem !important;
}

/* Dashboard analytics charts */
.dashboard-page {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 2.5rem;
}

.dashboard-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.75rem;
    padding: 1.35rem 1.5rem 1.35rem;
    border-radius: 1rem;
    background: linear-gradient(125deg, #f8fafc 0%, #e0f2fe 38%, #eef2ff 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.dashboard-hero-title {
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin: 0 0 0.2rem;
}

.dashboard-hero-sub {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
}

.dashboard-hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f172a;
    background: #fff;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.dashboard-filter-card {
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(15, 23, 42, 0.07) !important;
}

.dashboard-filter-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    padding: 1.25rem 1.5rem 1rem;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.dashboard-filter-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.dashboard-filter-head-copy {
    flex: 1 1 280px;
    min-width: min(100%, 16rem);
}

.dashboard-preset-wrap {
    flex: 1 1 300px;
    min-width: min(100%, 18rem);
}

.dashboard-preset-label {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.dashboard-range-summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.65rem;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    font-size: 0.84rem;
    color: #334155;
}

.dashboard-range-summary-label {
    font-weight: 600;
    color: #1e40af;
}

.dashboard-filter-section {
    padding: 0.15rem 0;
}

.dashboard-filter-section-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.dashboard-filter-section-hint {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.dashboard-filter-section--scope {
    padding: 1.1rem 1.15rem 0.25rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 70%);
    border: 1px solid #e2e8f0;
}

.dashboard-filter-check {
    background: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 0;
}

.dashboard-filter-check .form-check-input {
    margin-top: 0.35rem;
}

.dashboard-preset-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .dashboard-preset-toolbar {
        justify-content: flex-start;
    }

    .dashboard-filter-head {
        flex-direction: column;
        align-items: stretch;
    }
}

.dashboard-page .dash-preset-btn {
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #fff;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.dashboard-page .dash-preset-btn:hover {
    border-color: rgba(30, 90, 82, 0.4);
    color: #123f3a;
    box-shadow: 0 2px 10px rgba(30, 90, 82, 0.12);
}

.dashboard-page .dash-preset-btn.is-active {
    background: linear-gradient(135deg, #1e5a52 0%, #2d6a60 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 90, 82, 0.32);
}

.dashboard-filter-body {
    padding: 1.35rem 1.5rem 1.5rem;
    background: #fff;
}

.dashboard-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.dashboard-page .dashboard-date-input {
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.65);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    min-height: 2.65rem;
    padding: 0.45rem 0.75rem;
    padding-right: 2.35rem;
    max-width: 100%;
}

.dashboard-page .dashboard-date-input:focus {
    border-color: var(--erp-accent);
    box-shadow: 0 0 0 0.2rem var(--erp-accent-ring);
}

.dashboard-page .dashboard-select {
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.65);
    min-height: 2.65rem;
}

.dashboard-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-top: 0.35rem;
}

.dashboard-btn-apply {
    border: none;
    border-radius: 0.65rem;
    padding: 0.55rem 1.35rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(135deg, #1e5a52 0%, #2d6a60 100%);
    box-shadow: 0 4px 16px rgba(30, 90, 82, 0.32);
}

.dashboard-btn-apply:hover {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.dashboard-btn-reset {
    border-radius: 0.65rem;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.75);
    background: #fff;
    color: #475569;
}

.dashboard-btn-reset:hover {
    background: #f8fafc;
    color: #0f172a;
}

.dashboard-btn-secondary {
    border-radius: 0.65rem;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.45);
    background: #eff6ff;
    color: #1d4ed8;
}

.dashboard-btn-secondary:hover {
    background: #dbeafe;
    color: #1e3a8a;
}

.dashboard-btn-ghost {
    border-radius: 0.65rem;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
}

.dashboard-btn-ghost:hover {
    background: #f1f5f9;
}

.dashboard-chart-tabs .nav-link {
    border-radius: 999px !important;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    color: #475569;
    border: 1px solid transparent;
}

.dashboard-chart-tabs .nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dashboard-chart-tabs .nav-link.active {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.dashboard-pred-card .card-body {
    padding: 1.15rem 1.25rem;
}

.dashboard-stat-card {
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: 0.9rem !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09) !important;
}

.dashboard-stat-card .card-body {
    padding: 1.15rem 1.25rem;
}

.dashboard-panel-card,
.dashboard-section-card {
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: 0.9rem !important;
    overflow: hidden;
}

.dashboard-section-card .card-header {
    padding: 0.95rem 1.25rem;
}

.dashboard-section-card .card-body {
    padding: 1.15rem 1.25rem;
}

.dashboard-quick-card {
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 1rem !important;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden;
}

.dashboard-quick-head {
    padding: 1rem 1.35rem !important;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 50%) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
}

.dashboard-quick-body {
    padding: 1.25rem 1.35rem !important;
    background: #fff;
}

.dashboard-quick-grid {
    gap: 0.6rem;
}

.dashboard-quick-btn {
    border-radius: 0.65rem;
    padding: 0.55rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #1e40af;
}

.dashboard-quick-btn:hover {
    background: #eff6ff;
    color: #1e3a8a;
    border-color: rgba(37, 99, 235, 0.55);
}

.dashboard-quick-btn--accent {
    border-color: rgba(13, 148, 136, 0.45);
    color: #0f766e;
    background: linear-gradient(180deg, #ecfdf5 0%, #f0fdfa 100%);
}

.dashboard-quick-btn--accent:hover {
    background: #d1fae5;
    color: #115e59;
}

.dashboard-quick-btn--muted {
    border-color: #cbd5e1;
    color: #475569;
    background: #fff;
}

.dashboard-quick-btn--muted:hover {
    background: #f8fafc;
    color: #0f172a;
}

.dashboard-chart-wrap {
    position: relative;
    height: 280px;
}

.dashboard-chart-tall {
    height: 340px;
}

.erp-import-report-card {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    border-radius: 1rem !important;
    animation: erpIrrIn 0.45s ease-out;
}

@keyframes erpIrrIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.erp-irr-header {
    background: linear-gradient(118deg, #1e3a8a 0%, #4338ca 38%, #0f172a 100%);
}

.erp-irr-icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.bg-gradient-irr-body {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 55%, #eef2f7 100%);
}

.erp-irr-stat {
    position: relative;
    border-radius: 0.85rem;
    padding: 0.85rem 0.75rem 0.75rem 2.35rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.erp-irr-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.erp-irr-stat-ic {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #6366f1;
    opacity: 0.9;
}

.erp-irr-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    line-height: 1.25;
}

.erp-irr-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin-top: 0.15rem;
}

.erp-irr-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.erp-irr-pill-success {
    color: #047857;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.erp-irr-pill-warn {
    color: #b45309;
    background: rgba(251, 191, 36, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.erp-irr-table-wrap {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.erp-irr-table-wrap-warn {
    border-color: rgba(245, 158, 11, 0.45);
}

.erp-irr-table thead th {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: #475569;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-bottom: 1px solid #94a3b8;
    white-space: nowrap;
}

.erp-irr-table tbody td {
    font-size: 0.8rem;
    border-color: rgba(226, 232, 240, 0.95);
}

.erp-irr-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.85);
}

.erp-irr-table-warn tbody tr:nth-child(even) {
    background: rgba(254, 252, 232, 0.65);
}

/* Export row-count toast */
.erp-export-toast {
    min-width: 280px;
    max-width: 360px;
    border-radius: 1rem;
    border: none;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
    animation: erpToastPop 0.35s ease-out;
}

@keyframes erpToastPop {
    from {
        opacity: 0;
        transform: translateX(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.erp-export-toast .erp-et-head {
    background: linear-gradient(120deg, #059669 0%, #0d9488 45%, #0e7490 100%);
    color: #fff;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-export-toast .erp-et-body {
    padding: 1rem 1rem 1.1rem;
    background: #fff;
}

.erp-export-toast .erp-et-num {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.erp-export-toast .erp-et-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.35rem;
}

.erp-export-toast .erp-et-note {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    line-height: 1.35;
}

/* SKU count badge on stock toolbars */
.erp-sku-count-pill {
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #3730a3;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.08);
}

.erp-import-preview-option {
    background: linear-gradient(180deg, #fafbff 0%, #f1f5f9 100%);
    border-color: rgba(99, 102, 241, 0.22) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.erp-import-preview-option:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(67, 56, 202, 0.12);
    border-color: rgba(99, 102, 241, 0.45) !important;
}

.erp-date-input {
    max-width: 12rem;
    font-variant-numeric: tabular-nums;
    cursor: text;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 2.25rem;
}

/* Negotiation logger — SKU checklist (extra right inset + card rows) */
#bz .bargain-sku-scroll {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.85rem 1.35rem 0.85rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    scrollbar-gutter: stable;
}

#bz .bargain-sku-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-right: 0.15rem;
}

@media (min-width: 576px) {
    #bz .bargain-sku-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1.15rem;
    }
}

#bz .bargain-sku-row {
    margin: 0;
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0.85rem 0.5rem 0.6rem;
    min-height: 2.65rem;
    align-items: flex-start;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#bz .bargain-sku-row:hover {
    border-color: rgba(30, 90, 82, 0.35);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
}

#bz .bargain-sku-row:has(.form-check-input:checked) {
    border-color: rgba(30, 90, 82, 0.45);
    background: linear-gradient(95deg, rgba(209, 250, 229, 0.45) 0%, #fff 18%);
    box-shadow: 0 2px 8px rgba(30, 90, 82, 0.08);
}

#bz .bargain-sku-row .form-check-input {
    margin-top: 0.4rem;
    flex-shrink: 0;
}

#bz .bargain-sku-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 0.4rem;
    padding-right: 0.35rem;
    width: 100%;
    cursor: pointer;
    line-height: 1.35;
}

#bz .bargain-sku-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    word-break: break-word;
}

#bz .bargain-sku-cat {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

/* Flatpickr — ERP calendar styling */
.flatpickr-calendar {
    border-radius: 0.9rem;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(30, 90, 82, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-family: Inter, system-ui, sans-serif;
}
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 600;
    color: #0f172a;
}
.flatpickr-weekdays {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0.5rem 0.5rem 0 0;
}
span.flatpickr-weekday {
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
}
.flatpickr-day {
    border-radius: 0.45rem;
    font-weight: 500;
}
.flatpickr-day:hover,
.flatpickr-day:focus {
    background: rgba(30, 90, 82, 0.1);
    border-color: transparent;
    color: #123f3a;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--erp-accent);
    border-color: var(--erp-accent);
    color: #fff;
    font-weight: 600;
}
.flatpickr-day.today {
    border-color: rgba(30, 90, 82, 0.45);
}
.flatpickr-day.today:hover {
    background: rgba(30, 90, 82, 0.12);
    border-color: var(--erp-accent);
    color: #123f3a;
}
.erp-fp-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #475569;
    font-size: 1rem;
}
.flatpickr-months .flatpickr-prev-month:hover .erp-fp-cal-nav,
.flatpickr-months .flatpickr-next-month:hover .erp-fp-cal-nav {
    color: #1e5a52;
}

/* =====================================================================
   Accounting workspace — readable figures, calm chrome, stationery feel
   ===================================================================== */

.navbar-erp .brand-app-line i.text-primary {
    color: var(--erp-accent) !important;
}

.table {
    font-variant-numeric: tabular-nums;
}

.table td.text-end,
.table th.text-end,
.table .font-monospace {
    font-variant-numeric: tabular-nums;
}

.card:not(.border-0),
.card-soft,
.card-erp {
    border-color: var(--erp-paper-border) !important;
    background: var(--erp-surface-elevated);
}

.card.shadow-sm {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 0 rgba(255, 255, 255, 0.65) inset !important;
}

.page-heading {
    color: var(--erp-slate-900);
}

.page-heading-sub {
    color: var(--erp-slate-700);
    max-width: 46rem;
}

.app-main .form-label {
    color: var(--erp-slate-800);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--erp-accent-soft);
    box-shadow: 0 0 0 0.2rem var(--erp-accent-ring);
}

.btn-primary {
    --bs-btn-bg: var(--erp-accent);
    --bs-btn-border-color: var(--erp-accent);
    --bs-btn-hover-bg: #174a44;
    --bs-btn-hover-border-color: #174a44;
    --bs-btn-active-bg: #123f3a;
    --bs-btn-active-border-color: #123f3a;
    --bs-btn-disabled-bg: var(--erp-accent);
    --bs-btn-disabled-border-color: var(--erp-accent);
}

.btn-outline-primary {
    --bs-btn-color: var(--erp-accent);
    --bs-btn-border-color: var(--erp-accent);
    --bs-btn-hover-bg: var(--erp-accent);
    --bs-btn-hover-border-color: var(--erp-accent);
    --bs-btn-active-bg: #174a44;
    --bs-btn-active-border-color: #174a44;
}

.badge.text-bg-primary,
.bg-primary {
    background-color: var(--erp-accent) !important;
}

.alert-info {
    background-color: rgba(30, 90, 82, 0.07);
    border-color: rgba(30, 90, 82, 0.18);
    color: var(--erp-slate-800);
}

.link-primary,
a.text-primary {
    color: var(--erp-accent) !important;
}

.link-primary:hover,
a.text-primary:hover {
    color: #123f3a !important;
}

/* Stock / recon toolbars: worksheet strip */
.stock-entry-toolbar {
    background: var(--erp-surface-elevated);
    border: 1px solid var(--erp-paper-border);
}

/* Dashboard date chips — ledger clarity */
.dashboard-date-input {
    font-variant-numeric: tabular-nums;
}

/* —— Video play / theater (godown proof, videos list, watch page) —— */
.erp-btn-video-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(155deg, #3d8a7c 0%, var(--erp-accent) 42%, #123f3a 100%);
    color: #fff;
    box-shadow:
        0 4px 16px rgba(30, 90, 82, 0.38),
        0 0 0 2px rgba(255, 254, 249, 0.95),
        0 0 0 4px rgba(30, 90, 82, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.erp-btn-video-play:hover {
    color: #fff;
    filter: brightness(1.05);
    transform: scale(1.07);
    box-shadow:
        0 6px 22px rgba(30, 90, 82, 0.45),
        0 0 0 2px #fffef9,
        0 0 0 5px rgba(30, 90, 82, 0.18);
}

.erp-btn-video-play:active {
    transform: scale(1.02);
}

.erp-btn-video-play:focus-visible {
    outline: 2px solid var(--erp-accent-soft);
    outline-offset: 3px;
}

.erp-btn-video-play .bi-play-fill {
    font-size: 1.35rem;
    line-height: 1;
    margin-left: 3px;
}

.erp-btn-watch-video {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.4rem 1rem 0.4rem 0.75rem;
    border-radius: 2rem;
    border: none;
    color: #fff !important;
    background: linear-gradient(135deg, #3d8a7c, var(--erp-accent) 50%, #174a44);
    box-shadow: 0 3px 14px rgba(30, 90, 82, 0.3);
    text-decoration: none !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.erp-btn-watch-video:hover {
    color: #fff !important;
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(30, 90, 82, 0.38);
}

.erp-btn-watch-video .bi {
    font-size: 1.1rem;
    opacity: 0.95;
}

.erp-video-modal .modal-content {
    border: none;
    border-radius: var(--erp-radius-lg);
    overflow: hidden;
    box-shadow: 0 1.5rem 4rem rgba(2, 6, 23, 0.55);
}

.erp-video-modal .modal-header {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.85rem 1.1rem;
}

.erp-video-modal .modal-title {
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-video-modal .modal-title .bi {
    font-size: 1.25rem;
    color: #5eead4;
    opacity: 0.95;
}

.erp-video-modal .btn-close {
    filter: invert(1);
    opacity: 0.72;
}

.erp-video-modal-stage {
    background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(45, 106, 96, 0.2), transparent 55%), #020617;
}

.erp-video-frame {
    padding: 0.65rem;
}

@media (min-width: 768px) {
    .erp-video-frame {
        padding: 1rem 1.15rem 1.15rem;
    }
}

.erp-video-frame-inner {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(94, 234, 212, 0.12),
        0 1rem 3rem rgba(0, 0, 0, 0.45);
}

.erp-video-frame-inner video {
    display: block;
    width: 100%;
    vertical-align: middle;
}

/* Standalone watch.php (dark page) */
.erp-watch-page .erp-video-watch-shell {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.erp-watch-page .erp-video-watch-shell .ratio {
    border-radius: 0.65rem;
    /* visible: hidden clips native video controls on some browsers */
    overflow: visible;
    box-shadow:
        0 0 0 1px rgba(94, 234, 212, 0.15),
        0 1.25rem 3.5rem rgba(0, 0, 0, 0.5);
}

.erp-watch-page .erp-video-watch-shell video {
    background: #000;
    border-radius: 0.65rem;
}

/* Roadmap: CCTV-assisted stock count (dashboard + stock pages) */
.erp-future-feature-card {
    border: 1px dashed rgba(30, 90, 82, 0.22);
    background: linear-gradient(135deg, rgba(30, 90, 82, 0.05) 0%, rgba(255, 254, 249, 0.92) 48%, var(--erp-surface-elevated) 100%);
}

.erp-future-feature-icon {
    width: 3.15rem;
    height: 3.15rem;
    background: rgba(30, 90, 82, 0.1);
    color: var(--erp-accent);
}

.erp-future-badge {
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(30, 90, 82, 0.12) !important;
    color: var(--erp-accent) !important;
}

.erp-watch-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5eead4;
    margin-bottom: 0.35rem;
}

/* —— Global keyboard shortcuts help —— */
.erp-shortcuts-modal-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    font-size: 1.2rem;
}

.erp-kbd-hint {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #0f172a;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 0.3rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.erp-shortcuts-global li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.erp-shortcuts-table thead th {
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none !important;
}

#erpShortcutsModal .modal-content {
    border-radius: 1rem !important;
}

/* —— Global fetch / AJAX busy overlay —— */
.erp-ajax-loader {
    position: fixed;
    inset: 0;
    z-index: 20050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.erp-ajax-loader.is-active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.erp-ajax-loader__panel {
    min-width: 11rem;
    padding: 1.35rem 1.6rem 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(155deg, rgba(30, 90, 82, 0.97) 0%, rgba(15, 60, 54, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.erp-ajax-loader__spin {
    width: 2.35rem;
    height: 2.35rem;
    border-width: 0.22rem;
}

.erp-ajax-loader__text {
    letter-spacing: 0.02em;
}

.erp-ajax-loader__sub {
    font-size: 0.68rem;
}

/* —— Operational stock grid report —— */
.osg-report {
    --osg-sky: #0ea5e9;
    --osg-indigo: #6366f1;
    --osg-emerald: #059669;
    --osg-amber: #d97706;
    --osg-rose: #e11d48;
}

.osg-hero {
    border-radius: 1rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, #f0fdf4 100%);
}

.osg-hero-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--osg-sky), var(--osg-indigo), var(--osg-emerald), var(--osg-amber));
}

.osg-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
}

.osg-hero-pills {
    max-width: 22rem;
}

.osg-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.65rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.osg-pill--sky {
    color: #0c4a6e;
    background: linear-gradient(145deg, #e0f2fe, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.35);
}

.osg-pill--sky i {
    color: var(--osg-sky);
}

.osg-pill--violet {
    color: #312e81;
    background: linear-gradient(145deg, #eef2ff, #faf5ff);
    border-color: rgba(99, 102, 241, 0.35);
}

.osg-pill--violet i {
    color: var(--osg-indigo);
}

.osg-pill--amber {
    color: #78350f;
    background: linear-gradient(145deg, #fffbeb, #fff7ed);
    border-color: rgba(245, 158, 11, 0.45);
}

.osg-pill--amber i {
    color: var(--osg-amber);
}

.osg-filters {
    border-radius: 1rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.osg-filter-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.osg-flabel {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.osg-fcontrol {
    border-color: rgba(148, 163, 184, 0.45);
    background: #fff;
}

.osg-fcontrol:focus {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.12);
}

.osg-run-btn {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

.osg-run-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.42);
}

.osg-table-shell {
    border-radius: 1rem !important;
}

.osg-table-cap {
    background: linear-gradient(90deg, rgba(240, 249, 255, 0.9), rgba(255, 255, 255, 0.98));
}

.osg-cap-badge {
    font-weight: 600;
    color: #1e3a8a;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.osg-table {
    font-size: 0.875rem;
}

.osg-table thead th {
    border: none;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f8fafc;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: middle;
}

.osg-th-meta {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
}

.osg-th-num {
    min-width: 5.5rem;
}

.osg-th-close {
    background: linear-gradient(180deg, #4338ca 0%, #3730a3 100%) !important;
}

.osg-th-phys {
    background: linear-gradient(180deg, #047857 0%, #065f46 100%) !important;
}

.osg-th-var {
    background: linear-gradient(180deg, #b45309 0%, #92400e 100%) !important;
}

.osg-table tbody td {
    border-color: rgba(226, 232, 240, 0.95);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.osg-table tbody tr.osg-row-balanced {
    background: rgba(240, 253, 244, 0.35);
}

.osg-table tbody tr.osg-row-var {
    background: rgba(254, 252, 232, 0.55);
}

.osg-table tbody tr:hover {
    background: rgba(224, 242, 254, 0.65) !important;
}

.osg-td-date {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.osg-godown-chip {
    display: inline-block;
    max-width: 10rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3730a3;
    background: linear-gradient(135deg, #eef2ff, #faf5ff);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.osg-td-lane {
    color: #475569;
    font-size: 0.82rem;
}

.osg-td-sku {
    font-weight: 500;
    color: #0f172a;
}

.osg-num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.osg-num-close {
    color: #4338ca;
    background: rgba(238, 242, 255, 0.45);
}

.osg-num-phys {
    color: #047857;
    background: rgba(209, 250, 229, 0.35);
}

.osg-phys-missing {
    color: #94a3b8 !important;
    font-weight: 500 !important;
    background: rgba(248, 250, 252, 0.9) !important;
}

.osg-var-zero {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    font-weight: 700;
    font-size: 0.82rem;
    color: #047857;
}

.osg-var-zero i {
    font-size: 1rem;
}

.osg-var-badge {
    color: #fff !important;
    font-weight: 700;
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.28);
}

.osg-empty {
    background: linear-gradient(180deg, #fafafa 0%, #f1f5f9 100%);
}

.osg-empty-ico {
    font-size: 2.75rem;
    color: #cbd5e1;
}

.osg-pager .pagination {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.25rem;
}

/* —— Variance dossier extract report —— */
.vde-report {
    --vde-rose: #e11d48;
    --vde-amber: #d97706;
    --vde-slate: #475569;
    --vde-teal: #0d9488;
    --vde-violet: #7c3aed;
}

.vde-hero {
    border-radius: 1rem !important;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 42%, #fef2f2 100%);
}

.vde-hero-accent {
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #ef4444, #a855f7, #0d9488);
}

.vde-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
}

.vde-hero-pills {
    max-width: 24rem;
}

.vde-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.65rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.vde-pill--slate {
    color: #1e293b;
    background: linear-gradient(145deg, #f1f5f9, #ffffff);
    border-color: rgba(100, 116, 139, 0.35);
}

.vde-pill--slate i {
    color: var(--vde-slate);
}

.vde-pill--rose {
    color: #881337;
    background: linear-gradient(145deg, #ffe4e6, #fff1f2);
    border-color: rgba(244, 63, 94, 0.35);
}

.vde-pill--rose i {
    color: var(--vde-rose);
}

.vde-pill--amber {
    color: #78350f;
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    border-color: rgba(245, 158, 11, 0.45);
}

.vde-pill--amber i {
    color: var(--vde-amber);
}

.vde-status-strip .vde-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
}

.vde-chip strong {
    font-weight: 800;
    margin-left: 0.15rem;
}

.vde-chip--pending {
    color: #92400e;
    background: rgba(254, 243, 199, 0.95);
    border-color: rgba(245, 158, 11, 0.45);
}

.vde-chip--adjusted {
    color: #0c4a6e;
    background: rgba(224, 242, 254, 0.95);
    border-color: rgba(14, 165, 233, 0.35);
}

.vde-chip--accepted {
    color: #14532d;
    background: rgba(220, 252, 231, 0.95);
    border-color: rgba(34, 197, 94, 0.4);
}

.vde-chip--rejected {
    color: #7f1d1d;
    background: rgba(254, 226, 226, 0.95);
    border-color: rgba(248, 113, 113, 0.45);
}

.vde-filters {
    border-radius: 1rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.vde-filter-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.vde-flabel {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.vde-fcontrol {
    border-color: rgba(148, 163, 184, 0.45);
    background: #fff;
}

.vde-fcontrol:focus {
    border-color: rgba(225, 29, 72, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(225, 29, 72, 0.1);
}

.vde-run-btn {
    background: linear-gradient(135deg, #dc2626 0%, #c026d3 52%, #7c3aed 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.32);
}

.vde-run-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 4px 14px rgba(192, 38, 211, 0.35);
}

.vde-table-shell {
    border-radius: 1rem !important;
}

.vde-table-cap {
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.45), rgba(255, 255, 255, 0.98));
}

.vde-cap-badge {
    font-weight: 600;
    color: #831843;
    background: linear-gradient(135deg, #fce7f3, #ffe4e6);
    border: 1px solid rgba(244, 63, 94, 0.28);
}

.vde-table {
    font-size: 0.875rem;
}

.vde-table thead th {
    border: none;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f8fafc;
    padding-top: 0.72rem;
    padding-bottom: 0.72rem;
    vertical-align: middle;
}

.vde-th-meta {
    background: linear-gradient(180deg, #475569 0%, #334155 100%) !important;
}

.vde-th-num {
    min-width: 5rem;
}

.vde-th-sys {
    background: linear-gradient(180deg, #0369a1 0%, #0c4a6e 100%) !important;
}

.vde-th-phys {
    background: linear-gradient(180deg, #047857 0%, #065f46 100%) !important;
}

.vde-th-delta {
    background: linear-gradient(180deg, #c2410c 0%, #9a3412 100%) !important;
}

.vde-th-qc {
    background: linear-gradient(180deg, #6d28d9 0%, #5b21b6 100%) !important;
    min-width: 6.5rem;
}

.vde-th-note {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
    font-size: 0.62rem !important;
}

.vde-table tbody td {
    border-color: rgba(226, 232, 240, 0.95);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.vde-row-pending {
    background: rgba(254, 249, 195, 0.35);
}

.vde-row-adjusted {
    background: rgba(224, 242, 254, 0.35);
}

.vde-row-accepted {
    background: rgba(220, 252, 231, 0.35);
}

.vde-row-rejected {
    background: rgba(254, 226, 226, 0.4);
}

.vde-table tbody tr:hover {
    background: rgba(255, 237, 213, 0.55) !important;
}

.vde-td-date {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.vde-godown-chip {
    display: inline-block;
    max-width: 9rem;
    padding: 0.12rem 0.45rem;
    border-radius: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #5b21b6;
    background: linear-gradient(135deg, #f5f3ff, #faf5ff);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.vde-td-lane {
    color: #64748b;
    font-size: 0.82rem;
}

.vde-td-sku {
    font-weight: 500;
    color: #0f172a;
}

.vde-num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.vde-num-sys {
    color: #0369a1;
    background: rgba(224, 242, 254, 0.3);
}

.vde-num-phys {
    color: #047857;
    background: rgba(209, 250, 229, 0.3);
}

.vde-diff-zero {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    font-weight: 700;
    font-size: 0.82rem;
    color: #047857;
}

.vde-diff-badge {
    display: inline-block;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.45rem;
    font-variant-numeric: tabular-nums;
}

.vde-diff-badge--pos {
    color: #fff;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
}

.vde-diff-badge--neg {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.28);
}

.vde-note {
    max-width: 14rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #475569;
}

.vde-note-txt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vde-note-rev {
    color: #6d28d9;
}

.vde-empty {
    background: linear-gradient(180deg, #fafafa 0%, #f1f5f9 100%);
}

.vde-empty-ico {
    font-size: 2.75rem;
    color: #86efac;
}

/* —— Godown video upload hints —— */
.vid-upload-hint {
    position: relative;
    border-radius: 0.75rem !important;
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 55%, #f0fdf4 100%);
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

.vid-upload-hint__accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0ea5e9, #6366f1, #22c55e);
    border-radius: 0.75rem 0 0 0.75rem;
}

.vid-upload-hint__icon {
    width: 2.35rem;
    height: 2.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    font-size: 1.15rem;
}

.vid-upload-hint__list li {
    margin-bottom: 0.4rem;
}

.vid-upload-hint__list li:last-child {
    margin-bottom: 0;
}

.vid-upload-busy {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: inherit;
}

.vid-upload-busy__panel {
    max-width: 20rem;
}

.vid-upload-done-modal .modal-body {
    background: #000;
}

.vid-upload-form-wrap {
    min-height: 14rem;
}

/* —— Follow-up desk & commercial report —— */
.fu-page {
    --fu-amber: #f59e0b;
    --fu-amber-deep: #d97706;
    --fu-sky: #0ea5e9;
    --fu-indigo: #6366f1;
    --fu-rose: #e11d48;
    --fu-emerald: #059669;
}

.fu-hero {
    border-radius: 1rem !important;
    background: linear-gradient(128deg, #fffbeb 0%, #ffffff 42%, #f0f9ff 100%);
    border: 1px solid rgba(245, 158, 11, 0.22) !important;
}

.fu-hero-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--fu-amber), var(--fu-sky), var(--fu-indigo));
}

.fu-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
}

.fu-hero-title {
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--erp-slate-900);
}

.fu-hero-sub {
    font-size: 0.88rem;
    color: #64748b;
    max-width: 36rem;
}

.fu-hero-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.65rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.fu-hero-pill--date {
    color: #0c4a6e;
    background: linear-gradient(145deg, #e0f2fe, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.35);
}

.fu-kpi {
    border-radius: 0.85rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    padding: 0.85rem 1rem;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fu-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.fu-kpi__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.fu-kpi__icon--today {
    color: #b45309;
    background: linear-gradient(145deg, #fef3c7, #fffbeb);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.fu-kpi__icon--up {
    color: #0369a1;
    background: linear-gradient(145deg, #e0f2fe, #f0f9ff);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.fu-kpi__icon--late {
    color: #be123c;
    background: linear-gradient(145deg, #ffe4e6, #fff1f2);
    border: 1px solid rgba(225, 29, 72, 0.28);
}

.fu-kpi__num {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.fu-kpi__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.fu-today-card {
    border-radius: 1rem !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
    overflow: hidden;
}

.fu-today-card .fu-card-head {
    background: linear-gradient(110deg, #fef3c7 0%, #fff7ed 38%, #fffbeb 100%);
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
    padding: 1rem 1.15rem;
}

.fu-today-card .fu-card-head__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #92400e;
    letter-spacing: -0.02em;
}

.fu-today-card .fu-card-head__sub {
    font-size: 0.78rem;
    color: #b45309;
    opacity: 0.9;
}

.fu-count-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

.fu-count-badge--zero {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: none;
}

.fu-side-card {
    border-radius: 1rem !important;
    overflow: hidden;
}

.fu-side-card--up .fu-card-head {
    background: linear-gradient(110deg, #e0f2fe 0%, #f0f9ff 100%);
    border-bottom: 1px solid rgba(14, 165, 233, 0.2);
    color: #0c4a6e;
}

.fu-side-card--late .fu-card-head {
    background: linear-gradient(110deg, #ffe4e6 0%, #fff1f2 100%);
    border-bottom: 1px solid rgba(225, 29, 72, 0.2);
    color: #9f1239;
}

.fu-card-head {
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.85rem 1.1rem;
}

.fu-empty {
    text-align: center;
    padding: 1.75rem 1rem;
    color: #64748b;
}

.fu-empty i {
    font-size: 1.75rem;
    opacity: 0.45;
    display: block;
    margin-bottom: 0.5rem;
}

.fu-table tbody tr:hover {
    background: rgba(245, 158, 11, 0.04);
}

.fu-today-card .fu-table tbody tr {
    border-left: 3px solid transparent;
}

.fu-today-card .fu-table tbody tr:hover {
    border-left-color: var(--fu-amber);
    background: rgba(255, 251, 235, 0.65);
}

.fu-tabs .nav-link {
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    color: #475569;
    border: 1px solid transparent;
}

.fu-tabs .nav-link:hover {
    background: rgba(245, 158, 11, 0.08);
    color: #92400e;
}

.fu-tabs .nav-link.active {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
}

.fu-tabs .nav-link--late.active {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.28);
}

.fu-tabs .nav-link--up.active {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.28);
}

.fu-report-table-wrap {
    border-radius: 0 0 1rem 1rem;
}

/* Godown physical — proof column (file picker must stay visible) */
.godown-physical-module .gpv-table {
    table-layout: auto;
}

.godown-physical-module .gpv-table .gpv-th-proof,
.godown-physical-module .gpv-table .gpv-proof-cell {
    min-width: 11.5rem;
    width: 11.5rem;
}

.godown-physical-module .gpv-table .gpv-th-action,
.godown-physical-module .gpv-table .gpv-act-cell {
    min-width: 5.5rem;
    white-space: nowrap;
}

.godown-physical-module .gpv-proof-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.15rem 0;
}

.godown-physical-module .gpv-proof-stack--need {
    padding: 0.35rem;
    border-radius: 0.5rem;
    background: rgba(220, 53, 69, 0.06);
    outline: 1px dashed rgba(220, 53, 69, 0.35);
}

.godown-physical-module .gpv-proof-choose {
    cursor: pointer;
    font-size: 0.75rem;
    white-space: nowrap;
}

.godown-physical-module .gpv-proof-name {
    display: block;
    font-size: 0.7rem;
    line-height: 1.25;
    word-break: break-word;
    max-width: 100%;
}

.godown-physical-module .gpv-proof-stack .gpv-play {
    align-self: center;
    margin-bottom: 0.15rem;
}

/* Items add — search existing SKUs */
.item-search-wrap {
    position: relative;
}
.item-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary);
    pointer-events: none;
    z-index: 2;
}
.item-search-input {
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
}
.item-search-spinner {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
.item-search-dd {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    max-height: 280px;
    overflow-y: auto;
    z-index: 40;
    border-radius: 0.75rem;
}

.erp-tally-mode-badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
    letter-spacing: 0.02em;
}

.bargain-combo-wrap .bargain-combo-dd {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    border-radius: 0.5rem;
}

.bargain-combo-wrap .dl-item-q {
    min-width: 12rem;
}

