/* CurioSpark v9.5.0 — Editorial Simplification & Explicit Mobile Table Policy
   Presentation only: no roles, permissions, payment rules, or API behavior are changed here. */

:root {
  --v802-ink: #3d1157;
  --v802-purple: #5f2579;
  --v802-soft: #fbf8fc;
  --v802-border: rgba(95, 37, 121, .15);
  --v802-shadow: 0 10px 28px rgba(65, 25, 80, .07);
  --v802-radius: 18px;
}

body.v802-simplified .page-hero.compact-page-hero {
  padding-block: clamp(1.6rem, 4vw, 2.55rem);
}

body.v802-simplified .page-hero h1,
body.v802-simplified .calendar-hero h1,
body.v802-simplified .programs-marketplace-hero h1 {
  max-width: 24ch;
}

body.v802-simplified .page-hero p:not(.eyebrow),
body.v802-simplified .admin-topbar > p,
body.v802-simplified .small-muted {
  max-width: 78ch;
}

/* One consistent workspace nav replaces page-by-page collections of duplicate links. */
.v802-workspace-nav {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin: .95rem 0 1.15rem;
  padding: .68rem;
  border: 1px solid var(--v802-border);
  border-radius: var(--v802-radius);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--v802-shadow);
  position: sticky;
  top: .6rem;
  z-index: 18;
}

.v802-workspace-nav > a,
.v802-workspace-nav summary,
.v802-workspace-nav .v802-nav-more a {
  color: #4b1f63;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}

.v802-workspace-nav > a,
.v802-workspace-nav summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: .38rem .62rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.v802-workspace-nav > a:hover,
.v802-workspace-nav > a:focus-visible,
.v802-workspace-nav summary:hover,
.v802-workspace-nav summary:focus-visible {
  color: var(--v802-purple);
  background: #f4edf7;
  outline: none;
}

.v802-workspace-nav > a[aria-current="page"] {
  color: #fff;
  background: var(--v802-purple);
  box-shadow: 0 5px 12px rgba(95, 37, 121, .2);
}

.v802-nav-more {
  position: relative;
  margin: 0;
}

.v802-nav-more summary {
  cursor: pointer;
  list-style: none;
}
.v802-nav-more summary::-webkit-details-marker { display: none; }
.v802-nav-more summary::after { content: '⌄'; margin-left: .35rem; font-size: .9em; }
.v802-nav-more[open] summary { color: var(--v802-purple); background: #f4edf7; }

.v802-nav-more-menu {
  display: grid;
  gap: .25rem;
  min-width: 13.5rem;
  padding: .45rem;
  border: 1px solid var(--v802-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(65, 25, 80, .16);
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  z-index: 25;
}

.v802-nav-more--finance .v802-nav-more-menu { min-width: 14.75rem; }
.v802-nav-more-menu a {
  display: block;
  padding: .55rem .62rem;
  border-radius: 9px;
}
.v802-nav-more-menu a:hover,
.v802-nav-more-menu a:focus-visible,
.v802-nav-more-menu a[aria-current="page"] {
  color: var(--v802-purple);
  background: #f5eff8;
  outline: none;
}

.v802-nav-finance summary { color: #744400; }
.v802-nav-finance .v802-nav-more-menu { border-color: rgba(181, 126, 26, .25); }

/* Clear card hierarchy, readable spacing, and safe wide-table behavior. */
body.v802-simplified .admin-card,
body.v802-simplified .mini-panel,
body.v802-simplified .payment-desk-panel,
body.v802-simplified .v801-attendance-card,
body.v802-simplified .v801-directory-record {
  border-color: var(--v802-border);
  box-shadow: var(--v802-shadow);
}

body.v802-simplified .admin-card > :first-child,
body.v802-simplified .mini-panel > :first-child,
body.v802-simplified .payment-desk-panel > :first-child {
  margin-top: 0;
}

body.v802-simplified .admin-card-heading,
body.v802-simplified .v760-today-heading,
body.v802-simplified .admin-topbar,
body.v802-simplified .payment-ops-banner {
  gap: .75rem;
}

body.v802-simplified .admin-card-heading h2,
body.v802-simplified .admin-topbar h2,
body.v802-simplified .payment-ops-banner h2 {
  line-height: 1.12;
}

body.v802-simplified .admin-actions,
body.v802-simplified .calm-admin-actions,
body.v802-simplified .team-hub-actions,
body.v802-simplified .v801-ops-toolbar {
  gap: .55rem;
}

body.v802-simplified .button.small {
  min-height: 2.75rem;
}

body.v802-simplified .table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid rgba(95, 37, 121, .10);
  border-radius: 14px;
  scrollbar-color: rgba(95, 37, 121, .45) transparent;
}

body.v802-simplified .v802-scroll-region {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  box-shadow: inset -18px 0 18px -22px rgba(61,17,87,.55);
}
body.v802-simplified .v802-scroll-region:focus-visible {
  outline: 3px solid rgba(244,181,22,.5);
  outline-offset: 3px;
}
body.v802-simplified table.v802-scroll-table { width: 100%; }

body.v802-simplified table {
  border-collapse: separate;
  border-spacing: 0;
}

body.v802-simplified table thead th {
  background: #faf6fc;
  color: #4e176f;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.v802-simplified table th,
body.v802-simplified table td {
  vertical-align: top;
}

body.v802-simplified table tbody tr:last-child td { border-bottom: 0; }
body.v802-simplified .v802-empty-table { display: none; }

/* Common disclosures make long reference material calm rather than hidden. */
.v802-disclosure {
  overflow: hidden;
}
.v802-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  min-height: 3.25rem;
  padding: .9rem 1rem;
  cursor: pointer;
  color: var(--v802-ink);
  font-weight: 850;
  list-style: none;
}
.v802-disclosure > summary::-webkit-details-marker { display: none; }
.v802-disclosure > summary::after {
  content: 'Show';
  flex: 0 0 auto;
  padding: .27rem .55rem;
  border: 1px solid rgba(95, 37, 121, .17);
  border-radius: 999px;
  color: var(--v802-purple);
  font-size: .75rem;
  font-weight: 900;
}
.v802-disclosure[open] > summary { border-bottom: 1px solid rgba(95, 37, 121, .10); background: #fffaf1; }
.v802-disclosure[open] > summary::after { content: 'Hide'; }
.v802-disclosure > .admin-card-heading { display: none; }
.v802-disclosure > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.v802-disclosure > :last-child { margin-bottom: 1rem; }

/* Team dashboard: a focused action board; help and inspiration remain available, but no longer dominate the work. */
body.v802-team-dashboard .team-hub-image-only,
body.v802-team-dashboard .team-hub-stickers { display: none; }

body.v802-team-dashboard .team-hub-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 1rem;
}

body.v802-team-dashboard .team-hub-card {
  min-height: 165px;
  padding: 1rem;
  border-radius: 18px;
}
body.v802-team-dashboard .team-hub-card h3 { font-size: 1.18rem; }
body.v802-team-dashboard .team-hub-card p { font-size: .9rem; }

body.v802-team-dashboard .team-hub-support.v802-disclosure {
  display: block;
  margin-top: 1rem;
}
body.v802-team-dashboard .team-hub-support.v802-disclosure > summary { margin: 0; }
body.v802-team-dashboard .team-hub-support.v802-disclosure > :not(summary) { margin-left: 1rem; margin-right: 1rem; }

/* Keep finance visibly separate for Full Admin without exposing it to Team. */
body.v802-admin-role .payment-ops-banner,
body.v802-admin-role .payment-totals,
body.v802-admin-role .v760-admin-today {
  border-radius: 18px;
}

/* Better narrow-screen defaults. */
@media (max-width: 1000px) {
  .v802-workspace-nav { position: static; }
  body.v802-team-dashboard .team-hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body.v802-simplified .page-hero.compact-page-hero { padding-block: 1.35rem; }
  body.v802-simplified .page-hero h1,
  body.v802-simplified .calendar-hero h1,
  body.v802-simplified .programs-marketplace-hero h1 { font-size: clamp(1.95rem, 9vw, 2.65rem); }

  .v802-workspace-nav {
    align-items: flex-start;
    padding: .5rem;
    gap: .35rem;
  }
  .v802-workspace-nav > a,
  .v802-workspace-nav summary { min-height: 2.16rem; padding: .34rem .52rem; font-size: .8rem; }
  .v802-nav-more-menu { position: fixed; left: .75rem; right: .75rem; top: auto; min-width: 0; max-width: none; }

  body.v802-simplified .admin-grid,
  body.v802-simplified .payment-ops-grid,
  body.v802-simplified .payment-flow-grid,
  body.v802-simplified .policy-grid,
  body.v802-simplified .v801-directory-body,
  body.v802-simplified .v801-ops-form {
    grid-template-columns: 1fr;
  }

  body.v802-simplified .admin-topbar,
  body.v802-simplified .payment-ops-banner,
  body.v802-simplified .v760-today-heading,
  body.v802-simplified .v801-ops-toolbar {
    align-items: flex-start;
  }

  body.v802-simplified .admin-actions,
  body.v802-simplified .calm-admin-actions,
  body.v802-simplified .team-hub-actions {
    align-items: stretch;
  }
  body.v802-simplified .admin-actions .button,
  body.v802-simplified .calm-admin-actions .button,
  body.v802-simplified .team-hub-actions .button {
    flex: 1 1 10rem;
    justify-content: center;
  }

  /* Only identity-first operational tables become labelled mobile records. Financial and comparison tables remain scrollable tables. */
  body.v802-simplified table.v802-mobile-records,
  body.v802-simplified table.v802-mobile-records tbody,
  body.v802-simplified table.v802-mobile-records tr,
  body.v802-simplified table.v802-mobile-records td {
    display: block;
    width: 100%;
  }
  body.v802-simplified table.v802-mobile-records thead { display: none; }
  body.v802-simplified table.v802-mobile-records tbody {
    display: grid;
    gap: .75rem;
    padding: .75rem;
  }
  body.v802-simplified table.v802-mobile-records tr {
    overflow: hidden;
    padding: .15rem .85rem;
    border: 1px solid rgba(95, 37, 121, .14);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(65, 25, 80, .045);
  }
  body.v802-simplified table.v802-mobile-records td {
    min-height: 0;
    padding: .62rem 0;
    border-bottom: 1px solid rgba(95, 37, 121, .10);
  }
  body.v802-simplified table.v802-mobile-records td:last-child { border-bottom: 0; }
  body.v802-simplified table.v802-mobile-records td::before {
    content: attr(data-v802-label);
    display: block;
    margin-bottom: .22rem;
    color: #735d80;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  body.v802-simplified table.v802-mobile-records td[data-v802-label=""]::before { display: none; }
  body.v802-simplified table.v802-mobile-records td input,
  body.v802-simplified table.v802-mobile-records td select,
  body.v802-simplified table.v802-mobile-records td textarea { max-width: 100%; }

  body.v802-simplified .v802-scroll-region {
    border-radius: 12px;
    box-shadow: inset -22px 0 20px -24px rgba(61,17,87,.65);
  }

  /* Attendance is intentionally kept as its existing scrollable working grid. */
  body.v802-simplified .v801-attendance-table { min-width: 680px; }

  body.v802-team-dashboard .team-hub-grid { grid-template-columns: 1fr; }
  body.v802-team-dashboard .team-hub-card { min-height: 0; }

  .v802-disclosure > summary { align-items: flex-start; padding: .85rem; }
  .v802-disclosure > :not(summary) { margin-left: .85rem; margin-right: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .v802-workspace-nav *,
  body.v802-simplified * { scroll-behavior: auto !important; transition: none !important; }
}
