/* ==========================================================================
   Leader Portal — shell styles
   Scoped to .osm-hub so the theme and other plugins are unaffected.
   Typeface: Nunito Sans (SIL OFL 1.1), served from this plugin — no Google calls.
   ========================================================================== */

@font-face {
  font-family: 'Nunito Sans Hub';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('../assets/fonts/nunito-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito Sans Hub';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('../assets/fonts/nunito-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.osm-hub {
  --hub-font: 'Nunito Sans Hub', 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hub-ink: #1B1530;
  --hub-ink-2: #3D3852;
  --hub-muted: #5B5670;
  --hub-faint: #8A859C;
  --hub-ground: #F6F5F8;
  --hub-surface: #FFFFFF;
  --hub-tint: #FAF9FC;
  --hub-line: #E4E1EC;
  --hub-line-2: #EFEDF3;
  --hub-field: #D9D4E4;
  --hub-accent: #7413DC;
  --hub-accent-h: #5E0FB3;
  --hub-accent-ink: #5B12B0;
  --hub-accent-soft: #F1E8FC;
  --hub-hover: #EFEAF7;
  --hub-teal: #0B6B66;  --hub-teal-bg: #E3F4F2;
  --hub-orange: #9A4708; --hub-orange-bg: #FDEEDC;
  --hub-blue: #1F4FA3;  --hub-blue-bg: #E3ECFB;
  --hub-red: #A11D12;   --hub-red-bg: #FBE4E2;
  --hub-grey: #4A4560;  --hub-grey-bg: #EEECF2;
  --hub-radius: 14px;

  font-family: var(--hub-font);
  color: var(--hub-ink);
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  min-height: 80vh;
  background: var(--hub-ground);
  border: 1px solid var(--hub-line);
  border-radius: 18px;
  overflow: hidden;
  box-sizing: border-box;
  text-align: left;
}
.osm-hub *, .osm-hub *::before, .osm-hub *::after { box-sizing: border-box; }
.osm-hub [hidden], .osm-hub-modal-back [hidden] { display: none !important; }
.osm-hub a { color: var(--hub-accent-ink); }
.osm-hub a:hover { color: #3F0C7A; }
.osm-hub :focus-visible { outline: 3px solid var(--hub-accent); outline-offset: 2px; }

.osm-hub-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.osm-hub-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Sidebar ---- */
.osm-hub-side {
  flex: 1 1 248px;
  max-width: 100%;
  background: var(--hub-surface);
  border-right: 1px solid var(--hub-line);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.osm-hub-brand { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.osm-hub-logo {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--hub-accent); color: #FFFFFF !important; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.osm-hub-logo--lg { width: 56px; height: 56px; border-radius: 14px; font-size: 18px; }
.osm-hub-brand-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.osm-hub-brand-title { font-weight: 800; font-size: 15px; line-height: 1.2; }
.osm-hub-brand-sub { font-size: 13px; color: var(--hub-muted); line-height: 1.3; }
.osm-hub-menu-btn { display: none; }

.osm-hub-nav { display: flex; flex-direction: column; gap: 18px; }
.osm-hub-nav-group { display: flex; flex-direction: column; gap: 2px; }
.osm-hub-lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hub-muted); padding: 0 12px 6px; }
.osm-hub-nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--hub-ink-2) !important; text-decoration: none !important;
  font-weight: 600; font-size: 15px;
}
.osm-hub-nav-item:hover { background: var(--hub-hover); color: var(--hub-ink) !important; }
.osm-hub-nav-item.is-current { background: var(--hub-accent); color: #FFFFFF !important; }

.osm-hub-me { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.osm-hub-me-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--hub-line); border-radius: var(--hub-radius); }
.osm-hub-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; text-decoration: none !important;
  background: var(--hub-teal-bg); color: var(--hub-teal) !important;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.osm-hub-me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.osm-hub-me-name { font-weight: 700; font-size: 14px; color: var(--hub-ink) !important; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osm-hub-me-sub { font-size: 12px; color: var(--hub-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osm-hub-me-note { font-size: 12px; color: var(--hub-muted); padding: 0 4px; }
.osm-hub-iconbtn {
  width: 40px; height: 40px; flex: none; border-radius: 10px; border: 1px solid var(--hub-field);
  display: flex; align-items: center; justify-content: center; color: var(--hub-ink) !important; background: var(--hub-surface);
}
.osm-hub-iconbtn:hover { background: #F6F3FB; }

/* ---- Main ---- */
.osm-hub-main { flex: 999 1 560px; min-width: 0; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 20px; }
.osm-hub-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.osm-hub-head-text { flex: 1 1 320px; min-width: 0; }
.osm-hub-title { margin: 0 !important; padding: 0; font-family: var(--hub-font); font-size: 28px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; color: var(--hub-ink); }
.osm-hub-desc { margin: 4px 0 0 !important; color: var(--hub-muted); font-size: 15px; }

.osm-hub-search { flex: 0 1 340px; position: relative; display: flex; align-items: center; margin: 0; }
.osm-hub-search-ic { position: absolute; left: 12px; color: var(--hub-muted); pointer-events: none; }
.osm-hub-input {
  width: 100%; min-height: 44px; border: 1px solid var(--hub-field) !important; border-radius: 10px !important;
  padding: 0 12px !important; font: 15px var(--hub-font) !important; background: var(--hub-surface) !important; color: var(--hub-ink) !important;
  box-shadow: none !important; margin: 0 !important; max-width: 100%; height: auto; line-height: 1.4;
}
.osm-hub-search .osm-hub-input, .osm-hub-searchbox .osm-hub-input { padding-left: 42px !important; }
.osm-hub-input:focus { border-color: var(--hub-accent) !important; outline: 3px solid rgba(116,19,220,.18); outline-offset: 0; }
select.osm-hub-input { padding-right: 32px !important; appearance: auto; }
.osm-hub-textarea { min-height: 88px; padding: 10px 12px !important; resize: vertical; }
.osm-hub-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.osm-hub-head-actions:empty { display: none; }

.osm-hub-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--hub-line); }
.osm-hub-tab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; margin-bottom: -1px;
  border-bottom: 3px solid transparent; color: var(--hub-muted) !important; text-decoration: none !important; font-weight: 700;
}
.osm-hub-tab:hover { color: var(--hub-ink) !important; }
.osm-hub-tab.is-current { border-bottom-color: var(--hub-accent); color: var(--hub-ink) !important; }

/* ---- Shared bits ---- */
.osm-hub-card { background: var(--hub-surface); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); }
.osm-hub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--hub-field); background: var(--hub-surface); color: var(--hub-ink) !important;
  font: 700 15px var(--hub-font); text-decoration: none !important; white-space: nowrap; cursor: pointer;
}
.osm-hub-btn:hover { background: #F6F3FB; }
.osm-hub-btn--pri { background: var(--hub-accent); border-color: var(--hub-accent); color: #FFFFFF !important; }
.osm-hub-btn--pri:hover { background: var(--hub-accent-h); }
.osm-hub-btn--block { width: 100%; }
.osm-hub-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.osm-hub-chip--teal { background: var(--hub-teal-bg); color: var(--hub-teal); }
.osm-hub-chip--orange { background: var(--hub-orange-bg); color: var(--hub-orange); }
.osm-hub-chip--blue { background: var(--hub-blue-bg); color: var(--hub-blue); }
.osm-hub-chip--red { background: var(--hub-red-bg); color: var(--hub-red); }
.osm-hub-chip--grey { background: var(--hub-grey-bg); color: var(--hub-grey); }
.osm-hub-muted { color: var(--hub-muted); }
.osm-hub-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; }
.osm-hub-notice { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 12px; font-size: 14px; text-align: left; }
.osm-hub-notice--warn { background: #FDF3E4; color: #7A3B06; }

/* ---- Overview ---- */
.osm-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.osm-hub-span2 { grid-column: 1 / -1; }
.osm-hub-panel { padding: 20px 22px; }
.osm-hub-h2 { margin: 0 0 10px !important; font-family: var(--hub-font); font-size: 18px; font-weight: 800; color: var(--hub-ink); line-height: 1.3; }
.osm-hub-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.osm-hub-tile {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--hub-line-2);
  border-radius: 12px; text-decoration: none !important; color: var(--hub-ink) !important; min-height: 44px;
}
.osm-hub-tile:hover { border-color: var(--hub-accent); background: #FBF8FE; }
.osm-hub-tile-ic { width: 40px; height: 40px; border-radius: 10px; flex: none; background: var(--hub-accent-soft); color: var(--hub-accent); display: flex; align-items: center; justify-content: center; }
.osm-hub-tile-text { display: flex; flex-direction: column; min-width: 0; }
.osm-hub-tile-title { font-weight: 800; }
.osm-hub-tile-sub { font-size: 13px; color: var(--hub-muted); }
.osm-hub-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hub-line-2); font-size: 15px; }
.osm-hub-row:first-of-type { border-top: 0; }
.osm-hub-row--top { align-items: flex-start; font-size: 14px; }
.osm-hub-row-text { flex: 1; min-width: 0; }
.osm-hub-row-when { flex: none; min-width: 120px; }
.osm-hub-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hub-accent); margin-top: 7px; flex: none; }
.osm-hub-list { margin: 0 !important; padding-left: 18px !important; line-height: 1.8; }

/* ---- Empty / no access ---- */
.osm-hub-empty { max-width: 440px; margin: 24px auto; padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.osm-hub-empty h2 { margin: 0 !important; font-size: 20px; font-weight: 800; font-family: var(--hub-font); }
.osm-hub-empty p { margin: 0 !important; color: var(--hub-muted); }
.osm-hub-empty-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--hub-grey-bg); color: var(--hub-grey); display: flex; align-items: center; justify-content: center; }

/* ---- Sign in ---- */
.osm-hub--signin { align-items: center; justify-content: center; padding: 48px 16px; }
.osm-hub-signin { width: 100%; max-width: 400px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.osm-hub-signin-title { margin: 0 !important; font-family: var(--hub-font); font-size: 22px; font-weight: 800; color: var(--hub-ink); }
.osm-hub-signin-text { margin: 0 !important; color: var(--hub-muted); }

.osm-hub-content { min-width: 0; }
.osm-hub-content img { max-width: 100%; height: auto; }

/* The hub has its own header — hide the theme's page title on the hub page. */
.osm-hub-page .wp-block-post-title, .osm-hub-page .entry-title, .osm-hub-page .page-title { display: none !important; }


/* =====================================================================
   Module screens — shared components
   ===================================================================== */
.osm-hub-view { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.osm-hub-view p { margin: 0; }
.osm-hub-small { font-size: 13px; }
.osm-hub-btn:disabled, .osm-hub-btn.is-busy { opacity: .6; cursor: not-allowed; }
.osm-hub-btn.is-busy { cursor: progress; }
.osm-hub-btn--danger { background: var(--hub-red-bg); border-color: #F3C9C4; color: var(--hub-red) !important; }
.osm-hub-btn--danger:hover { background: #F8D6D2; }
.osm-hub-btn--danger-ghost { border-color: #F0C7C2; color: var(--hub-red) !important; }
.osm-hub-btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.osm-hub-btn .osm-hub-ic { width: 18px; height: 18px; }
.osm-hub-notice .osm-hub-ic { flex: none; margin-top: 1px; }
.osm-hub-notice > span { flex: 1; }
.osm-hub-notice--error { background: var(--hub-red-bg); color: var(--hub-red); align-items: center; }
.osm-hub-notice--info { background: var(--hub-blue-bg); color: #1A3F80; }
.osm-hub-notice--warn { align-items: center; }

/* Toolbar */
.osm-hub-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px; }
.osm-hub-toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.osm-hub-toolbar-lbl { font-weight: 700; font-size: 14px; color: var(--hub-ink-2); }
.osm-hub-toolbar-search { flex: 1 1 220px; margin-left: auto; max-width: 340px; }
.osm-hub-input--date { width: auto; min-width: 150px; }
.osm-hub-searchbox { position: relative; display: flex; align-items: center; }
.osm-hub-quick { display: flex; gap: 6px; flex-wrap: wrap; }

/* Segmented control */
.osm-hub-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--hub-grey-bg); }
.osm-hub-seg-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--hub-ink-2); font: 700 15px var(--hub-font); cursor: pointer; white-space: nowrap;
}
.osm-hub-seg-btn:hover { color: var(--hub-ink); }
.osm-hub-seg-btn.is-on { background: var(--hub-surface); border-color: var(--hub-field); color: var(--hub-ink); box-shadow: 0 1px 2px rgba(27,21,48,.06); }
.osm-hub-seg-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--hub-accent-soft); color: var(--hub-accent-ink); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.osm-hub-seg-btn:not(.is-on) .osm-hub-seg-count { background: rgba(27,21,48,.08); color: var(--hub-grey); }

/* Filter chips */
.osm-hub-fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.osm-hub-fchips:empty { display: none; }
.osm-hub-fchip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--hub-field); background: var(--hub-surface); color: var(--hub-ink); font: 700 14px var(--hub-font); cursor: pointer; white-space: nowrap;
}
.osm-hub-fchip:hover { border-color: var(--hub-ink-2); }
.osm-hub-fchip.is-on { background: var(--hub-ink); border-color: var(--hub-ink); color: #FFFFFF; }
.osm-hub-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0; }
.osm-hub-dot--teal { background: var(--hub-teal); } .osm-hub-dot--orange { background: #C2620C; } .osm-hub-dot--blue { background: var(--hub-blue); }
.osm-hub-dot--red { background: var(--hub-red); } .osm-hub-dot--grey { background: var(--hub-grey); } .osm-hub-dot--accent { background: var(--hub-accent); }
.osm-hub-dot--faint { background: #B7B2C6; }
.osm-hub-fchip.is-on .osm-hub-dot { box-shadow: 0 0 0 2px #FFFFFF; }

/* List + detail split */
.osm-hub-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.osm-hub-split.has-detail { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
.osm-hub-listcard { overflow: hidden; }
.osm-hub-tablewrap { overflow-x: auto; }
.osm-hub-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 !important; border: 0 !important; }
.osm-hub-table th {
  text-align: left; padding: 12px 16px; color: var(--hub-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border: 0; border-bottom: 1px solid var(--hub-line); background: var(--hub-tint); white-space: nowrap;
}
.osm-hub-table td { padding: 12px 16px; border: 0; border-bottom: 1px solid var(--hub-line-2); vertical-align: middle; white-space: nowrap; background: transparent; }
.osm-hub-table tbody tr { cursor: pointer; }
.osm-hub-table tbody tr:hover td { background: #FBF9FE; }
.osm-hub-table tbody tr.is-sel td { background: #F6F0FD; }
.osm-hub-table tbody tr:last-child td { border-bottom: 0; }
.osm-hub-td-name { font-weight: 800; }
.osm-hub-rowbtn { all: unset; cursor: pointer; font-weight: 800; color: var(--hub-ink); border-radius: 4px; }
.osm-hub-rowbtn:focus-visible { outline: 3px solid var(--hub-accent); outline-offset: 2px; }
.osm-hub-notedot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--hub-accent); margin-left: 8px; vertical-align: middle; }
.osm-hub-mobile-meta { display: none; }
.osm-hub-progress { display: inline-flex; align-items: center; gap: 8px; }
.osm-hub-tablefoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--hub-line-2); font-size: 14px; color: var(--hub-muted); flex-wrap: wrap; }

.osm-hub-orphans { border-top: 1px solid var(--hub-line); }
.osm-hub-orphans summary { padding: 14px 16px; font-weight: 700; cursor: pointer; font-size: 14px; }
.osm-hub-orphans-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.osm-hub-inline-form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.osm-hub-row-inline { display: flex; gap: 8px; }
.osm-hub-row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.osm-hub-detail { padding: 20px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.osm-hub-detail[hidden] { display: none; }
.osm-hub-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.osm-hub-detail-title { margin: 0 !important; font: 800 22px/1.25 var(--hub-font); color: var(--hub-ink); outline: none; }
.osm-hub-detail-head p { margin: 2px 0 0; font-size: 14px; }
.osm-hub-detail-sec { display: flex; flex-direction: column; gap: 10px; }
.osm-hub-detail-sec > .osm-hub-lbl, .osm-hub-detail-sec > h3.osm-hub-lbl { margin: 0 !important; padding: 0; font-family: var(--hub-font); }
.osm-hub-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.osm-hub-stat { background: var(--hub-tint); border: 1px solid var(--hub-line-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.osm-hub-stat .osm-hub-lbl { padding: 0; font-size: 11px; }
.osm-hub-stat strong { font-size: 17px; font-weight: 800; line-height: 1.25; }
.osm-hub-steps { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.osm-hub-steps li { margin: 0; }
.osm-hub-step { all: unset; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font-size: 12px; color: var(--hub-muted); line-height: 1.25; border-radius: 4px; }
.osm-hub-step:focus-visible { outline: 3px solid var(--hub-accent); outline-offset: 2px; }
.osm-hub-step-bar { height: 5px; border-radius: 3px; background: var(--hub-line); }
.osm-hub-step.is-done .osm-hub-step-bar { background: var(--hub-accent); }
.osm-hub-step.is-current { color: var(--hub-accent-ink); font-weight: 800; }
.osm-hub-step.is-done:not(.is-current) { color: var(--hub-ink); font-weight: 700; }
.osm-hub-actions-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.osm-hub-actions-2 > :only-child { grid-column: 1 / -1; }
.osm-hub-contacts { display: flex; flex-direction: column; gap: 8px; }
.osm-hub-contact { border: 1px solid var(--hub-line); border-radius: 10px; padding: 10px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.osm-hub-contact a { color: var(--hub-ink) !important; text-decoration: none; }
.osm-hub-contact a:hover { color: var(--hub-accent-ink) !important; text-decoration: underline; }
.osm-hub-history { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.osm-hub-history li { display: flex; gap: 10px; align-items: baseline; margin: 0; }
.osm-hub-history .osm-hub-dot { position: relative; top: -1px; }
.osm-hub-task { display: flex; align-items: center; gap: 12px; border: 1px solid var(--hub-line); border-radius: 10px; padding: 12px; }
.osm-hub-task-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.osm-hub-task-text strong { font-size: 16px; }
.osm-hub-task-text span { font-size: 13px; color: var(--hub-muted); }

/* Summary cards (Members) */
.osm-hub-sumcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.osm-hub-sumcard { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.osm-hub-sumcard-n { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--hub-orange-bg); color: var(--hub-orange); }
.osm-hub-sumcard-n.is-ok { background: var(--hub-teal-bg); color: var(--hub-teal); }
.osm-hub-sumcard-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.osm-hub-sumcard-text strong { font-size: 16px; }
.osm-hub-sumcard-text span { font-size: 14px; color: var(--hub-muted); }
.osm-hub-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--hub-grey-bg); color: var(--hub-grey); font-size: 13px; font-weight: 800; white-space: nowrap; }

/* Skeleton + empty */
.osm-hub-skel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.osm-hub-skel-row { height: 18px; border-radius: 6px; background: linear-gradient(90deg, #EFEDF3 25%, #F7F6FA 50%, #EFEDF3 75%); background-size: 200% 100%; animation: osmHubShimmer 1.2s infinite; }
.osm-hub-skel-row:nth-child(3n) { width: 70%; }
@keyframes osmHubShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .osm-hub-skel-row { animation: none; } }
.osm-hub-empty-inline { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--hub-muted); }
.osm-hub-empty-inline strong { color: var(--hub-ink); font-size: 16px; }

/* Forms */
.osm-hub-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.osm-hub-field-lbl { font-weight: 700; font-size: 14px; color: var(--hub-ink); }
.osm-hub-field-hint { font-size: 13px; color: var(--hub-muted); }
.osm-hub-formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.osm-hub-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; min-height: 32px; }
.osm-hub-check input { width: 20px; height: 20px; margin: 1px 0 0 !important; accent-color: var(--hub-accent); flex: none; }
.osm-hub-radios { display: flex; flex-direction: column; gap: 8px; }
.osm-hub-radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--hub-line); border-radius: 10px; cursor: pointer; }
.osm-hub-radio:has(input:checked) { border-color: var(--hub-accent); background: #FBF8FE; }
.osm-hub-radio input { width: 18px; height: 18px; margin: 2px 0 0 !important; accent-color: var(--hub-accent); flex: none; }
.osm-hub-radio > span { display: flex; flex-direction: column; }
.osm-hub-radio .osm-hub-muted { font-size: 14px; }
.osm-hub-chipinput { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 5px 8px; border: 1px solid var(--hub-field); border-radius: 10px; background: var(--hub-surface); cursor: text; }
.osm-hub-chipinput:focus-within { border-color: var(--hub-accent); }
.osm-hub-chipinput-in { flex: 1; min-width: 100px; border: 0 !important; outline: 0; padding: 4px !important; font: 15px var(--hub-font); background: transparent !important; box-shadow: none !important; margin: 0 !important; }
.osm-hub-chipinput-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--hub-accent-soft); color: var(--hub-accent-ink); font-size: 14px; font-weight: 700; }
.osm-hub-chipinput-chip button, .osm-hub-filechip button { all: unset; cursor: pointer; display: inline-flex; padding: 2px; border-radius: 50%; }
.osm-hub-chipinput-chip .osm-hub-ic, .osm-hub-filechip .osm-hub-ic { width: 14px; height: 14px; }
.osm-hub-editor { border: 1px solid var(--hub-field); border-radius: 10px; overflow: hidden; background: var(--hub-surface); }
.osm-hub-editor:focus-within { border-color: var(--hub-accent); }
.osm-hub-editor-bar { display: flex; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--hub-line); background: var(--hub-tint); }
.osm-hub-editor-btn { all: unset; width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--hub-ink-2); }
.osm-hub-editor-btn:hover { background: var(--hub-hover); }
.osm-hub-editor-btn:focus-visible { outline: 3px solid var(--hub-accent); }
.osm-hub-editor-btn .osm-hub-ic { width: 18px; height: 18px; }
.osm-hub-editor-field { margin-left: auto !important; width: auto !important; min-height: 36px !important; font-size: 14px !important; }
.osm-hub-editor-area { min-height: 200px; max-height: 46vh; overflow-y: auto; padding: 14px 16px; font-size: 15px; line-height: 1.55; outline: none; }
.osm-hub-editor-area p { margin: 0 0 10px !important; }
.osm-hub-attach { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.osm-hub-filechip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--hub-field); border-radius: 10px; font-size: 14px; }
.osm-hub-filechip[hidden] { display: none; }

/* Modal */
.osm-hub-noscroll, .osm-hub-noscroll body { overflow: hidden; }
.osm-hub-modal-back { position: fixed; inset: 0; z-index: 100000; background: rgba(27,21,48,.5); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; font-family: var(--hub-font); }
.osm-hub-modal { width: 100%; max-width: 640px; background: var(--hub-surface); border-radius: 18px; box-shadow: 0 20px 60px rgba(27,21,48,.3); display: flex; flex-direction: column; color: var(--hub-ink); }
.osm-hub-modal--wide { max-width: 760px; }
.osm-hub-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--hub-line); }
.osm-hub-modal-title { margin: 0 !important; font: 800 20px/1.3 var(--hub-font); color: var(--hub-ink); }
.osm-hub-modal-sub { margin: 2px 0 0 !important; font-size: 14px; color: var(--hub-muted); }
.osm-hub-modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.osm-hub-modal-body p { margin: 0; }
.osm-hub-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--hub-line); background: var(--hub-tint); border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.osm-hub-modal-note { margin-right: auto; font-size: 13px; color: var(--hub-muted); flex: 1 1 200px; }
.osm-hub-xfer-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--hub-tint); }
.osm-hub-xfer-who-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.osm-hub-avatar--soft { background: var(--hub-accent-soft); color: var(--hub-accent-ink) !important; width: 44px; height: 44px; font-size: 16px; }
.osm-hub-modal .osm-hub-lbl { padding: 0; }

/* Toasts */
.osm-hub-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100001; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); font-family: var(--hub-font); }
.osm-hub-toast { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-radius: 12px; background: var(--hub-ink); color: #FFFFFF; font-size: 14px; box-shadow: 0 8px 24px rgba(27,21,48,.25); }
.osm-hub-toast > span { flex: 1; }
.osm-hub-toast--error { background: #7E1810; }
.osm-hub-toast--ok { background: #0B5551; }
.osm-hub-toast-act { color: #FFFFFF !important; font-weight: 800; }
.osm-hub-toast-x { all: unset; cursor: pointer; display: inline-flex; padding: 6px; border-radius: 8px; }
.osm-hub-toast-x:hover { background: rgba(255,255,255,.15); }
.osm-hub-toast-x .osm-hub-ic { width: 16px; height: 16px; }

/* Toggle switch */
.osm-hub-switch { position: relative; display: inline-flex; flex: none; }
.osm-hub-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.osm-hub-switch span { width: 40px; height: 24px; border-radius: 999px; background: #CFCAD9; transition: background .15s; position: relative; }
.osm-hub-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.osm-hub-switch input:checked + span { background: var(--hub-accent); }
.osm-hub-switch input:checked + span::after { transform: translateX(16px); }
.osm-hub-switch input:focus-visible + span { outline: 3px solid var(--hub-accent); outline-offset: 2px; }

/* Tick pills (section limits) */
.osm-hub-tickpills { display: flex; flex-wrap: wrap; gap: 8px; }
.osm-hub-tickpill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--hub-field); font-weight: 700; font-size: 14px; cursor: pointer; }
.osm-hub-tickpill input { width: 18px; height: 18px; margin: 0 !important; accent-color: var(--hub-accent); }
.osm-hub-tickpill:has(input:checked) { background: var(--hub-accent-soft); border-color: transparent; color: var(--hub-accent-ink); }

/* Sub-tabs inside a module (underline style) */
.osm-hub-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hub-line); flex-wrap: wrap; }
.osm-hub-subtab { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; margin: 0 10px -1px 0; border-bottom: 3px solid transparent; font-weight: 700; color: var(--hub-muted); }
.osm-hub-subtab.is-on { color: var(--hub-ink); border-bottom-color: var(--hub-accent); }
.osm-hub-subtab:focus-visible { outline: 3px solid var(--hub-accent); }

/* ---- Wide layout: break out of a narrow theme content column ----
   Uses margins (not transform) so fixed-position dialogs inside modules still
   position against the viewport. */
.osm-hub.osm-hub--wide {
  width: min(1440px, calc(100vw - 32px));
  max-width: none !important;
  margin-left: calc(50% - min(720px, 50vw - 16px)) !important;
  margin-right: calc(50% - min(720px, 50vw - 16px)) !important;
}
.osm-hub.osm-hub--wide.osm-hub--signin { width: auto; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }

/* ---- Phone / narrow ---- */
@media (max-width: 900px) {
  .osm-hub { border-radius: 0; border-left: 0; border-right: 0; min-height: 0; }
  .osm-hub.osm-hub--wide:not(.osm-hub--signin) { width: 100vw; margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important; }
  .osm-hub-side { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--hub-line); padding: 12px 16px; gap: 12px; }
  .osm-hub-menu-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--hub-field); background: var(--hub-surface); color: var(--hub-ink); font: 700 14px var(--hub-font); cursor: pointer;
  }
  .osm-hub-js .osm-hub-nav, .osm-hub-js .osm-hub-me { display: none; }
  .osm-hub-js .osm-hub-side.is-open .osm-hub-nav, .osm-hub-js .osm-hub-side.is-open .osm-hub-me { display: flex; }
  .osm-hub-main { padding: 16px 16px 32px; }
  .osm-hub-title { font-size: 22px; }
  .osm-hub-search { flex: 1 1 100%; }
  .osm-hub-grid { grid-template-columns: minmax(0, 1fr); }
  .osm-hub-row { flex-wrap: wrap; }
}

/* ---- Module screens on narrow screens ---- */
@media (max-width: 1100px) {
  .osm-hub-split.has-detail { grid-template-columns: minmax(0, 1fr); }
  .osm-hub-detail {
    position: fixed; inset: 0; z-index: 99990; border-radius: 0; max-height: none; border: 0;
    padding: 16px 16px 32px; box-shadow: none;
  }
  .osm-hub-sheet-open, .osm-hub-sheet-open body { overflow: hidden; }
}
@media (max-width: 700px) {
  .osm-hub-toolbar { padding: 10px; gap: 10px; }
  .osm-hub-toolbar > *, .osm-hub-toolbar-search { flex: 1 1 100%; max-width: none; margin-left: 0; }
  .osm-hub-seg { display: flex; flex-wrap: nowrap; overflow-x: auto; }
  .osm-hub-seg-btn { flex: 1 0 auto; justify-content: center; }
  .osm-hub-fchips, .osm-hub-quick { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .osm-hub-fchips::-webkit-scrollbar, .osm-hub-quick::-webkit-scrollbar { display: none; }
  .osm-hub-formgrid { grid-template-columns: minmax(0, 1fr); }
  .osm-hub-modal-back { padding: 0; }
  .osm-hub-modal { min-height: 100%; border-radius: 0; max-width: none; }
  .osm-hub-modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .osm-hub-modal-note { flex-basis: 100%; }
  /* Tables become a list of cards */
  .osm-hub-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .osm-hub-table--stack, .osm-hub-table--stack tbody { display: block; }
  .osm-hub-table--stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--hub-line-2); }
  .osm-hub-table--stack td { display: block; padding: 0; border: 0; white-space: normal; font-size: 14px; color: var(--hub-muted); }
  .osm-hub-table--stack td:first-child { grid-column: 1; font-size: 16px; color: var(--hub-ink); }
  .osm-hub-table--stack td[data-label] { grid-column: 1; }
  .osm-hub-table--stack td.osm-hub-td-chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .osm-hub-table--stack td.osm-hub-td-hide { display: none; }
  .osm-hub-mobile-meta { display: block; font-size: 14px; font-weight: 400; color: var(--hub-muted); margin-top: 2px; }
  .osm-hub-chip--fit { font-size: 0; }
  .osm-hub-chip--fit::before { content: attr(data-short); font-size: 13px; }
  .osm-hub-actions-2 { grid-template-columns: minmax(0, 1fr); }
  .osm-hub-steps { gap: 4px; }
  .osm-hub-step-lbl { font-size: 11px; }
}

/* ---- Bits shared by several screens ---- */
.osm-hub-sub { display: block; font-size: 13px; color: var(--hub-muted); font-weight: 400; }
.osm-hub-chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.osm-hub-chip--accent { background: var(--hub-accent-soft); color: var(--hub-accent-ink); }
.osm-hub-linkbtn { all: unset; cursor: pointer; font-weight: 700; text-decoration: underline; font-size: 14px; }
.osm-hub-iconbtn--sm { width: 32px; height: 32px; border-radius: 8px; font: 800 18px/1 var(--hub-font); cursor: pointer; }
.osm-hub-iconbtn:disabled { opacity: .4; cursor: not-allowed; }
.osm-hub-iconbtn--dark { background: transparent; border-color: rgba(255,255,255,.3); color: #FFFFFF !important; }
.osm-hub-iconbtn--dark:hover { background: rgba(255,255,255,.12); }
.osm-hub-btn--onDark { background: transparent; border-color: rgba(255,255,255,.3); color: #FFFFFF !important; }
.osm-hub-btn--onDark:hover { background: rgba(255,255,255,.12); }
.osm-hub-table--wrap td { white-space: normal; }
.osm-hub-tr-static { cursor: default !important; }
.osm-hub-tr-static:hover td { background: transparent !important; }
.osm-hub-listcard-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--hub-line); }
.osm-hub-listcard-head .osm-hub-searchbox { flex: 1; }
.osm-hub-progbar { display: block; height: 8px; border-radius: 999px; background: var(--hub-line); overflow: hidden; }
.osm-hub-progbar-fill { display: block; height: 100%; width: 0; background: var(--hub-teal); border-radius: inherit; transition: width .2s; }
.osm-hub-progbar.is-warn .osm-hub-progbar-fill { background: #C2620C; }
.osm-hub-meter { width: 260px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.osm-hub-meter .osm-hub-progbar-fill { background: var(--hub-accent); }
.osm-hub-done { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px 0; }
.osm-hub-done-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--hub-teal-bg); color: var(--hub-teal); display: flex; align-items: center; justify-content: center; }

/* ---- People & access ---- */
.osm-hub-toggles { display: flex; flex-direction: column; border-top: 1px solid var(--hub-line); }
.osm-hub-toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hub-line-2); cursor: pointer; }
.osm-hub-toggle-text { flex: 1; display: flex; flex-direction: column; font-size: 14px; }
.osm-hub-toggle-text span { color: var(--hub-muted); font-size: 13px; }

/* ---- Transfer log ---- */
.osm-hub-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 16px; }

/* ---- Files ---- */
.osm-hub-subtabs .osm-hub-seg-count { margin-left: 2px; }
.osm-hub-filesbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.osm-hub-filesbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.osm-hub-filesbar-actions .osm-hub-searchbox { width: 240px; }
.osm-hub-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 16px; }
.osm-hub-crumbs a { font-weight: 700; }
.osm-hub-crumb-sep { width: 16px; height: 16px; color: var(--hub-faint); }
.osm-hub-drop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border: 2px dashed var(--hub-field); border-radius: var(--hub-radius); background: var(--hub-tint); color: var(--hub-accent); }
.osm-hub-drop > div:not(.osm-hub-drop-prog) { display: flex; flex-direction: column; color: var(--hub-ink); flex: 1 1 260px; }
.osm-hub-drop.is-over { border-color: var(--hub-accent); background: #F6F0FD; }
.osm-hub-drop-prog { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--hub-ink); }
.osm-hub-drop-prog[hidden] { display: none; }
.osm-hub-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 18px; border-radius: var(--hub-radius); background: var(--hub-ink); color: #FFFFFF; position: sticky; top: 8px; z-index: 5; }
.osm-hub-selbar[hidden] { display: none; }
.osm-hub-selbar .osm-hub-linkbtn { color: #FFFFFF; font-size: 13px; font-weight: 600; }
.osm-hub-selbar-gap { flex: 1; }
.osm-hub-tiles-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.osm-hub-tiles-files > .osm-hub-skel, .osm-hub-tiles-files > .osm-hub-empty-inline, .osm-hub-tiles-files > .osm-hub-notice { grid-column: 1 / -1; }
.osm-hub-ftile { position: relative; background: var(--hub-surface); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.osm-hub-ftile:hover { border-color: var(--hub-field); }
.osm-hub-ftile.is-sel { border: 2px solid var(--hub-accent); padding: 7px 7px 9px; }
.osm-hub-ftile-open { position: absolute; inset: 0; z-index: 1; background: transparent; border: 0; border-radius: var(--hub-radius); cursor: pointer; padding: 0; }
.osm-hub-ftile-open:focus-visible { outline: 3px solid var(--hub-accent); outline-offset: 2px; }
.osm-hub-ftile-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #6E6886; overflow: hidden; margin-bottom: 8px; }
.osm-hub-ftile-thumb.is-folder { background: var(--hub-accent-soft); color: var(--hub-accent); }
.osm-hub-ftile-thumb .osm-hub-ic { width: 28px; height: 28px; }
.osm-hub-ftile-thumb img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; }
.osm-hub-ftile-cb { position: absolute; top: 14px; left: 14px; z-index: 2; width: 22px; height: 22px; margin: 0 !important; accent-color: var(--hub-accent); cursor: pointer; }
.osm-hub-ftile-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osm-hub-ftile-meta { font-size: 12px; color: var(--hub-muted); }
.osm-hub-sharerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--hub-line); border-radius: 12px; margin-top: 10px; }
.osm-hub-sharerow-text { flex: 1 1 260px; display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.osm-hub-sharerow-text strong { font-size: 16px; }
.osm-hub-folderpick { display: flex; flex-direction: column; border: 1px solid var(--hub-line); border-radius: 10px; max-height: 300px; overflow-y: auto; }
.osm-hub-folderpick-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--hub-line-2); cursor: pointer; }
.osm-hub-folderpick-item span { flex: 1; font-weight: 600; }
.osm-hub-folderpick-item:hover { background: var(--hub-tint); }
.osm-hub-folderpick-item:disabled { opacity: .4; cursor: not-allowed; }
.osm-hub-folderpick-item:focus-visible { outline: 3px solid var(--hub-accent); outline-offset: -3px; }
.osm-hub-modal--media { max-width: 1000px; }
.osm-hub-lightbox { display: flex; justify-content: center; background: #15111F; border-radius: 10px; min-height: 200px; }
.osm-hub-lightbox-img { max-width: 100%; max-height: 70vh; object-fit: contain; display: block; }

/* ---- Minibus ---- */
.osm-hub-mb-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 20px; align-items: start; }
.osm-hub-cal { overflow: hidden; }
.osm-hub-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.osm-hub-cal-title { margin: 0 !important; font-size: 20px; }
.osm-hub-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--hub-line); }
.osm-hub-cal-dow { padding: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--hub-muted); background: var(--hub-tint); border-bottom: 1px solid var(--hub-line); }
.osm-hub-cal-day { min-height: 92px; padding: 6px 8px; border-right: 1px solid var(--hub-line-2); border-bottom: 1px solid var(--hub-line-2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.osm-hub-cal-day:nth-child(7n) { border-right: 0; }
.osm-hub-cal-day.is-out { background: #FCFBFD; color: var(--hub-faint); }
.osm-hub-cal-n { font-size: 14px; font-weight: 700; }
.osm-hub-cal-day.is-today .osm-hub-cal-n { background: var(--hub-accent); color: #FFFFFF; border-radius: 999px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.osm-hub-cal-ev { font-size: 12px; font-weight: 700; color: var(--hub-accent-ink); background: var(--hub-accent-soft); border-radius: 6px; padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osm-hub-cal-more { font-size: 11px; color: var(--hub-muted); }
.osm-hub-cal-upcoming { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.osm-hub-cal-upcoming .osm-hub-lbl { padding: 0; }
.osm-hub-evpill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--hub-line); border-radius: 999px; font-size: 14px; }
.osm-hub-mbform { display: flex; flex-direction: column; gap: 14px; }
.osm-hub-mbform .osm-hub-h2 { margin: 0 !important; }

/* ---- Kit store ---- */
.osm-hub-split--basket.has-detail { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); }
.osm-hub-kitgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.osm-hub-kitgrid > .osm-hub-skel, .osm-hub-kitgrid > .osm-hub-empty-inline, .osm-hub-kitgrid > .osm-hub-notice { grid-column: 1 / -1; }
.osm-hub-kitcard { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.osm-hub-kitcard.is-sel { border-color: var(--hub-accent); box-shadow: 0 0 0 1px var(--hub-accent); }
.osm-hub-kitcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.osm-hub-kitcard-top strong { font-size: 16px; }
.osm-hub-kitcard-desc { font-size: 14px; color: var(--hub-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.osm-hub-kitcard .osm-hub-row-between { margin-top: auto; padding-top: 6px; }
.osm-hub-stepper { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.osm-hub-stepper span { min-width: 18px; text-align: center; }
.osm-hub-basket { padding: 18px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.osm-hub-basket .osm-hub-h2 { margin: 0 !important; }
.osm-hub-basket-list { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; }
.osm-hub-basket-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hub-line-2); margin: 0; font-size: 14px; }
.osm-hub-basket-list li > span:first-child { flex: 1; font-weight: 600; }
.osm-hub-kitreq { display: flex; flex-direction: column; gap: 10px; }
.osm-hub-kitreq.is-overdue { border-color: #F0C7C2; }
.osm-hub-returnlist { display: flex; flex-direction: column; gap: 8px; }
.osm-hub-returnrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hub-line-2); }

@media (max-width: 1100px) {
  .osm-hub-mb-layout, .osm-hub-split--basket.has-detail { grid-template-columns: minmax(0, 1fr); }
  .osm-hub-basket { position: static; }
  .osm-hub-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .osm-hub-meter { width: 100%; }
  .osm-hub-head-actions { width: 100%; }
  .osm-hub-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .osm-hub-filesbar-actions, .osm-hub-filesbar-actions .osm-hub-searchbox { width: 100%; }
  .osm-hub-filesbar-actions .osm-hub-btn { flex: 1; }
  .osm-hub-tiles-files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .osm-hub-cal-day { min-height: 54px; padding: 4px; }
  .osm-hub-cal-ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; background: var(--hub-accent); }
  .osm-hub-cal-more { display: none; }
  .osm-hub-cal-dow { padding: 6px 2px; text-align: center; font-size: 11px; }
  .osm-hub-returnrow { grid-template-columns: minmax(0, 1fr); }
  .osm-hub-selbar { padding: 10px; }
  .osm-hub-selbar .osm-hub-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .osm-hub-row-between { flex-wrap: wrap; }
  .osm-hub-kitreq .osm-hub-row-inline { flex-wrap: wrap; }
}

/* Panel titles are focused by script for screen readers — no ring needed. */
.osm-hub-detail-title:focus, .osm-hub-detail-title:focus-visible { outline: none !important; }
/* Tighter table when the side panel is open. */
.osm-hub-split.has-detail .osm-hub-table th, .osm-hub-split.has-detail .osm-hub-table td { padding-left: 10px; padding-right: 10px; }
.osm-hub-split.has-detail .osm-hub-table th:first-child, .osm-hub-split.has-detail .osm-hub-table td:first-child { padding-left: 16px; }

/* ---- Phone bottom tab bar ---- */
.osm-hub-bottomnav { display: none; }
@media (max-width: 700px) {
  .osm-hub-bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; background: var(--hub-surface);
    border-top: 1px solid var(--hub-line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); font-family: var(--hub-font);
  }
  .osm-hub-bottomnav a, .osm-hub-bottomnav button {
    all: unset; box-sizing: border-box; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px;
    justify-content: center; font-size: 12px; font-weight: 700; color: var(--hub-muted) !important; text-decoration: none !important; cursor: pointer; border-radius: 10px;
  }
  .osm-hub-bottomnav .is-current { color: var(--hub-accent) !important; }
  .osm-hub-bottomnav a:focus-visible, .osm-hub-bottomnav button:focus-visible { outline: 3px solid var(--hub-accent); }
  .osm-hub-main { padding-bottom: 96px; }
  .osm-hub-toasts { bottom: 84px; }
  .osm-hub-menu-btn { display: none !important; }
}

/* Kit: jump-to-basket button (narrow screens, where the basket is below the list) */
.osm-hub-basketbar { display: none; }
@media (max-width: 1100px) {
  .osm-hub-basketbar:not([hidden]) {
    display: block; position: sticky; bottom: 12px; z-index: 8; width: 100%; min-height: 48px; border: 0; border-radius: 12px;
    background: var(--hub-accent); color: #FFFFFF; font: 800 15px var(--hub-font); cursor: pointer; box-shadow: 0 8px 24px rgba(27,21,48,.25);
  }
}
@media (max-width: 700px) {
  .osm-hub-basketbar:not([hidden]) { bottom: 84px; }
  .osm-hub-selbar { flex-wrap: nowrap; gap: 6px; top: 4px; }
  .osm-hub-selbar .osm-hub-linkbtn, .osm-hub-selbar-gap { display: none; }
  .osm-hub-selbar > strong { flex: 1; font-size: 14px; }
  .osm-hub-selbar .osm-hub-btn { padding: 0 10px; min-width: 44px; }
  .osm-hub-selbar .osm-hub-iconbtn { width: 44px; height: 44px; }
}

/* Members: six group headers */
.osm-hub-table .osm-hub-grouprow th { background: var(--hub-tint); color: var(--hub-ink); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 800; padding: 10px 16px; border-top: 1px solid var(--hub-line); }
.osm-hub-table .osm-hub-grouprow { cursor: default; }
.osm-hub-table .osm-hub-grouprow:hover th { background: var(--hub-tint); }
@media (max-width: 700px) {
  .osm-hub-table--stack tr.osm-hub-grouprow { display: block; padding: 0; }
  .osm-hub-table--stack tr.osm-hub-grouprow th { display: block; }
}
.osm-hub-roletag { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 6px; background: var(--hub-accent-soft); color: var(--hub-accent-ink); font-size: 11px; font-weight: 800; vertical-align: 1px; }
.osm-hub-modal--member { max-width: 560px; }
.osm-hub-modal--member .osm-hub-modal-body { gap: 18px; padding-bottom: 24px; }
.osm-hub-task.is-done { background: var(--hub-tint); border-color: var(--hub-line-2); }
.osm-hub-task.is-done .osm-hub-task-text strong, .osm-hub-task.is-done .osm-hub-task-text span { color: var(--hub-muted); }
.osm-hub-task.is-done .osm-hub-btn { background: var(--hub-grey-bg); border-color: transparent; color: var(--hub-faint) !important; opacity: 1; }
/* With the side panel open, let cells wrap instead of clipping the last column. */
.osm-hub-split.has-detail .osm-hub-table td { white-space: normal; }
.osm-hub-split.has-detail .osm-hub-table .osm-hub-chip { white-space: normal; text-align: left; line-height: 1.25; padding-top: 3px; padding-bottom: 3px; }
