:root {
    --bg: #e8f0f4;
    --surface: #ffffff;
    --ink: #152530;
    --ink-soft: #3a5160;
    --muted: #67808e;
    --line: #d2e0e7;
    --teal: #0e7c86;
    --teal-deep: #0a5c64;
    --teal-soft: #dff4f6;
    --sky: #3d9bb5;
    --coral: #ef6f5e;
    --coral-deep: #d45747;
    --coral-soft: #ffe8e4;
    --sand: #f7f1e6;
    --gold: #d4a017;
    --success: #2d8a62;
    --success-soft: #e4f6ee;
    --warn: #c4851a;
    --warn-soft: #fff4df;
    --danger: #c2423a;
    --danger-soft: #fdeceb;
    --shadow: 0 14px 40px rgba(21, 37, 48, 0.1);
    --shadow-soft: 0 6px 18px rgba(21, 37, 48, 0.06);
    --radius: 20px;
    --font: "Vazirmatn", Tahoma, sans-serif;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
    --motion-fast: 180ms;
    --motion-med: 320ms;
    --motion-slow: 480ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.7;
}

.app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(61, 155, 181, 0.35), transparent 55%),
        radial-gradient(700px 380px at -5% 0%, rgba(239, 111, 94, 0.18), transparent 50%),
        linear-gradient(165deg, #b9d9e4 0%, #d5e7ef 28%, #e8f0f4 52%, #eef3f6 100%);
}
.app-bg::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -80px;
    top: 120px;
    border-radius: 40% 60% 55% 45%;
    background: rgba(14, 124, 134, 0.08);
    filter: blur(2px);
    animation: drift 14s ease-in-out infinite alternate;
}
.app-bg::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    left: -60px;
    bottom: 10%;
    border-radius: 55% 45% 40% 60%;
    background: rgba(239, 111, 94, 0.08);
    animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    from { transform: translateY(0) rotate(0deg); }
    to { transform: translateY(-24px) rotate(8deg); }
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes soft-pop {
    from { opacity: 0; transform: scale(.96) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes drawer-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.container { width: min(1080px, calc(100% - 2rem)); margin-inline: auto; }
.main { padding: 1.35rem 0 3.2rem; }

/* ——— Skip link ——— */
.skip-link {
    position: absolute;
    top: -100px;
    right: 1rem;
    z-index: 100;
    background: var(--teal-deep);
    color: #fff;
    padding: .65rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus {
    top: .75rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ——— Topbar (RTL) ——— */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: env(safe-area-inset-top);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid rgba(210, 224, 231, 0.95);
    box-shadow: 0 8px 24px rgba(21, 37, 48, 0.04);
}
.topbar.is-open {
    background: #fff;
}
.topbar-shell { position: relative; }
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    min-height: 72px;
    direction: rtl;
}
.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    min-width: 0;
    flex: 1;
}
.topbar-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
    border-radius: 14px;
    padding: .15rem;
    margin-inline-end: .15rem;
}
.brand:hover .brand-mark { filter: brightness(1.06); }
.brand:focus-visible {
    outline: 2px solid rgba(14, 124, 134, .45);
    outline-offset: 3px;
}
.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: block;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 10px 22px rgba(14, 124, 134, 0.28);
}
.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.brand-text {
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.01em;
}
.brand-sub {
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
}

.nav-primary { min-width: 0; }
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1px;
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    padding: .45rem .8rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
    transition:
        background var(--motion-fast) var(--ease-out),
        color var(--motion-fast) var(--ease-out),
        transform var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-fast) var(--ease-out);
    touch-action: manipulation;
}
.nav-link:hover {
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.nav-link:focus-visible {
    outline: 2px solid rgba(14, 124, 134, .45);
    outline-offset: 2px;
}
.nav-link:active { transform: scale(0.98); }
.nav-link.is-active {
    background: linear-gradient(145deg, #dff4f6, #e8f8f9);
    color: var(--teal-deep);
    box-shadow: inset 0 0 0 1px rgba(14, 124, 134, 0.18);
}
.nav-link.is-active .nav-ico { color: var(--teal); }

.nav-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .35rem .85rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color .15s ease, background .15s ease;
}
.user-chip:hover {
    border-color: rgba(14, 124, 134, .35);
    background: var(--teal-soft);
}
.user-chip:focus-visible {
    outline: 2px solid rgba(14, 124, 134, .45);
    outline-offset: 2px;
}
.user-pill {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    max-width: 150px;
}
.user-pill__name {
    font-size: .86rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
}
.user-pill__role {
    font-size: .72rem;
    color: var(--muted);
    font-weight: 600;
}

.nav-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: #fff;
    border: 1px solid var(--line);
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    touch-action: manipulation;
}
.nav-icon-btn:hover {
    background: var(--teal-soft);
    color: var(--teal-deep);
    border-color: rgba(14, 124, 134, .25);
}
.nav-icon-btn:focus-visible {
    outline: 2px solid rgba(14, 124, 134, .45);
    outline-offset: 2px;
}
.nav-icon-btn--danger:hover {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(194, 66, 58, .25);
}
.nav-icon-btn--qr {
    background: var(--teal-soft);
    color: var(--teal-deep);
    border-color: rgba(14, 124, 134, .2);
}
.nav-icon-btn--qr:hover,
.nav-icon-btn--qr.is-active {
    background: var(--teal);
    color: #fff;
    border-color: transparent;
}
.nav-icon-btn .nav-ico { width: 20px; height: 20px; }

.qr-fab {
    display: none;
    position: fixed;
    left: 1rem;
    bottom: 1.15rem;
    z-index: 45;
    min-width: 64px;
    height: 56px;
    padding: 0 .95rem;
    border-radius: 18px;
    background: var(--teal);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(14, 124, 134, .35);
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.qr-fab .nav-ico { width: 22px; height: 22px; }
.qr-fab.is-active { background: var(--teal-deep); }

.award-recent { margin-top: 1rem; }
.award-recent .section-bar { margin-bottom: .75rem; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    place-items: center;
    cursor: pointer;
    touch-action: manipulation;
    padding: 0;
}
.nav-toggle:focus-visible {
    outline: 2px solid rgba(14, 124, 134, .45);
    outline-offset: 2px;
}
.nav-toggle .nav-ico { width: 22px; height: 22px; }

.mobile-nav {
    display: none;
    padding: .35rem 0 1rem;
    border-top: 1px solid var(--line);
    animation: fade-up .25s ease both;
}
.mobile-nav[hidden] { display: none !important; }
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: .5rem 0 0;
    display: grid;
    gap: .35rem;
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 48px;
    padding: .7rem .9rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    background: #f7fbfd;
    border: 1px solid transparent;
}
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: var(--teal-soft);
    color: var(--teal-deep);
    border-color: rgba(14, 124, 134, 0.16);
}
.mobile-nav-link--danger {
    color: var(--danger);
    background: var(--danger-soft);
}
.mobile-nav-link .nav-ico { width: 20px; height: 20px; }

.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 30, 40, 0.28);
    backdrop-filter: blur(2px);
}
.nav-backdrop[hidden] { display: none !important; }

body.nav-open { overflow: hidden; }

@media (max-width: 980px) {
    .nav-primary { display: none; }
    .nav-toggle { display: grid; }
    .user-pill__name { max-width: 90px; }
    .nav-icon-btn--logout { display: none; }
    .nav-icon-btn--qr { display: none; }
    .qr-fab { display: inline-flex; }
    .topbar.is-open .mobile-nav { display: block; }
    body.role-admin .main,
    body.role-mentor .main { padding-bottom: 5.5rem; }
}

.hero { padding: .35rem 0 1.15rem; animation: fade-up .45s ease both; }
.hero h1 {
    margin: 0 0 .3rem;
    font-size: clamp(1.5rem, 3vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -.02em;
}
.hero p { margin: 0; color: var(--muted); max-width: 38rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    backdrop-filter: blur(6px);
    animation: fade-up .5s var(--ease-out) both;
    transition:
        transform var(--motion-med) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out),
        border-color var(--motion-fast) var(--ease-out);
}
.panel h2, .panel h3 {
    margin: 0 0 .8rem;
    font-size: 1.12rem;
    font-weight: 800;
}

.stat {
    padding: 1.05rem 1.1rem;
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: var(--shadow-soft);
}
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value {
    font-size: 1.55rem;
    font-weight: 800;
    margin-top: .15rem;
    color: var(--teal-deep);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 0;
    border-radius: 12px;
    padding: .7rem 1.1rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    background: linear-gradient(145deg, #14919c, #0e7c86);
    color: #fff;
    box-shadow: 0 8px 18px rgba(14, 124, 134, 0.25);
    transition:
        transform var(--motion-fast) var(--ease-out),
        filter var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out),
        background var(--motion-fast) var(--ease-out),
        border-color var(--motion-fast) var(--ease-out),
        opacity var(--motion-fast) var(--ease-out);
}
.btn:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(14, 124, 134, 0.3);
}
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    filter: none;
    box-shadow: none;
}
.btn-accent {
    background: linear-gradient(145deg, #f28576, #ef6f5e);
    box-shadow: 0 8px 18px rgba(239, 111, 94, 0.28);
}
.btn-accent:hover { filter: brightness(1.05); }
.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    box-shadow: none;
}
.btn-outline {
    background: #fff;
    color: var(--teal-deep);
    border: 1px solid var(--line);
    box-shadow: none;
}
.btn-danger { background: linear-gradient(145deg, #d85a52, #c2423a); }
.btn-sm { padding: .42rem .8rem; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }

.form-group { margin-bottom: .9rem; }
.form-group label { display: block; margin-bottom: .3rem; font-weight: 700; font-size: .92rem; }
.form-group .hint { color: var(--muted); font-size: .8rem; margin-top: .25rem; }
input:not([type]),
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: .7rem .85rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    box-sizing: border-box;
}
textarea { min-height: 100px; resize: vertical; }
input:not([type]):focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
textarea:focus {
    outline: 2px solid rgba(14, 124, 134, .2);
    border-color: var(--teal);
}

/* Native select hidden when enhanced — spans the whole widget so the browser's
   validation message (for required selects) anchors to the visible dropdown
   instead of an invisible 1px corner box. */
select.ui-enhanced {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Fallback native select */
select:not(.ui-enhanced) {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 48px;
    padding: .7rem 2.6rem .7rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(14, 124, 134, .14);
    background-color: #fff;
    background-image:
        linear-gradient(180deg, #ffffff 0%, #f4fafb 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%230e7c86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, left .75rem center;
    background-size: auto, 18px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}
select:not(.ui-enhanced):focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, .14);
}

/* ——— Choice chips ——— */
.choice-field { position: relative; }
.choice-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice-chip {
    appearance: none;
    border: 1px solid rgba(14, 124, 134, .14);
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(61, 155, 181, .12), transparent 55%),
        linear-gradient(160deg, #fff, #f3f9fb);
    color: var(--ink-soft);
    font-family: inherit;
    font-weight: 700;
    font-size: .9rem;
    min-height: 44px;
    padding: .55rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    transition: .18s ease;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(21, 37, 48, .05);
}
.choice-chip:hover {
    border-color: rgba(14, 124, 134, .35);
    color: var(--teal-deep);
    transform: translateY(-1px);
}
.choice-chip:focus-visible {
    outline: 2px solid rgba(14, 124, 134, .4);
    outline-offset: 2px;
}
.choice-chip.is-selected {
    background: linear-gradient(145deg, #14919c, #0e7c86);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(14, 124, 134, 0.28);
}
.choice-chip .chip-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; opacity: .45;
}
.choice-chip.is-selected .chip-dot {
    background: #fff; opacity: 1;
    box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}
.choice-chip[data-value="halghe"].is-selected,
.choice-chip[data-value="camp"].is-selected { background: linear-gradient(145deg, #1ea4b0, #0e7c86); }
.choice-chip[data-value="class"].is-selected { background: linear-gradient(145deg, #4aa8c4, #2f87a5); }
.choice-chip[data-value="other"].is-selected { background: linear-gradient(145deg, #8aa0ad, #667a87); }
.choice-chip[data-value="active"].is-selected { background: linear-gradient(145deg, #45b88a, #2d8a62); }
.choice-chip[data-value="semi_active"].is-selected { background: linear-gradient(145deg, #e2b34a, #c4851a); }
.choice-chip[data-value="inactive"].is-selected { background: linear-gradient(145deg, #9aabb6, #6b7f8c); }

/* ——— Custom dropdown ——— */
.nice-select { position: relative; width: 100%; z-index: 1; }
.nice-select.is-open { z-index: 60; }
.nice-select__trigger {
    width: 100%;
    min-height: 50px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .7rem;
    padding: .55rem .55rem .55rem .85rem;
    border-radius: 16px;
    border: 1px solid rgba(14, 124, 134, .14);
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(61, 155, 181, .16), transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #f3f9fb 100%);
    box-shadow: 0 8px 20px rgba(21, 37, 48, .06);
    font-family: inherit;
    font-size: .98rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    text-align: right;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    touch-action: manipulation;
}
.nice-select__trigger:hover {
    border-color: rgba(14, 124, 134, .34);
    transform: translateY(-1px);
}
.nice-select.is-open .nice-select__trigger,
.nice-select__trigger:focus-visible {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, .14), 0 12px 26px rgba(14, 124, 134, .12);
    outline: none;
    transform: none;
}
.nice-select__mark {
    width: 34px; height: 34px; border-radius: 11px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, #dff4f6, #c9ebf0);
    color: var(--teal-deep); flex-shrink: 0;
}
.nice-select__mark svg { width: 16px; height: 16px; display: block; }
.nice-select.has-value .nice-select__mark {
    background: linear-gradient(145deg, #14919c, #0e7c86);
    color: #fff;
}
.nice-select__value {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: .1rem; min-width: 0;
}
.nice-select__value strong {
    font-size: .95rem; font-weight: 800;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
    color: var(--teal-deep);
}
.nice-select__value small { font-size: .75rem; font-weight: 600; color: var(--muted); }
.nice-select__placeholder { color: var(--muted); font-weight: 700; }
.nice-select__chevron {
    width: 32px; height: 32px; border-radius: 11px;
    display: grid; place-items: center;
    background: #fff;
    border: 1px solid rgba(14, 124, 134, .12);
    color: var(--teal-deep); flex-shrink: 0;
    transition: transform .22s ease, background .16s ease;
}
.nice-select.is-open .nice-select__chevron {
    transform: rotate(180deg);
    background: var(--teal-soft);
}
.nice-select__chevron svg { width: 15px; height: 15px; display: block; }
.nice-select__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0; left: 0; z-index: 70;
    margin: 0; padding: .5rem; list-style: none;
    background: linear-gradient(180deg, #f7fcfd 0%, #ffffff 28%);
    border: 1px solid rgba(14, 124, 134, .16);
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(21, 37, 48, 0.16);
    max-height: 280px; overflow-y: auto;
    animation: select-pop .18s ease both;
}
.nice-select__menu[hidden] { display: none !important; }
@keyframes select-pop {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.nice-select__option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .65rem;
    width: 100%;
    min-height: 44px;
    padding: .55rem .7rem;
    border: 0; border-radius: 12px;
    background: transparent;
    font-family: inherit; font-size: .92rem; font-weight: 700;
    color: var(--ink); cursor: pointer; text-align: right;
    transition: background .12s ease, color .12s ease;
}
.nice-select__opt-dot {
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid rgba(14, 124, 134, .28); background: #fff;
}
.nice-select__opt-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nice-select__opt-check {
    width: 18px; height: 18px; opacity: 0; color: var(--teal);
    transition: opacity .12s ease;
}
.nice-select__opt-check svg { width: 18px; height: 18px; display: block; }
.nice-select__option:hover,
.nice-select__option.is-focused {
    background: rgba(14, 124, 134, .08);
    color: var(--teal-deep);
}
.nice-select__option.is-selected {
    background: linear-gradient(120deg, #e4f6f8, #f3fcfd);
    color: var(--teal-deep);
    box-shadow: inset 0 0 0 1px rgba(14, 124, 134, 0.14);
}
.nice-select__option.is-selected .nice-select__opt-dot {
    border-color: var(--teal); background: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, .15);
}
.nice-select__option.is-selected .nice-select__opt-check { opacity: 1; }
.nice-select__option:disabled,
.nice-select__option.is-disabled { opacity: .45; cursor: not-allowed; }

.nice-select--compact { width: auto; min-width: 132px; flex: 0 1 auto; }
.nice-select--compact .nice-select__trigger {
    min-height: 42px; padding: .35rem .4rem .35rem .65rem;
    border-radius: 12px; gap: .45rem;
}
.nice-select--compact .nice-select__mark { width: 28px; height: 28px; border-radius: 9px; }
.nice-select--compact .nice-select__mark svg { width: 14px; height: 14px; }
.nice-select--compact .nice-select__chevron { width: 28px; height: 28px; border-radius: 9px; }
.nice-select--compact .nice-select__value strong,
.nice-select--compact .nice-select__placeholder { font-size: .84rem; }
.nice-select--compact .nice-select__menu { min-width: 180px; right: 0; left: auto; }
/* ——— Listbox (large lists) ——— */
.listbox-field {
    position: relative;
}
.listbox {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #f7fbfd);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.listbox__items {
    list-style: none;
    margin: 0;
    padding: .4rem;
    max-height: 280px;
    overflow-y: auto;
    display: grid;
    gap: .3rem;
}
.listbox__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-height: 48px;
    padding: .65rem .85rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    text-align: right;
    transition: .12s ease;
}
.listbox__item:hover { background: #fff; border-color: var(--line); }
.listbox__item.is-selected {
    background: linear-gradient(120deg, #e7f7f8, #fff);
    border-color: rgba(14, 124, 134, 0.22);
    color: var(--teal-deep);
    box-shadow: var(--shadow-soft);
}
.listbox__item.is-hidden { display: none; }
.listbox__item small {
    color: var(--muted);
    font-weight: 600;
    font-size: .78rem;
}
.listbox__empty {
    padding: 1.2rem;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}

/* Compact select in tables */
td .nice-select { min-width: 160px; }
td .nice-select__trigger {
    min-height: 40px;
    padding: .35rem .4rem .35rem .6rem;
    border-radius: 12px;
}
td .nice-select__mark { width: 26px; height: 26px; border-radius: 8px; }
td .nice-select__chevron { width: 26px; height: 26px; border-radius: 8px; }
td .choice-chips { gap: .35rem; }
td .choice-chip {
    min-height: 36px;
    padding: .35rem .7rem;
    font-size: .8rem;
    border-radius: 10px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: right;
    padding: .75rem .55rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
th { color: var(--muted); font-size: .85rem; font-weight: 700; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-muted { background: #eef2f4; color: var(--muted); }
.badge-info { background: var(--teal-soft); color: var(--teal-deep); }

.alert {
    padding: .9rem 1.05rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: 600;
}
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error, .alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warn, .alert-warning { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--teal-soft); color: var(--teal-deep); }

.auth-wrap {
    min-height: calc(100vh - 100px);
    display: grid;
    place-items: center;
    padding: 2rem 0;
}
.auth-card {
    width: min(460px, 100%);
    background: rgba(255,255,255,.94);
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: var(--shadow);
    padding: 1.6rem;
}
.auth-card h1 { margin: 0 0 .45rem; font-size: 1.28rem; font-weight: 800; line-height: 1.55; text-align: center; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.15rem; }
.auth-card__logo {
    display: block;
    width: 112px;
    height: 112px;
    margin: 0 auto 1rem;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(14, 124, 134, .18);
}
.auth-card__org {
    text-align: center;
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.85;
    margin: 0 0 1.2rem;
}
.auth-pass-group { margin-bottom: 1.05rem; }
.auth-pass-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .3rem;
}
.auth-pass-head label { margin-bottom: 0; }
.auth-forgot {
    flex: 0 0 auto;
    color: var(--teal);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -.01em;
    border-radius: 8px;
}
.auth-forgot:hover,
.auth-forgot:focus-visible {
    color: var(--teal-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (max-width: 380px) {
    .auth-pass-head {
        flex-direction: column;
        align-items: flex-start;
        gap: .2rem;
    }
}
.auth-otp {
    letter-spacing: .42em;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    padding-inline: .4rem !important;
}
.forgot-card { width: min(560px, 100%); }
.forgot-form .join-grid { margin-bottom: .15rem; }

.qr-box {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #fff, var(--sand));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
    min-height: 200px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.qr-box canvas, .qr-box img { max-width: 100%; }
#qr-reader { width: 100%; max-width: 420px; margin: 0 auto; }

.list-search { margin-bottom: 1rem; }
.split {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1rem;
}
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.muted { color: var(--muted); }
.footer {
    padding: 1.3rem 0 2.1rem;
    color: var(--muted);
    text-align: center;
    font-size: .88rem;
}
.footer__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    flex-wrap: wrap;
}
.footer__logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
    background: var(--teal-soft);
    color: var(--teal-deep);
    border-radius: 999px;
    padding: .22rem .7rem;
    font-size: .8rem;
    font-weight: 700;
}

/* Youth home */
.youth-layout {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.score-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 1.5rem 1.55rem;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    align-items: center;
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(255,255,255,.18), transparent 50%),
        linear-gradient(125deg, #0a5c64 0%, #0e7c86 42%, #2f95a8 78%, #ef6f5e 140%);
    box-shadow: 0 22px 50px rgba(10, 92, 100, 0.28);
    animation: fade-up .5s ease both;
}
.score-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    left: -40px;
    bottom: -60px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.score-card .hello {
    font-size: .9rem;
    opacity: .8;
    margin-bottom: .2rem;
}
.score-card .name {
    margin: 0 0 .45rem;
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.02em;
}
.score-card .meta {
    opacity: .82;
    font-size: .92rem;
    margin-bottom: .9rem;
}
.score-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.score-tags span {
    padding: .28rem .7rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    font-size: .8rem;
    font-weight: 700;
}
.youth-level {
    margin-top: .75rem;
    padding: .7rem .9rem .75rem;
    border-radius: 16px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.28);
    text-align: right;
}
.youth-level span {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    opacity: .9;
    margin-bottom: .12rem;
}
.youth-level strong {
    display: block;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.youth-level.is-active { background: rgba(45, 138, 98, .28); border-color: rgba(180, 240, 210, .45); }
.youth-level.is-semi_active { background: rgba(196, 133, 26, .32); border-color: rgba(255, 220, 150, .4); }
.youth-level.is-inactive { background: rgba(255,255,255,.12); }
.score-points {
    position: relative;
    text-align: center;
    padding: 1.15rem 1rem;
    border-radius: 20px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(8px);
}
.score-points .label {
    font-size: .82rem;
    opacity: .85;
    font-weight: 700;
}
.score-points .num {
    display: block;
    font-size: clamp(2.6rem, 6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.04em;
    margin: .15rem 0 .35rem;
    text-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.score-points .level {
    display: inline-block;
    padding: .28rem .75rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    background: #fff;
    color: var(--teal-deep);
}
.score-points .level.is-active { color: var(--success); }
.score-points .level.is-semi_active { color: var(--warn); }
.score-points .level.is-inactive { color: var(--muted); }

.quick-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
@media (min-width: 900px) {
    .quick-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.quick-item {
    position: relative;
    display: flex;
    gap: .8rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 18px;
    padding: 1rem 1.05rem;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    animation: fade-up .55s ease both;
}
.quick-item:nth-child(2) { animation-delay: .05s; }
.quick-item:nth-child(3) { animation-delay: .1s; }
.quick-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.quick-ico {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}
.quick-item:nth-child(1) .quick-ico { background: linear-gradient(145deg, #1ea4b0, #0e7c86); }
.quick-item:nth-child(2) .quick-ico { background: linear-gradient(145deg, #f28576, #ef6f5e); }
.quick-item:nth-child(3) .quick-ico { background: linear-gradient(145deg, #3d9bb5, #2a7ea0); }
.quick-item .quick-text {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}
.quick-item strong {
    display: block;
    font-size: .98rem;
    font-weight: 800;
    color: var(--ink);
}
.quick-item .quick-text small {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    font-weight: 500;
}

.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.section-bar h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}
.section-bar .sub {
    margin: .15rem 0 0;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 500;
}
.rank-spotlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    margin: .55rem 0 .2rem;
    padding: .75rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7e6 0%, #ffe3a8 100%);
    border: 1px solid rgba(212, 154, 36, .38);
    box-shadow: 0 8px 18px rgba(194, 120, 10, .12);
}
.rank-spotlight span {
    font-weight: 800;
    color: #8a4b00;
    font-size: .95rem;
    line-height: 1.45;
}
.rank-spotlight b {
    flex: 0 0 auto;
    min-width: 2.2rem;
    text-align: center;
    font-size: 1.85rem;
    font-weight: 800;
    color: #c27800;
    line-height: 1;
    letter-spacing: -.03em;
}
.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .95rem;
    border-radius: 999px;
    background: linear-gradient(145deg, #fff7f5, var(--coral-soft));
    color: var(--coral-deep);
    font-weight: 800;
    font-size: .9rem;
    border: 1px solid rgba(239, 111, 94, 0.18);
    box-shadow: var(--shadow-soft);
}
.balance-chip i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #f28576, #ef6f5e);
    color: #fff;
    font-style: normal;
    font-size: .72rem;
    font-weight: 900;
}

/* Rewards list — richer */
.reward-list {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.reward-row {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(120deg, #fff 0%, #f7fbfd 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    animation: fade-up .45s ease both;
}
.reward-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(14, 124, 134, 0.28);
}
.reward-row.is-affordable {
    background: linear-gradient(120deg, #f4fcf7 0%, #fff 55%);
    border-color: rgba(45, 138, 98, 0.28);
}
.reward-row.is-locked { opacity: .92; }
.reward-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    background: linear-gradient(145deg, #1ea4b0, #0e7c86);
    box-shadow: 0 8px 18px rgba(14, 124, 134, 0.22);
}
.reward-row.is-affordable .reward-icon {
    background: linear-gradient(145deg, #45b88a, #2d8a62);
    box-shadow: 0 8px 18px rgba(45, 138, 98, 0.22);
}
.reward-row:nth-child(3n+2) .reward-icon {
    background: linear-gradient(145deg, #f28576, #ef6f5e);
    box-shadow: 0 8px 18px rgba(239, 111, 94, 0.2);
}
.reward-row:nth-child(3n) .reward-icon {
    background: linear-gradient(145deg, #5eb0c8, #3d9bb5);
}
.reward-body h3 {
    margin: 0 0 .15rem;
    font-size: 1.02rem;
    font-weight: 800;
}
.reward-body p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}
.reward-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .4rem;
}
.reward-meta span {
    font-size: .74rem;
    font-weight: 700;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: #eef4f7;
    color: var(--ink-soft);
}
.reward-meta .need-more {
    background: var(--coral-soft);
    color: var(--coral-deep);
}
.reward-progress {
    margin-top: .55rem;
    height: 6px;
    border-radius: 999px;
    background: #e5eef2;
    overflow: hidden;
}
.reward-progress > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1ea4b0, #0e7c86);
}
.reward-row.is-affordable .reward-progress > i {
    background: linear-gradient(90deg, #45b88a, #2d8a62);
}
.reward-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
    min-width: 118px;
}
.reward-cost {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--teal-deep);
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: .28rem;
}
.reward-cost small {
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
}

.rewards-top {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 1.4rem 1.45rem;
    margin-bottom: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background:
        radial-gradient(420px 180px at 100% 0%, rgba(255,255,255,.2), transparent 55%),
        linear-gradient(120deg, #0a5c64, #0e7c86 50%, #ef6f5e);
    box-shadow: 0 18px 42px rgba(10, 92, 100, 0.25);
    animation: fade-up .45s ease both;
}
.rewards-top h1 {
    margin: 0 0 .25rem;
    font-size: 1.55rem;
    font-weight: 800;
}
.rewards-top p {
    margin: 0;
    opacity: .88;
    font-size: .95rem;
    max-width: 28rem;
}
.rewards-top .balance-chip {
    background: rgba(255,255,255,.16);
    color: #fff;
    border-color: rgba(255,255,255,.25);
}
.rewards-top .balance-chip i {
    background: rgba(255,255,255,.25);
}

.home-qr {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 1.2rem;
    align-items: center;
}
.home-qr .qr-box { min-height: 170px; width: 190px; }
.home-qr h3 { margin: 0 0 .35rem; font-size: 1.08rem; font-weight: 800; }

.quest-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 18px;
    padding: 1.05rem 1.15rem;
    box-shadow: var(--shadow-soft);
    transition: transform .16s ease, box-shadow .16s ease;
}
.quest-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.quest-link strong {
    display: block;
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: .15rem;
}
.quest-link span { color: var(--muted); font-size: .88rem; }

@media (max-width: 800px) {
    .grid-2, .grid-3, .grid-4, .split { grid-template-columns: 1fr; }
    .quick-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .score-card { grid-template-columns: 1fr; }
    .brand-copy { display: none; }
    .reward-row { grid-template-columns: 52px 1fr; }
    .reward-side {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: 0;
    }
    .home-qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-link:active,
    .quick-item:hover,
    .reward-row:hover,
    .quest-link:hover,
    .mobile-nav {
        transform: none;
        animation: none;
    }
}

/* ——— Award page ——— */
.award-panel { max-width: 720px; margin: 0 auto; }
.award-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.award-step {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .7rem;
    border-radius: 12px;
    background: #f3f7f9;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}
.award-step span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dfe8ed;
    color: var(--ink-soft);
    font-size: .75rem;
}
.award-step.is-active {
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.award-step.is-active span {
    background: var(--teal);
    color: #fff;
}

.youth-autocomplete { position: relative; }
.youth-query-input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .85rem 1rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.youth-query-input:focus {
    outline: 2px solid rgba(14, 124, 134, .2);
    border-color: var(--teal);
}
.youth-suggest {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 6px);
    z-index: 40;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(21, 37, 48, .14);
    padding: .4rem;
    max-height: 280px;
    overflow-y: auto;
}
.youth-suggest__item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    text-align: right;
    border: 0;
    background: transparent;
    border-radius: 12px;
    padding: .75rem .85rem;
    cursor: pointer;
    font-family: inherit;
}
.youth-suggest__item:hover { background: var(--teal-soft); }
.youth-suggest__item strong { font-size: .98rem; color: var(--ink); }
.youth-suggest__item span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.youth-suggest__empty {
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}

.selected-youth {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin: .85rem 0 1rem;
    padding: .9rem 1rem;
    border-radius: 16px;
    background: linear-gradient(120deg, #e7f7f8, #fff);
    border: 1px solid rgba(14, 124, 134, .2);
}
.selected-youth.is-empty {
    background: #f5f8fa;
    border-style: dashed;
    justify-content: center;
}
.selected-youth__placeholder { color: var(--muted); font-weight: 700; }
.selected-youth__body {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}
.selected-youth__avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #1ea4b0, #0e7c86);
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.award-scan-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}
.qr-reader-wrap {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .8rem;
    background: #f8fbfd;
    margin-bottom: .5rem;
}
.scan-fallback {
    width: 100%;
    margin-top: .75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .7rem .85rem;
    font-family: inherit;
}

.reason-board {
    margin: 0 0 1.1rem;
    padding: .95rem .95rem 1.05rem;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(420px 160px at 100% 0%, rgba(14, 124, 134, .08), transparent 60%),
        linear-gradient(180deg, #f4fbfc, #fff 42%);
}
.reason-board legend {
    display: block;
    float: none;
    width: auto;
    padding: 0 .35rem;
    margin: 0 0 .85rem;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--ink);
}
.reason-lane + .reason-lane { margin-top: 1.05rem; }
.reason-lane__label {
    margin: 0 0 .5rem .15rem;
    font-size: .78rem;
    font-weight: 800;
    color: var(--muted);
}
.reason-picks { display: grid; gap: .55rem; }
.reason-pick { display: block; cursor: pointer; position: relative; }
.reason-pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.reason-pick__face {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: .75rem;
    align-items: center;
    min-height: 68px;
    padding: .7rem .8rem;
    background: #fff;
    border: 1px solid #e3eef2;
    border-radius: 16px;
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
    transition:
        border-color var(--motion-fast) var(--ease-out),
        background var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out),
        transform var(--motion-fast) var(--ease-out);
}
.reason-pick__ico {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--teal-soft);
    color: var(--teal-deep);
    flex: 0 0 auto;
}
.reason-pick__ico svg { width: 21px; height: 21px; }
.reason-pick.is-negative .reason-pick__ico {
    background: var(--danger-soft);
    color: var(--danger);
}
.reason-pick.is-manual .reason-pick__ico {
    background: var(--warn-soft);
    color: #9a6a10;
}
.reason-pick__txt { min-width: 0; display: grid; gap: .12rem; }
.reason-pick__txt strong {
    font-size: .98rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.35;
}
.reason-pick__txt span {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
}
.reason-pick__pts {
    font-style: normal;
    font-weight: 800;
    font-size: .88rem;
    padding: .28rem .62rem;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal-deep);
    white-space: nowrap;
}
.reason-pick.is-negative .reason-pick__pts {
    background: var(--danger-soft);
    color: var(--danger);
}
.reason-pick.is-manual .reason-pick__pts {
    background: var(--warn-soft);
    color: #9a6a10;
}
.reason-pick__tick {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d5e2e8;
    color: transparent;
    display: grid;
    place-items: center;
    transition: .2s ease;
}
.reason-pick__tick svg { width: 12px; height: 12px; }
.reason-pick:hover .reason-pick__face {
    border-color: rgba(14, 124, 134, .28);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(21, 37, 48, .06);
}
.reason-pick.is-negative:hover .reason-pick__face { border-color: rgba(194, 66, 58, .28); }
.reason-pick.is-manual:hover .reason-pick__face { border-color: rgba(196, 133, 26, .3); }
.reason-pick input:focus-visible + .reason-pick__face {
    outline: 2px solid rgba(14, 124, 134, .35);
    outline-offset: 2px;
}
.reason-pick input:checked + .reason-pick__face {
    border-color: var(--teal);
    background: #eef8f9;
    box-shadow: 0 0 0 4px rgba(14, 124, 134, .12);
    transform: none;
}
.reason-pick.is-negative input:checked + .reason-pick__face {
    border-color: var(--coral);
    background: #fff3f0;
    box-shadow: 0 0 0 4px rgba(239, 111, 94, .14);
}
.reason-pick.is-manual input:checked + .reason-pick__face {
    border-color: #d4a017;
    background: #fff8ea;
    box-shadow: 0 0 0 4px rgba(212, 160, 23, .16);
}
.reason-pick input:checked + .reason-pick__face .reason-pick__tick {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}
.reason-pick.is-negative input:checked + .reason-pick__face .reason-pick__tick {
    background: var(--coral);
    border-color: var(--coral);
}
.reason-pick.is-manual input:checked + .reason-pick__face .reason-pick__tick {
    background: #d4a017;
    border-color: #d4a017;
}
.reason-pick input:checked + .reason-pick__face .reason-pick__ico {
    background: var(--teal);
    color: #fff;
}
.reason-pick.is-negative input:checked + .reason-pick__face .reason-pick__ico {
    background: var(--coral);
    color: #fff;
}
.reason-pick.is-manual input:checked + .reason-pick__face .reason-pick__ico {
    background: #d4a017;
    color: #fff;
}
.award-submit {
    margin-top: 1.2rem;
    min-height: 52px;
    font-size: 1.05rem;
}

/* ——— Youth cards ——— */
.youth-toolbar {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}
.youth-toolbar .list-search {
    flex: 1;
    min-width: 200px;
    margin: 0;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .7rem 1rem;
    font-family: inherit;
    font-weight: 700;
    background: #fff;
}
.youth-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.youth-card {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    animation: fade-up .45s ease both;
}
.youth-card__top { display: grid; gap: .8rem; }
.youth-card__identity {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}
.youth-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #f28576, #ef6f5e);
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.youth-card h3 {
    margin: 0 0 .15rem;
    font-size: 1.08rem;
    font-weight: 800;
}
.youth-card__code {
    font-size: .85rem;
    font-weight: 800;
    color: var(--teal-deep);
}
.youth-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
}
.youth-card__points {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.youth-card__points span { font-size: .75rem; font-weight: 700; }
.youth-card__points strong { font-size: 1.1rem; }
.youth-card__qr {
    display: grid;
    place-items: center;
    padding: .4rem 0;
}
.youth-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.youth-card__level {
    border-top: 1px solid var(--line);
    padding-top: .7rem;
}
.youth-card__level summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: .5rem;
}
.youth-level-form {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

/* ——— Fancy QR ——— */
.fancy-qr { width: 100%; display: grid; place-items: center; }
.fancy-qr__card {
    width: min(100%, 280px);
    display: grid;
    gap: .65rem;
    justify-items: center;
}
.fancy-qr__frame {
    position: relative;
    padding: 14px;
    border-radius: 22px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #0e7c86, #3d9bb5, #ef6f5e, #0e7c86) border-box;
    border: 3px solid transparent;
    box-shadow: 0 14px 30px rgba(10, 92, 100, .18);
}
.fancy-qr__canvas-host canvas,
.fancy-qr__canvas-host img {
    display: block;
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}
.fancy-qr__corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid #ef6f5e;
}
.fancy-qr__corner--tl { top: 8px; right: 8px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.fancy-qr__corner--tr { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.fancy-qr__corner--bl { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.fancy-qr__corner--br { bottom: 8px; left: 8px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.fancy-qr__meta {
    text-align: center;
    display: grid;
    gap: .15rem;
}
.fancy-qr__meta strong {
    font-size: .95rem;
    color: var(--ink);
}
.fancy-qr__meta span {
    font-size: .8rem;
    color: var(--muted);
    font-weight: 700;
}

.qr-dialog {
    border: 0;
    border-radius: 22px;
    padding: 0;
    max-width: 360px;
    width: calc(100% - 2rem);
    box-shadow: var(--shadow);
    background: #fff;
}
.qr-dialog::backdrop { background: rgba(15, 30, 40, .45); }
.qr-dialog__inner { padding: 1.2rem; display: grid; gap: 1rem; justify-items: center; }

@media (max-width: 700px) {
    .award-steps { grid-template-columns: 1fr; }
    .reason-pick__face {
        grid-template-columns: auto 1fr auto;
        min-height: 62px;
        padding: .65rem .7rem;
        gap: .55rem;
    }
    .reason-pick__tick { display: none; }
    .reason-pick__ico { width: 40px; height: 40px; border-radius: 12px; }
}

/* Toast */
.toast-host {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 76px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    width: min(420px, calc(100% - 1.5rem));
    display: grid;
    gap: .55rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: #1c2b36;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 36px rgba(15, 30, 40, .28);
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity var(--motion-med) var(--ease-out),
        transform var(--motion-med) var(--ease-out);
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast.is-out { opacity: 0; transform: translateY(-8px); }
.toast--success { background: #1f6b4a; }
.toast--error, .toast--danger { background: #a33b3b; }
.toast--warn, .toast--warning { background: #9a6b14; }
.toast--info { background: #0e7c86; }
.toast button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    opacity: .85;
}

/* Youth mini list */
.youth-mini-list { display: grid; gap: .65rem; }
.youth-mini {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .85rem 1rem;
    box-shadow: var(--shadow-soft);
}
.youth-mini__row {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
}
.youth-mini__main strong { display: block; font-size: 1rem; }
.youth-mini__meta { font-size: .82rem; color: var(--muted); font-weight: 600; }
.youth-mini__side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.youth-mini__pts { font-weight: 800; color: var(--teal-deep); }
.youth-mini__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.youth-mini__panel {
    margin-top: .8rem;
    padding-top: .8rem;
    border-top: 1px solid var(--line);
}
.youth-mini__panel-actions { margin-top: .7rem; display: flex; justify-content: center; }

/* Minimal QR sheet */
.fancy-qr--minimal { width: 100%; }
.qr-sheet {
    width: min(100%, 260px);
    margin: 0 auto;
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.qr-sheet__name { font-weight: 800; font-size: 1.05rem; margin-bottom: .15rem; }
.qr-sheet__code { font-weight: 800; color: var(--teal); font-size: .9rem; margin-bottom: .75rem; letter-spacing: .03em; }
.qr-sheet__frame {
    display: inline-block;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e5eef2;
    background: #fafcfd;
}
.qr-sheet__host canvas { display: block; border-radius: 6px; max-width: 100%; height: auto; }
.qr-sheet__brand { margin-top: .7rem; font-size: .75rem; color: var(--muted); font-weight: 700; }

/* Shop / rewards */
.shop-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1.2rem 1.3rem;
    border-radius: 20px;
    background: linear-gradient(120deg, #0a5c64, #0e7c86 60%, #ef6f5e);
    color: #fff;
    box-shadow: var(--shadow);
}
.shop-hero h1 { margin: 0 0 .2rem; font-size: 1.45rem; }
.shop-hero p { margin: 0; opacity: .9; }
.shop-balance {
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 14px;
    padding: .7rem 1rem;
    text-align: center;
}
.shop-balance span { display: block; font-size: .8rem; opacity: .85; }
.shop-balance strong { font-size: 1.5rem; }
.shop-list { display: grid; gap: .65rem; }
.shop-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}
.shop-item.is-ready { border-color: rgba(45, 138, 98, .3); background: #f5fcf8; }
.shop-item h3 { margin: 0 0 .2rem; font-size: 1.02rem; }
.shop-item p { margin: 0; color: var(--muted); font-size: .88rem; }
.shop-item__meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.shop-item__meta span {
    font-size: .75rem; font-weight: 700; padding: .15rem .5rem;
    border-radius: 999px; background: #eef4f7; color: var(--ink-soft);
}
.shop-item__meta .need { background: var(--coral-soft); color: var(--coral-deep); }
.shop-item__side { text-align: left; display: grid; gap: .45rem; justify-items: end; }
.shop-item__cost { font-size: 1.25rem; font-weight: 800; color: var(--teal-deep); }
.shop-item__cost small { font-size: .72rem; color: var(--muted); }

.receipt-mini-list { display: grid; gap: .5rem; }
.receipt-mini {
    display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center;
    padding: .75rem .9rem; border-radius: 12px; background: #f7fbfd;
    text-decoration: none; color: inherit; border: 1px solid var(--line);
}
.receipt-page { display: grid; place-items: center; padding: .5rem 0 2rem; }
.receipt-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.receipt-card__head { font-weight: 800; color: var(--teal); margin-bottom: .5rem; }
.receipt-card h1 { margin: 0 0 .4rem; font-size: 1.4rem; }
.receipt-card__code {
    margin: 1rem 0;
    padding: .8rem;
    border-radius: 12px;
    background: #f3f8fa;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--teal-deep);
}
.receipt-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
    text-align: right;
    margin: 1rem 0;
}
.receipt-card__grid span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.receipt-card__grid strong { font-size: .95rem; }
.receipt-card__hint { color: var(--muted); font-weight: 600; font-size: .9rem; }
@media print {
    .topbar, .footer, .toast-host, .receipt-card .actions { display: none !important; }
    .receipt-card { box-shadow: none; border: 0; }
}

.reward-create__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem 1rem;
    align-items: end;
}
.reward-create__form .btn { grid-column: 1 / -1; justify-self: start; }
.admin-reward-list, .admin-redeem-list { display: grid; gap: .55rem; }
.admin-reward-row, .admin-redeem-row {
    display: flex; justify-content: space-between; gap: .8rem; align-items: center;
    padding: .85rem 1rem; border-radius: 14px; background: #f7fbfd; border: 1px solid var(--line);
}
.admin-reward-row__stats, .admin-redeem-row__side {
    display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end;
}
.admin-redeem-code { font-weight: 800; color: var(--teal-deep); letter-spacing: .04em; margin-top: .2rem; }

/* Attendance */
.att-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1rem; }
.att-session-list { display: grid; gap: .45rem; }
.att-session-item {
    display: flex; justify-content: space-between; align-items: center; gap: .75rem;
    padding: .8rem .9rem; border-radius: 12px; text-decoration: none; color: inherit;
    background: #f7fbfd; border: 1px solid transparent;
}
.att-session-item:hover { border-color: rgba(14,124,134,.25); background: #fff; }
.att-session-item__count { font-weight: 800; color: var(--teal-deep); }
.att-pending {
    display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start;
    padding: .8rem 0; border-bottom: 1px solid var(--line);
}
.att-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.att-people { display: grid; gap: .55rem; }
.att-person {
    display: flex; justify-content: space-between; gap: .75rem; align-items: center;
    padding: .75rem .85rem; border-radius: 14px; background: #f7fbfd; border: 1px solid var(--line);
}
.att-person__info { display: grid; gap: .1rem; }
.att-person__status { display: flex; flex-wrap: wrap; gap: .35rem; }
.att-chip {
    min-height: 36px; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line);
    background: #fff; font-weight: 700; font-size: .82rem; cursor: pointer;
}
.att-chip input { position: absolute; opacity: 0; pointer-events: none; }
.att-chip.is-on { background: var(--teal); color: #fff; border-color: transparent; }

/* Points timeline */
.tx-timeline { display: grid; gap: 0; }
.tx-item { display: grid; grid-template-columns: 18px 1fr; gap: .75rem; padding: .55rem 0; }
.tx-item__dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--teal);
    margin-top: .45rem; box-shadow: 0 0 0 4px rgba(14,124,134,.12);
}
.tx-item__top { display: flex; justify-content: space-between; gap: .5rem; }
.tx-item__points { font-weight: 800; color: var(--success); }
.tx-item__meta { font-size: .82rem; color: var(--muted); font-weight: 600; }
.claim-box summary { cursor: pointer; font-weight: 800; color: var(--teal-deep); }

.scan-page { max-width: 520px; margin: 0 auto; }
.scan-page__reader { min-height: 280px; }

/* Admin home */
.admin-home__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.admin-home__head h1 { margin: 0 0 .2rem; font-size: 1.55rem; font-weight: 800; }
.admin-home__head p { margin: 0; color: var(--muted); }
.admin-home__quick { display: flex; flex-wrap: wrap; gap: .45rem; }
.admin-kpi {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .6rem;
    margin-bottom: 1rem;
}
.admin-kpi__item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .85rem .9rem;
    box-shadow: var(--shadow-soft);
}
.admin-kpi__item span {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: .2rem;
}
.admin-kpi__item strong {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--teal-deep);
}
.admin-home__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.level-bars { display: grid; gap: .75rem; }
.level-bar__label {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: .3rem;
}
.level-bar__track {
    height: 8px;
    border-radius: 999px;
    background: #e8eef2;
    overflow: hidden;
}
.level-bar__track i {
    display: block;
    height: 100%;
    border-radius: inherit;
}
.level-bar__track i.is-active { background: #2d8a62; }
.level-bar__track i.is-semi { background: #c4851a; }
.level-bar__track i.is-inactive { background: #8a9aa6; }
.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 1rem;
}
.admin-links a {
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.home-feed { display: grid; gap: .75rem; }
.home-feed__item {
    display: flex;
    justify-content: space-between;
    gap: .85rem;
    align-items: center;
    padding: .9rem 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}
.home-feed__item strong { display: block; font-size: .92rem; }
.home-feed__item .muted { font-size: .78rem; }
.home-feed__pts { font-weight: 800; color: var(--teal-deep); white-space: nowrap; }
.admin-shortcut {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.admin-shortcut a {
    text-decoration: none;
    font-weight: 700;
    padding: .55rem .85rem;
    border-radius: 12px;
    background: #f3f8fa;
    border: 1px solid var(--line);
    color: var(--ink);
}
.admin-shortcut a:hover { border-color: rgba(14,124,134,.35); background: var(--teal-soft); }

/* Admin hub */
.admin-hub__hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}
.admin-hub__hero h1 { margin: 0 0 .25rem; font-size: 1.6rem; font-weight: 800; }
.admin-hub__hero p { margin: 0; color: var(--muted); }
.admin-hub__stats {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.admin-hub__stats div {
    min-width: 78px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .55rem .75rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
}
.admin-hub__stats span {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
}
.admin-hub__stats b {
    font-size: 1.2rem;
    color: var(--teal-deep);
}
.admin-hub {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.admin-hub__card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .75rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem 1.05rem;
    box-shadow: var(--shadow-soft);
    transition:
        transform var(--motion-med) var(--ease-out),
        border-color var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out);
}
.admin-hub__card:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 124, 134, .3);
    box-shadow: 0 12px 28px rgba(21, 37, 48, .1);
}
.admin-hub__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}
.admin-hub__icon svg { width: 22px; height: 22px; }
.admin-hub__body { min-width: 0; display: grid; gap: .15rem; }
.admin-hub__body strong { font-size: 1rem; font-weight: 800; }
.admin-hub__body small {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.45;
}
.admin-hub__body em {
    font-style: normal;
    font-size: .75rem;
    font-weight: 800;
    color: var(--teal-deep);
}
.admin-hub__arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f3f8fa;
    color: var(--muted);
}
.admin-hub__arrow svg { width: 14px; height: 14px; }
.admin-hub__card.tone-teal .admin-hub__icon { background: var(--teal-soft); color: var(--teal-deep); }
.admin-hub__card.tone-coral .admin-hub__icon { background: var(--coral-soft); color: var(--coral-deep); }
.admin-hub__card.tone-sky .admin-hub__icon { background: #e7f4fa; color: #2a7a96; }
.admin-hub__card.tone-gold .admin-hub__icon { background: var(--warn-soft); color: #9a6a10; }
.admin-hub__card.tone-muted .admin-hub__icon { background: #eef2f4; color: var(--muted); }

.inline-form { display: inline; margin: 0; }

@media (max-width: 980px) {
    .admin-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .admin-hub { grid-template-columns: 1fr; }
}

/* Shared directory lists (youth + mentors) */
.dlist-page { animation: fade-up .4s ease both; }
.dlist-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .9rem;
}
.dlist-head h1 {
    margin: 0 0 .2rem;
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.02em;
}
.dlist-head p { margin: 0; color: var(--muted); font-weight: 600; }
.dlist-head__side {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.dlist-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .25rem .8rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: .82rem;
    font-weight: 800;
    color: var(--teal-deep);
    box-shadow: var(--shadow-soft);
}

.dlist-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
    margin-bottom: .85rem;
    padding: .65rem;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 20;
}
.dlist-toolbar:has(.nice-select.is-open),
.dlist-toolbar:focus-within {
    z-index: 40;
}
.dlist-toolbar__search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
    z-index: 0;
}
.dlist-toolbar__search svg {
    position: absolute;
    right: .75rem;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.dlist-toolbar__search input {
    min-height: 42px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .45rem .8rem;
    padding-inline-start: 2.2rem;
    font-family: inherit;
    font-weight: 600;
    background: #fff;
    color: var(--ink);
}
.dlist-toolbar .nice-select {
    align-self: stretch;
    z-index: 1;
}
.dlist-toolbar .nice-select.is-open {
    z-index: 50;
}

.dlist-add {
    margin-bottom: .85rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.dlist-add > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1.05rem;
    font-weight: 800;
    user-select: none;
}
.dlist-add > summary::-webkit-details-marker { display: none; }
.dlist-add > summary em {
    font-style: normal;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.dlist-add[open] > summary { border-bottom: 1px solid var(--line); }
.dlist-add__form { padding: 1rem 1.05rem 1.1rem; }
.dlist-add__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
    margin-bottom: .85rem;
}
.dlist-edit__check {
    display: flex;
    align-items: flex-end;
    padding-bottom: .55rem;
}
.dlist-edit__check label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
}
.dlist-edit {
    width: 100%;
}

.dlist {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 1;
}
.dlist__cols {
    display: grid;
    gap: .65rem;
    align-items: center;
    padding: .7rem 1rem;
    background: linear-gradient(180deg, #f4f8fa, #eef4f7);
    border-bottom: 1px solid var(--line);
    font-size: .75rem;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .02em;
}
.dlist__cols--youth {
    grid-template-columns:
        minmax(200px, 1.7fr)
        minmax(88px, .7fr)
        minmax(110px, .9fr)
        minmax(100px, .75fr)
        minmax(96px, .7fr)
        196px;
}
.dlist__cols--staff {
    grid-template-columns:
        minmax(200px, 1.7fr)
        minmax(110px, .8fr)
        minmax(120px, .8fr)
        minmax(96px, .7fr)
        88px;
}
.dlist__row {
    display: grid;
    gap: .65rem;
    align-items: center;
    padding: .8rem 1rem;
    border-bottom: 1px solid #edf2f5;
    position: relative;
    transition:
        background var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out);
    animation: fade-up .45s var(--ease-out) both;
}
.dlist__row:nth-child(2) { animation-delay: .02s; }
.dlist__row:nth-child(3) { animation-delay: .04s; }
.dlist__row:nth-child(4) { animation-delay: .06s; }
.dlist__row:nth-child(5) { animation-delay: .08s; }
.dlist__row:nth-child(6) { animation-delay: .1s; }
.dlist__row:nth-child(7) { animation-delay: .12s; }
.dlist__row:nth-child(8) { animation-delay: .14s; }
.dlist__row:nth-child(9) { animation-delay: .16s; }
.dlist__row:nth-child(10) { animation-delay: .18s; }
.dlist__row:nth-child(n+11) { animation-delay: .2s; }
.dlist__row::before {
    content: "";
    position: absolute;
    inset-block: 10px;
    right: 0;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    transition: background var(--motion-fast) var(--ease-out), height var(--motion-med) var(--ease-out);
}
.dlist__row.is-active::before { background: var(--success); }
.dlist__row.is-semi::before { background: var(--warn); }
.dlist__row.is-inactive::before { background: #b7c4cc; }
.dlist__row:last-child { border-bottom: 0; }
.dlist__row:hover { background: #f8fbfd; }
.dlist__row.has-open-drawer { background: #f3fafb; }
.dlist__empty {
    padding: 2.4rem 1rem;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
}

.dlist__person {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}
.dlist__avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-weight: 800;
    font-size: .84rem;
    border: 1px solid transparent;
}
.dlist__avatar.tone-a {
    background: linear-gradient(145deg, #dff4f6, #cfeaf3);
    color: var(--teal-deep);
    border-color: rgba(14, 124, 134, .12);
}
.dlist__avatar.tone-b {
    background: linear-gradient(145deg, #ffe8e4, #ffd8d0);
    color: var(--coral-deep);
    border-color: rgba(239, 111, 94, .15);
}
.dlist__avatar.tone-c {
    background: linear-gradient(145deg, #fff4df, #ffe8b8);
    color: #9a6a10;
    border-color: rgba(196, 133, 26, .16);
}
.dlist__name {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.dlist__name strong {
    font-size: .96rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.3;
}
.dlist__sub {
    display: block;
    margin-top: .12rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
}
.dlist__chip {
    display: inline-flex;
    padding: .08rem .45rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    background: #eef2f4;
    color: var(--muted);
}
.dlist__pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .15rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}
.dlist__pill--violet { background: #ebe4fb; color: #5b3fa0; }
.dlist__pill--teal { background: var(--teal-soft); color: var(--teal-deep); }
.dlist__plain { font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.dlist__score {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
}
.dlist__score b {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--teal-deep);
}
.dlist__score small {
    font-size: .7rem;
    font-weight: 700;
    color: var(--muted);
}
.dlist__status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 28px;
    padding: .15rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}
.dlist__status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.dlist__status.is-active { background: var(--success-soft); color: var(--success); }
.dlist__status.is-semi { background: var(--warn-soft); color: var(--warn); }
.dlist__status.is-inactive { background: #eef2f4; color: var(--muted); }

.dlist__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .3rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.dlist__act {
    --act-bg: #f4f8fa;
    --act-fg: var(--ink-soft);
    --act-border: #d8e4ea;
    --act-hover: #fff;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 11px;
    border: 1px solid var(--act-border);
    background: var(--act-bg);
    color: var(--act-fg);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
    transition:
        transform var(--motion-fast) var(--ease-out),
        background var(--motion-fast) var(--ease-out),
        border-color var(--motion-fast) var(--ease-out),
        color var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out);
}
.dlist__act svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    display: block;
}
.dlist__act span { display: none; }
.dlist__act:hover {
    background: var(--act-hover);
    border-color: rgba(14, 124, 134, .28);
    color: var(--teal-deep);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(21, 37, 48, .08);
}
.dlist__act:active { transform: translateY(0) scale(.97); }
.dlist__act:focus-visible {
    outline: 2px solid rgba(14, 124, 134, .4);
    outline-offset: 2px;
}
.dlist__act.is-active {
    background: var(--teal-soft);
    border-color: rgba(14, 124, 134, .35);
    color: var(--teal-deep);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, .12);
}
.dlist__act--points {
    --act-bg: linear-gradient(145deg, #19a0ab, #0e7c86);
    --act-fg: #fff;
    --act-border: transparent;
    --act-hover: linear-gradient(145deg, #1aafbb, #10909b);
    background: var(--act-bg);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(14, 124, 134, .22);
}
.dlist__act--points:hover {
    background: var(--act-hover);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(14, 124, 134, .28);
}
.dlist__act--card {
    --act-bg: #e8f6f2;
    --act-fg: #1c6b58;
    --act-border: rgba(45, 138, 98, .2);
    --act-hover: #dff3ed;
}
.dlist__act--edit {
    --act-bg: #eef6f8;
    --act-fg: var(--teal-deep);
    --act-border: rgba(14, 124, 134, .16);
}
.dlist__act--qr {
    --act-bg: #f3eefb;
    --act-fg: #5b3fa0;
    --act-border: rgba(91, 63, 160, .16);
    --act-hover: #ebe4fb;
}
.dlist__act--qr.is-active {
    background: #ebe4fb;
    border-color: rgba(91, 63, 160, .35);
    color: #5b3fa0;
    box-shadow: 0 0 0 3px rgba(91, 63, 160, .12);
}
.dlist__act--level {
    --act-bg: #fff6e8;
    --act-fg: #9a6a10;
    --act-border: rgba(196, 133, 26, .2);
    --act-hover: #fff0d6;
}
.dlist__act--level.is-active {
    background: #fff0d6;
    border-color: rgba(196, 133, 26, .4);
    color: #9a6a10;
    box-shadow: 0 0 0 3px rgba(196, 133, 26, .12);
}
.dlist__act--mentors {
    --act-bg: var(--coral-soft);
    --act-fg: var(--coral-deep);
    --act-border: rgba(239, 111, 94, .2);
    --act-hover: #ffddd6;
}
.dlist__act--mentors.is-active {
    background: #ffddd6;
    border-color: rgba(239, 111, 94, .4);
    color: var(--coral-deep);
    box-shadow: 0 0 0 3px rgba(239, 111, 94, .12);
}
.dlist__act--warn {
    --act-bg: #fff4df;
    --act-fg: #9a6a10;
    --act-border: rgba(196, 133, 26, .22);
}
.dlist__act--ok {
    --act-bg: var(--success-soft);
    --act-fg: var(--success);
    --act-border: rgba(45, 138, 98, .2);
}

.dlist__drawer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
    transition:
        grid-template-rows var(--motion-med) var(--ease-out),
        opacity var(--motion-fast) var(--ease-out),
        margin-top var(--motion-med) var(--ease-out);
}
.dlist__drawer.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: .35rem;
    pointer-events: auto;
}
.dlist__drawer-body {
    overflow: hidden;
    min-height: 0;
}
.dlist__drawer-inner {
    padding: .85rem .95rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fcfd, #f2f8fa);
    border: 1px solid rgba(14, 124, 134, .16);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .55rem .75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    transform-origin: top center;
}
.dlist__drawer.is-open .dlist__drawer-inner {
    animation: drawer-in var(--motion-med) var(--ease-out) both;
}
.dlist__drawer[hidden] { display: none !important; }

.mentor-assign-form { width: 100%; max-width: 640px; }
.mentor-assign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .45rem;
    margin-bottom: .7rem;
}
.mentor-assign-item {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-height: 38px;
    padding: .35rem .65rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 700;
    font-size: .86rem;
    cursor: pointer;
}
.mentor-assign-item:has(input:checked) {
    border-color: rgba(14, 124, 134, .35);
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.dlist__drawer .youth-level-form {
    width: 100%;
    max-width: 520px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.dlist__drawer [data-fancy-qr],
.dlist__drawer .fancy-qr,
.dlist__drawer .fancy-qr__card {
    width: auto;
    max-width: 160px;
}
.dlist__drawer .fancy-qr__frame { padding: 10px; border-radius: 16px; }

@media (max-width: 980px) {
    .admin-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-home__grid { grid-template-columns: 1fr; }
    .dlist__cols { display: none; }
    .dlist__row {
        grid-template-columns: 1fr auto;
        gap: .55rem .6rem;
    }
    .dlist__person { grid-column: 1; }
    .dlist__actions {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
    }
    .dlist__cell {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        padding: .35rem .55rem;
        border-radius: 10px;
        background: #f7fbfd;
    }
    .dlist__cell::before {
        content: attr(data-label);
        font-size: .75rem;
        font-weight: 800;
        color: var(--muted);
    }
    .dlist__drawer { grid-column: 1 / -1; }
    .dlist-add__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .admin-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dlist-add__grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
    .att-layout { grid-template-columns: 1fr; }
    .att-person { flex-direction: column; align-items: stretch; }
    .reward-create__form { grid-template-columns: 1fr; }
    .shop-item { flex-direction: column; align-items: stretch; }
    .shop-item__side { justify-items: stretch; text-align: right; }
    .admin-reward-row, .admin-redeem-row { flex-direction: column; align-items: stretch; }
}

/* —— ثبت‌نام جدیدالورود (step wizard) —— */
.auth-register-link { margin-top: .85rem; }
.join-wrap {
    min-height: calc(100vh - 110px);
    display: grid;
    place-items: center;
    padding: 1.25rem 1rem 2.5rem;
}
.join-card {
    width: min(720px, 100%);
    background: var(--surface);
    border: 1px solid rgba(210, 224, 231, .9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1.25rem 1.35rem 1.1rem;
    animation: fade-up .45s ease both;
}
.join-card--closed,
.join-card--done {
    text-align: center;
    padding: 2rem 1.5rem;
}
.join-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto .9rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.join-card__icon svg { width: 30px; height: 30px; }
.join-card__icon--ok { background: var(--success-soft); color: var(--success); }
.join-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.join-card__brand {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}
.join-card__mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(145deg, var(--teal), var(--sky));
    color: #fff;
    box-shadow: 0 8px 18px rgba(14, 124, 134, .25);
}
.join-card__mark svg { width: 24px; height: 24px; }
.join-card__logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    flex: 0 0 auto;
    display: block;
    box-shadow: 0 8px 18px rgba(14, 124, 134, .22);
}
.join-card__brand h1 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.35;
}
.join-card__brand p {
    margin: .25rem 0 0;
    color: var(--muted);
    font-size: .9rem;
}
.join-card__close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 1.4rem;
    line-height: 1;
    background: #f7fbfd;
}
.join-card__close:hover { background: var(--coral-soft); color: var(--coral-deep); }

.join-steps {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: .85rem .5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .35rem;
    position: relative;
    background: linear-gradient(180deg, #f4fafb, #fff);
    border: 1px solid var(--line);
    border-radius: 16px;
}
.join-steps::before {
    content: "";
    position: absolute;
    top: 28px;
    right: 12%;
    left: 12%;
    height: 2px;
    background: var(--line);
    z-index: 0;
}
.join-steps li {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    text-align: center;
}
.join-steps span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .92rem;
    background: #e7eef2;
    color: var(--muted);
    border: 2px solid #e7eef2;
    transition: .25s ease;
}
.join-steps em {
    font-style: normal;
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
}
.join-steps li.is-active span,
.join-steps li.is-done span {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    box-shadow: 0 6px 14px rgba(14, 124, 134, .28);
}
.join-steps li.is-active em { color: var(--teal-deep); }
.join-steps li.is-done span { background: var(--sky); border-color: var(--sky); }

.join-pane h2 { margin: 0 0 .2rem; font-size: 1.1rem; }
.join-pane__desc { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.join-pane[hidden] { display: none !important; }
.join-pane.is-active { animation: fade-up .35s ease both; }

.join-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1rem;
}
.join-grid__full { grid-column: 1 / -1; }
.join-form .form-group { margin-bottom: 0; }
.join-form input,
.join-form select,
.join-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .7rem .85rem;
    background: #f7fbfd;
    font: inherit;
    color: var(--ink);
}
.join-form input:focus,
.join-form select:focus,
.join-form textarea:focus {
    outline: none;
    border-color: rgba(14, 124, 134, .45);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, .12);
    background: #fff;
}

.join-summary {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: var(--sand);
    border: 1px solid rgba(212, 160, 23, .2);
}
.join-summary strong { display: block; margin-bottom: .45rem; }
.join-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.join-summary li {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .9rem;
}
.join-summary span { color: var(--muted); }
.join-summary b { font-weight: 800; }

.join-footer {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}
.join-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.reg-toggle { margin-bottom: 1rem; }
.reg-toggle__form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.reg-switch {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 800;
    cursor: pointer;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal-deep);
}
.reg-switch input { width: 1.1rem; height: 1.1rem; accent-color: var(--teal); }
.reg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 1rem;
}
.reg-tabs__item {
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 700;
    font-size: .88rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
}
.reg-tabs__item.is-active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}
.reg-cols {
    grid-template-columns: minmax(160px, 1.4fr) .8fr .9fr .8fr auto;
}
.reg-approve { position: relative; display: inline-block; }
.reg-approve > summary {
    list-style: none;
    cursor: pointer;
}
.reg-approve > summary::-webkit-details-marker { display: none; }
.reg-approve__panel {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 5;
    width: min(280px, 80vw);
    padding: .75rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}
.mentor-assign-list {
    display: grid;
    gap: .35rem;
    max-height: 180px;
    overflow: auto;
}

@media (max-width: 700px) {
    .join-grid { grid-template-columns: 1fr; }
    .join-steps em { font-size: .72rem; }
    .reg-cols { grid-template-columns: 1fr auto; }
}

/* —— Motion polish (project-wide) —— */
.stat,
.admin-hub__card,
.shop-item,
.score-card,
.att-card,
.dlist-add,
.dlist-toolbar {
    transition:
        transform var(--motion-med) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out),
        border-color var(--motion-fast) var(--ease-out),
        background var(--motion-fast) var(--ease-out);
}
.admin-hub__card:hover,
.shop-item:hover {
    transform: translateY(-3px);
}
.dlist-add > summary,
.reg-tabs__item,
.user-chip,
.mobile-nav-link {
    transition:
        background var(--motion-fast) var(--ease-out),
        color var(--motion-fast) var(--ease-out),
        border-color var(--motion-fast) var(--ease-out),
        transform var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out);
}
.mentor-assign-item {
    transition:
        background var(--motion-fast) var(--ease-out),
        border-color var(--motion-fast) var(--ease-out),
        color var(--motion-fast) var(--ease-out),
        transform var(--motion-fast) var(--ease-out);
}
.mentor-assign-item:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .app-bg::before,
    .app-bg::after { animation: none !important; }
}

.page-back { margin: 0 0 .8rem; }
.page-back a { color: var(--teal-deep); font-weight: 700; text-decoration: none; }
.admin-kpi a.admin-kpi__item { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.admin-kpi a.admin-kpi__item:hover { transform: translateY(-2px); }
.user-pill__photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.file-drop { display: grid; gap: .4rem; }
.file-drop__label { font-weight: 700; font-size: .92rem; }
.file-drop__box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1.5px dashed var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #f7fbfd, #fff);
    cursor: pointer;
    overflow: hidden;
    transition:
        border-color var(--motion-fast) var(--ease-out),
        background var(--motion-fast) var(--ease-out),
        box-shadow var(--motion-med) var(--ease-out);
}
.file-drop__box:hover,
.file-drop__box:focus-within {
    border-color: var(--teal);
    background: var(--teal-soft);
    box-shadow: 0 8px 18px rgba(14, 124, 134, .08);
}
.file-drop__box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    font-size: 0;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}
.file-drop__preview {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    overflow: hidden;
    background: #e8f3f5;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.45;
    border: 1px solid var(--line);
}
.file-drop__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-drop__ph { padding: .35rem; }
.file-drop__meta { display: flex; flex-direction: column; gap: .2rem; }
.file-drop__meta strong { color: var(--teal-deep); font-size: .95rem; }
.file-drop__meta em { font-style: normal; color: var(--muted); font-size: .8rem; font-weight: 600; }
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.ledger div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .75rem .8rem; }
.ledger span { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; }
.ledger b { font-size: 1.15rem; color: var(--ink); }
.ledger .is-earned { background: var(--success-soft); border-color: rgba(45, 138, 98, .22); }
.ledger .is-earned span,
.ledger .is-earned b { color: var(--success); }
.ledger .is-spent { background: var(--warn-soft); border-color: rgba(196, 133, 26, .22); }
.ledger .is-spent span,
.ledger .is-spent b { color: #8a5e0e; }
.ledger .is-penalty { background: var(--danger-soft); border-color: rgba(194, 66, 58, .22); }
.ledger .is-penalty span,
.ledger .is-penalty b { color: var(--danger); }
.ledger .is-balance { background: var(--teal-soft); border-color: rgba(14, 124, 134, .22); }
.ledger .is-balance span,
.ledger .is-balance b { color: var(--teal-deep); }
.ledger .is-net { background: #eef4ff; border-color: rgba(37, 99, 175, .22); }
.ledger .is-net span,
.ledger .is-net b { color: #1e4b8e; }
.scoreboard { display: grid; gap: .6rem; margin: 0 0 1rem; }
.scoreboard__balance {
    background: linear-gradient(135deg, #0a5c64 0%, #0e7c86 55%, #2f95a8 100%);
    color: #fff;
    border-radius: 18px;
    padding: 1.05rem 1rem 1.1rem;
    text-align: center;
    box-shadow: 0 14px 28px rgba(10, 92, 100, .18);
}
.scoreboard__balance span {
    display: block;
    font-size: .9rem;
    font-weight: 800;
    opacity: .9;
    margin-bottom: .15rem;
}
.scoreboard__balance b {
    display: block;
    font-size: clamp(1.8rem, 5vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.scoreboard__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem;
}
.scoreboard__grid > div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .7rem .7rem .75rem;
}
.scoreboard__grid span { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; margin-bottom: .15rem; }
.scoreboard__grid b { font-size: 1.08rem; color: var(--ink); }
.scoreboard__grid .is-earned { background: var(--success-soft); border-color: rgba(45, 138, 98, .22); }
.scoreboard__grid .is-earned span,
.scoreboard__grid .is-earned b { color: var(--success); }
.scoreboard__grid .is-spent { background: var(--warn-soft); border-color: rgba(196, 133, 26, .22); }
.scoreboard__grid .is-spent span,
.scoreboard__grid .is-spent b { color: #8a5e0e; }
.scoreboard__grid .is-penalty { background: var(--danger-soft); border-color: rgba(194, 66, 58, .22); }
.scoreboard__grid .is-penalty span,
.scoreboard__grid .is-penalty b { color: var(--danger); }
.scoreboard__grid .is-net { background: #eef4ff; border-color: rgba(37, 99, 175, .22); }
.scoreboard__grid .is-net span,
.scoreboard__grid .is-net b { color: #1e4b8e; }
.pick-search__list.is-tall { max-height: min(420px, 60vh); }
.pwa-install-bar {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 .75rem;
    position: relative;
}
.pwa-install {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--teal-deep);
    border-radius: 999px;
    padding: .32rem .75rem;
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}
.pwa-install[hidden] { display: none !important; }
.pwa-install svg { flex-shrink: 0; }
.pwa-install:hover { border-color: rgba(14, 124, 134, .35); background: var(--teal-soft); }
.pwa-install-tip {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-start: 0;
    z-index: 20;
    width: min(280px, 92vw);
    padding: .85rem .9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
    color: var(--ink);
    text-align: right;
}
.pwa-install-tip[hidden] { display: none !important; }
.pwa-install-tip strong { display: block; margin-bottom: .4rem; }
.pwa-install-tip p { margin: 0 0 .7rem; font-size: .85rem; color: var(--ink-soft); line-height: 1.7; }
.score-ledger {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin-top: .6rem;
}
.score-ledger span {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .05rem;
    min-width: 4.6rem;
    padding: .4rem .5rem .45rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(10, 40, 48, .25);
}
.score-ledger b {
    font-size: .98rem;
    font-weight: 800;
}
.score-ledger .is-in { background: rgba(45, 138, 98, .42); }
.score-ledger .is-out { background: rgba(196, 133, 26, .5); }
.score-ledger .is-neg { background: rgba(194, 66, 58, .55); }
.news-strip { margin-bottom: 1rem; }
.news-list { display: grid; gap: .7rem; }
.news-card { display: flex; gap: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.news-card img { width: 110px; height: 88px; object-fit: cover; }
.news-card div { padding: .65rem .75rem; }
.news-card p { margin: .25rem 0; color: var(--ink-soft); }

.news-board {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.1rem 1.15rem 1.2rem;
    box-shadow: var(--shadow);
}
.news-board__head {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .95rem;
}
.news-board__mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #14919c, #0e7c86);
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 8px 16px rgba(14, 124, 134, .22);
}
.news-board__mark svg { width: 24px; height: 24px; }
.news-board__head h2 { margin: 0; font-size: 1.2rem; }
.news-board__head p { margin: .12rem 0 0; color: var(--muted); font-size: .86rem; font-weight: 700; }
.news-board__empty {
    padding: 1.25rem 1rem;
    text-align: center;
    border-radius: 16px;
    border: 1.5px dashed var(--line);
    background: #f7fbfd;
    color: var(--muted);
    font-weight: 700;
}
.news-board__list { display: grid; gap: .85rem; }
.news-feature,
.news-item {
    display: grid;
    grid-template-columns: minmax(140px, 38%) 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fcfd;
    min-height: 0;
}
.news-feature { grid-template-columns: minmax(180px, 42%) 1fr; }
.news-media {
    min-height: 140px;
    background: var(--teal-soft);
    overflow: hidden;
}
.news-feature .news-media { min-height: 200px; }
.news-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-media.is-empty {
    display: grid;
    place-items: center;
    color: var(--teal-deep);
}
.news-media.is-empty svg { width: 36px; height: 36px; opacity: .7; }
.news-copy { padding: .95rem 1rem 1.05rem; min-width: 0; }
.news-copy time {
    display: inline-block;
    font-size: .78rem;
    font-weight: 800;
    color: var(--teal);
    margin-bottom: .35rem;
}
.news-copy h3 {
    margin: 0 0 .4rem;
    font-size: 1.08rem;
    line-height: 1.45;
    color: var(--ink);
}
.news-feature .news-copy h3 { font-size: 1.22rem; }
.news-copy p {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 600;
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.news-more { margin-top: .45rem; }
.news-more summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--teal-deep);
    font-size: .86rem;
}
.news-more p { margin-top: .4rem; }
.news-admin-row { display: flex; gap: .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.news-admin-row img { width: 56px; height: 44px; object-fit: cover; border-radius: 8px; }
@media (max-width: 700px) {
    .news-feature,
    .news-item { grid-template-columns: 1fr; }
    .news-feature .news-media,
    .news-item .news-media { min-height: 160px; }
}
.confirm-page { min-height: 60vh; display: grid; place-items: center; }
.confirm-box { max-width: 560px; width: 100%; }
.confirm-details { background: var(--sand); border-radius: 14px; padding: .8rem 1rem; margin: 1rem 0; }
.confirm-list { margin: 0; padding-right: 1.1rem; }
.confirm-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.absence-list {
    display: grid;
    gap: .85rem;
}
.absence-row {
    padding: .95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f7fbfd;
}
.absence-row.is-ok {
    background: linear-gradient(90deg, var(--success-soft), #fff);
    border-color: rgba(45, 138, 98, .18);
}
.absence-row.is-no {
    background: linear-gradient(90deg, var(--danger-soft), #fff);
    border-color: rgba(194, 66, 58, .18);
}
.absence-row.is-open,
.absence-row.is-justified {
    background: linear-gradient(90deg, var(--warn-soft), #fff);
    border-color: rgba(196, 133, 26, .18);
}
.absence-row.is-justified {
    background: linear-gradient(90deg, #eef3f6, #fff);
    border-color: var(--line);
}
.absence-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .35rem;
}
.absence-date {
    display: inline-flex;
    align-items: center;
    background: var(--teal-soft);
    color: var(--teal-deep);
    border-radius: 999px;
    padding: .22rem .75rem;
    font-weight: 800;
    font-size: .92rem;
    letter-spacing: 0;
}
.absence-row.is-no .absence-date,
.absence-row.is-open .absence-date {
    background: var(--danger-soft);
    color: var(--danger);
}
.absence-result { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.absence-justify { margin-top: .55rem; }
.absence-locked {
    margin: .55rem 0 0;
    padding: .55rem .7rem;
    border-radius: 12px;
    background: var(--danger-soft);
    color: var(--danger);
    font-weight: 700;
    font-size: .88rem;
}
.news-page .news-board {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}
.news-page .news-board__empty { background: #fff; }
.bulk-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.bulk-chip { background: var(--teal-soft); color: var(--teal-deep); border-radius: 999px; padding: .2rem .55rem; font-weight: 700; font-size: .82rem; display: inline-flex; gap: .3rem; align-items: center; }
.reward-thumb, .reward-icon img, .shop-item__img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.shop-item__img { width: 88px; height: 88px; }
.tx-item__points.is-neg { color: var(--danger); }
.tx-item__dot.is-neg { background: var(--danger); box-shadow: 0 0 0 4px rgba(194, 66, 58, .16); }

.parent-att-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.parent-att-card h2 { margin: 0 0 .2rem; }
.parent-att-card p { margin: 0; }
.parent-tx {
    display: grid;
    gap: .5rem;
}
.parent-tx__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    padding: .75rem .9rem;
    border-radius: 14px;
    background: #f7fbfd;
    border: 1px solid var(--line);
    min-width: 0;
}
.parent-tx__main {
    min-width: 0;
    flex: 1 1 auto;
}
.parent-tx__main strong {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.45;
}
.parent-tx__main time {
    display: block;
    margin-top: .18rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
}
.parent-tx__pts {
    flex: 0 0 auto;
    font-weight: 800;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    color: var(--success);
    white-space: nowrap;
}
.parent-tx__row.is-neg {
    background: linear-gradient(90deg, var(--danger-soft), #fff);
    border-color: rgba(194, 66, 58, .18);
}
.parent-tx__row.is-neg .parent-tx__pts { color: var(--danger); }
.parent-tx__row.is-pos {
    background: linear-gradient(90deg, var(--success-soft), #fff);
    border-color: rgba(45, 138, 98, .16);
}
.chip.is-on { background: var(--teal); color: #fff; }

.id-studio { margin-bottom: 1.25rem; }
.id-studio__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-soft);
}
.id-studio__head h1 { margin: 0 0 .25rem; font-size: 1.35rem; }
.id-studio__head p { margin: 0; color: var(--muted); max-width: 42rem; }
.id-studio__print { display: inline-flex; gap: .45rem; }
.id-card-sheet {
    display: grid;
    place-items: center;
    padding: .5rem 0 2rem;
}
.id-card {
    width: 320px;
    min-height: 520px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 18px 40px rgba(21, 37, 48, .14);
    display: flex;
    flex-direction: column;
    border: 1px solid #d7e4ea;
}
.id-card__head {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-align: right;
    padding: .9rem 1rem;
    background: linear-gradient(145deg, #14919c, #0e7c86);
    color: #fff;
}
.id-card__mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    display: block;
    object-fit: cover;
    flex: 0 0 auto;
}
.id-card__head strong { display: block; font-size: .95rem; }
.id-card__head em { font-style: normal; font-size: .75rem; opacity: .85; font-weight: 700; }
.id-card__photo {
    width: 148px;
    height: 186px;
    margin: 1.15rem auto .4rem;
    border-radius: 10px;
    overflow: hidden;
    background: #eef5f7;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
}
.id-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-card__photo.is-empty {
    border: 1.5px dashed #9bb4bf;
    background: repeating-linear-gradient(-45deg, #f7fbfd, #f7fbfd 8px, #eef4f7 8px, #eef4f7 16px);
    color: var(--muted);
    font-weight: 800;
    font-size: .92rem;
}
.id-card__meta { display: flex; flex-direction: column; gap: 2px; padding: 0 1rem .4rem; }
.id-card__meta strong { font-size: 1.12rem; }
.id-card__meta span { font-size: .82rem; color: var(--ink-soft); font-weight: 700; }
.id-card__qr { display: grid; place-items: center; padding: .35rem 0 .2rem; }
.id-card__qr .qr-sheet { gap: 0; padding: 0; background: transparent; border: 0; box-shadow: none; width: auto; }
.id-card__qr .qr-sheet__frame { padding: 0; border: 0; box-shadow: none; }
.id-card__qr .qr-sheet__brand { display: none; }
.id-card__foot {
    margin-top: auto;
    padding: .7rem .9rem .85rem;
    font-size: .68rem;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.5;
    border-top: 1px solid var(--line);
    background: #f7fbfd;
}

.codes-layout {
    display: grid;
    grid-template-columns: minmax(280px, .95fr) minmax(260px, 1.05fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.code-cta {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1rem auto 0;
    padding: .9rem 1rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    width: min(100%, 720px);
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.code-cta:hover {
    border-color: var(--teal);
    box-shadow: 0 10px 22px rgba(14, 124, 134, .12);
    transform: translateY(-1px);
}
.code-cta__ico {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--teal);
    color: #fff;
    flex: 0 0 auto;
}
.code-cta__ico svg { width: 24px; height: 24px; }
.code-cta__txt { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.code-cta__txt strong { font-size: 1rem; color: var(--ink); }
.code-cta__txt small { color: var(--muted); font-weight: 700; font-size: .82rem; }
.code-cta__go {
    font-weight: 800;
    font-size: .85rem;
    color: var(--teal-deep);
    background: var(--teal-soft);
    padding: .4rem .75rem;
    border-radius: 999px;
}

.code-studio {
    display: grid;
    gap: 1.15rem;
    width: min(100%, 720px);
    margin-inline: auto;
}
.code-studio__hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    border-radius: 22px;
    background: linear-gradient(135deg, #0e7c86 0%, #14919c 48%, #3d9bb5 100%);
    color: #fff;
    box-shadow: 0 16px 32px rgba(14, 124, 134, .28);
}
.code-studio__mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
    flex: 0 0 auto;
}
.code-studio__mark svg { width: 28px; height: 28px; }
.code-studio__hero h1 { margin: 0 0 .25rem; font-size: 1.4rem; color: #fff; }
.code-studio__hero p { margin: 0; color: rgba(255,255,255,.88); max-width: 40rem; font-weight: 600; }
.code-studio__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    align-items: stretch;
}

.code-ticket {
    border-radius: 24px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.15rem 1.35rem;
    text-align: center;
    position: relative;
}
.code-ticket.is-wait {
    background:
        repeating-linear-gradient(-45deg, rgba(14,124,134,.04), rgba(14,124,134,.04) 10px, transparent 10px, transparent 20px),
        #fff;
    border: 2px dashed rgba(14, 124, 134, .35);
    box-shadow: var(--shadow);
}
.code-ticket.is-ready {
    background: linear-gradient(180deg, #0e7c86 0%, #0e7c86 88px, #fff 88px);
    border: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(14, 124, 134, .18);
}
.code-ticket__wait { display: grid; gap: .45rem; justify-items: center; padding: 1.5rem .5rem; }
.code-ticket__wait-ico {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: var(--teal-soft);
    color: var(--teal-deep);
    margin-bottom: .3rem;
}
.code-ticket__wait-ico svg { width: 34px; height: 34px; }
.code-ticket__wait strong { font-size: 1.15rem; color: var(--ink); }
.code-ticket__wait span { color: var(--muted); font-weight: 700; max-width: 16rem; }
.code-ticket__top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,.9);
    font-weight: 800;
    font-size: .82rem;
    margin-bottom: .35rem;
}
.code-ticket.is-ready .code-ticket__top .code-chip { background: rgba(255,255,255,.18); color: #fff; }
.code-ticket__code {
    font-size: clamp(2rem, 6vw, 2.8rem);
    font-weight: 800;
    letter-spacing: .28em;
    color: #fff;
    margin: .2rem 0 .55rem;
    line-height: 1;
}
.code-ticket__copy { background: #fff; margin-bottom: .9rem; }
.code-ticket__qr {
    width: 180px;
    min-height: 180px;
    background: #fff;
    border-radius: 18px;
    padding: .7rem;
    margin: 0 auto;
}
.code-ticket__facts {
    list-style: none;
    margin: 1rem 0 0;
    padding: .85rem .2rem 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    border-top: 1px dashed var(--line);
}
.code-ticket__facts li { display: grid; gap: .15rem; }
.code-ticket__facts span { font-size: .75rem; font-weight: 800; color: var(--muted); }
.code-ticket__facts b { font-size: .88rem; color: var(--ink); }
.code-ticket__hint { margin: .85rem 0 0; color: var(--muted); font-size: .82rem; font-weight: 700; }

.code-builder {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.2rem 1.15rem 1.25rem;
    box-shadow: var(--shadow);
}
.code-builder h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.code-cats { display: grid; gap: .45rem; }
.code-cat { display: block; cursor: pointer; position: relative; }
.code-cat input { position: absolute; opacity: 0; pointer-events: none; }
.code-cat span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .7rem .85rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7fbfd;
    font-weight: 800;
}
.code-cat em { font-style: normal; color: var(--teal); font-size: .88rem; }
.code-cat:hover span { border-color: rgba(14,124,134,.3); }
.code-cat input:checked + span {
    border-color: var(--teal);
    background: var(--teal-soft);
    box-shadow: 0 0 0 3px rgba(14,124,134,.12);
}
.code-builder__nums { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.code-switch {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin: .15rem 0 1rem;
    padding: .85rem .9rem;
    border-radius: 16px;
    background: var(--teal-soft);
    color: var(--teal-deep);
    cursor: pointer;
}
.code-switch input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--teal); flex: 0 0 auto; }
.code-switch span { display: grid; gap: .1rem; }
.code-switch strong { font-size: .95rem; }
.code-switch em { font-style: normal; font-size: .8rem; font-weight: 700; opacity: .85; }
.code-builder__go { min-height: 50px; font-size: 1.05rem; margin-top: .2rem; }

.code-history {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.15rem 1.15rem 1.25rem;
    box-shadow: var(--shadow-soft);
}
.code-history__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
    margin-bottom: .9rem;
}
.code-history__head h2 { margin: 0; }
.code-history__head span { font-weight: 800; color: var(--muted); font-size: .88rem; }
.code-history__empty {
    padding: 1.4rem 1rem;
    text-align: center;
    border: 1.5px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
    font-weight: 700;
    background: #f7fbfd;
}
.code-history__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.code-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .9rem;
    align-items: center;
    padding: 1rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fcfd);
}
.code-row.is-new { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(14,124,134,.1); }
.code-row__code {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: .14em;
    color: #fff;
    background: var(--teal);
    padding: .7rem .8rem;
    border-radius: 14px;
    min-width: 7.8rem;
    text-align: center;
    box-shadow: 0 8px 16px rgba(14,124,134,.22);
}
.code-row__body { min-width: 0; }
.code-row__body strong { display: block; font-size: 1rem; }
.code-row__body span { color: var(--muted); font-size: .84rem; font-weight: 700; }
.code-row__body p { margin: .28rem 0 0; font-size: .86rem; font-weight: 700; color: var(--ink-soft); }
.code-row__body p.is-none { color: var(--muted); font-weight: 600; }
.code-chip {
    font-size: .78rem;
    font-weight: 800;
    padding: .3rem .7rem;
    border-radius: 999px;
    white-space: nowrap;
}
.code-chip.is-active { background: var(--success-soft); color: var(--success); }
.code-chip.is-partial { background: var(--warn-soft); color: var(--warn); }
.code-chip.is-used { background: var(--teal-soft); color: var(--teal-deep); }
.code-chip.is-expired { background: #eef2f4; color: var(--muted); }
.codes-once {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    margin: .2rem 0 1rem;
    padding: .7rem .85rem;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-deep);
    cursor: pointer;
}
.codes-once input { width: 1.1rem; height: 1.1rem; accent-color: var(--teal); }
.codes-fresh {
    display: grid;
    place-items: center;
    min-height: 280px;
}
.codes-fresh.has-code { place-items: stretch; }
.codes-fresh__kicker {
    margin: 0 0 .35rem;
    text-align: center;
    color: var(--muted);
    font-weight: 800;
    font-size: .82rem;
}
.codes-fresh__code {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-align: center;
    color: var(--teal-deep);
    margin: 0 0 .8rem;
}
.codes-fresh__meta { text-align: center; color: var(--muted); font-weight: 700; margin: .6rem 0 0; }
.codes-fresh__empty {
    text-align: center;
    display: grid;
    gap: .35rem;
    color: var(--muted);
}
.codes-fresh__empty strong { color: var(--ink); font-size: 1.05rem; }
.codes-list-wrap h2 { margin-bottom: .85rem; }
.codes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.codes-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .85rem;
    align-items: center;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.codes-item.is-new { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 124, 134, .1); }
.codes-item__code {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .12em;
    color: var(--teal-deep);
    background: var(--teal-soft);
    padding: .55rem .7rem;
    border-radius: 12px;
    min-width: 7.5rem;
    text-align: center;
}
.codes-item__info strong { display: block; }
.codes-item__info span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.codes-item__users { margin: .3rem 0 0; font-size: .86rem; font-weight: 700; color: var(--ink-soft); }
.codes-item__users.is-none { color: var(--muted); font-weight: 600; }
.codes-item__status {
    font-size: .78rem;
    font-weight: 800;
    padding: .28rem .7rem;
    border-radius: 999px;
    white-space: nowrap;
}
.codes-item__status.is-active { background: var(--success-soft); color: var(--success); }
.codes-item__status.is-partial { background: var(--warn-soft); color: var(--warn); }
.codes-item__status.is-used { background: var(--teal-soft); color: var(--teal-deep); }
.codes-item__status.is-expired { background: #eef2f4; color: var(--muted); }

.points-fix-edit { margin-bottom: 1rem; }
.points-fix-edit__actions { margin-top: .15rem; }
.points-fix-edit__delete { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.points-fix-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.points-fix-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.points-fix-card__main { min-width: 0; display: grid; gap: .2rem; }
.points-fix-card__main strong { font-size: 1rem; }
.points-fix-card__main span,
.points-fix-card__main em {
    font-style: normal;
    font-size: .84rem;
    font-weight: 700;
    color: var(--muted);
}
.points-fix-card__pts {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--success);
    white-space: nowrap;
}
.points-fix-card__pts.is-neg { color: var(--danger); }
@media (max-width: 700px) {
    .points-fix-card { grid-template-columns: 1fr auto; }
    .points-fix-card .btn { grid-column: 1 / -1; justify-self: start; }
}

@media print {
    .no-print, .topbar, .footer, .qr-fab, .app-bg, .toast-host { display: none !important; }
    .main { padding: 0 !important; }
    .id-card-sheet { padding: 0; }
    .id-card {
        width: 54mm;
        min-height: 86mm;
        box-shadow: none;
        border-radius: 0;
        border: 0;
    }
    .id-card__photo { width: 24mm; height: 32mm; }
}
@media (max-width: 900px) {
    .code-row { grid-template-columns: 1fr auto; }
    .code-row__code { grid-column: 1 / -1; }
    .code-ticket__facts { grid-template-columns: 1fr; text-align: right; }
}
@media (max-width: 700px) {
    .ledger { grid-template-columns: 1fr 1fr; }
    .scoreboard__grid { grid-template-columns: 1fr 1fr; }
    .id-studio__head { align-items: stretch; }
    .id-studio__print { width: 100%; }
}


/* ===== خبرنامه گذری صفحه خانه ===== */
.news-slider {
  position: relative;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e6e8ee);
  border-radius: 18px;
  padding: 14px 14px 12px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
  overflow: hidden;
}
.news-slider__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
  color: var(--muted, #667085);
  font-size: .85rem;
}
.news-slider__mark svg { width: 20px; height: 20px; display: block; }
.news-slider__mark { color: var(--primary, #0e7c86); }
.news-slider__head strong { color: var(--text, #101828); font-size: .95rem; }
.news-slider__track {
  position: relative;
  min-height: 92px;
}
.news-slide {
  display: none;
  gap: .85rem;
  align-items: center;
  animation: newsFade .4s ease;
}
.news-slide.is-active { display: flex; }
@keyframes newsFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.news-slide__media {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2, #f2f4f7);
}
.news-slide__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-slide__copy { flex: 1 1 auto; min-width: 0; }
.news-slide__copy time { color: var(--muted, #98a2b3); font-size: .74rem; }
.news-slide__copy h3 { margin: .15rem 0 .25rem; font-size: 1rem; color: var(--text, #101828); }
.news-slide__copy p { margin: 0; color: var(--muted, #667085); font-size: .84rem; line-height: 1.7; }
.news-slider__dots {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: .7rem;
}
.news-slider__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border, #d0d5dd);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.news-slider__dot.is-active { background: var(--primary, #0e7c86); transform: scale(1.25); }

/* ===== چک‌لیست به‌روزرسانی ===== */
.update-check { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.update-check__row {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .75rem; border-radius: 12px;
  background: var(--surface-2, #f2f4f7); font-size: .9rem;
}
.update-check__icon {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff;
}
.update-check__row.is-ok .update-check__icon { background: #12b76a; }
.update-check__row.is-no .update-check__icon { background: #f04438; }

/* رمز در جدول دانش‌آموزان */
.pwd-cell {
  background: var(--surface-2, #f2f4f7);
  padding: .15rem .45rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: .9rem;
}

/* ===== خطاهای مرحله‌ای فرم ثبت‌نام ===== */
.join-errors {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
  border-radius: 12px;
  padding: .7rem .9rem;
  margin-bottom: 1rem;
  font-size: .86rem;
}
.join-errors strong { display: block; margin-bottom: .35rem; }
.join-errors ul { margin: 0; padding-inline-start: 1.1rem; }
.join-errors li { margin: .15rem 0; line-height: 1.6; }

/* ===== انتخاب تاریخ کشویی (روز/ماه/سال) ===== */
.jdate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: .5rem;
  width: 100%;
}
/* specificity (0,2,0) to override the global `select:not(.ui-enhanced)` (0,1,1) */
.jdate select.jdate__sel {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  padding: .6rem .5rem;
  border: 1px solid rgba(14, 124, 134, .18);
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #101828);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  text-align-last: center;
  box-shadow: none;
  cursor: pointer;
}
.jdate select.jdate__sel:focus {
  outline: none;
  border-color: var(--teal, #0e7c86);
  box-shadow: 0 0 0 3px rgba(14, 124, 134, .15);
}
@media (max-width: 380px) {
  .jdate select.jdate__sel { font-size: .82rem; padding: .55rem .25rem; }
}

/* دکمه‌های مخفی ویزارد ثبت‌نام باید واقعاً مخفی شوند (override روی .join-footer .btn) */
.join-footer .btn[hidden] { display: none !important; }

/* ورود تایپی تاریخ تولد (سال/ماه/روز) */
.jdate--typed {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
}
.jdate .jdate__in {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 46px;
  padding: .6rem .5rem;
  border: 1px solid rgba(14, 124, 134, .18);
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #101828);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  text-align: center;
  box-shadow: none;
}
.jdate .jdate__in::placeholder { font-weight: 400; color: #98a2b3; font-size: .82rem; }
.jdate .jdate__in:focus {
  outline: none;
  border-color: var(--teal, #0e7c86);
  box-shadow: 0 0 0 3px rgba(14, 124, 134, .15);
}

/* فرم تأیید جدیدالورود به‌صورت فشرده و درجا (بدون بازشدن لیست زیر ردیف) */
.reg-approve-inline {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.reg-approve-inline__mentor {
  min-width: 130px;
  max-width: 180px;
  min-height: 36px;
  padding: .35rem .5rem;
  border: 1px solid rgba(14, 124, 134, .2);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: .85rem;
}

/* دکمهٔ حذف در ردیف‌های لیست (دانش‌آموز/مربی) */
.dlist__act-form { display: contents; }
.dlist__act--delete {
  color: #b42318;
  border-color: rgba(240, 68, 56, .3);
}
.dlist__act--delete:hover {
  background: #fef3f2;
  border-color: rgba(240, 68, 56, .5);
  color: #912018;
}

/* ===== لیست نوجوانان: تنها دکمهٔ مدیریت ===== */
.dlist__cell--action { display: flex; justify-content: flex-end; align-items: center; }
.dlist__edit-btn { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }

/* ===== صفحهٔ ویرایش نوجوان: نوار اقدام‌ها ===== */
.youth-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.youth-actions__stats { display: flex; gap: .6rem; flex-wrap: wrap; }
.youth-actions__stat {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface-2, #f2f4f7);
  border-radius: 12px; padding: .5rem .9rem; min-width: 84px;
}
.youth-actions__stat b { font-size: 1.05rem; color: var(--ink, #101828); }
.youth-actions__stat small { color: var(--muted, #667085); font-size: .74rem; }
.youth-actions__buttons { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.youth-actions__qr { display: flex; flex-direction: column; align-items: center; gap: .4rem; }

/* ناحیهٔ خطرناک (حذف) */
.danger-zone {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border: 1px solid rgba(240, 68, 56, .35);
  background: #fffafa;
}
.danger-zone h2 { margin: 0 0 .25rem; color: #b42318; font-size: 1.05rem; }

/* ===== تأیید جدیدالورود: دکمه‌های تمیز ===== */
.reg-actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.reg-actions form { display: inline; margin: 0; }
.reg-actions__hint { margin: .4rem 0 0; font-size: .74rem; color: var(--muted, #98a2b3); }

/* ===== مودال زیبا (تأیید ثبت‌نام) ===== */
.modal {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(16, 24, 40, .55);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .24s ease;
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__card {
  position: relative; background: #fff;
  border-radius: 20px; width: 100%; max-width: 460px;
  max-height: 88vh; overflow-y: auto; padding: 1.5rem 1.4rem;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .3);
  transform: translateY(28px) scale(.94); opacity: 0;
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.25), opacity .24s ease;
}
.modal.is-open .modal__card { transform: none; opacity: 1; }
.modal__close {
  position: absolute; top: .7rem; left: .7rem;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--surface-2, #f2f4f7);
  font-size: 1.3rem; line-height: 1; color: var(--muted, #667085); cursor: pointer;
}
.modal__close:hover { background: #e6e8ee; }
.modal__head { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.1rem; }
.modal__head h2 { margin: 0; font-size: 1.15rem; }
.modal__icon {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--teal-soft, #e6f6f4); color: var(--teal, #0e7c86);
}
.modal__icon svg { width: 26px; height: 26px; }
.modal__sub { margin: .2rem 0 0; color: var(--muted, #667085); font-size: .86rem; }
.mentor-pick { display: grid; gap: .5rem; max-height: 44vh; overflow-y: auto; margin-bottom: 1.1rem; }
.mentor-pick__item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .7rem; border: 1.5px solid var(--border, #e6e8ee);
  border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.mentor-pick__item input { position: absolute; opacity: 0; pointer-events: none; }
.mentor-pick__ava {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--teal-soft, #e6f6f4); color: var(--teal-deep, #0b5d66);
  display: grid; place-items: center; font-weight: 700; font-size: .8rem;
}
.mentor-pick__name { flex: 1; font-weight: 600; color: var(--ink, #101828); }
.mentor-pick__tick {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border, #d0d5dd);
  display: grid; place-items: center; color: #fff; transition: all .15s;
}
.mentor-pick__tick svg { width: 13px; height: 13px; opacity: 0; }
.mentor-pick__item.is-selected {
  border-color: var(--teal, #0e7c86);
  background: var(--teal-soft, #e6f6f4);
}
.mentor-pick__item.is-selected .mentor-pick__tick {
  background: var(--teal, #0e7c86); border-color: var(--teal, #0e7c86);
}
.mentor-pick__item.is-selected .mentor-pick__tick svg { opacity: 1; }
.modal__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.modal__actions .btn { flex: 1; min-width: 130px; }

/* ===== ری‌دیزاین ویرایش نوجوان ===== */
.youth-actions { margin-bottom: 1rem; }
.edit-form { display: block; }
.edit-card { margin-bottom: 1rem; }
.edit-card__title {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 1rem; padding-bottom: .7rem;
  font-size: 1.02rem; color: var(--ink, #101828);
  border-bottom: 1px solid var(--line, #eef0f4);
}
.edit-card__title svg { width: 20px; height: 20px; color: var(--teal, #0e7c86); }
.edit-native-select {
  width: 100%; min-height: 46px; padding: .6rem .7rem;
  border: 1px solid rgba(14, 124, 134, .2); border-radius: 12px;
  background: #fff; font-family: inherit; font-size: .92rem; font-weight: 600;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.edit-native-select:focus {
  outline: none; border-color: var(--teal, #0e7c86);
  box-shadow: 0 0 0 3px rgba(14, 124, 134, .15);
}
.edit-save-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: .6rem; flex-wrap: wrap;
  padding: .85rem 1rem; margin-top: .25rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  border: 1px solid var(--line, #eef0f4); border-radius: 16px;
  box-shadow: 0 -4px 20px rgba(16, 24, 40, .06);
}
.pick-search__q,
.link-find__q {
  width: 100%; margin-bottom: .5rem; min-height: 42px; padding: .5rem .7rem;
  border: 1px solid var(--line, #e8ecf1); border-radius: 12px; font-family: inherit;
}
.pick-search__bar,
.filter-bar,
.link-find__row {
  display: flex;
  gap: .45rem;
  align-items: stretch;
  margin-bottom: .55rem;
}
.pick-search__bar .pick-search__q,
.filter-bar .pick-search__q,
.link-find__row .link-find__q {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.pick-search__bar .btn,
.filter-bar .btn,
.link-find__row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.pick-search__list { max-height: 220px; overflow: auto; padding: .2rem; border: 1px solid var(--line, #eef0f4); border-radius: 12px; }
.is-filtered-out,
.mentor-assign-item[hidden],
tr.is-filtered-out,
tr[hidden] {
  display: none !important;
}
.event-poster { margin: 0 0 .75rem; border-radius: 16px; overflow: hidden; }
.event-poster img { width: 100%; display: block; max-height: 200px; object-fit: cover; }

.att-session-row {
  display: flex; align-items: stretch; gap: .45rem;
}
.att-session-row .att-session-item { flex: 1; min-width: 0; }
.att-session-del { display: flex; align-items: center; }

.sign-picks {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .55rem;
}
.sign-pick {
  display: block; cursor: pointer;
}
.sign-pick input { position: absolute; opacity: 0; pointer-events: none; }
.sign-pick span {
  display: grid; place-items: center; min-height: 44px; border-radius: 12px;
  border: 1px solid var(--line, #e8ecf1); font-weight: 800; background: #fff;
}
.sign-pick.is-plus input:checked + span {
  border-color: rgba(14, 124, 134, .45); background: rgba(14, 124, 134, .08); color: var(--teal-deep, #0b5c64);
}
.sign-pick.is-minus input:checked + span {
  border-color: rgba(194, 66, 58, .4); background: rgba(194, 66, 58, .08); color: #9b2c24;
}

.board-panel .board-me { font-weight: 800; color: var(--teal-deep, #0b5c64); font-size: .9rem; }
.board-sub { margin: 1.1rem 0 .55rem; font-size: .95rem; }
.board-list { display: grid; gap: .45rem; }
.board-row {
  display: grid; grid-template-columns: 2rem 2.4rem 1fr auto; gap: .55rem; align-items: center;
  padding: .45rem .55rem; border-radius: 14px; background: #f7f9fb; border: 1px solid transparent;
}
.board-row.is-me { border-color: rgba(14, 124, 134, .35); background: rgba(14, 124, 134, .08); }
.board-rank { font-weight: 800; color: var(--ink-soft, #667085); text-align: center; }
.board-avatar {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: #e8eef0; font-weight: 800;
}
.board-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-name strong { display: block; font-size: .9rem; }
.board-pts { font-weight: 800; color: var(--teal-deep, #0b5c64); white-space: nowrap; }

.pay-card .pay-amount {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .85rem 0; margin-bottom: .4rem; border-bottom: 1px solid var(--line, #eef0f4);
}
.pay-card .pay-amount strong { font-size: 1.25rem; }
.pay-meta { display: grid; gap: .55rem; margin: .8rem 0 1rem; }
.pay-meta div { display: flex; justify-content: space-between; gap: 1rem; }
.pay-meta dt { color: var(--ink-soft, #667085); }
.pay-meta dd { margin: 0; font-weight: 800; }
.pay-requests { display: grid; gap: .75rem; }
.pay-req {
  display: grid; gap: .6rem; padding: .8rem; border: 1px solid var(--line, #eef0f4); border-radius: 16px;
}
.pay-req__shot {
  display: block; max-width: 220px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line, #eef0f4);
}
.pay-req__shot img { width: 100%; display: block; }
@media (min-width: 720px) {
  .pay-req { grid-template-columns: 1fr 180px auto; align-items: center; }
}
