
/* Milestone 3 Pass J: consolidated shared admin component rules.
   Original cascade order preserved; source section labels retained. */

/* ===== BEGIN admin-consistency.css ===== */
/* OneTeam365: admin-only Service History-aligned presentation layer.
   Loaded after legacy CSS. Does not apply to vendor or public pages.
   Shared mechanics stay opt-in; no changes to module permissions/actions. */
.ot-admin-layout {
  --ot-ui-primary:#000080;
  --ot-ui-accent:#7ce553;
  --ot-ui-text:#10233f;
  --ot-ui-border:#dce4ef;
  --ot-ui-soft:#f7f9fd;
  --ot-ui-radius:10px;
}
.ot-admin-page :is(.card,.panel,.ot-sp-panel,.ot-preview-section) {
  border-radius:var(--ot-ui-radius);
}
.ot-admin-page :is(.table-wrap,.ot-table-wrap) { overflow-x:auto; max-width:100%; }
.ot-admin-page :is(.table-wrap,.ot-table-wrap) :is(th,td) { vertical-align:middle; }
.ot-admin-page :is(.table-wrap,.ot-table-wrap) tbody tr:hover { background:rgba(124,229,83,.06); }
.ot-admin-page :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {
  box-sizing:border-box;
}
.ot-admin-page :is(input:not([type=checkbox]):not([type=radio]),select,textarea,button,a.button):focus-visible {
  outline:2px solid var(--ot-ui-primary); outline-offset:2px;
}
.ot-admin-page :is(.modal-content,.ot-sp-new-profile,.ot-status-dialog) {
  box-sizing:border-box;
}
.ot-admin-page .multi-filter button.filter-toggle {
  color:var(--ot-ui-primary)!important;
  font-weight:700!important;
  border:1px solid #cbd5e1!important;
  border-radius:var(--ot-ui-radius)!important;
  min-height:38px;
}
.ot-admin-page .multi-filter:has(input[type=checkbox]:checked) button.filter-toggle {
  background:rgba(124,229,83,.22)!important;
  border-color:#7ce553!important;
}
.ot-admin-page .multi-filter .filter-menu {
  border:1px solid var(--ot-ui-border);
  border-radius:var(--ot-ui-radius);
  box-shadow:0 12px 30px rgba(20,40,71,.16);
}
.ot-admin-page :is(.modal,.ot-modal) :is(input,select,textarea) { max-width:100%; }
.ot-admin-page :is(.badge,.status-badge) { font-weight:800; }
@media(max-width:720px) {
  .ot-admin-page :is(.table-wrap,.ot-table-wrap) { -webkit-overflow-scrolling:touch; }
  .ot-admin-page :is(.modal-content,.ot-sp-new-profile) { max-width:calc(100vw - 24px); }
}

/* ===== END admin-consistency.css ===== */

/* ===== BEGIN admin-components.css ===== */
/* Milestone 3 D: Shared administrative presentation primitives.
   Service History remains the reference; no module behavior is enabled here. */
.ot-admin-page {
  --ot-control-height: 38px;
  --ot-control-radius: 10px;
  --ot-control-border: #cbd5e1;
  --ot-control-focus: #000080;
  --ot-surface: #fff;
  --ot-hover: rgba(124,229,83,.08);
}
.ot-admin-page :is(button, input, select, textarea) { font: inherit; }
.ot-admin-page :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {
  min-height: var(--ot-control-height);
  border-radius: var(--ot-control-radius);
}
.ot-admin-page :is(button, [role=button]) { cursor:pointer; }
.ot-admin-page :is(button,[role=button]):disabled { cursor:not-allowed; opacity:.6; }
.ot-admin-page :is(.table-wrap,.ot-table-wrap) { isolation:isolate; }
.ot-admin-page :is(.table-wrap,.ot-table-wrap) table { border-collapse:separate; border-spacing:0; }
.ot-admin-page :is(.table-wrap,.ot-table-wrap) :is(th,td) { vertical-align:middle; }
.ot-admin-page :is(.modal-content,.ot-sp-new-profile,.ot-status-dialog) {
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.ot-admin-page :is(.filter-menu,.ot-filter-panel,[role=menu]) {
  box-sizing:border-box;
  max-width:calc(100vw - 24px);
}
.ot-admin-page :is(.filter-menu,.ot-filter-panel)[hidden] { display:none!important; }
.ot-admin-page :is(.ot-filter-chip,.filter-toggle)[aria-expanded=true] {
  border-color:#7ce553;
}
.ot-admin-page :is(.ot-filter-chip,.filter-toggle):focus-visible {
  outline:2px solid var(--ot-control-focus);
  outline-offset:2px;
}
@media (max-width:720px) {
  .ot-admin-page :is(.modal-content,.ot-sp-new-profile,.ot-status-dialog) { max-height:calc(100dvh - 16px); }
}

/* ===== END admin-components.css ===== */

/* ===== BEGIN inline-utilities.css ===== */
/* Milestone 3 E: narrowly extracted static inline presentation declarations.
   Kept global to preserve original reach in public and admin templates. */
.ot-input-auto-width { width:auto; }
.ot-clickable { cursor:pointer; }
.ot-no-margin { margin:0; }
.ot-align-right { text-align:right; }
.ot-text-muted { color:#63728a; }

/* ===== END inline-utilities.css ===== */

/* ===== BEGIN service-history-shared.css ===== */
/* Milestone 3 Pass F: Service History-derived common administrative surfaces.
   Scoped to the admin page; no selectors alter modal visibility, positioning,
   button actions, table selection or module-specific business rules. */
.ot-admin-page {
  --ot-sh-navy: #000080;
  --ot-sh-green: #7ce553;
  --ot-sh-line: #dce4ef;
  --ot-sh-muted: #63728a;
  --ot-sh-elevation: 0 3px 12px rgba(20,42,73,.04);
}
/* Shared page/card surfaces: match the Service History filter shell. */
.ot-admin-page :is(.card,.panel,.ot-sp-panel) {
  border-color: var(--ot-sh-line);
  box-shadow: var(--ot-sh-elevation);
}
/* Common data tables only: preserve module-specific width and sticky columns. */
.ot-admin-page :is(.table-wrap,.ot-table-wrap) table :is(th,td) {
  vertical-align: middle;
}
.ot-admin-page :is(.table-wrap,.ot-table-wrap) table tbody tr:hover {
  background-color: rgba(124,229,83,.06);
}
/* Inputs and menus: shared focus treatment, without changing behavior. */
.ot-admin-page :is(input,select,textarea,button,a,[role="button"]):focus-visible {
  outline: 2px solid var(--ot-sh-navy);
  outline-offset: 2px;
}
.ot-admin-page :is(.filter-menu,.ot-filter-panel,.ot-action-menu) {
  border-color: var(--ot-sh-line);
}
/* Modal visual shell only: no display/overflow/position changes. */
.ot-admin-page :is(.modal-content,.ot-status-dialog,.notes-modal) {
  border-radius: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .ot-admin-page :is(.ot-filter-rail,.table-wrap,.ot-table-wrap) {
    scroll-behavior: auto;
  }
}

/* ===== END service-history-shared.css ===== */

/* ===== BEGIN modal-consistency.css ===== */
/* Pass G: Service History-aligned modal surfaces across administrative modules.
   Deliberately does not alter display, z-index, widths, or overflow mechanics. */
.ot-admin-page .modal .modal-content {
  border: 1px solid #dce4ef;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(17, 32, 66, .16);
}
.ot-admin-page .modal .modal-content :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font: inherit;
  border-color: #dce4ef;
}
.ot-admin-page .modal .modal-content :is(input,select,textarea):focus-visible {
  outline: 2px solid #000080;
  outline-offset: 2px;
}
.ot-admin-page .modal .modal-content :is(.modal-close,.ot-r6-close,.ot-sp-x,.ot-close) {
  cursor: pointer;
}

/* ===== END modal-consistency.css ===== */

/* ===== BEGIN module-component-alignment.css ===== */
/* Milestone 3 Pass H: align existing module-specific surfaces to Service History.
   This file intentionally does not alter visibility, positioning, form submission,
   table column sizing, or JavaScript-controlled state. */
.ot-admin-page {
  --ot-ui-primary:#000080;
  --ot-ui-accent:#7ce553;
  --ot-ui-border:#dce4ef;
  --ot-ui-muted:#63728a;
  --ot-ui-radius:12px;
}
/* Page headings across all internal modules use the Service History type scale. */
.ot-admin-page > .ot-page-title:not([hidden]),
.ot-admin-page .ot-sp-top .ot-sp-title {
  color:var(--ot-ui-primary);
  font-family:'Segoe UI',Arial,sans-serif;
  font-size:23px;
  font-weight:800;
  line-height:1.2;
  letter-spacing:-.02em;
}
.ot-admin-page > .subtitle {color:var(--ot-ui-muted);font-size:13px;line-height:1.5}
/* Common interactive controls; preserve unique primary/secondary action colors. */
.ot-admin-page :is(.ot-sp-header-actions,.ot-filter-toolbar) input[type=search] {
  border:1px solid var(--ot-ui-border);
  border-radius:10px;
  background:#fff;
  min-height:38px;
  color:#172b4d;
}
.ot-admin-page :is(.ot-sp-header-actions,.ot-filter-toolbar) input[type=search]:focus-visible {
  border-color:var(--ot-ui-primary);
  outline:2px solid rgba(0,0,128,.18);
  outline-offset:1px;
}
/* Shared table presentation without modifying widths or sticky columns. */
.ot-admin-page :is(.table-wrap,.ot-table-wrap,.ot-sp-table-wrap) table thead th {
  font-weight:750;
  vertical-align:middle;
}
.ot-admin-page :is(.table-wrap,.ot-table-wrap,.ot-sp-table-wrap) table tbody td {
  vertical-align:middle;
}
/* Consistent modal typography and controls; existing modal mechanics remain intact. */
.ot-admin-page .modal .modal-content > :is(h2,h3):first-of-type {
  color:var(--ot-ui-primary);
  font-weight:800;
  letter-spacing:-.02em;
}
.ot-admin-page .modal .modal-content :is(input,select,textarea):focus-visible {
  border-color:var(--ot-ui-primary);
}
@media(max-width:700px){
  .ot-admin-page > .ot-page-title:not([hidden]),
  .ot-admin-page .ot-sp-top .ot-sp-title {font-size:21px}
}

/* ===== END module-component-alignment.css ===== */

/* ===== BEGIN module-patterns.css ===== */
/* Milestone 3 Pass I: component-level alignment based on actual legacy selectors.
   All rules are scoped to the internal page shell. No display/position/visibility
   or action-affecting styles are changed. */
.ot-admin-page :is(.validation-table,.ot-sp-table-wrap table) thead th {
  background: #f4f7fc;
  color: #000080;
  font-weight: 800;
  border-bottom: 1px solid #dce4ef;
}
.ot-admin-page :is(.validation-table,.ot-sp-table-wrap table) tbody td {
  border-bottom-color: #e8edf5;
  vertical-align: middle;
}
.ot-admin-page :is(.validation-table,.ot-sp-table-wrap table) tbody tr:hover {
  background-color: rgba(124,229,83,.06);
}
.ot-admin-page :is(.filter-menu,.ot-sp-map-filter-menu,.ot-sp-menu) {
  border: 1px solid #dce4ef;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17,35,65,.10);
}
.ot-admin-page :is(.multi-filter,.ot-sp-map-filter-trigger) {
  border-radius: 10px;
  font-weight: 700;
}
.ot-admin-page :is(.clear-filters-btn,.ot-sp-menu-link):focus-visible {
  outline: 2px solid #000080;
  outline-offset: 2px;
}
.ot-admin-page :is(.site-profile-modal,.notes-modal,.wide-modal) :is(input,select,textarea):focus-visible {
  border-color: #000080;
  outline: 2px solid rgba(0,0,128,.16);
  outline-offset: 1px;
}

/* ===== END module-patterns.css ===== */

/* Milestone 3 Pass K: actual module patterns used by Clients, Sites, Partners,
   Landscape Tracker and Work Orders. Restricted to the administrative layout.
   Presentation only; does not enable or alter module actions. */
.ot-admin-page :is(.card,.table-wrap,.modal-content) {
  border-color:var(--ot-ui-border,#dce4ef);
}
.ot-admin-page .card.table-wrap {
  overflow-x:auto;
  scrollbar-width:thin;
}
.ot-admin-page .card.table-wrap table { min-width:max-content; width:100%; }
.ot-admin-page :is(.table-wrap,.card.table-wrap) th {
  font-weight:750;
  letter-spacing:.015em;
  white-space:nowrap;
}
.ot-admin-page :is(.table-wrap,.card.table-wrap) td { line-height:1.45; }
.ot-admin-page .multi-filter .filter-toggle {
  display:inline-flex; align-items:center; justify-content:space-between;
  gap:8px; min-height:38px;
}
.ot-admin-page .multi-filter :is(.filter-option,.filter-search) {
  box-sizing:border-box;
}
.ot-admin-page .multi-filter .filter-option:has(input:checked) {
  background:rgba(124,229,83,.13);
}
.ot-admin-page .modal .modal-content {
  border-radius:var(--ot-ui-radius,10px);
  max-width:calc(100vw - 24px);
}
.ot-admin-page .modal .modal-header {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.ot-admin-page .modal :is(.modal-close,.ot-sp-x) {
  cursor:pointer;
}
.ot-admin-page :is(.modal,.nested-modal) :is(input,select,textarea):focus-visible {
  outline:2px solid var(--ot-ui-primary,#000080); outline-offset:2px;
}
@media(max-width:720px) {
  .ot-admin-page .modal .modal-content { max-height:calc(100dvh - 20px); }
  .ot-admin-page .modal .modal-toolbar { flex-wrap:wrap; }
}
