/* Interactive recreation of the Medalyst web app (app.medalyst.io) for feature pages.
   Layout, type and colours follow the real app: Montserrat 400/600/700, #F4F6F8 canvas,
   dark #2D2D2D pills and buttons. Sample data only. Used by tools/build_alternative_pages.py. */
.mdemo { --md-bg: #F4F6F8; --md-ink: #111111; --md-ink2: rgba(0,0,0,.87); --md-muted: #6b6f76; --md-line: #e6e8eb;
  --md-dark: #2D2D2D; --md-card: #ffffff; --md-green: #1f9d55; --md-green-bg: #e8f5ec; --md-red: #c8102e;
  --md-side-a: #5b3fe0; --md-side-b: #8a6cf5;
  font-family: "Montserrat", system-ui, sans-serif; color: var(--md-ink); font-size: 14px; line-height: 1.35;
  border-radius: 16px; overflow: hidden; background: #e9ebef; box-shadow: 0 24px 60px rgba(20, 20, 60, .18);
  border: 1px solid #dfe2e7; text-align: left; }
.mdemo * { box-sizing: border-box; }
.mdemo button { font: inherit; color: inherit; cursor: pointer; }
.mdemo__bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: #f1f3f5; border-bottom: 1px solid #e1e4e8; }
.mdemo__dot { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.mdemo__dot:nth-child(2) { background: #febc2e; } .mdemo__dot:nth-child(3) { background: #28c840; }
.mdemo__url { flex: 1; max-width: 420px; margin: 0 auto; height: 24px; border-radius: 12px; background: #e4e7eb;
  font-size: 12px; color: #5f6368; display: flex; align-items: center; justify-content: center; }
.mdemo__app { position: relative; display: grid; grid-template-columns: 196px 1fr; gap: 20px; padding: 14px 18px 14px 14px;
  background: var(--md-bg); height: 640px; }

/* sidebar */
.mdemo__side { border-radius: 16px; padding: 22px 10px 16px; color: #fff; display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--md-side-a), var(--md-side-b)); }
.mdemo__logo { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; background: #fff; color: var(--md-side-a);
  display: grid; place-items: center; font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.mdemo__club { text-align: center; font-weight: 600; font-size: 16px; margin: 0 0 18px; }
.mdemo__nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mdemo__nav li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.mdemo__nav li.is-active { background: rgba(0, 0, 0, .22); }
.mdemo__nav svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.mdemo__powered { margin-top: auto; text-align: center; font-size: 11px; opacity: .85; }

/* main column */
.mdemo__main { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.mdemo__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.mdemo__h1 { font-weight: 700; font-size: 26px; margin: 0; color: var(--md-ink2); }
.mdemo__user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mdemo__user i { width: 30px; height: 30px; border-radius: 50%; background: #c9ccd1; display: block; }
.mdemo__tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mdemo__select { background: #fff; border-radius: 8px; padding: 10px 14px; min-width: 170px; box-shadow: 0 1px 4px rgba(0,0,0,.08);
  display: flex; justify-content: space-between; gap: 16px; }
.mdemo__select::after { content: ""; border: 5px solid transparent; border-top-color: #666; margin-top: 6px; }
.mdemo__btn { background: var(--md-dark); color: #fff; border: 0; border-radius: 11px; padding: 11px 16px; font-weight: 600; font-size: 13px;
  box-shadow: 0 2px 4px rgba(0,0,0,.18); }
.mdemo__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--md-line); margin-bottom: 12px; }
.mdemo__tabs span { padding: 10px 18px; font-weight: 600; font-size: 13px; color: #555; }
.mdemo__tabs span.is-active { color: var(--md-ink); box-shadow: inset 0 -2px 0 var(--md-dark); }
.mdemo__table { width: 100%; border-collapse: separate; border-spacing: 0; }
.mdemo__table th { text-align: left; font-weight: 400; font-size: 12px; color: #666; padding: 8px 12px; }
.mdemo__table td { background: #fff; padding: 12px; border-top: 1px solid var(--md-line); vertical-align: middle; }
.mdemo__table tr:first-child td { border-top: 0; }
.mdemo__table tbody tr:first-child td:first-child { border-top-left-radius: 10px; }
.mdemo__table tbody tr:first-child td:last-child { border-top-right-radius: 10px; }
.mdemo__table tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }
.mdemo__table tbody tr:last-child td:last-child { border-bottom-right-radius: 10px; }
.mdemo__row { cursor: pointer; transition: background .15s; }
.mdemo__row:hover td, .mdemo__row:focus-visible td { background: #f7f5ff; }
.mdemo__row:focus-visible { outline: none; }
.mdemo__who { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.mdemo__av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700;
  font-size: 12px; flex: none; }
.mdemo__ok { width: 20px; height: 20px; border-radius: 50%; background: var(--md-green); display: inline-grid; place-items: center; }
.mdemo__ok::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.mdemo__link { text-decoration: underline; font-size: 12px; background: none; border: 0; padding: 0; }
.mdemo__hint { position: absolute; z-index: 2; right: 30px; bottom: 26px; background: var(--md-dark); color: #fff; font-size: 12px;
  font-weight: 600; padding: 8px 12px; border-radius: 999px; animation: mdemo-pulse 2s ease-in-out infinite; pointer-events: none; }
@keyframes mdemo-pulse { 50% { transform: translateY(-4px); } }
.mdemo.is-used .mdemo__hint { display: none; }

/* profile dialog */
.mdemo__scrim { position: absolute; inset: 0; background: rgba(40, 40, 50, .45); display: none; align-items: center; justify-content: center;
  padding: 18px; z-index: 3; }
.mdemo.is-open .mdemo__scrim { display: flex; }
.mdemo__dlg { display: none; width: min(820px, 100%); height: 100%; max-height: 604px; background: #fff; border-radius: 26px; overflow: hidden;
  flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: mdemo-in .22s ease-out; }
.mdemo__dlg.is-shown { display: flex; }
@keyframes mdemo-in { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.mdemo__dhead { display: flex; gap: 22px; padding: 22px 22px 14px; position: relative; border-bottom: 1px solid var(--md-line); }
.mdemo__dav { width: 96px; height: 96px; font-size: 28px; border: 4px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.mdemo__dname { font-weight: 700; font-size: 24px; margin: 8px 0 0; }
.mdemo__dteam { font-size: 12px; margin: 2px 0 10px; }
.mdemo__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mdemo__chip { border: 0; background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; box-shadow: 0 1px 5px rgba(0,0,0,.13); }
.mdemo__chip.is-active { background: var(--md-dark); color: #fff; font-weight: 600; }
.mdemo__x { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f1f2f4;
  display: grid; place-items: center; padding: 0; }
.mdemo__x svg { width: 20px; height: 20px; fill: var(--md-ink); }
.mdemo__dbody { flex: 1; overflow: auto; background: var(--md-bg); padding: 20px 26px 26px; }
.mdemo__pane { display: none; } .mdemo__pane.is-shown { display: block; }
.mdemo__h3 { font-weight: 400; font-size: 21px; margin: 0 0 12px; }
.mdemo__status { background: var(--md-green-bg); border-radius: 8px; padding: 12px 16px; margin-bottom: 22px; }
.mdemo__status b { color: var(--md-green); font-weight: 600; display: block; margin-bottom: 2px; }
.mdemo__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.mdemo__fields dt { font-size: 13px; margin-bottom: 3px; }
.mdemo__fields dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mdemo__filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.mdemo__filters .mdemo__select { min-width: 150px; flex: 1; }
.mdemo__kpis { display: grid; grid-template-columns: 1fr 1fr; text-align: center; margin: 8px 0 16px; }
.mdemo__kpis span { display: block; font-size: 12px; margin-bottom: 6px; }
.mdemo__kpis b { font-size: 20px; font-weight: 700; }
.mdemo__pill { display: inline-block; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 12px; background: #f1f2f4; min-width: 92px; }
.mdemo__pill--due { color: var(--md-red); }
.mdemo__pill--paid { color: var(--md-green); background: var(--md-green-bg); }
.mdemo__amt { font-weight: 600; white-space: nowrap; }
.mdemo__due { color: var(--md-red); font-weight: 600; }
.mdemo__subtabs { display: flex; gap: 8px; margin-bottom: 12px; }
.mdemo__subtabs span { padding: 7px 12px; border-radius: 999px; background: #fff; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.mdemo__subtabs span.is-active { background: var(--md-dark); color: #fff; font-weight: 600; }
.mdemo__report { background: #fff; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.mdemo__report header { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--md-muted); margin-bottom: 6px; }
.mdemo__report header b { color: var(--md-ink); font-size: 13px; }
.mdemo__report h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.mdemo__report p { margin: 0; }
.mdemo__note { font-size: 12px; color: var(--md-muted); margin: 10px 0 0; }
.mdemo-caption { text-align: center; font-size: 14px; color: var(--color-text-secondary, #666); margin: 14px 0 0; }

@media (max-width: 900px) {
  .mdemo__app { grid-template-columns: 1fr; padding: 12px; height: 600px; }
  .mdemo__side { display: none; }
  .mdemo__col-hide { display: none; }
  .mdemo__user span { display: none; }
  .mdemo__fields { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .mdemo__app { height: 620px; }
  .mdemo__h1 { font-size: 22px; }
  .mdemo__tools .mdemo__btn { display: none; }
  .mdemo__tabs span { padding: 10px 8px; font-size: 12px; }
  .mdemo__scrim { padding: 0; }
  .mdemo__dlg { border-radius: 18px; max-height: none; }
  .mdemo__dhead { gap: 12px; padding: 16px 14px 12px; }
  .mdemo__dav { width: 60px; height: 60px; font-size: 18px; }
  .mdemo__dname { font-size: 19px; margin-top: 2px; padding-right: 36px; }
  .mdemo__chip { padding: 6px 10px; font-size: 12px; }
  .mdemo__dbody { padding: 14px; }
  .mdemo__table td, .mdemo__table th { padding: 10px 8px; }
  .mdemo__pill { min-width: 0; }
}
