/* My Uni Club Wallet — member page. UMR-004 §4 v1.6: wide (~1280px), nothing overlaps, progressive on small screens,
   never a horizontal scroll. Colours as tokens; dark mode follows the device. */
:root {
  --green: #104A36; --green-2: #1d6b50; --gold: #c9a227;
  --bg: #f6f7f4; --card: #ffffff; --text: #1c2420; --muted: #5d6a63; --line: #d9dfd9; --bad: #b3261e; --ok: #1d6b50;
  --focus: #2f7dd1;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111613; --card: #1a211d; --text: #e7ece9; --muted: #a3b0a9; --line: #2e3833; --green-2: #5fc29b; --ok: #5fc29b; --bad: #ff8a80; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; max-width: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
small, .small { font-size: .88em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* top bar: one row; it narrows step by step */
.top { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { border-radius: 8px; background: #fff; object-fit: contain; flex: none; }
.brand-name { font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.top button, .top select { font: inherit; border-radius: 8px; border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; padding: 6px 10px; cursor: pointer; }
.top select option { color: #000; }
.club-btn { background: rgba(255,255,255,.12) !important; white-space: nowrap; }
.who { font-size: .9rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
@media (max-width: 950px) { .who { max-width: 150px; } }
@media (max-width: 768px) { .who { display: none; } }
@media (max-width: 520px) { .hide-s { display: none; } .brand-name { font-size: 1rem; } .top select { font-size: .85rem; padding: 5px 4px; } .top-in { gap: 6px; } }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 32px; flex: 1; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }

/* sign-in */
.auth { max-width: 460px; margin: 24px auto; }
.auth label { display: block; margin: 10px 0 4px; font-weight: 600; }
.auth input { width: 100%; }
.screen-code { display: block; margin: 10px 0; max-width: 100%; height: auto; border-radius: 8px; background: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; max-width: 100%; }
button.primary, button.ghost { font: inherit; border-radius: 10px; padding: 8px 16px; cursor: pointer; }
button.primary { background: var(--green); color: #fff; border: 1px solid var(--green); font-weight: 600; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: .55; cursor: default; }
.msg { min-height: 1.4em; margin-top: 10px; }
.msg.bad { color: var(--bad); }
.msg.ok { color: var(--ok); }

.ids { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 16px; }
.ids code { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: .9rem; }

/* MyAppClub section */
.club-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.club-box { display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; cursor: pointer; }
.club-apps { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; }
.club-app { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); }
.club-app.soon { opacity: .55; }
.pill { font-size: .75rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.pill.live { background: var(--green); color: #fff; border-color: var(--green); }
.code-in { width: 9.5em; }
.btn-uni { display: inline-block; background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 10px; padding: 9px 18px; font-weight: 600; text-decoration: none; }
.btn-uni:hover { filter: brightness(1.1); }
.or-code { font-size: 1rem; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
button.ghost.danger { color: var(--bad); }

/* My Uni Club Wallet: the web page and the member page */
a.who { color: #fff; text-decoration: none; }
.top button.ghost { color: #fff; border-color: rgba(255,255,255,.45); white-space: nowrap; }
a.who:hover { text-decoration: underline; }
.soon-badge { display: inline-block; margin: 0 0 10px; padding: 3px 12px; border-radius: 999px; background: #f6d27a; color: #0f3b2c; font-weight: 800; font-size: .9rem; }
.intro-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .intro-grid.three { grid-template-columns: minmax(0, 1fr); } }
.free-login.inline { margin-right: 6px; }
.member { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .member { grid-template-columns: minmax(0, 1fr); } }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 12px; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.tokens .balance { font-size: 1.4rem; margin: 6px 0; }
.pill.soon { background: #f6d27a; color: #0f3b2c; border-color: #f6d27a; font-weight: 700; }

/* UMR-004 §3: the member page's boxes (they open in My UniLogin) */
.m-boxes { grid-column: 1 / -1; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.m-box { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.m-box:hover { border-color: var(--green-2); }
.m-box.off { opacity: .55; cursor: default; }
.m-ico { font-size: 1.3rem; }

/* UMR-005 v2.9 (D): an ID (SVGWC, DIGIPIN, GST, PAN, token, key) never breaks inside a word. It stays on one line in
   monospace; when a phone is too narrow, only the ID itself scrolls sideways (never the page). On a phone the label
   sits on top and the value under it. The ✓ pill stays inside its card. Checked at 360px. */
.ids code, .facts dd.id-v { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; font-family: ui-monospace, Consolas, monospace; max-width: 100%; overflow-x: auto; display: inline-block; vertical-align: bottom; }
.m-box { min-width: 0; overflow: hidden; }
.m-box .pill { max-width: 100%; white-space: nowrap; }
@media (max-width: 600px) {
  .ids { flex-direction: column; align-items: flex-start; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dt:not(:first-child) { margin-top: 8px; }
}

/* UMR-005 v2.9 (C): the one club screen before the phone's own Allow boxes (Android app only) */
.perm-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.perm-card { background: var(--bg, #fff); color: var(--text, #111); border-radius: 14px; max-width: 420px; width: 100%; padding: 18px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.perm-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.perm-card ul { margin: 8px 0 12px; padding-left: 20px; }
.perm-card li { margin: 4px 0; }
.perm-card .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* UMR-005 v3.6 item 13: this app's own ID, and Delete Account (G-ID members only) */
.ids.app-id { margin-bottom: 2px; }
.del-card { border-color: var(--bad, #b42318); }
.del-card ul { padding-left: 20px; }
.del-card li { margin: 4px 0; }
.del-word { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.del-word input { height: 40px; width: 12ch; max-width: 100%; box-sizing: border-box; font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 600px) { .del-word input { width: 100%; } }

/* UMR-005 v3.7 item 14: "My details" on the member page (saved in the club account); fields sized to content (v2.5) */
.my-details h3 { margin: 16px 0 6px; font-size: 1.05rem; }
.my-photo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.my-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.btn-file { position: relative; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.btn-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.my-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.my-row input, .my-field input, .my-field select { height: 40px; box-sizing: border-box; max-width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.my-addr { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.my-addr li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.my-act { margin-left: auto; display: flex; gap: 6px; }
.my-addr-form { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0; }
.my-field { display: flex; flex-direction: column; gap: 4px; }
.my-addr-form .row { flex-basis: 100%; display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 600px) {
  .my-row input, .my-field, .my-field input, .my-field select { width: 100%; }
  .my-act { margin-left: 0; }
}

/* UMR-005 v4.6 §13 item 29: the Back card is a normal club box (same size as the club website card; below it on a phone).
   UMR-005 v5.9 item 53: the top-bar panel is the shared Club Panel Kit (.mcp-*); these rules style only the home
   page's own MyAppClub section (.club-boxes). */
a.club-box.club-back { text-decoration: none; }

/* UMR-005 v5.9 items 41 + 43: SOFT MyAppClub panel (look only). Every card = its app's own colour (--c, the APP_THEME map
   below) at ~7% over white, a 1.5px border at ~28%, radius 14px; names #24302a; "Live" pill white with the app colour.
   The club website card is cream-gold, the Back card white with a light tint; "You are here" (this app's own card) is NOT
   a link (a span with aria-current="page"), with a 2.5px border in the app colour and a soft ring. No dark filled cards.
   A plain fallback comes first for browsers without color-mix. */
.club-boxes a.club-app[href], .club-boxes .club-app.here { --c: #475569; background: #fff; color: #24302a; border: 1.5px solid #d5dbd8; border-radius: 14px; }
.club-boxes .club-app .pill.live { background: #fff; color: var(--c); border: 1px solid #d5dbd8; font-weight: 600; }
.club-boxes a.club-app[href*="//bizverify."] { --c: #0b1736; }
.club-boxes a.club-app[href*="//clubprofile."] { --c: #5e1a2c; }
.club-boxes a.club-app[href*="//clubtoken."] { --c: #4a2409; }
.club-boxes a.club-app[href*="//digipin."] { --c: #1e1b4b; }
.club-boxes a.club-app[href*="//kyc."] { --c: #7a1a37; }
.club-boxes a.club-app[href*="//sanatan."] { --c: #244b38; }
.club-boxes a.club-app[href*="//lifestyle."] { --c: #244b38; }
.club-boxes a.club-app[href*="//payroll."] { --c: #143a48; }
.club-boxes a.club-app[href*="//touchbook."] { --c: #104a36; }
.club-boxes a.club-app[href*="//umb."] { --c: #7a1f2b; }
.club-boxes a.club-app[href*="//uniapp."] { --c: #2a1660; }
.club-boxes a.club-app[href*="//unikey."] { --c: #1b2330; }
.club-boxes a.club-app[href*="//unilogin."] { --c: #0b2a5b; }
.club-boxes a.club-app[href*="//uninotify."] { --c: #5b21b6; }
.club-boxes .club-app.soon { border: 1px dashed #b9c4c0; background: #f6f8f7; color: #5b6560; opacity: 1; }
.club-boxes .club-app.here { --c: #4a2409; border: 2.5px solid var(--c); box-shadow: 0 0 0 4px #f1ece8; cursor: default; }
.club-boxes .club-app.here .pill.live { background: var(--c); color: #fff; border-color: var(--c); }
.club-boxes a.club-box[href^="https://myappclub.in"] { background: #fffaf0; background: linear-gradient(135deg, #fffaf0, #f6edd6); border: 1.5px solid #e2c98b; }
.club-boxes a.club-box[href^="https://myappclub.in"] strong { color: #1d5a40; }
.club-boxes a.club-box.club-back:not([href^="https://"]) { --c: #4a2409; background: #fff; border: 1.5px solid #c9bdb5; }
.club-boxes a.club-box.club-back:not([href^="https://"]) strong { color: var(--c); }
.club-boxes a.club-box[href^="https://myappclub.in"] small, .club-boxes a.club-box.club-back:not([href^="https://"]) small { color: #5b665f; }
.club-boxes a.club-app:focus-visible, .club-boxes a.club-box:focus-visible { outline: 3px solid var(--focus, #2f7dd1); outline-offset: 2px; }
.club-boxes a.club-app[href]:hover, .club-boxes a.club-app[href]:focus-visible { box-shadow: 0 2px 8px rgba(31, 42, 36, .12); }
@supports (background: color-mix(in srgb, red 10%, #fff)) {
  .club-boxes a.club-app[href], .club-boxes .club-app.here { background: color-mix(in srgb, var(--c) 7%, #fff); border-color: color-mix(in srgb, var(--c) 28%, #fff); transition: border-color .15s, box-shadow .15s; }
  .club-boxes .club-app .pill.live { border-color: color-mix(in srgb, var(--c) 28%, #fff); }
  .club-boxes a.club-app[href]:hover, .club-boxes a.club-app[href]:focus-visible { border-color: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: 0 2px 8px color-mix(in srgb, var(--c) 16%, transparent); }
  .club-boxes .club-app.here { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 7%, #fff); }
  .club-boxes .club-app.here .pill.live { border-color: var(--c); }
  .club-boxes a.club-box.club-back:not([href^="https://"]) { background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--c) 8%, #fff)); border-color: color-mix(in srgb, var(--c) 30%, #fff); }
}
.club-boxes .club-app.soon { transform: none; box-shadow: none; }
.club-boxes .club-app.here, .club-boxes .club-app.here:hover { transition: none; }
@media (prefers-reduced-motion: reduce) { .club-boxes a.club-app, .club-boxes a.club-app:hover, .club-boxes a.club-app:focus-visible { transition: none; transform: none; } }

/* UMR-005 v5.9 item 46: TouchBook-style boxes in the home MyAppClub section; the two top cards side by side from 600px; Our Apps = small boxes side by side: 4 columns from
   1000px, 3 at 760-999px, 2 at 480-759px, 1 under 480px (container queries on the panel width, media fallback). Each
   box is one row: 40px initials square, name 15px/600 max 2 lines, pill on the right; padding 12px, min-height 64px. */
.club-boxes { container-type: inline-size; min-width: 0; }
.club-boxes .club-grid { grid-template-columns: 1fr; gap: 10px; }
.club-boxes .club-box { padding: 16px; min-width: 0; }
.club-boxes .club-apps { display: grid; gap: 10px; grid-template-columns: 1fr; }
.club-boxes .club-app { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 12px; min-height: 64px; border-radius: 14px; box-sizing: border-box; min-width: 0; }
.club-boxes .club-ini { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--c, #475569); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.club-boxes .club-app.soon .club-ini { background: #94a3b8; }
.club-boxes .club-app-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.club-boxes .club-app .pill { flex: none; margin-left: auto; }
@container (min-width: 480px) { .club-boxes .club-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 600px) { .club-boxes .club-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 760px) { .club-boxes .club-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1000px) { .club-boxes .club-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@supports not (container-type: inline-size) {
  @media (min-width: 480px) { .club-boxes .club-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 600px) { .club-boxes .club-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 760px) { .club-boxes .club-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (min-width: 1000px) { .club-boxes .club-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
}

/* points phase 1 (28 Nov 2026): My points */
.points .pts-app { margin: 10px 0; }
.points .pts-app h3 { margin: 0 0 4px; font-size: 1rem; }
.points ul { list-style: none; margin: 0; padding: 0; }
.points li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid rgba(0, 0, 0, .06); min-width: 0; }
.points li span { min-width: 0; overflow-wrap: anywhere; }
.points .neg { color: #9b2c2c; }
.points .pos { color: #1f7a55; }
.points details { margin: 8px 0; }
