/* SunNex parent / student app — mobile web-view styles.
   Palette from the SunNex brand sheet: navy + orange + gold. */
:root {
    --navy: #13235b;
    --navy-2: #1f3a93;
    --orange: #f26b1d;
    --gold: #f5b400;
    --bg: #f3f5fb;
    --card: #ffffff;
    --ink: #17203a;
    --muted: #6b7390;
    --line: #e6e9f2;
    --green: #1fa463;
    --red: #e5484d;
    --amber: #f59f00;
    --purple: #6c4cf1;
    --sky: #2f8cf0;
    --radius: 18px;
    --shadow: 0 6px 20px rgba(19, 35, 91, .08);
    --tabbar-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body.app-body {
    font-family: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45;
    padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
    max-width: 640px; margin: 0 auto; min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Header ---------- */
.app-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff; padding: calc(12px + var(--safe-t)) 16px 18px;
    border-radius: 0 0 26px 26px; position: relative;
}
.app-header--hero { padding-bottom: 64px; }
.app-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.app-header__me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-header__me small { display: block; opacity: .8; font-size: 12px; }
.app-header__me strong { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header__title { font-size: 18px; margin: 0; flex: 1; font-weight: 600; }
.app-header__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center;
    background: rgba(255, 255, 255, .14); color: inherit; border: 0; position: relative; font-size: 18px; cursor: pointer;
}
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); border: 2px solid var(--navy); }
.role-chip { background: rgba(255, 255, 255, .18); padding: 3px 10px; border-radius: 999px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #dfe5f5; }
.avatar--xs { width: 24px; height: 24px; }
.avatar--sm { width: 42px; height: 42px; border: 2px solid rgba(255, 255, 255, .6); }
.avatar--lg { width: 72px; height: 72px; border: 3px solid #fff; box-shadow: var(--shadow); }
.avatar--initials { display: inline-grid; place-items: center; font-weight: 700; color: var(--navy); background: #ffe2cf; }

/* ---------- Child switcher (parents) ---------- */
.child-switch { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 2px; scrollbar-width: none; }
.child-switch::-webkit-scrollbar { display: none; }
.child-switch form { margin: 0; flex-shrink: 0; }
.child-chip {
    display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff;
    padding: 5px 12px 5px 5px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.child-chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Layout ---------- */
.app-main { padding: 14px 16px; }
.app-header--hero + .child-switch, .app-header--hero ~ .app-main { margin-top: -54px; position: relative; }
.app-header--hero + .child-switch { margin-top: -50px; position: relative; z-index: 2; }
.app-header--hero + .child-switch + .app-main { margin-top: 0; }
.section { margin-top: 20px; }
.section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section__head h2 { font-size: 16px; font-weight: 700; }
.section__head a { color: var(--orange); font-weight: 600; font-size: 13px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.card + .card { margin-top: 10px; }
.card--flat { box-shadow: none; border: 1px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.center { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty i { font-size: 34px; display: block; margin-bottom: 6px; color: #c3c9dc; }

/* ---------- Profile card ---------- */
.profile-card { display: flex; gap: 12px; align-items: center; }
.profile-card h2 { font-size: 17px; }
.profile-card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #eef1fb; color: var(--navy); }
.pill--orange { background: #fff0e6; color: #c4500f; }
.pill--green { background: #e3f7ec; color: #137a46; }
.pill--red { background: #fdeaea; color: #b42328; }
.pill--amber { background: #fff4d6; color: #9a6400; }
.pill--purple { background: #efeafe; color: #5634d6; }
.pill--grey { background: #eef0f4; color: #596079; }

/* ---------- Stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border-radius: var(--radius); padding: 14px; background: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; display: block; }
.tile__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; color: #fff; margin-bottom: 8px; }
.tile__label { font-size: 12px; color: var(--muted); }
.tile__value { font-size: 21px; font-weight: 700; }
.tile__value small { font-size: 12px; font-weight: 600; color: var(--muted); }
.tile--blue .tile__icon { background: var(--sky); }
.tile--orange .tile__icon { background: var(--orange); }
.tile--green .tile__icon { background: var(--green); }
.tile--purple .tile__icon { background: var(--purple); }
.tile--red .tile__icon { background: var(--red); }
.tile--gold .tile__icon { background: var(--gold); }
.tile--navy .tile__icon { background: var(--navy); }

/* ---------- Module grid ---------- */
.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; }
.module { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11.5px; font-weight: 500; padding: 6px 2px; }
.module__icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; background: #fff; box-shadow: var(--shadow); position: relative; }
.module__icon .badge-count { top: -4px; right: -4px; }
.c-blue { color: var(--sky); } .c-orange { color: var(--orange); } .c-green { color: var(--green); } .c-purple { color: var(--purple); }
.c-red { color: var(--red); } .c-gold { color: #d79a00; } .c-navy { color: var(--navy); } .c-pink { color: #e04b8a; } .c-teal { color: #0fa3a3; }

/* ---------- Highlight boxes ---------- */
.highlight {
    border-radius: var(--radius); padding: 14px; color: #fff;
    background: linear-gradient(135deg, var(--orange), #ff9a3c); box-shadow: 0 10px 24px rgba(242, 107, 29, .3);
}
.highlight--navy { background: linear-gradient(135deg, var(--navy), var(--navy-2)); box-shadow: 0 10px 24px rgba(19, 35, 91, .25); }
.highlight--green { background: linear-gradient(135deg, #129a5b, #2fc27b); box-shadow: 0 10px 24px rgba(31, 164, 99, .25); }
.highlight small { opacity: .85; }
.highlight .big { font-size: 22px; font-weight: 700; }
.highlight .btn { background: #fff; color: var(--navy); }

/* ---------- Lists ---------- */
.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list__item:last-child { border-bottom: 0; }
.list__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #eef1fb; color: var(--navy); font-size: 17px; flex-shrink: 0; }
.list__title { font-weight: 600; }
.list__sub { font-size: 12px; color: var(--muted); }
.list__end { margin-left: auto; text-align: right; flex-shrink: 0; }
.chev { color: #b6bdd2; }

/* ---------- Buttons & forms ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
    border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 14px; background: var(--navy); color: #fff;
}
.btn--orange { background: var(--orange); }
.btn--green { background: var(--green); }
.btn--ghost { background: #eef1fb; color: var(--navy); }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.btn[disabled] { opacity: .6; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: #3c4565; }
.input, select.input, textarea.input {
    width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 12px; font-size: 14px; outline: none;
}
.input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(31, 58, 147, .12); }
textarea.input { min-height: 90px; resize: vertical; }
.file-pick {
    display: flex; align-items: center; gap: 10px; border: 1.5px dashed #c5cde3; border-radius: 14px; padding: 12px; background: #fafbff; cursor: pointer;
}
.file-pick i { font-size: 22px; color: var(--navy-2); }
.file-pick .file-name { font-size: 12.5px; color: var(--muted); }
.file-pick input[type=file] { display: none; }
.file-preview { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.file-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }

/* ---------- Tabs & chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg { display: flex; background: #e9ecf6; border-radius: 12px; padding: 4px; }
.seg a { flex: 1; text-align: center; padding: 7px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg a.is-active { background: #fff; color: var(--navy); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }

/* ---------- Progress bars, charts ---------- */
.bar { height: 8px; border-radius: 99px; background: #e8ebf5; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--gold)); }
.bar--green > span { background: linear-gradient(90deg, #129a5b, #3ed38a); }
.bar--blue > span { background: linear-gradient(90deg, var(--navy-2), var(--sky)); }
.ring { --p: 0; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: conic-gradient(var(--green) calc(var(--p) * 1%), #e6e9f2 0); }
.ring > span { width: 68px; height: 68px; background: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.ring--orange { background: conic-gradient(var(--orange) calc(var(--p) * 1%), #e6e9f2 0); }
.vbars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 6px; }
.vbars__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.vbars__bar { width: 100%; max-width: 30px; border-radius: 10px; background: linear-gradient(180deg, var(--green), #6fdba3); min-height: 4px; }
.vbars__bar.is-empty { background: #e6e9f2; }
.vbars__label { font-size: 11px; color: var(--muted); }
.vbars__val { font-size: 10.5px; font-weight: 600; }
.score-row { margin-bottom: 10px; }
.score-row .row { font-size: 13px; margin-bottom: 4px; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal__dow { font-size: 11px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal__day { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 600; position: relative; background: #f6f7fb; }
.cal__day.is-blank { background: transparent; }
.cal__day.is-today { outline: 2px solid var(--navy-2); }
.cal__day.s-present { background: #dff5e9; color: #137a46; }
.cal__day.s-absent { background: #fde3e3; color: #b42328; }
.cal__day.s-leave { background: #fff1d2; color: #9a6400; }
.cal__day.s-late { background: #e3edff; color: #1c4fb0; }
.cal__day.s-holiday { background: #efeafe; color: #5634d6; }
.cal__day .ev { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; background: var(--c); }

/* ---------- Belt ladder ---------- */
.belts { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.belt { flex-shrink: 0; width: 64px; text-align: center; font-size: 10.5px; opacity: .45; }
.belt.is-done { opacity: 1; }
.belt.is-current { opacity: 1; font-weight: 700; }
.belt__swatch { height: 14px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); margin-bottom: 4px; position: relative; }
.belt.is-current .belt__swatch { box-shadow: 0 0 0 3px rgba(242, 107, 29, .45); }

/* ---------- Emoji rating ---------- */
.mood { display: flex; align-items: center; gap: 12px; }
.mood__emoji { font-size: 40px; line-height: 1; }
.score-badge { background: var(--navy); color: #fff; border-radius: 12px; padding: 6px 10px; font-weight: 700; font-size: 16px; }
.score-badge small { opacity: .7; font-size: 11px; }

/* ---------- Achiever carousel & popup ---------- */
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: center; }
.dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.dots span { width: 6px; height: 6px; border-radius: 99px; background: #cfd5e6; transition: .2s; }
.dots span.is-active { width: 18px; background: var(--orange); }
.popup { position: fixed; inset: 0; background: rgba(10, 16, 40, .55); display: grid; place-items: center; z-index: 60; padding: 20px; }
.popup[hidden] { display: none; }
.popup__card { background: #fff; border-radius: 22px; width: 100%; max-width: 380px; padding: 16px; position: relative; animation: pop .25s ease; }
.popup__close { position: absolute; top: 10px; right: 10px; background: #eef1fb; color: var(--navy); }
.popup__ribbon { text-align: center; font-weight: 800; color: var(--orange); letter-spacing: .03em; margin-bottom: 10px; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Portfolio (YouTube style) ---------- */
.yt-channel { display: flex; gap: 12px; align-items: center; }
.yt-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.yt-card__thumb { position: relative; border-radius: 14px; overflow: hidden; background: #1b2240; aspect-ratio: 16 / 9; display: grid; place-items: center; color: #fff; }
.yt-card__thumb img, .yt-card__thumb video { width: 100%; height: 100%; object-fit: cover; }
.yt-card__thumb .play { position: absolute; width: 52px; height: 36px; border-radius: 10px; background: rgba(229, 72, 77, .95); display: grid; place-items: center; font-size: 20px; }
.yt-card__thumb .ph { font-size: 38px; opacity: .6; }
.yt-card__meta { display: flex; gap: 10px; margin-top: 8px; }
.yt-card__title { font-weight: 600; line-height: 1.3; }
@media (min-width: 520px) { .yt-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Chat (WhatsApp style) ---------- */
.chat { background: #efe7de url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%23d9cfc3'/%3E%3C/svg%3E"); margin: -14px -16px 0; padding: 12px 12px 90px; min-height: calc(100vh - 160px); }
.chat__day { text-align: center; margin: 10px 0; }
.chat__day span { background: #e1f2fb; color: #4a5a6a; font-size: 11.5px; padding: 4px 10px; border-radius: 8px; }
.bubble { max-width: 82%; padding: 7px 10px 18px; border-radius: 10px; margin: 4px 0; position: relative; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); word-wrap: break-word; }
.bubble .txt { white-space: pre-wrap; }
.bubble--in { background: #fff; border-top-left-radius: 2px; }
.bubble--out { background: #d9fdd3; margin-left: auto; border-top-right-radius: 2px; }
.bubble__time { position: absolute; right: 8px; bottom: 3px; font-size: 10.5px; color: #66777f; }
.bubble audio { width: 220px; max-width: 100%; height: 36px; }
.bubble .who { font-size: 11.5px; font-weight: 700; color: var(--orange); margin-bottom: 2px; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); max-width: 640px; margin: 0 auto; display: flex; gap: 6px; align-items: flex-end; padding: 8px; background: #f0f2f5; z-index: 20; }
.composer textarea { flex: 1; border: 0; border-radius: 22px; padding: 10px 14px; resize: none; max-height: 120px; min-height: 42px; outline: none; }
.composer .round { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; cursor: pointer; }
.composer .round--send { background: #00a884; color: #fff; }
.composer .round--plain { background: transparent; color: #54656f; }
.composer .round.is-recording { background: var(--red); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .65; } }

/* ---------- Timeline / journey ---------- */
.journey { position: relative; padding-left: 26px; }
.journey::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 2px; background: #dfe3ef; }
.journey__step { position: relative; padding: 6px 0 12px; }
.journey__step::before { content: ""; position: absolute; left: -21px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: #dfe3ef; border: 2px solid #fff; box-shadow: 0 0 0 2px #dfe3ef; }
.journey__step.is-done::before { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.journey__step.is-current::before { background: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.journey__step.is-current { font-weight: 700; }

/* ---------- Tabbar ---------- */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; z-index: 30;
    display: flex; background: #fff; border-top: 1px solid var(--line);
    padding-bottom: var(--safe-b); height: calc(var(--tabbar-h) + var(--safe-b)); box-shadow: 0 -6px 18px rgba(19, 35, 91, .06);
}
.tabbar__item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: #8a91a8; font-weight: 500; }
.tabbar__icon { font-size: 21px; position: relative; line-height: 1; }
.tabbar__item.is-active { color: var(--navy); font-weight: 700; }
.tabbar__item.is-active .tabbar__icon { color: var(--orange); }
.badge-count { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }

/* ---------- Alerts, toasts ---------- */
.alert { border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.alert--danger { background: #fdeaea; color: #8f1d21; }
.alert--info { background: #e8f0ff; color: #1c3f8c; }
.alert--warn { background: #fff4d6; color: #7a5200; }
.toast-msg { position: fixed; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 80; background: #1b2240; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13px; box-shadow: var(--shadow); max-width: 90vw; transition: opacity .4s; }

/* ---------- Viewer ---------- */
.viewer { position: fixed; inset: 0; background: #0b0f1f; z-index: 90; display: flex; flex-direction: column; color: #fff; }
.viewer[hidden] { display: none; }
.viewer__bar { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 10px; }
.viewer__title { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__body { flex: 1; display: grid; place-items: center; overflow: auto; }
.viewer__body img, .viewer__body video { max-width: 100%; max-height: 100%; }
.viewer__body iframe { width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #fff 0%, #eef2fd 100%); padding-bottom: 0; }
.login__top { padding: calc(30px + var(--safe-t)) 24px 10px; text-align: center; }
.login__top img { width: 230px; max-width: 80%; }
.login__card { background: #fff; margin: 16px; border-radius: 24px; padding: 22px 18px; box-shadow: var(--shadow); }
.login__card h1 { font-size: 21px; margin: 0 0 4px; }
.login__who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.login__who div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; font-size: 12.5px; color: var(--muted); }
.login__who i { display: block; font-size: 24px; color: var(--orange); margin-bottom: 2px; }
.pw { position: relative; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: 18px; padding: 6px; }

/* ---------- Misc ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.stars { color: var(--gold); letter-spacing: 1px; }
.stars .off { color: #d9dcea; }
.badge-medal { font-size: 22px; }
details.card summary { cursor: pointer; font-weight: 600; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: "\F282"; font-family: bootstrap-icons; float: right; transition: .2s; }
details.card[open] summary::after { transform: rotate(180deg); }
.idcard { border-radius: 20px; padding: 16px; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, #23408f 60%, var(--orange) 140%); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.idcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(245, 180, 0, .25); }
.dash-martial .app-header, .dash-range .app-header { background: linear-gradient(135deg, #0f1b46 0%, #8a1f11 130%); }
.dash-distance .app-header { background: linear-gradient(135deg, #13235b 0%, #0f7a8a 130%); }
.dash-global .app-header { background: linear-gradient(135deg, #13235b 0%, #3a2a8f 130%); }
