/* ============================================================================
   اتحادیه جوانان سنگان — اپلیکیشن اعضا
   app/assets/css/app.css
   طراحی: سبز زمردی، آبی تیره، سفید و جزئیات طلایی | RTL | Mobile-first
   ========================================================================== */

/* ---------------------------------------------------------------------------
   ۱) فونت
--------------------------------------------------------------------------- */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------------------------------------------------
   ۲) متغیرهای طراحی
--------------------------------------------------------------------------- */
:root {
    /* آبی تیره */
    --navy-950: #061726;
    --navy-900: #0A2540;
    --navy-800: #103A57;
    --navy-700: #17496A;

    /* سبز زمردی */
    --em-900: #05392C;
    --em-800: #07513C;
    --em-700: #0A6A4E;
    --em-600: #0E8A63;
    --em-500: #14A97A;
    --em-400: #35C293;
    --em-300: #7BE0B8;
    --em-200: #B6F0D8;
    --em-100: #D8F6E9;
    --em-50:  #EFFBF6;

    /* طلایی */
    --gold-700: #96691F;
    --gold-600: #B8862F;
    --gold-500: #D4A445;
    --gold-400: #E7BF6C;
    --gold-300: #F2D69B;
    --gold-100: #FBF1D9;
    --gold-50:  #FDF9EF;

    /* خنثی */
    --ink:    #0A1F2B;
    --ink-2:  #17323F;
    --muted:  #5C7385;
    --muted-2:#8698A6;
    --line:   #E1ECE7;
    --line-2: #EFF5F2;
    --bg:     #F3F8F5;
    --bg-2:   #EAF3EE;
    --card:   #FFFFFF;

    /* وضعیت */
    --ok-bg:   #E7F8F0;
    --ok-fg:   #06603F;
    --warn-bg: #FEF4DE;
    --warn-fg: #8A5A08;
    --bad-bg:  #FDECEC;
    --bad-fg:  #A42323;
    --info-bg: #E8F1FA;
    --info-fg: #12456E;

    /* شکل و سایه */
    --r-xl: 28px;
    --r-lg: 22px;
    --r-md: 16px;
    --r-sm: 12px;
    --r-xs: 10px;

    --sh-xs: 0 1px 2px rgba(10, 37, 64, .05);
    --sh-sm: 0 2px 8px -4px rgba(10, 37, 64, .14);
    --sh-md: 0 12px 28px -18px rgba(10, 37, 64, .38);
    --sh-lg: 0 24px 54px -28px rgba(6, 23, 38, .46);
    --sh-glow: 0 16px 34px -20px rgba(14, 138, 99, .72);

    --nav-h: 66px;
    --top-h: 62px;

    --ease: cubic-bezier(.22, .61, .36, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);

    --grad-em: linear-gradient(135deg, #0B7A57 0%, #0E8A63 52%, #14A97A 100%);
    --grad-navy: linear-gradient(140deg, #0A2540 0%, #0B3F44 55%, #0B6B4F 100%);
    --grad-gold: linear-gradient(135deg, #F2D69B 0%, #D4A445 52%, #B8862F 100%);
}

/* ---------------------------------------------------------------------------
   ۳) پایه
--------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    background-image:
        radial-gradient(70% 42% at 100% 0%, rgba(20, 169, 122, .09) 0%, rgba(243, 248, 245, 0) 62%),
        radial-gradient(58% 36% at 0% 12%, rgba(212, 164, 69, .07) 0%, rgba(243, 248, 245, 0) 60%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

body.has-bottom-nav {
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px);
}

h1, h2, h3, h4 { line-height: 1.45; letter-spacing: -.2px; }

a { color: var(--em-700); text-decoration: none; }

img, svg { max-width: 100%; }
img { display: block; }

button { font-family: inherit; }

::selection { background: rgba(20, 169, 122, .22); color: var(--navy-950); }

:focus-visible {
    outline: 2px solid var(--em-500);
    outline-offset: 2px;
    border-radius: 6px;
}

.ico { width: 22px; height: 22px; flex: 0 0 auto; }

/* ---------------------------------------------------------------------------
   ۴) کمکی‌ها
--------------------------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: 11.8px; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.stack-actions { display: grid; gap: 10px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.noscript-note {
    margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
    background: var(--warn-bg); color: var(--warn-fg);
    font-size: 12px; font-weight: 600;
}

/* ---------------------------------------------------------------------------
   ۵) نوار وضعیت اتصال
--------------------------------------------------------------------------- */
.offline-banner {
    position: sticky;
    top: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px calc(9px + 1px);
    background: linear-gradient(135deg, #8A5A08, #B8862F);
    color: #FFF9E8;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .6);
    animation: slideDown .3s var(--ease-out);
}
.offline-banner[hidden] { display: none; }
.offline-banner .ico { width: 17px; height: 17px; }

/* نشان کوچک وضعیت در نوار بالا */
.net-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
    background: var(--ok-bg);
    color: var(--ok-fg);
    border: 1px solid rgba(6, 96, 63, .12);
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.net-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: netPulse 2.4s infinite;
}
.net-dot.is-offline {
    background: var(--warn-bg);
    color: var(--warn-fg);
    border-color: rgba(138, 90, 8, .16);
}
.net-dot.is-offline::before { animation: none; opacity: .85; }
.net-dot .net-label { display: none; }
@media (min-width: 420px) {
    .net-dot .net-label { display: inline; }
}

/* ---------------------------------------------------------------------------
   ۶) نوار بالا
--------------------------------------------------------------------------- */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--top-h);
    padding: 9px 14px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(225, 236, 231, .9);
    transition: box-shadow .3s ease, background .3s ease;
}
@media (min-width: 900px) {
    .app-topbar { padding-inline: max(22px, calc((100vw - 880px) / 2)); }
}
.app-topbar.is-scrolled {
    box-shadow: 0 10px 30px -24px rgba(10, 37, 64, .55);
    background: rgba(255, 255, 255, .94);
}

.topbar-logo {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: 0 8px 18px -12px rgba(10, 37, 64, .8);
    background: var(--navy-900);
}
.topbar-logo img { width: 100%; height: 100%; object-fit: cover; }

.topbar-title { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.topbar-title strong {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -.2px;
}
.topbar-title span {
    display: block;
    font-size: 10.5px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--em-700);
    cursor: pointer;
    padding: 0;
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.topbar-btn:hover { background: var(--em-50); border-color: var(--em-200); }
.topbar-btn:active { transform: scale(.93); }
.topbar-btn[hidden] { display: none; }
.topbar-btn .ico { width: 20px; height: 20px; }

/* ---------------------------------------------------------------------------
   ۷) بدنه
--------------------------------------------------------------------------- */
.app-main {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 14px 15px 10px;
}
@media (min-width: 900px) {
    .app-main { max-width: 880px; padding: 26px 22px 16px; }
}

.section { margin-top: 20px; }
.section:first-child { margin-top: 0; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
    padding-inline-start: 2px;
}
.section-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.2px;
}
.section-head h2::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--grad-gold);
    flex: 0 0 auto;
}
.section-head h2 .ico { width: 18px; height: 18px; color: var(--em-700); }
.section-head a,
.section-head .head-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--em-700);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--em-50);
    transition: background .18s ease;
    white-space: nowrap;
}
.section-head a:hover { background: var(--em-100); }
.section-head a .ico { width: 14px; height: 14px; }

/* ---------------------------------------------------------------------------
   ۸) دکمه‌ها
--------------------------------------------------------------------------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.1px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: transform .16s var(--ease), box-shadow .2s ease, background .2s ease, border-color .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }
.btn .ico { width: 19px; height: 19px; }
.btn[disabled] { opacity: .62; pointer-events: none; }

.btn-primary {
    background: var(--grad-em);
    color: #fff;
    box-shadow: var(--sh-glow);
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, 0) 42%);
    opacity: 0;
    transition: opacity .25s ease;
}
.btn-primary:hover::after { opacity: 1; }

.btn-gold {
    background: var(--grad-gold);
    color: #3D2A06;
    box-shadow: 0 14px 30px -20px rgba(184, 134, 47, .9);
}

.btn-ghost {
    background: #fff;
    color: var(--em-800);
    border-color: var(--line);
    box-shadow: var(--sh-xs);
}
.btn-ghost:hover { background: var(--em-50); border-color: var(--em-200); }

.btn-soft {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border-color: rgba(255, 255, 255, .26);
    backdrop-filter: blur(6px);
}
.btn-soft:hover { background: rgba(255, 255, 255, .22); }

.btn-danger {
    background: var(--bad-bg);
    color: var(--bad-fg);
    border-color: #F6D2D2;
}
.btn-danger:hover { background: #FBE0E0; }

.btn-block { width: 100%; }
.btn-sm { min-height: 40px; font-size: 12.5px; padding: 0 14px; border-radius: 12px; }
.btn-sm .ico { width: 16px; height: 16px; }

/* ---------------------------------------------------------------------------
   ۹) کارت‌ها
--------------------------------------------------------------------------- */
.card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 17px;
}
.card + .card { margin-top: 12px; }

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 13px;
    color: var(--ink);
    letter-spacing: -.2px;
}
.card-title .ico { width: 18px; height: 18px; color: var(--em-700); }

.card-soft {
    background: linear-gradient(160deg, #FFFFFF 0%, var(--em-50) 100%);
    border-color: var(--em-100);
}

/* ---------------------------------------------------------------------------
   ۱۰) سرکارت داشبورد
--------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
    padding: 20px 19px 18px;
    color: #fff;
    background: var(--grad-navy);
    box-shadow: var(--sh-lg);
    isolation: isolate;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'%3E%3Ccircle cx='60' cy='60' r='28'/%3E%3Ccircle cx='60' cy='60' r='46'/%3E%3Ccircle cx='60' cy='60' r='64'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 190px 190px;
    opacity: .9;
    z-index: -1;
}
.hero::after {
    content: '';
    position: absolute;
    top: -58px;
    left: -46px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 164, 69, .34) 0%, rgba(212, 164, 69, 0) 68%);
    z-index: -1;
}
.hero-glow {
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 169, 122, .42) 0%, rgba(20, 169, 122, 0) 66%);
    z-index: -1;
}

.hero-top { display: flex; align-items: center; gap: 13px; position: relative; }

.avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .16);
    border: 1.5px solid rgba(255, 255, 255, .42);
    font-size: 25px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ring {
    box-shadow: 0 0 0 2px rgba(212, 164, 69, .85), 0 10px 24px -14px rgba(0, 0, 0, .7);
}

.hero-name { min-width: 0; flex: 1 1 auto; }
.hero-name h1 {
    margin: 0 0 2px;
    font-size: 18.5px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-name p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-name p .sep { opacity: .45; margin: 0 4px; }

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    position: relative;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.chip .ico { width: 13px; height: 13px; opacity: .9; }
.chip-gold {
    background: rgba(212, 164, 69, .2);
    border-color: rgba(212, 164, 69, .42);
    color: #FBEBC7;
}

/* نوار پیشرفت داخل سرکارت */
.hero-progress { margin-top: 16px; }
.hero-progress-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .74);
    margin-bottom: 7px;
}
.hero-progress-top strong { color: #fff; font-size: 13px; font-weight: 800; }
.hero-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    overflow: hidden;
}
.hero-bar > i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
    box-shadow: 0 0 14px rgba(212, 164, 69, .6);
    transition: width .9s var(--ease-out);
}

/* ---------------------------------------------------------------------------
   ۱۱) کارت‌های آمار
--------------------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
@media (min-width: 640px) {
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
}

.stat-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 13px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    min-width: 0;
    overflow: hidden;
    transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--em-100); }
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 3px;
    background: var(--grad-em);
    opacity: .85;
}
.stat-card.tone-amber::after { background: var(--grad-gold); }
.stat-card.tone-blue::after { background: linear-gradient(90deg, #17496A, #2C7BA8); }
.stat-card.tone-red::after { background: linear-gradient(90deg, #A42323, #D95C5C); }

.stat-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    flex: 0 0 auto;
    background: linear-gradient(150deg, var(--em-50), var(--em-100));
    color: var(--em-700);
}
.stat-ico .ico { width: 19px; height: 19px; }
.tone-amber .stat-ico { background: linear-gradient(150deg, var(--gold-50), var(--gold-100)); color: var(--gold-700); }
.tone-blue  .stat-ico { background: var(--info-bg); color: var(--info-fg); }
.tone-red   .stat-ico { background: var(--bad-bg); color: var(--bad-fg); }

.stat-body { min-width: 0; }
.stat-label {
    display: block;
    font-size: 10.4px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.45;
    letter-spacing: -.5px;
    word-break: break-word;
}
.stat-value.is-text { font-size: 13px; letter-spacing: -.1px; line-height: 1.7; }
.stat-body small { display: block; font-size: 9.8px; color: var(--muted-2); line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------------------
   ۱۲) لیست‌ها
--------------------------------------------------------------------------- */
.list { display: grid; gap: 8px; }

.list-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    color: inherit;
}
a.list-row:hover { border-color: var(--em-200); box-shadow: var(--sh-sm); }
a.list-row:active { transform: scale(.995); }

.row-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    flex: 0 0 auto;
    background: linear-gradient(150deg, var(--em-50), var(--em-100));
    color: var(--em-700);
}
.row-ico .ico { width: 19px; height: 19px; }
.row-ico.occ { background: var(--info-bg); color: var(--info-fg); }
.row-ico.non { background: linear-gradient(150deg, var(--gold-50), var(--gold-100)); color: var(--gold-700); }
.row-ico.gold { background: linear-gradient(150deg, var(--gold-50), var(--gold-100)); color: var(--gold-700); }

.row-main { flex: 1 1 auto; min-width: 0; }
.row-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -.1px;
}
.row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 10.8px;
    color: var(--muted);
    margin-top: 3px;
    line-height: 1.7;
}
.row-meta .dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--muted-2); opacity: .75; flex: 0 0 auto;
}

.row-side { text-align: left; flex: 0 0 auto; }
.row-amount {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--em-800);
    white-space: nowrap;
    letter-spacing: -.3px;
}
.row-amount.muted { color: var(--muted-2); font-weight: 600; font-size: 10.5px; }
.row-amount.neg { color: var(--bad-fg); }

/* ---------------------------------------------------------------------------
   ۱۳) نشان‌ها
--------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.9;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge-ok   { background: var(--ok-bg);   color: var(--ok-fg);   border-color: rgba(6, 96, 63, .1); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: rgba(138, 90, 8, .12); }
.badge-bad  { background: var(--bad-bg);  color: var(--bad-fg);  border-color: rgba(164, 35, 35, .1); }
.badge-info { background: var(--info-bg); color: var(--info-fg); border-color: rgba(18, 69, 110, .1); }
.badge-soft { background: #F2F6F4; color: var(--muted); border-color: var(--line); }
.badge-gold { background: var(--gold-50); color: var(--gold-700); border-color: rgba(184, 134, 47, .18); }

/* ---------------------------------------------------------------------------
   ۱۴) میان‌برها
--------------------------------------------------------------------------- */
.shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}
.shortcut {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    box-shadow: var(--sh-xs);
    transition: transform .18s var(--ease), border-color .18s ease, box-shadow .18s ease;
    overflow: hidden;
}
.shortcut::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 169, 122, .05), transparent 60%);
    opacity: 0;
    transition: opacity .2s ease;
}
.shortcut:hover { transform: translateY(-2px); border-color: var(--em-200); box-shadow: var(--sh-sm); }
.shortcut:hover::before { opacity: 1; }
.shortcut:active { transform: scale(.96); }
.shortcut .sc-ico {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(150deg, var(--em-50), var(--em-100));
    color: var(--em-700);
}
.shortcut:nth-child(2) .sc-ico { background: var(--info-bg); color: var(--info-fg); }
.shortcut:nth-child(3) .sc-ico { background: linear-gradient(150deg, var(--gold-50), var(--gold-100)); color: var(--gold-700); }
.shortcut:nth-child(4) .sc-ico { background: #F3F1FA; color: #4B3F8F; }
.shortcut .ico { width: 19px; height: 19px; }
.shortcut span:last-child { position: relative; }

/* ---------------------------------------------------------------------------
   ۱۵) پیام روز / حدیث
--------------------------------------------------------------------------- */
.daily {
    position: relative;
    overflow: hidden;
    padding: 19px 18px 18px;
    border-radius: var(--r-lg);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(212, 164, 69, .14) 0%, rgba(212, 164, 69, 0) 58%),
        linear-gradient(160deg, #FFFFFF 0%, var(--em-50) 100%);
    border: 1px solid var(--em-100);
    box-shadow: var(--sh-sm);
}
.daily::before {
    content: '”';
    position: absolute;
    top: -18px;
    inset-inline-end: 12px;
    font-size: 96px;
    line-height: 1;
    color: rgba(212, 164, 69, .22);
    font-family: Georgia, 'Times New Roman', serif;
    pointer-events: none;
}
.daily-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--gold-700);
    letter-spacing: .2px;
    margin-bottom: 9px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--gold-50);
    border: 1px solid rgba(184, 134, 47, .18);
}
.daily-label .ico { width: 14px; height: 14px; }
.daily-text {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 2.05;
    color: var(--em-900);
    position: relative;
    z-index: 1;
}
.daily-source {
    display: block;
    margin-top: 10px;
    font-size: 11px;
    color: var(--muted);
    padding-top: 9px;
    border-top: 1px dashed rgba(184, 134, 47, .22);
}
.daily-source strong { color: var(--gold-700); font-weight: 700; }

/* ---------------------------------------------------------------------------
   ۱۶) فرم‌ها
--------------------------------------------------------------------------- */
.form-grid { display: grid; gap: 13px; }
@media (min-width: 640px) {
    .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.field { display: grid; gap: 7px; }
.field > label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-2);
}
.field .hint { font-size: 10.8px; color: var(--muted-2); line-height: 1.7; }

.input, .select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    appearance: none;
}
.input::placeholder { color: var(--muted-2); font-size: 12.5px; }
.select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C7385' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 13px center;
    background-size: 17px;
    padding-left: 38px;
}
.input:focus, .select:focus {
    border-color: var(--em-400);
    box-shadow: 0 0 0 4px rgba(20, 169, 122, .13);
}
textarea.input {
    height: auto;
    min-height: 88px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.95;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}
@media (min-width: 640px) {
    .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.filter-grid .span-2 { grid-column: span 2; }

/* چیپ‌های فیلتر افقی */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 2px 2px 4px;
}
.chip-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: all .18s ease;
    box-shadow: var(--sh-xs);
}
.chip-filter:hover { border-color: var(--em-200); color: var(--em-800); }
.chip-filter.is-on {
    background: var(--grad-em);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--sh-glow);
}
.chip-filter .ico { width: 14px; height: 14px; }

/* هشدارها */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 12.3px;
    font-weight: 600;
    line-height: 1.85;
    margin-bottom: 14px;
    border: 1px solid transparent;
}
.alert .ico { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.alert-error   { background: var(--bad-bg);  color: var(--bad-fg);  border-color: #F6D2D2; }
.alert-success { background: var(--ok-bg);   color: var(--ok-fg);   border-color: var(--em-200); }
.alert-warn    { background: var(--warn-bg); color: var(--warn-fg); border-color: #F3DDAE; }
.alert-info    { background: var(--info-bg); color: var(--info-fg); border-color: #CFE0F0; }

/* ---------------------------------------------------------------------------
   ۱۷) نوار پیشرفت و جزئیات مالی
--------------------------------------------------------------------------- */
.fee-box { display: grid; gap: 11px; }
.fee-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fee-row span { font-size: 12.3px; color: var(--muted); }
.fee-row strong { font-size: 15px; font-weight: 800; letter-spacing: -.3px; }

.progress {
    height: 10px;
    border-radius: 999px;
    background: var(--em-50);
    overflow: hidden;
    border: 1px solid var(--em-100);
}
.progress > i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--em-600), var(--em-400));
    transition: width .8s var(--ease-out);
}
.progress.is-gold > i { background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); }

.fee-note {
    font-size: 11.3px;
    color: var(--muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.8;
}
.fee-note .ico { width: 14px; height: 14px; margin-top: 2px; flex: 0 0 auto; }
.fee-note strong { color: var(--ink); }

/* ---------------------------------------------------------------------------
   ۱۸) حالت خالی
--------------------------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 30px 18px;
    text-align: center;
    color: var(--muted);
    background: linear-gradient(180deg, #fff, var(--em-50));
    border: 1px dashed var(--em-200);
    border-radius: var(--r-md);
}
.empty-ico { width: 38px; height: 38px; color: var(--em-300); }
.empty-state strong { font-size: 13.5px; color: var(--ink); font-weight: 800; }
.empty-state p { margin: 0; font-size: 11.5px; max-width: 34ch; line-height: 1.9; }

/* ---------------------------------------------------------------------------
   ۱۹) صفحه‌بندی
--------------------------------------------------------------------------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 15px;
}
.pager a, .pager span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 42px;
    padding: 0 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--em-800);
    box-shadow: var(--sh-xs);
    transition: background .18s ease;
}
.pager a:hover { background: var(--em-50); }
.pager span.disabled { opacity: .42; }
.pager .page-info { border: 0; background: transparent; color: var(--muted); font-weight: 600; box-shadow: none; font-size: 11.5px; }

/* ---------------------------------------------------------------------------
   ۲۰) جزئیات (accordion)
--------------------------------------------------------------------------- */
details.detail {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    padding: 12px 14px;
    box-shadow: var(--sh-xs);
}
details.detail + details.detail { margin-top: 8px; }
details.detail summary {
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--em-800);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
details.detail summary::-webkit-details-marker { display: none; }
details.detail summary::after {
    content: '';
    width: 8px; height: 8px;
    border-inline-start: 2px solid var(--muted-2);
    border-bottom: 2px solid var(--muted-2);
    transform: rotate(-45deg);
    transition: transform .2s ease;
    flex: 0 0 auto;
}
details.detail[open] summary::after { transform: rotate(135deg); }
details.detail[open] summary { margin-bottom: 10px; }

.kv { display: grid; grid-template-columns: 104px 1fr; gap: 7px 10px; font-size: 12.3px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; word-break: break-word; }

/* ردیف پرداخت بازشو */
.pay-item summary {
    display: flex;
    align-items: center;
    gap: 11px;
    list-style: none;
    cursor: pointer;
    padding: 1px 0;
}
.pay-item summary::-webkit-details-marker { display: none; }
.pay-item summary .row-main { flex: 1 1 auto; min-width: 0; }
.pay-item[open] { border-color: var(--em-200); background: linear-gradient(180deg, #fff, var(--em-50)); }
.pay-item[open] summary {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--em-200);
}
.pay-item { display: block; padding: 11px 12px; }

/* ---------------------------------------------------------------------------
   ۲۱) توست
--------------------------------------------------------------------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
    transform: translate(-50%, 18px) scale(.96);
    z-index: 90;
    max-width: min(88vw, 420px);
    padding: 11px 18px;
    border-radius: 999px;
    background: rgba(6, 23, 38, .94);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease, transform .24s var(--ease-out);
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
    backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------------------------------------------------------------------------
   ۲۲) ناوبری پایین
--------------------------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 65;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(225, 236, 231, .95);
    box-shadow: 0 -10px 30px -26px rgba(10, 37, 64, .6);
}
@media (min-width: 700px) {
    .bottom-nav {
        max-width: 560px;
        margin: 0 auto 16px;
        border-radius: 22px;
        border: 1px solid var(--line);
        box-shadow: var(--sh-md);
        padding-bottom: 7px;
    }
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px 6px;
    border-radius: 13px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 700;
    transition: color .2s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.nav-ico { width: 21px; height: 21px; transition: transform .25s var(--ease-out); }
.nav-item.is-active { color: var(--em-700); }
.nav-item.is-active .nav-ico { transform: translateY(-1px); }
.nav-item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--grad-gold);
}
.nav-item.is-active span:last-child { color: var(--em-800); }

/* ---------------------------------------------------------------------------
   ۲۳) صفحهٔ ورود و خوش‌آمد
--------------------------------------------------------------------------- */
.auth-wrap {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px 18px calc(26px + env(safe-area-inset-bottom));
    overflow: hidden;
}
.auth-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(80% 50% at 50% 0%, rgba(20, 169, 122, .14) 0%, rgba(243, 248, 245, 0) 66%),
        radial-gradient(60% 40% at 100% 100%, rgba(212, 164, 69, .12) 0%, rgba(243, 248, 245, 0) 60%);
    z-index: -1;
}
.auth-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 28px;
    padding: 28px 22px 24px;
    box-shadow: 0 30px 60px -34px rgba(10, 37, 64, .5);
    animation: cardIn .55s var(--ease-out) both;
}
.auth-logo {
    width: 84px;
    height: 84px;
    margin: 0 auto 15px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 34px -18px rgba(10, 37, 64, .8);
}
.auth-logo img { width: 100%; height: 100%; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head h1 {
    margin: 0 0 5px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.4px;
}
.auth-head p { margin: 0; font-size: 12.3px; color: var(--muted); }
.auth-foot {
    text-align: center;
    font-size: 11.3px;
    color: var(--muted);
    margin-top: 18px;
    line-height: 1.95;
}

.pw-wrap { position: relative; }
.pw-wrap .input { padding-left: 48px; }
.pw-toggle {
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted-2);
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
.pw-toggle:hover { background: var(--em-50); color: var(--em-700); }
.pw-toggle.is-on { color: var(--em-700); background: var(--em-50); }
.pw-toggle .ico { width: 18px; height: 18px; }

/* --- صفحهٔ افتتاحیه (Splash) --- */
.splash {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 22px calc(26px + env(safe-area-inset-bottom));
    background:
        radial-gradient(120% 72% at 50% 0%, #10514D 0%, #0A2540 46%, #061726 100%);
    color: #fff;
    overflow: hidden;
    text-align: center;
    transition: opacity .5s var(--ease), visibility .5s;
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'%3E%3Ccircle cx='120' cy='120' r='40'/%3E%3Ccircle cx='120' cy='120' r='68'/%3E%3Ccircle cx='120' cy='120' r='96'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 240px 240px;
    opacity: .85;
}

/* تصویرسازی تزئینی پایین صفحه */
.splash-art {
    position: absolute;
    inset: auto 0 0 0;
    height: 44%;
    z-index: 0;
    opacity: .46;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 34%, rgba(0, 0, 0, 0) 92%);
    mask-image: linear-gradient(to top, #000 0%, #000 34%, rgba(0, 0, 0, 0) 92%);
}
.splash-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

.splash-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(6, 23, 38, .9) 0%,
        rgba(6, 23, 38, .58) 32%,
        rgba(6, 23, 38, .38) 56%,
        rgba(6, 23, 38, .74) 100%
    );
}.splash-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 440px;
    margin: auto 0;
}
.splash-logo {
    width: 108px;
    height: 108px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px -26px rgba(0, 0, 0, .9), 0 0 0 1px rgba(212, 164, 69, .34);
    animation: logoIn .9s var(--ease-out) both;
}
.splash-logo img { width: 100%; height: 100%; }

.splash-title {
    margin: 20px 0 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.6px;
    line-height: 1.5;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
    animation: fadeUp .8s .18s var(--ease-out) both;
}
.splash-slogan {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 2;
    color: rgba(255, 255, 255, .82);
    max-width: 36ch;
    animation: fadeUp .8s .3s var(--ease-out) both;
}
.splash-gold-line {
    width: 54px;
    height: 3px;
    border-radius: 3px;
    background: var(--grad-gold);
    margin: 18px auto 0;
    animation: growLine .8s .42s var(--ease-out) both;
}
.splash-actions {
    width: 100%;
    max-width: 340px;
    margin-top: 26px;
    display: grid;
    gap: 10px;
    animation: fadeUp .8s .52s var(--ease-out) both;
}
.splash-net {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, .86);
    animation: fadeUp .8s .64s var(--ease-out) both;
}
.splash-net .net-dot { background: transparent; border: 0; padding: 0; color: #9BF0CC; }
.splash-net .net-dot.is-offline { color: #F5D28A; }
.splash-net .net-dot .net-label { display: inline; }
.splash-foot {
    position: relative;
    z-index: 2;
    font-size: 10.5px;
    color: rgba(255, 255, 255, .5);
    margin-top: 22px;
}

/* --- صفحهٔ خوش‌آمدگویی (به‌صورت صفحهٔ کامل، نه لایهٔ روی صفحه) --- */
.splash-body { background: var(--navy-950); }
.splash-page {
    position: relative;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 34px 22px calc(26px + env(safe-area-inset-bottom));
}
.splash-page .splash-inner { margin: auto 0; }

.splash-feats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    animation: fadeUp .8s .72s var(--ease-out) both;
}
.splash-feat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .13);
    font-size: 10.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .8);
}
.splash-feat .ico { width: 13px; height: 13px; color: var(--gold-300); }

.install-hint {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .62);
    text-align: center;
    max-width: 34ch;
}
.install-hint strong { color: var(--gold-300); font-weight: 700; }
.install-hint[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   ۲۴) اسکلت بارگذاری
--------------------------------------------------------------------------- */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #E9F1EC;
    border-radius: 8px;
    color: transparent !important;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
    animation: shimmer 1.4s infinite;
}

/* ---------------------------------------------------------------------------
   ۲۵) بنر نصب
--------------------------------------------------------------------------- */
.install-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, #FFFDF7, var(--gold-50));
    border: 1px solid rgba(184, 134, 47, .26);
    box-shadow: var(--sh-xs);
}
.install-banner .ib-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--grad-gold);
    color: #3D2A06;
    flex: 0 0 auto;
}
.install-banner .ib-body { flex: 1 1 auto; min-width: 0; }
.install-banner strong { display: block; font-size: 12.5px; font-weight: 800; color: var(--gold-700); }
.install-banner span { display: block; font-size: 10.8px; color: var(--muted); line-height: 1.7; }

/* ---------------------------------------------------------------------------
   ۲۶) انیمیشن‌ها
--------------------------------------------------------------------------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes logoIn {
    0%   { opacity: 0; transform: scale(.72) rotate(-6deg); }
    60%  { opacity: 1; transform: scale(1.04) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes growLine {
    from { width: 0; opacity: 0; }
    to   { width: 54px; opacity: 1; }
}
@keyframes shimmer {
    100% { transform: translateX(100%); }
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
@keyframes netPulse {
    0%   { box-shadow: 0 0 0 0 rgba(20, 169, 122, .45); }
    70%  { box-shadow: 0 0 0 6px rgba(20, 169, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(20, 169, 122, 0); }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

/* ورود نرم عناصر صفحه */
.reveal { animation: fadeUp .5s var(--ease-out) both; }
.reveal-d1 { animation-delay: .06s; }
.reveal-d2 { animation-delay: .12s; }
.reveal-d3 { animation-delay: .18s; }
.reveal-d4 { animation-delay: .24s; }

/* گذار نرم بین صفحات */
.page-fade { animation: pageIn .34s var(--ease-out) both; }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
body.is-leaving { opacity: .55; transition: opacity .18s ease; }

/* ---------------------------------------------------------------------------
   ۲۷) چاپ
--------------------------------------------------------------------------- */
@media print {
    body { background: #fff; padding: 0; }
    .app-topbar, .bottom-nav, .offline-banner, .no-print, .toast,
    .shortcuts, .pager, .splash, .install-banner, .chip-row { display: none !important; }
    .app-main { max-width: 100%; padding: 0; }
    .card, .list-row, .stat-card, .hero, .daily {
        box-shadow: none !important;
        border-color: #d5d5d5 !important;
        break-inside: avoid;
    }
    .hero { color: #000; background: #fff !important; border: 1px solid #ccc; }
    .hero-name p, .chip, .splash-slogan { color: #333 !important; }
    .chip { background: #f2f2f2; border-color: #ddd; }
    .hero-bar { background: #eee; }
    a { color: #000; text-decoration: none; }
    .report-head { display: block; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--em-700); }
    .report-head h1 { margin: 0 0 4px; font-size: 16px; }
    .report-head p { margin: 0; font-size: 11px; color: #444; }
    .pay-item[open] summary { border-bottom: 0; }
    details.detail > *:not(summary) { display: block !important; }
    details.detail summary::after { display: none; }
}
.report-head { display: none; }

/* ---------------------------------------------------------------------------
   ۲۸) احترام به تنظیمات کاربر
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------------------------------------------------------------------------
   ۲۹) صفحه‌های بسیار کوچک
--------------------------------------------------------------------------- */
@media (max-width: 360px) {
    body { font-size: 14.4px; }
    .app-main { padding-inline: 12px; }
    .hero { padding: 17px 15px 16px; }
    .hero-name h1 { font-size: 17px; }
    .stat-value { font-size: 15.5px; }
    .shortcut { font-size: 10px; padding-inline: 3px; }
    .nav-item { font-size: 9.4px; }
    .splash-title { font-size: 21px; }
}

/* ---------------------------------------------------------------------------
   ۳۰) کارت اعلان
-------------------------------------------------------------------------- */
.notice-card {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.notice-card:hover { border-color: var(--em-200); box-shadow: var(--sh-sm); }
.notice-card .row-main { min-width: 0; }

.notice-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.notice-head .row-title { white-space: normal; flex: 1 1 auto; line-height: 1.7; }
.notice-head .badge { flex: 0 0 auto; margin-top: 1px; }

.notice-body {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.95;
    margin-top: 7px;
    word-break: break-word;
}

/* ---------------------------------------------------------------------------
   ۳۱) کلید تنظیمات (سوئیچ)
-------------------------------------------------------------------------- */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid var(--em-100);
    border-radius: 15px;
    background: linear-gradient(150deg, #fff, var(--em-50));
    cursor: pointer;
    user-select: none;
}
.switch-text { min-width: 0; }
.switch-text strong { display: block; font-size: 12.8px; font-weight: 800; color: var(--ink); }
.switch-text small { display: block; font-size: 10.6px; color: var(--muted); line-height: 1.8; margin-top: 2px; }

.switch {
    position: relative;
    width: 50px;
    height: 28px;
    flex: 0 0 auto;
    display: inline-block;
}
.switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.switch i {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #CBD8D2;
    transition: background .22s ease;
    pointer-events: none;
}
.switch i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(10, 37, 64, .28);
    transition: transform .22s var(--ease);
}
.switch input:checked + i { background: var(--em-600); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(20, 169, 122, .22); }

/* ---------------------------------------------------------------------------
   ۳۲) همیشه محترم‌شمردن hidden
-------------------------------------------------------------------------- */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------------------
   ۳۳) کارت حق‌العضویت ماهانه
-------------------------------------------------------------------------- */
.fee-status-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.fee-status-hint {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.9;
    margin: 0 0 4px;
}

.fee-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 12px 0;
}
.fee-cell {
    background: linear-gradient(160deg, #FFFFFF, var(--em-50));
    border: 1px solid var(--em-100);
    border-radius: 14px;
    padding: 10px 12px;
    min-width: 0;
}
.fee-cell small {
    display: block;
    font-size: 10.4px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fee-cell strong {
    display: block;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.35px;
    line-height: 1.6;
    word-break: break-word;
}
.fee-cell.is-debt {
    background: linear-gradient(160deg, #FFF7F7, var(--bad-bg));
    border-color: #F6D2D2;
}
.fee-cell.is-debt strong { color: var(--bad-fg); }
.fee-cell.is-credit {
    background: linear-gradient(160deg, #FFFDF7, var(--gold-50));
    border-color: rgba(184, 134, 47, .22);
}
.fee-cell.is-credit strong { color: var(--gold-700); }

.fee-meta {
    display: grid;
    gap: 7px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed var(--line);
}
.fee-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}
.fee-meta-row strong {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
}
.fee-coverage {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 11px;
    padding: 10px 12px;
    border-radius: 13px;
    background: var(--gold-50);
    border: 1px solid rgba(184, 134, 47, .22);
    color: var(--gold-700);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.85;
}
.fee-coverage .ico { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 auto; }
