@import 'variables.css';

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ==========================================================================
   Top Sprint ER-00 Governance Banner (Exact Reference Layout)
   ========================================================================== */
#sprint-top-banner {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
}

.sprint-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.sprint-brand-col {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 260px;
}

.sprint-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #1877f2, #0284c7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 2px 4px rgba(24, 119, 242, 0.25);
}

.sprint-brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0b192c;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.sprint-brand-title span {
    color: #1877f2;
}

.sprint-brand-tagline {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 1px;
}

.sprint-center-pill {
    background-color: var(--banner-navy);
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.4rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(11, 25, 44, 0.2);
    max-width: 650px;
}

.sprint-pill-title {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sprint-pill-meta {
    font-size: 0.72rem;
    color: #93c5fd;
    font-weight: 500;
    margin-top: 1px;
}

.sprint-pill-meta span {
    color: #ffffff;
}

.sprint-right-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge-ed-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #ecfdf5;
    color: #059669;
    border: 1.5px solid #10b981;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-completion-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    color: #166534;
}

.badge-completion-box .calendar-icon {
    font-size: 1.1rem;
    color: #1877f2;
}

.completion-label {
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.1;
}

.completion-val {
    font-weight: 800;
    color: #0f172a;
    font-size: 0.82rem;
}

.sprint-objective-strip {
    background-color: var(--banner-yellow-bg);
    border-top: 1px solid var(--banner-yellow-border);
    border-bottom: 1px solid var(--banner-yellow-border);
    color: var(--banner-yellow-text);
    padding: 0.35rem 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   App Layout (Sidebar + Main Canvas)
   ========================================================================== */
#app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Deep Navy (Solid Width 250px - Never Squeezed) */
#sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    flex: 0 0 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 120;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), flex 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.25s ease;
    box-sizing: border-box;
    overflow-x: hidden;
}

.sidebar-header {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background-color: var(--sidebar-header-bg);
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.sidebar-brand .brand-icon {
    color: #38bdf8;
    font-size: 1.2rem;
}

.btn-sidebar-toggle {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-sidebar-toggle:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.btn-sidebar-toggle.all-expanded,
.btn-sidebar-toggle.is-collapsed {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.15);
}

.btn-topbar-toggle {
    display: inline-flex; /* Always visible on desktop and mobile to expand or collapse sidebar */
    background: #f8fafc;
    border: 1px solid var(--border-light);
    color: #475569;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    margin-right: 0.6rem;
    transition: all 0.15s ease;
}

.btn-topbar-toggle:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.btn-topbar-toggle.all-expanded,
.btn-topbar-toggle.is-collapsed {
    color: #0284c7;
    background-color: #e0f2fe;
    border-color: #38bdf8;
}

/* Sidebar Backdrop for Mobile Drawer */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 119;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* Collapsed Sidebar Styles (Fully Invisible in case of collapse) */
#sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0px !important;
    overflow: hidden !important;
    border-right: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed * {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#sidebar.collapsed ~ #main-wrapper .btn-topbar-toggle,
body.sidebar-is-collapsed .btn-topbar-toggle {
    display: inline-flex !important;
}

/* Also allow topbar toggle on desktop whenever requested */
.btn-topbar-toggle.always-visible {
    display: inline-flex !important;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.6rem 0.5rem;
}

.nav-single-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    margin-bottom: 0.35rem;
    transition: all 0.15s ease;
}

.nav-single-link.active {
    background-color: var(--sidebar-active-bg);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(24, 119, 242, 0.4);
}

.nav-group {
    margin-bottom: 0.25rem;
}

.nav-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s, color 0.15s;
    text-align: left;
}

.nav-group-header:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

.nav-group-header .group-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-group-header .chevron {
    transition: transform 0.2s;
    font-size: 0.65rem;
    color: #94a3b8;
}

.nav-group.expanded .chevron {
    transform: rotate(90deg);
}

.nav-group-items {
    display: none;
    list-style: none;
    padding-left: 0.75rem;
    margin-top: 0.15rem;
    margin-bottom: 0.25rem;
}

.nav-group.expanded .nav-group-items {
    display: block;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.nav-item a:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

.nav-item.active a {
    background-color: #1877f2;
    color: #ffffff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px rgba(24, 119, 242, 0.35);
}

.sidebar-footer {
    padding: 0.6rem 0.85rem;
    border-top: 1px solid var(--sidebar-border);
    background-color: var(--sidebar-header-bg);
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-collapse-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    text-align: left;
}

.sidebar-collapse-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-collapse-btn .collapse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.sidebar-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: #64748b;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 0.35rem;
    margin-top: 0.15rem;
}

.sidebar-footer-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-xs);
    transition: color 0.15s;
}

.sidebar-footer-btn:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* ==========================================================================
   Main Content Canvas & Top Action Bar
   ========================================================================== */
#main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-app);
}

/* Top Action Header */
#topbar {
    height: var(--topbar-height);
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 320px;
}

.topbar-search-box {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 0.35rem 0.85rem;
    width: 100%;
    gap: 0.5rem;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s;
}

.topbar-search-box:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
}

.topbar-search-box .search-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.topbar-search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    width: 100%;
    outline: none;
}

.topbar-actions-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.btn-qa-primary {
    background: #1877f2;
    color: #ffffff;
    border: none;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 4px rgba(24, 119, 242, 0.25);
    transition: background-color 0.15s;
}

.btn-qa-primary:hover {
    background: #0d65d9;
}

.btn-pill-action {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 0.38rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s;
    text-decoration: none;
}

.btn-pill-action:hover {
    background-color: var(--bg-subtle);
    border-color: #cbd5e1;
}

.btn-pill-action .icon-green {
    color: #10b981;
}

.btn-pill-action .icon-blue {
    color: #1877f2;
}

.btn-pill-action .icon-orange {
    color: #f59e0b;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.notif-wrapper {
    position: relative;
    cursor: pointer;
}

.notif-bell-btn {
    background: #ffffff;
    border: 1px solid var(--border-light);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
}

.notif-badge-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-text-info {
    line-height: 1.15;
}

.user-name-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-heading);
}

.user-role-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Content Area & Dashboard Grid
   ========================================================================== */
#content-area {
    padding: 1.25rem;
    flex: 1;
}

/* KPI Summary Cards Grid (6 in a row on Desktop) */
.kpi-grid-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.kpi-card-interactive {
    cursor: pointer;
}

.kpi-card-interactive:hover {
    border-color: #3b82f6 !important;
}

.kpi-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.kpi-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.kpi-icon-badge.blue {
    background-color: #e0f2fe;
    color: #0284c7;
}

.kpi-icon-badge.purple {
    background-color: #ede9fe;
    color: #7c3aed;
}

.kpi-icon-badge.cyan {
    background-color: #e0f7fa;
    color: #00838f;
}

.kpi-icon-badge.red {
    background-color: #fee2e2;
    color: #ef4444;
}

.kpi-icon-badge.green {
    background-color: #dcfce7;
    color: #10b981;
}

.kpi-icon-badge.coral {
    background-color: #ffe4e6;
    color: #e11d48;
}

.kpi-title {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.15;
}

.kpi-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.kpi-value.danger {
    color: #ef4444;
}

.kpi-meta-row {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.kpi-badge-active {
    background-color: #ecfdf5;
    color: #15803d;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 700;
}

.kpi-meta-text-success {
    color: #16a34a;
}

.kpi-meta-text-danger {
    color: #ef4444;
}

.kpi-meta-text-muted {
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Card System
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border-light);
    background-color: #ffffff;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.callout-badge-blue {
    background-color: #0284c7;
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

.callout-badge-orange {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.3);
}

.card-highlight-dashed {
    border: 2px dashed #f87171 !important;
}

.nav-item.highlight-focus a {
    border: 1.5px dashed #f97316 !important;
    border-radius: var(--radius-sm);
    color: #fdba74 !important;
}

#bottom-target-result-banner {
    background-color: #fef3c7;
    border-top: 1.5px solid #fde047;
    color: #78350f;
    padding: 0.5rem 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.card-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.input-control-sm {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
    color: var(--text-primary);
    outline: none;
}

.input-control-sm:focus {
    border-color: var(--brand-primary);
}

.btn-view-action {
    background-color: #1877f2;
    color: #ffffff;
    border: none;
    padding: 0.32rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-view-action:hover {
    background-color: #0d65d9;
}

.card-body {
    padding: 1.15rem;
}

.card-footer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.15rem;
    border-top: 1px solid var(--border-light);
    background-color: #ffffff;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.toolbar-buttons-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Row 2: Debit Balance (70%) & Aging Summary (30%)
   ========================================================================== */
.grid-row-debit-aging {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Financial Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.financial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
    white-space: nowrap;
}

.financial-table th {
    background-color: #f8fafc;
    color: #475569;
    padding: 0.55rem 0.65rem;
    font-weight: 700;
    border-bottom: 1.5px solid var(--border-light);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.financial-table td {
    padding: 0.52rem 0.65rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.financial-table tr:hover td {
    background-color: #f8fafc;
}

.financial-table .text-right {
    text-align: right;
}

.financial-table .text-center {
    text-align: center;
}

.financial-table .bold {
    font-weight: 700;
}

.diff-positive-red {
    color: #ef4444;
    font-weight: 700;
}

.diff-zero {
    color: #64748b;
}

/* Aging Summary Bar Chart */
.aging-chart-container {
    padding: 1.25rem 0.5rem 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 230px;
}

.aging-bars-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 180px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.aging-bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 16%;
}

.aging-bar-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-heading);
}

.aging-bar-pillar {
    width: 100%;
    border-radius: var(--radius-xs) var(--radius-xs) 0 0;
    transition: height 0.4s ease-out;
    min-height: 10px;
}

.aging-bar-pillar.b1 {
    background-color: #10b981;
}

.aging-bar-pillar.b2 {
    background-color: #3b82f6;
}

.aging-bar-pillar.b3 {
    background-color: #f59e0b;
}

.aging-bar-pillar.b4 {
    background-color: #f87171;
}

.aging-bar-pillar.b5 {
    background-color: #8b5cf6;
}

.aging-label-row {
    display: flex;
    justify-content: space-around;
    padding-top: 0.4rem;
}

.aging-bucket-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    width: 16%;
}

/* ==========================================================================
   Row 3: Call Management (55%) & Payment Tracking (45%)
   ========================================================================== */
.grid-row-calls-payments {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Call Tabs Bar */
.call-status-tabs {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.call-tab-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    background-color: #f8fafc;
}

.call-tab-pill.tab-today {
    border-color: #10b981;
    color: #15803d;
}

.call-tab-pill.tab-today .tab-count {
    background-color: #10b981;
    color: #ffffff;
}

.call-tab-pill.tab-pending {
    border-color: #f59e0b;
    color: #b45309;
}

.call-tab-pill.tab-pending .tab-count {
    background-color: #f59e0b;
    color: #ffffff;
}

.call-tab-pill.tab-overdue {
    border-color: #ef4444;
    color: #b91c1c;
}

.call-tab-pill.tab-overdue .tab-count {
    background-color: #ef4444;
    color: #ffffff;
}

.call-tab-pill.tab-upcoming {
    border-color: #0284c7;
    color: #0369a1;
}

.call-tab-pill.tab-upcoming .tab-count {
    background-color: #0284c7;
    color: #ffffff;
}

.call-tab-pill.tab-completed {
    border-color: #8b5cf6;
    color: #6d28d9;
}

.call-tab-pill.tab-completed .tab-count {
    background-color: #8b5cf6;
    color: #ffffff;
}

.tab-count {
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 800;
}

/* Call Table Status Badges */
.badge-status {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-status.reg {
    background-color: #bbf7d0;
    color: #166534;
}

.badge-status.pend {
    background-color: #fef08a;
    color: #854d0e;
}

.badge-status.risky {
    background-color: #fecdd3;
    color: #9f1239;
}

.badge-status.court {
    background-color: #ddd6fe;
    color: #5b21b6;
}

.badge-verify-ver {
    background-color: #10b981;
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 700;
}

.badge-verify-pend {
    background-color: #f59e0b;
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 700;
}

.badge-verify-rej {
    background-color: #ef4444;
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 700;
}

/* Payment Tracking Metric Badges Header */
.payment-metric-pills-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.pay-metric-pill {
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pay-metric-pill.green {
    background-color: #dcfce7;
    color: #15803d;
}

.pay-metric-pill.orange {
    background-color: #ffedd5;
    color: #c2410c;
}

.pay-metric-pill.cyan {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Action Buttons inside Card Footers */
.btn-action-green {
    background-color: #10b981;
    color: #ffffff;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-action-blue {
    background-color: #1877f2;
    color: #ffffff;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-action-teal {
    background-color: #0d9488;
    color: #ffffff;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-action-cyan {
    background-color: #0284c7;
    color: #ffffff;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-action-outline {
    background-color: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-action-outline:hover {
    background-color: #f8fafc;
    color: var(--text-primary);
}

/* ==========================================================================
   Row 4: Excel Upload (35%), Smart Followup (40%), Expected Output (25%)
   ========================================================================== */
.grid-row-bottom-trio {
    display: grid;
    grid-template-columns: 1.25fr 1.4fr 0.9fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Excel Upload Grid inside Card */
.upload-card-layout {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr 1fr;
    gap: 0.85rem;
    align-items: center;
}

.upload-form-col {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.upload-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.upload-field-row label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 55px;
}

.upload-select-sm {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.45rem;
    font-size: 0.74rem;
    color: var(--text-primary);
    outline: none;
}

/* Drag and Drop Zone */
.excel-drop-zone {
    border: 2px dashed #93c5fd;
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.excel-drop-zone:hover {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

.excel-icon-graphic {
    width: 36px;
    height: 36px;
    background-color: #16a34a;
    color: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.drop-zone-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-heading);
}

.drop-zone-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.drop-zone-footnote {
    font-size: 0.62rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

/* Upload Checkpoints list */
.upload-checkpoints-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-checkpoint-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.check-green-icon {
    color: #10b981;
    font-size: 0.85rem;
}

/* Smart Followup Pipeline */
.smart-pipeline-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.pipeline-step-card {
    flex: 1;
    min-width: 90px;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.4rem;
    text-align: center;
    border: 1.5px solid var(--border-light);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pipeline-step-card.s1 {
    border-color: #86efac;
}

.pipeline-step-card.s2 {
    border-color: #7dd3fc;
}

.pipeline-step-card.s3 {
    border-color: #fde047;
}

.pipeline-step-card.s4 {
    border-color: #d8b4fe;
}

.pipeline-step-card.s5 {
    border-color: #86efac;
}

.pipeline-icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.pipeline-icon-circle.c1 {
    background-color: #dcfce7;
    color: #16a34a;
}

.pipeline-icon-circle.c2 {
    background-color: #e0f2fe;
    color: #0284c7;
}

.pipeline-icon-circle.c3 {
    background-color: #fef3c7;
    color: #d97706;
}

.pipeline-icon-circle.c4 {
    background-color: #ede9fe;
    color: #7c3aed;
}

.pipeline-icon-circle.c5 {
    background-color: #dcfce7;
    color: #16a34a;
}

.pipeline-step-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.15;
}

.pipeline-step-desc {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.1;
}

.pipeline-arrow-divider {
    color: #3b82f6;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Expected Sprint Output Card Checklist */
.sprint-output-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sprint-output-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-primary);
}

.check-circle-green {
    width: 16px;
    height: 16px;
    background-color: #10b981;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-container {
    background-color: #ffffff !important;
    position: relative;
    z-index: 100000;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background-color: #ffffff;
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background-color: #f8fafc;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s;
}

.form-control:focus {
    border-color: var(--brand-primary);
}

/* ==========================================================================
   Responsive Smart Reflow (Mobile / Tablet / Laptop / Desktop)
   ========================================================================== */
@media (max-width: 1400px) {
    .kpi-grid-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-row-bottom-trio {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .grid-row-debit-aging {
        grid-template-columns: 1fr;
    }
    .grid-row-calls-payments {
        grid-template-columns: 1fr;
    }
    .kpi-grid-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    #sprint-top-banner .sprint-header-top {
        flex-direction: column;
        align-items: stretch;
    }
    #sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 260px !important;
        height: 100vh;
        z-index: 1000;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
        transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    #sidebar.mobile-open {
        left: 0;
    }
    .btn-topbar-toggle {
        display: inline-flex !important;
    }
    .topbar-actions-row {
        overflow-x: auto;
    }
}

@media (max-width: 600px) {
    .kpi-grid-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .upload-card-layout {
        grid-template-columns: 1fr;
    }
    .smart-pipeline-wrapper {
        flex-wrap: wrap;
    }
    .pipeline-arrow-divider {
        display: none;
    }
}

/* ==========================================================================
   Subpage Utilities & Shared Components
   ========================================================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: #ffffff;
    border: none;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(24, 119, 242, 0.25);
    transition: background-color 0.15s;
}

.btn-primary:hover {
    background-color: var(--brand-hover);
}

.btn-outline {
    background-color: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 0.42rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-outline:hover {
    background-color: #f8fafc;
    color: var(--text-primary);
    border-color: #cbd5e1;
}

.btn-icon-xs {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-icon-xs:hover {
    background-color: #f8fafc;
    color: var(--text-primary);
    border-color: var(--brand-primary);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.data-table th {
    background-color: #f8fafc;
    color: #475569;
    padding: 0.6rem 0.75rem;
    font-weight: 700;
    border-bottom: 1.5px solid var(--border-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.data-table tr:hover td {
    background-color: #f8fafc;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-ref {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-source {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Sprint ER-03 Visual Baseline Styles (Exact Reference Match)
   ========================================================================== */

.er03-console-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 2rem;
}

/* Section Header Badges */
.section-badge-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.section-badge-circle.blue { background-color: #1877f2; }
.section-badge-circle.orange { background-color: #f97316; }
.section-badge-circle.purple { background-color: #8b5cf6; }
.section-badge-circle.green { background-color: #10b981; }
.section-badge-circle.pink { background-color: #ec4899; }
.section-badge-circle.coral { background-color: #f97316; }

.section-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    background-color: #ffffff;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.section-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-control-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #475569;
    font-weight: 500;
}

.header-control-input,
.header-control-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.78rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-color: #ffffff;
    color: #1e293b;
    outline: none;
}
.header-control-input:focus,
.header-control-select:focus {
    border-color: #1877f2;
}

/* Button variants */
.btn-search-green {
    background-color: #10b981;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.15s ease;
}
.btn-search-green:hover { background-color: #059669; }

.btn-reset-light {
    background-color: #ffffff;
    color: #475569;
    font-weight: 500;
    font-size: 0.78rem;
    padding: 0.28rem 0.7rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-reset-light:hover { background-color: #f8fafc; border-color: #94a3b8; }

.btn-export-green {
    background-color: #10b981;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background-color 0.15s ease;
}
.btn-export-green:hover { background-color: #059669; }

.btn-export-red {
    background-color: #ef4444;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background-color 0.15s ease;
}
.btn-export-red:hover { background-color: #dc2626; }

.btn-pill-action-blue {
    background-color: #1877f2;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.28rem 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.btn-pill-action-blue:hover { background-color: #0d65d9; }

/* Filter Toolbar Row */
.filter-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-fields-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-field-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.filter-field-select,
.filter-field-input {
    padding: 0.25rem 0.5rem;
    font-size: 0.76rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-color: #ffffff;
    color: #1e293b;
    outline: none;
}
.filter-field-select:focus,
.filter-field-input:focus {
    border-color: #1877f2;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-box input {
    padding: 0.28rem 1.8rem 0.28rem 0.55rem;
    font-size: 0.76rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 210px;
    outline: none;
    background-color: #ffffff;
}
.search-input-box input:focus { border-color: #1877f2; }

.search-input-box .search-btn-icon {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.8rem;
}

.filter-actions-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Horizontal Scroll Financial Table & Dual Header/Footer Scrollbars */
.grid-header-scrollbar-wrap {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    box-sizing: border-box;
    overflow: hidden;
    margin-top: 0.5rem;
    cursor: grab;
    touch-action: pan-x pan-y;
}

.grid-header-scrollbar-wrap.is-horizontal-dragging,
.grid-header-scrollbar-wrap.is-horizontal-dragging * {
    cursor: grabbing !important;
    user-select: none !important;
}

.grid-header-scrollbar {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    box-sizing: border-box;
    scrollbar-width: auto;
    scrollbar-color: #94a3b8 #f1f5f9;
}

.grid-header-scrollbar-dummy {
    height: 1px;
    pointer-events: none;
}

.table-scroll-container {
    width: 100%;
    overflow-x: auto;
    background-color: #ffffff;
    scrollbar-width: auto;
    scrollbar-color: #94a3b8 #f1f5f9;
    cursor: grab;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.table-scroll-container.is-horizontal-dragging,
.table-scroll-container.is-horizontal-dragging * {
    cursor: grabbing !important;
    user-select: none !important;
}

body.grid-is-dragging {
    cursor: grabbing !important;
    user-select: none !important;
}

.financial-grid-table td {
    cursor: grab;
}

.financial-grid-table td input,
.financial-grid-table td select,
.financial-grid-table td button,
.financial-grid-table td a,
.financial-grid-table th input,
.financial-grid-table th select,
.financial-grid-table th button,
.financial-grid-table th .btn-clear-col-filters,
.financial-grid-table .col-resizer {
    cursor: auto;
}

.financial-grid-table td button,
.financial-grid-table td a,
.financial-grid-table th button,
.financial-grid-table .btn-row-expand,
.financial-grid-table .btn-clear-col-filters {
    cursor: pointer !important;
}

.financial-grid-table .col-resizer {
    cursor: col-resize !important;
}

/* Custom styled horizontal scrollbar for both Grid Header and Grid Footer */
.grid-header-scrollbar::-webkit-scrollbar,
.table-scroll-container::-webkit-scrollbar {
    height: 14px;
}

.grid-header-scrollbar::-webkit-scrollbar-track,
.table-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.grid-header-scrollbar::-webkit-scrollbar-thumb,
.table-scroll-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
    border: 2px solid #f1f5f9;
}

.grid-header-scrollbar::-webkit-scrollbar-thumb:hover,
.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.grid-header-scrollbar::-webkit-scrollbar-button,
.table-scroll-container::-webkit-scrollbar-button {
    width: 16px;
    height: 14px;
    background: #e2e8f0;
}

.financial-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
    white-space: nowrap;
}

.financial-grid-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 0.71rem;
    letter-spacing: 0.02em;
}

.financial-grid-table td {
    padding: 0.45rem 0.65rem;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 0.76rem;
    vertical-align: middle;
}

.financial-grid-table tr:hover td {
    background-color: #f8fafc;
}

.financial-grid-table td.num-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.financial-grid-table th.num-cell {
    text-align: right;
}

.financial-grid-table .diff-red {
    color: #ef4444;
    font-weight: 700;
}
.financial-grid-table .diff-bold {
    font-weight: 700;
    color: #1e293b;
}

/* First Column Action Sticky & Dropdown */
.financial-grid-table th.col-action-first,
.financial-grid-table td.col-action-first {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #ffffff;
    box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.08);
}
.financial-grid-table tr.action-menu-active-row,
.financial-grid-table tr:has(.action-dropdown-wrapper.open) {
    position: relative !important;
    z-index: 1000 !important;
}
.financial-grid-table td.col-action-first.action-menu-active-cell,
.financial-grid-table td.col-action-first:has(.action-dropdown-wrapper.open) {
    position: sticky !important;
    left: 0 !important;
    z-index: 1001 !important;
    background-color: #ffffff !important;
}
.financial-grid-table thead th.col-action-first {
    z-index: 25;
    background-color: #f8fafc;
}
.financial-grid-table thead tr.grid-filter-header-row th.col-action-first {
    z-index: 25;
    background-color: #f1f5f9;
}
.financial-grid-table tr:hover td.col-action-first {
    background-color: #f1f5f9;
}

/* Dynamic Column Header Filter Row */
.financial-grid-table thead tr.grid-filter-header-row th {
    background-color: #f1f5f9;
    padding: 3px 4px;
    border: 1px solid #cbd5e1;
    vertical-align: middle;
}
.col-filter-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.69rem;
    padding: 2px 5px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background-color: #ffffff;
    color: #1e293b;
    outline: none;
    font-family: inherit;
    transition: all 0.15s ease;
}
.col-filter-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.col-filter-input-wrap .col-filter-input {
    padding-right: 18px !important;
}
.btn-clear-col-x {
    display: none;
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: none;
    background: #cbd5e1;
    color: #475569;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.btn-clear-col-x:hover {
    background: #94a3b8;
    color: #0f172a;
}
.col-filter-input:focus {
    border-color: #1877f2;
    background-color: #f0f7ff;
    box-shadow: 0 0 0 1px rgba(24, 119, 242, 0.25);
}
.col-filter-input.num-filter {
    text-align: right;
}
.col-filter-select {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.69rem;
    padding: 2px 2px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background-color: #ffffff;
    color: #1e293b;
    outline: none;
    font-family: inherit;
    transition: all 0.15s ease;
}
.col-filter-select:focus {
    border-color: #1877f2;
    box-shadow: 0 0 0 1px rgba(24, 119, 242, 0.25);
}
.btn-clear-col-filters {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: all 0.15s ease;
}
.btn-clear-col-filters:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}
.badge-filter-active {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
    border: 1px solid #bae6fd;
}

/* Badges */
.badge-status {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.68rem;
    text-align: center;
    letter-spacing: 0.02em;
}
.badge-status.regular { background-color: #dcfce7; color: #15803d; }
.badge-status.pending { background-color: #fef3c7; color: #b45309; }
.badge-status.risky { background-color: #ffe4e6; color: #be123c; }
.badge-status.court { background-color: #ede9fe; color: #6d28d9; }
.badge-status.valid { background-color: #dcfce7; color: #15803d; }
.badge-status.error { background-color: #fee2e2; color: #b91c1c; }
.badge-status.duplicate { background-color: #fef3c7; color: #b45309; }
.badge-status.high\ risk, .badge-status.high_risk { background-color: #fee2e2; color: #991b1b; }

.zone-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.68rem;
    text-align: center;
    letter-spacing: 0.02em;
}
.zone-badge.zone-red { background-color: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.zone-badge.zone-yellow { background-color: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.zone-badge.zone-green { background-color: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.zone-badge.zone-blue { background-color: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }

.exec-pill {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    background-color: #f1f5f9;
    color: #334155;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.7rem;
    border: 1px solid #e2e8f0;
}

.emp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.12rem 0.45rem;
    background-color: #f5f3ff;
    color: #6d28d9;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.72rem;
    border: 1px solid #ddd6fe;
}

.badge-type {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.68rem;
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-action-view {
    background-color: #1877f2;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.btn-action-view:hover { background-color: #0d65d9; }

/* Grid Table Footer / Pagination */
.grid-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-size: 0.76rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-btn {
    min-width: 24px;
    height: 24px;
    padding: 0 0.35rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #475569;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.page-btn:hover { background-color: #f1f5f9; border-color: #94a3b8; }
.page-btn.active {
    background-color: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
    font-weight: 700;
}
.page-btn.disabled {
    color: #cbd5e1;
    pointer-events: none;
    border-color: #e2e8f0;
}

.per-page-select {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background-color: #ffffff;
    color: #475569;
}

/* Two-column layout for Section 2 & 3 */
.grid-row-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 1200px) {
    .grid-row-two-col {
        grid-template-columns: 1fr;
    }
}

/* Pill counters in Section 2 */
.pill-counter {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.pill-counter.blue { background-color: #1877f2; color: #ffffff; }
.pill-counter.gray { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.pill-counter.red { background-color: #fee2e2; color: #b91c1c; }

/* Three-column layout for Section 4, 5, 6 */
.grid-row-three-col {
    display: grid;
    grid-template-columns: 1fr 1.15fr 0.85fr;
    gap: 1.25rem;
}
@media (max-width: 1300px) {
    .grid-row-three-col {
        grid-template-columns: 1fr;
    }
}

/* Section 4: Excel Upload */
.upload-compact-layout {
    display: grid;
    grid-template-columns: 180px 1fr 140px;
    gap: 0.85rem;
    padding: 0.85rem;
    align-items: center;
}
@media (max-width: 800px) {
    .upload-compact-layout {
        grid-template-columns: 1fr;
    }
}

.upload-field-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.upload-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
}
.upload-input-row select,
.upload-input-row input {
    flex: 1;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
}

.upload-dropzone-box {
    border: 2px dashed #93c5fd;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 1.1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.upload-dropzone-box:hover {
    border-color: #1877f2;
    background-color: #eff6ff;
}

.excel-icon-pill {
    width: 42px;
    height: 42px;
    background-color: #10b981;
    color: #ffffff;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.upload-dropzone-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
}
.upload-dropzone-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 1px;
}
.upload-dropzone-footnote {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 2px;
}

.upload-check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: #334155;
    font-weight: 500;
}
.upload-check-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.check-green-icon {
    color: #10b981;
    font-weight: 800;
    font-size: 0.85rem;
}

/* Section 5: Smart Followup Pipeline */
.pipeline-steps-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0.75rem;
    gap: 0.4rem;
}

.pipeline-step-item {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pipeline-step-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.pipeline-step-icon {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}
.pipeline-step-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.pipeline-step-desc {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 2px;
}

.pipeline-arrow-icon {
    color: #cbd5e1;
    font-size: 1.1rem;
    font-weight: 700;
    user-select: none;
}

/* Section 6: Expected Output Card */
.output-checklist-wrapper {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.output-checklist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    color: #334155;
    font-weight: 500;
}

/* Detail Modal */
.modal-ledger-detail {
    max-width: 720px;
}

/* ==========================================================================
   Sprint ER-04: Customer Collections & Payment Integrity Styles
   ========================================================================== */
.kpi-metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}
@media (max-width: 1200px) {
    .kpi-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .kpi-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .kpi-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kpi-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.kpi-top-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kpi-icon-bubble {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.kpi-icon-blue { background-color: #eff6ff; color: #2563eb; }
.kpi-icon-purple { background-color: #f5f3ff; color: #7c3aed; }
.kpi-icon-green { background-color: #ecfdf5; color: #059669; }
.kpi-icon-orange { background-color: #fff7ed; color: #ea580c; }
.kpi-icon-red { background-color: #fef2f2; color: #dc2626; }
.kpi-icon-cyan { background-color: #ecfeff; color: #0891b2; }

.kpi-title-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kpi-main-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0.25rem 0 0.15rem 0;
    letter-spacing: -0.02em;
}
.kpi-sub-text {
    font-size: 0.68rem;
    font-weight: 600;
}
.kpi-sub-green { color: #16a34a; }
.kpi-sub-purple { color: #64748b; }
.kpi-sub-orange { color: #ea580c; }
.kpi-sub-red { color: #dc2626; }
.kpi-sub-blue { color: #2563eb; }

/* ER-04 Grid Split Rows */
.er04-split-row {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 1080px) {
    .er04-split-row {
        grid-template-columns: 1fr;
    }
}

.er04-half-split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 960px) {
    .er04-half-split-row {
        grid-template-columns: 1fr;
    }
}

.er04-bottom-split-row {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 1100px) {
    .er04-bottom-split-row {
        grid-template-columns: 1fr;
    }
}

/* Receipt Recording Form */
.receipt-form-body {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.rf-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.rf-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.rf-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
}
.rf-label span.req {
    color: #ef4444;
}
.rf-input, .rf-select {
    padding: 0.35rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.78rem;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s ease;
}
.rf-input:focus, .rf-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.rf-radios-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}
.rf-radio-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.74rem;
    color: #334155;
    cursor: pointer;
    font-weight: 500;
}
.rf-actions-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
}
.btn-save-receipt {
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.45rem 1.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-save-receipt:hover {
    background: #059669;
}
.btn-reset-receipt {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.45rem 0.95rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-reset-receipt:hover {
    background: #e2e8f0;
}

/* Section 6 Aging Visual Bars */
.aging-bars-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 75px;
    padding: 0.5rem 0.5rem 0.25rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}
.aging-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
}
.aging-bar-val {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e293b;
}
.aging-bar-pillar {
    width: 26px;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
}
.aging-bar-tag {
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

/* Status colors */
.badge-status.verified { background: #dcfce7; color: #15803d; }
.badge-status.partial { background: #ffedd5; color: #c2410c; }
.badge-status.completed { background: #dcfce7; color: #16a34a; }
.badge-status.rejected { background: #fee2e2; color: #b91c1c; }
.overdue-val { color: #dc2626; font-weight: 700; }

/* ==========================================================================
   Sprint ER-03-FIX — Main Excel Transaction Import & Auto Master Creation
   North Star Reference Baseline (media_1791687952303.jpg)
   ========================================================================== */

.er03fix-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 2.5rem;
}

/* 4-Column Top Workflow Grid */
.er03fix-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

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

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

.er03fix-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.er03fix-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
}

.er03fix-card-body {
    padding: 0.85rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Checklist Items */
.er03fix-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.er03fix-check-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    font-weight: 500;
    color: #334155;
}

.er03fix-check-icon {
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Step Flow Sequence in Card 3 */
.er03fix-step-flow {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.er03fix-step-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
}

.er03fix-step-title {
    font-weight: 700;
    color: #0f172a;
}

.er03fix-step-tag {
    font-size: 0.65rem;
    color: #64748b;
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.er03fix-flow-arrow {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1;
}

/* Section 5: Transaction Grid Controls */
.er03fix-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.er03fix-meta-strip {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    flex-wrap: wrap;
}

.er03fix-meta-item strong {
    color: #0f172a;
}

.er03fix-actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-commit-valid {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #16a34a;
    color: #ffffff;
    border: none;
    padding: 0.38rem 0.85rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-commit-valid:hover {
    background: #15803d;
}

.btn-discard-batch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 0.38rem 0.85rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-discard-batch:hover {
    background: #fee2e2;
}

/* Bottom 3-Column Grid */
.er03fix-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .er03fix-bottom-grid {
        grid-template-columns: 1fr;
    }
}

.er03fix-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.75rem;
}

.er03fix-metric-row:last-child {
    border-bottom: none;
}

.er03fix-metric-label {
    color: #64748b;
    font-weight: 500;
}

.er03fix-metric-val {
    font-weight: 700;
    color: #0f172a;
}

/* Footer Expected Output Banner */
.er03fix-ed-banner {
    background: linear-gradient(135deg, #0b192c 0%, #1e3a8a 100%);
    color: #ffffff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.er03fix-ed-banner-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.er03fix-ed-banner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .er03fix-ed-banner-grid {
        grid-template-columns: 1fr;
    }
}

.er03fix-ed-col {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.er03fix-ed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.76rem;
    line-height: 1.35;
    color: #e2e8f0;
}

.er03fix-ed-item .ed-check {
    color: #34d399;
    font-weight: 800;
}

/* ==========================================================================
   Sprint ER-05: Ledger Contact Actions & Balance Reminder Center
   Exact Visual Alignment with North Star Reference Mockup (media_1791691488068.png)
   ========================================================================== */

/* Action Dropdown Wrapper & Button */
.action-dropdown-wrapper {
    position: relative;
    display: inline-block;
    text-align: left;
}

.btn-action-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #1877f2;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(24, 119, 242, 0.3);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-action-dropdown:hover {
    background-color: #0d65d9;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.45);
}

.btn-action-dropdown .caret {
    font-size: 0.62rem;
    transition: transform 0.15s ease;
}

.action-dropdown-wrapper.open .btn-action-dropdown .caret {
    transform: rotate(180deg);
}

/* Action Dropdown Menu Popover */
.action-dropdown-wrapper.open {
    position: relative !important;
    z-index: 1002 !important;
}

.action-menu-dropdown {
    display: none;
    position: fixed;
    width: 224px;
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--radius-md, 6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28), 0 8px 16px rgba(0, 0, 0, 0.16) !important;
    z-index: 9999999 !important;
    padding: 0.35rem 0;
}

.action-dropdown-wrapper.open .action-menu-dropdown {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: fixed !important;
    z-index: 9999999 !important;
}

.call-action-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.call-action-menu-dropdown {
    left: 0 !important;
    right: auto !important;
    width: 210px !important;
    text-align: left;
}

.financial-table tr.action-menu-active-row,
.financial-table tr:has(.action-dropdown-wrapper.open) {
    position: relative !important;
    z-index: 1000 !important;
}

.financial-table td.action-menu-active-cell,
.financial-table td:has(.action-dropdown-wrapper.open) {
    position: relative !important;
    z-index: 1001 !important;
}

.followup-list-container .table-responsive:has(.action-dropdown-wrapper.open) {
    overflow: visible !important;
}

.action-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.45rem 0.75rem;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s;
    font-family: inherit;
    color: #1e293b !important;
    text-decoration: none;
}

.action-menu-item:hover:not(.disabled) {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
}

.action-menu-item.disabled {
    opacity: 0.42;
    cursor: not-allowed;
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.action-menu-icon {
    font-size: 1.05rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    flex-shrink: 0;
}

.action-menu-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.action-menu-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
}

.action-menu-desc {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-menu-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 0.3rem 0;
}

/* Sprint ER-05 Bottom 4 Action Cards Grid (Exact Reference Baseline) */
.er05-bottom-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

@media (max-width: 1280px) {
    .er05-bottom-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .er05-bottom-cards-grid {
        grid-template-columns: 1fr;
    }
}

.er05-action-card {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.er05-action-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.er05-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
}

.er05-card-header.green {
    background-color: #10b981;
}

.er05-card-header.blue {
    background-color: #1877f2;
}

.er05-card-header.red {
    background-color: #ef4444;
}

.er05-card-header .btn-card-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
    border-radius: 3px;
}

.er05-card-header .btn-card-close:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
}

.er05-card-body {
    padding: 0.85rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.er05-avatar-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.er05-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #ffedd5;
    color: #c2410c;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.er05-avatar-info {
    min-width: 0;
}

.er05-avatar-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.er05-avatar-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 1px;
}

.er05-message-box {
    width: 100%;
    min-height: 105px;
    padding: 0.55rem;
    background-color: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #1e293b;
    resize: none;
    box-sizing: border-box;
}

.er05-input-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.er05-input-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
}

.er05-input-text {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    box-sizing: border-box;
}

.er05-char-count {
    font-size: 0.68rem;
    color: #94a3b8;
    text-align: right;
    margin-top: -0.4rem;
}

.er05-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-card-primary-green {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: #10b981;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
}

.btn-card-primary-green:hover {
    background-color: #059669;
}

.btn-card-primary-blue {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: #1877f2;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
}

.btn-card-primary-blue:hover {
    background-color: #0d65d9;
}

.btn-card-primary-red {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: #ef4444;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
}

.btn-card-primary-red:hover {
    background-color: #dc2626;
}

.btn-card-cancel {
    padding: 0.55rem 0.75rem;
    background-color: #f1f5f9;
    border: 1px solid var(--border-light);
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-card-cancel:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

/* ==========================================================================
   Sprint ER-06: Automated Reminder Delivery & Follow-up Scheduler
   Matching North Star Visual Baseline Reference (media_1791694200000.png)
   ========================================================================== */

.reminder-scheduler-page {
    padding: 1.25rem 1.5rem;
    color: #0f172a;
    background-color: var(--canvas-bg);
}

/* 1. Governance Ribbon */
.sprint-governance-banner {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.banner-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-sprint-pill {
    background-color: #0b192c;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.banner-meta {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

.banner-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill-reference-verified {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 16px;
}

.pill-target-date {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 16px;
}

.banner-bottom-row {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #854d0e;
    line-height: 1.4;
}

.objective-label {
    font-weight: 700;
    color: #b45309;
}

/* 2. KPI Metrics Header (6 Cards) */
.reminder-kpis-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 1.25rem;
}

.kpi-card-metric {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s, box-shadow 0.15s;
}

.kpi-card-metric:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
}

.kpi-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.bg-blue { background-color: #e0f2fe; color: #0284c7; }
.bg-green { background-color: #dcfce7; color: #16a34a; }
.bg-purple { background-color: #f3e8ff; color: #9333ea; }
.bg-red { background-color: #fee2e2; color: #dc2626; }
.bg-orange { background-color: #ffedd5; color: #ea580c; }
.bg-pink { background-color: #fce7f3; color: #db2777; }

.kpi-metric-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kpi-metric-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin: 2px 0;
}

.kpi-metric-subtext {
    font-size: 0.7rem;
    font-weight: 600;
}

.text-success { color: #16a34a; }
.text-purple { color: #7c3aed; }
.text-danger { color: #dc2626; }
.text-warning { color: #ea580c; }
.text-muted { color: #94a3b8; }

/* 3. Sub-Navigation Tabs & Right Filters */
.reminder-subnav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 12px;
}

.reminder-tabs-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.reminder-tab {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
}

.reminder-tab.active {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

.reminder-tab .tab-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    font-size: 0.65rem;
    margin-right: 6px;
}

.reminder-tab.active .tab-index {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.reminder-filter-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-dropdown, .filter-date-input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    background: #ffffff;
    color: #334155;
    outline: none;
}

.btn-refresh-emerald {
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-refresh-emerald:hover {
    background: #059669;
}

/* Reusable Card Box */
.card-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #f1f5f9;
}

.header-left-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-left-title h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.badge-pending-count {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.badge-sent-count {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 4. Top Grid Row (66% Queue + 33% Calendar) */
.reminder-layout-row-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 1.5rem;
}

.table-reminders-queue, .table-history-deliveries {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.table-reminders-queue th, .table-history-deliveries th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    letter-spacing: 0.2px;
}

.table-reminders-queue td, .table-history-deliveries td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.table-reminders-queue tr:hover, .table-history-deliveries tr:hover {
    background-color: #f8fafc;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-dark { color: #0f172a; }

/* Badges */
.badge-company-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.badge-channel-wa {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-channel-sms {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-channel-email {
    background: #faf5ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-status-scheduled {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.68rem;
}

.badge-status-sent {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.68rem;
}

.badge-status-failed {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.68rem;
}

.badge-delivery-delivered {
    background: #dcfce7;
    color: #166534;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.badge-delivery-opened {
    background: #f3e8ff;
    color: #6b21a8;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.badge-delivery-failed {
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.btn-send-now-pill {
    background: #1877f2;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-send-now-pill:hover {
    background: #166fe5;
}

.btn-action-more {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 4px;
}

.table-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid #f1f5f9;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-num-btn, .page-nav-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    min-width: 26px;
    height: 26px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.page-num-btn.active {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

.select-per-page {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.72rem;
    color: #475569;
    background: #ffffff;
}

/* Calendar Styles */
.calendar-container {
    display: flex;
    flex-direction: column;
}

.cal-month-title {
    padding: 0.5rem 1rem 0.25rem;
    text-align: center;
}

.cal-month-title h4 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.calendar-grid-wrapper {
    padding: 0.5rem 0.75rem;
    flex-grow: 1;
}

.table-calendar-month {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.75rem;
}

.table-calendar-month th {
    padding: 6px 2px;
    color: #64748b;
    font-weight: 600;
}

.day-cell {
    padding: 6px 2px;
    height: 38px;
    vertical-align: top;
    position: relative;
    border-radius: 6px;
}

.day-prev-month {
    color: #cbd5e1;
    padding: 6px 2px;
}

.active-highlight {
    background: #f0fdf4;
}

.active-day-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #1877f2;
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
}

.day-dots-row {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 2px;
}

.dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.dot-green { background-color: #10b981; }
.dot-blue { background-color: #3b82f6; }
.dot-red { background-color: #ef4444; }
.dot-orange { background-color: #f97316; }
.dot-purple { background-color: #a855f7; }

.calendar-legend-footer {
    display: flex;
    justify-content: space-around;
    padding: 0.65rem 0.5rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.7rem;
    color: #475569;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* 5. Middle Grid Row (Create Form 35% + Template Preview 35% + Analytics 30%) */
.reminder-layout-row-middle {
    display: grid;
    grid-template-columns: 1.15fr 1.15fr 1fr;
    gap: 16px;
    margin-bottom: 1.5rem;
}

.mode-toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.radio-label {
    cursor: pointer;
    color: #64748b;
}

.radio-label.active-radio {
    color: #1877f2;
}

.form-reminder-grid {
    padding: 1rem 1.15rem;
}

.form-row-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
}

.channel-button-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-channel-choice {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-channel-choice.active {
    border-color: #10b981;
    background: #f0fdf4;
    color: #065f46;
}

.btn-channel-choice[data-channel="SMS"].active {
    border-color: #f97316;
    background: #fff7ed;
    color: #9a3412;
}

.btn-channel-choice[data-channel="EMAIL"].active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #5b21b6;
}

.form-group-checkbox {
    margin: 0.75rem 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #334155;
}

.preview-box-group {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px;
    background: #f8fafc;
}

.preview-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.preview-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
}

.btn-insert-fields {
    background: transparent;
    border: none;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1877f2;
    cursor: pointer;
}

.textarea-preview-content {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #334155;
    background: #ffffff;
    resize: none;
    box-sizing: border-box;
}

.preview-char-counter {
    text-align: right;
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 4px;
}

.form-actions-buttons {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.btn-schedule-green {
    flex-grow: 1;
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-schedule-green:hover {
    background: #059669;
}

.btn-form-reset {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

/* Template Preview */
.template-preview-box {
    display: flex;
    flex-direction: column;
}

.btn-outline-manage-tmpl {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1877f2;
    cursor: pointer;
}

.tmpl-channel-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin: 0.5rem 1.15rem;
}

.tmpl-ch-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.tmpl-ch-tab.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

.tmpl-meta-title {
    padding: 0.25rem 1.15rem;
}

.tmpl-meta-title h4 {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.template-card-preview-container {
    padding: 0.5rem 1.15rem;
    flex-grow: 1;
}

.template-rendered-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.85rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #1e293b;
    white-space: pre-wrap;
    min-height: 110px;
}

.tmpl-available-fields-section {
    padding: 0.75rem 1.15rem;
    border-top: 1px solid #f1f5f9;
}

.fields-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}

.fields-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.field-chip {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.field-chip:hover {
    background: #dbeafe;
}

/* Analytics & Top 5 Failed */
.analytics-chart-container {
    padding: 0.75rem 1rem;
    display: flex;
    height: 140px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #94a3b8;
    padding-right: 8px;
    text-align: right;
}

.chart-bars-row {
    flex-grow: 1;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 44px;
    height: 100%;
    justify-content: flex-end;
}

.bar-val-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.bar-fill {
    width: 22px;
    border-radius: 3px 3px 0 0;
    transition: height 0.3s;
}

.bar-green { background: #10b981; }
.bar-blue { background: #3b82f6; }
.bar-purple { background: #8b5cf6; }
.bar-orange { background: #f97316; }
.bar-red { background: #ef4444; }

.bar-cat-title {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
    margin-top: 4px;
}

.bar-pct-label {
    font-size: 0.62rem;
    color: #94a3b8;
}

.failed-reasons-card {
    padding: 0.65rem 1rem;
    border-top: 1px solid #f1f5f9;
}

.failed-reasons-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.fr-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fr-title h4 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
}

.btn-fr-viewall {
    background: transparent;
    border: none;
    font-size: 0.7rem;
    color: #1877f2;
    font-weight: 600;
    cursor: pointer;
}

.failed-reasons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.failed-reasons-list li {
    display: flex;
    align-items: center;
    padding: 3px 0;
    font-size: 0.72rem;
    color: #334155;
}

.fr-num {
    width: 16px;
    color: #94a3b8;
    font-weight: 600;
}

.fr-text {
    flex-grow: 1;
}

.fr-count {
    color: #ef4444;
    font-weight: 700;
}

/* 6. Bottom Row (History 66% + ED Output 34%) */
.reminder-layout-row-bottom {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.btn-outline-history-viewall {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.btn-view-link {
    background: transparent;
    border: none;
    color: #1877f2;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.provider-ref-text {
    font-family: monospace;
    font-size: 0.7rem;
    color: #64748b;
}

.ed-checklist-content {
    padding: 0.85rem 1.15rem;
}

.ed-checklist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ed-checklist-items li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
}

.check-circle-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    font-size: 0.65rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Responsive Smart Reflow */
@media (max-width: 1200px) {
    .reminder-kpis-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .provider-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .reminder-layout-row-middle,
    .analytics-grid-row,
    .reminder-layout-row-three-col {
        grid-template-columns: 1fr;
    }
    .reminder-layout-row-top,
    .reminder-layout-row-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .reminder-kpis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .provider-cards-grid {
        grid-template-columns: 1fr;
    }
    .form-row-two-col {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SPRINT ER-08 PRODUCTION READINESS & OPERATIONAL HARDENING
   Exact North Star UI Visual Baseline (media_1791702407481.png)
   ========================================================================== */

/* 1. Row 1 Layout (Provider Status & Connectivity + Scheduler Worker Status) */
.er08-top-row-grid {
    display: grid;
    grid-template-columns: 3.1fr 1fr;
    gap: 12px;
    margin-bottom: 1.15rem;
}

.row-live-test-ratio {
    grid-template-columns: 1.45fr 1.9fr 0.9fr;
}

.row-webhooks-ratio {
    grid-template-columns: 1.75fr 1.45fr 1fr;
}

.worker-status-card-body {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.worker-status-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.worker-cog-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.worker-details-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    margin-bottom: 12px;
}

.worker-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.worker-detail-label {
    color: #64748b;
    font-weight: 500;
}

.worker-detail-val {
    color: #0f172a;
    font-weight: 700;
}

.worker-actions-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: auto;
}

.btn-worker-run {
    background-color: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-worker-run:hover { background-color: #059669; }

.btn-worker-restart {
    background-color: #1877f2;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-worker-restart:hover { background-color: #0d65d9; }

.btn-worker-logs {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
}
.btn-worker-logs:hover { background-color: #f8fafc; }

.provider-card-compact {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.provider-attrs-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.69rem;
    margin: 8px 0;
}

.provider-attr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.provider-attr-label {
    color: #64748b;
    font-weight: 500;
}

.provider-attr-val {
    color: #0f172a;
    font-weight: 700;
}

.provider-card-buttons {
    display: flex;
    gap: 5px;
    margin-top: 6px;
}

.btn-prov-action {
    flex: 1;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn-prov-test {
    background: #ffffff;
    color: #1877f2;
    border: 1px solid #93c5fd;
}
.btn-prov-test:hover { background: #eff6ff; }

.btn-prov-logs {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.btn-prov-logs:hover { background: #f8fafc; }

.btn-prov-configure {
    background: #ffffff;
    color: #1877f2;
    border: 1px solid #93c5fd;
}
.btn-prov-configure:hover { background: #eff6ff; }

.btn-prov-guide {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.btn-prov-guide:hover { background: #f8fafc; }

.badge-status-running {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.badge-status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.66rem;
    font-weight: 700;
    text-align: center;
}
.badge-status-pill.delivered { background: #dcfce7; color: #16a34a; }
.badge-status-pill.opened { background: #ccfbf1; color: #0d9488; }
.badge-status-pill.invalid-number { background: #fee2e2; color: #dc2626; }
.badge-status-pill.sent { background: #e0f2fe; color: #0284c7; }
.badge-status-pill.failed { background: #fee2e2; color: #dc2626; }
.badge-status-pill.valid { background: #dcfce7; color: #16a34a; }
.badge-status-pill.processed { background: #dcfce7; color: #16a34a; }

.live-test-ch-group {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.btn-live-ch {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.btn-live-ch.active-wa {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.btn-live-ch.active-sms {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.btn-live-ch.active-email {
    background: #8b5cf6;
    color: #ffffff;
    border-color: #8b5cf6;
}

/* 1. Provider Status Cards Row (Row 1) */
.provider-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.provider-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
}

.provider-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
}

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

.provider-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
}

.provider-icon-badge.bg-wa { background: #10b981; color: #ffffff; }
.provider-icon-badge.bg-sms { background: #3b82f6; color: #ffffff; }
.provider-icon-badge.bg-email { background: #8b5cf6; color: #ffffff; }
.provider-icon-badge.bg-voip { background: #ef4444; color: #ffffff; }

.provider-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.badge-connected {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-not-configured {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.provider-card-subtext {
    font-size: 0.68rem;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.provider-stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f8fafc;
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #f1f5f9;
}

.pstat-col {
    display: flex;
    flex-direction: column;
}

.pstat-label {
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 600;
    text-transform: capitalize;
}

.pstat-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
}

.pstat-val.text-green { color: #16a34a; }
.pstat-val.text-red { color: #dc2626; }
.pstat-val.text-amber { color: #d97706; }

/* 2. Analytics Visualizations Row (Row 3) */
.analytics-grid-row {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1.05fr;
    gap: 12px;
    margin-bottom: 1.15rem;
}

.chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.chart-card-header h3 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend-top {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    color: #475569;
    font-weight: 600;
}

.chart-card-body {
    padding: 0.85rem 1rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Donut & Legends */
.donut-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.donut-svg-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.donut-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-center-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.donut-center-sub {
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 600;
}

.donut-legend-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.68rem;
}

.donut-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #334155;
    font-weight: 500;
}

.donut-legend-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

/* 3. Three-Column Rows (Rows 4 & 5) */
.reminder-layout-row-three-col {
    display: grid;
    gap: 12px;
    margin-bottom: 1.15rem;
}

.row-middle-ratio {
    grid-template-columns: 2fr 1fr 1fr;
}

.row-bottom-ratio {
    grid-template-columns: 2.2fr 0.8fr 1fr;
}

.top5-card-body {
    padding: 0.75rem 1rem;
}

.top5-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top5-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
}

.top5-rank-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-weight: 500;
}

.top5-rank-num {
    width: 16px;
    color: #94a3b8;
    font-weight: 700;
}

.top5-count {
    color: #dc2626;
    font-weight: 800;
}

/* 4. Tab Containers & Dedicated Views */
.reminder-tab-pane {
    display: none;
}

.reminder-tab-pane.active {
    display: block;
}

/* Provider Settings Form (Tab 7) */
.provider-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.provider-setting-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* System Monitor (Tab 8) */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 1.5rem;
}

.monitor-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.monitor-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.monitor-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.monitor-card-desc {
    font-size: 0.72rem;
    color: #64748b;
}

/* Webhook Log Inspector Modal */
.modal-webhook-payload {
    max-width: 650px;
}

.payload-pre-code {
    background: #0f172a;
    color: #38bdf8;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ==========================================================================
   Global Toast Notification System & Working Animations
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.toast-message {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    border-left: 5px solid #2563eb;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}

.toast-message.toast-loading {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb, #ffffff);
}

.toast-message.toast-success {
    border-left-color: #10b981;
    background: linear-gradient(to right, #f0fdf4, #ffffff);
}

.toast-message.toast-error {
    border-left-color: #ef4444;
    background: linear-gradient(to right, #fef2f2, #ffffff);
}

.toast-message.toast-info {
    border-left-color: #3b82f6;
    background: linear-gradient(to right, #eff6ff, #ffffff);
}

.toast-icon-box {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

.toast-loading .toast-icon-box {
    background: #fef3c7;
    color: #d97706;
}

.toast-success .toast-icon-box {
    background: #d1fae5;
    color: #059669;
}

.toast-error .toast-icon-box {
    background: #fee2e2;
    color: #dc2626;
}

.toast-info .toast-icon-box {
    background: #dbeafe;
    color: #2563eb;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 2px;
}

.toast-body {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.4;
}

.toast-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.toast-close-btn:hover {
    color: #334155;
}

.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    width: 100%;
}

.toast-progress-bar-fill {
    height: 100%;
    width: 100%;
    transition: width linear;
}

.toast-loading .toast-progress-bar-fill {
    background: #f59e0b;
}

.toast-success .toast-progress-bar-fill {
    background: #10b981;
}

.toast-error .toast-progress-bar-fill {
    background: #ef4444;
}

.toast-info .toast-progress-bar-fill {
    background: #3b82f6;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(110%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Spinner Icon */
.reset-spin {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: resetSpinnerRotate 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

.reset-spin-amber {
    border: 2px solid #fde68a;
    border-top-color: #d97706;
}

@keyframes resetSpinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

/* Reset In-Progress Interactive Working Banner */
.reset-working-banner {
    display: none;
    margin-top: 1.25rem;
    background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 50%, #fefce8 100%);
    border: 1.5px solid #fb7185;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.08);
    position: relative;
    overflow: hidden;
    animation: bannerFadeIn 0.3s ease-out forwards;
}

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

.reset-shimmer-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 25%, #10b981 50%, #f59e0b 75%, #ef4444 100%);
    background-size: 200% 100%;
    animation: shimmerMove 1.5s linear infinite;
}

@keyframes shimmerMove {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.reset-working-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.reset-working-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #9f1239;
}

.reset-pulse-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.6);
    animation: pulseRing 1.4s infinite;
}

@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.reset-step-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.reset-step-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #475569;
    transition: color 0.3s ease;
}

.reset-step-item.active {
    color: #b91c1c;
    font-weight: 700;
}

.reset-step-item.done {
    color: #15803d;
    font-weight: 600;
}

.btn-pulsing-hard-delete {
    position: relative;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    animation: btnHardDeletePulse 1.8s infinite !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4) !important;
}

@keyframes btnHardDeletePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ==========================================================================
   Debit Balance (Company wise) Full Section & Smart Pagination Styles
   ========================================================================== */
.debit-balance-full-section {
    width: 100%;
    margin-bottom: 1.25rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.grid-row-aging-payment {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
    .grid-row-aging-payment {
        grid-template-columns: 1fr;
    }
}

/* Column Filters */
.debit-filter-row th,
.call-filter-row th {
    background-color: #f1f5f9 !important;
    padding: 0.35rem 0.45rem !important;
    border-bottom: 2px solid var(--border-medium) !important;
}

.debit-col-filter,
.call-col-filter {
    width: 100%;
    font-size: 0.72rem;
    padding: 0.28rem 0.45rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-color: #ffffff;
    color: var(--text-primary);
    transition: all 0.15s ease-in-out;
    box-sizing: border-box;
}

.debit-col-filter:focus,
.call-col-filter:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    background-color: #fefefe;
}

.debit-col-filter::placeholder,
.call-col-filter::placeholder {
    color: #94a3b8;
    font-size: 0.68rem;
    font-style: italic;
}

.debit-col-filter.has-value,
.call-col-filter.has-value {
    background-color: #eff6ff;
    border-color: #3b82f6;
    font-weight: 600;
}

/* Sortable Table Headers */
.th-sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
    position: relative;
}

.th-sortable:hover {
    background-color: #e2e8f0 !important;
}

.th-sort-icon {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.7rem;
    color: #94a3b8;
}

.th-sortable.sorted-asc .th-sort-icon,
.th-sortable.sorted-desc .th-sort-icon {
    color: #2563eb;
    font-weight: bold;
}

/* Quick Filter Pills in Header */
.btn-filter-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.btn-filter-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-filter-pill.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

/* Role Toggle Tabs in Header */
.btn-role-tab {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    background: transparent;
    color: #475569;
    transition: all 0.15s;
}

.btn-role-tab.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

/* Pagination Toolbar */
.pagination-footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.pagination-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f8fafc;
}

.pagination-ellipsis {
    padding: 0 0.25rem;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: bold;
}

/* Table Footer Totals */
.debit-table-footer th,
.debit-table-footer td {
    background: #f1f5f9;
    font-weight: 700;
    border-top: 2px solid var(--border-medium);
    padding: 0.55rem 0.65rem;
    font-size: 0.76rem;
    color: #0f172a;
}

/* ===============================================================
   AUTHENTICATION & LOGIN SCREEN PORTAL
   =============================================================== */
.login-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0b192c 60%, #020617 100%);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
}

.login-card-container {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 18px;
    padding: 2.25rem;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    animation: loginCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardPop {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-brand-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.login-brand-logo .logo-emoji {
    font-size: 1.25rem;
}

.login-brand-logo .logo-text {
    font-size: 1.15rem;
    color: #1e3a8a;
    letter-spacing: -0.3px;
}

.login-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
}

.login-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.login-alert {
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.login-alert.error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}
.login-alert.success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}
.login-alert.info {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0284c7;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.login-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.login-field-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrapper .input-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 0.95rem;
    pointer-events: none;
    opacity: 0.65;
}

.login-input {
    width: 100%;
    padding: 0.65rem 0.75rem 0.65rem 2.4rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-login-primary {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transition: all 0.15s ease;
    margin-top: 0.25rem;
}

.btn-login-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.btn-login-primary:active {
    transform: translateY(0);
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.1rem 0;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.login-divider span {
    padding: 0 0.75rem;
}

.login-brand-tagline {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.2px;
    margin: -0.25rem 0 0.85rem 0;
}

.login-google-primary-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 0.25rem;
}

.g-signin-button-wrapper {
    width: 100%;
}

.btn-login-google-prominent,
.btn-login-google {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.btn-login-google-prominent:hover,
.btn-login-google:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-login-google-prominent:active,
.btn-login-google:active {
    transform: translateY(0);
}

.btn-login-google-prominent .google-icon {
    flex-shrink: 0;
}

.login-google-note {
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 0.5rem;
    text-align: center;
}

.login-alt-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.btn-toggle-alt-login {
    background: transparent;
    border: none;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-toggle-alt-login:hover {
    color: #1d4ed8;
    text-decoration: underline;
    background-color: #eff6ff;
}

.btn-toggle-alt-login .caret-icon {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.login-password-form {
    width: 100%;
    margin-top: 0.75rem;
}

.login-quick-roles-box {
    display: none !important;
    margin-top: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem;
}

.quick-roles-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.6rem;
}

.quick-roles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.btn-quick-role-badge {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.btn-quick-role-badge:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-1px);
}

.btn-quick-role-badge .role-icon {
    font-size: 1.15rem;
}

.btn-quick-role-badge .role-text {
    display: flex;
    flex-direction: column;
}

.btn-quick-role-badge .role-text strong {
    font-size: 0.78rem;
    color: #0f172a;
    line-height: 1.2;
}

.btn-quick-role-badge .role-text small {
    font-size: 0.65rem;
    color: #64748b;
    line-height: 1.1;
}

.login-footer-meta {
    text-align: center;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 1.25rem;
}

/* ===============================================================
   RETRO ERP BULK LEDGER(S) UPDATE PANEL (REF IMAGE REPLICA)
   =============================================================== */
.bulk-ledger-panel {
    background: #ffffdb;
    border: 2px solid #e2d982;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.bulk-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed #d1c769;
}

.bulk-panel-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #800000;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bulk-panel-grid {
    display: grid;
    grid-template-columns: 280px 105px 1fr;
    gap: 1.15rem;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .bulk-panel-grid {
        grid-template-columns: 1fr;
    }
}

.bulk-left-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bulk-field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-field-row label {
    width: 68px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #800000;
    text-align: left;
    flex-shrink: 0;
}

.bulk-select,
.bulk-input {
    flex: 1;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    padding: 0.22rem 0.45rem;
    font-size: 0.8rem;
    color: #0f172a;
    height: 26px;
    box-sizing: border-box;
}

.bulk-range-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
}

.bulk-range-input {
    width: 50%;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    text-align: right;
    box-sizing: border-box;
    height: 26px;
}

.bulk-center-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-bulk-update-big {
    width: 100%;
    height: 100%;
    min-height: 120px;
    background: #f1f5f9;
    border: 2px outset #cbd5e1;
    border-radius: 6px;
    color: #800000;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-bulk-update-big:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.btn-bulk-update-big:active {
    border-style: inset;
    transform: translateY(1px);
}

.bulk-right-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bulk-counter-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.bulk-counter-row label {
    width: 52px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #800000;
}

.box-count-cyan {
    background: #67e8f9;
    border: 1px solid #06b6d4;
    border-radius: 3px;
    padding: 0.15rem 0.8rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #083344;
    min-width: 60px;
    text-align: center;
    display: inline-block;
}

.box-count-lime {
    background: #86efac;
    border: 1px solid #22c55e;
    border-radius: 3px;
    padding: 0.15rem 0.8rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #14532d;
    min-width: 60px;
    text-align: center;
    display: inline-block;
}

.bulk-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #800000;
    cursor: pointer;
}

.bulk-radios-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #d1c769;
}

.bulk-radio-group {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 0.2rem 0.75rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.bulk-radio-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0369a1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-bulk-exit {
    background: #fecdd3;
    border: 1px solid #f43f5e;
    color: #9f1239;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.25rem 1.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-bulk-exit:hover {
    background: #fda4af;
}

.btn-bulk-exit u {
    text-decoration: underline;
}

/* ===============================================================
   DRAG AND DROP COLUMNS & COLUMN VISIBILITY TOOLBAR
   =============================================================== */
.col-draggable {
    cursor: grab;
    user-select: none;
    position: relative;
}

.col-draggable:active {
    cursor: grabbing;
}

.col-drag-over {
    border-left: 3px solid #2563eb !important;
    background-color: #dbeafe !important;
}

.col-drag-handle {
    opacity: 0.45;
    font-size: 0.7rem;
    margin-right: 2px;
    cursor: grab;
}

.col-draggable:hover .col-drag-handle {
    opacity: 1;
    color: #2563eb;
}

/* Column Visibility Dropdown */
.columns-picker-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    z-index: 50;
    width: 270px;
    max-height: 400px;
    overflow-y: auto;
}

.columns-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
}

.columns-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.columns-picker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #1e293b;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

.columns-picker-item:hover {
    background: #f1f5f9;
}

/* ===============================================================
   SPRINT ER-09: LEDGER WORKSPACE UX & FOLLOW-UP INTELLIGENCE
   Exact Visual Alignment with Primary Reference Screenshot
   =============================================================== */

/* Sidebar ED Brand Card */
.sidebar-ed-brand-card {
    margin-top: 10px;
    padding: 8px 10px;
    background: #091424;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-ed-icon {
    width: 32px;
    height: 32px;
    background: #0284c7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-ed-info {
    display: flex;
    flex-direction: column;
}

.sidebar-ed-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
}

.sidebar-ed-sub {
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.2;
}

.sidebar-ed-role {
    font-size: 0.65rem;
    font-weight: 600;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* 1. Header Filter Controls */
.er09-header-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.er09-filter-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.er09-filter-item select, .er09-filter-item input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.er09-search-box {
    flex: 1;
    min-width: 220px;
    position: relative;
    display: flex;
    align-items: center;
}

.er09-search-box input {
    width: 100%;
    padding: 5px 28px 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
}

.er09-search-box input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.er09-search-box .search-icon-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
}

/* 2. Top KPI Cards Row (Badge 1) */
.er09-kpi-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 1.25fr;
    gap: 12px;
    margin-bottom: 0.95rem;
}

.er09-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.15s ease;
}

.er09-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.er09-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.er09-kpi-icon.blue { background: #e0f2fe; color: #0284c7; }
.er09-kpi-icon.green { background: #dcfce7; color: #16a34a; }
.er09-kpi-icon.orange { background: #fee2e2; color: #dc2626; }
.er09-kpi-icon.purple { background: #ede9fe; color: #7c3aed; }

.er09-kpi-data {
    display: flex;
    flex-direction: column;
}

.er09-kpi-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
}

.er09-kpi-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}

.er09-kpi-meta {
    font-size: 0.68rem;
    font-weight: 600;
    margin-top: 2px;
}

.er09-kpi-meta.pos { color: #16a34a; }
.er09-kpi-meta.sub { color: #64748b; }

/* Reference Company Card */
.er09-ref-card {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.er09-ref-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.er09-ref-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #ede9fe;
    color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.er09-ref-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6d28d9;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.er09-ref-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #4c1d95;
    line-height: 1.2;
}

.btn-ref-change {
    background: #ffffff;
    border: 1px solid #c4b5fd;
    color: #6d28d9;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-ref-change:hover {
    background: #ede9fe;
}

/* 3. Action Toolbar & Smart Pagination (Badges 2 & 3) */
.er09-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0.85rem;
    padding: 0.4rem 0;
}

.er09-toolbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.er09-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-er09-primary {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}

.btn-er09-primary:hover {
    background: #0369a1;
}

.btn-er09-outline {
    background: #ffffff;
    color: #0284c7;
    border: 1px solid #0284c7;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.btn-er09-outline:hover {
    background: #f0f9ff;
}

.btn-er09-excel,
.btn-er09-green {
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}

.btn-er09-excel:hover,
.btn-er09-green:hover {
    background: #059669;
}

.btn-er09-pdf,
.btn-er09-red {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}

.btn-er09-pdf:hover,
.btn-er09-red:hover {
    background: #dc2626;
}

.btn-er09-light {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.btn-er09-light:hover {
    background: #f1f5f9;
}

/* Smart Pagination in Toolbar (Badge 2) */
.er09-pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #64748b;
}

.er09-pagination-pills {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.er09-page-pill {
    min-width: 26px;
    height: 26px;
    padding: 0 4px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}

.er09-page-pill:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.er09-page-pill.active {
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
}

.er09-page-nav {
    min-width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.er09-page-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.er09-page-info {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* 4. Column Visibility Dropdown Overlay (Badge 3) */
.er09-col-visibility-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    z-index: 100;
    padding: 10px;
}

.er09-col-search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-bottom: 8px;
    box-sizing: border-box;
    outline: none;
}

.er09-col-search-input:focus {
    border-color: #0284c7;
}

.er09-col-scroll-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    padding-right: 4px;
}

.er09-col-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #1e293b;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}

.er09-col-item:hover {
    background: #f1f5f9;
}

.er09-col-item input {
    cursor: pointer;
}

.er09-col-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.er09-col-act-btn {
    background: transparent;
    border: none;
    font-size: 0.72rem;
    font-weight: 600;
    color: #0284c7;
    cursor: pointer;
    padding: 2px 4px;
}

.er09-col-act-btn:hover {
    text-decoration: underline;
}

/* 5. Last Follow-up (3) Inline Table Badges (Badge 5) */
.fp-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.fp-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
}

.fp-pill.call { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.fp-pill.wa { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.fp-pill.email { background: #eef2ff; border: 1px solid #c7d2fe; color: #4338ca; }
.fp-pill.payment { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.fp-pill.reminder { background: #fffbeb; border: 1px solid #fde68a; color: #b45309; }
.fp-pill.empty { background: #f8fafc; border: 1px dashed #cbd5e1; color: #94a3b8; font-weight: 400; }

.financial-grid-table tbody tr.row-selected {
    background-color: #f0f9ff !important;
}

/* 6. Selected Ledger Follow-up & Quick Contact Center Card (Badge 6) */
.er09-selected-ledger-container {
    margin-top: 1rem;
    background: #ffffff;
    border: 1.5px solid #38bdf8;
    border-radius: 12px;
    padding: 1.15rem 1.4rem;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.08);
}

.er09-sl-top-row {
    display: grid;
    grid-template-columns: minmax(320px, 1.2fr) auto minmax(360px, 1.3fr);
    align-items: center;
    gap: 16px;
}

@media (max-width: 1350px) {
    .er09-sl-top-row {
        grid-template-columns: 1fr 1fr;
    }
    .er09-sl-balances-bar {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .er09-sl-top-row {
        grid-template-columns: 1fr;
    }
}

.er09-sl-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.er09-sl-sr-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.er09-sl-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.er09-sl-status {
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.er09-sl-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #475569;
    margin-bottom: 4px;
}

.er09-sl-contact-row {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 12px;
}

.er09-sl-contact-row a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

.er09-sl-balances-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.er09-sl-bal-pill {
    display: flex;
    flex-direction: column;
}

.er09-sl-bal-lbl {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}

.er09-sl-bal-val {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.er09-sl-bal-val.dr { color: #0f172a; }
.er09-sl-bal-val.cr { color: #16a34a; }
.er09-sl-bal-val.net { color: #dc2626; }

/* Right: Recent 3 Activities in Selected Card */
.er09-sl-activities-box {
    display: flex;
    flex-direction: column;
}

.er09-sl-act-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.er09-sl-act-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.er09-sl-act-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-timeline-link {
    background: transparent;
    border: none;
    color: #0284c7;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-view-timeline-link:hover {
    text-decoration: underline;
}

.btn-add-followup-pill {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-add-followup-pill:hover {
    background: #0369a1;
}

.er09-sl-act-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.er09-act-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.er09-act-card-top {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f172a;
}

.er09-act-card-time {
    font-size: 0.68rem;
    color: #64748b;
}

.er09-act-card-desc {
    font-size: 0.7rem;
    color: #334155;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bottom Action Buttons Row (10 Actions in Badge 6) */
.er09-sl-actions-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.btn-er09-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-er09-action:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-er09-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-act-call { background: #0d9488; color: #ffffff; }
.btn-act-call:hover:not(:disabled) { background: #0f766e; }

.btn-act-wa { background: #16a34a; color: #ffffff; }
.btn-act-wa:hover:not(:disabled) { background: #15803d; }

.btn-act-sms { background: #2563eb; color: #ffffff; }
.btn-act-sms:hover:not(:disabled) { background: #1d4ed8; }

.btn-act-email { background: #7c3aed; color: #ffffff; }
.btn-act-email:hover:not(:disabled) { background: #6d28d9; }

.btn-act-voip { background: #e11d48; color: #ffffff; }
.btn-act-voip:hover:not(:disabled) { background: #be123c; }

.btn-act-reminder { background: #d97706; color: #ffffff; }
.btn-act-reminder:hover:not(:disabled) { background: #b45309; }

.btn-act-calllog { background: #475569; color: #ffffff; }
.btn-act-calllog:hover:not(:disabled) { background: #334155; }

.btn-act-view { background: #0284c7; color: #ffffff; }
.btn-act-view:hover:not(:disabled) { background: #0369a1; }

.btn-act-edit { background: #4f46e5; color: #ffffff; }
.btn-act-edit:hover:not(:disabled) { background: #4338ca; }

.btn-act-delete { background: #ffffff; color: #dc2626; border: 1px solid #fca5a5; }
.btn-act-delete:hover:not(:disabled) { background: #fee2e2; }

/* 7. Collapsible Bulk Update Section at the Bottom (Badge 4) */
.er09-collapsible-bulk-section {
    margin-top: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.er09-bulk-bar,
.er09-bulk-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: background 0.15s;
}

.er09-bulk-bar:hover,
.er09-bulk-bar-header:hover {
    background: #f8fafc;
}

.er09-bulk-bar.expanded,
.er09-bulk-bar-header.expanded {
    border-bottom-color: #e2e8f0;
    background: #ffffff;
}

.er09-bulk-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.er09-bulk-icon-circle,
.er09-bulk-bar-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.er09-bulk-title,
.er09-bulk-bar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
}

.er09-bulk-subtitle,
.er09-bulk-bar-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
    margin-bottom: 0;
}

.btn-toggle-bulk-expand,
.btn-expand-bulk {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0284c7;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-toggle-bulk-expand:hover,
.btn-expand-bulk:hover {
    background: #f0f9ff;
    border-color: #0284c7;
}

/* Modals */
.er09-modal-overlay,
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.er09-modal-overlay.open,
.modal-overlay.open {
    display: flex !important;
}

.er09-modal-container,
.modal-container {
    background: #ffffff !important;
    background-color: #ffffff !important;
    position: relative !important;
    z-index: 1000000 !important;
    border-radius: 12px !important;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden !important;
    animation: modalScaleUp 0.15s ease-out;
}

@keyframes modalScaleUp {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.er09-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.er09-modal-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.er09-modal-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
}

.er09-modal-close:hover {
    color: #0f172a;
}

.er09-modal-body {
    padding: 1.25rem;
    max-height: 70vh;
    overflow-y: auto;
}

.er09-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

/* Timeline in Modal */
.timeline-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.timeline-items-list::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 17px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.timeline-entry-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #0284c7;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-entry-content {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
}

.timeline-entry-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.timeline-entry-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.timeline-entry-time {
    font-size: 0.7rem;
    color: #64748b;
}

.timeline-entry-meta {
    font-size: 0.72rem;
    color: #475569;
    margin-bottom: 4px;
}

.timeline-entry-remarks {
    font-size: 0.75rem;
    color: #1e293b;
    line-height: 1.35;
}

@media (max-width: 1024px) {
    .er09-kpi-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .er09-sl-top-row {
        grid-template-columns: 1fr;
    }
    .er09-sl-act-cards-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .er09-kpi-cards-grid {
        grid-template-columns: 1fr;
    }
    .er09-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===============================================================
   SPRINT ER-10: PREMIUM WORKSPACE & BULK UPDATE THEME (IMAGE 2)
   =============================================================== */
.er10-breadcrumb-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.er10-bc-home {
    font-size: 0.85rem;
    color: #0284c7;
    font-weight: 600;
}

.er10-bc-sep {
    color: #94a3b8;
    font-size: 0.8rem;
}

.er10-bc-current {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

/* Bulk Update Modern Section (Badge 2) */
.er10-bulk-section-card {
    margin-top: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.er10-bulk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s;
}

.er10-bulk-header:hover {
    background: #f8fafc;
}

.er10-bulk-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.er10-bulk-header-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.er10-bulk-header-sub {
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 2px;
}

.er10-bulk-body {
    padding: 1.25rem;
    background: #ffffff;
}

.er10-bulk-content-grid {
    display: grid;
    grid-template-columns: 220px 1.2fr 1.1fr 1.3fr;
    gap: 1.25rem;
    align-items: stretch;
}

@media (max-width: 1280px) {
    .er10-bulk-content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .er10-bulk-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Left Action Card */
.er10-bulk-action-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1.15rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.er10-bulk-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.er10-bulk-action-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0369a1;
    margin: 0 0 4px 0;
}

.er10-bulk-action-desc {
    font-size: 0.72rem;
    color: #0284c7;
    line-height: 1.35;
    margin: 0 0 1rem 0;
}

.btn-er10-bulk-submit {
    width: 100%;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
    box-shadow: 0 1px 2px rgba(2, 132, 199, 0.2);
}

.btn-er10-bulk-submit:hover {
    background: #0369a1;
}

.btn-er10-bulk-reset {
    width: 100%;
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    transition: all 0.15s;
}

.btn-er10-bulk-reset:hover {
    background: #f1f5f9;
}

/* Form Columns */
.er10-bulk-form-col,
.er10-bulk-assign-col {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.er10-assign-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
}

.er10-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.er10-form-row label {
    width: 72px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    flex-shrink: 0;
}

.er10-form-select {
    flex: 1;
    height: 28px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 0.76rem;
    color: #0f172a;
    transition: border-color 0.15s;
}

.er10-form-select:focus {
    border-color: #0284c7;
    outline: none;
}

/* Center Col: Date Range & Counters */
.er10-bulk-center-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.er10-date-range-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
}

.er10-dr-header {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.er10-dr-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.er10-dr-input {
    flex: 1;
    height: 26px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    color: #0f172a;
}

.er10-dr-arrow {
    font-size: 0.75rem;
    color: #64748b;
}

.er10-counter-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.er10-counter-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
}

.er10-counter-badge.cyan {
    background: #67e8f9;
    color: #083344;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid #22d3ee;
}

.er10-checkbox-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.er10-radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.er10-radio-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

/* Bottom Banner */
.er10-bulk-info-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 1rem;
    font-size: 0.76rem;
    color: #1d4ed8;
}

.er10-bulk-info-banner .info-icon {
    font-size: 0.95rem;
}

/* Recent 3 Activities in Selected Ledger Card (Image 2) */
.er10-act-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    font-size: 0.74rem;
}

.er10-act-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.er10-act-date {
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.er10-act-desc {
    color: #475569;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.er10-act-sep {
    color: #cbd5e1;
}

.er10-act-user {
    font-weight: 700;
    color: #0284c7;
    white-space: nowrap;
}

.section-badge-circle.teal {
    background: #0d9488;
    color: #ffffff;
}

.section-badge-circle.coral {
    background: #ea580c;
    color: #ffffff;
}

/* ER-10 Breadcrumb */
.er10-breadcrumb-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.er10-bc-home {
    font-size: 0.86rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.er10-bc-home:hover {
    color: #1e293b;
}

.er10-bc-sep {
    font-size: 0.86rem;
    color: #94a3b8;
}

.er10-bc-current {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* ER-10 Status Pill Promised */
.er09-sl-status.promised {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #86efac !important;
}

/* ER-10 Activity List */
.er10-act-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

/* ===============================================================
   SPRINT ER-10: TOP SECTION POLISH (IMAGE 1 NORTH STAR MATCH)
   =============================================================== */

/* Breadcrumb Header Row */
#sec-ledger-master .section-card-header {
    background: transparent;
    border-bottom: none;
    padding: 0.5rem 0.25rem 0.75rem 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.er10-bc-home .bc-icon-blue {
    color: #2563eb;
    font-size: 1.05rem;
}

.section-header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-control-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-control-item label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.header-control-select,
.header-control-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.82rem;
    color: #0f172a;
    outline: none;
    height: 32px;
    box-sizing: border-box;
}

.header-control-select:focus,
.header-control-input:focus {
    border-color: #2563eb;
}

.btn-search-green {
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.25);
    transition: background 0.15s;
}

.btn-search-green:hover {
    background: #059669;
}

.btn-reset-light {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    transition: all 0.15s;
}

.btn-reset-light:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* 5 Top KPI Cards Grid Matching Image 1 */
#sec-ledger-master .er09-kpi-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
}

#sec-ledger-master .er09-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s, box-shadow 0.15s;
}

#sec-ledger-master .er09-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

#sec-ledger-master .er09-kpi-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}

#sec-ledger-master .er09-kpi-icon.blue { background: #e0f2fe; color: #0284c7; }
#sec-ledger-master .er09-kpi-icon.green { background: #dcfce7; color: #16a34a; }
#sec-ledger-master .er09-kpi-icon.purple { background: #f3e8ff; color: #9333ea; }
#sec-ledger-master .er09-kpi-icon.cyan { background: #cffafe; color: #0891b2; font-weight: 800; font-size: 1.55rem; }

#sec-ledger-master .er09-kpi-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#sec-ledger-master .er09-kpi-val {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin: 0 0 2px 0;
    letter-spacing: -0.3px;
}

#sec-ledger-master .er09-kpi-card:nth-child(4) .er09-kpi-val {
    font-size: 1.28rem;
    white-space: nowrap;
}

#sec-ledger-master .er09-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 3px 0;
    white-space: nowrap;
}

#sec-ledger-master .er09-kpi-sub {
    font-size: 0.74rem;
    font-weight: 600;
    margin: 0;
}

#sec-ledger-master .er09-kpi-sub.positive { color: #16a34a; }
#sec-ledger-master .er09-kpi-sub.negative { color: #16a34a; } /* Positive green badge in Image 1 */
#sec-ledger-master .er09-kpi-sub.neutral { color: #64748b; font-weight: 500; }

.btn-change-ref-co {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-change-ref-co:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* 3. Filter Bar (Unified White Container Card Matching Image 1) */
.er10-filter-card-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.er10-filter-company-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.er10-filter-company-badge {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.er10-filter-control-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

.er10-filter-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
}

.er10-filter-control {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.78rem;
    color: #0f172a;
    outline: none;
    height: 30px;
    box-sizing: border-box;
}

.er10-filter-control:focus {
    border-color: #2563eb;
}

.er10-search-integrated-box {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
}

.er10-search-integrated-box input {
    flex: 1;
    height: 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 4px 12px;
    font-size: 0.78rem;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
}

.er10-search-integrated-box input:focus {
    border-color: #2563eb;
}

.er10-btn-search-attach {
    height: 30px;
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    border-radius: 0 6px 6px 0;
    padding: 0 14px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    box-sizing: border-box;
}

.er10-btn-search-attach:hover {
    background: #1d4ed8;
}

/* 4. Grid Toolbar Row Matching Image 1 */
.er10-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.er10-toolbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-er10-primary-blue {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
    transition: background 0.15s;
}

.btn-er10-primary-blue:hover {
    background: #1d4ed8;
}

.btn-er10-outline-blue {
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.btn-er10-outline-blue:hover {
    background: #eff6ff;
}

.btn-er10-solid-green {
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
    transition: background 0.15s;
}

.btn-er10-solid-green:hover {
    background: #059669;
}

.btn-er10-solid-red {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
    transition: background 0.15s;
}

.btn-er10-solid-red:hover {
    background: #dc2626;
}

.er10-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.er10-per-page-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #475569;
}

.er10-per-page-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.78rem;
    color: #0f172a;
}

.er10-pagination-pills {
    display: flex;
    align-items: center;
    gap: 4px;
}

.er10-pagination-pills .page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.er10-pagination-pills .page-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.er10-pagination-pills .page-btn.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.er10-entries-info {
    font-size: 0.78rem;
    color: #475569;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    #sec-ledger-master .er09-kpi-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    #sec-ledger-master .er09-kpi-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .er10-filter-card-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .er10-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    #sec-ledger-master .er09-kpi-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
    }
    #sec-ledger-master .er09-kpi-cards-grid .ref-co-card {
        grid-column: span 2;
    }
}

/* ===============================================================
   LEDGER MASTER: VIEW TOGGLE (TABLE VS CARDS) & SCROLL HINT BAR
   =============================================================== */
.table-scroll-hint {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.45rem 0.85rem !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    gap: 0.75rem !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.table-scroll-hint .hint-text {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    font-size: 0.76rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.table-scroll-hint .hint-icon {
    color: #0284c7 !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
}

.table-view-toggle {
    display: inline-flex !important;
    align-items: center !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 3px !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.btn-view-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 5px 14px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    line-height: 1.2 !important;
    user-select: none !important;
}

.btn-view-toggle:hover {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.btn-view-toggle.active {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35), 0 1px 2px rgba(37, 99, 235, 0.2) !important;
}

.btn-view-toggle .view-icon {
    font-size: 0.85rem !important;
    line-height: 1 !important;
}

.btn-view-toggle .view-label {
    letter-spacing: 0.01em !important;
}

/* ===============================================================
   LEDGER MASTER: CARD VIEW DESIGN (RESPONSIVE GRID FOR ALL VIEWPORTS)
   =============================================================== */
.mobile-ledger-cards-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)) !important;
    gap: 14px !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mobile-ledger-cards-container.active {
    display: grid !important;
}

.mobile-ledger-cards-container.hidden {
    display: none !important;
}

.table-scroll-container.hidden {
    display: none !important;
}

.mobile-ledger-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
    box-sizing: border-box !important;
    cursor: pointer;
}

.mobile-ledger-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07) !important;
    border-color: #cbd5e1 !important;
}

.mobile-ledger-card.selected {
    border-color: #2563eb !important;
    background: #f8fafc !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

.mlc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mlc-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.mlc-num {
    font-size: 0.72rem;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    flex-shrink: 0;
}

.mlc-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-ledger-card:hover .mlc-name {
    color: #0284c7;
}

.mlc-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.7rem;
    color: #64748b;
}

.mlc-badge-status {
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.mlc-badge-status.regular,
.mlc-badge-status.promised {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.mlc-badge-status.pending {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.mlc-badge-status.risky {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.mlc-badge-status.court {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.mlc-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px 12px !important;
    background: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
}

.mlc-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mlc-metric-label {
    font-size: 0.64rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mlc-metric-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.mlc-metric-val.diff-red {
    color: #ef4444;
}

.mlc-metric-val.diff-bold {
    color: #16a34a;
}

.mlc-contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: #475569;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.mlc-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.mlc-contact-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .mobile-ledger-cards-container {
        grid-template-columns: 1fr !important;
    }
}

/* ===============================================================
   CARD ACTION DROPDOWN & SMART TIMELINE STYLES (ER-09-FIX-01/02)
   =============================================================== */
.mobile-ledger-card {
    overflow: visible !important;
}

.mobile-ledger-card.action-menu-active-card {
    position: relative !important;
    z-index: 1000 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15) !important;
}

.card-action-dropdown-wrapper {
    position: relative !important;
    flex-shrink: 0;
}

.card-action-menu-dropdown {
    width: 220px !important;
    max-width: calc(100vw - 32px) !important;
    z-index: 9999999 !important;
}

.mlc-timeline-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 2px;
    margin-bottom: 2px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mlc-timeline-container:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.mlc-timeline-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    font-size: 0.78rem;
    gap: 8px;
}

.mlc-tl-bar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #1e293b;
    min-width: 0;
}

.mlc-tl-badge-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.btn-card-tl-toggle {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0284c7;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-card-tl-toggle:hover {
    background: #eff6ff;
    border-color: #0284c7;
}

.mlc-timeline-panel {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
}

.mlc-timeline-panel.hidden {
    display: none !important;
}

.mlc-tl-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.mlc-tl-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 9px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mlc-tl-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 3px;
}

.mlc-tl-item-title-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mlc-tl-item-user {
    font-size: 0.66rem;
    font-weight: 500;
    color: #64748b;
}

.mlc-tl-status-pill {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #334155;
    flex-shrink: 0;
}

.mlc-tl-status-pill.connected,
.mlc-tl-status-pill.regular,
.mlc-tl-status-pill.paid,
.mlc-tl-status-pill.verified,
.mlc-tl-status-pill.sent {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.mlc-tl-status-pill.promised,
.mlc-tl-status-pill.ptp {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.mlc-tl-status-pill.pending,
.mlc-tl-status-pill.callback,
.mlc-tl-status-pill.initiated {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.mlc-tl-status-pill.no-answer,
.mlc-tl-status-pill.busy,
.mlc-tl-status-pill.switched-off,
.mlc-tl-status-pill.refused,
.mlc-tl-status-pill.dispute,
.mlc-tl-status-pill.failed {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.mlc-tl-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.67rem;
    color: #64748b;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.mlc-tl-item-next {
    color: #b45309;
    background: #fffbeb;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.65rem;
    border: 1px solid #fef3c7;
}

.mlc-tl-item-remarks {
    font-size: 0.72rem;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
}

.mlc-timeline-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
}

.btn-card-tl-viewall {
    background: none;
    border: none;
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 6px;
    text-decoration: underline;
}

.btn-card-tl-viewall:hover {
    color: #0369a1;
}

.btn-card-tl-add {
    background: #0284c7;
    border: 1px solid #0284c7;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-card-tl-add:hover {
    background: #0369a1;
}

.mlc-tl-state-box {
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-size: 0.72rem;
}

.mlc-tl-state-box.loading {
    color: #0284c7;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mlc-tl-state-box.empty {
    color: #64748b;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mlc-tl-state-box.error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.btn-card-tl-retry {
    background: #ffffff;
    border: 1px solid #dc2626;
    color: #dc2626;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.68rem;
    cursor: pointer;
}

/* ===============================================================
   RETRO ERP SPREADSHEET THEME & EXPANDABLE FOLLOW-UP TIMELINE
   =============================================================== */
.th-ref-yellow {
    background-color: #fef08a !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #eab308 !important;
    text-shadow: none;
}
.th-ref-blue {
    background-color: #bae6fd !important;
    color: #0369a1 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #38bdf8 !important;
}
.th-ref-peach {
    background-color: #ffedd5 !important;
    color: #9a3412 !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #fb923c !important;
}
.th-ref-pink {
    background-color: #fce7f3 !important;
    color: #9f1239 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #f472b6 !important;
}
.th-ref-mint {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #86efac !important;
}
.th-ref-green {
    background-color: #bbf7d0 !important;
    color: #14532d !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #4ade80 !important;
}

/* Row Expand Button */
.btn-row-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    padding: 0;
    user-select: none;
}
.btn-row-expand:hover {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #0369a1;
    transform: scale(1.05);
}
.btn-row-expand.expanded {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* Global Hidden Utility */
.hidden {
    display: none !important;
}

/* Subrow Accordion Drawer */
tr.lm-expand-subrow {
    background-color: #f8fafc;
}
tr.lm-expand-subrow.hidden {
    display: none !important;
}
.lm-expand-drawer {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px dashed #cbd5e1;
    border-bottom: 2px solid #94a3b8;
}
@media (max-width: 1024px) {
    .lm-expand-drawer {
        grid-template-columns: 1fr;
    }
}
.lm-expand-timeline-col,
.lm-expand-details-col {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.expand-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.65rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.expand-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.expand-title-icon {
    font-size: 1.15rem;
}
.expand-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
}
.expand-section-subtitle {
    font-size: 0.7rem;
    color: #64748b;
}

/* Timeline Cards */
.expand-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 380px;
    overflow-y: auto;
}
.tl-card-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #0284c7;
    border-radius: 6px;
    transition: background 0.15s;
}
.tl-card-item:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    border-left-color: #0284c7;
}
.tl-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.tl-card-icon {
    font-size: 0.95rem;
}
.tl-card-num {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 700;
}
.tl-card-body {
    flex: 1;
}
.tl-card-header-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 3px;
}
.tl-card-type {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
}
.tl-card-actor {
    font-size: 0.7rem;
    background: #e2e8f0;
    color: #334155;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.tl-card-time {
    font-size: 0.68rem;
    color: #64748b;
    margin-left: auto;
}
.tl-card-remarks {
    font-size: 0.75rem;
    color: #334155;
    line-height: 1.35;
}
.tl-card-next {
    font-size: 0.68rem;
    color: #0369a1;
    margin-top: 3px;
    background: #e0f2fe;
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
}
.expand-empty-timeline {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
}

/* Extended Attributes Grid */
.expand-attributes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.75rem;
    margin-bottom: 0.85rem;
}
.expand-attr-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.expand-attr-item.span-2 {
    grid-column: span 2;
}
.attr-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.attr-val {
    font-size: 0.78rem;
    color: #1e293b;
    font-weight: 500;
}
.expand-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}
.btn-action-outline-blue {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-action-outline-green {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-action-outline-purple {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-action-outline-red {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}

/* MD Remarks Cell & Inline Editing */
.cell-md-remarks {
    background-color: #fefce833;
}
.cell-md-remarks.cell-md-viewonly {
    background-color: #fafaf933;
}
.md-remark-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    min-height: 24px;
}
.md-remark-wrap:hover {
    background-color: #fef08a66;
}
.md-remark-wrap.md-remark-viewonly {
    cursor: default !important;
}
.md-remark-wrap.md-remark-viewonly:hover {
    background-color: transparent !important;
}
.md-remark-text {
    font-size: 0.76rem;
    color: #713f12;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
.md-remark-text.viewonly {
    color: #475569 !important;
    font-weight: 400 !important;
    cursor: default !important;
}
.btn-edit-md-inline {
    border: none;
    background: transparent;
    font-size: 0.65rem;
    opacity: 0.2;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.15s;
}
.md-remark-wrap:hover .btn-edit-md-inline {
    opacity: 1;
}
.md-inline-edit-box {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}
.input-md-inline {
    flex: 1;
    font-size: 0.75rem;
    padding: 2px 6px;
    border: 1px solid #eab308;
    border-radius: 4px;
    outline: none;
    background: #ffffff;
    color: #713f12;
    font-weight: 600;
}
.btn-save-md-inline {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.72rem;
    cursor: pointer;
    font-weight: bold;
}
.btn-cancel-md-inline {
    background: #94a3b8;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.72rem;
    cursor: pointer;
}

/* ===============================================================
   SPRINT ER-11: ADAPTIVE LEDGER GRID & FOLLOW-UP INTELLIGENCE
   =============================================================== */

/* 1. Draggable Column Resizers & Sortable Column Headers */
th.col-draggable {
    position: relative;
    user-select: none;
}
th.col-sortable {
    cursor: pointer !important;
    user-select: none;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}
th.col-sortable:hover {
    filter: brightness(0.93);
}
th.col-sortable .col-header-text {
    display: inline-block;
    vertical-align: middle;
}
th.col-sortable .th-sort-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    font-size: 0.65rem;
    color: #64748b;
    vertical-align: middle;
    padding: 1px 3px;
    border-radius: 3px;
    transition: all 0.15s ease;
    opacity: 0.65;
}
th.col-sortable:hover .th-sort-icon {
    opacity: 1;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.14);
}
th.col-sortable.sorted-asc,
th.col-sortable.sorted-desc {
    box-shadow: inset 0 -3px 0 #1d4ed8 !important;
}
th.col-sortable.sorted-asc .th-sort-icon,
th.col-sortable.sorted-desc .th-sort-icon {
    opacity: 1 !important;
    color: #1e40af !important;
    background: rgba(30, 64, 175, 0.20) !important;
    font-weight: 900 !important;
    font-size: 0.72rem;
    transform: scale(1.08);
}
.col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
    touch-action: none;
}
.col-resizer:hover,
.col-resizer.resizing {
    background-color: #0284c7;
    opacity: 0.9;
}

/* 2. Expanded Detail Drawer (Full Width) */
.lm-expand-drawer-er11 {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.1rem 1.35rem;
    background: #f8fafc;
    border-top: 1px dashed #cbd5e1;
    border-bottom: 2px solid #94a3b8;
}

/* Top Ledger Profile & Actions Card (Image 1 North Star) */
.er11-profile-header-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.er11-profile-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.er11-profile-id-col {
    display: flex;
    align-items: center;
    gap: 12px;
}
.er11-profile-icon-box {
    width: 38px;
    height: 38px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.er11-firm-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.er11-firm-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.er11-meta-tags {
    font-size: 0.76rem;
    color: #64748b;
    margin: 0;
}
.er11-meta-tags strong {
    color: #334155;
}
.er11-action-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.btn-er11-act {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
}
.btn-er11-act.green {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
}
.btn-er11-act.green:hover { background: #059669; }
.btn-er11-act.blue {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}
.btn-er11-act.blue:hover { background: #1d4ed8; }
.btn-er11-act.purple {
    background: #9333ea;
    color: #ffffff;
    border-color: #7e22ce;
}
.btn-er11-act.purple:hover { background: #7e22ce; }
.btn-er11-act.indigo {
    background: #7c3aed;
    color: #ffffff;
    border-color: #6d28d9;
}
.btn-er11-act.indigo:hover { background: #6d28d9; }
.btn-er11-act.red {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
}
.btn-er11-act.red:hover { background: #dc2626; }
.btn-er11-act.orange {
    background: #f59e0b;
    color: #ffffff;
    border-color: #d97706;
}
.btn-er11-act.orange:hover { background: #d97706; }
.btn-er11-act.dark-blue {
    background: #0f172a;
    color: #ffffff;
    border-color: #0284c7;
}
.btn-er11-act.dark-blue:hover { background: #1e293b; }
.btn-er11-act.sky {
    background: #0284c7;
    color: #ffffff;
    border-color: #0369a1;
}
.btn-er11-act.sky:hover { background: #0369a1; }
.btn-er11-act.del {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
    margin-left: auto;
}
.btn-er11-act.del:hover { background: #fee2e2; }

/* Section Containers & Headers */
.er11-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.8rem 1.1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.er11-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.55rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
    gap: 10px;
    flex-wrap: wrap;
}
.er11-section-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.er11-section-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.btn-xs-scroll {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0284c7;
    font-weight: 700;
    font-size: 0.74rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.btn-xs-scroll:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

/* Horizontally Scrollable Table Wrappers */
.er11-meta-table-wrap,
.er11-co-table-wrap,
.er11-tl-table-wrap {
    overflow-x: auto;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

/* Common Table Styles for Drawer Grids - Autofit & Responsive Flow */
.table-drawer-meta-grid,
.table-drawer-company-grid,
.table-drawer-timeline-grid {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: collapse;
    font-size: 0.74rem;
    background: #ffffff;
    table-layout: auto !important;
}

.table-drawer-meta-grid th,
.table-drawer-company-grid th,
.table-drawer-timeline-grid th,
.table-drawer-meta-grid td,
.table-drawer-company-grid td,
.table-drawer-timeline-grid td {
    white-space: nowrap !important;
    vertical-align: middle;
}

.table-drawer-meta-grid th,
.table-drawer-company-grid th,
.table-drawer-timeline-grid th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    position: relative;
    user-select: none;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.table-drawer-meta-grid td,
.table-drawer-company-grid td,
.table-drawer-timeline-grid td {
    padding: 7px 14px;
    border: 1px solid #e2e8f0;
    font-size: 0.74rem;
}

.table-drawer-meta-grid tr:hover td,
.table-drawer-company-grid tr:hover td,
.table-drawer-timeline-grid tr:hover td {
    background: #f8fafc;
}

/* Table 1: Ledger Information - Column Widths & Content Visibility */
.table-drawer-meta-grid th[data-col-id="meta_ledger_id"] { width: 100px; min-width: 100px; }
.table-drawer-meta-grid th[data-col-id="meta_employee"] { width: 200px; min-width: 200px; }
.table-drawer-meta-grid th[data-col-id="meta_risk_zone"] { width: 130px; min-width: 130px; }
.table-drawer-meta-grid th[data-col-id="meta_net_balance"] { width: 165px; min-width: 165px; }
.table-drawer-meta-grid th[data-col-id="meta_aging_days"] { width: 110px; min-width: 110px; }
.table-drawer-meta-grid th[data-col-id="meta_bal_upto"] { width: 130px; min-width: 130px; }
.table-drawer-meta-grid th[data-col-id="meta_state"] { width: 90px; min-width: 90px; }
.table-drawer-meta-grid th[data-col-id="meta_email"] { width: 180px; min-width: 180px; }
.table-drawer-meta-grid th[data-col-id="meta_call_by"] { width: 140px; min-width: 140px; }
.table-drawer-meta-grid th[data-col-id="meta_call_date"] { width: 140px; min-width: 140px; }
.table-drawer-meta-grid th[data-col-id="meta_next_followup"] { width: 145px; min-width: 145px; }
.table-drawer-meta-grid th[data-col-id="meta_call_status"] { width: 130px; min-width: 130px; }
.table-drawer-meta-grid th[data-col-id="meta_call_remarks"] { width: 280px; min-width: 280px; }
.table-drawer-meta-grid th[data-col-id="meta_general_remarks"] { width: 260px; min-width: 260px; }
.table-drawer-meta-grid th[data-col-id="meta_md_remarks"] { width: 240px; min-width: 240px; }

/* Table 2: Company-wise Balances - Prevent clipping of headings & amounts */
.table-drawer-company-grid th[data-col-id="co_company"] { width: 120px; min-width: 120px; }
.table-drawer-company-grid th[data-col-id="co_type"] { width: 95px; min-width: 95px; }
.table-drawer-company-grid th[data-col-id="co_code"] { width: 130px; min-width: 130px; }
.table-drawer-company-grid th[data-col-id="co_name"] { width: 220px; min-width: 220px; }
.table-drawer-company-grid th[data-col-id="co_debit"] { width: 125px; min-width: 125px; }
.table-drawer-company-grid th[data-col-id="co_credit"] { width: 125px; min-width: 125px; }
.table-drawer-company-grid th[data-col-id="co_bal_upto"] { width: 130px; min-width: 130px; }
.table-drawer-company-grid th[data-col-id="co_status"] { width: 100px; min-width: 100px; }
.table-drawer-company-grid th[data-col-id="co_diff_dr"] { width: 110px; min-width: 110px; }
.table-drawer-company-grid th[data-col-id="co_diff_cr"] { width: 110px; min-width: 110px; }
.table-drawer-company-grid th[data-col-id="co_remarks"] { width: 220px; min-width: 220px; }

/* Table 3: Follow-up Activities - Sufficient widths & expandable remarks */
.table-drawer-timeline-grid th[data-col-id="tl_num"] { width: 55px; min-width: 55px; }
.table-drawer-timeline-grid th[data-col-id="tl_datetime"] { width: 165px; min-width: 165px; }
.table-drawer-timeline-grid th[data-col-id="tl_type"] { width: 115px; min-width: 115px; }
.table-drawer-timeline-grid th[data-col-id="tl_assigned"] { width: 145px; min-width: 145px; }
.table-drawer-timeline-grid th[data-col-id="tl_remarks"] { width: 280px; min-width: 280px; }
.table-drawer-timeline-grid th[data-col-id="tl_next_followup"] { width: 155px; min-width: 155px; }
.table-drawer-timeline-grid th[data-col-id="tl_due_status"] { width: 115px; min-width: 115px; }
.table-drawer-timeline-grid th[data-col-id="tl_actions"] { width: 130px; min-width: 130px; }

/* ONLY remarks type columns should be word wrap not other columns */
.table-drawer-meta-grid td.cell-remarks-wrap,
.table-drawer-company-grid td.cell-remarks-wrap,
.table-drawer-timeline-grid td.cell-remarks-wrap,
.cell-remarks-wrap {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.4 !important;
    min-width: 240px !important;
    max-width: 420px !important;
}

/* Pill Badges */
.emp-pill.purple-pill {
    background: #f3e8ff;
    color: #7e22ce;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.72rem;
    display: inline-block;
}
.badge-company-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    background: #e0f2fe;
    color: #0369a1;
}
.badge-status-open {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.68rem;
    background: #dcfce7;
    color: #15803d;
}

/* Timeline Components */
.tl-channel-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #ffffff;
    margin-right: 5px;
    vertical-align: middle;
}
.tl-channel-dot.wa { background: #10b981; }
.tl-channel-dot.call { background: #3b82f6; }
.tl-channel-dot.call-red { background: #ef4444; }
.tl-channel-dot.email { background: #8b5cf6; }
.tl-channel-dot.sms { background: #f59e0b; }

.badge-due-today {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-block;
}
.badge-due-completed {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-block;
}
.badge-due-overdue {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-block;
}
.badge-due-upcoming {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-block;
}

.btn-tl-view {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #2563eb;
    font-weight: 600;
    padding: 2px 8px;
    font-size: 0.68rem;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s;
}
.btn-tl-view:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}
.btn-tl-call {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    padding: 2px 8px;
    font-size: 0.68rem;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s;
}
.btn-tl-call:hover {
    background: #1d4ed8;
}
.btn-tl-edit {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #2563eb;
    font-weight: 600;
    padding: 2px 8px;
    font-size: 0.68rem;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s;
}
.btn-tl-edit:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

/* ==========================================================================
   Followup Management: Today & Missed Followup Executive Hub
   ========================================================================== */
.call-management-section {
    border-top: 3px solid #2563eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.followup-summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.fu-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fu-summary-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.fu-summary-card.fu-today-total {
    border-left: 3.5px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.fu-summary-card.fu-today-pending {
    border-left: 3.5px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.fu-summary-card.fu-today-completed {
    border-left: 3.5px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.fu-summary-card.fu-today-urgent {
    border-left: 3.5px solid #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.fu-summary-card.fu-missed-total {
    border-left: 3.5px solid #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.fu-summary-card.fu-missed-mild {
    border-left: 3.5px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.fu-summary-card.fu-missed-mod {
    border-left: 3.5px solid #f97316;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
}

.fu-summary-card.fu-missed-critical {
    border-left: 3.5px solid #dc2626;
    background: linear-gradient(135deg, #fee2e2 0%, #ffffff 100%);
}

.fu-sum-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.fu-sum-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-heading, #0f172a);
    line-height: 1.1;
}

.fu-sum-val.danger {
    color: #dc2626;
}

.fu-sum-sub {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
}

.text-amber {
    color: #b45309 !important;
}

.text-green {
    color: #15803d !important;
}

.text-red {
    color: #b91c1c !important;
}

.text-orange {
    color: #c2410c !important;
}

.badge-overdue-days {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge-overdue-days.mild {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-overdue-days.warning {
    background-color: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.badge-overdue-days.critical {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.call-tab-pill.tab-stacked {
    border-color: #6366f1;
    color: #4338ca;
}

.call-tab-pill.tab-all {
    border-color: #64748b;
    color: #334155;
}

.call-action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-fu-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1;
}

.btn-fu-call {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.btn-fu-call:hover {
    background: #10b981;
    color: #ffffff;
}

.btn-fu-wa {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}
.btn-fu-wa:hover {
    background: #22c55e;
    color: #ffffff;
}

.btn-fu-resched {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.btn-fu-resched:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-fu-done {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}
.btn-fu-done:hover {
    background: #334155;
    color: #ffffff;
}

/* ==========================================================================
   Sprint ER-10: Ledger Master Excel Import & Smart Upsert (ER-10-LM-01)
   Exact Visual Baseline Matching North Star Reference
   ========================================================================== */
.er10-import-page-wrapper {
    padding: 0.75rem 1rem 2rem 1rem;
    max-width: 1720px;
    margin: 0 auto;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.er10-top-governance-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    gap: 1rem;
    flex-wrap: wrap;
}

.er10-top-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-er10-back-link {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-er10-back-link:hover {
    background: #e2e8f0;
    color: #0284c7;
}

.er10-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0284c7;
    display: block;
    line-height: 1.1;
}

.er10-brand-sub {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

.er10-center-pill {
    background: #0b192c;
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.4rem 1.75rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(11, 25, 44, 0.25);
}

.er10-pill-heading {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.er10-pill-sub {
    font-size: 0.68rem;
    color: #93c5fd;
    font-weight: 500;
    margin-top: 1px;
}

.er10-top-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-er10-ed-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #059669;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-er10-ed-ref:hover {
    background: #10b981;
    color: #ffffff;
}

.er10-completion-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.er10-comp-icon {
    font-size: 1.1rem;
}

.er10-comp-info {
    display: flex;
    flex-direction: column;
}

.er10-comp-label {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.er10-comp-days {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
}

/* 6-Card Container & Grid Rows */
.er10-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.er10-row-two-col {
    display: grid;
    grid-template-columns: 46% 54%;
    gap: 1rem;
}

.er10-row-three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1.05fr;
    gap: 1rem;
}

.er10-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.er10-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.er10-badge-num {
    width: 28px;
    height: 28px;
    background: #1e60f2;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(30, 96, 242, 0.3);
}

.er10-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.er10-card-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 1px;
}

.er10-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Card 1: Upload Split */
.er10-upload-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.er10-dropzone-box {
    border: 2px dashed #93c5fd;
    border-radius: 12px;
    background: #f8fafc;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s;
    min-height: 175px;
}
.er10-dropzone-box.dragover {
    border-color: #1e60f2;
    background: #eff6ff;
}

.er10-excel-icon-box {
    width: 48px;
    height: 48px;
    background: #10b981;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin-bottom: 0.65rem;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.excel-badge {
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
}

.excel-sheet-grid {
    font-size: 1rem;
    line-height: 1;
}

.er10-drop-main-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.er10-drop-or {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 3px 0;
}

.btn-er10-choose-file {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #1e60f2;
    color: #ffffff;
    padding: 0.4rem 1.1rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(30, 96, 242, 0.25);
    transition: all 0.15s;
}
.btn-er10-choose-file:hover {
    background: #1d4ed8;
}

.er10-drop-hint {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.er10-drop-actions-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-er10-sample-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid #10b981;
    color: #059669;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-er10-sample-download:hover {
    background: #ecfdf5;
}

.btn-er10-load-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-er10-load-demo:hover {
    background: #e2e8f0;
    color: #1e60f2;
}

/* Expected Columns Column */
.er10-columns-guide-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
}

.er10-guide-header {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.er10-cols-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.72rem;
    flex: 1;
}

.er10-col-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #334155;
}

.col-idx {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.col-txt {
    font-weight: 600;
}

.er10-tip-box {
    margin-top: 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: #1d4ed8;
    font-weight: 500;
}

/* Card 2 Preview Search & Header */
.er10-preview-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.er10-preview-search-wrap .search-icon {
    position: absolute;
    left: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.er10-search-field {
    padding: 0.35rem 0.65rem 0.35rem 1.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.75rem;
    outline: none;
    width: 170px;
}
.er10-search-field:focus {
    border-color: #1e60f2;
}

/* 5 KPI Metric Chips Matching Baseline */
.er10-kpis-chips-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.er10-kpi-chip {
    flex: 1;
    min-width: 90px;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.er10-kpi-chip.chip-blue {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.er10-kpi-chip.chip-blue .chip-icon {
    color: #1e60f2;
    background: #dbeafe;
}
.er10-kpi-chip.chip-blue .chip-count {
    color: #1e40af;
}

.er10-kpi-chip.chip-green {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.er10-kpi-chip.chip-green .chip-icon {
    color: #059669;
    background: #d1fae5;
}
.er10-kpi-chip.chip-green .chip-count {
    color: #065f46;
}

.er10-kpi-chip.chip-purple {
    background: #faf5ff;
    border-color: #e9d5ff;
}
.er10-kpi-chip.chip-purple .chip-icon {
    color: #7c3aed;
    background: #f3e8ff;
}
.er10-kpi-chip.chip-purple .chip-count {
    color: #6b21a8;
}

.er10-kpi-chip.chip-orange {
    background: #fff7ed;
    border-color: #fed7aa;
}
.er10-kpi-chip.chip-orange .chip-icon {
    color: #ea580c;
    background: #ffedd5;
}
.er10-kpi-chip.chip-orange .chip-count {
    color: #9a3412;
}

.er10-kpi-chip.chip-red {
    background: #fef2f2;
    border-color: #fecaca;
}
.er10-kpi-chip.chip-red .chip-icon {
    color: #dc2626;
    background: #fee2e2;
}
.er10-kpi-chip.chip-red .chip-count {
    color: #991b1b;
}

.er10-kpi-chip .chip-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.er10-kpi-chip .chip-count {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
}

.er10-kpi-chip .chip-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}

/* Tables Styling */
.er10-table-scroll-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 290px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.er10-table-scroll-container.compact {
    max-height: 220px;
}

.er10-preview-table, .er10-diff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    text-align: left;
}

.er10-preview-table th, .er10-diff-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 5;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.er10-preview-table td, .er10-diff-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.er10-preview-tr {
    cursor: pointer;
    transition: background 0.15s;
}
.er10-preview-tr:hover {
    background: #f8fafc;
}
.er10-preview-tr.selected {
    background: #eff6ff !important;
    border-left: 3px solid #1e60f2;
}

/* Badges & Pills */
.er10-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.er10-badge.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.er10-badge.badge-purple {
    background: #f3e8ff;
    color: #7e22ce;
}

.er10-badge.badge-orange {
    background: #ffedd5;
    color: #c2410c;
}

.er10-badge.badge-red {
    background: #fee2e2;
    color: #b91c1c;
}

.er10-action-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.pill-action-update {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.pill-action-create {
    background: #f3e8ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

.pill-action-skip {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Subcard title bars */
.er10-subcard-title-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.er10-subcard-firm-title {
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.er10-ledger-id-tag {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}

.badge-pill-green {
    background: #dcfce7;
    color: #15803d;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 700;
}

.badge-pill-purple {
    background: #f3e8ff;
    color: #7e22ce;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 700;
}

.badge-pill-gray {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 600;
}

.text-green-bold {
    color: #16a34a !important;
    font-weight: 700 !important;
}

.er10-bottom-info-notice {
    margin-top: 0.65rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: #1d4ed8;
    line-height: 1.35;
}

/* Card 5 Tabs & Issues */
.er10-tab-pills-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.er10-tab-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s;
}

.er10-tab-pill.active.red {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
}

.er10-tab-pill.active.blue {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.er10-issues-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 0.65rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.er10-how-to-fix {
    font-size: 0.68rem;
    color: #475569;
}

.er10-how-to-fix .how-title {
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 2px;
}

.er10-how-to-fix .how-list {
    margin-left: 1.1rem;
    line-height: 1.35;
}

.btn-er10-outline-blue {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid #0284c7;
    color: #0284c7;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-er10-outline-blue:hover {
    background: #f0f9ff;
}

/* Card 6: Confirmation Split */
.er10-confirm-split {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 1.5rem;
}

.confirm-sec-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.65rem;
}

.er10-confirm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}
.er10-confirm-checkbox-label input {
    margin-top: 2px;
}

.er10-checkbox-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.er10-opt-checkbox {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    color: #334155;
    cursor: pointer;
}

.er10-confirm-btns-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-er10-solid-green-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    transition: all 0.15s;
}
.btn-er10-solid-green-lg:hover:not(:disabled) {
    background: #059669;
}
.btn-er10-solid-green-lg:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-er10-cancel-lg {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-er10-cancel-lg:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ==========================================================================
   Responsive Reflow (Mobile & Tablet Reflow)
   ========================================================================== */
@media (max-width: 1200px) {
    .er10-row-two-col {
        grid-template-columns: 1fr;
    }
    .er10-row-three-col {
        grid-template-columns: 1fr;
    }
    .er10-confirm-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .er10-top-governance-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .er10-center-pill {
        max-width: 100%;
        border-radius: 8px;
        padding: 0.4rem 0.75rem;
    }
    .er10-upload-split {
        grid-template-columns: 1fr;
    }
    .er10-kpis-chips-row {
        flex-direction: column;
    }
}

/* Multi-Choice Filter & Column Width Adjustment Styling */
.mc-filter-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.er10-filter-card-bar .mc-filter-container {
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
}

.er10-filter-card-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
}

.er10-filter-control-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0;
}

.er10-filter-company-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0;
}

.mc-btn-trigger {
    transition: all 0.15s ease;
    user-select: none;
}

.mc-btn-trigger:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
}

.mc-popover-card {
    animation: mcFadeDown 0.15s ease-out;
}

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

.mc-opt-row {
    transition: background 0.12s ease;
}

.mc-opt-row:hover {
    background: #f1f5f9;
}

.mc-options-scroll::-webkit-scrollbar {
    width: 5px;
}

.mc-options-scroll::-webkit-scrollbar-track {
    background: #f8fafc;
}

.mc-options-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.col-width-adj-group .btn-adj-w {
    transition: all 0.15s ease;
}

.col-width-adj-group .btn-adj-w:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    transform: scale(1.05);
}

/* Priority Badges */
.badge-priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-prio-urgent {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.badge-prio-high {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}
.badge-prio-medium {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-prio-low {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* Direct Editable Priority Select */
select.select-priority-direct {
    display: inline-block;
    padding: 2px 18px 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: all 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23475569'%3e%3cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 11px;
}
select.select-priority-direct:hover {
    filter: brightness(0.96);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
select.select-priority-direct:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}
select.select-priority-direct option {
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
}

/* Firm Name Column Auto Word Wrap */
#lm-grid-table th[data-col-id="ledger_name"],
#lm-grid-table td.col-firm-name,
#lm-grid-table td[data-col="ledger_name"] {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
}

/* ==========================================================================
   Ledger Master Grid Frozen Columns (Horizontal Scrolling Sticky Freeze)
   Freezes Columns:
     1. Col 1 (+/- expand toggle): left: 0px, width: 32px
     2. Col 2 (ACTION dropdown):   left: 32px, width: 95px
     3. Col 3 (*Sel checkbox):     left: 127px, width: 38px
     4. Col 4 (# row number):      left: 165px, width: 35px
     5. Col 5 (FIRM NAME):         left: 200px, border-right & shadow divider
   ========================================================================== */

/* Col 1: +/- Expand Toggle */
#lm-grid-table th:nth-child(1),
#lm-grid-table td:nth-child(1) {
    position: sticky !important;
    left: 0px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    box-sizing: border-box !important;
    background-color: #ffffff;
}

/* Col 2: ACTION Dropdown */
#lm-grid-table th:nth-child(2),
#lm-grid-table td:nth-child(2) {
    position: sticky !important;
    left: 32px !important;
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    box-sizing: border-box !important;
    background-color: #ffffff;
}

/* Col 3: *Sel Checkbox */
#lm-grid-table th:nth-child(3),
#lm-grid-table td:nth-child(3) {
    position: sticky !important;
    left: 127px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    box-sizing: border-box !important;
    background-color: #ffffff;
}

/* Col 4: # Row Number */
#lm-grid-table th:nth-child(4),
#lm-grid-table td:nth-child(4) {
    position: sticky !important;
    left: 165px !important;
    width: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    box-sizing: border-box !important;
    background-color: #ffffff;
}

/* Col 5: FIRM NAME (Sticky Divider with border & drop shadow) */
#lm-grid-table th:nth-child(5),
#lm-grid-table td:nth-child(5),
#lm-grid-table th[data-col-id="ledger_name"],
#lm-grid-table td.col-firm-name {
    position: sticky !important;
    left: 200px !important;
    box-sizing: border-box !important;
    background-color: #ffffff;
    border-right: 2px solid #cbd5e1 !important;
    box-shadow: 4px 0 8px -3px rgba(0, 0, 0, 0.18) !important;
}

/* Z-Index Layering:
   - Header Row 1 (titles): z-index 32 (FIRM NAME 33)
   - Header Row 2 (filters): z-index 30 (FIRM NAME 31)
   - Body Cells: z-index 10 (FIRM NAME 12)
   - Open Action Dropdown Row/Cell: z-index 1000+
*/
#lm-grid-table thead tr:first-child th:nth-child(1),
#lm-grid-table thead tr:first-child th:nth-child(2),
#lm-grid-table thead tr:first-child th:nth-child(3),
#lm-grid-table thead tr:first-child th:nth-child(4) {
    z-index: 32 !important;
    background-color: #e2e8f0 !important;
}

#lm-grid-table thead tr:first-child th:nth-child(5) {
    z-index: 33 !important;
    background-color: #fef08a !important;
}

#lm-grid-table thead tr.grid-filter-header-row th:nth-child(1),
#lm-grid-table thead tr.grid-filter-header-row th:nth-child(2),
#lm-grid-table thead tr.grid-filter-header-row th:nth-child(3),
#lm-grid-table thead tr.grid-filter-header-row th:nth-child(4) {
    z-index: 30 !important;
    background-color: #f1f5f9 !important;
}

#lm-grid-table thead tr.grid-filter-header-row th:nth-child(5) {
    z-index: 31 !important;
    background-color: #f8fafc !important;
}

#lm-grid-table tbody td:nth-child(1),
#lm-grid-table tbody td:nth-child(2),
#lm-grid-table tbody td:nth-child(3),
#lm-grid-table tbody td:nth-child(4) {
    z-index: 10 !important;
    background-color: #ffffff;
}

#lm-grid-table tbody td:nth-child(5) {
    z-index: 12 !important;
    background-color: #ffffff;
}

/* Row Hover State for Frozen Columns */
#lm-grid-table tbody tr:hover td:nth-child(1),
#lm-grid-table tbody tr:hover td:nth-child(2),
#lm-grid-table tbody tr:hover td:nth-child(3),
#lm-grid-table tbody tr:hover td:nth-child(4),
#lm-grid-table tbody tr:hover td:nth-child(5) {
    background-color: #f8fafc !important;
}

/* Selected Row State for Frozen Columns */
#lm-grid-table tbody tr.er09-row-selected td:nth-child(1),
#lm-grid-table tbody tr.er09-row-selected td:nth-child(2),
#lm-grid-table tbody tr.er09-row-selected td:nth-child(3),
#lm-grid-table tbody tr.er09-row-selected td:nth-child(4),
#lm-grid-table tbody tr.er09-row-selected td:nth-child(5) {
    background-color: #fef3c7 !important;
}

/* Total Footer Row Frozen Cells */
#lm-grid-table tfoot td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 25 !important;
    background-color: #f1f5f9 !important;
}

/* ===============================================================
   SMART GRAPHICAL ORDER TIMELINE (HORIZONTAL & VERTICAL MILESTONE TRACKER)
   =============================================================== */
.otl-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.9rem 1.15rem 1.1rem 1.15rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-top: 0.25rem;
    transition: all 0.2s ease;
}

.otl-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.65rem;
    margin-bottom: 0.75rem;
    border-bottom: 1.5px solid #f1f5f9;
    gap: 12px;
    flex-wrap: wrap;
}

.otl-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.otl-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.otl-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #e0f2fe;
    color: #0369a1;
}

.otl-title-text {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0369a1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

.otl-order-ref-pill {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    font-family: monospace;
}

.otl-order-metric-pill {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.otl-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.otl-progress-pill {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-otl-toggle {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-otl-toggle:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-otl-action {
    background: #0284c7;
    border: 1px solid #0369a1;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-otl-action:hover {
    background: #0369a1;
}

/* Horizontal Timeline Track & Nodes */
.otl-horizontal-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 1.25rem 0.75rem 1.15rem 0.75rem;
    box-sizing: border-box;
}

.otl-horizontal-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    min-width: 1160px;
    padding: 0 70px;
    box-sizing: border-box;
}

.otl-track-bg-line {
    position: absolute;
    top: 22px;
    left: 92px;
    right: 92px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    z-index: 1;
}

.otl-track-progress-line {
    position: absolute;
    top: 22px;
    left: 92px;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    border-radius: 4px;
    z-index: 2;
    transition: width 0.35s ease;
}

.otl-h-node {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 135px;
    cursor: pointer;
    transition: transform 0.15s ease;
    word-break: break-word;
}

.otl-h-node:hover {
    transform: translateY(-2px);
}

.otl-node-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.otl-h-node.completed .otl-node-circle {
    border: 3px solid #10b981;
    color: #10b981;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.otl-h-node.active .otl-node-circle {
    border: 3px solid #2563eb;
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.25);
    animation: otlPulse 2s infinite;
}

.otl-h-node.pending .otl-node-circle {
    border: 2px solid #94a3b8;
    color: #94a3b8;
    background: #ffffff;
}

@keyframes otlPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.otl-step-num-pill {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.otl-h-node.completed .otl-step-num-pill { background: #dcfce7; color: #15803d; }
.otl-h-node.active .otl-step-num-pill { background: #dbeafe; color: #1d4ed8; }
.otl-h-node.pending .otl-step-num-pill { background: #f1f5f9; color: #64748b; }

.otl-node-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 4px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.otl-h-node.completed .otl-node-title { color: #047857; }
.otl-h-node.active .otl-node-title { color: #1d4ed8; }
.otl-h-node.pending .otl-node-title { color: #334155; }

.otl-node-meta {
    font-size: 0.66rem;
    color: #64748b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.otl-node-desc {
    font-size: 0.68rem;
    color: #475569;
    line-height: 1.35;
    margin-bottom: 6px;
    min-height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.otl-node-status-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
}

.otl-node-status-badge.completed { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.otl-node-status-badge.active { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.otl-node-status-badge.pending { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* Vertical Flow View (Exact replica of Ref Image 1) */
.otl-vertical-wrap {
    padding: 0.75rem 1.25rem;
    max-width: 620px;
}

.otl-v-list {
    position: relative;
    padding-left: 28px;
}

.otl-v-line {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 9px;
    width: 2px;
    background: #cbd5e1;
    z-index: 1;
}

.otl-v-step {
    position: relative;
    padding-bottom: 1.35rem;
    z-index: 2;
}

.otl-v-step:last-child {
    padding-bottom: 0;
}

.otl-v-dot {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.otl-v-step.completed .otl-v-dot {
    border: 3px solid #10b981;
}

.otl-v-step.completed .otl-v-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.otl-v-step.pending .otl-v-dot {
    border: 2.5px solid #94a3b8;
}

.otl-v-step.pending .otl-v-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

.otl-v-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 2px;
}

.otl-v-step.completed .otl-v-title {
    color: #0f172a;
}

.otl-v-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 3px;
}

.otl-v-meta span.actor {
    color: #475569;
    font-weight: 500;
}

.otl-v-desc {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.35;
}

/* ==========================================================================
   SPRINT ER-23: YEAR-WISE & EMPLOYEE-WISE CALL INTELLIGENCE STYLES
   ========================================================================== */

.call-intelligence-suite-section {
    margin-top: 1.5rem;
    margin-bottom: 2.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.ci-header-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1.25rem 1.5rem;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid #334155;
}

.ci-header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.ci-header-subtitle {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.ci-year-selector-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ci-year-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

.ci-year-btn {
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.ci-year-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.ci-year-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.4);
}

.ci-toolbar-strip {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ci-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

.ci-search-input {
    border: none;
    outline: none;
    font-size: 0.78rem;
    color: #1e293b;
    width: 220px;
}

.ci-action-btn {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.ci-action-btn.excel {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.ci-action-btn.excel:hover {
    background: #d1fae5;
}

.ci-action-btn.csv {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.ci-action-btn.csv:hover {
    background: #dbeafe;
}

.ci-action-btn.refresh {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.ci-action-btn.refresh:hover {
    background: #e2e8f0;
}

/* Sub-card Sections */
.ci-subcard {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.ci-subcard:last-child {
    border-bottom: none;
}

.ci-subcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ci-subcard-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.ci-table-scroll-container {
    max-height: 540px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.ci-matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
    text-align: left;
}

.ci-matrix-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 0.6rem 0.65rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 20;
    user-select: none;
    cursor: pointer;
}

.ci-matrix-table thead th:hover {
    color: #0284c7;
    background: #f1f5f9;
}

.ci-matrix-table tbody td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    white-space: nowrap;
}

.ci-matrix-table tbody tr:hover td {
    background: #f8fafc;
}

.ci-sticky-col-emp {
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 10;
    font-weight: 700;
    border-right: 1px solid #e2e8f0 !important;
}

.ci-matrix-table thead th.ci-sticky-col-emp {
    z-index: 30;
    background: #f8fafc;
}

.ci-sticky-col-total {
    position: sticky;
    right: 0;
    background: inherit;
    z-index: 10;
    font-weight: 800;
    border-left: 1px solid #e2e8f0 !important;
    text-align: right;
}

.ci-matrix-table thead th.ci-sticky-col-total {
    z-index: 30;
    background: #f8fafc;
}

.ci-matrix-table tbody tr:hover .ci-sticky-col-emp,
.ci-matrix-table tbody tr:hover .ci-sticky-col-total {
    background: #f8fafc;
}

.ci-cell-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.74rem;
}

.ci-cell-badge.has-calls {
    background: #eff6ff;
    color: #1d4ed8;
}

.ci-cell-badge.has-leads {
    background: #f5f3ff;
    color: #6d28d9;
}

.ci-cell-zero {
    color: #cbd5e1;
    font-weight: 400;
}

.ci-grand-total-row td {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border-top: 2px solid #cbd5e1 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    position: sticky;
    bottom: 0;
    z-index: 15;
}

.ci-grand-total-row td.ci-sticky-col-emp,
.ci-grand-total-row td.ci-sticky-col-total {
    z-index: 25;
}

/* Hourly Summary Cards Bar */
.ci-hourly-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.ci-kpi-mini-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}

.ci-kpi-mini-title {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ci-kpi-mini-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.2rem;
}

/* Graphical Analytics Grid */
.ci-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.ci-chart-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.ci-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ci-chart-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ci-chart-svg-container {
    width: 100%;
    min-height: 220px;
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ci-chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: #64748b;
}

.ci-legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ci-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .ci-charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ci-header-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .ci-year-selector-bar {
        width: 100%;
        overflow-x: auto;
        padding: 0.4rem;
        -webkit-overflow-scrolling: touch;
    }
    .ci-toolbar-strip {
        flex-direction: column;
        align-items: stretch;
    }
    .ci-search-input {
        width: 100%;
    }
    .ci-hourly-kpi-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}



