/* GroupDesk "fresh" skin: bigger touch targets, clearer hierarchy, colour themes.
   Loaded after styles.css and motion.css; remove this one <link> to go back to the old look. */
:root { font-size: 16px; --radius: 16px; --line: #e2e6e3; --muted: #5b645f;
  --brand-dark: color-mix(in srgb, var(--brand) 82%, #000); }
html[data-theme="ocean"] { --brand: #1d4f91; --brand-2: #e6eefa; --accent: #f2a93b; }
html[data-theme="maroon"] { --brand: #8a1f3d; --brand-2: #fbe9ee; --accent: #e9b949; }
html[data-theme="purple"] { --brand: #5b3a9e; --brand-2: #efe9fa; --accent: #f6c453; }
html[data-theme="teal"] { --brand: #0b6b74; --brand-2: #e3f3f4; --accent: #ffb37a; }
html[data-theme="charcoal"] { --brand: #2b3440; --brand-2: #eceff2; --accent: #7fd6b2; }

/* type and cards */
h1 { font-size: 1.6rem; letter-spacing: -.02em; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
.card { padding: 1.1rem 1.2rem; }
.kpi-val { font-size: 1.6rem; letter-spacing: -.01em; } .kpi-label, .kpi-sub { font-size: .85rem; }
.pill { padding: .2rem .65rem; font-size: .8rem; }
.pill.paid, .pill.active { color: #0b5a36; } .pill.pending, .pill.pending-member { color: #9a1f17; } .pill.partial { color: #6b4500; }

/* buttons and fields: comfortable to tap */
.btn { min-height: 44px; padding: .55rem 1rem; border-radius: 12px; font-weight: 600; border-color: #cfd6d2; }
.btn.sm { min-height: 40px; padding: .35rem .7rem; border-radius: 10px; }
.btn.block { min-height: 54px; border-radius: 14px; font-size: 1.05rem; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.icon-btn { min-width: 44px; min-height: 44px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  min-height: 48px; border: 1.5px solid #cfd6d2; border-radius: 12px; font-size: 16px; padding: .6rem .8rem; }
.tbl.fb input.fb-label { min-height: 40px; padding: .35rem .55rem; }
.field > span { font-size: .88rem; font-weight: 600; color: var(--ink); }
.set-tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: .45rem 1rem; }
.modal { border-radius: 20px; } .modal-foot .btn { min-height: 48px; }
.toast { border-radius: 14px; padding: .8rem 1.1rem; }

/* tables */
.tbl td { padding: .75rem .6rem; } .tbl th { padding: .6rem; font-size: .8rem; }

/* dashboard: the month's collection becomes the hero card */
.progress.card { background: var(--brand); border-color: var(--brand); color: #fff; padding: 1.3rem 1.4rem; font-size: 1.05rem; }
.progress.card .row-between span { font-size: 1.5rem; font-weight: 700; }
.progress .bar { height: 12px; background: rgba(255, 255, 255, .25); margin-top: .9rem; }
.progress .bar span { background: var(--accent); border-radius: 99px; }

/* sign-in and other full-page cards */
.auth { background: var(--brand); }
.auth-card { border: 0; border-radius: 24px; padding: 2rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.auth-card .brand.big { margin-bottom: .6rem; }

/* receipts and member cards follow the theme colour */
.receipt { border-radius: 20px; } .r-amt { font-size: 1.6rem; font-weight: 700; }
.mcard { background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 86%, #fff) 55%, var(--brand-dark) 100%); }
.mc-logo-empty, .mc-photo-empty { color: var(--brand); } .mc-org span { color: var(--accent); }

/* colour theme picker (Settings) */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; margin-top: .6rem; }
.theme-opt { min-height: 56px; display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border: 2px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.theme-opt:hover { border-color: #b9c2bd; }
.theme-opt.on { border-color: var(--brand); background: var(--brand-2); }
.theme-dots { display: inline-flex; flex-shrink: 0; }
.theme-dots i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-sizing: border-box; }
.theme-dots i + i { margin-left: -8px; }
.theme-opt .tick { margin-left: auto; font-weight: 700; color: var(--brand); visibility: hidden; }
.theme-opt.on .tick { visibility: visible; }

/* laptop: coloured side menu */
@media (min-width: 861px) {
  .content { padding: 1.8rem 2rem 4rem; }
  .shell { grid-template-columns: 230px 1fr; }
  .sidenav { background: var(--brand); border-right: 0; padding: 1.2rem .8rem; gap: 4px; }
  .sidenav a { color: #fff; padding: .7rem .8rem; border-radius: 10px; min-height: 44px; align-items: center; }
  .sidenav a:hover { background: rgba(255, 255, 255, .14); }
  .sidenav a.active, .sidenav a.active:hover { background: #fff; color: var(--brand); font-weight: 700; }
}

/* phone: roomier bottom menu, soft highlight for the current page */
@media (max-width: 860px) {
  .content { padding: 1rem 1rem 7rem; }
  .page-head h1 { font-size: 1.4rem; }
  .sidenav { padding: .4rem .5rem calc(.45rem + env(safe-area-inset-bottom)); gap: 4px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
  .sidenav a { min-width: 72px; min-height: 54px; justify-content: center; font-size: .75rem; padding: .3rem .5rem; border-radius: 12px; color: var(--muted); }
  .sidenav a span { font-size: 1.35rem; line-height: 1.2; }
  .sidenav a.active { background: var(--brand-2); color: var(--brand); font-weight: 700; }
  .page-actions { width: 100%; } .page-actions .btn { flex: 1 1 auto; justify-content: center; }
  .kpi-val { font-size: 1.3rem; }
  .toast { bottom: 5.5rem; }
  .modal-foot { position: sticky; bottom: 0; background: #fff; }
  .modal-foot .btn { flex: 1 1 0; justify-content: center; }
  .auth-card { padding: 1.5rem; }
}
@media print { .progress.card { background: #fff; color: #000; border: 1px solid #999; } }

/* ---- phone: bottom bar with 4 pages + More, tables as cards ---- */
.nav-more { display: none; }
@media (max-width: 860px) {
  .sidenav.has-more { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .sidenav.has-more > a { min-width: 0; }
  .sidenav.has-more > a:nth-of-type(n+5) { display: none; }
  .sidenav .nav-more { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; padding: .3rem .4rem;
    border: 0; border-radius: 12px; background: none; font: inherit; font-size: .75rem; color: var(--muted); cursor: pointer; }
  .sidenav .nav-more span { font-size: 1.35rem; line-height: 1.2; }
  .sidenav .nav-more.active { background: var(--brand-2); color: var(--brand); font-weight: 700; }
  .sidenav.has-more.open { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: .4rem; padding-top: .8rem; border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .22); }
  .sidenav.has-more.open > a:nth-of-type(n+5) { display: flex; }
  .sidenav.has-more.open .nav-more { background: var(--brand-2); color: var(--brand); }

  .tbl-wrap:has(.tbl.stack) { overflow: visible; }
  .tbl.stack, .tbl.stack tbody { display: block; width: 100%; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding: .85rem .1rem; border-bottom: 1px solid var(--line); }
  .tbl.stack tr:last-child { border-bottom: 0; }
  .tbl.stack td { display: block; flex: 1 1 40%; min-width: 0; border: 0; padding: 0; text-align: left !important; white-space: normal; }
  .tbl.stack td::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
  .tbl.stack td.nolabel::before, .tbl.stack td[colspan]::before, .tbl.stack td.actions::before { content: none; }
  .tbl.stack td[colspan] { flex-basis: 100%; text-align: center !important; }
  .tbl.stack td.actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .5rem; }
  .tbl.stack td.actions:empty, .tbl.stack td:empty { display: none; }
  .tbl.stack tr.total { background: var(--brand-2); border-radius: 12px; padding: .7rem; }
}

/* login details shown after adding a committee user */
.login-box { background: var(--brand-2); border-radius: 12px; padding: .8rem 1rem; grid-template-columns: 140px 1fr; }
.login-box dd { word-break: break-all; font-weight: 600; }
code.pw { font-size: 1.15rem; letter-spacing: .06em; background: #fff; padding: .2rem .5rem; }
.send-row .btn { flex: 1 1 180px; justify-content: center; }
@media (max-width: 860px) { .login-box { grid-template-columns: 1fr; } .login-box dt { margin-top: .3rem; } }
.modal-wrap > .modal { min-width: 0; max-width: min(640px, 100%); }
.login-box dd { overflow-wrap: anywhere; word-break: normal; }
@media (max-width: 860px) {
  #staff-tbl, #staff-tbl tbody { display: block; width: 100%; }
  #staff-tbl tr { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  #staff-tbl td { border: 0; padding: 0; word-break: break-word; }
  #staff-tbl td:first-child { flex: 1 1 60%; min-width: 0; }
  #staff-tbl td.actions { flex-basis: 100%; text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: .4rem; }
  #staff-tbl td.actions:empty { display: none; }
  .chart { gap: .2rem; } .chart .col { min-width: 0; } .chart small { font-size: .65rem; }
}
.modal.alert .modal-foot { flex-wrap: wrap; }
.btn.danger-fill, .btn.danger-fill:hover { background: #b42318; border-color: #b42318; color: #fff; }
@media (max-width: 860px) { .modal.alert .modal-foot .btn { flex: 1 1 140px; } }
/* settings: every section button visible at once (no sideways scrolling) */
.set-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .5rem; overflow: visible; padding: 0; margin-bottom: 1.2rem; }
.set-tabs a { justify-content: flex-start; white-space: normal; line-height: 1.25; border-radius: 12px; min-height: 48px; padding: .5rem .8rem; font-weight: 600; }
.card .row-between { flex-wrap: wrap; row-gap: .6rem; }
.cat-card .row-between > span { display: inline-flex; gap: .3rem; }
@media (max-width: 860px) {
  .set-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .set-tabs a { justify-content: center; text-align: center; font-size: .78rem; padding: .45rem .3rem; min-height: 56px; }
  .card .row-between > .btn.primary, #sf .quick .btn.primary { flex: 1 1 100%; justify-content: center; }
  .cat-grid, .board, .set-tiles { grid-template-columns: 1fr; }
  .linkbox .btn { flex: 1 1 auto; justify-content: center; }
  /* registration form editor: one card per field */
  .tbl-wrap:has(.tbl.fb) { overflow: visible; }
  .tbl.fb, .tbl.fb tbody { display: block; width: 100%; }
  .tbl.fb thead { display: none; }
  .tbl.fb tr { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .tbl.fb tr.sec { padding: 0; border: 0; } .tbl.fb tr.sec td { flex: 1 1 100%; border-radius: 8px; padding: .5rem .7rem; }
  .tbl.fb td { border: 0; padding: 0; text-align: left; }
  .tbl.fb td:first-child { flex: 1 1 100%; }
  .tbl.fb td:nth-child(2) { color: var(--muted); font-size: .8rem; margin-right: auto; }
  .tbl.fb td:nth-child(3)::after { content: ' Show'; } .tbl.fb td:nth-child(4)::after { content: ' Required'; }
  .tbl.fb td:nth-child(3), .tbl.fb td:nth-child(4) { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; white-space: nowrap; }
  .tbl.fb td.actions { flex: 0 0 auto; display: flex; gap: .4rem; }
  .tbl.fb td.actions:empty { display: none; }
}
