/* هدر — هم‌تراز با کادر تب‌ها + گوشه‌های گرد */
.header-shell {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
    padding: 0.75rem 1rem 0;
}

@media (min-width: 1024px) {
    .header-shell {
        padding-inline: 2rem;
    }
}

#app-header.app-header-glass {
    position: relative;
    isolation: isolate;
    width: 100%;
    overflow: visible;
    border-radius: 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(255, 255, 255, 0.65) 100%
    );
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#app-header.app-header-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

#app-header .header-inner {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    flex-wrap: wrap;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo__icon {
    width: 2.65rem;
    height: 2.65rem;
    flex-shrink: 0;
    border-radius: 50%;
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.35));
}

.brand-logo__icon--sm {
    width: 2.1rem;
    height: 2.1rem;
}

.brand-logo__wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}

.brand-logo__title {
    font-family: 'Plus Jakarta Sans', 'Vazirmatn', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: #0f2449;
    white-space: nowrap;
}

.brand-logo__title--sm {
    font-size: 0.95rem;
}

.brand-logo__year {
    font-size: 0.58rem;
    font-weight: 700;
    color: #38bdf8;
    margin-top: 0.05rem;
}

.brand-tagline {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin: 0;
    line-height: 1.35;
    white-space: nowrap;
}

.brand-tagline--hero {
    font-size: 0.8rem;
}

.brand-logo--stacked {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
}

.brand-logo__textcol {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.brand-logo--stacked .brand-logo__wordmark {
    display: flex;
    flex-direction: column;
}

.brand-header-slogan {
    font-size: 0.52rem;
    font-weight: 700;
    color: #6366f1;
    line-height: 1.25;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .brand-header-slogan {
        font-size: 0.58rem;
    }
}

html.dark .brand-header-slogan {
    color: #a5b4fc;
}

html.dark .brand-tagline {
    color: #cbd5e1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-inline-start: auto;
}

#app-header .header-action-btn {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

#app-header .header-action-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

#app-header .header-datetime {
    flex-shrink: 0;
    position: relative;
    z-index: 20;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 1rem;
    padding: 0.4rem 0.75rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 8.5rem;
    max-width: 11rem;
    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
}

#app-header #header-date {
    color: #64748b;
    line-height: 1.45;
    text-align: right;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

#app-header #header-clock {
    color: #0f172a;
    line-height: 1.4;
    text-align: right;
    font-variant-numeric: tabular-nums;
    direction: rtl;
    unicode-bidi: plaintext;
}

html.dark #app-header.app-header-glass {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.9) 0%,
        rgba(30, 41, 59, 0.78) 100%
    );
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 8px 32px -8px rgba(0, 0, 0, 0.45);
}

html.dark #app-header .header-action-btn {
    background: rgba(51, 65, 85, 0.55);
    border-color: rgba(148, 163, 184, 0.2);
}

html.dark #app-header .header-datetime {
    background: rgba(51, 65, 85, 0.45);
    border-color: rgba(148, 163, 184, 0.15);
}

@media (max-width: 639px) {
    .header-shell {
        padding: 0.3rem 0.6rem 0;
    }

    #app-header.app-header-glass {
        border-radius: 0.85rem;
    }

    #app-header .header-inner {
        padding: 0.32rem 0.5rem;
        gap: 0.35rem;
        flex-wrap: nowrap;
        align-items: center;
    }

    .brand-block {
        gap: 0.3rem;
        min-width: 0;
        flex: 1 1 0;
        max-width: 42%;
    }

    .brand-logo {
        gap: 0.28rem;
    }

    .brand-logo__icon {
        width: 1.75rem;
        height: 1.75rem;
    }

    .brand-logo__title {
        font-size: 0.82rem;
        letter-spacing: -0.01em;
        transform: none;
    }

    .brand-logo__wordmark {
        flex-shrink: 0;
    }

    .brand-logo__year {
        display: none;
    }

    .brand-header-slogan {
        display: block;
        font-size: 0.48rem;
        max-width: 5.5rem;
        white-space: normal;
        line-height: 1.2;
    }

    #app-header .header-datetime {
        display: flex !important;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 0.05rem;
        padding: 0.18rem 0.42rem;
        border-radius: 0.55rem;
        flex: 0 0 auto;
        min-width: 5.1rem;
        max-width: none;
        overflow: visible;
    }

    #app-header #header-date {
        font-size: 0.56rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    #app-header #header-clock {
        font-size: 0.7rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    #app-header #header-clock::before {
        content: none;
    }

    #app-header #header-date span:first-child {
        display: none;
    }

    #app-header #header-date span:last-child {
        font-size: 0.56rem !important;
        margin-top: 0 !important;
    }

    .header-actions {
        gap: 0.2rem;
        flex: 0 0 auto;
    }

    #app-header .header-action-btn {
        padding: 0.3rem !important;
    }

    #app-header .header-action-btn svg {
        width: 1rem !important;
        height: 1rem !important;
    }
}

.stats-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.stats-data-table thead {
    position: sticky;
    top: 0;
    background: rgba(248, 250, 252, 0.95);
    z-index: 1;
}

.stats-data-table th,
.stats-data-table td {
    padding: 0.5rem 0.75rem;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

.stats-data-table th {
    font-weight: 700;
    color: #475569;
}

.stats-data-table tbody tr:hover {
    background: rgba(241, 245, 249, 0.8);
}

html.dark .stats-data-table thead {
    background: rgba(30, 41, 59, 0.95);
}

html.dark .stats-data-table th,
html.dark .stats-data-table td {
    border-color: #334155;
}

html.dark .stats-data-table tbody tr:hover {
    background: rgba(51, 65, 85, 0.5);
}

.chart-table-wrap {
    max-height: 360px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
}

html.dark .chart-table-wrap {
    background: rgba(30, 41, 59, 0.5);
}

/* Conversion metrics inline (team KPI size) */
.conv-kpi-mini {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.conv-kpi-mini:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.conv-kpi-mini .conv-kpi-label {
    font-size: 0.65rem;
    line-height: 1.25;
}
.conv-kpi-mini .conv-trend,
.conv-trend-wrap .conv-trend {
    margin-top: 4px;
    font-size: 0.65rem;
}

.conv-trend-wrap {
    display: block;
    min-height: 0.85rem;
}
.conv-trend {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
}
.conv-trend.up { color: #16a34a; }
.conv-trend.down { color: #dc2626; }
.conv-skeleton-mini {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 1rem;
    min-height: 88px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    border-radius: 1.5rem;
}

.glass-card-inner {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.25rem;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.06), inset 0 1px 0 rgba(255,255,255,0.7);
}

.chart-panel {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.12) 0%, rgba(59, 130, 246, 0.06) 50%, rgba(255,255,255,0.35) 100%);
    border-radius: 1.25rem;
    padding: 0.75rem;
}

.btn-capsule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-capsule-primary {
    background: #0f172a;
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

.btn-capsule-primary:hover {
    background: #000;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

.btn-capsule-green {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 45%, #16a34a 100%);
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.38);
}

.btn-capsule-green:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.45);
}

.btn-capsule-green:active {
    transform: scale(0.98);
}

.capsule-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

main.app-main {
    padding-bottom: calc(var(--mobile-nav-height) + 1.25rem + env(safe-area-inset-bottom, 0px));
}

.nav-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    min-width: 75px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-item.active {
    background: #1e293b;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(30, 41, 59, 0.2);
}

/* نوار پایین موبایل — آیکون‌های رنگی */
#mobile-nav .nav-item {
    color: #64748b;
    background: transparent;
    box-shadow: none;
    transform: none;
}

#mobile-nav .nav-item svg {
    transition: transform 0.25s ease, filter 0.25s ease;
}

#mobile-nav .nav-tab-goals svg { color: #0891b2; stroke: #0891b2; }
#mobile-nav .nav-tab-mystats svg { color: #2563eb; stroke: #2563eb; }
#mobile-nav .nav-tab-teamstats svg { color: #16a34a; stroke: #16a34a; }
#mobile-nav .nav-tab-planning svg { color: #d97706; stroke: #d97706; }
#mobile-nav .nav-tab-messenger svg { color: #3390ec; stroke: #3390ec; }
#mobile-nav .nav-tab-clips svg { color: #dc2626; stroke: #dc2626; }
#mobile-nav .nav-tab-library svg { color: #7c3aed; stroke: #7c3aed; }
#mobile-nav .nav-tab-news svg { color: #f97316; stroke: #f97316; }
#mobile-nav .nav-tab-account svg { color: #4f46e5; stroke: #4f46e5; }

#mobile-nav .nav-tab-goals.active {
    background: #ecfeff;
    color: #0891b2;
    box-shadow: 0 8px 16px -4px rgba(8, 145, 178, 0.35);
}
#mobile-nav .nav-tab-mystats.active {
    background: #eff6ff;
    color: #2563eb;
    box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.35);
}
#mobile-nav .nav-tab-teamstats.active {
    background: #f0fdf4;
    color: #16a34a;
    box-shadow: 0 8px 16px -4px rgba(22, 163, 74, 0.35);
}
#mobile-nav .nav-tab-planning.active {
    background: #fffbeb;
    color: #d97706;
    box-shadow: 0 8px 16px -4px rgba(217, 119, 6, 0.35);
}
#mobile-nav .nav-tab-messenger.active {
    background: #eff6ff;
    color: #3390ec;
    box-shadow: 0 8px 16px -4px rgba(51, 144, 236, 0.35);
}
#mobile-nav .nav-tab-clips.active {
    background: #fef2f2;
    color: #dc2626;
    box-shadow: 0 8px 16px -4px rgba(220, 38, 38, 0.35);
}
#mobile-nav .nav-tab-library.active {
    background: #f5f3ff;
    color: #7c3aed;
    box-shadow: 0 8px 16px -4px rgba(124, 58, 237, 0.35);
}
#mobile-nav .nav-tab-news.active {
    background: #fff7ed;
    color: #f97316;
    box-shadow: 0 8px 16px -4px rgba(249, 115, 22, 0.35);
}
#mobile-nav .nav-tab-account.active {
    background: #eef2ff;
    color: #4f46e5;
    box-shadow: 0 8px 16px -4px rgba(79, 70, 229, 0.35);
}

#mobile-nav .nav-item.active {
    transform: translateY(-4px);
}

#mobile-nav .nav-item.active svg {
    transform: scale(1.08);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

html.dark #mobile-nav .nav-item {
    color: #94a3b8;
}

html.dark #mobile-nav .nav-tab-goals.active { background: rgba(8, 145, 178, 0.2); }
html.dark #mobile-nav .nav-tab-mystats.active { background: rgba(37, 99, 235, 0.2); }

/* ─── تب اهداف (NetPro 2026) ─── */
.goals-viewport {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    box-sizing: border-box;
    padding-bottom: 0.5rem;
}
.goals-root { display: flex; flex-direction: column; gap: 0.85rem; }
.goals-hero { padding: 1rem 1.1rem; border-radius: 1rem; margin-bottom: 0; }
.goals-hero__row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.goals-hero__title { font-size: 1.05rem; font-weight: 800; color: #0e7490; margin: 0 0 0.25rem; }
.goals-hero__sub { font-size: 0.68rem; color: #64748b; margin: 0; line-height: 1.55; }
.goals-hero__date { font-size: 0.65rem; color: #0891b2; margin: 0.35rem 0 0; font-weight: 600; }
.goals-date-source { font-weight: 400; color: #94a3b8; font-size: 0.58rem; }
.goals-kpi-strip {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.45rem; margin-bottom: 0.65rem;
}
@media (min-width: 640px) { .goals-kpi-strip { grid-template-columns: repeat(4, 1fr); } }
.goals-kpi { background: rgba(8, 145, 178, 0.06); border: 1px solid rgba(8, 145, 178, 0.12); border-radius: 0.75rem; padding: 0.55rem; text-align: center; }
.goals-kpi span { display: block; font-size: 0.58rem; color: #64748b; margin-bottom: 0.15rem; }
.goals-kpi strong { font-size: 0.88rem; color: #0891b2; font-weight: 800; }
.goals-kpi--warn strong { color: #dc2626; }
.goals-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    padding: 0.35rem;
    border-radius: 0.85rem;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.goals-toolbar::-webkit-scrollbar { display: none; }
.goals-filter-pill {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
}
@media (max-width: 640px) {
    .goals-toolbar {
        margin-inline: -0.15rem;
        padding: 0.3rem 0.35rem;
        border-radius: 0.75rem;
    }
    .goals-filter-pill {
        padding: 0.3rem 0.6rem;
        font-size: 0.62rem;
    }
}
.goals-filter-pill.is-active { background: #ecfeff; border-color: #0891b2; color: #0e7490; }
.goals-list { display: flex; flex-direction: column; gap: 0.75rem; }
.goals-box-section .goals-box__accordion-head .goals-box__title {
    flex: 1;
    min-width: 0;
    text-align: right;
}
.goals-box__body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.goals-box__title { font-size: 0.9rem; font-weight: 800; color: #0f172a; margin: 0; line-height: 1.35; }
.goals-box__add-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.8rem;
    border: 1.5px dashed rgba(22, 163, 74, 0.45);
    background: rgba(240, 253, 244, 0.45);
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.goals-box__add-btn:hover {
    background: rgba(220, 252, 231, 0.72);
    border-color: #16a34a;
    box-shadow: 0 3px 12px rgba(22, 163, 74, 0.14);
}
.goals-box__add-btn:active { transform: scale(0.99); }
.goals-box__add-icon {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
    border: 1px dashed rgba(22, 163, 74, 0.35);
    flex-shrink: 0;
}
.goals-box__add-text { letter-spacing: -0.01em; }
.goals-box__spacer { height: 0.4rem; flex-shrink: 0; }

/* ── دکمه افزودن گام (glass + cyan) ── */
.goals-add-step-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}
.goals-add-step-btn__icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #22d3ee, #0891b2);
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.28);
    flex-shrink: 0;
}
.goals-add-step-btn--row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.8rem;
    border: 1.5px dashed rgba(8, 145, 178, 0.38);
    background: rgba(236, 254, 255, 0.42);
    color: #0e7490;
    font-size: 0.7rem;
    font-weight: 700;
}
.goals-add-step-btn--row .goals-add-step-btn__text { letter-spacing: -0.01em; }
.goals-add-step-btn--row:hover {
    background: rgba(207, 250, 254, 0.65);
    border-color: #0891b2;
    box-shadow: 0 3px 12px rgba(8, 145, 178, 0.12);
}
.goals-add-step-btn--row:active { transform: scale(0.99); }
.goals-add-step-composer {
    display: flex;
    align-items: stretch;
    margin-top: 0.5rem;
    border: 1px solid rgba(8, 145, 178, 0.22);
    border-radius: 0.8rem;
    overflow: hidden;
    background: rgba(248, 250, 252, 0.85);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.goals-add-step-composer .goals-step-add-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0.5rem 0.65rem;
    font-size: 0.72rem;
}
.goals-add-step-composer .goals-step-add-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.55);
}
.goals-add-step-btn--attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.7rem;
    background: rgba(236, 254, 255, 0.55);
    border-inline-start: 1px solid rgba(8, 145, 178, 0.18);
}
.goals-add-step-btn--attach:hover {
    background: rgba(207, 250, 254, 0.75);
}
.goals-add-step-btn--attach:hover .goals-add-step-btn__icon {
    transform: scale(1.06);
    box-shadow: 0 3px 10px rgba(8, 145, 178, 0.35);
}
.goals-add-step-btn--attach .goals-add-step-btn__icon {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.95rem;
    transition: transform 0.12s, box-shadow 0.12s;
}
/* ── فیلتر حوزه‌های رویال مایند ── */
.goals-royal-toolbar {
    display: flex; flex-wrap: nowrap; gap: 0.35rem; margin-bottom: 0.55rem;
    padding: 0.35rem; border-radius: 0.85rem;
    background: rgba(248, 250, 252, 0.85); border: 1px solid #e2e8f0;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.goals-royal-toolbar::-webkit-scrollbar { display: none; }
.goals-royal-pill-filter {
    flex-shrink: 0; scroll-snap-align: start;
    padding: 0.32rem 0.65rem; border-radius: 999px; font-size: 0.62rem; font-weight: 700;
    border: 1px solid transparent; background: #fff; color: #64748b; cursor: pointer;
    font-family: inherit; white-space: nowrap; transition: background 0.15s, border-color 0.15s;
}
@media (max-width: 640px) {
    .goals-royal-toolbar {
        margin-inline: -0.15rem;
        padding: 0.3rem 0.35rem;
        border-radius: 0.75rem;
    }
    .goals-royal-pill-filter {
        padding: 0.26rem 0.48rem;
        font-size: 0.56rem;
    }
}
.goals-royal-pill-filter.is-active { background: #ecfeff; border-color: #0891b2; color: #0e7490; }
.goals-royal-pill-filter.royal--financial.is-active { background: #fefce8; border-color: #ca8a04; color: #a16207; }
.goals-royal-pill-filter.royal--career.is-active { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; }
.goals-royal-pill-filter.royal--lifestyle.is-active { background: #ecfdf5; border-color: #16a34a; color: #15803d; }
.goals-royal-pill-filter.royal--mental.is-active { background: #f5f3ff; border-color: #7c3aed; color: #6d28d9; }
.goals-royal-pill-filter.royal--fitness.is-active { background: #fff1f2; border-color: #e11d48; color: #be123c; }
.goals-royal-pill-filter.royal--relationships.is-active { background: #fdf2f8; border-color: #db2777; color: #be185d; }

/* ── کارت هدف با تم حوزه (accent ملایم — پس‌زمینه خنثی برای خوانایی) ── */
.goals-item--royal {
    border-width: 1px;
    border-style: solid;
    border-color: #e2e8f0;
    border-inline-start-width: 3px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.goals-item--royal.royal--financial { border-inline-start-color: #ca8a04; }
.goals-item--royal.royal--career { border-inline-start-color: #2563eb; }
.goals-item--royal.royal--lifestyle { border-inline-start-color: #16a34a; }
.goals-item--royal.royal--mental { border-inline-start-color: #7c3aed; }
.goals-item--royal.royal--fitness { border-inline-start-color: #e11d48; }
.goals-item--royal.royal--relationships { border-inline-start-color: #db2777; }
.goals-item--royal.is-open { box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08); }

/* هدر کارت: عنوان + نوار پیشرفت */
.goals-item--royal .goals-item__summary {
    padding: 0.65rem 0.7rem 0.7rem;
    border-radius: 0;
    background: #fff;
}
.goals-item--royal .goals-item__drawer {
    background: #f8fafc;
    border-top-color: #e2e8f0;
}
.goals-item--royal .goals-item__title { color: #0f172a; }

.goals-item--royal.royal--financial .goals-item__rank { background: #fef9c3; color: #a16207; }
.goals-item--royal.royal--career .goals-item__rank { background: #eff6ff; color: #1d4ed8; }
.goals-item--royal.royal--lifestyle .goals-item__rank { background: #ecfdf5; color: #15803d; }
.goals-item--royal.royal--mental .goals-item__rank { background: #f5f3ff; color: #6d28d9; }
.goals-item--royal.royal--fitness .goals-item__rank { background: #fff1f2; color: #be123c; }
.goals-item--royal.royal--relationships .goals-item__rank { background: #fdf2f8; color: #be185d; }

.goals-item__cat-icon { font-size: 0.95rem; flex-shrink: 0; line-height: 1; }
.goals-royal-pill {
    font-size: 0.58rem; font-weight: 700; border-radius: 999px; padding: 0.15rem 0.45rem;
    background: rgba(8, 145, 178, 0.08); color: #0e7490; white-space: nowrap;
}
.goals-item--royal.royal--financial .goals-royal-pill { background: rgba(202, 138, 4, 0.12); color: #a16207; }
.goals-item--royal.royal--career .goals-royal-pill { background: rgba(37, 99, 235, 0.1); color: #1d4ed8; }
.goals-item--royal.royal--lifestyle .goals-royal-pill { background: rgba(22, 163, 74, 0.1); color: #15803d; }
.goals-item--royal.royal--mental .goals-royal-pill { background: rgba(124, 58, 237, 0.1); color: #6d28d9; }
.goals-item--royal.royal--fitness .goals-royal-pill { background: rgba(225, 29, 72, 0.1); color: #be123c; }
.goals-item--royal.royal--relationships .goals-royal-pill { background: rgba(219, 39, 119, 0.1); color: #be185d; }
.goals-meta-legacy { opacity: 0.75; font-style: italic; }

/* ── آکاردئون چرایی و روش اجرا ── */
.goals-psyche-accordion {
    margin-top: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #fff;
}
.goals-psyche-accordion__toggle {
    width: 100%; display: flex; align-items: center; gap: 0.35rem;
    padding: 0.45rem 0.6rem; border: none; background: #f8fafc;
    font-size: 0.68rem; font-weight: 700; color: #475569; cursor: pointer;
    font-family: inherit; text-align: right;
}
.goals-psyche-accordion__body { display: none; padding: 0 0.65rem 0.6rem; background: #fff; }
.goals-psyche-accordion.is-open .goals-psyche-accordion__body { display: block; }
.goals-psyche-block h5 { margin: 0.35rem 0 0.2rem; font-size: 0.62rem; color: #64748b; font-weight: 800; }
.goals-psyche-block p { margin: 0; font-size: 0.68rem; color: #334155; line-height: 1.6; white-space: pre-wrap; }

/* ── ویزارد مرحله‌ای فرم مودال ── */
.goals-form-wizard { margin-bottom: 0.75rem; }
.goals-form-wizard__caption {
    font-size: 0.62rem; font-weight: 700; color: #0891b2; margin: 0 0 0.45rem; text-align: center;
}
.goals-form-wizard__track {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem;
}
.goals-form-wizard__step {
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    padding: 0.4rem 0.25rem; border-radius: 0.65rem;
    border: 1px solid #e2e8f0; background: #f8fafc; transition: border-color 0.15s, background 0.15s;
}
.goals-form-wizard__num {
    width: 1.35rem; height: 1.35rem; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.62rem; font-weight: 800; color: #64748b; background: #fff; border: 1px solid #e2e8f0;
}
.goals-form-wizard__label { font-size: 0.58rem; font-weight: 700; color: #64748b; text-align: center; line-height: 1.35; }
.goals-form-wizard__step.is-active { border-color: #0891b2; background: #ecfeff; }
.goals-form-wizard__step.is-active .goals-form-wizard__num { background: #0891b2; border-color: #0891b2; color: #fff; }
.goals-form-wizard__step.is-active .goals-form-wizard__label { color: #0e7490; }
.goals-form-wizard__step.is-done { border-color: #a5f3fc; background: rgba(236, 254, 255, 0.5); }
.goals-form-wizard__step.is-done .goals-form-wizard__num { background: #06b6d4; border-color: #06b6d4; color: #fff; }
.goals-form-step-intro {
    font-size: 0.65rem; color: #64748b; margin: 0 0 0.15rem; line-height: 1.55;
    padding: 0.45rem 0.55rem; border-radius: 0.55rem; background: rgba(8, 145, 178, 0.05);
    border: 1px solid rgba(8, 145, 178, 0.1);
}
.goals-form-wizard-actions { justify-content: flex-end; }
.goals-form-wizard-actions .goals-btn--primary { margin-inline-start: auto; }
.goals-form-wizard-actions #goals-form-wizard-back { margin-inline-end: auto; }

/* ── تب‌های فرم مودال (قدیمی — نگه‌داری برای سازگاری) ── */
.goals-form-tabs {
    display: flex; gap: 0.25rem; padding: 0.25rem; margin-bottom: 0.65rem;
    border-radius: 0.75rem; background: rgba(241, 245, 249, 0.9); border: 1px solid #e2e8f0;
}
.goals-form-tab {
    flex: 1; border: 1px solid transparent; background: transparent; border-radius: 0.55rem;
    padding: 0.42rem 0.35rem; font-size: 0.62rem; font-weight: 700; color: #64748b;
    cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.goals-form-tab.is-active { background: #fff; border-color: #a5f3fc; color: #0e7490; box-shadow: 0 1px 4px rgba(8, 145, 178, 0.12); }
.goals-form-panel { display: none; flex-direction: column; gap: 0.65rem; }
.goals-form-panel.is-active { display: flex; }
.goals-field--wide textarea { min-height: 4.5rem; resize: vertical; }
.goals-field--check { flex-direction: row; align-items: center; gap: 0.45rem; cursor: pointer; }
.goals-field--check input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: #0891b2; }
.goals-form-hint { font-size: 0.6rem; color: #94a3b8; margin: -0.35rem 0 0.15rem; line-height: 1.5; }
.goals-form-hint--royal { margin-top: -0.25rem; margin-bottom: 0.15rem; color: #0e7490; font-weight: 600; }
.goals-form-legacy { font-size: 0.65rem; color: #64748b; border: 1px dashed #e2e8f0; border-radius: 0.65rem; padding: 0.45rem 0.55rem; }
.goals-form-legacy summary { cursor: pointer; font-weight: 700; }
.goals-jalali-field.is-waived { opacity: 0.45; pointer-events: none; }

/* ── بازه زمانی — تقویم واحد ── */
.goals-no-deadline-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    direction: rtl;
    text-align: right;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #f8fafc, #fff);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.goals-no-deadline-option:hover { border-color: #cbd5e1; background: #f1f5f9; }
.goals-no-deadline-option input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: #0891b2;
    cursor: pointer;
}
.goals-no-deadline-option__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}
.goals-no-deadline-option__title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
}
.goals-no-deadline-option__hint {
    font-size: 0.62rem;
    color: #64748b;
    line-height: 1.45;
}
.goals-range-schedule { display: flex; flex-direction: column; gap: 0.55rem; }
.goals-range-schedule.is-waived { opacity: 0.4; pointer-events: none; user-select: none; }
.goals-range-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
@media (max-width: 480px) { .goals-range-summary { grid-template-columns: 1fr; } }
.goals-range-chip {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0.65rem;
    background: #fff;
    text-align: right;
    direction: rtl;
}
.goals-range-chip--start { border-color: #bfdbfe; background: #eff6ff; }
.goals-range-chip--end { border-color: #a7f3d0; background: #ecfdf5; }
.goals-range-chip__label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.2rem;
}
.goals-range-chip__value {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    color: #0f172a;
}
.goals-range-chip__value.is-missing { color: #94a3b8; font-weight: 600; }
.goals-range-hint {
    font-size: 0.62rem;
    color: #64748b;
    margin: 0;
    text-align: right;
    line-height: 1.5;
}
.goals-range-cal { margin-top: 0.15rem; }

.goals-sortable-list { display: flex; flex-direction: column; gap: 0.45rem; }
.goals-item {
    border: 1px solid #e2e8f0; border-radius: 0.75rem; background: #fff;
    overflow: hidden; transition: box-shadow 0.2s;
}
.goals-item.is-open { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); border-color: #cbd5e1; }
.goals-item--ghost { opacity: 0.45; }
.goals-item__head-row { display: flex; align-items: stretch; gap: 0; }
.goals-item__drag {
    display: flex; align-items: center; justify-content: center; width: 1.5rem;
    color: #cbd5e1; cursor: grab; font-size: 0.7rem; letter-spacing: -2px;
    user-select: none; flex-shrink: 0; background: #f8fafc; border-inline-start: 1px solid #f1f5f9;
}
.goals-item__drag:active { cursor: grabbing; }
.goals-item__rank {
    display: flex; align-items: center; justify-content: center; width: 1.35rem;
    font-size: 0.58rem; font-weight: 800; color: #475569; background: #f1f5f9;
    flex-shrink: 0; border-inline-start: 1px solid #f1f5f9;
}
.goals-item__summary {
    flex: 1; display: flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 0.65rem; border: none; background: transparent; cursor: pointer;
    text-align: right; font-family: inherit; min-width: 0;
}
.goals-item__summary-body {
    flex: 1; display: flex; flex-direction: column; gap: 0.35rem; min-width: 0;
}
.goals-item__title-wrap { display: flex; align-items: center; gap: 0.3rem; width: 100%; min-width: 0; }
.goals-item__title { font-size: 0.78rem; font-weight: 800; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.goals-item__inline-progress { width: 100%; }
/* ── نوار پیشرفت مدرن زیر عنوان هدف ── */
.goals-inline-progress {
    width: 100%;
    padding: 0.45rem 0.55rem 0.5rem;
    border-radius: 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.goals-inline-progress__head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.35rem; gap: 0.35rem;
}
.goals-inline-progress__label {
    font-size: 0.58rem; font-weight: 800; color: #64748b;
    letter-spacing: 0.02em;
}
.goals-inline-progress__label::before {
    content: '▰'; margin-inline-end: 0.25rem; font-size: 0.52rem; color: #64748b;
}
.goals-inline-progress__pct {
    font-size: 0.62rem; font-weight: 800; color: #334155;
    font-variant-numeric: tabular-nums;
}
.goals-inline-progress__track {
    position: relative;
    height: 0.52rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
    box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.15);
}
.goals-inline-progress__fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s ease, box-shadow 0.45s ease;
    position: relative;
}
.goals-inline-progress__fill::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 55%);
    pointer-events: none;
}
.goals-item__inline-progress .goals-progress__bar { height: 0.38rem; }
.goals-item__drawer { display: none; padding: 0.65rem 0.65rem 0.75rem; padding-inline-start: 2.8rem; border-top: 1px solid #e2e8f0; }
.goals-item.is-open .goals-item__drawer { display: block; }
.goals-item__drawer .goals-card__meta { margin-top: 0.5rem; }
html.dark .goals-box__title, html.dark .goals-item__title { color: #e2e8f0; }
html.dark .goals-item { background: #1e293b; border-color: #334155; }
html.dark .goals-item__drag, html.dark .goals-item__rank { background: #0f172a; border-color: #334155; }
html.dark .goals-item.is-open { border-color: #475569; }
html.dark .goals-inline-progress {
    background: #0f172a;
    border-color: #334155;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
html.dark .goals-inline-progress__track { background: rgba(0, 0, 0, 0.28); }
html.dark .goals-inline-progress__label { color: #94a3b8; }
html.dark .goals-inline-progress__label::before { color: #94a3b8; }
html.dark .goals-inline-progress__pct { color: #e2e8f0; }
.goals-section .section-accordion-body { display: none; padding: 0.85rem 1rem 1rem; }
.goals-section.is-open .section-accordion-body { display: block; }
.goals-section-toggle { width: 100%; }
.goals-panel { padding: 1rem 1.15rem; }
.goals-form { display: flex; flex-direction: column; gap: 0.65rem; }
.goals-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
@media (max-width: 480px) { .goals-form-grid { grid-template-columns: 1fr; } }
.goals-field { display: flex; flex-direction: column; gap: 0.3rem; }
.goals-field > span, .goals-field-label { font-size: 0.68rem; font-weight: 700; color: #475569; }
.goals-field input, .goals-field select, .goals-field textarea {
    width: 100%; border: 1px solid #e2e8f0; border-radius: 0.75rem;
    padding: 0.55rem 0.7rem; font-size: 0.78rem; background: #fff; font-family: inherit;
}
.goals-form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.goals-btn {
    border: none; border-radius: 0.75rem; padding: 0.55rem 0.95rem;
    font-size: 0.72rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.goals-btn--primary { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #fff; }
.goals-btn--ghost { background: #f1f5f9; color: #334155; }
.goals-btn--danger { background: #fef2f2; color: #b91c1c; }
.goals-btn--sm { padding: 0.4rem 0.65rem; font-size: 0.68rem; }
.goals-card { padding: 0.95rem 1rem; }
.goals-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.45rem; }
.goals-card__title { font-size: 0.88rem; font-weight: 800; color: #0f172a; margin: 0; }
.goals-honor-badge { font-size: 0.85rem; }
.goals-status { font-size: 0.62rem; font-weight: 700; border-radius: 999px; padding: 0.2rem 0.55rem; }
.goals-status--active { background: #ecfeff; color: #0e7490; }
.goals-status--done { background: #ecfdf5; color: #047857; }
.goals-status--late { background: #fef2f2; color: #b91c1c; }
.goals-card__meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; font-size: 0.62rem; color: #475569; }
.goals-card__meta span { background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; padding: 0.12rem 0.4rem; }
.goals-deadline-countdown {
    text-align: center;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.55rem;
    border-radius: 0.85rem;
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #eff6ff, #fff);
}
.goals-deadline-countdown__label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 0.3rem;
    line-height: 1.45;
    word-break: break-word;
}
.goals-deadline-countdown__value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e3a8a;
    direction: ltr;
}
.goals-countdown-units {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.35rem;
    direction: ltr;
}
.goals-countdown-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.25rem 0.4rem;
    border-radius: 0.5rem;
    background: rgba(30, 58, 138, 0.08);
    border: 1px solid rgba(30, 58, 138, 0.12);
}
.goals-countdown-unit__val {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    color: #1e3a8a;
}
.goals-countdown-unit__lbl {
    font-size: 0.58rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.1rem;
}
.goals-deadline-countdown--expired {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fef2f2, #fff);
}
.goals-deadline-countdown--expired .goals-deadline-countdown__label { color: #b91c1c; }
.goals-deadline-countdown--expired .goals-deadline-countdown__value { color: #b91c1c; }
.goals-deadline-countdown--done {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ecfdf5, #fff);
}
.goals-deadline-countdown--done .goals-deadline-countdown__label { color: #047857; }
.goals-deadline-countdown--done .goals-deadline-countdown__value { color: #065f46; font-size: 0.88rem; }
.goals-deadline-countdown--open {
    border-color: #e2e8f0;
    background: #f8fafc;
}
.goals-deadline-countdown--open .goals-deadline-countdown__label { color: #64748b; }
.goals-deadline-countdown--open .goals-deadline-countdown__value { color: #475569; font-size: 0.82rem; }
.goals-priority--high { color: #b91c1c !important; background: #fef2f2 !important; }
.goals-priority--mid { color: #b45309 !important; background: #fffbeb !important; }
.goals-priority--low { color: #0369a1 !important; background: #f0f9ff !important; }
.goals-progress__bar { height: 0.45rem; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.goals-progress__fill { height: 100%; transition: width 0.35s; }
.goals-progress__labels { display: flex; justify-content: space-between; font-size: 0.68rem; color: #475569; margin-top: 0.3rem; }
.goals-card__desc { font-size: 0.68rem; color: #64748b; margin: 0.45rem 0 0; }
.goals-card-steps { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid #f1f5f9; }
.goals-steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.goals-step-item { display: flex; align-items: flex-start; gap: 0.4rem; padding: 0.4rem 0.5rem; border-radius: 0.65rem; background: #fff; border: 1px solid #e2e8f0; }
.goals-step-item.is-done { background: #f0fdf4; border-color: #bbf7d0; }
.goals-step-check { width: 1.45rem; height: 1.45rem; border-radius: 0.4rem; border: 2px solid #cbd5e1; background: #fff; color: #059669; font-weight: 800; cursor: pointer; flex-shrink: 0; }
.goals-step-item.is-done .goals-step-check { background: #059669; border-color: #059669; color: #fff; }
.goals-step-title { font-size: 0.74rem; font-weight: 600; display: block; }
.goals-step-meta { font-size: 0.6rem; color: #64748b; }
.goals-step-remove { border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 1rem; }
.goals-add-step-inline { display: flex; gap: 0.35rem; margin-top: 0.45rem; }
.goals-step-add-input { flex: 1; border: 1px dashed #cbd5e1; border-radius: 0.65rem; padding: 0.4rem 0.55rem; font-size: 0.72rem; }
.goals-share-row { display: flex; gap: 0.35rem; margin-top: 0.5rem; flex-wrap: wrap; }
.goals-share-input { flex: 1; min-width: 8rem; font-size: 0.6rem; padding: 0.35rem; border: 1px dashed #cbd5e1; border-radius: 0.5rem; direction: ltr; }
.goals-card__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.goals-empty-hint { font-size: 0.72rem; color: #94a3b8; text-align: center; padding: 1rem 0.5rem; margin: 0; }
.goals-chart-wrap { position: relative; height: 200px; }
.goals-team-feed { list-style: none; padding: 0; margin: 0; }
.goals-team-feed li { display: flex; justify-content: space-between; padding: 0.5rem 0.65rem; border-radius: 0.65rem; background: #f8fafc; margin-bottom: 0.35rem; font-size: 0.74rem; }
.goals-team-feed__pct { font-weight: 800; color: #0891b2; }
.goals-report-timeline { list-style: none; padding: 0; margin: 0; }
.goals-report-timeline li { padding: 0.5rem 0.65rem; border-radius: 0.65rem; background: #f8fafc; border-right: 3px solid #0891b2; margin-bottom: 0.4rem; }
.goals-report-timeline__goal { font-size: 0.6rem; color: #64748b; }
.goals-report-timeline__step { font-size: 0.76rem; font-weight: 700; }
.goals-jalali-btn { width: 100%; text-align: right; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 0.55rem 0.7rem; font-size: 0.78rem; background: #fff; cursor: pointer; font-family: inherit; }
.goals-jalali-cal { margin-top: 0.35rem; }
.goals-form-steps-block { border-top: 1px solid #f1f5f9; padding-top: 0.6rem; }
.goals-form-steps-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.45rem; font-size: 0.72rem; font-weight: 700; }
.goals-form-step-row { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.35rem; }
.goals-form-step-num { font-size: 0.62rem; color: #94a3b8; width: 1.1rem; text-align: center; }
.goals-form-step-input { flex: 1; border: 1px solid #e2e8f0; border-radius: 0.65rem; padding: 0.45rem 0.6rem; font-size: 0.74rem; }
.goals-form-step-remove { border: none; background: #fef2f2; color: #b91c1c; width: 1.65rem; height: 1.65rem; border-radius: 0.45rem; cursor: pointer; }
.goals-modal-backdrop { position: fixed; inset: 0; z-index: 120; background: rgba(15,23,42,0.45); display: flex; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
.goals-modal { width: 100%; max-width: 420px; padding: 1rem 1.15rem; max-height: 90vh; overflow-y: auto; }
.goals-modal--wide { max-width: 520px; }
.goals-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.goals-modal__head h3 { margin: 0; font-size: 0.95rem; font-weight: 800; }
.goals-modal__close { border: none; background: transparent; font-size: 1.35rem; cursor: pointer; color: #94a3b8; }
html.dark .goals-hero__title { color: #67e8f9; }
html.dark .goals-card__title { color: #e2e8f0; }
html.dark .goals-field input, html.dark .goals-field select, html.dark .goals-field textarea,
html.dark .goals-jalali-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html.dark .goals-step-item, html.dark .goals-team-feed li, html.dark .goals-report-timeline li { background: #1e293b; }
html.dark .goals-filter-pill { background: #1e293b; border-color: #334155; color: #94a3b8; }
html.dark .goals-filter-pill.is-active { background: rgba(8,145,178,0.2); color: #67e8f9; }
html.dark .goals-toolbar {
    background: rgba(30, 41, 59, 0.75);
    border-color: #334155;
}
html.dark .goals-box__add-btn {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(34, 197, 94, 0.38);
    color: #86efac;
}
html.dark .goals-box__add-btn:hover {
    background: rgba(22, 163, 74, 0.18);
    border-color: #22c55e;
}
html.dark .goals-box__add-icon {
    color: #86efac;
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(34, 197, 94, 0.35);
}
html.dark .goals-add-step-btn--row {
    background: rgba(8, 145, 178, 0.1);
    border-color: rgba(8, 145, 178, 0.35);
    color: #67e8f9;
}
html.dark .goals-add-step-btn--row:hover { background: rgba(8, 145, 178, 0.18); }
html.dark .goals-add-step-composer {
    background: rgba(15, 23, 42, 0.65);
    border-color: #334155;
}
html.dark .goals-add-step-composer .goals-step-add-input { color: #e2e8f0; }
html.dark .goals-add-step-composer .goals-step-add-input:focus { background: rgba(30, 41, 59, 0.6); }
html.dark .goals-add-step-btn--attach { background: rgba(8, 145, 178, 0.12); border-color: #334155; }
html.dark .goals-add-step-btn--attach:hover { background: rgba(8, 145, 178, 0.22); }
html.dark .goals-royal-pill-filter { background: #1e293b; color: #94a3b8; }
html.dark .goals-item--royal {
    background: #1e293b;
    border-color: #334155;
}
html.dark .goals-item--royal .goals-item__summary { background: #1e293b; }
html.dark .goals-item--royal .goals-item__drawer { background: #0f172a; border-top-color: #334155; }
html.dark .goals-item--royal .goals-item__title { color: #f1f5f9; }
html.dark .goals-psyche-accordion { background: #1e293b; border-color: #334155; }
html.dark .goals-psyche-accordion__toggle { background: #0f172a; color: #cbd5e1; }
html.dark .goals-psyche-accordion__body { background: #1e293b; }
html.dark .goals-psyche-block h5 { color: #94a3b8; }
html.dark .goals-psyche-block p { color: #cbd5e1; }
html.dark .goals-card__meta span { background: #0f172a; border-color: #334155; color: #cbd5e1; }
html.dark .goals-deadline-countdown { border-color: #1e3a8a; background: linear-gradient(180deg, #0f172a, #1e293b); }
html.dark .goals-deadline-countdown__label { color: #93c5fd; }
html.dark .goals-deadline-countdown__value { color: #bfdbfe; }
html.dark .goals-countdown-unit { background: rgba(30, 58, 138, 0.35); border-color: rgba(147, 197, 253, 0.2); }
html.dark .goals-countdown-unit__val { color: #bfdbfe; }
html.dark .goals-countdown-unit__lbl { color: #93c5fd; }
html.dark .goals-deadline-countdown--expired { border-color: #7f1d1d; background: linear-gradient(180deg, #1c0a0a, #1e293b); }
html.dark .goals-deadline-countdown--expired .goals-deadline-countdown__label,
html.dark .goals-deadline-countdown--expired .goals-deadline-countdown__value { color: #fca5a5; }
html.dark .goals-deadline-countdown--done { border-color: #065f46; background: linear-gradient(180deg, #052e16, #1e293b); }
html.dark .goals-deadline-countdown--open { border-color: #334155; background: #0f172a; }
html.dark .goals-step-item { background: #0f172a; border-color: #334155; }
html.dark .goals-step-item.is-done { background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.35); }
html.dark .goals-form-wizard__step { background: #0f172a; border-color: #334155; }
html.dark .goals-form-wizard__step.is-active { background: rgba(8, 145, 178, 0.15); border-color: #0891b2; }
html.dark .goals-form-wizard__label { color: #94a3b8; }
html.dark .goals-form-wizard__step.is-active .goals-form-wizard__label { color: #67e8f9; }
html.dark .goals-form-step-intro { background: rgba(8, 145, 178, 0.08); border-color: #334155; color: #94a3b8; }
html.dark .goals-form-tabs { background: #0f172a; border-color: #334155; }
html.dark .goals-form-tab.is-active { background: #1e293b; border-color: #0891b2; color: #67e8f9; }
html.dark .goals-form-legacy { border-color: #334155; }
html.dark .goals-no-deadline-option {
    background: linear-gradient(180deg, #0f172a, #1e293b);
    border-color: #334155;
}
html.dark .goals-no-deadline-option:hover { border-color: #475569; background: #1e293b; }
html.dark .goals-no-deadline-option__title { color: #e2e8f0; }
html.dark .goals-no-deadline-option__hint { color: #94a3b8; }
html.dark .goals-range-chip { background: #0f172a; border-color: #334155; }
html.dark .goals-range-chip--start { background: rgba(30, 58, 138, 0.25); border-color: #1e3a8a; }
html.dark .goals-range-chip--end { background: rgba(6, 78, 59, 0.25); border-color: #065f46; }
html.dark .goals-range-chip__value { color: #e2e8f0; }
html.dark .goals-range-hint { color: #94a3b8; }
html.dark #mobile-nav .nav-tab-teamstats.active { background: rgba(22, 163, 74, 0.2); }
html.dark #mobile-nav .nav-tab-planning.active { background: rgba(217, 119, 6, 0.2); }
html.dark #mobile-nav .nav-tab-messenger.active { background: rgba(51, 144, 236, 0.2); }
html.dark #mobile-nav .nav-tab-clips.active { background: rgba(220, 38, 38, 0.2); }
html.dark #mobile-nav .nav-tab-library.active { background: rgba(124, 58, 237, 0.2); }
html.dark #mobile-nav .nav-tab-news.active { background: rgba(249, 115, 22, 0.2); }
html.dark #mobile-nav .nav-tab-account.active { background: rgba(79, 70, 229, 0.2); }

/* ─── تقویم آمار تیم ─── */
.team-cal-section { grid-column: 1 / -1; width: 100%; }
.team-cal-section__title { font-size: 0.9rem; font-weight: 800; color: #1e293b; margin: 0 0 0.25rem; }
.team-cal-section__sub { font-size: 0.65rem; color: #64748b; margin: 0; line-height: 1.5; }
.team-cal-section__head { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.75rem; }
.team-cal-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
    border: 2px solid #7dd3fc;
    box-shadow: 0 4px 14px rgba(14, 116, 144, 0.1);
}
.team-cal-filter-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.team-cal-filter-panel__label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0c4a6e;
    letter-spacing: -0.01em;
}
.team-cal-filter-panel__badge {
    flex-shrink: 0;
    font-size: 0.58rem;
    font-weight: 800;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}
.team-cal-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem;
    border-radius: 0.85rem;
    background: #ffffff;
    border: 1px solid #bae6fd;
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.team-cal-filter::-webkit-scrollbar { display: none; }
.team-cal-filter-pill {
    flex-shrink: 0;
    scroll-snap-align: start;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.42rem 0.85rem;
    font-size: 0.68rem;
    font-weight: 800;
    font-family: inherit;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
@media (max-width: 640px) {
    .team-cal-filter-panel {
        padding: 0.65rem 0.7rem;
        border-radius: 0.9rem;
    }
    .team-cal-filter-panel__label { font-size: 0.72rem; }
    .team-cal-filter {
        padding: 0.4rem;
        border-radius: 0.75rem;
    }
    .team-cal-filter-pill {
        padding: 0.38rem 0.7rem;
        font-size: 0.64rem;
    }
}
.team-kpi-filter-bar {
    margin-bottom: 0.5rem;
}
.team-cal-filter-pill:hover,
.team-cal-filter-pill:focus-visible {
    border-color: #38bdf8;
    color: #0369a1;
    background: #f0f9ff;
    outline: none;
}
.team-cal-filter-pill.is-active {
    background: linear-gradient(180deg, #ecfdf5, #d1fae5);
    border-color: #16a34a;
    color: #15803d;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.18);
}
.team-cal-date-source { font-size: 0.58rem; color: #94a3b8; margin: 0.15rem 0 0; }
.team-cal-layout { display: flex; flex-direction: column; gap: 0.85rem; width: 100%; max-width: 100%; }
.team-cal-hint { font-size: 0.65rem; color: #64748b; margin: 0; line-height: 1.55; }
.team-cal-hint.is-warn { color: #b45309; font-weight: 700; }
.team-cal-calendar-panel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.team-cal-calendar-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.team-cal-calendar-panel__label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #334155;
}
.team-cal-calendar-panel__status {
    font-size: 0.68rem;
    font-weight: 800;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
}
.team-cal-calendar { max-width: 100%; width: 100%; border: none; background: transparent; padding: 0; min-height: auto; }
.team-cal-calendar.is-awaiting-metric { opacity: 0.82; }
.team-cal-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    margin: 0;
    padding: 0.55rem 0 0;
    list-style: none;
    border-top: 1px dashed #cbd5e1;
}
.team-cal-calendar-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
}
.team-cal-legend-swatch {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.25rem;
    border: 1.5px solid #cbd5e1;
    flex-shrink: 0;
}
.team-cal-legend-swatch--today { background: #eff6ff; border-color: #3b82f6; box-shadow: inset 0 0 0 1px #93c5fd; }
.team-cal-legend-swatch--data { background: #ecfdf5; border-color: #16a34a; }
.team-cal-legend-swatch--selected { background: linear-gradient(180deg, #3b82f6, #2563eb); border-color: #1d4ed8; }
.team-cal-selected-label { font-size: 0.72rem; font-weight: 700; color: #334155; margin: 0 0 0.65rem; }
.team-cal-meta { font-size: 0.62rem; color: #64748b; margin: 0 0 0.65rem; }
.team-cal-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
@media (min-width: 480px) { .team-cal-metrics { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .team-cal-metrics { grid-template-columns: repeat(5, 1fr); } }
.team-cal-metric { padding: 0.65rem 0.5rem; text-align: center; display: flex; flex-direction: column; gap: 0.2rem; }
.team-cal-metric__val { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.team-cal-metric__lbl { font-size: 0.58rem; color: #64748b; line-height: 1.35; }
.team-cal-empty { font-size: 0.72rem; color: #94a3b8; text-align: center; padding: 1.25rem 0.5rem; margin: 0; }
.team-cal-modal-backdrop {
    position: fixed; inset: 0; z-index: 130;
    background: rgba(15, 23, 42, 0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; overflow-y: auto;
}
.team-cal-modal-backdrop.hidden { display: none; }
.team-cal-modal {
    width: 100%; max-width: 420px; padding: 1rem 1.15rem;
    max-height: 90vh; overflow-y: auto;
}
.team-cal-modal__head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 0.75rem; margin-bottom: 0.75rem;
}
.team-cal-modal__head h3 { margin: 0; font-size: 0.95rem; font-weight: 800; color: #1e293b; }
.team-cal-modal__sub { font-size: 0.62rem; color: #64748b; margin: 0.25rem 0 0; }
.team-cal-modal__close {
    border: none; background: transparent; font-size: 1.35rem;
    cursor: pointer; color: #94a3b8; line-height: 1; flex-shrink: 0;
}
html.dark .team-cal-modal__head h3 { color: #e2e8f0; }
html.dark .team-cal-section__title { color: #e2e8f0; }
html.dark .team-cal-selected-label { color: #cbd5e1; }
html.dark .team-cal-filter-panel {
    background: linear-gradient(180deg, rgba(8, 51, 68, 0.55), rgba(15, 23, 42, 0.9));
    border-color: #0e7490;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
html.dark .team-cal-filter-panel__label { color: #bae6fd; }
html.dark .team-cal-filter-panel__badge {
    color: #7dd3fc;
    background: rgba(14, 116, 144, 0.35);
    border-color: #0e7490;
}
html.dark .team-cal-filter { background: #0f172a; border-color: #334155; }
html.dark .team-cal-filter-pill {
    color: #94a3b8;
    background: #1e293b;
    border-color: #475569;
}
html.dark .team-cal-filter-pill:hover,
html.dark .team-cal-filter-pill:focus-visible {
    color: #bae6fd;
    border-color: #0ea5e9;
    background: rgba(14, 116, 144, 0.25);
}
html.dark .team-cal-filter-pill.is-active { background: rgba(22,163,74,0.2); border-color: #16a34a; color: #86efac; }
html.dark .team-cal-hint.is-warn { color: #fbbf24; }
html.dark .team-cal-calendar-panel {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border-color: #475569;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}
html.dark .team-cal-calendar-panel__label { color: #e2e8f0; }
html.dark .team-cal-calendar-panel__status {
    color: #7dd3fc;
    background: rgba(14, 116, 144, 0.35);
    border-color: #0e7490;
}
html.dark .team-cal-calendar-legend { border-top-color: #475569; }
html.dark .team-cal-calendar-legend li { color: #94a3b8; }

/* ─── کشو + جدول گزارش عملکرد (اهداف) ─── */
.goals-report-drawer {
    margin-top: 0.65rem;
    border: 1px solid rgba(8, 145, 178, 0.18);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
}
.goals-report-drawer__summary {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.6rem 0.85rem; cursor: pointer; font-size: 0.72rem; font-weight: 700;
    color: #334155; list-style: none;
    background: rgba(248, 250, 252, 0.85);
}
.goals-report-drawer__lead { display: inline-flex; align-items: center; gap: 0.35rem; }
.goals-report-drawer__summary::-webkit-details-marker { display: none; }
.goals-report-drawer[open] .goals-report-drawer__label { color: #0891b2; }
.goals-report-drawer__count {
    font-size: 0.62rem; font-weight: 800; color: #0891b2;
    background: rgba(236, 254, 255, 0.9); padding: 0.15rem 0.5rem; border-radius: 999px;
    border: 1px solid rgba(8, 145, 178, 0.2);
}
.goals-report-section__title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}
.goals-report-section.is-open .section-accordion-body {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
}
html.dark .goals-report-section__title { color: #e2e8f0; }

.goals-report-drawer__body { padding: 0.55rem; }
.goals-report-table-wrap {
    border-radius: 0.85rem; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.85);
    max-height: 16rem; overflow-y: auto;
}
.goals-report-table {
    width: 100%; border-collapse: collapse; font-size: 0.66rem;
}
.goals-report-table thead {
    position: sticky; top: 0; z-index: 1;
    background: rgba(8, 145, 178, 0.1);
    backdrop-filter: blur(8px);
}
.goals-report-table th {
    padding: 0.5rem 0.55rem; text-align: right; font-weight: 800;
    color: #0e7490; border-bottom: 1px solid rgba(8, 145, 178, 0.15);
    white-space: nowrap;
}
.goals-report-table td {
    padding: 0.45rem 0.55rem; text-align: right; vertical-align: top;
    color: #334155; border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}
.goals-report-table tbody tr:last-child td { border-bottom: none; }
.goals-report-table tbody tr:hover { background: rgba(8, 145, 178, 0.05); }
.goals-report-table__goal { color: #64748b; font-size: 0.6rem; max-width: 6rem; }
.goals-report-table__step { font-weight: 700; color: #0f172a; }
.goals-report-table__date { color: #0891b2; font-weight: 600; white-space: nowrap; }
.goals-report-table__note { color: #64748b; font-size: 0.62rem; max-width: 7rem; }
html.dark .goals-report-drawer { border-color: rgba(8, 145, 178, 0.25); background: rgba(15, 23, 42, 0.5); }
html.dark .goals-report-drawer__summary { background: rgba(30, 41, 59, 0.9); color: #e2e8f0; }
html.dark .goals-report-table th { color: #67e8f9; background: rgba(8, 145, 178, 0.15); }
html.dark .goals-report-table td { color: #cbd5e1; border-color: rgba(51, 65, 85, 0.8); }
html.dark .goals-report-table__step { color: #f1f5f9; }

/* ─── نوار بالا: راهنما + گزارش خطا (هم‌تراز داخل کادر) ─── */
[data-feedback-section],
.has-section-feedback-anchor {
    position: relative !important;
    overflow: visible !important;
    padding-top: 2.75rem;
    padding-bottom: 0;
}

.section-corner-bar {
    position: absolute;
    top: 8px;
    bottom: auto;
    left: 8px;
    right: 8px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    z-index: 100;
    pointer-events: none;
    overflow: visible;
    direction: ltr;
}

.section-corner-bar__start,
.section-corner-bar__end {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    pointer-events: none;
    flex-shrink: 0;
    min-height: 16px;
    overflow: visible;
}

.section-corner-bar__start {
    justify-content: flex-start;
}

.section-corner-bar__end {
    justify-content: flex-end;
}

.section-feedback-btn-group {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.section-feedback-btn-group .section-feedback-btn {
    pointer-events: auto;
    z-index: 1;
}

/* ─── دکمه راهنما (شیشه‌ای آبی) ─── */
.section-help-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
    padding: 0;
    margin: 0;
    border-radius: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
    pointer-events: auto;
    z-index: 100;
    background: rgba(224, 242, 254, 0.58);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    border: 1px solid rgba(8, 145, 178, 0.38);
    color: #0891b2;
    box-shadow: 0 2px 10px rgba(8, 145, 178, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.section-corner-bar__start .section-help-btn {
    position: relative;
}

.section-help-btn svg {
    width: 7px;
    height: 7px;
}

.section-help-btn.is-active {
    background: rgba(8, 145, 178, 0.22);
    border-color: #0891b2;
    color: #0e7490;
    box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

/* ─── کادر راهنما داخل همان بخش ─── */
.section-help-panel {
    display: none;
    margin: 0 0.65rem 0.55rem;
    padding: 0;
    position: relative;
    z-index: 2;
}

.section-help-panel.is-open {
    display: block;
}

.section-help-panel__inner {
    padding: 0.55rem 0.65rem 0.6rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(8, 145, 178, 0.22);
    background: linear-gradient(145deg, rgba(236, 254, 255, 0.92), rgba(240, 249, 255, 0.72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.section-help-panel__head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.section-help-panel__label {
    flex-shrink: 0;
    font-size: 0.58rem;
    font-weight: 800;
    color: #0e7490;
    background: rgba(8, 145, 178, 0.12);
    border: 1px solid rgba(8, 145, 178, 0.2);
    border-radius: 999px;
    padding: 0.1rem 0.4rem;
}

.section-help-panel__title {
    flex: 1;
    min-width: 0;
    font-size: 0.68rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-help-panel__close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.section-help-panel__body {
    font-size: 0.68rem;
    line-height: 1.65;
    color: #475569;
}

html.dark .section-help-panel__inner {
    background: linear-gradient(145deg, rgba(8, 51, 68, 0.55), rgba(15, 23, 42, 0.72));
    border-color: rgba(34, 211, 238, 0.2);
}

html.dark .section-help-panel__label { color: #67e8f9; background: rgba(8, 145, 178, 0.2); }
html.dark .section-help-panel__title { color: #e2e8f0; }
html.dark .section-help-panel__body { color: #94a3b8; }
html.dark .section-help-btn.is-active { color: #67e8f9; }

.admin-section-help-item__tag {
    font-size: 0.55rem;
    font-weight: 700;
    color: #0891b2;
    margin-right: 0.25rem;
}

.section-help-btn:hover,
.section-help-btn:focus-visible {
    transform: scale(1.06);
    background: rgba(186, 230, 253, 0.78);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    outline: none;
}

.section-help-tip {
    position: absolute;
    top: calc(100% + 6px);
    bottom: auto;
    left: 0;
    right: auto;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0e7490;
    white-space: nowrap;
    max-width: min(11rem, 42vw);
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.28rem 0.5rem;
    border-radius: 0.55rem;
    background: rgba(236, 254, 255, 0.82);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(8, 145, 178, 0.28);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    z-index: 110;
    direction: rtl;
    text-align: right;
}

.section-corner-bar__start:hover .section-help-tip,
.section-help-anchor:hover .section-help-tip,
.section-help-btn:focus-visible + .section-help-tip {
    opacity: 1;
    transform: translateY(0);
}

/* سازگاری با ساختار قدیمی */
.section-help-anchor {
    position: absolute;
    top: 8px;
    left: 8px;
    bottom: auto;
    z-index: 100;
    width: 16px;
    height: 16px;
    pointer-events: none;
    overflow: visible;
}

.section-feedback-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    pointer-events: none;
    max-width: calc(100% - 0.9rem);
}

.section-help-modal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}
.section-help-modal-backdrop.hidden { display: none; }
.section-help-modal {
    width: 100%; max-width: 420px; padding: 1rem 1.1rem;
    border: 1px solid rgba(8, 145, 178, 0.22);
    box-shadow: 0 16px 40px rgba(8, 145, 178, 0.12);
}
.section-help-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.section-help-modal__head h3 { margin: 0; font-size: 0.92rem; font-weight: 800; color: #0e7490; }
.section-help-modal__close { border: none; background: transparent; font-size: 1.3rem; cursor: pointer; color: #94a3b8; }
.section-help-modal__sub { font-size: 0.62rem; color: #64748b; margin: 0 0 0.55rem; }
.section-help-modal__body {
    font-size: 0.74rem; color: #334155; line-height: 1.7;
    padding: 0.65rem 0.75rem; border-radius: 0.75rem;
    background: rgba(240, 249, 255, 0.65);
    border: 1px solid rgba(8, 145, 178, 0.15);
    max-height: 50vh; overflow-y: auto;
}
.section-help-modal__empty { margin: 0; color: #64748b; font-size: 0.72rem; }
.section-help-modal__actions { display: flex; justify-content: flex-end; margin-top: 0.65rem; }
.section-help-btn-ghost {
    border: 1px solid #e2e8f0; background: #fff; color: #475569;
    font-size: 0.68rem; font-weight: 700; padding: 0.4rem 0.75rem;
    border-radius: 0.65rem; cursor: pointer; font-family: inherit;
}

.admin-section-help-empty { font-size: 0.72rem; color: #64748b; text-align: center; padding: 0.75rem 0; margin: 0; }
.admin-section-help-item {
    border: 1px solid #bae6fd; border-radius: 0.65rem; padding: 0.55rem 0.65rem;
    background: #fff; margin-bottom: 0.45rem;
}
.admin-section-help-item__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem; margin-bottom: 0.25rem; }
.admin-section-help-item__head strong { font-size: 0.72rem; color: #0f172a; }
.admin-section-help-item__meta { font-size: 0.58rem; color: #64748b; }
.admin-section-help-item__preview { font-size: 0.65rem; color: #475569; margin: 0 0 0.4rem; line-height: 1.5; }
.admin-section-help-item__actions { display: flex; gap: 0.35rem; }
.admin-section-help-action {
    font-size: 0.6rem; font-weight: 700; padding: 0.22rem 0.48rem;
    border-radius: 0.45rem; border: 1px solid #bae6fd; background: #ecfeff;
    color: #0e7490; cursor: pointer; font-family: inherit;
}
.admin-section-help-action--del { border-color: #fecaca; background: #fff1f2; color: #dc2626; }

.section-feedback-corner--multi {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.3rem;
}
.section-feedback-corner--multi .section-feedback-btn-group {
    flex-direction: column;
}
.section-feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
    padding: 0;
    margin: 0;
    border-radius: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    background: rgba(254, 226, 226, 0.55);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    border: 1px solid rgba(239, 68, 68, 0.42);
    color: #dc2626;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.section-feedback-btn:hover,
.section-feedback-btn:focus-visible {
    transform: scale(1.06);
    background: rgba(254, 202, 202, 0.72);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    outline: none;
}
.section-feedback-btn svg {
    width: 7px;
    height: 7px;
}
.section-feedback-tip {
    position: absolute;
    top: calc(100% + 6px);
    bottom: auto;
    left: 0;
    right: auto;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.35;
    color: #991b1b;
    white-space: nowrap;
    max-width: min(11rem, 42vw);
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.28rem 0.5rem;
    border-radius: 0.55rem;
    background: rgba(254, 242, 242, 0.82);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(239, 68, 68, 0.32);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    z-index: 110;
    direction: rtl;
    text-align: right;
}
.section-feedback-corner:hover .section-feedback-tip,
.section-feedback-btn-group:hover .section-feedback-tip,
.section-corner-bar__end:hover .section-feedback-tip,
.section-feedback-btn:focus-visible + .section-feedback-tip {
    opacity: 1;
    transform: translateY(0);
}

.has-section-feedback-anchor > .section-accordion-header,
.has-section-feedback-anchor > .goals-box-section > .section-accordion-header,
.has-section-feedback-anchor > .team-cal-section__head {
    padding-inline-start: 0;
}
.section-feedback-modal-backdrop {
    position: fixed; inset: 0; z-index: 140; background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.section-feedback-modal-backdrop.hidden { display: none; }
.section-feedback-modal { width: 100%; max-width: 400px; padding: 1rem 1.1rem; }
.section-feedback-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.section-feedback-modal__head h3 { margin: 0; font-size: 0.9rem; font-weight: 800; color: #991b1b; }
.section-feedback-modal__close { border: none; background: transparent; font-size: 1.3rem; cursor: pointer; color: #94a3b8; }
.section-feedback-modal__user { font-size: 0.6rem; color: #64748b; margin: 0 0 0.35rem; }
.section-feedback-modal__context {
    font-size: 0.65rem; color: #64748b; margin: 0 0 0.75rem; line-height: 1.5;
    padding: 0.45rem 0.55rem; border-radius: 0.65rem;
    background: rgba(254, 242, 242, 0.5); border: 1px solid rgba(239, 68, 68, 0.2);
}
.section-feedback-context-grid {
    display: grid;
    gap: 0.2rem;
}
.section-feedback-context-grid strong { color: #991b1b; }
.section-feedback-field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.65rem; }
.section-feedback-field span { font-size: 0.65rem; font-weight: 700; color: #475569; }
.section-feedback-field select,
.section-feedback-field textarea {
    border: 1px solid rgba(239, 68, 68, 0.22); border-radius: 0.65rem;
    padding: 0.5rem 0.65rem; font-family: inherit; font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
}
.section-feedback-form__actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.5rem; }
.section-feedback-btn-ghost {
    padding: 0.45rem 0.75rem; border-radius: 0.65rem; font-size: 0.72rem; font-weight: 700;
    font-family: inherit; cursor: pointer; border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.75); color: #475569;
}
.section-feedback-btn-submit {
    padding: 0.45rem 0.85rem; border-radius: 0.65rem; font-size: 0.72rem; font-weight: 800;
    font-family: inherit; cursor: pointer; border: 1px solid rgba(239, 68, 68, 0.45);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.85), rgba(220, 38, 38, 0.9));
    color: #fff; box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.admin-feedback-item {
    border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem; background: #fff;
}
.admin-feedback-item.is-new { border-color: #fca5a5; background: #fff7ed; }
.admin-feedback-item__head { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.35rem; }
.admin-feedback-badge { font-size: 0.58rem; font-weight: 700; padding: 0.12rem 0.4rem; border-radius: 999px; }
.admin-feedback-badge--section { background: #dbeafe; color: #1d4ed8; }
.admin-feedback-badge--tab { background: #f3e8ff; color: #7c3aed; }
.admin-feedback-badge--type { background: #ffedd5; color: #c2410c; }
.admin-feedback-badge--status { background: #ecfdf5; color: #15803d; }
.admin-feedback-location {
    margin: 0 0 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid #fde68a;
    background: #fffbeb;
}
.admin-feedback-location__title {
    font-size: 0.58rem;
    font-weight: 800;
    color: #92400e;
    margin: 0 0 0.35rem;
}
.admin-feedback-location__grid { margin: 0; display: grid; gap: 0.25rem; }
.admin-feedback-location__row {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 0.35rem;
    align-items: start;
}
.admin-feedback-location__row dt {
    font-size: 0.58rem;
    font-weight: 700;
    color: #78716c;
    margin: 0;
}
.admin-feedback-location__row dd {
    font-size: 0.65rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.45;
}
.admin-feedback-item__user { font-size: 0.62rem; color: #64748b; margin: 0 0 0.35rem; }
.admin-feedback-item__msg { font-size: 0.72rem; color: #1e293b; margin: 0 0 0.5rem; line-height: 1.55; white-space: pre-wrap; }
.admin-feedback-item__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.admin-feedback-action { font-size: 0.6rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 0.45rem; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; font-family: inherit; }
.admin-feedback-action--ok { border-color: #86efac; color: #15803d; }
.admin-feedback-action--del { border-color: #fecaca; color: #dc2626; }
html.dark .section-feedback-field select, html.dark .section-feedback-field textarea { background: rgba(30, 41, 59, 0.85); border-color: rgba(239, 68, 68, 0.35); color: #e2e8f0; }
html.dark .section-help-btn {
    background: rgba(8, 145, 178, 0.22); border-color: rgba(103, 232, 249, 0.35); color: #67e8f9;
}
html.dark .section-help-tip {
    background: rgba(8, 51, 68, 0.75); border-color: rgba(103, 232, 249, 0.28); color: #a5f3fc;
}
html.dark .section-help-modal__head h3 { color: #67e8f9; }
html.dark .section-help-modal__body { background: rgba(8, 51, 68, 0.35); border-color: #334155; color: #cbd5e1; }
html.dark .section-help-btn-ghost { background: #1e293b; border-color: #334155; color: #cbd5e1; }
html.dark .admin-section-help-item { background: #1e293b; border-color: #334155; }
html.dark .admin-section-help-item__head strong { color: #e2e8f0; }
html.dark .section-feedback-btn {
    background: rgba(127, 29, 29, 0.45); border-color: rgba(248, 113, 113, 0.4); color: #fca5a5;
}
html.dark .section-feedback-tip {
    background: rgba(69, 10, 10, 0.75); border-color: rgba(248, 113, 113, 0.35); color: #fecaca;
}
html.dark .section-feedback-modal__context { background: rgba(69, 10, 10, 0.35); border-color: rgba(248, 113, 113, 0.25); }
html.dark .section-feedback-context-grid strong { color: #fca5a5; }
html.dark .section-feedback-modal__head h3 { color: #fca5a5; }
html.dark .admin-feedback-item { background: #1e293b; border-color: #334155; }
html.dark .admin-feedback-location { background: rgba(120, 53, 15, 0.25); border-color: rgba(251, 191, 36, 0.25); }
html.dark .admin-feedback-location__title { color: #fcd34d; }
html.dark .admin-feedback-location__row dt { color: #94a3b8; }
html.dark .admin-feedback-location__row dd { color: #e2e8f0; }

.no-scrollbar::-ms-overflow-style {
    display: none;
}
.no-scrollbar {
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.task-item {
    touch-action: manipulation;
    transition: opacity 0.2s ease, background 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.task-item.sortable-ghost {
    opacity: 0.35;
    background: #e5e7eb;
}

.task-item.sortable-chosen .task-text {
    cursor: grabbing;
}

.task-item.sortable-chosen {
    background: rgba(241, 245, 249, 0.85);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.task-item.sortable-fallback {
    opacity: 0.92;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    border-radius: 0.5rem;
    background: #fff;
}

