/* ============================================================
   TownSuite eServices redesign — production stylesheet
   Source: Claude Design handoff bundle (eservices-redesign)
   Scope: brand tokens (light+dark), global shell (top bar +
   app switcher + per-product sidebar), form primitives,
   Time Off Request page (Option B, guided steps), responsive.
   Apply by adding class "ts-app" to <body> in _SiteLayout.
   Dark theme = body.ts-app.is-dark (toggled by townsuite-shell.js).
   ============================================================ */

/* ---------- brand type: Dax (Expedition skin) ---------- */
@font-face {
  font-family: 'Dax';
  src: url('/assets/fonts/dax-regular.ttf') format('truetype'),
       url('/assets/fonts/dax-regular.otf') format('opentype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens (Expedition palette — townsuite.com 2026) ---------- */
body.ts-app {
  --bg: #EFF3F8; --side: #FFFFFF; --card: #FFFFFF; --inset: #F3F6FA;
  --line: #DCE4EC; --line-soft: #E8EEF4;
  --head: #13212D; --text: #44586A; --muted: #5C6A77; --faint: #65737D;
  --navy: #003C63; --navy-deep: #003C63;
  --blue: #00578E;
  --blue-soft: color-mix(in oklab, #00578E 10%, white);
  --blue-line: color-mix(in oklab, #00578E 28%, white);
  --green: #2DA343; --red: #CE2D32; --amber: #E48D1A;
  background: var(--bg); color: var(--text);
  font-family: 'Dax', 'Source Sans 3', 'Instrument Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14.5px; line-height: 1.45; font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased; color-scheme: light;
  margin: 0;
}
body.ts-app ::selection { background: #00578E; color: #fff; }
body.ts-app.is-dark {
  --bg: #071420; --side: #0A1B2A; --card: #0D2032; --inset: #122A3F;
  --line: #1C3850; --line-soft: #173049;
  --head: #E9F0F6; --text: #A8BBCA; --muted: #8597A6; --faint: #8294A3;
  --navy: #00578E;
  --blue: color-mix(in oklab, #00578E 52%, white);
  --blue-soft: color-mix(in oklab, #00578E 17%, #0D2032);
  --blue-line: color-mix(in oklab, #00578E 42%, #0D2032);
  --green: #44B25D; --red: #E5716D; --amber: #E8A14A;
  color-scheme: dark;
}

.ts-dia { display: inline-block; width: 7px; height: 7px; border-radius: 1.5px; transform: rotate(45deg); background: currentColor; flex: none; }

/* ---------- shell layout ---------- */
.ts-shell-row { display: flex; min-height: calc(100vh - 58px); align-items: stretch; }
.ts-main { flex: 1; min-width: 0; }

/* ---------- top bar ---------- */
.ts-top { height: 58px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.ts-top-logo { display: flex; align-items: center; gap: 7px; cursor: pointer; text-decoration: none; }
.ts-logo-img { display: block; height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.ts-top .ts-logo-img.is-on-dark { display: none; }
body.is-dark .ts-top .ts-logo-img.is-on-dark { display: block; }
body.is-dark .ts-top .ts-logo-img.is-on-light { display: none; }
.ts-logo-word { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; color: var(--head); }
.ts-logo-dias { display: inline-flex; gap: 3px; align-items: center; }
.ts-logo-dias .ts-dia:nth-child(1) { color: #E48D1A; }
.ts-logo-dias .ts-dia:nth-child(2) { color: #2DA343; width: 5px; height: 5px; }
.ts-logo-dias .ts-dia:nth-child(3) { color: #E03A3E; width: 4px; height: 4px; }
.ts-top-sep { width: 1px; height: 22px; background: var(--line); }
.ts-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* app switcher */
.ts-switchwrap { position: relative; }
.ts-switch { height: 38px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); padding: 0 13px; font-size: 13.5px; font-weight: 600; color: var(--head); cursor: pointer; }
.ts-switch:hover { background: var(--inset); }
.ts-grid9 { display: grid; grid-template-columns: repeat(3, 3px); gap: 2.5px; }
.ts-grid9 span { width: 3px; height: 3px; border-radius: 1px; background: var(--blue); }
.ts-chev { width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg) translateY(-2px); flex: none; }
.ts-pop { position: absolute; top: 46px; left: 0; width: min(384px, calc(100vw - 32px)); z-index: 140; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(12,44,73,0.18); padding: 16px; display: none; }
.ts-pop.is-open { display: block; }
.ts-pop-head { font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 0 4px 8px; }
.ts-pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ts-pop-app { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: none; }
.ts-pop-app:hover:not(.is-current) { background: var(--inset); }
.ts-pop-app .ts-dia { width: 7px; height: 7px; color: #B9C8D4; }
.ts-pop-app.is-current { background: var(--blue-soft); color: var(--navy); }
.ts-pop-app.is-current .ts-dia, body.is-dark .ts-pop-app.is-current { color: var(--blue); }
.ts-pop-block + .ts-pop-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.ts-pop-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; gap: 18px; font-size: 12.5px; }

/* icon buttons / badges / avatar / avatar menu */
.ts-iconbtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; position: relative; background: var(--card); cursor: pointer; }
.ts-iconbtn:hover { background: var(--inset); }
/* FontAwesome glyphs used in the top-bar icon buttons (Finance, Notifications) */
a.ts-iconbtn { text-decoration: none; }
.ts-iconbtn .fa { font-size: 15px; line-height: 1; color: var(--muted); }
.ts-iconbtn:hover .fa { color: var(--head); }
/* display:grid !important so the count stays centered even when BackgroundTasks()
   forces an inline display:block on #notification_fullcount / #cart_fullcount */
.ts-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 999px; background: #CE2D32; color: #fff; font-size: 9.5px; font-weight: 700; display: grid !important; place-items: center; padding: 0 4px; border: 1.5px solid var(--side); }
/* CartCount()/BackgroundTasks() empty the badge when 0 — hide the empty badge */
.ts-badge:empty { display: none !important; }

/* ---- notifications dropdown (bell) ---- */
.ts-notifwrap { position: relative; }
.ts-notif { position: absolute; right: 0; top: 44px; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(12,44,73,0.18); padding: 8px; z-index: 140; display: none; }
.ts-notif.is-open { display: block; }
.ts-notif-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; font-size: 13.5px; font-weight: 700; color: var(--head); }
.ts-notif-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; text-decoration: none; cursor: pointer; }
.ts-notif-item:hover { background: var(--inset); }
.ts-notif-ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.ts-notif-ic .fa { font-size: 15px; }
.ts-notif-ic.is-news { background: rgba(245,166,35,0.14); } .ts-notif-ic.is-news .fa { color: var(--amber); }
.ts-notif-ic.is-receipts { background: var(--blue-soft); } .ts-notif-ic.is-receipts .fa { color: var(--blue); }
.ts-notif-ic.is-complaints { background: rgba(46,160,67,0.14); } .ts-notif-ic.is-complaints .fa { color: var(--green); }
.ts-notif-tx { display: flex; flex-direction: column; min-width: 0; }
.ts-notif-t { font-size: 13px; font-weight: 600; color: var(--head); }
.ts-notif-s { font-size: 12px; color: var(--muted); }
.ts-notif-more { justify-content: space-between; border-top: 1px solid var(--line-soft); margin-top: 6px; border-radius: 0 0 8px 8px; }
.ts-notif-more small { font-size: 12.5px; font-weight: 600; color: var(--blue); }
.ts-notif-count { min-width: 18px; height: 18px; border-radius: 999px; background: #CE2D32; color: #fff; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; }
.ts-notif-count:empty { display: none; }
.ts-cartic { width: 13px; height: 9px; border: 1.6px solid var(--muted); border-top: none; border-radius: 0 0 4px 4px; position: relative; margin-top: 5px; }
.ts-cartic::before { content: ''; position: absolute; top: -6px; left: 1.5px; right: 1.5px; height: 6px; border: 1.6px solid var(--muted); border-bottom: none; border-radius: 5px 5px 0 0; }
.ts-bell { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--muted); }
.ts-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; cursor: pointer; }
.ts-avatarwrap { position: relative; }
.ts-usermenu { position: absolute; right: 0; top: 44px; width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(12,44,73,0.18); padding: 8px; z-index: 140; display: none; }
.ts-usermenu.is-open { display: block; }
.ts-usermenu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.ts-usermenu-name { font-size: 13.5px; font-weight: 700; color: var(--head); }
.ts-usermenu-mail { font-size: 12px; color: var(--muted); }
.ts-usermenu-item { display: block; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; text-decoration: none; }
.ts-usermenu-item:hover { background: var(--inset); }
.ts-usermenu-item.is-danger { color: var(--red); }

/* theme cycle button icons */
.ts-ic-sun { width: 10px; height: 10px; border-radius: 50%; border: 1.7px solid var(--muted); box-shadow: 0 -7px 0 -5px var(--muted), 0 7px 0 -5px var(--muted), -7px 0 0 -5px var(--muted), 7px 0 0 -5px var(--muted); }
.ts-ic-moon { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 3.5px -2.5px 0 0 var(--muted); }
.ts-ic-auto { width: 11px; height: 11px; border-radius: 50%; border: 1.7px solid var(--muted); background: linear-gradient(90deg, var(--muted) 50%, transparent 50%); }

/* ============================================================
   Unified-tree sidebar (Sidebar Menu Options — "Unified tree")
   Every product + its modules in one filterable accordion.
   ============================================================ */
.ts-side.sb-tree { width: 252px; padding: 14px 10px 12px; }
.sb-treehead { padding: 0 2px 10px; }
.sb-filter { position: relative; display: flex; align-items: center; }
.sb-filter-in {
  width: 100%; box-sizing: border-box; height: 38px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; font-size: 13px; padding: 0 12px 0 32px;
}
.sb-filter-in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,142,0.14); }
.sb-filter-in::placeholder { color: var(--faint); }
.sb-filter-ic {
  position: absolute; left: 11px; width: 12px; height: 12px; pointer-events: none;
  border: 2px solid var(--faint); border-radius: 50%; box-sizing: border-box;
}
.sb-filter-ic::after {
  content: ''; position: absolute; left: 9px; top: 9px; width: 6px; height: 2px;
  background: var(--faint); border-radius: 1px; transform: rotate(45deg); transform-origin: left center;
}
.sb-treenav { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sb-scroll { overflow-y: auto; overflow-x: hidden; min-height: 0; }
.sb-grouplabel {
  font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--faint); font-weight: 700; padding: 4px 10px 6px;
}
.sb-treeadmin-label { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.sb-empty { font-size: 12px; color: var(--faint); padding: 8px 10px; line-height: 1.5; }

/* monogram chip — scannable per-app identity */
.sb-mono {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: 0.2px;
  background: var(--inset); color: var(--muted); border: 1px solid var(--line-soft);
}

.sb-treeapp { display: flex; flex-direction: column; }
.sb-treerow { display: flex; align-items: center; border-radius: 9px; transition: background 0.12s ease; }
.sb-treerow:hover { background: var(--inset); }
.sb-treerow.is-active { background: transparent; }
.sb-treerow-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  border: none; background: transparent; cursor: pointer; text-decoration: none;
  padding: 6px 4px 6px 6px; font: inherit; text-align: left;
}
.sb-treerow-main:hover { text-decoration: none; }
.sb-treename { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-treerow.is-active .sb-treename { color: var(--navy); }
body.is-dark .sb-treerow.is-active .sb-treename { color: var(--blue); }
.sb-treerow.is-active .sb-mono { background: var(--navy); color: #fff; border-color: var(--navy); }
body.is-dark .sb-treerow.is-active .sb-mono { color: #06131d; background: var(--blue); border-color: var(--blue); }
.sb-treetoggle {
  width: 30px; height: 32px; flex: none; border: none; background: transparent;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.sb-treetoggle.is-leaf { cursor: default; }
.sb-treetoggle .ts-chev { transform: rotate(-45deg); transition: transform 0.15s ease; }
.sb-treetoggle.is-open .ts-chev { transform: rotate(45deg) translateY(-1px); }
.sb-treekids {
  display: flex; flex-direction: column; gap: 1px;
  margin: 1px 0 4px 17px; padding-left: 9px; border-left: 1.5px solid var(--line-soft);
}
.sb-treekids.is-collapsed { display: none; }
.sb-treekids .ts-navitem { padding: 6px 9px; font-size: 13px; }
.sb-treekids .ts-navitem span { white-space: nowrap; }

/* ---------- product sidebar (reads from menunav) ---------- */
.ts-side { width: 224px; flex: none; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px; }
.ts-prod { display: flex; align-items: center; gap: 11px; padding: 4px 8px 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.ts-prod-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-soft); display: grid; place-items: center; flex: none; }
.ts-prod-icon .ts-dia { width: 10px; height: 10px; border-radius: 2.5px; color: var(--blue); }
.ts-prod-name { font-size: 14.5px; font-weight: 700; color: var(--head); line-height: 1.2; }
.ts-prod-sub { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); margin-top: 1px; }
.ts-nav { display: flex; flex-direction: column; gap: 1px; }
.ts-navitem { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none; }
.ts-navitem:hover:not(.is-active) { background: var(--inset); }
.ts-navitem .ts-dia { width: 6px; height: 6px; color: #B9C8D4; }
body.is-dark .ts-navitem .ts-dia { color: #364755; }
.ts-navitem.is-active { color: var(--navy); font-weight: 600; }
body.is-dark .ts-navitem.is-active { color: var(--blue); }
.ts-navitem.is-active .ts-dia { color: var(--blue); }
.ts-navgroup { margin-top: 6px; }
.ts-navgrouphead { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px 4px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); font-weight: 600; cursor: pointer; }
.ts-navgrouphead .ts-chev { transform: rotate(45deg); transition: transform .15s ease; }
.ts-navgrouphead.is-collapsed .ts-chev { transform: rotate(-45deg); }
.ts-navgroup.is-collapsed .ts-navitem { display: none; }
.ts-side-foot { margin-top: auto; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.ts-side-foot .ts-navitem { color: var(--muted); font-size: 12.5px; }

/* burger + drawer */
.ts-burger { display: none; }
.ts-burger-bars { width: 14px; height: 2px; background: var(--muted); border-radius: 1px; position: relative; }
.ts-burger-bars::before, .ts-burger-bars::after { content: ''; position: absolute; left: 0; width: 14px; height: 2px; background: var(--muted); border-radius: 1px; }
.ts-burger-bars::before { top: -5px; } .ts-burger-bars::after { top: 5px; }
.ts-navoverlay { position: fixed; inset: 0; background: rgba(10,20,30,0.45); z-index: 160; display: none; }
body.ts-drawer-open .ts-navoverlay { display: block; animation: tsfade .15s ease; }
body.ts-drawer-open .ts-side { display: flex; position: fixed; top: 0; left: 0; bottom: 0; width: 264px; z-index: 170; box-shadow: 24px 0 60px rgba(0,0,0,0.25); overflow-y: auto; animation: tsdrawer .18s ease; }
@keyframes tsfade { from { opacity: 0; } }
@keyframes tsdrawer { from { transform: translateX(-30px); opacity: 0; } }

/* toast */
.ts-toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--head); color: var(--bg); padding: 11px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 500; z-index: 200; box-shadow: 0 12px 34px rgba(0,0,0,0.28); animation: tstoast .18s ease; pointer-events: none; white-space: nowrap; }
@keyframes tstoast { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* ---------- form primitives ---------- */
.ts-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ts-label { font-size: 12.5px; font-weight: 600; color: var(--head); display: flex; gap: 3px; margin: 0; }
.ts-req { color: var(--red); }
.ts-app .ts-input, .ts-app input.ts-input, .ts-app select.ts-input, .ts-app textarea.ts-input,
.ts-app .ts-formwrap .form-control, .ts-app .ts-formwrap .input-full-width,
.ts-app .ts-formwrap .k-input, .ts-app .ts-formwrap .k-picker {
  min-height: 40px; border: 1px solid var(--line); border-radius: 9px !important;
  background: var(--card); padding: 0 12px; font: inherit; font-size: 14px;
  color: var(--text); width: 100%; box-sizing: border-box;
}
.ts-app .ts-formwrap .form-control:focus, .ts-app .ts-input:focus,
.ts-app .ts-formwrap .k-focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,165,0.14); }
.ts-app textarea.ts-input { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.ts-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); font-weight: 500; cursor: pointer; }
.ts-check input { width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; margin: 0; }
body.is-dark .ts-check input { accent-color: var(--blue); }

.ts-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 11px; font-size: 13.5px; font-weight: 700; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: filter .12s ease, background .12s ease, transform .06s ease; text-decoration: none; }
.ts-btn:active { transform: translateY(1px); }
.ts-btn.is-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(0,87,142,0.16); }
.ts-btn.is-primary:hover { filter: brightness(1.12); }
body.is-dark .ts-btn.is-primary { color: #F2F7FB; box-shadow: none; }
.ts-btn.is-secondary { background: var(--card); color: var(--head); border-color: var(--line); }
.ts-btn.is-secondary:hover, .ts-btn.is-add:hover { background: var(--inset); }
.ts-btn.is-add { background: var(--card); color: var(--navy); border-color: #C7D8E5; }
body.is-dark .ts-btn.is-add { color: var(--blue); border-color: var(--blue-line); }
.ts-btn.is-danger { background: var(--red); color: #fff; border-color: var(--red); }
.ts-btn.is-danger:hover { filter: brightness(1.08); }
.ts-btn.is-block { width: 100%; }
.ts-plus { font-size: 16px; font-weight: 600; line-height: 1; margin-top: -1px; }
.ts-arrow { font-size: 15px; line-height: 1; }
.ts-link { color: var(--blue); font-weight: 600; cursor: pointer; }
.ts-link:hover { text-decoration: underline; }

.ts-datepill { font-size: 12.5px; font-weight: 600; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-line); padding: 4px 11px; border-radius: 999px; }
.ts-leavechip { font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-line); padding: 3px 9px; border-radius: 6px; display: inline-block; }
.ts-tag { font-size: 12px; font-weight: 600; color: #1E7E34; background: #EAF5EE; border: 1px solid #D3E8DB; padding: 3px 9px; border-radius: 999px; }
body.is-dark .ts-tag { color: #8FD4AC; background: rgba(63,168,110,0.14); border-color: rgba(63,168,110,0.35); }

/* ---------- Time Off Request — Option B (guided steps) ---------- */
.ob-main { flex: 1; padding: 28px 40px 36px; min-width: 0; max-width: 1150px; }
/* page header — branded banner card by default (the "Municipal info" hero,
   site-wide). Any page that renders an .ob-pagehead gets it; pages without
   a header gain nothing. is-hero adds the icon + subtitle extras. */
.ob-pagehead {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; margin-bottom: 26px; border-radius: 14px;
  background: linear-gradient(180deg, var(--inset), var(--card));
  border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(12,44,73,0.04);
  position: relative; overflow: hidden;
}
.ob-pagehead::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--navy), var(--blue));
}
.ob-h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; color: var(--head); margin: 0; line-height: 1.15; }
.ob-pagehead-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- hero pagehead variant (adds icon tile + subtitle) ---- */
.ob-hero-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--blue-soft); border: 1px solid var(--blue-line);
}
.ob-hero-icon .ts-dia { width: 13px; height: 13px; border-radius: 3px; color: var(--blue); }
.ob-hero-icon em { font-size: 19px; color: var(--blue); }
.ob-hero-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ob-pagehead.is-hero .ob-h1 { font-size: 24px; line-height: 1.1; }
.ob-hero-sub { font-size: 13px; color: var(--muted); }

/* form + summary rail layout (Time Off Request) */
.ob-main.has-aside { max-width: none; }
/* records review table: scroll horizontally rather than crushing columns */
.desktopViewPTO .table-responsive { overflow-x: auto; border: 0; }
.desktopViewPTO .ob-table { min-width: 720px; }
.ob-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.ob-layout > form { min-width: 0; }
.ob-aside { position: sticky; top: 78px; min-width: 0; }
.ob-summary .pg-card-title { margin-bottom: 6px; }
.ob-sumrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.ob-sumlabel { color: var(--muted); flex: none; }
.ob-sumval { display: flex; align-items: center; gap: 8px; color: var(--head); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ob-sumavatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; }
.ob-sumavatar:empty { display: none; }
.ob-sumpill { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 14px; padding: 18px 18px; margin: 16px 0; }
body.is-dark .ob-sumpill { color: #F2F7FB; }
.ob-sumpill-num { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.ob-sumpill-label { font-size: 13px; font-weight: 600; opacity: 0.92; }
.ob-sumpill-range { margin-left: auto; font-size: 12.5px; font-weight: 600; opacity: 0.85; white-space: nowrap; }
.ob-sumnote { margin-top: 12px; text-align: center; font-size: 12px; color: var(--faint); }
@media (max-width: 1280px) {
  .ob-layout { grid-template-columns: 1fr; }
  .ob-aside { position: static; }
}

.ob-steps { display: flex; flex-direction: column; counter-reset: obstep; }
.ob-step { display: flex; gap: 22px; counter-increment: obstep; }
.ob-step-rail { width: 34px; flex: none; display: flex; flex-direction: column; align-items: center; }
.ob-step-num { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--navy); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
body.is-dark .ob-step-num { color: var(--blue); }
.ob-step-line { width: 1.5px; flex: 1; background: var(--line); margin: 6px 0; }
.ob-step-body { flex: 1; min-width: 0; padding-bottom: 26px; }
.ob-step:last-child .ob-step-body { padding-bottom: 0; }
.ob-step-title { font-size: 16.5px; font-weight: 700; color: var(--head); letter-spacing: -0.2px; padding-top: 5px; margin-bottom: 3px; }
.ob-step-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }

.ob-card { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(12,44,73,0.04); }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.ob-grid .is-span2 { grid-column: span 2; }

/* record composer — same card surface as the other steps */
.ob-composer { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(12,44,73,0.04); }
.ob-composer .ts-formwrap .form-control, .ob-composer .ts-input { background: var(--card); }
.ob-composer-grid { display: grid; grid-template-columns: 1.5fr 1.15fr 1.15fr 0.55fr; gap: 14px; }
.ob-composer-foot { display: flex; align-items: center; gap: 18px; margin-top: 15px; flex-wrap: wrap; }
.ob-duration { font-size: 12.5px; color: var(--muted); }
.ob-duration b { color: var(--head); }
.ob-composer-foot .ts-btn.is-add { margin-left: auto; }

/* records table */
.ob-table { width: 100%; border-collapse: collapse; }
.ob-table th { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; color: var(--faint); text-align: left; padding: 4px 12px 10px; border-bottom: 1px solid var(--line); background: transparent; }
.ob-table td { padding: 13px 12px; font-size: 13.5px; color: var(--text); border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ob-table tr:last-child td { border-bottom: none; }
.ob-table .is-right { text-align: right; }
.ob-units { font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; }
.ob-rowactions { display: flex; gap: 2px; justify-content: flex-end; }
.ob-rowaction { font-size: 12.5px; font-weight: 600; color: var(--blue); padding: 4px 7px; border-radius: 6px; cursor: pointer; border: none; background: none; font-family: inherit; }
.ob-rowaction:hover { background: var(--blue-soft); }
.ob-rowaction.is-danger { color: var(--red); }
.ob-rowaction.is-danger:hover { background: #F9ECEA; }
body.is-dark .ob-rowaction.is-danger:hover { background: rgba(210,101,92,0.15); }
.ob-table-foot { display: flex; align-items: center; gap: 6px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.ob-table-foot b { color: var(--head); }
.ob-table-foot .ts-link { margin-left: auto; }

/* mobile record cards */
.ob-mobilerec { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; background: var(--card); padding: 12px 14px; margin-bottom: 10px; }
.ob-mobilerec-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; }
.ob-mobilerec-row:last-of-type { border-bottom: none; }
.ob-mobilerec-row b { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.ob-mobilerec-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* footer actions */
.ob-actions { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ob-actions-note { font-size: 12.5px; color: var(--faint); margin-left: auto; }

/* step-3 empty state (no records added yet) */
.ob-emptystate { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 16px; font-size: 13.5px; color: var(--muted); text-align: center; }
.ob-emptystate .ts-dia { color: var(--faint); }

/* ---- reusable empty state (project-wide "no records" placeholder) ----
   Drop a `<div class="pg-empty">…</div>` anywhere; for JS-populated card lists
   place it right after the list container and it auto-shows when that list has
   no cards (no JS needed). Server/Knockout lists can use `data-bind="visible"`. */
.pg-empty {
  display: none; align-items: center; justify-content: center; gap: 10px;
  padding: 44px 16px; font-size: 14px; color: var(--muted); text-align: center;
  background: var(--card); border: 1px dashed var(--line); border-radius: 13px;
}
.pg-empty .ts-dia { color: var(--faint); }
/* show only once the list has finished loading (.pg-loaded) AND has no cards —
   so search-driven lists don't show "no records" before the user searches */
.reservation-list.pg-loaded:not(:has(.reservation-card)) + .pg-empty { display: flex; }

/* yes/no marks (carried over from current build) */
.ts-yes { color: #1E7E34; font-weight: 700; }
body.is-dark .ts-yes { color: var(--green); }
.ts-no-x { color: var(--red); font-weight: 700; }
.ts-no { color: var(--muted); }

/* inputs nested inside Kendo widget wrappers must stay flat — the wrapper
   (.k-input/.k-picker) carries the border/background; without this the
   reskinned inner input paints its own white box outside the control */
.ts-app .ts-main .k-input input, .ts-app .ts-main .k-picker input,
.ts-app .ts-formwrap .k-input input, .ts-app .ts-formwrap .k-picker input,
.ts-app .ts-main .k-input .k-input-inner, .ts-app .ts-formwrap .k-input .k-input-inner {
    border: 0 !important;
    background: transparent !important;
    min-height: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100%;
}

/* widgets inside Kendo toolbars (editor colour pickers, font dropdowns…)
   keep their natural size — the form-input treatment must not stretch them */
.ts-app .ts-main .k-toolbar .k-picker, .ts-app .ts-formwrap .k-toolbar .k-picker,
.ts-app .ts-main .k-toolbar .k-input, .ts-app .ts-formwrap .k-toolbar .k-input,
.ts-app .ts-main .k-toolbar .k-colorpicker, .ts-app .ts-formwrap .k-toolbar .k-colorpicker {
    width: auto;
    min-height: 0;
}

/* Kendo widget harmonisation inside redesigned forms */
.ts-app .ts-formwrap .k-editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ts-app .ts-formwrap .table > thead > tr > th { border-bottom: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 1099px) {
  .ts-burger { display: grid; }
  .ts-shell-row > .ts-side { display: none; }
  .ob-main { padding: 22px 24px 30px; }
  .ob-composer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  /* kill page-level horizontal panning — anything oversized must scroll
     inside its own container, otherwise the sticky top bar and headings
     pan off-screen to the left */
  body.ts-app { overflow-x: hidden; }
  .ts-app .ts-main { max-width: 100vw; overflow-x: hidden; }
  .ts-app .ts-main .k-editor, .ts-app .ts-main .k-editor iframe { max-width: 100%; }
  .ob-main { padding: 16px 14px 24px; }
  .ob-h1 { font-size: 22px; }
  .ts-top { padding: 0 12px; gap: 10px; }
  .ts-top-sep, .ts-logo-dias { display: none; }
  .ts-logo-word { font-size: 15px; }
  .ts-switch { padding: 0 10px; gap: 8px; max-width: 46vw; }
  .ts-switch > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ob-grid, .ob-composer-grid { grid-template-columns: 1fr; }
  .ob-grid .is-span2 { grid-column: auto; }
  /* drop the vertical number rail on phones — it pushed every card to the
     right; steps run full-width with the number folded into the title */
  .ob-step { display: block; }
  .ob-step-rail { display: none; }
  .ob-step-body > .ob-step-title::before { content: counter(obstep) ". "; color: var(--blue); }
  .ob-card { padding: 18px 16px; }
  .ob-card:has(.ob-table) { overflow-x: auto; }
  .ob-table { min-width: 540px; }
  .ob-composer-foot .ts-btn.is-add { margin-left: 0; }
  .ob-actions .ts-btn { width: 100%; }
}

/* ---------- Bootstrap modals reskinned (edit/duplicate entry) ---------- */
.ts-app .ts-modal .modal-content { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,0.3); overflow: hidden; color: var(--text); }
.ts-app .ts-modal .modal-header { background: var(--inset); border-bottom: 2px solid var(--blue); padding: 14px 20px; }
.ts-app .ts-modal .modal-title, .ts-app .ts-modal .h4-custom { color: var(--head); font-weight: 700; letter-spacing: -0.2px; }
.ts-app .ts-modal .close { opacity: .5; color: var(--head); text-shadow: none; }
.ts-app .ts-modal .close:hover { opacity: .9; }
.ts-app .ts-modal .modal-body { padding: 18px 20px 10px; }
.ts-app .ts-modal .modal-body label, .ts-app .ts-modal .modal-body b { font-weight: 600; color: var(--head); margin-bottom: 2px; display: inline-block; }
.ts-app .ts-modal .modal-body .row > [class*="col-"] { margin-bottom: 8px; }
.ts-app .ts-modal .modal-footer { border-top: 1px solid var(--line); padding: 12px 20px; }

/* table action icon cells (copy/edit/delete — ids & classes used by site JS) */
.ts-app td.copyControllers, .ts-app td.editControllers, .ts-app td.deleteControllers,
.ts-app .ob-mobilerec-actions .copyControllers, .ts-app .ob-mobilerec-actions .editControllers, .ts-app .ob-mobilerec-actions .deleteControllers {
  cursor: pointer; color: var(--muted); transition: color .15s ease, background .15s ease; text-align: center; vertical-align: middle;
}
.ts-app td.copyControllers, .ts-app td.editControllers, .ts-app td.deleteControllers { width: 40px; font-size: 14px; }
.ts-app .ob-mobilerec-actions > div { width: 40px; height: 40px; line-height: 40px; border-radius: 50%; border: 1px solid var(--line); font-size: 15px; }
.ts-app .copyControllers:hover, .ts-app .editControllers:hover { color: var(--blue); background: var(--blue-soft); }
.ts-app .deleteControllers:hover { color: #B71C1C; background: rgba(194,71,61,0.12); }
body.is-dark .ts-app .deleteControllers:hover { color: var(--red); }

/* hours-remaining pill (Knockout-bound) — hidden until it has text */
.ts-app .label-format.size_sm { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 600; }
.ts-app .label-format.size_sm:empty { display: none; }

/* manager-link warning banner */
.ts-app .ts-warnbanner { background: rgba(221,148,52,0.12); border: 1px solid rgba(221,148,52,0.4); border-radius: 12px; padding: 14px 18px; color: #875200; margin-bottom: 20px; }
body.is-dark.ts-app .ts-warnbanner { color: var(--amber); }

/* ---- Top-bar language selector (#ddlCulture / #ddlCultureMobile) ---- */
.ts-app .ts-culture {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    max-width: 160px;
}
.ts-app .ts-culture:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31,111,165,0.14);
}
.ts-app select.ts-culture.visible-xs { display: none; }
@media (max-width: 767px) {
    .ts-app select.ts-culture.visible-xs { display: inline-block !important; }
    .ts-app select.ts-culture.hidden-xs { display: none; }
}

/* =====================================================================
   LEGACY PAGE RESKIN — applies the redesign's visual language to pages
   that still use Bootstrap/Angle markup. CSS only: no elements are added
   or removed; existing classes are restyled with the design tokens so
   every page follows the redesign in both themes. Scoped to .ts-main so
   the shell chrome and fully-converted (ob-/ts-) pages are unaffected.
   ===================================================================== */
.ts-app .ts-main { background: var(--bg); color: var(--text); }
/* legacy pages render straight into .ts-main with no page gutter of their own
   (converted pages bring .ob-main, which has its own padding) */
.ts-app .ts-main:not(:has(> .ob-main)) { padding: 24px 32px 36px; }
@media (max-width: 640px) {
  .ts-app .ts-main:not(:has(> .ob-main)) { padding: 16px 14px 24px; }
}
.ts-app .ts-main a:not(.btn):not(.ts-btn):not(.k-button):not(.ts-navitem) { color: var(--blue); }

/* ---- typography ---- */
.ts-app .ts-main h1, .ts-app .ts-main h2, .ts-app .ts-main h3,
.ts-app .ts-main h4, .ts-app .ts-main h5, .ts-app .ts-main legend,
.ts-app .ts-main .panel-title { color: var(--head); letter-spacing: -0.2px; }
.ts-app .ts-main label { color: var(--head); font-weight: 600; }
.ts-app .ts-main .text-muted, .ts-app .ts-main .text-muted-o1,
.ts-app .ts-main small { color: var(--muted); }

/* ---- panels as redesign cards ---- */
.ts-app .ts-main .panel, .ts-app .ts-main .well {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: var(--text);
}
.ts-app .ts-main .panel-heading {
    background: var(--inset);
    border-bottom: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    color: var(--head);
    font-weight: 600;
}
.ts-app .ts-main .panel-footer {
    background: var(--inset);
    border-top: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
}
.ts-app .ts-main .panel-body { color: var(--text); }
.ts-app .ts-main .panel .panel-heading.panel-primary,
.ts-app .ts-main .panel-primary > .panel-heading {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: var(--blue-line);
}

/* ---- buttons mapped onto the ts-btn language ---- */
.ts-app .ts-main .btn {
    border-radius: 9px;
    font-weight: 600;
    font-size: 13.5px;
    transition: filter .12s ease, background .12s ease;
}
.ts-app .btn-primary,
.ts-app .ts-main .btn-success {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 1px 2px rgba(10,50,83,0.25);
}
.ts-app .btn-primary:hover, .ts-app .btn-primary:focus,
.ts-app .btn-primary:active, .ts-app .btn-primary:active:hover,
.ts-app .ts-main .btn-success:hover, .ts-app .ts-main .btn-success:focus,
.ts-app .ts-main .btn-success:active, .ts-app .ts-main .btn-success:active:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    filter: brightness(1.12);
}
body.is-dark.ts-app .btn-primary, body.is-dark .ts-main .btn-success {
    background: var(--navy);
    border-color: var(--navy);
    color: #F2F7FB;
    box-shadow: none;
}

/* project-wide: any `btn btn-primary` uses the brand blue. !important is
   required to beat the legacy bootstrap/theme stylesheets that set
   .btn-primary with their own (often !important) background. */
.btn.btn-primary,
button.btn.btn-primary,
a.btn.btn-primary,
input.btn.btn-primary {
    background-color: #00578E !important;
    background-image: none !important;
    border-color: #00578E !important;
    color: #fff !important;
}
.btn.btn-primary:hover, .btn.btn-primary:focus,
.btn.btn-primary:active, .btn.btn-primary:active:hover,
.btn.btn-primary:focus:active {
    background-color: #014a79 !important;
    border-color: #014a79 !important;
    color: #fff !important;
}
.ts-app .ts-main .btn-default, .ts-app .ts-main .btn-info {
    background: var(--card);
    border-color: var(--line);
    color: var(--head);
}
.ts-app .ts-main .btn-default:hover, .ts-app .ts-main .btn-default:focus,
.ts-app .ts-main .btn-default:active, .ts-app .ts-main .btn-default:active:hover,
.ts-app .ts-main .btn-info:hover, .ts-app .ts-main .btn-info:focus {
    background: var(--inset);
    border-color: var(--line);
    color: var(--head);
}
.ts-app .ts-main .btn-danger {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}
.ts-app .ts-main .btn-danger:hover, .ts-app .ts-main .btn-danger:focus { filter: brightness(1.1); }
.ts-app .ts-main .btn-warning { border-radius: 9px; }
.ts-app .ts-main .k-button { border-radius: 8px; }
/* Kendo primary buttons default to the theme's light blue — pull them onto the
   same navy as the branded primary so they match. Other Kendo button
   variants (flat / danger / neutral) are left as-is. */
.ts-app .ts-main .k-button-solid-primary,
.ts-app .ts-main .k-button.k-primary {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.ts-app .ts-main .k-button-solid-primary:hover,
.ts-app .ts-main .k-button-solid-primary:focus,
.ts-app .ts-main .k-button-solid-primary:active,
.ts-app .ts-main .k-button.k-primary:hover,
.ts-app .ts-main .k-button.k-primary:focus,
.ts-app .ts-main .k-button.k-primary:active {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #fff;
    filter: brightness(1.12);
}
body.is-dark .ts-main .k-button-solid-primary,
body.is-dark .ts-main .k-button.k-primary {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #F2F7FB;
}

/* ---- inputs: extend the ts-formwrap treatment to every page ---- */
.ts-app .ts-main .form-control,
.ts-app .ts-main .input-full-width,
.ts-app .ts-main select,
.ts-app .ts-main .k-input,
.ts-app .ts-main .k-picker {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);
    color: var(--text);
    font-family: inherit;
}
.ts-app .ts-main .form-control:focus,
.ts-app .ts-main .k-focus,
.ts-app .ts-main select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31,111,165,0.14);
}
.ts-app .ts-main .input-group-addon {
    background: var(--inset);
    border-color: var(--line);
    color: var(--muted);
    border-radius: 9px;
}
.ts-app .ts-main input[type="checkbox"], .ts-app .ts-main input[type="radio"] {
    accent-color: var(--navy);
}
body.is-dark .ts-main input[type="checkbox"], body.is-dark .ts-main input[type="radio"] {
    accent-color: var(--blue);
}

/* ---- tables: redesign header treatment + row hover ---- */
.ts-app .ts-main .table > thead > tr > th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: var(--inset);
    border-bottom: 2px solid var(--line);
}
.ts-app .ts-main .table > tbody > tr > td { border-color: var(--line); }
.ts-app .ts-main .table-striped > tbody > tr:nth-of-type(odd) { background: var(--inset); }
.ts-app .ts-main .table-hover > tbody > tr:hover,
.ts-app .ts-main .table > tbody > tr:hover { background: var(--blue-soft); }

/* ---- list groups, alerts, badges, pagination, tabs ---- */
.ts-app .ts-main .list-group-item {
    background: var(--card);
    border-color: var(--line);
    color: var(--text);
}
.ts-app .ts-main .list-group-item:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.ts-app .ts-main .list-group-item:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.ts-app .ts-main .alert { border-radius: 12px; }
.ts-app .ts-main .label, .ts-app .ts-main .badge {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.ts-app .ts-main .badge { background: var(--blue-soft); color: var(--blue); }
.ts-app .ts-main .pagination > li > a, .ts-app .ts-main .pagination > li > span {
    background: var(--card);
    border-color: var(--line);
    color: var(--text);
}
.ts-app .ts-main .pagination > .active > a, .ts-app .ts-main .pagination > .active > span {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.ts-app .ts-main .nav-tabs { border-color: var(--line); }
.ts-app .ts-main .nav-tabs > li > a { color: var(--muted); border-radius: 9px 9px 0 0; }
.ts-app .ts-main .nav-tabs > li.active > a,
.ts-app .ts-main .nav-tabs > li.active > a:hover,
.ts-app .ts-main .nav-tabs > li.active > a:focus {
    background: var(--card);
    border-color: var(--line);
    border-bottom-color: transparent;
    color: var(--head);
}
.ts-app .ts-main hr { border-color: var(--line); }

/* ---- modals (legacy pages don't carry the ts-modal class) ---- */
.ts-app .modal .modal-content {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.3);
    color: var(--text);
    overflow: hidden;
}
.ts-app .modal .modal-header {
    background: var(--inset);
    border-bottom: 2px solid var(--blue);
}
.ts-app .modal .modal-title { color: var(--head); font-weight: 700; }
.ts-app .modal .close { color: var(--head); opacity: .5; text-shadow: none; }
.ts-app .modal .close:hover { opacity: .9; }
.ts-app .modal .modal-footer { border-top: 1px solid var(--line); }

/* ---------- Dashboard (pg-dash) — profile + quick actions rail, tile grid ---------- */
.ob-main.is-wide { max-width: none; }
.pg-dash { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.pg-quick-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-dash-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pg-card { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(12,44,73,0.04); }
.pg-card-title { font-size: 16px; font-weight: 700; color: var(--head); letter-spacing: -0.2px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.pg-card-title .ts-btn { margin-left: auto; height: 32px; padding: 0 12px; font-size: 12.5px; }

/* profile card */
.pg-profile { text-align: center; }
.pg-profile-avatar { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--blue-soft); margin: 10px auto 0; display: block; }
.pg-profile-name { font-size: 19px; font-weight: 700; color: var(--head); letter-spacing: -0.3px; margin: 12px 0 16px; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 16px; }
.pg-chip { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--inset); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }

/* quick actions list */
.pg-quick { display: flex; flex-direction: column; }
.pg-quick-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 4px; border: 0; border-top: 1px solid var(--line-soft); background: none; font: inherit; text-align: left; color: var(--text); text-decoration: none; cursor: pointer; }
.pg-quick-item:first-child { border-top: 0; }
.pg-quick-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-soft); display: grid; place-items: center; flex: none; color: var(--blue); }
.pg-quick-name { font-size: 13.5px; font-weight: 600; color: var(--head); }
.pg-quick-item:hover .pg-quick-name { color: var(--blue); }
.pg-quick-item .ts-chev { margin-left: auto; transform: rotate(-45deg); }

/* link tiles */
.pg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pg-tiles > #nonpayroll:empty { display: none; }
.pg-tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px; text-decoration: none; box-shadow: 0 1px 2px rgba(12,44,73,0.04); transition: border-color .12s ease, box-shadow .12s ease; }
.pg-tile:hover { border-color: var(--blue-line); box-shadow: 0 4px 14px rgba(12,44,73,0.08); text-decoration: none; }
.pg-tile-ic { display: block; font-size: 18px; color: var(--blue); margin-bottom: 10px; }
.pg-tile-name { display: block; font-size: 14.5px; font-weight: 700; color: var(--head); letter-spacing: -0.2px; margin-bottom: 4px; }
.pg-tile-link { display: block; font-size: 12.5px; font-weight: 600; color: var(--blue); }

/* account rows (citizen profile card) — count badges + status pill */
.pg-quick-item .pg-count { margin-left: auto; min-width: 24px; height: 24px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 8px; }
body.is-dark .pg-quick-item .pg-count { background: var(--blue); color: #0D1318; }
.pg-quick-item .pg-pill-warn { margin-left: auto; font-size: 12px; font-weight: 600; color: #875200; background: rgba(221,148,52,0.12); border: 1px solid rgba(221,148,52,0.4); border-radius: 999px; padding: 3px 10px; }
body.is-dark .pg-quick-item .pg-pill-warn { color: var(--amber); }
.pg-quick-item .pg-pill-warn:empty, .pg-quick-item .pg-count + .ts-chev, .pg-quick-item .pg-pill-warn + .ts-chev { margin-left: 10px; }

/* stat cards (citizen dashboard counters) */
.pg-stats { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
/* dashboard.ts re-adds legacy classes (row, animated …) when revealing the panels;
   .row's -15px margins make the card borders overlap, so zero them out */
.pg-stats > .pg-stat { margin: 0; }
.pg-stats > .pg-stat::before, .pg-stats > .pg-stat::after { content: none; }
.pg-stat { flex: 0 0 220px; width: 220px; box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(12,44,73,0.04); transition: border-color .12s ease, box-shadow .12s ease; }
@media (max-width: 520px) { .pg-stat { flex: 1 1 100%; width: 100%; } }
.pg-stat:hover { border-color: var(--blue-line); box-shadow: 0 4px 14px rgba(12,44,73,0.08); }
.pg-stat-num { font-size: 30px; font-weight: 700; color: var(--head); letter-spacing: -0.5px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pg-stat-label { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.pg-stat-link { font-size: 12.5px; font-weight: 600; color: var(--blue); text-decoration: none; display: inline-block; }
.pg-stat-link:hover { text-decoration: underline; }

/* overlap guards: balance loader, quick rows, feed footer, filter widgets, useful links */
.pg-stat { position: relative; }
.pg-stat .loader { position: absolute; right: 18px; top: 18px; margin-top: 0; }
.pg-quick-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pg-quick-item .pg-count, .pg-quick-item .pg-pill-warn { flex: none; }
.pg-feed .panel-footer .pull-left { float: none !important; }
.pg-feed .panel-footer .pull-right { float: none !important; }
.pg-feed .panel-footer .k-combobox { width: 190px; }
.pg-feed .panel-footer .k-combobox #feedsort, .pg-feed .panel-footer .k-combobox .k-input-inner { width: 100%; }
.pg-feed .panel-footer .btn { margin: 0; }
.pg-feed .panel-footer .btn + .btn { margin-left: 10px; }
.pg-filtergrid select, .pg-filtergrid .k-dropdownlist, .pg-filtergrid .k-combobox, .pg-filtergrid .k-picker { width: 100% !important; }
.usefull-links .row { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.usefull-links .row > a.deleteControllers { float: none; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); padding: 0 !important; margin: 0; display: flex; align-items: center; justify-content: center; line-height: 1; }
.usefull-links .row > a.deleteControllers::before { display: block; }
.usefull-links .row > div { flex: 1; min-width: 0; padding: 0; float: none; width: auto; }
.usefull-links .list-group-item { border-radius: 10px !important; border: 1px solid var(--line); }

/* tab strips (pill style on top of legacy .nav-tabs markup) — wraps cleanly
   for any tab count, so 2-tab and 12-tab pages share one consistent look */
.ts-app .ts-main .pg-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 0;
  margin: 0 0 18px; padding: 0; list-style: none;
}
.ts-app .ts-main .pg-tabs > li { float: none; display: block; width: auto; margin: 0; }
.ts-app .ts-main .pg-tabs > li > a,
.ts-app .ts-main .pg-tabs > li.active > a,
.ts-app .ts-main .pg-tabs > li.active > a:hover,
.ts-app .ts-main .pg-tabs > li.active > a:focus {
  display: block; border: 1px solid var(--line); border-radius: 9px; background: var(--card);
  padding: 8px 15px; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--muted);
  white-space: nowrap; line-height: 1.3; transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.ts-app .ts-main .pg-tabs > li > a:hover { color: var(--head); background: var(--inset); border-color: var(--line); }
/* active tab = soft "selected" chip (tinted, navy text) — deliberately NOT a
   solid navy fill, so it reads as a selected nav state and stays distinct from
   solid-navy action buttons (tabs vs buttons hierarchy, site-wide) */
.ts-app .ts-main .pg-tabs > li.active > a,
.ts-app .ts-main .pg-tabs > li.active > a:hover,
.ts-app .ts-main .pg-tabs > li.active > a:focus {
  background: var(--blue-soft); border-color: var(--blue-line); color: var(--navy) !important; font-weight: 700;
}
body.is-dark .ts-main .pg-tabs > li.active > a,
body.is-dark .ts-main .pg-tabs > li.active > a:hover,
body.is-dark .ts-main .pg-tabs > li.active > a:focus { color: #DCEBF6 !important; }
/* a touch more contrast behind the active label in dark mode */
body.is-dark .ts-main .pg-tabs > li.active > a { background: color-mix(in oklab, #00578E 30%, #0D2032); border-color: color-mix(in oklab, #00578E 55%, #0D2032); }
/* inactive tab labels also out-rank the legacy link colour */
.ts-app .ts-main .pg-tabs > li > a { color: var(--muted) !important; }
.ts-app .ts-main .pg-tabs > li > a:hover { color: var(--head) !important; }

/* feed list + footer inside the feed card */
.pg-feed .tab-content { padding: 0; }
.pg-feed .list-group { margin: 0; }
.pg-feed .list-group-item { border-left: 0; border-right: 0; border-radius: 0 !important; }
.pg-feed .list-group-item:first-child { border-top: 0; }
.pg-feed .panel-footer { background: var(--inset); border: 1px solid var(--line-soft); border-radius: 10px; margin-top: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-feed .panel-footer .pull-right { float: none; margin-left: auto; }
.pg-feed .panel-footer .pull-right + .pull-right { margin-left: 0; }
.pg-feed .table-responsive { border: 0; }

/* calendar / filter card */
.pg-filtergrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; margin-bottom: 16px; text-align: left; }
.pg-cal-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }

@media (max-width: 1280px) {
  .pg-dash { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pg-filtergrid { grid-template-columns: 1fr; }
  .pg-card { padding: 18px 16px; }
}

/* ---- Kendo chrome: align widget surfaces with the tokens ---- */
.ts-app .ts-main .k-grid, .ts-app .ts-main .k-listview {
    border-color: var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.ts-app .ts-main .k-grid-header { background: var(--inset); }
.ts-app .ts-main .k-grid-header .k-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
/* Work Order Time Sheets grid (Areas/Employee/Views/WorkOrderTimesheet/WorkOrderTimeSheetsHistory.cshtml
   — #gridwotimesheet, built by workordertimesheetlist.ts). The global Kendo-grid header treatment
   above (uppercase / 11px / muted colour) made this grid's column titles read poorly. Restore a
   clean, mixed-case header for this grid only — the #id gives (1,4,0) specificity, beating the
   (0,4,0) rule above, so the rest of the site's grids keep the redesign treatment. */
.ts-app .ts-main #gridwotimesheet .k-grid-header .k-header {
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text);
}
/* Work Order Timesheet Details banner (Areas/Employee/Views/WorkOrderTimesheet/WorkOrderTimeSheetDetails.cshtml
   — #issueDescription .bg-info). app.css themes .bg-info as a bright cyan (#23b7e5, color:#fff!important)
   that clashes with the redesign. Re-tint this one banner to a soft-blue redesign card in both themes;
   the colour needs !important to beat app.css's forced #fff. Scoped to #issueDescription so every other
   .bg-info on the site keeps its styling. */
.ts-app .ts-main #issueDescription .bg-info {
    background: var(--blue-soft);
    border: 1px solid var(--blue-line);
    border-radius: 12px;
    color: var(--text) !important;
}
.ts-app .ts-main #issueDescription .bg-info h3 { color: var(--head); }
.ts-app .ts-main .k-toolbar { background: var(--inset); border-color: var(--line); }
.ts-app .ts-main .k-editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }

/* ---- Service Request / Issue view action toolbar (Areas/Issue/Views/View/Index.cshtml — h3.sr-toolbar) ----
   The action controls (Create New / Edit / Delete / Select-a-Work-Request dropdown / reply / settings /
   Export to Work Request / Assign Inspector / View Feedback / kanban export) use nested Bootstrap float
   (pull-right / clearfix) markup. The floats overflow the <h3>'s box and spill DOWN onto the details card
   below (the overlap), and scatter across several rows. Make the bar a flex container so it contains its
   own controls (no overflow → no overlap) and lays them out as one tidy, right-aligned, wrapping row: each
   legacy wrapper becomes an inline-flex group and the floats + !important utility margins are reset. Works
   for every request type / role — the many display:none controls take no space until JS reveals them. */
.ts-app .ts-main h3.sr-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 32px;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}
/* drop the .row/.clearfix pseudo-cells that would otherwise become stray flex items */
.ts-app .ts-main h3.sr-toolbar::before,
.ts-app .ts-main h3.sr-toolbar::after { content: none; }
/* status badges anchor the left edge; everything else is pushed right */
.ts-app .ts-main h3.sr-toolbar > .sr-status {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
    margin-right: auto;
}
.ts-app .ts-main h3.sr-toolbar .sr-status .badge { margin: 0 !important; }
/* lay every legacy float wrapper out as an inline-flex group — each contains its own buttons,
   so nothing floats out of the toolbar */
.ts-app .ts-main h3.sr-toolbar .manage-issues,
.ts-app .ts-main h3.sr-toolbar .display-block,
.ts-app .ts-main h3.sr-toolbar span.clearfix,
.ts-app .ts-main h3.sr-toolbar span.pull-right {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    float: none !important;
    margin: 0 !important;
    padding: 0;
}
/* the controls themselves (reset the float + the !important utility margins) */
.ts-app .ts-main h3.sr-toolbar .btn { margin: 0 !important; float: none !important; }

/* Request details load-in overlap fix. When site animations are on, the details card
   (#refreshThisData → _ViewDetails.cshtml:62 wrapper) animates in with fadeInDown, which starts the
   tall card at translate3d(0,-100%,0) — directly over the toolbar above — and slides it DOWN through
   the action buttons on load, overlapping them until the animation settles (or a scroll forces a
   repaint). Swap the slide for an opacity-only fade (own keyframe, so it doesn't depend on a stock
   fadeIn): the staged delay/reveal stays, but nothing sweeps over the toolbar. */
@keyframes ts-fade-in-place { from { opacity: 0; } to { opacity: 1; } }
.ts-app .ts-main #refreshThisData .fadeInDown { animation-name: ts-fade-in-place; }

/* ---- Issue / Service Request timeline (Areas/Issue/Views/View/_Comments|_CmmsStatus|_TimeSheetTracking,
   ul.timeline-alt) ----
   Restyle the Angle-theme timeline to match the redesign: rounded card entries, a token-coloured rail +
   date-separator pill, and soft-tinted status icon chips in place of the flat saturated circles. The
   pop-over speech-bubble arrow is dropped (redesign cards don't use it). CSS-only, scoped to .timeline-alt,
   adapts to both themes via tokens + color-mix. */
.ts-app .ts-main .timeline-alt:before { background: var(--line); }

/* entry content → redesign card */
.ts-app .ts-main .timeline-alt > li > .timeline-panel .popover {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(12,44,73,0.05);
    padding: 12px 16px;
    color: var(--text);
}
.ts-app .ts-main .timeline-alt .popover .arrow { display: none !important; }
.ts-app .ts-main .timeline-alt .popover .popover-title {
    background: transparent; border: 0; padding: 0 0 6px;
    color: var(--head); font-weight: 700; font-size: 14px;
}
.ts-app .ts-main .timeline-alt .popover .popover-content { padding: 0; color: var(--text); }

/* avatar badge → clean round image */
.ts-app .ts-main .timeline-alt > li > img.timeline-badge {
    border-radius: 50%; border: 2px solid var(--line);
    object-fit: cover; background: var(--card);
}

/* event icon badges → soft-tinted chips with a coloured glyph (matches the redesign icon tiles) */
.ts-app .ts-main .timeline-alt > li > div.timeline-badge {
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: var(--inset); color: var(--muted);
    box-shadow: none;
}
.ts-app .ts-main .timeline-alt > li > div.timeline-badge em,
.ts-app .ts-main .timeline-alt > li > div.timeline-badge .fa { font-size: 15px; line-height: 1; }
.ts-app .ts-main .timeline-alt > li > div.timeline-badge.primary,
.ts-app .ts-main .timeline-alt > li > div.timeline-badge.info {
    background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue);
}
.ts-app .ts-main .timeline-alt > li > div.timeline-badge.success,
.ts-app .ts-main .timeline-alt > li > div.timeline-badge.green {
    background: color-mix(in oklab, var(--green) 15%, var(--card));
    border-color: color-mix(in oklab, var(--green) 32%, var(--card)); color: var(--green);
}
.ts-app .ts-main .timeline-alt > li > div.timeline-badge.warning,
.ts-app .ts-main .timeline-alt > li > div.timeline-badge.yellow {
    background: color-mix(in oklab, var(--amber) 16%, var(--card));
    border-color: color-mix(in oklab, var(--amber) 34%, var(--card)); color: var(--amber);
}
.ts-app .ts-main .timeline-alt > li > div.timeline-badge.danger {
    background: color-mix(in oklab, var(--red) 14%, var(--card));
    border-color: color-mix(in oklab, var(--red) 32%, var(--card)); color: var(--red);
}

/* date separator → token pill */
.ts-app .ts-main .timeline-alt > li.timeline-separator:before {
    background: var(--inset); color: var(--muted);
    border: 1px solid var(--line); border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 28px;
}

/* =====================================================================
   EVENTS PAGES RESKIN — CSS-only. The events home (banner, search,
   view toggles, event cards) keeps its Knockout/Kendo markup; these
   rules retheme it with the design tokens in both themes.
   ===================================================================== */

/* banner: events / facility / membership keep their own original background
   images (reverted from the brand-gradient treatment). Only the shared
   headline + flush placement remain, matching the membership banner. */
.ts-app .ts-main .md-welcome { margin: 0; }
.ts-app .ts-main .search-area-text { color: #fff; font-weight: 700; letter-spacing: -0.3px; }

/* booking search bars (facility / events / membership home): Bootstrap's
   .input-group renders the search field and the Submit/More buttons as one
   connected control, flush against each other. On the redesigned banners the
   field and buttons are individually rounded, so sitting edge-to-edge read as
   cramped. Lay the group out as a flex row with a gap between the field and the
   buttons, and give each its own rounded corners — same idiom as .pg-eventsearch. */
.ts-app .ts-main .md-welcome .input-group { display: flex; align-items: stretch; gap: 10px; }
.ts-app .ts-main .md-welcome .input-group > .form-control,
.ts-app .ts-main .md-welcome .input-group > .wrapper_ts_overlay { flex: 1 1 auto; min-width: 0; }
.ts-app .ts-main .md-welcome .input-group > .input-group-btn { width: auto; }
.ts-app .ts-main .md-welcome .input-group > .form-control,
.ts-app .ts-main .md-welcome .input-group .wrapper_ts_overlay .form-control,
.ts-app .ts-main .md-welcome .input-group .wrapper_ts_overlay .search_ts_overlay { border-radius: 9px; }
/* round the outer corners of the button group (single button rounds fully;
   the facility Submit + More pair rounds at the two outer ends only) */
.ts-app .ts-main .md-welcome .input-group-btn > .btn:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.ts-app .ts-main .md-welcome .input-group-btn > .btn:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }

/* view toggle buttons: segmented-control look on the tokens */
.ts-app .ts-main .btn.btn-default-custom {
    color: var(--head);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-weight: 600;
    font-size: 13.5px;
}
.ts-app .ts-main .btn.btn-default-custom:hover { background: var(--inset); }
.ts-app .ts-main .btn.btn-primary-custom,
.ts-app .ts-main .btn.btn-default-custom.btn-primary-custom {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
body.is-dark .ts-main .btn.btn-primary-custom,
body.is-dark .ts-main .btn.btn-default-custom.btn-primary-custom {
    background: var(--navy);
    border-color: var(--navy);
    color: #F2F7FB;
}

/* event cards intentionally untouched — the card image/colour is town-uploaded content */

/* ---- My Tickets (events/participant/courses) ---- */
/* the legacy theme paints .tab-content as a white panel — make it a plain
   transparent region so the cards inside provide the surfaces */
.pg-tickets .tab-content {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 18px 0 0 !important;
    margin: 0;
}
.pg-tickets .tab-content > .tab-pane { background: transparent; padding: 0; }
/* each event's ticket group is a distinct card */
.pg-tickets .tab-content .panel-group .panel,
.pg-tickets .tab-content .panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 1px 2px rgba(12,44,73,0.04);
    overflow: hidden;
}
.pg-tickets .tab-content .panel-heading {
    background: var(--navy);
    border-bottom: 1px solid var(--navy);
    border-radius: 0;
}
.pg-tickets .tab-content .panel-heading .panel-title,
.ts-app .ts-main .pg-tickets .tab-content .panel-heading .panel-title a,
.ts-app .ts-main .pg-tickets .tab-content .panel-heading a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
body.is-dark .ts-main .pg-tickets .tab-content .panel-heading .panel-title a,
body.is-dark .ts-main .pg-tickets .tab-content .panel-heading a {
    color: #F2F7FB;
}
.ts-app .ts-main .pg-tickets .tab-content .panel-heading a:hover { opacity: 0.85; }
.pg-tickets .nav-tabs.pg-tabs { margin-bottom: 0; }

/* tabbed form card (e.g. edit sub account) */
.pg-formtabs .tab-content {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 18px 0 0 !important;
    margin: 0;
}
.pg-formtabs .tab-content > .tab-pane { background: transparent; }
.pg-formtabs-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ts-app .ts-main .k-textbox, .ts-app .ts-main input.k-textbox {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);
    color: var(--text);
    min-height: 40px;
    padding: 0 12px;
    font-family: inherit;
}
.ts-app .ts-main textarea.k-textbox { min-height: 100px; padding: 10px 12px; }
.ts-app .ts-main .k-textbox:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,142,0.14); }
@media (max-width: 640px) {
  .pg-tickets .tab-content .panel-heading { padding: 11px 14px; }
  .pg-tickets .tab-content .panel-body { padding: 14px; }
}
/* purchased tickets: very light green hue (token green over the card surface,
   so it stays subtle in dark mode too) */
.ts-app .ts-main .genaralTicketing .table tr.success > td,
.ts-app .ts-main .tab-content .table > tbody > tr.success > td,
.ts-app .ts-main .tab-content .table tr.success > td {
    background: color-mix(in srgb, var(--green) 8%, var(--card)) !important;
    color: var(--text);
    border-color: color-mix(in srgb, var(--green) 16%, var(--card));
}
/* ticket accordion panels: proper card padding */
.pg-tickets .tab-content .panel { margin-bottom: 14px; }
.pg-tickets .tab-content .panel-group { margin-bottom: 0; }
.pg-tickets .tab-content .panel-heading { padding: 13px 20px; }
.pg-tickets .tab-content .panel-body { padding: 18px 20px; }
.pg-tickets .tab-content .panel-body .table { margin: 10px 0 0; }
.pg-tickets .tab-content .panel-body .table td { padding: 10px 12px; vertical-align: middle; }
.ts-app .ts-main .tab-content .table tr.blank-space > td {
    background: transparent !important;
    border: 0;
    padding: 4px;
    line-height: 4px;
}
.ts-app .ts-main .pg-tickets .btn-reset,
.ts-app .ts-main .btn.btn-reset {
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--head);
    border-radius: 9px;
    font-weight: 600;
    margin-left: 10px;
}
.ts-app .ts-main .btn.btn-reset:hover { background: var(--inset); }
/* bigger search: wider group + taller field */
.ts-app .ts-main .pg-tickets .input-group.max-w-500 { max-width: 100%; width: 100%; }
.ts-app .ts-main .pg-tickets .input-group .k-autocomplete,
.ts-app .ts-main .pg-tickets .input-group #eventSeatch-autoComplete { border-radius: 9px; }
.ts-app .ts-main .pg-tickets .input-group .k-autocomplete .k-input-inner,
.ts-app .ts-main .pg-tickets .input-group #eventSeatch-autoComplete { min-height: 46px; font-size: 15px; }
.ts-app .ts-main .pg-tickets .input-group .input-group-btn { width: auto; }
.ts-app .ts-main .pg-tickets .btn-reset { min-height: 46px; padding: 0 20px; font-size: 14px; }

/* ---- service request filter bar + dropdown (/issue) ----
   Layout of the input-group + absolutely-positioned search overlay is left to
   servicerequest.css; we only restyle the Filters buttons' appearance and the
   dropdown menu (the part that was the ask). No flex/position changes here. */
.ts-app .ts-main .servicerequest-filter .input-group-btn .btn-default {
  background: var(--card); color: var(--head); font-weight: 600; font-size: 13.5px;
  height: 40px; display: inline-flex; align-items: center;
}
.ts-app .ts-main .servicerequest-filter .input-group-btn .btn-default:hover { background: var(--inset); }
/* match the search field height so the buttons sit inline with it */
.ts-app .ts-main .servicerequest-filter .wrapper_ts_overlay .form-control,
.ts-app .ts-main .servicerequest-filter #issue-search { height: 40px; }
.ts-app .ts-main .servicerequest-filter .input-group-btn .caret { color: var(--muted); }

/* ---- Manage Events search bar (Areas/Admin/Events) ----
   Default input-group left the Filters dropdown and search button shorter than
   the redesigned .form-control, so the boxes looked different sizes. Lay the
   Filters group, search input and search button out as one equal-height row
   with flush inner edges and rounded outer corners (one cohesive control). */
.ts-app .ts-main .pg-eventsearch { display: flex; align-items: stretch; width: 100%; }
.ts-app .ts-main .pg-eventsearch > .input-group-btn { display: flex; width: auto; }
.ts-app .ts-main .pg-eventsearch .form-control { flex: 1; min-width: 0; height: 40px; border-radius: 0; }
.ts-app .ts-main .pg-eventsearch .btn { height: 40px; margin: 0; border-radius: 0; display: inline-flex; align-items: center; }
.ts-app .ts-main .pg-eventsearch > .input-group-btn:first-child .btn:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.ts-app .ts-main .pg-eventsearch > .input-group-btn:last-child .btn:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }

/* ---- Facility System Configuration (Areas/Admin/FacilitySysConfig/Setup) ----
   Tidy the legacy "numbered block" settings form: clean section headers (round
   number chip + heading + divider, left-aligned instead of the odd g-cell
   offset/centering), consistent label/control rhythm, real fieldset legends and
   dividers. CSS-only + scoped to #setupContainer so the form's ids / data-bind /
   Kendo widgets / required hooks are untouched. */
body.ts-app .ts-main #setupContainer .pg-card { padding: 20px 24px; }
/* Inner padding for every section card. Was padding:0, which (a) let the numbered
   header sit flush against the card's top edge (the 28px chip then clipped on the
   border) and (b) let labels / inputs / grids touch the left & right edges. Pad all
   four sides equally (24px, matching the .pg-card padding used elsewhere) so the
   content sits the same comfortable distance from every edge. */
body.ts-app .ts-main #setupContainer .panel-body { padding: 24px; }

/* numbered section headers */
body.ts-app .ts-main #setupContainer .number-block { margin: 0 0 14px; }
/* Centre the round number chip against its title (progressive enhancement — the
   panel-body top padding above is what actually un-clips the header; this just
   tidies vertical alignment where :has() is supported). */
body.ts-app .ts-main #setupContainer div:has(> .ico-box) {
  display: flex; align-items: center;
}
body.ts-app .ts-main #setupContainer .number-block .g-cell {
  width: auto; max-width: none; margin: 0; padding: 0; float: none; left: 0;
}
body.ts-app .ts-main #setupContainer .box-center { display: block; }
body.ts-app .ts-main #setupContainer .box-center-row {
  display: flex; align-items: center; gap: 11px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
body.ts-app .ts-main #setupContainer .ico-box {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  display: inline-grid; place-items: center; vertical-align: middle;
  font-weight: 700; font-size: 13px; line-height: 1; padding: 0; margin: 0 8px 0 0;
}
body.ts-app .ts-main #setupContainer .text-large {
  /* facility/subfacilitysetup.css sets .text-large { display: table-cell; line-height: 35px }.
     We override font/colour above but NOT display/line-height, so those leaked: the table-cell
     title dropped onto its own line below the chip and the 35px line collided with the
     .line-break hr, clipping the heading. Pin display/line-height so the chip + title sit
     inline and the divider clears them. */
  display: inline-block; line-height: 1.2;
  font-size: 15.5px; font-weight: 700; color: var(--head); letter-spacing: -0.2px; padding: 0; margin: 0;
  vertical-align: middle;
}

/* label / control rhythm + alignment */
body.ts-app .ts-main #setupContainer .label-format,
body.ts-app .ts-main #setupContainer label.control-label {
  display: inline-block; color: var(--text); font-weight: 600; padding-top: 7px; margin-bottom: 0;
}
body.ts-app .ts-main #setupContainer .form-group > .row,
body.ts-app .ts-main #setupContainer form > .row,
body.ts-app .ts-main #setupContainer fieldset .row { margin-bottom: 12px; }
body.ts-app .ts-main #setupContainer .w-100 { width: 100%; }

/* fieldset legends as clean sub-headings.
   A native <legend> straddles the fieldset's top-border gap, so on the facility
   Setup form (which shares this #setupContainer hook) the section labels —
   "Locker Room Setup", "Payments Settings", etc. — sat on top of / overlapped
   the content below them. Floating the legend (width:100%) drops that special
   rendering and makes it a normal block heading; the next element clears it.
   Same fix already used for .pg-smtp legends below. */
body.ts-app .ts-main #setupContainer fieldset > legend {
  float: left; width: 100%;
  font-size: 14px; font-weight: 700; color: var(--head);
  border: 0; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin: 20px 0 14px;
}
body.ts-app .ts-main #setupContainer fieldset > legend + * { clear: both; }

/* dividers + save button */
/* The Angle theme ships `.line-break { margin-top: -21px }` (app.css) and this form
   wraps every section divider in <div class="line-break">. That -21px hauls the
   divider — and the grid/content below it — UP into the header row, so the hr sliced
   straight through each title (the real "smushed header" cause, in every section).
   Cancel it here so the divider sits below the header where it belongs. */
body.ts-app .ts-main #setupContainer .line-break { margin-top: 0; }
body.ts-app .ts-main #setupContainer .line-break hr { border-top: 1px solid var(--line); margin: 6px 0 0; }
body.ts-app .ts-main #setupContainer .btn[data-role="msave"] { border-radius: 11px; }

/* ---- Issue / Complaints Configurations (Areas/Admin/Issue/Configurations) ----
   Body was unstyled rows on the page background with raw h3/h4 headings and
   unstyled user-assignment boxes. Sectioned into pg-cards in the view; this
   styles the headings, labels, recipient boxes and the column separator.
   Scoped to .pg-issueconfig. */
body.ts-app .ts-main .pg-issueconfig .pg-card { padding: 20px 24px; margin-bottom: 18px; }
body.ts-app .ts-main .pg-issueconfig h3 {
  font-size: 16px; font-weight: 700; color: var(--head); letter-spacing: -0.2px;
  margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
body.ts-app .ts-main .pg-issueconfig h4 { font-size: 14px; font-weight: 700; color: var(--head); margin: 0 0 10px; }
body.ts-app .ts-main .pg-issueconfig label { color: var(--text); font-weight: 600; }
body.ts-app .ts-main .pg-issueconfig .user-lbl {
  display: block; margin-bottom: 8px; color: var(--muted); font-weight: 600; font-size: 12.5px;
}
body.ts-app .ts-main .pg-issueconfig .user-section {
  border: 1px solid var(--line); border-radius: 10px; background: var(--inset);
  min-height: 220px; max-height: 340px; overflow-y: auto; padding: 8px;
}
body.ts-app .ts-main .pg-issueconfig .UserAssigntemplateCSS {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 11px; margin-bottom: 8px; cursor: grab;
}
body.ts-app .ts-main .pg-issueconfig .UserAssigntemplateCSS p { margin: 0; font-size: 12.5px; color: var(--text); }
body.ts-app .ts-main .pg-issueconfig .UserAssigntemplateCSS strong { color: var(--head); }
/* vertical divider between the two notification columns; becomes horizontal on stack */
body.ts-app .ts-main .pg-issueconfig .separator-left { border-left: 1px solid var(--line); }
@media (max-width: 991px) {
  body.ts-app .ts-main .pg-issueconfig .separator-left {
    border-left: 0; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px;
  }
}

/* ---- Staff employee-member lists (Areas/Admin/Staff Index "edit employees"
   + DepartmentAssignStaff "assign employees") ----
   The Kendo .k-block list items were content-box sized, so their padding/border
   added on top of width:100% and the items overflowed (right edge clipped) their
   column. border-box + full width makes them fit; also gives them a clean,
   consistent card look on both pages. */
body.ts-app .ts-main .move.k-block {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--text);
  line-height: 1.35;
  cursor: move;
}
/* keep the normal pointer on the action buttons in the right-hand list */
body.ts-app .ts-main .move.k-block .btn { cursor: pointer; }
body.ts-app .ts-main .move.k-block b { color: var(--head); }
body.ts-app .ts-main .move.k-block .user-details { color: var(--muted); font-size: 12px; word-break: break-word; }
/* the listview wrappers shouldn't add a border/padding that eats into the items */
body.ts-app .ts-main #allStaff_listview .k-listview,
body.ts-app .ts-main #selectedStaff_listview .k-listview,
body.ts-app .ts-main #allusers_listview .k-listview,
body.ts-app .ts-main #selectedusers_listview .k-listview {
  border: 0; padding: 0; background: transparent;
}

/* ---- Admin SMTP + SMS settings (Areas/Admin/Smtp + Areas/Admin/SMS) ----
   Both share the same tabbed fieldset/legend form (.pg-smtp hook). Card each
   fieldset, turn legends into section titles, and normalise label/field styling
   (several fields use a plain `w-100` input and missed the redesign field look). */
/* the tab container carries `tab-content wrapper p pg-formtabs` all on one
   element, so the descendant `.pg-formtabs .tab-content` rule never matches and
   the legacy `.wrapper` panel (straight edges) shows behind the rounded cards.
   Flatten it here so the cards sit on the page background like other pages. */
body.ts-app .ts-main .pg-smtp .tab-content {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; margin: 0;
}
body.ts-app .ts-main .pg-smtp fieldset {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px 20px; margin: 0 0 16px;
}
/* A <legend> normally renders in the fieldset's top-border gap, so it sat on /
   above the rounded card edge. Floating it (width:100%) drops the special
   rendering and makes it a normal heading inside the card padding; the content
   below clears it. */
body.ts-app .ts-main .pg-smtp fieldset > legend {
  float: left; width: 100%;
  font-size: 14px; font-weight: 700; color: var(--head);
  border: 0; margin: 0 0 14px; padding: 0;
}
body.ts-app .ts-main .pg-smtp fieldset > legend + * { clear: both; }
/* Bootstrap rows carry -15px side margins; inside the carded fieldset that
   pushed labels/fields out past the rounded edge. Zero them so content stays
   within the card padding. */
body.ts-app .ts-main .pg-smtp fieldset .row { margin-left: 0; margin-right: 0; }
body.ts-app .ts-main .pg-smtp label {
  color: var(--text); font-weight: 600; padding-top: 7px; margin-bottom: 0;
}
body.ts-app .ts-main .pg-smtp .row.mt { margin-bottom: 4px; }
body.ts-app .ts-main .pg-smtp input[type="text"],
body.ts-app .ts-main .pg-smtp input[type="email"],
body.ts-app .ts-main .pg-smtp input[type="password"],
body.ts-app .ts-main .pg-smtp input[type="number"] {
  width: 100%; min-height: 38px; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--text);
}
body.ts-app .ts-main .pg-smtp input:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,142,0.14);
}

/* ---- Municipal Info (Areas/Admin/Town) ----
   Same one-element `tab-content wrapper pg-formtabs` quirk as the SMTP page, so
   the descendant flatten rule misses it and the legacy `.wrapper` square panel
   shows. Flatten that, then make each tab panel a rounded card like the rest. */
body.ts-app .ts-main .pg-municipal .tab-content {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; margin: 0;
}
body.ts-app .ts-main .pg-municipal .tab-content > .tab-pane {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 22px 24px; box-shadow: 0 1px 2px rgba(12,44,73,0.04);
}

/* ---- Edit/Assign Employees filter selectors (Areas/Admin/Staff) ----
   First Name / Last Name / Email / User ID were a segmented .btn-group of
   .filterbtn buttons (looked like a button bar). Make them read like the
   pg-tabs pill chips: separated, rounded, soft-blue "selected" state. */
body.ts-app .ts-main .pg-filtertabs {
  display: flex !important; flex-wrap: wrap; gap: 6px; width: 100%; margin-bottom: 14px;
  box-shadow: none; border: 0;
}
body.ts-app .ts-main .pg-filtertabs .filterbtn {
  display: inline-flex !important; align-items: center; width: auto !important; flex: 0 0 auto;
  border: 1px solid var(--line) !important; border-radius: 9px !important;
  background: var(--card) !important; color: var(--muted) !important;
  font-weight: 600; font-size: 13.5px; line-height: 1.3;
  padding: 8px 15px !important; margin: 0 !important; box-shadow: none !important;
}
body.ts-app .ts-main .pg-filtertabs .filterbtn:hover {
  background: var(--inset) !important; color: var(--head) !important;
}
body.ts-app .ts-main .pg-filtertabs .filterbtn.active {
  background: var(--blue-soft) !important; border-color: var(--blue-line) !important;
  color: var(--navy) !important; font-weight: 700;
}
body.is-dark.ts-app .ts-main .pg-filtertabs .filterbtn.active { color: #DCEBF6 !important; }

/* ---- Cancellation Policy setup (Areas/Admin/CancellationPolicy/Setup) ----
   Content sits in pg-card sections (the legacy .panel didn't render as a card
   here). Spacing + the Kendo editor and labels are styled below. */
body.ts-app .ts-main .pg-cancelsetup .pg-card { margin-bottom: 16px; }
/* Clean, self-contained section headers (number badge + title) — deliberately
   NOT using the legacy .ico-box/.text-large/.number-block classes, which carry
   display:table-cell + big line-heights from the old wizard layout and were
   rendering into the card. */
body.ts-app .ts-main .pg-cancelsetup .pg-formsection {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 12px;
}
body.ts-app .ts-main .pg-cancelsetup .pg-formsection-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; line-height: 1;
}
body.ts-app .ts-main .pg-cancelsetup .pg-formsection-title {
  margin: 0; font-size: 15.5px; font-weight: 700; color: var(--head); letter-spacing: -0.2px; line-height: 1.3;
}
/* Description is turned into a Kendo rich-text editor at runtime
   ($(".ui-text-area").kendoEditor) — style the editor, not the hidden textarea. */
body.ts-app .ts-main .pg-cancelsetup .k-editor {
  border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card);
}
body.ts-app .ts-main .pg-cancelsetup .k-editor .k-toolbar,
body.ts-app .ts-main .pg-cancelsetup .k-editor .k-editor-toolbar {
  background: var(--inset); border-color: var(--line);
}
body.ts-app .ts-main .pg-cancelsetup .k-editor .k-editor-content,
body.ts-app .ts-main .pg-cancelsetup .k-editor iframe { background: var(--card); }
body.ts-app .ts-main .pg-cancelsetup .form-group label,
body.ts-app .ts-main .pg-cancelsetup label[for] { color: var(--text); font-weight: 600; }

/* ---- Service request "fill out" form (Areas/Issue/Views/New/_Yourself …) ----
   Style the Kendo body editor and soften the orange "allowed file types" bar
   into a subtle info note that matches the redesign. */
body.ts-app .ts-main .pg-srform .k-editor { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
body.ts-app .ts-main .pg-srform .k-editor .k-toolbar,
body.ts-app .ts-main .pg-srform .k-editor .k-editor-toolbar { background: var(--inset); border-color: var(--line); }
body.ts-app .ts-main .pg-srform .alert-warning {
  background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--text);
  border-radius: 9px; font-size: 12.5px; padding: 9px 12px;
}
body.ts-app .ts-main .pg-srform .alert-warning p { margin: 0; }

/* FAQ side panel: the faqtemplate renders .panel.widget items with an indigo
   background — restyle them into clean, left-aligned list items inside the card. */
body.ts-app .ts-main .pg-faqpanel .panel.widget { box-shadow: none; border: 0; margin: 0 0 8px; background: transparent; }
body.ts-app .ts-main .pg-faqpanel .panel.widget .panel-body {
  background: var(--inset) !important; color: var(--head);
  border: 1px solid var(--line); border-radius: 10px; text-align: left; padding: 10px 12px;
}
body.ts-app .ts-main .pg-faqpanel .panel.widget .text-white { color: var(--blue) !important; margin-top: 4px; font-weight: 600; }

/* ---- Role access (Areas/Admin/Security/RolesAccess) ----
   A Kendo PanelBar of permission rows with On/Off toggle buttons. Tidy the
   toolbar and soften the tree to match the redesign. */
body.ts-app .ts-main .pg-roleaccess .pg-roleaccess-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
body.ts-app .ts-main .pg-roleaccess .pg-roleaccess-toolbar .pg-roleaccess-btns { margin-left: auto; display: flex; gap: 8px; }
body.ts-app .ts-main .pg-roleaccess #TextRoleList { min-width: 280px; }
/* the injected panelbar tree */
body.ts-app .ts-main .role-access-controls #organizer,
body.ts-app .ts-main .role-access-controls .k-panelbar { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
body.ts-app .ts-main .role-access-controls .k-panelbar > .k-item > .k-link { background: var(--inset); color: var(--head); font-weight: 700; }
body.ts-app .ts-main .role-access-controls li > strong,
body.ts-app .ts-main .role-access-controls li > a > strong,
body.ts-app .ts-main .role-access-controls li > a > dfn { color: var(--head); font-style: normal; }
body.ts-app .ts-main .role-access-controls li > a { display: flex; align-items: center; padding: 8px 12px !important; }
/* the generated markup adds trailing <br><br> after the button group; in a flex
   row those steal the right edge — drop them and push the toggle group right. */
body.ts-app .ts-main .role-access-controls li > a br { display: none; }
body.ts-app .ts-main .role-access-controls li > a .btn-group { margin-left: auto; float: none !important; }
/* On / Off toggle buttons inside the tree — shape/size only; leave their
   on/off colours to the existing b1/b0 classes + roleaccess.js toggle state. */
body.ts-app .ts-main .role-access-controls .btn-group .btn { border-radius: 7px !important; height: 30px; padding: 0 12px; font-size: 12.5px; font-weight: 600; margin: 0 0 0 6px; float: none !important; }

/* ---- Complaints dashboard (Areas/Admin/Issue/Dashboard) ----
   Soften the bright green widget card headers, and slim the bulky stat tabs. */
body.ts-app .ts-main .pg-issuedash .card-heading.bg-green {
  background: transparent !important; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
}
body.ts-app .ts-main .pg-issuedash .card-heading .card-icon {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 14px;
}
body.ts-app .ts-main .pg-issuedash .card-heading .card-title { color: var(--head); font-weight: 700; margin: 0; }
body.ts-app .ts-main .pg-issuedash .card-footer { border-top: 1px solid var(--line-soft); }
/* slim stat tabs: the h4 + small inside each chip made them oversized */
body.ts-app .ts-main .pg-issuedash .pg-tabs > li > a { padding: 8px 14px; }
body.ts-app .ts-main .pg-issuedash .pg-tabs h4 { font-size: 13.5px; font-weight: 700; margin: 0; }
body.ts-app .ts-main .pg-issuedash .pg-tabs small { font-size: 11px; display: block; }

/* ---- Kanban dashboard (Areas/Admin/Kanban/Dashboard) ----
   The "Resources Utilization" panel is `.panel-primary`, whose heading the
   redesign tints blue-soft — but its `.card-title`/`small` keep the legacy
   theme's near-white colour (meant for the old dark-blue header), so the text
   was invisible on the light tint. Give this panel a clean neutral header with
   dark, readable text. */
body.ts-app .ts-main .pg-kanbandash .panel-primary > .panel-heading {
  background: var(--inset); border-color: var(--line);
}
body.ts-app .ts-main .pg-kanbandash .panel-heading,
body.ts-app .ts-main .pg-kanbandash .panel-heading .card-title,
body.ts-app .ts-main .pg-kanbandash .panel-heading strong {
  color: var(--head);
}
body.ts-app .ts-main .pg-kanbandash .panel-heading small { color: var(--muted); }

/* ---- Custom theme editor (Areas/Admin/CustomTheme) ----
   Bare textarea + loose buttons + raw code snippets; carded in the view, styled
   here: the CSS editor as a monospace field, the example snippets as inset code
   blocks, and a tidy button row. */
body.ts-app .ts-main .pg-customtheme #cssThemeEditor {
  width: 100%; padding: 12px 14px; resize: vertical;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--inset); color: var(--text);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5;
}
body.ts-app .ts-main .pg-customtheme #cssThemeEditor:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,142,0.14);
}
body.ts-app .ts-main .pg-customtheme .checkbox { margin: 14px 0; }
body.ts-app .ts-main .pg-customtheme pre {
  background: var(--inset); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin: 0 0 12px; overflow: auto;
}
body.ts-app .ts-main .pg-customtheme pre code {
  background: transparent; color: var(--text); padding: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
}

/* ---- Mapping layers (Areas/Mapping/Layers/Admin) ----
   Plain bootstrap tabs + bare tab panes; round the panels like the rest. */
body.ts-app .ts-main .pg-maplayers .tab-content {
  background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0;
}
body.ts-app .ts-main .pg-maplayers .tab-content > .tab-pane {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 22px 24px; box-shadow: 0 1px 2px rgba(12,44,73,0.04);
}

/* ---- Create User Account (Areas/Admin/AddAccount) ----
   The tab panel is a pg-card. Rather than fight Bootstrap's row(-15)/col(+15)
   margins (which cancel out so every nesting level aligns at the container's
   padding edge), just give the card more horizontal padding — content then sits
   comfortably inset AND stays aligned across headings, fields, nested rows and
   the Linked Account list boxes. */
body.ts-app .ts-main #x1.tab-content { padding: 22px 36px; }
/* syntax-highlight search overlay: the highlight div (text_ts_overlay, behind)
   and the semi-transparent input (search_ts_overlay, on top) never register
   perfectly under the redesign font, so the query text doubles. Hide the
   highlight layer's text/background and show a single clean opaque input. */
.ts-app .ts-main .servicerequest-filter .wrapper_ts_overlay .text_ts_overlay,
.ts-app .ts-main .servicerequest-filter .wrapper_ts_overlay .text_ts_overlay * {
  color: transparent !important; background: transparent !important;
}
.ts-app .ts-main .servicerequest-filter .wrapper_ts_overlay .text_ts_overlay { height: 40px; }
.ts-app .ts-main .servicerequest-filter .wrapper_ts_overlay .search_ts_overlay {
  opacity: 1 !important; color: var(--text) !important; height: 40px;
  left: 0; top: 0; width: 100%; padding: 0 12px; box-sizing: border-box;
}
/* the dropdown menu itself: proper token card */
.ts-app .ts-main .servicerequest-filter .dropdown-menu {
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 18px 50px rgba(12,44,73,0.18); padding: 6px; margin-top: 6px; min-width: 230px;
}
.ts-app .ts-main .servicerequest-filter .dropdown-menu > li > a {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text);
  font-size: 13.5px; font-weight: 500; line-height: 1.3;
}
.ts-app .ts-main .servicerequest-filter .dropdown-menu > li > a:hover,
.ts-app .ts-main .servicerequest-filter .dropdown-menu > li > a:focus { background: var(--inset); color: var(--head); }
.ts-app .ts-main .servicerequest-filter .dropdown-menu .divider { height: 1px; background: var(--line-soft); margin: 6px 4px; }
/* filter action row (spinner + save query + grid/list view) aligned right */
.ts-app .ts-main .servicerequest-filter .row.mb-lg { display: flex; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.ts-app .ts-main .servicerequest-filter .row.mb-lg .pull-right { float: none !important; }
.ts-app .ts-main .servicerequest-filter .row.mb-lg .col-md-6:last-child { margin-left: auto; display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex: 1; }

/* ---- facility card overlay: rate / capacity / full-sub badge tweak ----
   scoped to the facility listing so events cards are untouched. The overlay
   becomes a clean glassy info panel; rates become readable pills. */
.ts-app .ts-main .pg-facility-results .card.viewevent .card-item { position: relative; }
.ts-app .ts-main .pg-facility-results .card.viewevent .card-label {
    background: rgba(8, 22, 36, 0.62);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    color: #fff; border-radius: 11px; padding: 9px 12px; top: 12px; right: 12px; left: auto;
    font-size: 12.5px; line-height: 1.5; box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    display: flex; flex-direction: column; gap: 2px;
}
.ts-app .ts-main .pg-facility-results .card.viewevent .card-label > div {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; white-space: nowrap;
}
.ts-app .ts-main .pg-facility-results .card.viewevent .card-label > div > span:first-child { opacity: 0.85; font-weight: 500; }
.ts-app .ts-main .pg-facility-results .card.viewevent .card-label .badge.bg-info {
    background: rgba(255,255,255,0.18); color: #fff; border-radius: 999px;
    font-size: 12px !important; font-weight: 700; padding: 2px 9px;
}
/* description tooltip pill, top-left */
.ts-app .ts-main .pg-facility-results .card.viewevent .facility-dec {
    top: 12px; left: 12px; background: rgba(8,22,36,0.62); color: #fff; border-radius: 8px;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}
/* full / sub facility chips along the bottom of the image */
.ts-app .ts-main .pg-facility-results .card.viewevent .facility-type {
    position: absolute; bottom: 10px; left: 10px; margin: 0;
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(8,22,36,0.62); color: #fff; border-radius: 999px; padding: 3px 11px;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ts-app .ts-main .pg-facility-results .card.viewevent .facility-type small { color: #fff; }
.ts-app .ts-main .pg-facility-results .card.viewevent .facility-type .subfacility-icon { width: 16px; height: 16px; }

/* ---- facility "Your Reservations" cards + filter dropdown ---- */
.ts-app .ts-main .reservation-list .reservation-card { padding: 0; margin-bottom: 18px; }
.ts-app .ts-main .reservation-list .reservation-card .card {
    background: var(--card); border: 1px solid var(--line); border-radius: 13px;
    box-shadow: 0 1px 2px rgba(12,44,73,0.05); overflow: hidden; height: 100%;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.ts-app .ts-main .reservation-list .reservation-card .card:hover { border-color: var(--blue-line); box-shadow: 0 6px 18px rgba(12,44,73,0.09); }
.ts-app .ts-main .reservation-list .card-block { padding: 18px 20px; }
.ts-app .ts-main .reservation-list .product-deatil .name { font-size: 16px; font-weight: 700; color: var(--head); margin: 0 0 4px; }
.ts-app .ts-main .reservation-list .price-container { font-size: 20px; font-weight: 700; color: var(--head); margin: 0 0 8px; }
.ts-app .ts-main .reservation-list .description { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 10px; color: var(--text); font-size: 13px; }
.ts-app .ts-main .reservation-list .description .blockquote { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--muted); border: 0; padding: 0; }
.ts-app .ts-main .reservation-list .product-info { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 10px; }
.ts-app .ts-main .reservation-list .product-info .btn { margin: 0 6px 6px 0; border-radius: 8px; }
.ts-app .ts-main .reservation-list .tag1 { margin-left: 6px; }
/* filter dropdown on this page (token card) */
.ts-app .ts-main .filter-dropdown.dropdown-menu {
    background: var(--card); border: 1px solid var(--line); border-radius: 11px;
    box-shadow: 0 18px 50px rgba(12,44,73,0.18); padding: 12px; min-width: 260px;
}
.ts-app .ts-main .filter-dropdown.dropdown-menu .form-group { margin-bottom: 10px; }
.ts-app .ts-main .filter-dropdown.dropdown-menu label, .ts-app .ts-main .filter-dropdown .label-format { color: var(--head); font-weight: 600; font-size: 12.5px; }

/* ---- manage events filter pills (Live / Draft / Past / Archived) ---- */
.ts-app .ts-main .pg-eventtabs { align-items: center; margin: 18px 0; }
.ts-app .ts-main .pg-eventtabs .pg-eventtabs-sort { margin-left: auto; }
.ts-app .ts-main .pg-eventtabs .pg-eventtabs-sort .manage-events-sort {
    min-width: 180px; height: 38px; border: 1px solid var(--line); border-radius: 9px;
    background: var(--card); color: var(--text);
}
.ts-app .ts-main .pg-eventtabs .pg-eventtabs-spinner { display: flex; align-items: center; }
/* Manage Events (Areas/Admin/Events): the hero and event grid already align at
   the page edge; the filter and tabs were the outliers (filter pushed right by
   .col-sm-8 padding, tabs pulled left by the .row negative margin). Bring both
   back to the same left/right edge as the hero. */
.ts-app .ts-main .pg-eventsadmin .pg-eventtabs { margin-left: 15px; margin-right: 15px; }
.ts-app .ts-main .pg-eventsadmin .form-group > .col-sm-8 { padding-left: 0; }

/* Align tabs + tab content with the hero on admin list pages whose content is
   wrapped in a `.container-fluid` (adds ~15px gutter) with `.tab-pane.p-lg`
   (extra padding) — Manage Approvals / Manage Refunds / Manage Bookings. Zero
   the wrapper + tab-pane horizontal padding so everything sits flush at the
   hero's edge (the row>col content cancels to the same edge). */
.ts-app .ts-main .pg-flushwrap { padding-left: 0; padding-right: 0; }
.ts-app .ts-main .pg-flushwrap > .tab-content > .tab-pane { padding-left: 0; padding-right: 0; }

/* events category view: hide the Kendo breadcrumb root "home" icon */
.ts-app .ts-main .category-breadcrumb .k-breadcrumb-root-item .k-icon,
.ts-app .ts-main .category-breadcrumb .k-breadcrumb-root-item .k-button-icon,
.ts-app .ts-main .category-breadcrumb .k-i-home,
.ts-app .ts-main .category-breadcrumb .k-svg-i-home { display: none; }

/* ---- Kendo scheduler (events calendar) on the tokens ---- */
.ts-app .ts-main .k-scheduler {
    background: var(--card);
    color: var(--text);
    border-color: var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.ts-app .ts-main .k-scheduler-toolbar, .ts-app .ts-main .k-scheduler-footer {
    background: var(--inset);
    border-color: var(--line);
    color: var(--text);
}
.ts-app .ts-main .k-scheduler-header, .ts-app .ts-main .k-scheduler-header-wrap {
    background: var(--inset);
    border-color: var(--line);
    color: var(--muted);
}
.ts-app .ts-main .k-scheduler-table td, .ts-app .ts-main .k-scheduler-table th { border-color: var(--line-soft); }
.ts-app .ts-main .k-scheduler .k-other-month, .ts-app .ts-main .k-scheduler .k-nonwork-hour { background: var(--inset); }
.ts-app .ts-main .k-scheduler .k-today { background: var(--blue-soft); }
.ts-app .ts-main .k-scheduler .k-event { border-radius: 7px; background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---- sub-account cards (profile cards, not town-uploaded event cards) ---- */
.ts-app .ts-main .manage-subacc-listview { background: transparent; border: 0; }
.ts-app .ts-main .manage-subacc-listview .card.viewevent {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 1px 2px rgba(12,44,73,0.04);
    color: var(--text);
    transition: border-color .12s ease, box-shadow .12s ease;
}
.ts-app .ts-main .manage-subacc-listview .card.viewevent:hover { border-color: var(--blue-line); box-shadow: 0 4px 14px rgba(12,44,73,0.08); }
.ts-app .ts-main .manage-subacc-listview .card-body { color: var(--text); text-align: center; padding: 18px; }
.ts-app .ts-main .manage-subacc-listview .card-body label, .ts-app .ts-main .manage-subacc-listview .label-format { color: var(--head); }
.ts-app .ts-main .manage-subacc-listview .img-circle { border: 3px solid var(--blue-soft); }
.ts-app .ts-main .manage-subacc-listview .btn { margin-top: 8px; }

/* ticket report area: keep the printable content on a white surface in both themes */
.ts-app .ts-main #full_ticket #ticket-report { background: #fff; border-radius: 9px; }

/* ---- reservation date-range groups in dark mode ----
   theme-dark.css hardcodes a pale-green highlight on both the reservation form's
   From/To picker group (#fullDayTime, facility reservation page) and the scheduler
   setup block (#div-resavationTimes):
       #div-resavationTimes,#fullDayTime { background-color:#c4d6c6; ... }
   On the light theme's white form that green reads as a soft highlight, but in dark
   mode it renders as a jarring bright box inside the dark .panel (--card) and pairs
   the light-green fill with a light text colour, failing contrast. Re-tint to the
   dark inset surface so the group still reads as a softly raised block but matches
   the surrounding panels. Scoped to .is-dark only, so light mode keeps its green. */
body.ts-app.is-dark #fullDayTime,
body.ts-app.is-dark #div-resavationTimes {
  background-color: var(--inset);
  color: var(--text);
  border-radius: 10px;
}

/* ---- Facility reservation page (Areas/Facility/Info/Index): panel padding ----
   The page's cards had their headers jammed into the top edge. The plain Bootstrap
   panels (reservation form / Booked Dates / Attachments) use tight defaults
   (10px heading, 15px body), and the Facility Info / Location cards wrap a
   `.responsive-accordion` whose desktop rule goes further:
       .responsive-accordion .panel-default > .panel-heading { padding: 0 0 10px }  (zero top)
       …+ .panel-collapse > .panel-body { padding: 0 }
   Under the redesign's rounded --inset header-bar treatment the titles sat hard in
   the top corner. Give every panel header AND body matching, comfortable padding
   (same rhythm as .pg-tickets). They must share the horizontal value: a Bootstrap
   `.row` inside the body carries -15px margins that cancel the column's +15px, so
   row content lands at the body's padding value and stays aligned under the header.
   Padding only, so it applies in both themes. Scoped to #reservationInfoView. */
.ts-app .ts-main #reservationInfoView .panel-heading { padding: 14px 20px; }
.ts-app .ts-main #reservationInfoView .panel-body { padding: 18px 20px; }

/* The "Reservation Day" date-range callout (#fullDayTime — the From/To box whose
   highlight is re-tinted above) only had facility.css's padding:12px, which felt
   tight against the roomier panels. Give it matching, symmetric padding so it reads
   as a comfortable card. Both themes (the light-mode green fill and the dark --inset
   fill); the id-heavy selector beats facility.css's `#fullDayTime`. */
.ts-app .ts-main #reservationInfoView #fullDayTime { padding: 16px 18px; }

/* ---- Facility reservation: Kendo expansion panels (Reservation Day / Notes /
   Extra Items) ----
   These sections are Kendo expansionpanels (.main-expansion-panel → .k-expander).
   The redesign restyled .panel but never .k-expander, so they kept the Kendo theme's
   grey fill (rgb 42,49,55) — a grey block sitting on the navy reservation card.
   Blend each into the card (transparent) and treat its header as a clean section
   divider with comfortable padding. Horizontal padding stays 0 so the header text,
   the form rows (Bootstrap .row -15px margins cancel the column +15px) and the
   #fullDayTime callout all line up at the card's content edge. Both themes. */
.ts-app .ts-main #reservationInfoView .main-expansion-panel.k-expander,
.ts-app .ts-main #reservationInfoView .main-expansion-panel .k-expander-header,
.ts-app .ts-main #reservationInfoView .main-expansion-panel .k-expander-content {
  background: transparent;
}
.ts-app .ts-main #reservationInfoView .main-expansion-panel .k-expander-header {
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.ts-app .ts-main #reservationInfoView .main-expansion-panel .k-expander-content {
  padding: 16px 0 0;
}

/* The Gross / Tax / Grand Total summary is a floated .pull-right inside .panel-footer,
   with the action buttons beside it. The footer had no float containment, so it
   collapsed and the totals table spilled out below the card ("outside the panel").
   flow-root makes the footer wrap its float again. */
.ts-app .ts-main #reservationInfoView .panel-footer { display: flow-root; }

/* =====================================================================
   ASK TOWNSUITE DOCK — ported from the Expedition homepage chat
   (.ts-chatfab / .ts-chat via the prototype's proto-ask.css).
   Markup built by townsuite-ask.js; follows tokens + dark mode.
   ===================================================================== */
.pr-askfab {
  position: fixed; right: 22px; bottom: 22px; z-index: 140;
  display: flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 21px 0 16px; border-radius: 100px;
  border: none; cursor: pointer;
  background: var(--navy); color: #fff;
  font-family: inherit; font-weight: 700; font-size: 15px;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--navy) 22%, transparent), 0 2px 6px rgba(7, 25, 40, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pr-askfab:hover { transform: translateY(-3px); }
.pr-askfab .spark { width: 21px; height: 21px; flex: none; }
body.is-dark .pr-askfab { color: #F2F7FB; }

.pr-ask {
  position: fixed; right: 22px; bottom: 22px; z-index: 160;
  width: min(382px, calc(100vw - 32px));
  max-height: min(580px, calc(100svh - 44px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; background: var(--card);
  border: 1.5px solid var(--line);
  box-shadow: 0 8px 24px rgba(7, 25, 40, 0.14), 0 32px 80px rgba(7, 25, 40, 0.18);
  animation: praskpop 0.2s ease;
  font-size: 14.5px; line-height: 1.5;
}
@keyframes praskpop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

.pr-ask__head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 17px; background: var(--navy); color: #fff; flex: none;
}
body.is-dark .pr-ask__head { color: #F2F7FB; }
.pr-ask__head .spark { width: 23px; height: 23px; flex: none; }
.pr-ask__head b { font-size: 15.5px; display: block; line-height: 1.15; }
.pr-ask__head small { font-size: 11.5px; opacity: 0.85; display: flex; align-items: center; gap: 6px; }
.pr-ask__head small .maple { width: 11px; height: 11px; fill: currentColor; }
.pr-ask__x {
  margin-left: auto; flex: none;
  width: 32px; height: 32px; border: none; border-radius: 10px;
  background: rgba(255, 255, 255, 0.16); color: inherit;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}

.pr-ask__log {
  flex: 1; min-height: 170px; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 11px;
}
.pr-bubble {
  max-width: 88%; border-radius: 15px; padding: 11px 15px;
  font-size: 13.8px; line-height: 1.5;
}
.pr-bubble.is-user {
  align-self: flex-end; background: var(--navy); color: #fff;
  border-bottom-right-radius: 5px;
}
body.is-dark .pr-bubble.is-user { color: #F2F7FB; }
.pr-bubble.is-bot {
  align-self: flex-start; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-bottom-left-radius: 5px;
  box-shadow: 0 1px 2px rgba(7, 25, 40, 0.05);
}
.pr-bubble.is-bot b { color: var(--navy); }
body.is-dark .pr-bubble.is-bot b { color: var(--blue); }
.pr-bubble .pr-ask-cta {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 9px; min-height: 34px; padding: 0 14px;
  border: 1px solid var(--blue-line); border-radius: 100px;
  background: var(--blue-soft); color: var(--navy);
  font-family: inherit; font-size: 12.8px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: filter 0.15s;
}
.pr-bubble .pr-ask-cta:hover { filter: brightness(0.96); text-decoration: none; }
body.is-dark .pr-bubble .pr-ask-cta { color: var(--blue); }

.pr-ask__typing { display: inline-flex; gap: 6px; align-items: center; padding: 13px 16px; }
.pr-ask__typing i {
  width: 7px; height: 7px; border-radius: 1.5px; display: block;
  transform: rotate(45deg); animation: praskblink 1.1s infinite;
}
.pr-ask__typing i:nth-child(1) { background: #E48D1A; }
.pr-ask__typing i:nth-child(2) { background: #2DA343; animation-delay: 0.18s; }
.pr-ask__typing i:nth-child(3) { background: #E03A3E; animation-delay: 0.36s; }
@keyframes praskblink {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0) rotate(45deg); }
  35% { opacity: 1; transform: translateY(-3px) rotate(45deg); }
}

.pr-ask__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 13px; flex: none; }
.pr-ask__chips button {
  border: 1px solid var(--blue-line); background: var(--card); color: var(--navy);
  font-family: inherit; font-weight: 600; font-size: 12.8px;
  border-radius: 100px; min-height: 36px; padding: 0 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pr-ask__chips button:hover { background: var(--blue-soft); }
body.is-dark .pr-ask__chips button { color: var(--blue); }

.pr-ask__composer {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.pr-ask__composer input {
  flex: 1; min-width: 0; min-height: 40px; padding: 0 15px;
  font-family: inherit; font-size: 13.8px; color: var(--head);
  background: var(--inset); border: 1px solid var(--line); border-radius: 100px;
  outline: none; transition: border-color 0.18s;
}
.pr-ask__composer input::placeholder { color: var(--faint); }
.pr-ask__composer input:focus { border-color: var(--blue); box-shadow: none; }
.pr-ask__composer button {
  flex: none; width: 40px; min-height: 40px; border: none; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 17px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: inherit; transition: filter 0.18s, transform 0.18s;
}
.pr-ask__composer button:hover { filter: brightness(1.12); transform: translateX(2px); }
body.is-dark .pr-ask__composer button { color: #F2F7FB; }

.pr-ask__foot {
  flex: none; padding: 10px 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  font-size: 11.2px; color: var(--muted);
}
.pr-ask__foot .maple { width: 12px; height: 12px; fill: #E03A3E; flex: none; }
.pr-ask.has-composer .pr-ask__foot { display: none; }

@media (max-width: 560px) {
  .pr-askfab .lbl { display: none; }
  .pr-askfab { padding: 0; width: 54px; justify-content: center; }
}

/* =====================================================================
   GLOBAL CONSISTENCY PASS
   ===================================================================== */

/* every panel-like surface shares the same curve as pg-card/ob-card */
.ts-app .ts-main .panel, .ts-app .ts-main .well, .ts-app .ts-main .card,
.ts-app .ts-main .k-grid, .ts-app .ts-main .k-listview,
.ts-app .ts-main .k-tabstrip > .k-content, .ts-app .ts-main .k-block {
    border-radius: 13px;
}
.ts-app .k-window { border-radius: 14px; }

/* text selection must always be readable, light + dark, on any surface */
body.ts-app *::selection { background: #00578E !important; color: #FFFFFF !important; }
body.ts-app.is-dark *::selection { background: #7FB4D6 !important; color: #071420 !important; }

/* ---- admin dashboard ---- */
/* year filter strip (kendo tabstrip themed to the underline-tab language) */
.pg-yeartabs.filtering-tabs { border: 0; background: none; }
.pg-yeartabs .k-tabstrip-items { padding: 0; gap: 4px; }
.pg-yeartabs .k-item {
    border: 0; margin: 0; padding: 0 0 4px; text-align: center; cursor: pointer;
    background: none; border-bottom: 3px solid var(--line);
    font-size: 13.5px; font-weight: 600; line-height: 2em; color: var(--muted);
    flex: 1;
}
.pg-yeartabs .k-item.k-state-hover, .pg-yeartabs .k-item.k-hover { color: var(--head); background: none; }
.pg-yeartabs .k-item.k-state-active, .pg-yeartabs .k-item.k-active {
    padding: 0 0 4px; color: var(--navy); border-bottom-color: var(--blue); background: none;
}
body.is-dark .pg-yeartabs .k-item.k-state-active, body.is-dark .pg-yeartabs .k-item.k-active { color: var(--blue); }
.pg-yeartabs .k-link { padding: 0; color: inherit; }

/* chart cards */
.pg-chartcard { margin-bottom: 22px; }
.pg-chartcard .chart-wrapper { margin: auto; }
.pg-chartcard .k-chart { border-radius: 10px; }

/* compact, scrollable action-log feed (rows are injected as .alert.alert-info) */
.pg-actionlog { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ts-app .ts-main .pg-actionlog .alert.alert-info {
    background: var(--inset);
    border: 1px solid var(--line-soft);
    color: var(--text);
    border-radius: 9px;
    padding: 8px 12px;
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
}
.ts-app .ts-main .pg-actionlog .alert.alert-info a,
.ts-app .ts-main .pg-actionlog .alert-info-a { color: var(--blue); font-weight: 600; }

/* slim link-row card (e.g. "View User Report") */
.pg-linkrow { display: flex; align-items: center; gap: 12px; padding: 14px 20px; margin-bottom: 22px; }
.pg-linkrow a { font-weight: 600; }

/* search toolbar row (input grows, button keeps natural width) */
.pg-searchrow { display: flex; gap: 10px; align-items: center; }
.pg-searchrow .k-textbox, .pg-searchrow input[type="text"] { flex: 1; min-width: 0; margin: 0; }
@media (max-width: 640px) {
  .pg-searchrow { flex-direction: column; align-items: stretch; }
}

/* tab panes with their own heading row (payments dashboard etc.) */
.pg-formtabs .pg-card-title { margin-top: 4px; }
.pg-formtabs .pg-card-title .ts-btn.is-add { margin-left: auto; height: 32px; padding: 0 12px; font-size: 12.5px; }

/* =====================================================================
   PUBLIC LANDING PAGE (Views/Home/Index.cshtml) — scoped reskin.
   CSS-only over the existing markup; town logo + uploaded card images
   and all JS hooks are untouched. Activated by body.ts-app.pg-landing.
   ===================================================================== */
/* auto-theme users: dark tokens follow the device */
@media (prefers-color-scheme: dark) {
  body.ts-app.pg-landing.is-auto {
    --bg: #071420; --side: #0A1B2A; --card: #0D2032; --inset: #122A3F;
    --line: #1C3850; --line-soft: #173049;
    --head: #E9F0F6; --text: #A8BBCA; --muted: #8597A6; --faint: #8294A3;
    --navy: #00578E; --blue: color-mix(in oklab, #00578E 52%, white);
    --blue-soft: color-mix(in oklab, #00578E 17%, #0D2032);
    --blue-line: color-mix(in oklab, #00578E 42%, #0D2032);
    --green: #44B25D; --red: #E5716D; --amber: #E8A14A;
    color-scheme: dark;
  }
}

body.pg-landing { background: var(--bg) !important; color: var(--text); min-height: 100vh; }
body.pg-landing .wrapper { background: var(--bg); }

/* ---- top bar ----
   Layout is left to the original home.css (floats position logo left /
   controls right and it worked). We only restyle colours, borders and the
   button/logo appearance — no display/float/order/position changes. */
body.pg-landing .mast-head {
  background: var(--card); border-bottom: 1px solid var(--line);
}
body.pg-landing .townsuite-logo a { color: var(--head); text-decoration: none; }
body.pg-landing .townsuite-logo img { border-radius: 9px; }
body.pg-landing .culture-input, body.pg-landing .culture-input-container select {
  border: 1px solid var(--line); border-radius: 9px; background: var(--card);
  color: var(--text); font-size: 13.5px;
}
body.pg-landing #sign-in {
  background: var(--navy); color: #fff !important; font-weight: 700; border-radius: 11px;
  padding: 8px 18px; text-decoration: none;
}
body.pg-landing.is-dark #sign-in { color: #F2F7FB !important; }
body.pg-landing #sign-in:hover { filter: brightness(1.1); }
body.pg-landing #your_dashboard_link, body.pg-landing #your_dashboard_link-icon {
  background: var(--navy); border-color: var(--navy); color: #fff; border-radius: 11px;
}
body.pg-landing .ts-learn-more { color: var(--blue); font-weight: 600; text-decoration: none; }

/* ---- main content width ----
   Only constrain width + centre horizontally. Do NOT override vertical
   padding/margin — the page's own .header/.p-lg classes reserve the top
   clearance for the CDN's positioned mast-head; overriding it tucks the
   top cards under the header. */
body.pg-landing #mainContent { max-width: 1320px; margin-left: auto; margin-right: auto; }
body.pg-landing #mainContent > .container-events { padding: 0; width: auto; max-width: none; }

/* ---- news card ---- */
body.pg-landing .news.card, body.pg-landing card.news {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(12,44,73,0.05); padding: 22px 24px; margin-bottom: 30px; position: relative;
}
body.pg-landing .news .h3, body.pg-landing card.news .h3 {
  font-size: 18px; font-weight: 700; color: var(--head); margin: 0 0 6px; letter-spacing: -0.2px;
}
body.pg-landing .news .list-group { margin: 0; }
body.pg-landing .news .list-group-item {
  background: transparent; border: 0; border-top: 1px solid var(--line-soft);
  border-radius: 0; padding: 14px 0; display: block;
}
body.pg-landing .news .list-group-item:first-of-type { border-top: 0; }
body.pg-landing .news .media-box-heading { color: var(--blue); font-weight: 700; font-size: 14.5px; }
body.pg-landing .news .mediabox-description, body.pg-landing .news .mediabox-description small { color: var(--muted); }
body.pg-landing .news .media-box-body .pull-right { color: var(--faint); font-size: 12px; }
body.pg-landing .news .circle-success {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  margin-right: 8px; vertical-align: middle;
}
body.pg-landing .news .view-more {
  position: absolute; top: 24px; right: 24px; color: var(--blue); font-weight: 600; font-size: 13px; text-decoration: none;
}
/* Two .view-more links sit in this top-right corner: the "View more" text and the
   RSS icon (DOM order: text, then icon). Both are absolutely positioned, so the
   offsets must be laid out by hand. The RSS icon is the narrow one — pin it flush
   to the right edge; shift the wider "View more" text left of it so the two no
   longer overlap. (:has() guards the shift so a lone "View more" stays in the
   corner.) */
body.pg-landing .news .view-more:has(+ .view-more) { right: 48px; }
body.pg-landing .news .view-more + .view-more { right: 24px; }

/* ---- "Available eServices" heading ---- */
body.pg-landing .container-events > card.news, body.pg-landing .container-events > .news {
  border: 0; background: none; box-shadow: none; padding: 0; margin: 0 0 16px;
}
body.pg-landing .container-events > card.news .h3 { font-size: 22px; }

/* ---- service card grid ----
   Fixed-size cards (260 x 280) in a rigid CSS Grid of 260px tracks. Grid tracks
   are immune to content width, so the wide preview widgets (weather / schedule)
   can't stretch a card — every card is an identical 260px box and every row
   aligns into the same columns, however many fit per row. */
/* !important is required here: the original landing stylesheet (CDN home-*.css)
   styles .row.ng-scope as a flex row, so without it the cols shrink-to-content
   and cards come out different widths (e.g. ePermitting narrower than the rest). */
body.pg-landing #mainContent .row.ng-scope {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 260px) !important;
  justify-content: center !important;
  gap: 22px; margin: 0;
}
body.pg-landing #mainContent .row.ng-scope > [class*="col-"] {
  width: 260px !important; max-width: none !important; min-width: 0 !important;
  flex: 0 0 260px !important;
  padding: 0 !important; margin: 0 !important; float: none !important; position: relative; display: flex;
}
/* Bootstrap's `.row` adds ::before/::after clearfix pseudo-elements
   (content:" "; display:table). They collapsed harmlessly in the old flex
   layout, but in a grid each becomes a grid item taking a full 260px track —
   that was the empty cell before Events. Remove them from the grid. */
body.pg-landing .row.ng-scope::before,
body.pg-landing .row.ng-scope::after { content: none; display: none; }
/* also drop any stray non-card child just in case */
body.pg-landing .row.ng-scope > :not([class*="col-"]) { display: none; }
body.pg-landing .viewevent.card {
  display: flex !important; flex-direction: column !important; width: 100% !important; height: 280px !important; min-width: 0;
  background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(12,44,73,0.05); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
body.pg-landing a:hover .viewevent.card { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(12,44,73,0.12); border-color: var(--blue-line); }
body.pg-landing .viewevent .card-item { position: relative; line-height: 0; height: 150px !important; flex: 0 0 150px !important; width: 100% !important; overflow: hidden !important; }
/* <picture> is display:inline by default — force it to fill so the inner img
   can't let the picture's natural size dictate the card width */
body.pg-landing .viewevent .card-item picture { display: block !important; width: 100% !important; height: 150px !important; }
body.pg-landing .viewevent .card-item img { display: block !important; width: 100% !important; height: 150px !important; object-fit: cover !important; max-width: none !important; }
body.pg-landing .viewevent .card-label {
  position: absolute; top: 12px; right: 12px; background: var(--card); color: var(--head);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 11px;
  font-weight: 700; line-height: 1.4; box-shadow: 0 2px 8px rgba(12,44,73,0.12); text-align: center;
}
body.pg-landing .viewevent .card-offset { display: none; }
body.pg-landing .viewevent .card-body { padding: 16px 18px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
body.pg-landing .viewevent .card-body h2 {
  font-size: 17px; font-weight: 700; color: var(--head); margin: 0 0 5px; letter-spacing: -0.2px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
body.pg-landing .viewevent .card-body .text-muted {
  color: var(--muted); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
body.pg-landing .viewevent .text-tag { margin: 0; }
body.pg-landing .row.ng-scope a { text-decoration: none; display: block; height: 100%; }
body.pg-landing .change-picture {
  position: absolute; top: 18px; left: 18px; z-index: 4; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line); color: var(--head); font-size: 12px; padding: 4px 10px;
}

/* ---- footer ---- */
body.pg-landing .footer-full-width { max-width: 1320px; margin: 0 auto; padding: 18px 24px; border-top: 1px solid var(--line); color: var(--muted); }
body.pg-landing .footer-full-width .pull-right { color: var(--faint); font-size: 12px; }

@media (max-width: 640px) {
  body.pg-landing .mast-head { padding: 0 14px; gap: 10px; min-height: 56px; }
  body.pg-landing #mainContent { padding: 18px 14px 30px; }
  /* cards stay fixed-size; on very narrow screens center them so the fixed
     260px width doesn't sit lopsided against the edge */
  body.pg-landing .row.ng-scope { justify-content: center; }
}

/* =====================================================================
   YOUR ACCOUNT page (Views/User/Index.cshtml) — profile rail + setting
   cards, from the "Your account" design. Built on pg-dash + tokens.
   ===================================================================== */
/* cap + centre the page so the short content doesn't spread across full-bleed width */
.ts-app .ts-main .ob-main.pg-account { max-width: 1180px; margin-left: auto; margin-right: auto; }
/* settings cards in two columns (per the design), collapsing to one when narrow */
.pg-account .ac-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .pg-account .ac-grid { grid-template-columns: 1fr; } }
.pg-account .ac-tagline { font-size: 13px; color: var(--muted); text-align: center; margin: 4px 0 16px; line-height: 1.5; }

/* profile stat row */
.ac-stats { display: flex; gap: 8px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.ac-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; text-decoration: none; transition: background .12s ease; }
.ac-stat:hover { background: var(--inset); text-decoration: none; }
.ac-stat-num { font-size: 22px; font-weight: 700; color: var(--head); letter-spacing: -0.4px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ac-stat-lbl { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.3; }

/* help card */
.ac-help { text-align: center; }
.ac-help-title { font-size: 15px; font-weight: 700; color: var(--head); margin-bottom: 12px; }

/* setting cards grid */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ac-item {
  display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 1px 2px rgba(12,44,73,0.04); text-decoration: none;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.ac-item:hover { border-color: var(--blue-line); box-shadow: 0 6px 18px rgba(12,44,73,0.09); transform: translateY(-2px); text-decoration: none; }
.ac-item-icon {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue);
  font-size: 16px;
}
body.is-dark .ac-item-icon { color: var(--blue); }
.ac-item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ac-item-title { font-size: 14.5px; font-weight: 700; color: var(--head); letter-spacing: -0.2px; }
.ac-item-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ac-item-desc:empty { display: none; }

/* ---- position management: contain the Kendo OrgChart / matrix so a wide tree
   scrolls inside the card instead of breaking the page layout. Do NOT override
   box-sizing on the chart's descendants — the OrgChart widget measures each
   node's rendered size to position nodes and connectors, so it must stay on the
   site's global border-box or the layout mis-aligns. ---- */
.ts-app .ts-main #currentOrganizationChart,
.ts-app .ts-main #matrixReport { max-width: 100%; overflow: auto; }

/* =====================================================================
   SweetAlert2 — theme the popups to the design tokens. SA2 appends its
   container to <body>, which carries ts-app + is-dark, so light/dark both
   resolve from the tokens. !important is needed where SA2 sets colours inline
   via its own stylesheet.
   ===================================================================== */
body.ts-app .swal2-popup {
  background: var(--card) !important;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-family: 'Dax', 'Source Sans 3', system-ui, sans-serif;
}
body.ts-app .swal2-title { color: var(--head); font-weight: 700; letter-spacing: -0.2px; }
body.ts-app .swal2-html-container,
body.ts-app .swal2-html-container b { color: var(--text); }
body.ts-app .swal2-html-container b { color: var(--head); }
body.ts-app .swal2-close { color: var(--muted); }
body.ts-app .swal2-close:hover { color: var(--head); }

/* buttons */
body.ts-app .swal2-styled.swal2-confirm {
  background: var(--navy) !important; color: #fff !important;
  border-radius: 11px; font-weight: 700; box-shadow: 0 6px 16px rgba(0,87,142,0.16);
}
body.ts-app.is-dark .swal2-styled.swal2-confirm { color: #F2F7FB !important; }
body.ts-app .swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px rgba(0,87,142,0.3); }
body.ts-app .swal2-styled.swal2-cancel {
  background: var(--card) !important; color: var(--head) !important;
  border: 1px solid var(--line) !important; border-radius: 11px; font-weight: 700;
}
body.ts-app .swal2-styled.swal2-deny {
  background: var(--red) !important; color: #fff !important; border-radius: 11px; font-weight: 700;
}
body.ts-app .swal2-styled:focus { outline: none; }

/* inputs inside swal */
body.ts-app .swal2-input, body.ts-app .swal2-textarea, body.ts-app .swal2-select {
  background: var(--inset); border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); box-shadow: none;
}
body.ts-app .swal2-input:focus, body.ts-app .swal2-textarea:focus, body.ts-app .swal2-select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,142,0.14);
}
body.ts-app .swal2-validation-message { background: var(--inset); color: var(--text); }
body.ts-app .swal2-footer { border-top-color: var(--line-soft); color: var(--muted); }
/* semantic icon colours (success/error/warning/info) are left as SA2 defaults */

/* =====================================================================
   TsMessage toasts (UIkit notify) — the bottom-right popups raised by
   TsMessage.ShowError / ShowSuccess / ShowWarning / ShowInformation.
   Markup: .uk-notify (container) > .uk-notify-message.alert.alert-{status}.
   Reskinned to a rounded card with a status accent bar + icon, on the
   redesign tokens (light/dark resolve automatically under body.ts-app).
   ===================================================================== */
body.ts-app .uk-notify { box-sizing: border-box; }
body.ts-app .uk-notify-message {
  position: relative;
  min-width: 280px; max-width: 400px;
  margin-bottom: 12px;
  padding: 14px 38px 14px 46px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--card) !important;
  color: var(--head) !important;
  box-shadow: 0 12px 32px rgba(12,44,73,0.20);
  font-family: inherit; font-size: 13.5px; line-height: 1.45; font-weight: 500;
}
body.ts-app .uk-notify-message > div { color: var(--head); }
/* status icon */
body.ts-app .uk-notify-message::before {
  font-family: FontAwesome; position: absolute; left: 16px; top: 14px;
  font-size: 17px; line-height: 1.2; color: var(--blue);
}
body.ts-app .uk-notify-message.alert-danger  { border-left-color: var(--red); }
body.ts-app .uk-notify-message.alert-danger::before  { content: "\f06a"; color: var(--red); }
body.ts-app .uk-notify-message.alert-success { border-left-color: var(--green); }
body.ts-app .uk-notify-message.alert-success::before { content: "\f058"; color: var(--green); }
body.ts-app .uk-notify-message.alert-warning { border-left-color: var(--amber); }
body.ts-app .uk-notify-message.alert-warning::before { content: "\f071"; color: var(--amber); }
body.ts-app .uk-notify-message.alert-info    { border-left-color: var(--blue); }
body.ts-app .uk-notify-message.alert-info::before    { content: "\f05a"; color: var(--blue); }
/* close button */
body.ts-app .uk-notify-message .close {
  position: absolute; top: 9px; right: 11px;
  font-size: 18px; font-weight: 600; line-height: 1;
  color: var(--muted); opacity: .85; text-shadow: none; text-decoration: none;
}
body.ts-app .uk-notify-message .close:hover { color: var(--head); opacity: 1; }

/* =====================================================================
   Dark-mode contrast fixes (WCAG AA)
   In dark mode the --blue token flips to a LIGHT accent blue (#83a6c5) and
   --red to a light red (#E5716D). Several solid buttons/badges kept these as
   their *background* under white/near-white text, dropping to ~2.4–3.4:1.
   Re-point those backgrounds at the dark --navy (#00578E, white ≈7.6:1) and a
   fixed accessible red so the on-button text passes. (Light theme unaffected —
   these are body.is-dark only.)
   ===================================================================== */
body.is-dark.ts-app .btn-primary:hover, body.is-dark.ts-app .btn-primary:focus,
body.is-dark.ts-app .btn-primary:active, body.is-dark.ts-app .btn-primary:active:hover,
body.is-dark .ts-main .btn-success:hover, body.is-dark .ts-main .btn-success:focus,
body.is-dark .ts-main .btn-success:active, body.is-dark .ts-main .btn-success:active:hover,
body.is-dark .ob-sumavatar,
body.is-dark .ts-main .k-scheduler .k-event {
    background: var(--navy);
    border-color: var(--navy);
    color: #F2F7FB;
}
body.is-dark .ts-btn.is-danger,
body.is-dark .ts-main .btn-danger,
body.ts-app.is-dark .swal2-styled.swal2-deny {
    background: #CE2D32 !important;   /* dark --red (#E5716D) gives white only ~3:1 */
    border-color: #CE2D32 !important;
    color: #fff !important;
}
