/* ========================================================================== 
   AOG Unified Platform — UI/UX consistency layer
   Loaded last. This file contains cross-module behavior only; page-specific
   styling stays with the module that owns it.
   ========================================================================== */
body.nexus-ui{
    --brand:var(--nx-primary,#191970);
    --brand2:var(--nx-primary,#191970);
    --brand3:color-mix(in srgb,var(--nx-primary,#191970) 76%,#fff);
    --brand-bg:color-mix(in srgb,var(--nx-primary,#191970) 6%,#fff);
    --focus-ring:color-mix(in srgb,var(--nx-primary,#191970) 22%,transparent);
}

/* Consistent enterprise workspace geometry. */
.app-content{width:100%;max-width:none;margin:0 auto}
.page-heading,.card-header,.app-filter-card{min-width:0}
.card-body{min-width:0}

/* Accessible focus is deliberately visible for keyboard users. */
:where(a,button,input,select,textarea,[tabindex]):focus-visible{
    outline:3px solid var(--focus-ring)!important;
    outline-offset:2px;
}
:where(.btn,.nav-link,.dropdown-item,.search-select-button){min-height:36px}

/* Tables scroll by default instead of compressing every business column until it
   becomes decorative punctuation. Individual compact tables can still opt into
   table-layout:fixed with their module class. */
.table-responsive{
    overflow-x:auto!important;
    overscroll-behavior-inline:contain;
    scrollbar-gutter:stable;
}
table.table:not(.leads-data-table):not(.intake-pending-table):not(.report-fit-table){table-layout:auto}
.table thead th{white-space:nowrap}
.table td{line-height:1.45}

/* Dropdowns/selectors always sit above content cards. */
.search-select-menu.is-portal,.search-select-menu.is-fixed{z-index:4090!important}
.dropdown-menu{z-index:2050}

/* A status has meaning independent from brand color. */
.text-success{color:var(--ok)!important}.text-danger{color:var(--bad)!important}
.text-warning{color:var(--warn)!important}.text-info{color:#0369a1!important}
.alert-success{background:var(--ok-bg)!important;color:#166534!important}
.alert-warning{background:var(--warn-bg)!important;color:#92400e!important}
.alert-danger{background:var(--bad-bg)!important;color:#991b1b!important}

/* Forms and buttons keep the same density across custom and Bootstrap screens. */
.form-control,.form-select,.search-select-button{font-size:13px}
textarea.form-control{min-height:92px;resize:vertical}
.btn-sm{min-height:32px}
.btn-lg{min-height:44px}

/* Reduce motion for users who request it, without removing useful state changes. */
@media (prefers-reduced-motion:reduce){
    *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}

@media(max-width:991.98px){
    .app-content{padding:20px 18px 48px!important}
    .page-heading{align-items:flex-start;flex-wrap:wrap}
}
@media(max-width:768px){
    /* app.css converts ordinary tables to cards at this breakpoint. Keep menus
       visible for that card layout; explicit wide-report wrappers remain scrollable. */
    .table-responsive:not(.report-wide-responsive):not(.gud-table-wrap){overflow:visible!important}
    :where(.btn,.nav-link,.dropdown-item,.search-select-button){min-height:40px}
}
