/* Home dashboard, News & Team Calendar (#/home, #/news, #/calendar). Prefix: hx- */
.hx-grid { display: grid; gap: 12px; margin-top: 12px; }
.hx-grid > .card { margin: 0; }
@media (min-width: 760px) { .hx-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hx-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hx-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hx-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hx-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hx-flat { margin-top: 0; }
.hm .hx-card, .hm .hx-tasks, .hm .hx-fincard { margin-top: 12px; }
.hx-grid .hx-card { margin-top: 0; }

.hx-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.hx-hdr { display: flex; align-items: center; gap: 8px; height: 52px; box-sizing: border-box; padding: 0 14px; background: var(--ink); color: #fff; }   /* every card header the same height, text centered (owner 11/11) */
.hx-hdr .ico { width: 18px; height: 18px; flex: none; opacity: .9; }
.hx-hdr h3 { margin: 0; font-size: var(--fs-md); line-height: 1.2; color: #fff; font-family: inherit; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .hx-hdr { background: #232a63; }
.hx-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hx-sub { font-size: var(--fs-xs); font-weight: 700; opacity: .8; }
.hx-count { min-width: 24px; height: 22px; padding: 0 8px; border-radius: 11px; background: rgba(255,255,255,.18); display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; }
.hx-count.warn { background: #E11D48; }
.hx-big { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1; }
.hx-more { font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; white-space: nowrap; }
.section-head .hx-more { background: var(--surface-3); color: var(--ink); }
.hx-empty { margin: 0; padding: 10px 0; text-align: center; color: var(--muted); font-size: var(--fs-sm); font-style: italic; }
.hx-tip { display: flex; align-items: center; gap: 6px; margin: -4px 2px 8px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }

/* money (positive dark green, negative red) */
.hx .pos { color: #166534; } .hx .neg { color: #B91C1C; }
:root[data-theme="dark"] .hx .pos { color: #4ADE80; } :root[data-theme="dark"] .hx .neg { color: #F87171; }
.hx-amount { font-family: var(--font-display); font-size: clamp(28px, 7vw, 36px); font-weight: 700; line-height: 1.1; }
.hx-status { margin: 0; font-size: var(--fs-sm); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.hx-amt-sub { margin: -6px 0 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }   /* scrub 11/14: what the total covers */
.hx-card.is-due { box-shadow: inset 0 -3px 0 #B91C1C; }

.hx-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 10px; background: var(--surface-3); color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.hx-btn .ico { width: 16px; height: 16px; flex: none; }
.hx-btn .hx-ext { width: 12px; height: 12px; opacity: .55; }
.hx-btn.primary { background: var(--ink); color: #fff; }
.hx-btn.fin { background: #E8EAF8; }
:root[data-theme="dark"] .hx-btn { color: var(--text); } :root[data-theme="dark"] .hx-btn.fin { background: var(--surface-3); }
:root[data-theme="dark"] .hx-btn.primary { background: var(--violet); }

/* meets + lists */
.hx-meet { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.hx-meet:last-child { border-bottom: 0; }
.hx-badge { flex: none; width: 46px; border-radius: 10px; overflow: hidden; text-align: center; background: var(--surface-3); }
.hx-badge small { display: block; background: var(--ink); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 0; letter-spacing: .05em; }
.hx-badge b { display: block; font-size: 18px; padding: 3px 0; color: var(--ink); }
:root[data-theme="dark"] .hx-badge b { color: var(--text); }
.hx-meet-main, .hx-ag-main { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.hx-meet-main small, .hx-ag-main small { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.hx-meet-main b, .hx-ag-main b { font-size: var(--fs-sm); color: var(--text); }
.hx-meet-main em, .hx-ag-main em { font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.hx-cd { flex: none; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink); }
.hx-cd.soon { background: #FEF3C7; color: #92400E; } .hx-cd.now { background: #FEE2E2; color: #B91C1C; }
.hx-list { list-style: none; margin: 0; padding: 0; }
.hx-list li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hx-list li:last-child { border-bottom: 0; }
.hx-list b { font-size: var(--fs-sm); } .hx-list span { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.hx-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink); font-size: 11px; font-weight: 800; white-space: nowrap; }
.hx-hdr .hx-pill { background: rgba(255,255,255,.18); color: #fff; }
.hx-pill.neg { background: #FEE2E2; color: #B91C1C; } .hx-pill.done { background: #E8EAF8; color: #2E3A8C; }

/* tasks */
.hx-task { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.hx-task.over { border-color: #FCA5A5; background: #FFF5F5; }
:root[data-theme="dark"] .hx-task.over { background: rgba(185,28,28,.12); }
.hx-task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hx-task-top b { font-size: var(--fs-md); }
.hx-task-gym { color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.hx-task-det { font-size: var(--fs-sm); }
.hx-hist-tog { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-weight: 800; font-size: var(--fs-sm); color: var(--ink); }
.hx-by { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }

/* tables */
.hx-scroll { overflow-x: auto; margin: 0 -14px; }
.hx-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.hx-table th, .hx-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.hx-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2, var(--surface-3)); }
.hx-table th:first-child, .hx-table td:first-child { padding-left: 14px; }
.hx-avg td:not(:first-child), .hx-avg th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.hx-table tr.aa td, .hx-table td.aa { font-weight: 800; color: var(--ink); }
:root[data-theme="dark"] .hx-table tr.aa td, :root[data-theme="dark"] .hx-table td.aa { color: var(--text); }

/* bar chart */
.hx-chart { display: flex; flex-direction: column; gap: 8px; }
.hx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; font-weight: 700; color: var(--text-2); }
.hx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hx-bar-row { display: grid; grid-template-columns: 48px 1fr; gap: 8px; align-items: center; }
.hx-bar-row > b { font-size: var(--fs-sm); }
.hx-bar-set { display: flex; flex-direction: column; gap: 3px; }
.hx-bar { position: relative; height: 16px; background: var(--surface-3); border-radius: 4px; }
.hx-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; }
.hx-bar em { position: absolute; right: 4px; top: 0; line-height: 16px; font-size: 10px; font-style: normal; font-weight: 800; color: var(--text); }
.hx-axis { position: relative; height: 14px; margin: 2px 0 0 56px; border-top: 1px solid var(--border, rgba(0,0,0,.12)); font-size: 10px; color: var(--muted); font-weight: 700; }
.hx-axis span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; }
.hx-axis span:first-child { transform: none; } .hx-axis span:last-child { transform: translateX(-100%); }
.hx-axis-cap { margin-left: 56px; text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hx-legend small { font-weight: 600; color: var(--muted); }
.hx-bar em { display: flex; align-items: center; gap: 6px; }
.hx-d { font-style: normal; font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 4px; line-height: 14px; }
.hx-d.up { color: #166534; background: #DCFCE7; } .hx-d.dn { color: #B91C1C; background: #FEE2E2; } .hx-d.eq { color: var(--text-2); background: var(--surface-2, #eef0f4); }
:root[data-theme="dark"] .hx-d.up { color: #4ADE80; background: rgba(74,222,128,.14); } :root[data-theme="dark"] .hx-d.dn { color: #F87171; background: rgba(248,113,113,.14); }
.hx-chart-note { margin: 4px 0 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.hx-chart-note .hx-d { padding: 0 3px; }

/* programs */
.hx-progs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hx-prog-hdr { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 8px; margin-bottom: 6px; color: #fff; }
.hx-prog-hdr.teal { background: #2E3A8C; } .hx-prog-hdr.navy { background: #1B2159; }
.hx-prog-row { display: flex; justify-content: space-between; padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }

/* finance */
.hx-fin { display: grid; gap: 12px; }
@media (min-width: 900px) { .hx-fin { grid-template-columns: repeat(3, 1fr); } }
.hx-fin-lbl { margin: 0 0 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* news */
.hx-news .hx-body { padding: 0; gap: 0; }
.hx-post { display: flex; gap: 10px; width: 100%; padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); color: var(--text); background: none; }
.hx-post:last-child { border-bottom: 0; }
.hx-post img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-3); }
.hx-post-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-post-main small { font-size: 10px; font-weight: 800; color: var(--violet); display: flex; align-items: center; gap: 4px; }
.hx-post-main b { font-size: var(--fs-sm); line-height: 1.3; }
.hx-post-main span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hx-post-main em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--ink); }
:root[data-theme="dark"] .hx-post-main em { color: var(--text); }
.hx-qls { display: flex; flex-direction: column; gap: 8px; }
.hx-ql { display: block; padding: 9px 12px; border-radius: 999px; text-align: center; font-size: var(--fs-sm); font-weight: 700; background: var(--ink); color: #fff; }
.hx-ql.red { background: #E11D48; }
:root[data-theme="dark"] .hx-ql { background: var(--violet); } :root[data-theme="dark"] .hx-ql.red { background: #E11D48; }
.hx-read { display: flex; flex-direction: column; gap: 10px; }
.hx-read-lbl { margin: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.hx-read-img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: var(--surface-3); }
.hx-read-loc { margin: 0; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.hx-read-h { margin: 8px 0 0; }
.hx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.hx-chips { margin-bottom: 10px; }
.hx-search { margin-bottom: 10px; }
.hx-feed { display: grid; gap: 10px; }
@media (min-width: 760px) { .hx-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .hx-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); } }   /* owner 11/12: 3 across */
.hx-feed-item { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.hx-feed-item .hx-post { flex: 1; }
.hx-feed-item .hx-by-row { margin-top: auto; }
.hx-feed-item .hx-post { border-bottom: 0; }
.hx-feed-item .hx-post img { width: 60px; height: 60px; }
.hx-feed-item .hx-by { padding: 0 14px 10px; }

/* calendar */
.hx-cal { padding: 0; overflow: hidden; margin: 0; }
.hx-cal-tb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.hx-cal-nav { display: flex; align-items: center; gap: 4px; }
.hx-cal-title { flex: 1; min-width: 140px; font-family: var(--font-display); font-size: var(--fs-lg); }
.hx-views { min-width: 210px; }
@media (max-width: 640px) { .hx-vm { display: none; } .hx-views { min-width: 140px; } .hx-cal-title { order: -1; flex-basis: 100%; } .hx-cal-nav { flex: 1; } }
.hx-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-3); }
.hx-dow span { padding: 6px 4px; text-align: center; font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.hx-month { display: grid; grid-template-columns: repeat(7, 1fr); }
.hx-day { min-height: 96px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-day:nth-child(7n) { border-right: 0; }
.hx-day.out { background: var(--surface-3); opacity: .6; }
.hx-dn { font-size: 11px; font-weight: 800; color: var(--muted); }
.hx-day.today .hx-dn { color: #fff; background: var(--ink); border-radius: 999px; width: 20px; height: 20px; display: grid; place-items: center; }
.hx-day small { font-size: 10px; font-weight: 700; color: var(--muted); }
.hx-ev { display: block; width: 100%; text-align: left; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 4px; color: #fff; background: var(--c); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-week { display: grid; gap: 0; }
@media (min-width: 760px) { .hx-week { grid-template-columns: repeat(7, 1fr); } }
.hx-wday { padding: 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
@media (min-width: 760px) { .hx-wday { border-right: 1px solid var(--line); min-height: 160px; } .hx-wday:last-child { border-right: 0; } }
.hx-wday b { font-size: var(--fs-xs); text-transform: uppercase; color: var(--muted); }
.hx-wday.today b { color: var(--ink); }
.hx-wday .hx-ev { white-space: normal; }
.hx-agenda { display: flex; flex-direction: column; }
.hx-ag { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); background: none; border-left: 4px solid var(--c); }
.hx-cal .hx-empty { padding: 20px; }
.hx-cal-leg { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-3); }
.hx-cal-leg button { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--text-2); }
.hx-cal-leg i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.hx-cal-leg button.off { opacity: .4; text-decoration: line-through; }
.hx-allmeets { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; padding: 8px; border-radius: 10px; background: var(--surface-3); color: var(--ink); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
:root[data-theme="dark"] .hx-allmeets { color: var(--text); }

/* Family dashboard (owner 11/11 redesign): summary tiles + tasks only when waiting + meets beside quick links */
.hf-tiles { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 760px) { .hf-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hf-tiles > .hf-tile { margin: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); text-decoration: none; min-width: 0; }
.hf-tile-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); }
.hf-tile-ic .ico { width: 22px; height: 22px; }
.hf-tile.is-ok .hf-tile-ic { background: var(--blue-soft, #E6E9F8); color: var(--blue, #2E3A8C); }
.hf-tile.is-due .hf-tile-ic { background: var(--coral-soft, #FDE8E8); color: var(--coral-strong, #B42318); }
.hf-tile.is-soon .hf-tile-ic { background: var(--gold-soft, #FDF3D7); color: #8A6100; }
.hf-tile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hf-tile-main small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hf-tile-main b { font-family: var(--font-display); font-size: 24px; line-height: 1.15; color: var(--text); }
.hf-tile-main em { font-style: normal; font-size: var(--fs-sm); color: var(--text-2); }
.hf-tile .chev { color: var(--muted); flex: none; }
.hf-tasks { margin-top: 12px; }
.hf-main { display: grid; gap: 12px; margin-top: 12px; align-items: start; }
/* owner 11/12: three columns — Upcoming Meets · Team News · Quick Links (meets full width on tablets) */
@media (min-width: 720px) { .hf-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hf-main > .hx-card:first-child { grid-column: 1 / -1; } }
@media (min-width: 1200px) { .hf-main { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); } .hf-main > .hx-card:first-child { grid-column: auto; } }
.hf-news .hx-post { padding: 11px 14px; }
.hf-main > .hx-card { margin: 0; }
.hf-links .row { padding-top: 10px; padding-bottom: 10px; }
:root[data-theme="dark"] .hf-tile-ic { color: var(--text); }
:root[data-theme="dark"] .hf-tile.is-ok .hf-tile-ic { background: rgba(58,70,168,.35); color: #fff; }
:root[data-theme="dark"] .hf-tile.is-due .hf-tile-ic { background: rgba(185,28,28,.25); color: #FCA5A5; }
:root[data-theme="dark"] .hf-tile.is-soon .hf-tile-ic { background: rgba(201,162,39,.25); color: #F5D77A; }

/* Owner 11/12: no-gymnast dashboard (coaches without kids) — Team News beside Quick Links */
@media (min-width: 720px) { .hf-main.hf-main-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .hf-main.hf-main-2 > .hx-card:first-child { grid-column: auto; } }

/* Team Central → Employee Central switch (owner 11/12) */
.hm-switch { flex: none; gap: 8px; background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.hm-switch:hover { background: rgba(255,255,255,.22); }

/* Treasurer dashboard (owner 11/12) */
.hx-sep { margin: 22px 0 10px; }
.hx-tr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.hx-tr-stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-tr-stat small { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.hx-tr-stat b { font-size: 24px; line-height: 1.1; }
.hx-tr-stat span { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-tr-stat.neg span { color: #E11D48; font-weight: 700; }
.hx-tr-stat.pos span { color: #059669; font-weight: 700; }
@media (max-width: 520px) { .hx-tr-stats { grid-template-columns: 1fr 1fr; } .hx-tr-stat:last-child { grid-column: 1 / -1; } }
/* Next Team Meet column (owner 11/12) */
.hf-nm { display: flex; gap: 12px; align-items: flex-start; }
.hf-nm-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hf-nm-main small { color: var(--muted); font-size: var(--fs-sm); }
.hf-nm-when { margin: 10px 0 12px; font-weight: 800; color: var(--ink); }
.hf-nm-when.is-soon { color: #E11D48; }
:root[data-theme="dark"] .hf-nm-when { color: #fff; }
:root[data-theme="dark"] .hf-nm-when.is-soon { color: #FB7185; }
/* Admin tools row (owner 11/13): Task Management is one button now (Bulk Assign = Task Manager's Assign Tasks), so it is narrow
   and Bulk Data Tools / Events & RSVPs get the room. */
@media (min-width: 1100px) { .hx-adm-tools { grid-template-columns: minmax(0, .6fr) minmax(0, 1.2fr) minmax(0, 1.2fr); } }
/* Admin home: Admin Desk + Staff Scheduler alerts + staff Quick Actions above BOOST balance (owner 11/15) */
[data-hm-desk] { margin: 0 0 14px; }
.hm-desk-h { margin-top: 4px; }
.sh-desk.hm-desk { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.hm-desk-acts { margin-top: 10px; }
