/* ERP Books - additions on top of the ERP's theme */
.section-header-books h1 { font-weight: 600; color: #34395e; }
.company-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 6px; background: rgba(255,255,255,.9); color: #34395e; text-decoration: none; }
.company-chip:hover { text-decoration: none; background: #fff; }
.company-chip svg { width: 16px; height: 16px; }
.company-chip small { color: #6c757d; }
.planned-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: #ffa426; vertical-align: middle; }

.stat-card .card-body { padding: 1rem 1.25rem; }
.stat-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; }
.stat-card .value { font-size: 1.35rem; font-weight: 600; color: #34395e; }

table.report td.num, table.report th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.report tr.row-header td { background: #f4f6f9; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .03em; }
table.report tr.row-group td { background: #eef0f4; font-weight: 600; }
table.report tr.row-subtotal td { font-weight: 600; border-top: 1px solid #dee2e6; }
table.report tr.row-total td { font-weight: 700; border-top: 2px solid #34395e; background: #fbfbfd; }
table.report tr.row-muted td { color: #6c757d; }
table.report tfoot td { font-weight: 700; border-top: 2px solid #34395e; }
table.report td.neg { color: #c0392b; }
.report-cards .badge { font-size: 13px; padding: .45rem .7rem; margin: 0 .35rem .35rem 0; font-weight: 500; }
.report-filters .form-group { margin-bottom: .75rem; }
.select2-container { width: 100% !important; }
.kv th { width: 34%; color: #6c757d; font-weight: 500; }
.text-pre { white-space: pre-wrap; font-family: SFMono-Regular, Menlo, monospace; font-size: 12px; }

@media print {
    .main-sidebar, .navbar, .navbar-bg, .main-footer, .report-filters, .no-print, .dt-buttons, .dataTables_filter { display: none !important; }
    .main-content { padding: 0 !important; width: 100% !important; }
    .card { box-shadow: none !important; border: 0 !important; }
}

.company-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.company-card h5 { color: #34395e; }

/* Same as the ERP: font-awesome icons in the sidebar */
.font-awesome-icon, .font-awesome-icon-text { margin-left: -3px !important; }
.main-sidebar .sidebar-menu li a .font-awesome-icon { width: 28px; text-align: center; font-size: 15px; margin-right: 18px; }

/* Company switcher */
.company-switch .company-chip { cursor: pointer; }
.company-menu { min-width: 320px; padding-top: 0; }
.company-menu-list { max-height: 360px; overflow-y: auto; }
.company-menu .dropdown-item { padding: .5rem 1rem; font-size: 14px; }
.company-menu .dropdown-item.active { background: #f0f3ff; color: #34395e; font-weight: 600; }
.company-menu form { margin: 0; }
/* Dashboard tiles: big numbers stay on one line */
.stat-card .value { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* One look for every company: white top bar, dark text */
.navbar-bg { background: #fff !important; height: 70px !important; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.main-navbar { background: #fff !important; box-shadow: 0 1px 3px rgba(0,0,0,.06); } /* stays white when it sticks on scroll */
.main-navbar .nav-link, .main-navbar .nav-link-user, .main-navbar .nav-link-user span { color: #34395e !important; }
.main-navbar .nav-link svg { color: #34395e; stroke: #34395e; }
.company-chip { background: #f0f3ff; border: 1px solid #dfe4ff; color: #34395e; }
.company-chip:hover { background: #e6ebff; color: #34395e; }

/* Sidebar: long labels wrap onto a second line instead of overlapping the next link */
.main-sidebar .sidebar-menu li a { height: auto; min-height: 50px; }
.main-sidebar .sidebar-menu li a span { white-space: normal; line-height: 1.35; }
.main-sidebar .sidebar-menu li ul.dropdown-menu li a {
    height: auto; min-height: 35px; padding-top: 8px; padding-bottom: 8px; padding-right: 15px;
    line-height: 1.35; white-space: normal; align-items: flex-start;
}
.main-sidebar .sidebar-menu li ul.dropdown-menu li a:before { top: 9px; }
/* "Planned" marker stays a small dot (the theme stretches every span in a sidebar link to full width) */
.main-sidebar .sidebar-menu li a span.planned-dot { flex: 0 0 6px; width: 6px; height: 6px; margin: 7px 0 0 6px; }
table.report thead th.band { border-bottom: 1px solid #dee2e6; letter-spacing: .02em; }
table.report tr.row-group td:nth-child(2), table.report tr.row-subtotal td:nth-child(2) { white-space: nowrap; }
