html{-webkit-text-size-adjust:100%}button,input:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=time]),select,textarea{touch-action:manipulation}.install-app{white-space:nowrap}.mobile-card-list{display:none}




@media(min-width:1600px){.content{max-width:none;width:100%;margin:0}}
@media(hover:none){tbody tr:hover{background:inherit}.nav-item,.btn,.create-btn{min-height:44px}}

/* === ESB UNIFIED FLUID TABLE & MOBILE APP FLOW === */
.esb-table-scroll,
.table-wrap,
.table-responsive,
.table-scroll,
.report-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.esb-table-scroll > table:not([data-esb-preserve-format]),
.table-wrap > table:not([data-esb-preserve-format]),
.table-responsive > table:not([data-esb-preserve-format]),
.report-table-wrap > table:not([data-esb-preserve-format]),
#app table.report-table,
#app table.data-table,
#app table.sb-table {
  width: 100% !important;
  max-width: 100%;
  table-layout: auto !important;
  border-collapse: collapse;
}

#app table th,
#app table td {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

#app table td.account-name,
#app table td.desc-col {
  white-space: normal;
  min-width: 180px;
}

.sidebar-toggle,
.esb-sidebar-toggle {
  z-index: 40;
}

@media (max-width: 900px) {
  #app {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  #esb-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    min-height: 60px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface, #ffffff);
    border-top: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
  }

  #esb-mobile-nav > button {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }

  /* Responsive filter & action bars without JS cloning */
  #app .report-controls,
  #app .report-filters,
  #app .filter-bar,
  #app .toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
  }

  #app .report-controls > *,
  #app .report-filters > *,
  #app .filter-bar > * {
    flex: 1 1 160px;
    min-width: 0;
  }
}

/* === GLOBAL LAYOUT & VIEWPORT UNIFICATION === */
/* 1. Unified Topbar, Title & Company Switcher Layout (Single Source of Truth) */
html body[data-auth-state="authenticated"] header.topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 48px !important;
  height: auto !important;
  max-height: none !important;
  padding: 6px 20px !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
}

html body[data-auth-state="authenticated"] header.topbar > div:first-child {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  min-width: 110px !important;
  overflow: hidden !important;
}

html body[data-auth-state="authenticated"] header.topbar #page-title,
html body[data-auth-state="authenticated"] header.topbar h1 {
  position: static !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  font-size: 19px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-auth-state="authenticated"] header.topbar .company-switcher,
html body[data-auth-state="authenticated"] header.topbar [data-company-switcher],
html body[data-auth-state="authenticated"] header.topbar label[for*="company"],
html body[data-auth-state="authenticated"] header.topbar .sb-company-wrap {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

html body[data-auth-state="authenticated"] header.topbar .top-actions {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  margin-left: auto !important;
}

html body[data-auth-state="authenticated"] header.topbar .top-actions #sb-search,
html body[data-auth-state="authenticated"] header.topbar .sb-search {
  flex: 1 1 140px !important;
  min-width: 100px !important;
  max-width: 220px !important;
}

@media (max-width: 1180px) {
  html body[data-auth-state="authenticated"] header.topbar {
    flex-wrap: wrap !important;
  }
  html body[data-auth-state="authenticated"] header.topbar > div:first-child {
    flex: 1 1 100% !important;
  }
  html body[data-auth-state="authenticated"] header.topbar .top-actions {
    flex: 1 1 100% !important;
    justify-content: flex-end !important;
  }
}

/* 2. Dashboard Money Position date & Period label spacing */
.route-dashboard .esb-pos .esb-dashboard-actions,
.route-dashboard .esb-dashboard-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px 16px !important;
}
.route-dashboard .esb-pos .esb-dash-span,
.route-dashboard .esb-dashboard-actions > span {
  position: static !important;
  margin-right: 6px !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}
.route-dashboard .esb-pos .esb-dash-period-field,
.route-dashboard .esb-dashboard-actions .esb-dash-period-field {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

/* 3. Universal checkbox & radio sizing + inline label alignment across desktop & mobile */
html body input[type="checkbox"],
html body input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 16px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  accent-color: #1d4e89;
  cursor: pointer;
}
html body .sb-period-inline:has(input[type="checkbox"]),
html body label:has(> input[type="checkbox"]),
html body label:has(> input[type="radio"]) {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  min-height: 34px !important;
  cursor: pointer;
}

/* 4. Sidebar collapse toggle clearance so it never overlaps "All reports" */
.sb-reports-page .sb-report-result > .panel-head,
.sb-reports-page .sb-report-toolbar,
.sb-reports-page .sb-report-hero {
  padding-left: 42px !important;
}
body.im-sidebar-collapsed .sb-reports-page .sb-report-result > .panel-head,
body.im-sidebar-collapsed .sb-reports-page .sb-report-toolbar,
body.im-sidebar-collapsed .sb-reports-page .sb-report-hero {
  padding-left: 42px !important;
}
@media (max-width: 900px) {
  .sb-reports-page .sb-report-result > .panel-head,
  .sb-reports-page .sb-report-toolbar,
  .sb-reports-page .sb-report-hero {
    padding-left: 14px !important;
  }
}

/* 5. Report header title width & select dropdown text truncation */
.sb-reports-page .sb-report-result > .panel-head {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px 16px !important;
}
.sb-reports-page .sb-report-result > .panel-head > :first-child {
  flex: 1 1 220px !important;
  min-width: 180px !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}
.sb-reports-page .sb-report-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
}
html body select,
html body .sb-period-inline select {
  padding-right: 30px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
/* === END GLOBAL LAYOUT & VIEWPORT UNIFICATION === */

/* === ESB TOPBAR, SUB-NAV & SPLIT WORKSPACE INTEGRITY === */
html body[data-auth-state="authenticated"] header.topbar {
  height: auto !important;
  min-height: 48px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px 12px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
html body[data-auth-state="authenticated"] header.topbar .top-actions {
  flex-wrap: wrap !important;
  gap: 6px 8px !important;
  max-width: 100% !important;
}
html body[data-auth-state="authenticated"] #app {
  padding-top: 12px !important;
}
html body[data-auth-state="authenticated"] #app .sb-emp-profile,
html body[data-auth-state="authenticated"] #app .center-detail {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: visible !important;
}
html body[data-auth-state="authenticated"] #app :is(.sb-emp-profile, .center-detail) .esb-table-scroll,
html body[data-auth-state="authenticated"] #app :is(.sb-emp-profile, .center-detail) .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}
@media (max-width: 960px) {
  html body[data-auth-state="authenticated"] #app .sb-emp-workspace-body,
  html body[data-auth-state="authenticated"] #app .center-split {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  html body[data-auth-state="authenticated"] #app .sb-emp-rail,
  html body[data-auth-state="authenticated"] #app .center-list {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 240px !important;
    overflow-y: auto !important;
  }
}

/* === UNIFIED HALF-SCREEN & MOBILE SIDEBAR DRAWER (NO #app OVERLAP) === */
@media (max-width: 1000px) {
  html body[data-auth-state="authenticated"] #sidebar:not(.open),
  html body[data-auth-state="authenticated"] aside.sidebar:not(.open) {
    transform: translateX(-105%) !important;
    pointer-events: none !important;
  }
  html body[data-auth-state="authenticated"] #sidebar.open,
  html body[data-auth-state="authenticated"] aside.sidebar.open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
    z-index: 1200 !important;
    box-shadow: 0 12px 36px rgba(11, 18, 32, 0.32) !important;
  }
  html body[data-auth-state="authenticated"] .main,
  html body[data-auth-state="authenticated"] #main,
  html body[data-auth-state="authenticated"] #app,
  html body[data-auth-state="authenticated"] header.topbar {
    margin-left: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
