/* Bahon Connect v3.5.7 — Enterprise Compact UI
   Presentation-only layer. No workflow, permission, API or data behavior. */

body.enterprise-compact {
  --ec-topbar-h: 58px;
  --ec-footer-h: 40px;
  --ec-sidebar-w: 286px;
  --ec-radius: 8px;
  --ec-radius-sm: 5px;
  --ec-control-h: 34px;
  --ec-control-h-sm: 29px;
  --ec-font: 13px;
  --ec-label: 11.5px;
  --ec-muted: #66788a;
  --ec-border: #d9e1e8;
  --ec-soft: #f6f8fa;
  --ec-surface: #fff;
  --ec-heading: #17324d;
  --topbar-height: var(--ec-topbar-h);
  --footer-height: var(--ec-footer-h);
  --sidebar-width: var(--ec-sidebar-w);
  font-size: var(--ec-font);
  line-height: 1.38;
  letter-spacing: 0;
}

/* ---------- Application shell ---------- */
body.enterprise-compact .app-topbar {
  min-height: var(--ec-topbar-h);
  padding: 6px 16px;
  gap: 14px;
}
body.enterprise-compact .menu-toggle {
  width: 38px;
  height: 38px;
  gap: 4px;
  border-radius: 8px;
}
body.enterprise-compact .menu-toggle span { width: 18px; }
body.enterprise-compact .topbar-left { gap: 10px; }
body.enterprise-compact .topbar-brand { gap: 8px; }
body.enterprise-compact .topbar-brand img { width: 38px; height: 38px; }
body.enterprise-compact .topbar-brand strong { font-size: 16px; }
body.enterprise-compact .topbar-brand small { font-size: 10px; }
body.enterprise-compact .topbar-user-name { max-width: 220px; font-size: 13px; }
body.enterprise-compact .topbar-user-role { font-size: 10.5px; }

body.enterprise-compact .app-main {
  max-width: 1680px;
  padding: 14px 16px 26px;
}
body.enterprise-compact .flash-stack { margin-bottom: 8px; }
body.enterprise-compact .flash-stack .alert {
  margin-bottom: 7px;
  padding: 7px 38px 7px 10px;
  border-radius: 6px;
  font-size: 12px;
}

body.enterprise-compact .app-footer {
  min-height: var(--ec-footer-h);
  padding: 5px 14px;
  font-size: 10.5px;
}
body.enterprise-compact .footer-right { gap: 5px; }
body.enterprise-compact .footer-right a,
body.enterprise-compact .footer-right .app-version {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
}

/* ---------- Sidebar ---------- */
body.enterprise-compact .app-sidebar {
  width: min(var(--ec-sidebar-w), 92vw);
}
body.enterprise-compact .sidebar-header {
  min-height: 68px;
  padding: 11px 13px;
}
body.enterprise-compact .sidebar-user-name { font-size: 14px; }
body.enterprise-compact .sidebar-user-meta { margin-top: 2px; font-size: 10.5px; }
body.enterprise-compact .sidebar-close {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  font-size: 21px;
}
body.enterprise-compact .sidebar-nav { padding: 7px 8px 9px; }
body.enterprise-compact .nav-tree-level-1 {
  min-height: 38px;
  padding: 0.43rem 0.52rem;
  font-size: 0.82rem;
}
body.enterprise-compact .nav-tree-level-2 {
  min-height: 34px;
  padding: 0.37rem 0.48rem;
  font-size: 0.78rem;
}
body.enterprise-compact .sidebar-link {
  min-height: 32px;
  margin: 1px 0;
  padding: 6px 8px;
  gap: 8px;
  border-radius: 6px;
  font-size: 0.76rem;
}
body.enterprise-compact .nav-tree-icon,
body.enterprise-compact .sidebar-icon {
  width: 1.35rem;
  min-width: 1.35rem;
  height: 1.35rem;
  flex-basis: 1.35rem;
  border-radius: 0.38rem;
}
body.enterprise-compact .nav-tree-level-1 > .app-nav-icon {
  width: 1.45rem;
  min-width: 1.45rem;
  height: 1.45rem;
  flex-basis: 1.45rem;
}
body.enterprise-compact .app-nav-icon svg { width: .88rem; height: .88rem; }
body.enterprise-compact .nav-tree-label,
body.enterprise-compact .nav-tree-link > span:last-child {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
}
body.enterprise-compact .nav-tree-caret { margin-left: auto; }
body.enterprise-compact .nav-tree-page-list,
body.enterprise-compact .nav-tree-top-page-list { padding-block: 2px; }
body.enterprise-compact .sidebar-footer { padding: 6px 8px 9px; }
body.enterprise-compact .nav-tree-badge { font-size: 9px; padding: 2px 5px; }

/* ---------- Typography ---------- */
body.enterprise-compact .app-main h1 {
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  line-height: 1.14;
  letter-spacing: -.015em;
}
body.enterprise-compact .app-main h2 { font-size: 1rem; line-height: 1.22; }
body.enterprise-compact .app-main h3 { font-size: .9rem; line-height: 1.24; }
body.enterprise-compact .app-main p { line-height: 1.4; }
body.enterprise-compact small,
body.enterprise-compact .small { font-size: 10.5px; }
body.enterprise-compact .text-muted { color: var(--ec-muted) !important; }

/* ---------- Common controls ---------- */
body.enterprise-compact .btn {
  min-height: var(--ec-control-h);
  padding: .37rem .68rem;
  border-radius: 5px;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.15;
}
body.enterprise-compact .btn-sm {
  min-height: var(--ec-control-h-sm);
  padding: .28rem .52rem;
  font-size: .72rem;
}
body.enterprise-compact .btn-lg {
  min-height: 38px;
  padding: .45rem .8rem;
  font-size: .84rem;
}
body.enterprise-compact .form-label,
body.enterprise-compact label:not(.form-check-label) {
  margin-bottom: .23rem;
  font-size: var(--ec-label);
  font-weight: 650;
  line-height: 1.25;
}
body.enterprise-compact .form-control,
body.enterprise-compact .form-select {
  min-height: var(--ec-control-h);
  padding: .38rem .58rem;
  border-radius: 5px;
  font-size: .78rem;
  line-height: 1.25;
}
body.enterprise-compact textarea.form-control { min-height: 72px; }
body.enterprise-compact .form-check { min-height: 1.25rem; margin-bottom: .25rem; }
body.enterprise-compact .form-check-input { margin-top: .12rem; }
body.enterprise-compact .input-group-text { padding: .36rem .55rem; font-size: .76rem; }
body.enterprise-compact .form-text { margin-top: .2rem; font-size: 10px; color: var(--ec-muted); }

/* ---------- Cards, panels and alerts ---------- */
body.enterprise-compact .card {
  border-radius: var(--ec-radius);
}
body.enterprise-compact .card-header { padding: .62rem .75rem; }
body.enterprise-compact .card-body { padding: .75rem; }
body.enterprise-compact .card-footer { padding: .55rem .75rem; }
body.enterprise-compact .alert {
  padding: .62rem .75rem;
  border-radius: 6px;
  font-size: .76rem;
}
body.enterprise-compact .badge {
  padding: .27em .52em;
  border-radius: 999px;
  font-size: .66rem;
  line-height: 1.2;
}
body.enterprise-compact .modal-content { border-radius: 10px; }
body.enterprise-compact .modal-header { padding: .7rem .85rem; }
body.enterprise-compact .modal-body { padding: .8rem .85rem; }
body.enterprise-compact .modal-footer { padding: .6rem .85rem; gap: 6px; }
body.enterprise-compact .modal-title { font-size: .98rem; }

/* ---------- Enterprise tables ---------- */
body.enterprise-compact .table-responsive,
body.enterprise-compact .fr-table-wrap,
body.enterprise-compact .sd-table-wrap,
body.enterprise-compact .bi-table-wrap {
  border-radius: 6px;
  scrollbar-width: thin;
}
body.enterprise-compact .table,
body.enterprise-compact .fr-table,
body.enterprise-compact .sd-table,
body.enterprise-compact .bi-table {
  margin-bottom: 0;
  font-size: .75rem;
  line-height: 1.3;
}
body.enterprise-compact .table > :not(caption) > * > *,
body.enterprise-compact .fr-table th,
body.enterprise-compact .fr-table td,
body.enterprise-compact .sd-table th,
body.enterprise-compact .sd-table td,
body.enterprise-compact .bi-table th,
body.enterprise-compact .bi-table td {
  padding: .46rem .56rem;
  vertical-align: middle;
}
body.enterprise-compact .table th,
body.enterprise-compact .fr-table th,
body.enterprise-compact .sd-table th,
body.enterprise-compact .bi-table th {
  font-size: .66rem;
  letter-spacing: .025em;
  font-weight: 750;
  white-space: nowrap;
}
body.enterprise-compact .table .btn,
body.enterprise-compact .fr-table .btn,
body.enterprise-compact .sd-table .btn,
body.enterprise-compact .bi-table .btn {
  min-height: 27px;
  padding: .22rem .46rem;
  font-size: .68rem;
}
body.enterprise-compact .table td .badge,
body.enterprise-compact .fr-table td .badge { white-space: nowrap; }

/* ---------- Feasibility / Planning ---------- */
body.enterprise-compact .feasibility-shell {
  max-width: 1600px;
  padding: .72rem .85rem 1rem;
  font-size: .8rem;
}
body.enterprise-compact .feasibility-header {
  min-height: 50px;
  margin-bottom: .55rem;
  gap: .7rem;
}
body.enterprise-compact .feasibility-title { font-size: clamp(1.35rem, 1.8vw, 1.7rem); }
body.enterprise-compact .feasibility-subtitle {
  max-width: 78ch;
  margin-top: .16rem;
  font-size: .76rem;
  line-height: 1.28;
}
body.enterprise-compact .feasibility-card {
  margin-bottom: .6rem;
  padding: .7rem;
  border-radius: 6px;
}
body.enterprise-compact .feasibility-card h2 {
  margin-bottom: .55rem;
  padding-bottom: .42rem;
  font-size: .9rem;
}
body.enterprise-compact .fr-grid { gap: .55rem; }
body.enterprise-compact .fr-field label { margin-bottom: .2rem; font-size: .7rem; }
body.enterprise-compact .fr-field input,
body.enterprise-compact .fr-field select,
body.enterprise-compact .fr-field textarea,
body.enterprise-compact .cost-table input,
body.enterprise-compact .cost-table select {
  min-height: 33px;
  padding: .34rem .5rem;
  font-size: .76rem;
}
body.enterprise-compact .fr-field textarea { min-height: 70px; }
body.enterprise-compact .fr-help { font-size: 10px; line-height: 1.25; }
body.enterprise-compact .fr-summary-grid { gap: .45rem; }
body.enterprise-compact .fr-summary-item { padding: .58rem .65rem; min-height: 0; }
body.enterprise-compact .fr-summary-item small { font-size: 9.8px; }
body.enterprise-compact .fr-summary-item strong { font-size: .79rem; }
body.enterprise-compact .fr-actions { gap: .4rem; }
body.enterprise-compact .fr-status { min-height: 20px; padding: .14rem .42rem; font-size: .63rem; }

/* ---------- Service Delivery / Implementation ---------- */
body.enterprise-compact .sd-page {
  max-width: 1600px;
  padding: 12px 14px;
}
body.enterprise-compact .sd-page-header {
  margin-bottom: 10px;
  gap: 10px;
}
body.enterprise-compact .sd-page-header h1 { margin-bottom: 2px; font-size: 22px; }
body.enterprise-compact .sd-page-header p {
  max-width: 78ch;
  font-size: 11px;
  line-height: 1.28;
}
body.enterprise-compact .sd-card {
  padding: 11px 12px;
  margin-bottom: 10px;
  border-radius: 7px;
}
body.enterprise-compact .sd-card-title,
body.enterprise-compact .sd-section-title {
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 9px;
}
body.enterprise-compact .sd-card-title h2,
body.enterprise-compact .sd-section-title h2 { font-size: 14px; }
body.enterprise-compact .sd-card-title span,
body.enterprise-compact .sd-section-title span,
body.enterprise-compact .sd-help {
  max-width: 62ch;
  font-size: 9.8px;
  line-height: 1.25;
}
body.enterprise-compact .sd-grid { gap: 8px; }
body.enterprise-compact .sd-filter-grid { gap: 8px; }
body.enterprise-compact .sd-filter-grid label,
body.enterprise-compact .sd-field label { margin-bottom: 3px; font-size: 10.5px; }
body.enterprise-compact .sd-filter-grid input,
body.enterprise-compact .sd-filter-grid select,
body.enterprise-compact .sd-field input,
body.enterprise-compact .sd-field select,
body.enterprise-compact .sd-field textarea,
body.enterprise-compact .sd-authority-config input,
body.enterprise-compact .sd-authority-config select {
  min-height: 33px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
}
body.enterprise-compact .sd-field textarea { min-height: 68px; }
body.enterprise-compact .sd-summary-grid { gap: 6px; }
body.enterprise-compact .sd-summary-grid > div { padding: 7px 8px; }
body.enterprise-compact .sd-summary-grid small { font-size: 9px; }
body.enterprise-compact .sd-summary-grid strong { font-size: 11px; }
body.enterprise-compact .sd-status { padding: 3px 7px; font-size: 9.5px; }
body.enterprise-compact .sd-progress-grid { gap: 7px; }
body.enterprise-compact .sd-progress-grid > div,
body.enterprise-compact .sd-assignment-card { padding: 9px; border-radius: 7px; gap: 4px; }
body.enterprise-compact .sd-alert { gap: 8px; padding: 8px 10px; margin-bottom: 9px; }
body.enterprise-compact .sd-note { margin-top: 8px; padding: 7px 9px; font-size: 11px; }
body.enterprise-compact .sd-empty { padding: 14px; }
body.enterprise-compact .sd-sticky-actions { gap: 6px; padding: 7px; border-radius: 7px; }
body.enterprise-compact .sd-user-option { gap: 7px; padding: 6px 7px; }
body.enterprise-compact .sd-user-option strong { font-size: 11px; }
body.enterprise-compact .sd-user-option small { font-size: 9.5px; }
body.enterprise-compact .sd-assignee-row { padding: 6px 8px; }

/* ---------- Business Intelligence ---------- */
body.enterprise-compact .bi-page { max-width: 1600px; padding: 12px 14px; }
body.enterprise-compact .bi-header { gap: 10px; margin-bottom: 8px; }
body.enterprise-compact .bi-header h1 { margin-bottom: 2px; font-size: 22px; }
body.enterprise-compact .bi-header p { max-width: 80ch; font-size: 11px; line-height: 1.28; }
body.enterprise-compact .bi-scope { padding: 4px 8px; font-size: 10px; }
body.enterprise-compact .bi-tabs { gap: 4px; margin-bottom: 8px; }
body.enterprise-compact .bi-tab { min-height: 30px; padding: 5px 8px; font-size: 10.5px; }
body.enterprise-compact .bi-filter-card { padding: 9px; margin-bottom: 9px; }
body.enterprise-compact .bi-filter-grid { gap: 6px; }
body.enterprise-compact .bi-field label { margin-bottom: 2px; font-size: 9.7px; }
body.enterprise-compact .bi-field input,
body.enterprise-compact .bi-field select { min-height: 32px; padding: 5px 7px; font-size: 11px; }
body.enterprise-compact .bi-filter-actions .btn { min-height: 32px; font-size: 10.5px; }
body.enterprise-compact .bi-kpi-grid { gap: 7px; margin-bottom: 9px; }
body.enterprise-compact .bi-kpi { min-height: 84px; padding: 9px 10px; }
body.enterprise-compact .bi-kpi span { font-size: 9px; }
body.enterprise-compact .bi-kpi strong { margin: auto 0 3px; font-size: 20px; }
body.enterprise-compact .bi-kpi small { font-size: 9.5px; }
body.enterprise-compact .bi-two-col,
body.enterprise-compact .bi-sla-grid { gap: 9px; margin-bottom: 9px; }
body.enterprise-compact .bi-card { padding: 10px; margin-bottom: 9px; }
body.enterprise-compact .bi-section-title { padding-bottom: 6px; margin-bottom: 8px; }
body.enterprise-compact .bi-section-title h2 { font-size: 14px; }
body.enterprise-compact .bi-stage-grid { gap: 7px; }
body.enterprise-compact .bi-stage-card { padding: 8px; }
body.enterprise-compact .bi-stage-card strong { font-size: 18px; }
body.enterprise-compact .bi-sla-values { gap: 6px; }
body.enterprise-compact .bi-sla-values > div { padding: 7px; }
body.enterprise-compact .bi-quality-summary { gap: 7px; margin-bottom: 9px; }
body.enterprise-compact .bi-quality-summary > div { gap: 7px; padding: 8px 10px; }
body.enterprise-compact .bi-quality-summary strong { font-size: 20px; }
body.enterprise-compact .bi-quality-summary span { font-size: 10.5px; }
body.enterprise-compact .bi-quality-list { gap: 6px; }
body.enterprise-compact .bi-quality-item { gap: 7px; padding: 7px 8px; }
body.enterprise-compact .bi-quality-item p { font-size: 9.5px; line-height: 1.25; }
body.enterprise-compact .bi-health { min-width: 54px; padding: 3px 6px; font-size: 9px; }

/* ---------- Grouped RBAC ---------- */
body.enterprise-compact .lp-page { max-width: 1600px; padding: 12px 14px; }
body.enterprise-compact .lp-header { gap: 10px; margin-bottom: 9px; }
body.enterprise-compact .lp-header h1 { margin-bottom: 2px; font-size: 22px; }
body.enterprise-compact .lp-header p { max-width: 78ch; font-size: 11px; line-height: 1.28; }
body.enterprise-compact .lp-card { padding: 10px; margin-bottom: 9px; border-radius: 7px; }
body.enterprise-compact .lp-note { padding: 7px 9px; margin-bottom: 8px; font-size: 10.5px; }
body.enterprise-compact .lp-toolbar { gap: 8px; }
body.enterprise-compact .lp-field label { margin-bottom: 3px; font-size: 10.5px; }
body.enterprise-compact .lp-field input { min-height: 33px; padding: 6px 8px; font-size: 11.5px; }
body.enterprise-compact .lp-toolbar-meta { padding-bottom: 7px; font-size: 10px; }
body.enterprise-compact .lp-user { margin-bottom: 7px; border-radius: 7px; }
body.enterprise-compact .lp-user > summary { padding: 8px 10px; gap: 8px; }
body.enterprise-compact .lp-user-name strong { font-size: 12px; }
body.enterprise-compact .lp-user-name span,
body.enterprise-compact .lp-user-meta { font-size: 9.5px; }
body.enterprise-compact .lp-user-role,
body.enterprise-compact .lp-access-badge,
body.enterprise-compact .lp-tag,
body.enterprise-compact .lp-state { padding: 2px 6px; font-size: 8.5px; }
body.enterprise-compact .lp-user-body { padding: 9px; }
body.enterprise-compact .lp-grant-bar { padding: 7px 9px; margin-bottom: 8px; }
body.enterprise-compact .lp-groups { gap: 8px; }
body.enterprise-compact .lp-group { border-radius: 7px; }
body.enterprise-compact .lp-group-head { padding: 7px 9px; }
body.enterprise-compact .lp-group-title h3 { font-size: 12px; }
body.enterprise-compact .lp-group-head p { margin-top: 2px; font-size: 9.3px; line-height: 1.25; }
body.enterprise-compact .lp-permission-item { gap: 7px; padding: 7px 9px; }
body.enterprise-compact .lp-permission-copy strong { font-size: 10.7px; }
body.enterprise-compact .lp-permission-copy small { margin-top: 1px; font-size: 9px; line-height: 1.25; }
body.enterprise-compact .lp-actions { gap: 6px; margin-top: 8px; padding-top: 8px; }

/* ---------- Roster / legacy admin ---------- */
body.enterprise-compact .roster-panel { margin-bottom: 10px; border-radius: 8px; }
body.enterprise-compact .roster-panel .card-body { padding: 10px; }
body.enterprise-compact .directory-summary { gap: 10px; padding: 9px 11px; }
body.enterprise-compact .directory-summary strong { font-size: 20px; }
body.enterprise-compact .workflow-notice,
body.enterprise-compact .access-summary-strip { padding: 9px 11px; }
body.enterprise-compact .workflow-timeline { gap: 7px; }
body.enterprise-compact .workflow-timeline > div { padding: 8px; border-radius: 7px; }
body.enterprise-compact .access-permission-grid { gap: 8px; }
body.enterprise-compact .access-permission-card { column-gap: 7px; padding: 9px; border-radius: 8px; }
body.enterprise-compact .access-filter-grid { gap: 7px; margin-top: 9px; }

/* ---------- Compact utility behavior ---------- */
body.enterprise-compact .mb-4 { margin-bottom: .75rem !important; }
body.enterprise-compact .mt-4 { margin-top: .75rem !important; }
body.enterprise-compact .mb-3 { margin-bottom: .55rem !important; }
body.enterprise-compact .mt-3 { margin-top: .55rem !important; }
body.enterprise-compact .mb-2 { margin-bottom: .35rem !important; }
body.enterprise-compact .mt-2 { margin-top: .35rem !important; }
body.enterprise-compact .py-4 { padding-top: .8rem !important; padding-bottom: .8rem !important; }
body.enterprise-compact .gap-2 { gap: .4rem !important; }
body.enterprise-compact .gap-3 { gap: .6rem !important; }

/* Keep critical validation and workflow text fully visible. */
body.enterprise-compact .alert,
body.enterprise-compact .sd-alert,
body.enterprise-compact .sd-note,
body.enterprise-compact .lp-note,
body.enterprise-compact .validation-feedback,
body.enterprise-compact .invalid-feedback,
body.enterprise-compact .fr-help {
  text-overflow: clip;
  white-space: normal;
  overflow: visible;
}

/* Responsive: compact by layout, not by unreadably shrinking text. */
@media (max-width: 1100px) {
  body.enterprise-compact { --ec-sidebar-w: 282px; }
  body.enterprise-compact .app-main { padding-inline: 12px; }
  body.enterprise-compact .sd-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  body.enterprise-compact {
    --ec-topbar-h: 54px;
    --ec-footer-h: 38px;
    font-size: 12.5px;
  }
  body.enterprise-compact .app-topbar { padding: 5px 10px; }
  body.enterprise-compact .topbar-brand img { width: 34px; height: 34px; }
  body.enterprise-compact .topbar-brand strong { font-size: 14px; }
  body.enterprise-compact .topbar-brand small { display: none; }
  body.enterprise-compact .topbar-user-name { max-width: 145px; font-size: 11.5px; }
  body.enterprise-compact .app-main { padding: 9px 8px 22px; }
  body.enterprise-compact .app-footer { padding-inline: 8px; }
  body.enterprise-compact .footer-right a { display: none; }
  body.enterprise-compact .sd-page,
  body.enterprise-compact .bi-page,
  body.enterprise-compact .lp-page,
  body.enterprise-compact .feasibility-shell { padding: 8px; }
  body.enterprise-compact .sd-page-header h1,
  body.enterprise-compact .bi-header h1,
  body.enterprise-compact .lp-header h1 { font-size: 19px; }
  body.enterprise-compact .sd-card-title,
  body.enterprise-compact .sd-section-title { align-items: flex-start; flex-direction: column; }
  body.enterprise-compact .sd-summary-grid { grid-template-columns: 1fr 1fr; }
  body.enterprise-compact .table-responsive,
  body.enterprise-compact .fr-table-wrap,
  body.enterprise-compact .sd-table-wrap,
  body.enterprise-compact .bi-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 520px) {
  body.enterprise-compact .sd-summary-grid { grid-template-columns: 1fr; }
  body.enterprise-compact .btn { min-height: 33px; }
  body.enterprise-compact .app-main h1 { font-size: 1.35rem; }
}

/* Legacy O&M shell uses the same compact rhythm while retaining its visual identity. */
body.enterprise-compact.legacy-onm-shell .topbar { height: 58px; padding: 0 14px; }
body.enterprise-compact.legacy-onm-shell .topbar .brand { font-size: 20px; }
body.enterprise-compact.legacy-onm-shell .topbar .navbtn { padding: 5px 9px; font-size: 12px; }
body.enterprise-compact.legacy-onm-shell .topbar .role { font-size: 13px; }

/* ---------- Home / dashboard cards ---------- */
body.enterprise-compact .home-hero { margin-bottom: 10px; }
body.enterprise-compact .home-stat-grid,
body.enterprise-compact .module-grid { gap: 8px; }
body.enterprise-compact .home-stat-card {
  min-height: 92px;
  padding: 11px 12px;
  border-radius: 9px;
}
body.enterprise-compact .home-stat-card span { font-size: 10.5px; }
body.enterprise-compact .home-stat-card strong { margin: auto 0 3px; font-size: 27px; }
body.enterprise-compact .home-stat-card small { font-size: 9.5px; line-height: 1.25; }
body.enterprise-compact .module-card {
  min-height: 72px;
  padding: 11px 12px;
  border-radius: 9px;
  justify-content: center;
}
body.enterprise-compact .module-card:hover { transform: translateY(-1px); }
body.enterprise-compact .module-card strong { font-size: 13px; }
/* Home navigation cards already communicate destination by title; hide repeated prose. */
body.enterprise-compact .module-card > span { display: none; }

/* ---------- Public login / landing ---------- */
body.public-login-page {
  --login-header-height: 70px;
  --login-footer-height: 40px;
}
body.public-login-page .app-topbar,
body.public-landing-page .app-topbar { padding-inline: 16px; }
body.public-login-page .topbar-brand img {
  width: 66px;
  height: 66px;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

body.public-landing-page .topbar-brand img {
  width: 40px;
  height: 40px;
}
body.public-login-page .topbar-brand strong {
  font-size: 18px;
}

body.public-landing-page .topbar-brand strong {
  font-size: 16px;
}
body.public-login-page .topbar-brand small,
body.public-landing-page .topbar-brand small { font-size: 10px; }
body.public-login-page .auth-shell {
  gap: clamp(24px, 4vw, 70px);
  padding-block: clamp(14px, 2vh, 24px);
}
body.public-login-page .auth-intro h1 {
  font-size: clamp(2.6rem, min(4.4vw, 6.8vh), 4.6rem);
}
body.public-login-page .auth-intro p {
  margin-top: clamp(10px, 1.4vh, 16px);
  font-size: clamp(.9rem, min(1.05vw, 1.7vh), 1.08rem);
  line-height: 1.45;
}
body.public-login-page .auth-card {
  width: min(100%, 510px);
  padding: clamp(18px, min(2.3vw, 3vh), 30px);
  border-radius: 16px;
}
body.public-login-page .auth-card-header { margin-bottom: 15px; }
body.public-login-page .auth-card-header h2 { font-size: clamp(1.4rem, 1.65vw, 1.8rem); }
body.public-login-page .auth-card .form-control { min-height: 42px; }
body.public-login-page .auth-card .btn-lg { min-height: 42px; }

body.public-landing-page {
  --public-header-height: 70px;
  --public-footer-height: 40px;
}
body.public-landing-page .landing-hero {
  gap: clamp(16px, 1.7vw, 26px);
  padding-block: clamp(14px, 2.4vh, 28px);
}
body.public-landing-page .landing-copy h1 {
  font-size: clamp(2rem, min(4.2vw, 6.3vh), 4.4rem);
}
body.public-landing-page .landing-copy p {
  margin-top: clamp(10px, 1.5vh, 18px);
  font-size: clamp(.88rem, min(1.05vw, 1.7vh), 1.08rem);
  line-height: 1.45;
}
body.public-landing-page .landing-actions { gap: 8px; margin-top: clamp(12px, 1.8vh, 20px); }
body.public-landing-page .landing-actions .btn { min-height: 40px; font-size: .88rem; }
body.public-landing-page .landing-preview { padding: clamp(12px, 1.4vw, 18px); border-radius: 16px; }
body.public-landing-page .preview-grid > div { min-height: clamp(88px, 12vh, 118px); padding: 12px; }


/* BAHON_LOGIN_CENTER_SAFE_V2 */

/*
  Correct login positioning.

  public-main already occupies the exact available area
  between the fixed header and fixed footer.

  We center auth-shell INSIDE that area instead of
  absolutely positioning auth-shell itself.
*/

body.public-login-page .public-main {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  position: fixed !important;
  top: var(--login-header-height) !important;
  right: 0 !important;
  bottom: var(--login-footer-height) !important;
  left: 0 !important;

  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  overflow: hidden !important;
}


/* Reset the broken absolute positioning completely */
body.public-login-page .auth-shell {
  position: relative !important;

  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  inset: auto !important;

  transform: none !important;

  width: min(100%, 1540px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 100% !important;

  margin: 0 auto !important;

  padding-top: clamp(18px, 3vh, 32px) !important;
  padding-bottom: clamp(18px, 3vh, 32px) !important;
  padding-left: var(--login-page-inline) !important;
  padding-right: var(--login-page-inline) !important;

  align-items: center !important;
  overflow: visible !important;
}


/* Left message and right login card share same center */
body.public-login-page .auth-intro,
body.public-login-page .auth-card {
  align-self: center !important;
}


/* Tablet */
@media (max-width: 980px) {

  body.public-login-page .auth-shell {
    width: min(100%, 620px) !important;

    padding-left: clamp(18px, 6vw, 48px) !important;
    padding-right: clamp(18px, 6vw, 48px) !important;
  }
}


/* Mobile */
@media (max-width: 640px) {

  body.public-login-page .auth-shell {
    width: 100% !important;
    padding: 14px !important;
  }
}


/*
  Short screen / mobile keyboard safety.
  Allow scrolling instead of hiding the form.
*/
@media (max-height: 520px) {

  body.public-login-page .public-main {
    display: block !important;
    overflow-y: auto !important;
  }

  body.public-login-page .auth-shell {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;

    display: grid !important;
    align-items: center !important;

    padding-top: 14px !important;
    padding-bottom: 14px !important;

    overflow: visible !important;
  }
}

/* END_BAHON_LOGIN_CENTER_SAFE_V2 */

