/* File: /var/www/shared/assets/ohiomade.css */
/* Version: v2.7.6-ohiomade-shared-ui-stability-pass */
/* Last edited: 2026-04-18 20:22:00 -0400 */

/*
  OhioMade Shared UI
  ------------------------------------------------------
  Purpose:
  - Shared cross-app OhioMade design system
  - Mobile-first and iPhone-safe
  - Reusable shell/header/footer/menu/sheet/topbar/dropdown support
  - Reusable cards, buttons, chips, pills, forms, tables
  - Includes compatibility aliases for older app/page CSS
  - Stronger status visibility for dark + light themes
  - Shared topbar dropdown styling promoted from local partial experiments
  -
  Stability pass goals:
  - Keep visual output close to v2.7.5
  - Make .om-* the clear official standard
  - Keep non-.om aliases as migration compatibility only
  - Reduce risky global collisions where possible without breaking old apps
  - Normalize repeated surfaces, borders, and state styling
  -
  Notes:
  - This file is the shared foundation for OhioMade apps.
  - Keep app-specific layouts local only when truly app-specific.
  - Per-instance topbar fixes that depend on generated ids should stay inside _topbar.php.
*/

/* ======================================================
   THEME TOKENS
====================================================== */

:root{
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);

  --bg:#050814;
  --bg-soft:#0a1023;
  --panel:#0c1224;
  --panel-2:#0a0f1e;
  --card:#0f1630;

  --text:#e9eefc;
  --fg:#e9eefc;
  --muted:#a8b3d6;
  --muted-2:#7f8ab7;

  --line:#1a2a4a;
  --line-soft:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.14);

  --accent:#38bdf8;
  --accent-2:#2563eb;
  --accent-soft:rgba(56,189,248,.14);
  --accent-soft-2:rgba(56,189,248,.22);

  --ok:#4ade80;
  --ok-text:#dcfce7;
  --ok-soft:rgba(34,197,94,.16);
  --ok-border:rgba(34,197,94,.34);

  --warn:#fbbf24;
  --warn-text:#fef3c7;
  --warn-soft:rgba(245,158,11,.18);
  --warn-border:rgba(245,158,11,.38);

  --bad:#fb7185;
  --bad-text:#ffe4e6;
  --bad-soft:rgba(239,68,68,.18);
  --bad-border:rgba(239,68,68,.38);

  --danger:#ff6b62;
  --danger-text:#ffe2df;
  --danger-soft:rgba(255,107,98,.16);
  --danger-border:rgba(255,107,98,.34);

  --surface-1:rgba(255,255,255,.03);
  --surface-2:rgba(255,255,255,.04);
  --surface-3:rgba(255,255,255,.05);
  --surface-4:rgba(255,255,255,.06);
  --surface-5:rgba(255,255,255,.08);
  --surface-6:rgba(255,255,255,.10);

  --interactive-bg:rgba(255,255,255,.06);
  --interactive-bg-hover:rgba(255,255,255,.09);
  --interactive-border:var(--line);
  --interactive-border-strong:var(--line-strong);

  --accent-button-bg:rgba(56,189,248,.18);
  --accent-button-border:rgba(56,189,248,.35);

  --radius:14px;
  --radius-sm:12px;
  --radius-md:14px;
  --radius-lg:18px;
  --radius-xl:20px;
  --pill-radius:999px;

  --max:1100px;
  --page-pad-x:12px;
  --page-pad-y:14px;
  --page-pad-bottom:24px;

  --panel-pad:12px;
  --control-pad-y:12px;
  --control-pad-x:14px;

  --shadow:0 18px 40px rgba(0,0,0,.24);

  --header-bg:linear-gradient(180deg, rgba(2,6,23,.96), rgba(2,6,23,.85));
  --footer-bg:rgba(10,16,24,.82);

  --focus-ring:0 0 0 3px rgba(56,189,248,.16);

  color-scheme:dark;
}

/* --------------------------------------
   Shared light token set
-------------------------------------- */

html[data-theme="light"]{
  --bg:#f3f4f6;
  --bg-soft:#e9edf5;
  --panel:#ffffff;
  --panel-2:#f8fbff;
  --card:#ffffff;

  --text:#111827;
  --fg:#111827;
  --muted:#6b7280;
  --muted-2:#7b8798;

  --line:#e5e7eb;
  --line-soft:#e5e7eb;
  --line-strong:#d1d5db;

  --accent:#2563eb;
  --accent-2:#1d4ed8;
  --accent-soft:#dbeafe;
  --accent-soft-2:#c7dcff;

  --ok:#15803d;
  --ok-text:#14532d;
  --ok-soft:rgba(34,197,94,.12);
  --ok-border:rgba(34,197,94,.26);

  --warn:#b45309;
  --warn-text:#78350f;
  --warn-soft:rgba(245,158,11,.16);
  --warn-border:rgba(245,158,11,.30);

  --bad:#dc2626;
  --bad-text:#7f1d1d;
  --bad-soft:rgba(220,38,38,.14);
  --bad-border:rgba(220,38,38,.26);

  --danger:#d92d20;
  --danger-text:#7f1d1d;
  --danger-soft:rgba(217,45,32,.12);
  --danger-border:rgba(217,45,32,.24);

  --surface-1:rgba(15,23,42,.02);
  --surface-2:rgba(15,23,42,.03);
  --surface-3:rgba(15,23,42,.04);
  --surface-4:rgba(15,23,42,.05);
  --surface-5:rgba(15,23,42,.08);
  --surface-6:rgba(15,23,42,.10);

  --interactive-bg:rgba(15,23,42,.04);
  --interactive-bg-hover:rgba(15,23,42,.07);
  --interactive-border:var(--line);
  --interactive-border-strong:var(--line-strong);

  --accent-button-bg:#dbeafe;
  --accent-button-border:#93c5fd;

  --shadow:0 18px 40px rgba(15,23,42,.12);
  --header-bg:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.90));
  --footer-bg:rgba(255,255,255,.88);

  color-scheme:light;
}

/* --------------------------------------
   Explicit dark override
-------------------------------------- */

html[data-theme="dark"]{
  color-scheme:dark;
}

/* --------------------------------------
   Auto-follow device theme
-------------------------------------- */

@media (prefers-color-scheme: light){
  html:not([data-theme="dark"]):not([data-theme="light"]){
    --bg:#f3f4f6;
    --bg-soft:#e9edf5;
    --panel:#ffffff;
    --panel-2:#f8fbff;
    --card:#ffffff;

    --text:#111827;
    --fg:#111827;
    --muted:#6b7280;
    --muted-2:#7b8798;

    --line:#e5e7eb;
    --line-soft:#e5e7eb;
    --line-strong:#d1d5db;

    --accent:#2563eb;
    --accent-2:#1d4ed8;
    --accent-soft:#dbeafe;
    --accent-soft-2:#c7dcff;

    --ok:#15803d;
    --ok-text:#14532d;
    --ok-soft:rgba(34,197,94,.12);
    --ok-border:rgba(34,197,94,.26);

    --warn:#b45309;
    --warn-text:#78350f;
    --warn-soft:rgba(245,158,11,.16);
    --warn-border:rgba(245,158,11,.30);

    --bad:#dc2626;
    --bad-text:#7f1d1d;
    --bad-soft:rgba(220,38,38,.14);
    --bad-border:rgba(220,38,38,.26);

    --danger:#d92d20;
    --danger-text:#7f1d1d;
    --danger-soft:rgba(217,45,32,.12);
    --danger-border:rgba(217,45,32,.24);

    --surface-1:rgba(15,23,42,.02);
    --surface-2:rgba(15,23,42,.03);
    --surface-3:rgba(15,23,42,.04);
    --surface-4:rgba(15,23,42,.05);
    --surface-5:rgba(15,23,42,.08);
    --surface-6:rgba(15,23,42,.10);

    --interactive-bg:rgba(15,23,42,.04);
    --interactive-bg-hover:rgba(15,23,42,.07);
    --interactive-border:var(--line);
    --interactive-border-strong:var(--line-strong);

    --accent-button-bg:#dbeafe;
    --accent-button-border:#93c5fd;

    --shadow:0 18px 40px rgba(15,23,42,.12);
    --header-bg:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.90));
    --footer-bg:rgba(255,255,255,.88);

    color-scheme:light;
  }
}

/* ======================================================
   RESET / BASE
====================================================== */

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
  min-height:100%;
  height:100%;
}

html{
  background:var(--bg);
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  overscroll-behavior:none;
}

body{
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
  touch-action:manipulation;
}

*{
  -webkit-tap-highlight-color:transparent;
}

a,
button,
input,
select,
textarea,
label{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

a{
  color:var(--accent);
  text-decoration:none;
}

img{
  display:block;
  max-width:100%;
}

button,
input,
select,
textarea{
  font:inherit;
}

@supports (-webkit-touch-callout:none){
  input,
  select,
  textarea,
  button{
    font-size:16px !important;
  }
}

/* ======================================================
   APP ROOT / LAYOUT HELPERS
   Official standard: .om-*
   Compatibility aliases kept below where needed
====================================================== */

.ohiomade-app,
.om-app{
  background:var(--bg);
  color:var(--text);
}

.om-page,
.om-container,
.container,
main{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:var(--page-pad-y) var(--page-pad-x);
}

.om-page.safe{
  padding-top:calc(var(--page-pad-y) + var(--safe-area-top));
  padding-bottom:calc(var(--page-pad-bottom) + var(--safe-area-bottom));
  padding-left:max(var(--page-pad-x), var(--safe-area-left));
  padding-right:max(var(--page-pad-x), var(--safe-area-right));
}

/* ======================================================
   TYPOGRAPHY
====================================================== */

h1,
.om-h1{
  margin:0 0 6px 0;
  font-size:26px;
  line-height:1.15;
  color:var(--accent);
}

h2,
.om-h2{
  margin:0 0 10px 0;
  font-size:16px;
  line-height:1.2;
  color:var(--accent);
}

h3,
.om-h3{
  margin:0 0 8px 0;
  font-size:16px;
  line-height:1.2;
}

.small,
.om-small,
.small-muted,
.om-small-muted{
  font-size:13px;
  color:var(--muted);
  line-height:1.35;
}

.muted,
.om-muted{
  color:var(--muted);
}

.mono,
.om-mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}

/* ======================================================
   SHARED SHELL / TOPBAR / HEADER
====================================================== */

.om-topbar,
.topbar,
.top,
.om-header{
  position:sticky;
  top:0;
  z-index:40;
  padding:
    calc(10px + var(--safe-area-top))
    var(--page-pad-x)
    10px
    var(--page-pad-x);
  background:var(--header-bg);
  border-bottom:1px solid var(--line-soft);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.om-topbar-inner,
.om-header-inner{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  display:grid;
  gap:8px;
}

.om-toprow,
.toprow,
.om-header-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.om-header-left{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}

.om-header-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  min-width:0;
}

.om-brand,
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.om-brand-dot,
.dot{
  width:12px;
  height:12px;
  border-radius:999px;
  background:var(--accent);
  box-shadow:0 0 0 4px var(--accent-soft);
  flex:0 0 auto;
}

.om-brand-title,
.brand .title,
.title .h1,
.om-title{
  margin:0;
  font-weight:900;
  font-size:18px;
  line-height:1.1;
  letter-spacing:.2px;
  color:var(--text);
}

.om-brand-sub,
.title .h2,
.om-subtitle,
.subhead{
  color:var(--muted);
  font-size:12px;
  line-height:1.3;
  margin-top:2px;
}

.om-title-wrap,
.om-header-title-wrap{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1 1 auto;
}

.om-header-sub{
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.om-header-chip-row,
.om-header-search-row,
.om-header-action-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.om-topbar-menu-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-width:44px;
  min-height:44px;
  padding:.65rem .8rem;
}

.om-topbar-logo{
  width:30px;
  height:30px;
  border-radius:10px;
  object-fit:contain;
  display:block;
  flex:0 0 auto;
  background:var(--surface-2);
}

.om-topbar-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.45rem .7rem;
  min-width:0;
}

.om-topbar-meta-item{
  display:inline-flex;
  align-items:center;
  gap:.38rem;
  min-width:0;
  max-width:100%;
  flex:0 1 auto;
}

.om-topbar-meta-dd{
  display:inline-flex;
  align-items:center;
  min-width:0;
  max-width:100%;
  flex:0 1 auto;
}

.om-topbar-meta-trigger{
  display:inline-flex;
  align-items:center;
  gap:.38rem;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
  text-align:left;
}

.om-topbar-meta-trigger:hover{
  opacity:.92;
}

.om-topbar-meta-trigger:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
  border-radius:10px;
}

.om-topbar-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-height:44px;
  white-space:nowrap;
}

.om-topbar-icon{
  width:1.05em;
  height:1.05em;
  flex:0 0 auto;
}

.om-topbar-label,
.om-topbar-meta-label,
.om-topbar-action-label{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.om-topbar-dd{
  position:relative;
  display:inline-flex;
  align-items:center;
  min-width:0;
  max-width:100%;
}

.om-topbar-title-trigger{
  display:inline-flex;
  align-items:center;
  gap:.38rem;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
  text-align:left;
}

.om-topbar-title-trigger:hover{
  opacity:.94;
}

.om-topbar-title-trigger:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
  border-radius:10px;
}

.om-topbar-dd-trigger[aria-expanded="true"],
.om-topbar-title-trigger[aria-expanded="true"]{
  background:var(--surface-5);
  border-radius:10px;
}

.om-topbar-dd-menu{
  position:fixed;
  top:0;
  left:0;
  min-width:220px;
  max-width:min(86vw, 340px);
  background:var(--panel);
  border:1px solid var(--line-strong);
  border-radius:14px;
  box-shadow:0 14px 38px rgba(0,0,0,.32);
  overflow:hidden;
  z-index:1200;
}

.om-topbar-dd-item{
  display:block;
  width:100%;
  padding:14px 16px;
  text-align:left;
  text-decoration:none;
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line-soft);
  color:var(--text);
  font:inherit;
  font-size:15px;
  line-height:1.35;
  cursor:pointer;
}

.om-topbar-dd-item:last-child{
  border-bottom:0;
}

.om-topbar-dd-item:hover,
.om-topbar-dd-item:focus-visible{
  background:var(--interactive-bg);
  color:var(--text);
  outline:none;
}

.om-topbar-dd-item.is-active{
  background:var(--accent-soft);
  color:var(--text);
  font-weight:900;
}

/* ======================================================
   OFFICIAL PRIMITIVES
====================================================== */

/* --------------------------------------
   Chips / badges / pills
-------------------------------------- */

.om-chips,
.me,
.kpi{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 0;
}

.om-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:var(--pill-radius);
  background:var(--interactive-bg);
  border:1px solid var(--interactive-border);
  color:var(--text);
  font-size:13px;
  white-space:nowrap;
}

.om-chip.ok{ background:var(--ok-soft); border-color:var(--ok-border); color:var(--ok-text); }
.om-chip.warn{ background:var(--warn-soft); border-color:var(--warn-border); color:var(--warn-text); }
.om-chip.bad{ background:var(--bad-soft); border-color:var(--bad-border); color:var(--bad-text); }
.om-chip.neutral{ background:rgba(148,163,184,.12); border-color:rgba(148,163,184,.20); }

.om-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:var(--pill-radius);
  font-size:12px;
  font-weight:900;
  border:1px solid var(--interactive-border);
  background:var(--surface-2);
  color:var(--text);
}

.om-badge.ok{
  border-color:var(--ok-border);
  background:var(--ok-soft);
  color:var(--ok-text);
}

.om-badge.warn{
  border-color:var(--warn-border);
  background:var(--warn-soft);
  color:var(--warn-text);
}

.om-badge.bad{
  border-color:var(--bad-border);
  background:var(--bad-soft);
  color:var(--bad-text);
}

.om-badge.pending{
  border-color:var(--warn-border);
  background:var(--warn-soft);
  color:var(--warn-text);
}

.om-badge.ready{
  border-color:var(--ok-border);
  background:var(--ok-soft);
  color:var(--ok-text);
}

.om-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:var(--pill-radius);
  border:1px solid var(--interactive-border);
  background:var(--interactive-bg);
  color:var(--text);
  font-size:12px;
  font-weight:900;
}

.om-pill.ok{
  background:var(--ok-soft);
  border-color:var(--ok-border);
  color:var(--ok-text);
}

.om-pill.warn{
  background:var(--warn-soft);
  border-color:var(--warn-border);
  color:var(--warn-text);
}

.om-pill.bad{
  background:var(--bad-soft);
  border-color:var(--bad-border);
  color:var(--bad-text);
}

.om-pill.pending{
  background:var(--warn-soft);
  border-color:var(--warn-border);
  color:var(--warn-text);
}

.om-pill.closed,
.om-pill.complete{
  background:var(--ok-soft);
  border-color:var(--ok-border);
  color:var(--ok-text);
}

.om-pill.void,
.om-pill.error{
  background:var(--bad-soft);
  border-color:var(--bad-border);
  color:var(--bad-text);
}

.om-pill-key{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.om-pill-value{
  color:var(--text);
  font-size:12px;
  font-weight:800;
}

/* --------------------------------------
   Cards / panels
-------------------------------------- */

.om-card{
  background:var(--card);
  border-radius:var(--radius);
  padding:14px 16px;
  margin-bottom:12px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.om-card.soft{
  background:linear-gradient(180deg, var(--surface-3), var(--surface-1));
}

.om-card-hd{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.om-card-title{
  margin:0;
  font-size:15px;
  line-height:1.15;
  font-weight:900;
  color:var(--text);
}

/* --------------------------------------
   Buttons
-------------------------------------- */

.om-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 14px;
  min-height:44px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  border:1px solid var(--interactive-border);
  color:var(--text);
  background:var(--interactive-bg);
  cursor:pointer;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

.om-btn:hover{
  transform:translateY(-1px);
  background:var(--interactive-bg-hover);
}

.om-btn.primary{
  background:var(--accent-button-bg);
  border-color:var(--accent-button-border);
  color:var(--text);
}

.om-btn.secondary{
  background:var(--interactive-bg);
  color:var(--text);
}

.om-btn.ghost{
  background:transparent;
}

.om-btn.ok{
  background:var(--ok-soft);
  border-color:var(--ok-border);
  color:var(--ok-text);
}

.om-btn.warn{
  background:var(--warn-soft);
  border-color:var(--warn-border);
  color:var(--warn-text);
}

.om-btn.danger{
  background:var(--danger-soft);
  border-color:var(--danger-border);
  color:var(--danger-text);
}

.om-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}

/* --------------------------------------
   Forms
-------------------------------------- */

.om-form-grid,
.form-grid{
  display:grid;
  gap:12px;
}

.om-grid-2,
.grid-2{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width:740px){
  .om-grid-2,
  .grid-2{
    grid-template-columns:1fr 1fr;
  }
}

.om-field,
.field{
  display:grid;
  gap:6px;
}

.om-label,
label,
.lbl{
  display:block;
  margin:8px 0 6px;
  font-size:13px;
  color:var(--muted);
  font-weight:800;
}

.om-input,
.om-select,
.om-textarea,
.input,
input,
select,
textarea{
  width:100%;
  min-height:46px;
  padding:var(--control-pad-y) var(--control-pad-x);
  border-radius:12px;
  border:1px solid var(--surface-6);
  background:var(--surface-2);
  color:var(--text);
  outline:none;
  box-shadow:none;
  font-size:16px;
}

.om-input::placeholder,
.om-textarea::placeholder,
.input::placeholder,
textarea::placeholder{
  color:var(--muted-2);
}

.om-input:focus,
.om-select:focus,
.om-textarea:focus,
.input:focus,
input:focus,
select:focus,
textarea:focus{
  border-color:rgba(56,189,248,.40);
  box-shadow:var(--focus-ring);
}

.om-textarea,
textarea{
  min-height:90px;
  resize:vertical;
}

.om-input-file,
.input.file{
  padding:10px 12px;
}

.om-hint,
.hint{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

.om-actions,
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* --------------------------------------
   Alerts / checks / notices
-------------------------------------- */

.om-alert{
  border:1px solid var(--interactive-border);
  background:var(--surface-2);
  padding:10px 12px;
  border-radius:12px;
  color:var(--text);
  font-size:13px;
}

.om-alert-error{
  border:1px solid var(--bad-border);
  background:var(--bad-soft);
  color:var(--bad-text);
}

.om-alert-warn{
  border:1px solid var(--warn-border);
  background:var(--warn-soft);
  color:var(--warn-text);
}

.om-alert-ok{
  border:1px solid var(--ok-border);
  background:var(--ok-soft);
  color:var(--ok-text);
}

.om-check,
.chk{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border:1px solid var(--surface-6);
  background:var(--surface-1);
  border-radius:12px;
}

.om-check input,
.chk input{
  width:18px;
  height:18px;
  margin-top:2px;
  min-height:auto;
}

.om-check-title,
.chk .t{
  font-weight:900;
}

.om-check-sub,
.chk .s{
  color:var(--muted);
  font-size:13px;
  margin-top:2px;
}

/* --------------------------------------
   Grids / menus / tiles
-------------------------------------- */

.om-grid,
.grid,
.menu-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}

@media (max-width:720px){
  .om-grid,
  .grid,
  .menu-grid{
    grid-template-columns:1fr;
  }
}

.om-grid.cols2-mobile,
.menu-grid.cols2-mobile{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

@media (max-width:420px){
  .om-grid.cols2-mobile,
  .menu-grid.cols2-mobile{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

.om-menu-tile,
.om-tile,
.menu-tile{
  display:block;
  text-decoration:none;
  background:var(--panel);
  border-radius:12px;
  padding:12px;
  color:var(--text);
  font-size:14px;
  border:1px solid var(--line);
}

.om-menu-row,
.menu-row{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.om-menu-label,
.menu-label{
  font-weight:800;
  margin-bottom:3px;
  display:flex;
  align-items:center;
  gap:10px;
}

.om-menu-desc,
.menu-desc{
  font-size:12px;
  color:var(--muted);
  line-height:1.25;
}

.om-menu-tile.compact,
.menu-tile.compact{
  padding:10px;
}

.om-menu-tile.compact .om-menu-desc,
.menu-tile.compact .menu-desc{
  font-size:11px;
}

/* --------------------------------------
   Key/value / list / history
-------------------------------------- */

.om-kv,
.kv{
  display:grid;
  gap:6px;
  margin-top:10px;
  font-size:13px;
}

.om-kv-row,
.kv .row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:6px 0;
  border-bottom:1px solid var(--line-soft);
}

.om-kv-row:last-child,
.kv .row:last-child{
  border-bottom:none;
}

.om-k,
.kv .k{
  color:var(--muted);
  font-weight:800;
}

.om-v,
.kv .v{
  color:var(--text);
  font-weight:800;
  text-align:right;
}

.om-list,
.list{
  display:grid;
  gap:12px;
  margin-top:12px;
}

.om-item-head,
.item-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.om-item-left,
.item-head .left{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.om-item-title,
.item-head .title{
  font-weight:1000;
  color:var(--text);
  font-size:14px;
}

.om-item-meta,
.item-head .meta{
  font-size:12px;
  color:var(--muted);
}

.om-section-title,
.section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}

.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

/* --------------------------------------
   Tables
-------------------------------------- */

.om-table{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface-1);
}

table.om-table-grid{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:13px;
  min-width:760px;
}

table.om-table-grid th,
table.om-table-grid td{
  padding:12px 12px;
  border-bottom:1px solid var(--line-soft);
  vertical-align:top;
  white-space:nowrap;
}

table.om-table-grid th{
  position:sticky;
  top:0;
  z-index:1;
  background:var(--surface-2);
  color:var(--accent);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

table.om-table-grid tr:last-child td{
  border-bottom:none;
}

.om-num{
  text-align:right;
  font-variant-numeric:tabular-nums;
}

.om-actions-cell{
  text-align:right;
}

.om-actions-cell .om-btn,
.om-actions-cell .btn{
  padding:10px 14px;
  min-height:40px;
  white-space:nowrap;
}

/* ======================================================
   SHEETS / MODALS / MENUS
====================================================== */

.om-sheet-backdrop{
  position:fixed;
  inset:0;
  z-index:120;
  display:none;
  background:rgba(0,0,0,.46);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}

.om-sheet-backdrop.is-open{
  display:block;
}

.om-sheet{
  position:fixed;
  right:12px;
  top:calc(var(--safe-area-top) + 58px);
  z-index:130;
  width:min(420px, calc(100vw - 24px));
  max-height:calc(100vh - 76px - var(--safe-area-bottom));
  overflow:auto;
  display:none;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.om-sheet.is-open{
  display:block;
}

.om-sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px 10px;
  border-bottom:1px solid var(--line-soft);
}

.om-sheet-title{
  margin:0;
  font-size:15px;
  font-weight:800;
}

.om-sheet-body{
  padding:12px;
  display:grid;
  gap:12px;
}

.om-sheet-section{
  display:grid;
  gap:8px;
}

.om-sheet-label{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.om-sheet-links{
  display:grid;
  gap:8px;
}

.om-sheet-links .om-btn,
.om-sheet-links .btn{
  width:100%;
  justify-content:flex-start;
}

body.om-sheet-open{
  overflow:hidden;
}

.om-nav-link{
  display:flex;
  align-items:center;
  gap:.7rem;
  justify-content:flex-start;
}

.om-nav-icon{
  width:1.05em;
  height:1.05em;
  flex:0 0 auto;
}

.om-nav-label{
  min-width:0;
}

.om-nav-context-row{
  display:flex;
  align-items:flex-start;
  gap:.65rem;
}

/* ======================================================
   SWITCH BUSINESS
====================================================== */

.om-switch-business-sheet{
  width:min(560px, calc(100vw - 24px));
  max-height:calc(100vh - 90px - var(--safe-area-bottom));
}

.om-switch-business-form{
  display:grid;
  gap:12px;
}

.om-switch-business-search-wrap{
  display:block;
}

.om-switch-business-search{
  width:100%;
}

.om-switch-business-list{
  display:grid;
  gap:8px;
}

.om-switch-business-option{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface-1);
  color:var(--text);
  cursor:pointer;
}

.om-switch-business-option:hover{
  border-color:var(--line-strong);
  background:var(--surface-3);
}

.om-switch-business-option.is-active{
  border-color:rgba(56,189,248,.35);
  background:rgba(56,189,248,.10);
}

.om-switch-business-option input{
  display:none;
}

.om-switch-business-option::before{
  content:"";
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid var(--line);
  flex:0 0 18px;
  margin-top:3px;
  transition:.2s;
}

.om-switch-business-option.is-active::before{
  border-color:var(--accent);
  background:var(--accent);
  box-shadow:0 0 0 4px var(--accent-soft);
}

.om-switch-business-copy{
  min-width:0;
  display:grid;
  gap:4px;
  flex:1 1 auto;
}

.om-switch-business-title{
  min-width:0;
  font-weight:900;
  font-size:15px;
  line-height:1.25;
  color:var(--text);
}

.om-switch-business-sub{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  font-size:12px;
  color:var(--muted);
}

.om-switch-business-meta{
  color:var(--muted);
  font-size:12px;
  line-height:1.3;
}

.om-switch-business-empty{
  padding:8px 2px 2px;
}

.om-switch-business-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  position:sticky;
  bottom:0;
  padding-top:6px;
  padding-bottom:2px;
  background:linear-gradient(180deg, rgba(255,255,255,0), var(--panel) 28%);
}

.om-switch-business-actions .om-btn{
  width:100%;
  justify-content:center;
  background:var(--accent-button-bg);
  border-color:var(--accent-button-border);
}

/* ======================================================
   FOOTER
====================================================== */

.om-footer,
footer{
  margin-top:18px;
  font-size:11px;
  text-align:center;
  color:var(--muted);
  padding-bottom:8px;
}

.om-footer-shell{
  width:100%;
  max-width:var(--max);
  margin:18px auto 0;
  padding:0 var(--page-pad-x) calc(8px + var(--safe-area-bottom));
}

.om-footer-inner{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--footer-bg);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.om-footer-left,
.om-footer-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}

.om-footer-mini,
.footer-mini{
  text-align:center;
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

.om-version{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}

.om-footer-link{
  color:var(--accent);
  text-decoration:none;
  font-size:12px;
  border-bottom:1px dashed rgba(56,189,248,.25);
}

.om-footer-link:hover{
  text-decoration:underline;
}

/* ======================================================
   UTILITIES
====================================================== */

.om-row{
  display:flex;
  gap:8px;
  align-items:flex-end;
}

.om-hidden{
  display:none !important;
}

.om-hidden-mobile{
  display:none !important;
}

.om-icon{
  width:1.1em;
  height:1.1em;
  display:inline-block;
  vertical-align:-0.125em;
  flex:0 0 auto;
  overflow:visible;
  color:currentColor;
  fill:currentColor;
  stroke:currentColor;
}

.om-icon use{
  pointer-events:none;
}

.om-icon[data-icon-fallback="1"]{
  opacity:.92;
}

.readonly{
  opacity:.92;
}

/* ======================================================
   COMPATIBILITY ALIASES
   Keep during migration. New work should prefer .om-*
====================================================== */

/* --------------------------------------
   Chips / badges / pills aliases
-------------------------------------- */

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:var(--pill-radius);
  background:var(--interactive-bg);
  border:1px solid var(--interactive-border);
  color:var(--text);
  font-size:13px;
  white-space:nowrap;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:var(--pill-radius);
  font-size:12px;
  font-weight:900;
  border:1px solid var(--interactive-border);
  background:var(--surface-2);
  color:var(--text);
}

.badge.ok{
  border-color:var(--ok-border);
  background:var(--ok-soft);
  color:var(--ok-text);
}

.badge.warn,
.badge.pending{
  border-color:var(--warn-border);
  background:var(--warn-soft);
  color:var(--warn-text);
}

.badge.bad,
.badge.blocked{
  border-color:var(--bad-border);
  background:var(--bad-soft);
  color:var(--bad-text);
}

.badge.ready{
  border-color:var(--ok-border);
  background:var(--ok-soft);
  color:var(--ok-text);
}

.pill,
.kpi .pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:var(--pill-radius);
  border:1px solid var(--interactive-border);
  background:var(--interactive-bg);
  color:var(--text);
  font-size:12px;
  font-weight:900;
}

.pill.warn,
.pill.pending{
  background:var(--warn-soft);
  border-color:var(--warn-border);
  color:var(--warn-text);
}

.pill.bad,
.pill.void,
.pill.error{
  background:var(--bad-soft);
  border-color:var(--bad-border);
  color:var(--bad-text);
}

.pill.closed,
.pill.complete{
  background:var(--ok-soft);
  border-color:var(--ok-border);
  color:var(--ok-text);
}

.pill .k{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.pill .v{
  color:var(--text);
  font-size:12px;
  font-weight:800;
}

.pill-flag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:var(--pill-radius);
  font-size:12px;
  font-weight:900;
  border:1px solid var(--interactive-border);
  background:var(--surface-3);
  color:var(--text);
}

.pill-flag.missing{
  background:var(--bad-soft);
  border-color:var(--bad-border);
  color:var(--bad-text);
}

/* --------------------------------------
   Card / button aliases
-------------------------------------- */

.card{
  background:var(--card);
  border-radius:var(--radius);
  padding:14px 16px;
  margin-bottom:12px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 14px;
  min-height:44px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  border:1px solid var(--interactive-border);
  color:var(--text);
  background:var(--interactive-bg);
  cursor:pointer;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

.btn:hover{
  transform:translateY(-1px);
  background:var(--interactive-bg-hover);
}

.btn.primary,
.btn-primary{
  background:var(--accent-button-bg);
  border-color:var(--accent-button-border);
  color:var(--text);
}

.btn.secondary{
  background:var(--interactive-bg);
  color:var(--text);
}

.btn.ghost{
  background:transparent;
}

.btn.ok{
  background:var(--ok-soft);
  border-color:var(--ok-border);
  color:var(--ok-text);
}

.btn.warn{
  background:var(--warn-soft);
  border-color:var(--warn-border);
  color:var(--warn-text);
}

.btn.danger{
  background:var(--danger-soft);
  border-color:var(--danger-border);
  color:var(--danger-text);
}

.btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}

/* --------------------------------------
   Status / alert aliases
-------------------------------------- */

.err,
.alert-err,
.search-error,
.wl-alert-error,
.timesheets-flash-error{
  border:1px solid var(--bad-border);
  background:var(--bad-soft);
  color:var(--bad-text);
}

.warn{
  border:1px solid var(--warn-border);
  background:var(--warn-soft);
  color:var(--warn-text);
}

.info,
.wl-alert-ok,
.timesheets-flash-ok{
  border:1px solid var(--ok-border);
  background:var(--ok-soft);
  color:var(--ok-text);
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width:680px){
  .om-topbar,
  .topbar,
  .top,
  .om-header{
    padding:
      calc(8px + var(--safe-area-top))
      var(--page-pad-x)
      8px
      var(--page-pad-x);
  }

  .om-header-inner,
  .om-topbar-inner{
    gap:6px;
  }

  .om-header-right{
    width:auto;
    gap:6px;
    justify-content:flex-end;
  }

  .om-toprow,
  .toprow,
  .om-header-top{
    align-items:flex-start;
  }

  .om-header-left{
    width:100%;
    min-width:0;
    align-items:flex-start;
    gap:10px;
  }

  .om-chip,
  .chip{
    font-size:11px;
    padding:4px 8px;
  }

  .om-badge,
  .badge{
    font-size:10px;
    padding:2px 6px;
  }

  .om-btn,
  .btn{
    min-height:40px;
    padding:10px 12px;
    font-size:13px;
  }

  .om-topbar-action{
    flex:1 1 auto;
  }

  .om-topbar-meta{
    row-gap:4px;
    column-gap:10px;
  }

  .om-topbar-meta-item{
    flex:0 0 auto;
  }

  .om-topbar-meta-dd{
    flex:0 1 auto;
  }

  .om-footer-inner{
    padding:10px 12px;
    gap:6px;
    align-items:flex-start;
  }

  .om-footer-left,
  .om-footer-right{
    width:100%;
  }

  .om-version{
    font-size:11px;
    line-height:1.35;
    white-space:normal;
  }

  .om-footer-link{
    font-size:11px;
  }

  .om-sheet{
    top:auto;
    right:8px;
    left:8px;
    bottom:calc(8px + var(--safe-area-bottom));
    width:auto;
    max-height:min(78vh, 680px);
    border-radius:18px;
  }

  .om-switch-business-sheet{
    top:auto;
    right:8px;
    left:8px;
    bottom:calc(8px + var(--safe-area-bottom));
    width:auto;
    max-height:min(78vh, 680px);
    border-radius:18px;
  }

  table.om-table-grid th,
  table.om-table-grid td{
    padding:10px 10px;
  }
}

@media (max-width:640px){
  .om-topbar-dd-menu{
    min-width:200px;
    max-width:min(88vw, 320px);
  }
}

@media (max-width:560px){
  .om-brand-title,
  .brand .title,
  .title .h1,
  .om-title{
    font-size:17px;
  }

  .om-chip,
  .chip{
    max-width:160px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

@media (max-width:420px){
  .om-grid.cols2-mobile,
  .menu-grid.cols2-mobile{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}