/* Civadelia Operations V2.6C: fixed application chrome and RevenueCat-inspired tables.
   Only the authenticated managed-staff shell is altered. No data, URLs, or form logic. */
@media screen and (min-width:901px) and (min-height:501px) {
  body.co-ui-v1 .co-app-shell.civa-nav-refresh {
    height:100vh;height:100dvh;min-height:0;overflow:hidden;
  }
  body.co-ui-v1 .co-app-shell.civa-nav-refresh > .co-app-frame {
    display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;
  }
  body.co-ui-v1 .co-app-shell.civa-nav-refresh .co-topbar {
    position:relative!important;top:auto!important;flex:0 0 var(--co-topbar-height);
    min-height:var(--co-topbar-height);z-index:60;
  }
  body.co-ui-v1 .co-app-shell.civa-nav-refresh main.co-main {
    flex:1 1 0%;min-height:0;max-height:none;overflow-y:auto!important;
    overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;
  }
  body.co-ui-v1 .co-app-shell.civa-nav-refresh .co-footer {
    box-sizing:border-box;flex:0 0 auto;max-width:none;width:100%;
    min-height:37px;padding:10px 24px;margin:0;border-top:1px solid var(--civa24-line,#dce2e9);
    background:var(--civa24-surface,#fff);color:var(--civa24-muted,#596779);
    display:flex;align-items:center;justify-content:space-between;gap:16px;z-index:10;
  }
  /* Keep the first and last editable controls reachable in the independent scroller. */
  body.co-ui-v1 .co-app-shell.civa-nav-refresh main.co-main {scroll-padding-block:16px 32px;}
}
/* Let the browser control normal document flow for phones, on-screen keyboards,
   very short viewports and print output. No overlay or hidden scrollbars. */
@media print {
  body.co-ui-v1 .co-app-shell.civa-nav-refresh {height:auto!important;overflow:visible!important;}
  body.co-ui-v1 .co-app-shell.civa-nav-refresh .co-app-frame {height:auto!important;overflow:visible!important;}
  body.co-ui-v1 .co-app-shell.civa-nav-refresh main.co-main {overflow:visible!important;}
}

/* A single contextual row with the measured edges from V2.6B. V2.6C adjusts
   its vertical proximity to the real title panel on General Setup and peers. */
main.co-main.civa-v26-enhanced .civa-v26-context:not([hidden]) {
  position:relative;isolation:isolate;z-index:3;column-gap:15px;
}
main.co-main.civa-v26-enhanced .civa-v26-breadcrumbs {font-size:14px;}
main.co-main.civa-v26-enhanced .civa-v26-back {white-space:nowrap;}

/* Data-table design: restrained neutral headers, readable rows and subtle
   interactive feedback, matching the supplied RevenueCat table reference.
   These selectors are restricted to authorised Operations pages and preserve
   original structure/columns/links/forms. */
main.co-main.civa-v26-enhanced {
  --civa26c-table-bg:var(--civa24-surface,#fff);
  --civa26c-table-head:var(--civa24-soft,#f5f6f8);
  --civa26c-table-divider:var(--civa24-line,#dce2e9);
  --civa26c-table-text:var(--civa24-text,#222b37);
  --civa26c-table-muted:var(--civa24-muted,#596779);
  --civa26c-table-hover:var(--civa24-hover,var(--brand-faint));
}
main.co-main.civa-v26-enhanced :is(
  .cg-table-wrap,.gs-table-wrap,.fin-table-wrap,.pc-table-wrap,
  .rss-table-wrap,.rs-table-wrap,.pes-table-wrap,.grad-table-wrap,.rep-table-wrap,
  .civa-v25-records,.co-table-responsive
) {max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table {
  box-sizing:border-box;border-collapse:separate!important;border-spacing:0!important;
  width:100%!important;table-layout:auto;background:var(--civa26c-table-bg)!important;
  color:var(--civa26c-table-text)!important;font-size:14px!important;line-height:1.45;
}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table thead th {
  position:relative;text-align:left;vertical-align:middle;
  padding:11px 14px!important;font-size:12.5px!important;line-height:1.45!important;
  font-weight:680!important;letter-spacing:.01em;text-transform:none!important;
  color:var(--civa26c-table-text)!important;background:var(--civa26c-table-head)!important;
  border-bottom:1px solid var(--civa26c-table-divider)!important;
}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table tbody td {
  padding:12px 14px!important;vertical-align:middle;line-height:1.5!important;
  font-size:14px!important;border-bottom:1px solid var(--civa26c-table-divider)!important;
  background:transparent!important;color:var(--civa26c-table-text)!important;
}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table tbody tr {transition:background-color .14s ease;}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table tbody tr:is(:hover,:focus-within) {background:var(--civa26c-table-hover)!important;}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table tbody tr:last-child td {border-bottom:0!important;}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table td :is(small,small a) {font-size:12.5px;line-height:1.45;color:var(--civa26c-table-muted);}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table td a {text-underline-offset:3px;}
main.co-main.civa-v26-enhanced :is(
  .cg-page,.gs-shell,.fin-page,.pc-page,.rss-page,.rs-page,.pes-page,
  .grad-page,.rep-page,.cop-page,.civa-reg-wrap,.civa-v25-directory-page
) table td a:focus-visible {outline:2px solid var(--civa24-accent,var(--brand-text));outline-offset:3px;}
/* RevenueCat-style directory rows are non-table links and remain navigable. */
main.co-main.civa-v26-enhanced .civa-v25-record-head {
  background:var(--civa26c-table-head)!important;color:var(--civa26c-table-text)!important;
  border-bottom:1px solid var(--civa26c-table-divider)!important;
  font-size:12.5px!important;letter-spacing:.01em!important;
}
main.co-main.civa-v26-enhanced .civa-v25-records > a:is(.gs-user-row,.access-user-row) {
  border-bottom:1px solid var(--civa26c-table-divider)!important;
  transition:background-color .14s ease;
}
main.co-main.civa-v26-enhanced .civa-v25-records > a:is(.gs-user-row,.access-user-row):is(:hover,:focus-visible) {
  background:var(--civa26c-table-hover)!important;
}
html[data-civa-theme='dark'] main.co-main.civa-v26-enhanced {
  --civa26c-table-bg:#222730;--civa26c-table-head:#2a3039;
  --civa26c-table-divider:#414b58;--civa26c-table-text:#f1f3f6;
  --civa26c-table-muted:#bec8d4;--civa26c-table-hover:#323945;
}
html[data-civa-theme='dark'] body.co-ui-v1 .co-app-shell.civa-nav-refresh .co-footer {
  background:#1b1f26!important;color:#bec8d4!important;border-color:#343943!important;
}
@media (max-width:900px) {
  main.co-main.civa-v26-enhanced .civa-v26-context:not([hidden]) {row-gap:8px;}
}
@media (prefers-reduced-motion:reduce) {
  main.co-main.civa-v26-enhanced table tbody tr,
  main.co-main.civa-v26-enhanced .civa-v25-records > a {transition:none!important;}
}
