:root {
    --sc-primary: #0b6e4f;
    --sc-secondary: #e8a838;
    --sc-ink: #163227;
    --sc-bg: #f7faf8;
    --sc-line: rgba(22, 50, 39, 0.1);
    --sc-max: 1160px;
    --sc-font: "Vazirmatn", Tahoma, sans-serif;
    --sc-grid-radius: 14px;
    --sc-grid-head-bg: rgba(11, 110, 79, 0.05);
    --sc-grid-row-alt: rgba(247, 250, 248, 0.95);
    --sc-grid-row-hover: rgba(11, 110, 79, 0.045);
    --sc-grid-border: rgba(22, 50, 39, 0.1);
    --sc-grid-accent: linear-gradient(90deg, var(--sc-primary) 0%, #12956b 45%, var(--sc-secondary) 100%);
    --mud-typography-default-family: var(--sc-font);
    --mud-typography-h1-family: var(--sc-font);
    --mud-typography-h2-family: var(--sc-font);
    --mud-typography-h3-family: var(--sc-font);
    --mud-typography-h4-family: var(--sc-font);
    --mud-typography-h5-family: var(--sc-font);
    --mud-typography-h6-family: var(--sc-font);
    --mud-typography-subtitle1-family: var(--sc-font);
    --mud-typography-subtitle2-family: var(--sc-font);
    --mud-typography-body1-family: var(--sc-font);
    --mud-typography-body2-family: var(--sc-font);
    --mud-typography-button-family: var(--sc-font);
    --mud-typography-caption-family: var(--sc-font);
    --mud-typography-overline-family: var(--sc-font);
}

html, body {
    font-family: var(--sc-font);
    background: var(--sc-bg);
    color: var(--sc-ink);
    margin: 0;
}

a { color: inherit; text-decoration: none; }

.site-container {
    width: min(100% - 2rem, var(--sc-max));
    margin-inline: auto;
}

.public-shell { min-height: 100vh; display: flex; flex-direction: column; }
.public-shell > main { flex: 1; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(247, 250, 248, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--sc-line);
    box-shadow: 0 8px 24px rgba(22, 50, 39, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 72px;
    position: relative;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    flex-shrink: 0;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(11, 110, 79, 0.12);
}

.logo-img-footer {
    width: 72px;
    height: 72px;
}

.logo-img-panel {
    width: 40px;
    height: 40px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.panel-brand-link {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: inherit;
    min-width: 0;
}

/* Keep content below fixed MudAppBar (pa-* utilities override MudBlazor padding-top). */
.mud-main-content.panel-main {
    padding-top: calc(var(--mud-appbar-height, 64px) + 1rem) !important;
    padding-inline: 1rem !important;
    padding-bottom: 1.5rem !important;
    box-sizing: border-box;
    min-height: 100vh;
}

.panel-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    min-width: 0;
}

.panel-nav-link-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-nav-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.25rem;
    padding: 0 .4rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.panel-nav-badge--unread {
    background: #c62828;
}

.panel-nav-badge--count {
    background: var(--sc-primary, #0b6e4f);
}

/* Switch / checkbox / radio: label text on the right of the control. */
.mud-input-control-boolean-input {
    flex-direction: row-reverse !important;
    justify-content: flex-end !important;
    gap: .5rem;
}
.mud-input-helper-text {
    text-align: right;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .75rem;
}

.footer-legal {
    opacity: .75;
    font-size: .85rem;
    margin: .15rem 0 0;
}

.logo-text, .brand-title, .footer-brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    line-height: 1.25;
    white-space: nowrap;
}

.footer-product, .brand-product {
    opacity: .65;
    font-size: .8rem;
    margin: .15rem 0 .5rem;
}

.brand-title-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title-wrap .brand-title {
    max-width: none;
    color: inherit;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-inline: auto;
}

.site-nav a {
    font-size: .95rem;
    opacity: .82;
    position: relative;
    padding: .35rem 0;
}

.site-nav a.is-active,
.site-nav a:hover { opacity: 1; color: var(--sc-primary); }

.site-nav a.is-active::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: var(--sc-secondary);
}

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

.site-nav-actions {
    display: none;
}

.menu-toggle {
    display: none;
    order: -1;
    border: 0;
    background: transparent;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--sc-ink);
    flex-shrink: 0;
}
.menu-toggle:hover { background: rgba(11, 110, 79, 0.08); }

.nav-backdrop {
    display: none;
}

.hero-slider, .page-hero {
    position: relative;
    min-height: 100vh;
    color: #fff;
    overflow: hidden;
}

.page-hero { min-height: 52vh; }
.page-hero-compact { min-height: 42vh; }

.hero-slide, .page-hero {
    background-size: cover;
    background-position: center;
}

.hero-slide {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-items: end;
    animation: heroIn .8s ease both;
}

.hero-fallback {
    background:
        linear-gradient(135deg, rgba(11,110,79,.92), rgba(11,110,79,.55)),
        linear-gradient(160deg, #0b6e4f, #134e3a 55%, #1a2e24);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 28, 20, 0.72) 0%, rgba(10, 28, 20, 0.35) 55%, rgba(10, 28, 20, 0.15) 100%),
        linear-gradient(180deg, rgba(10, 28, 20, 0.15), rgba(10, 28, 20, 0.55));
}

.hero-copy, .page-hero-copy {
    position: relative;
    z-index: 1;
    padding: 5rem 0 4rem;
    max-width: 720px;
}

.hero-brand {
    margin: 0 0 .4rem;
    font-size: clamp(1.75rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.hero-copy h1, .page-hero-copy h1 {
    margin: 0 0 .85rem;
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    font-weight: 700;
}

.hero-copy h1 {
    white-space: nowrap;
    max-width: none;
}

.hero-lead, .page-hero-copy p {
    margin: 0 0 1.4rem;
    opacity: .92;
    max-width: 36rem;
    line-height: 1.8;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-ghost { color: #fff !important; border-color: rgba(255,255,255,.65) !important; }

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(10, 28, 20, 0.45);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.slider-nav:hover {
    background: rgba(11, 110, 79, 0.75);
    border-color: rgba(232, 168, 56, 0.7);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.slider-nav-prev { left: 1rem; }
.slider-nav-next { right: 1rem; }

.slider-dots {
    position: absolute;
    inset-inline: 0;
    bottom: 1.4rem;
    display: flex;
    justify-content: center;
    gap: .45rem;
    z-index: 2;
}

.slider-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.45);
    cursor: pointer;
}

.slider-dots button.is-active {
    background: var(--sc-secondary);
    transform: scale(1.2);
}

@media (max-width: 720px) {
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.7rem;
    }
    .slider-nav-prev { left: .6rem; }
    .slider-nav-next { right: .6rem; }
}

.section { padding: 4.5rem 0; }
.section-alt { background: #eef6f1; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head.align-start { text-align: start; }
.section-head h2, .contact-info h2, .contact-form h2, .formula-box h2 {
    margin: 0 0 .6rem;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.section-head p { margin: 0; opacity: .78; }

.metric-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.metric {
    padding: 1.4rem 1rem;
    border-bottom: 2px solid rgba(11, 110, 79, 0.18);
    text-align: center;
}

.metric strong {
    display: block;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--sc-primary);
}

.metric span { opacity: .75; font-size: .92rem; }

.split-section {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.split-media {
    min-height: 340px;
    background-size: cover;
    background-position: center;
    border-radius: 0;
}

.project-grid, .news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.project-item, .news-item {
    background: #fff;
    border: 1px solid var(--sc-line);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

.project-item:hover, .news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(22, 50, 39, 0.08);
}

.project-visual, .news-cover {
    min-height: 180px;
    background:
        linear-gradient(135deg, rgba(11,110,79,.35), rgba(232,168,56,.2)),
        url("/images/hero-solar-field.jpg") center/cover;
}

.news-cover { background-size: cover; background-position: center; }
.project-body, .news-body { padding: 1.2rem 1.25rem 1.4rem; }
.project-body h3, .news-body h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.project-body ul { padding-inline-start: 1.1rem; margin: .8rem 0 1rem; line-height: 1.9; }
.muted, .news-body time { opacity: .7; font-size: .9rem; }
.center-cta { display: flex; justify-content: center; gap: .75rem; margin-top: 2rem; flex-wrap: wrap; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.step {
    padding: 1.2rem 1rem;
    border-top: 3px solid var(--sc-secondary);
    background: #fff;
}

.step span {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    background: var(--sc-primary);
    color: #fff;
    font-weight: 700;
    margin-bottom: .7rem;
}

.step h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.step p { margin: 0; opacity: .78; line-height: 1.7; }

.cta-band {
    background:
        linear-gradient(120deg, rgba(11,110,79,.95), rgba(19,78,58,.9)),
        url("/images/hero-solar-panels.jpg") center/cover;
    color: #fff;
}

.cta-band-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-band h2 { margin: 0 0 .4rem; }
.cta-band p { margin: 0; opacity: .9; }

.site-footer {
    background: linear-gradient(180deg, #10261d 0%, #0d2018 100%);
    color: #e8f2ec;
    padding-top: 3rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-secondary-grid {
    display: contents;
}

.footer-section-title {
    margin: 0 0 .85rem;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.footer-grid h4 { margin: 0 0 .8rem; }
.footer-grid a, .footer-grid p { display: block; margin: 0 0 .45rem; opacity: .85; line-height: 1.7; }

.footer-links {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.footer-link {
    display: block;
    padding: .2rem 0;
    opacity: .85;
    line-height: 1.65;
    transition: color .2s ease, opacity .2s ease;
}

.footer-link:hover {
    opacity: 1;
    color: var(--sc-secondary);
}

.footer-tagline {
    margin: 0 0 .65rem;
    font-size: .95rem;
    opacity: .9;
    line-height: 1.75;
}

.footer-about {
    max-width: 34ch;
    margin: 0;
    font-size: .9rem;
    line-height: 1.8;
    opacity: .78;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.footer-contact-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .35rem .65rem;
    align-items: start;
    line-height: 1.65;
}

.footer-contact-key {
    font-size: .78rem;
    font-weight: 600;
    opacity: .62;
    white-space: nowrap;
}

.footer-contact-value {
    font-size: .9rem;
    opacity: .9;
}

.footer-contact-link:hover {
    color: var(--sc-secondary);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1rem 0;
    font-size: .9rem;
    opacity: .75;
}

.footer-bottom-inner {
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 2rem;
}

.contact-info, .contact-form, .formula-box {
    background: #fff;
    border: 1px solid var(--sc-line);
    padding: 1.5rem;
}

.formula-box { margin: 2.5rem 0; text-align: center; }
.content-narrow { max-width: 820px; }

.auth-credentials {
    max-width: 22rem;
    margin-inline: auto;
}

.auth-register {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--sc-line, rgba(22, 50, 39, 0.12));
    text-align: center;
}

.auth-register-hint {
    display: block;
    margin-bottom: .65rem;
    font-size: .875rem;
    color: rgba(22, 50, 39, 0.65);
}

.auth-register-btn {
    font-weight: 600;
}

.auth-credentials-alert {
    max-width: 22rem;
    margin-inline: auto;
}

.access-denied-section {
    min-height: 62vh;
    display: flex;
    align-items: center;
}

.access-denied-card {
    background: #fff;
    border: 1px solid var(--sc-line);
    padding: 2rem 1.5rem 1.75rem;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.access-denied-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(11, 110, 79, 0.08);
    color: var(--mud-palette-primary);
}

.access-denied-card h1 {
    font-size: 1.45rem;
    margin: 0 0 .75rem;
}

.access-denied-lead {
    margin: 0;
    line-height: 1.9;
    color: var(--mud-palette-text-secondary);
    font-size: 0.95rem;
}
.rich-content { line-height: 2; font-size: 1.02rem; }
.rich-content h3 { margin-top: 1.5rem; }
.audit-json {
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    direction: ltr;
    text-align: left;
}

.audit-diff-table th,
.audit-diff-table td {
    vertical-align: top;
}

.audit-diff-changed {
    background: rgba(46, 125, 50, 0.06);
}

.audit-diff-changed .audit-diff-before {
    color: var(--mud-palette-error);
    text-decoration: line-through;
    opacity: 0.85;
}

.audit-diff-changed .audit-diff-after {
    color: var(--mud-palette-success);
    font-weight: 600;
}

.audit-raw-panel .mud-expand-panel {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
}
.lead { font-size: 1.1rem; opacity: .85; line-height: 1.9; }

@keyframes heroIn {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}

.page-hero--solar-motion .page-hero-media {
    position: absolute;
    inset: -4%;
    background-size: cover;
    background-position: center;
    animation: solarKenBurns 22s ease-in-out infinite alternate;
    will-change: transform;
}

.page-hero--solar-motion .page-hero-sunflare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 55% 45% at 78% 18%,
            rgba(255, 214, 120, 0.28), transparent 65%),
        linear-gradient(115deg,
            transparent 40%,
            rgba(255, 236, 180, 0.12) 50%,
            transparent 60%);
    background-size: 100% 100%, 220% 100%;
    animation: solarFlare 9s ease-in-out infinite;
    mix-blend-mode: soft-light;
}

.page-hero--solar-motion .page-hero-copy {
    animation: heroIn .85s ease both;
}

@keyframes solarKenBurns {
    from { transform: scale(1) translate(0, 0); }
    to { transform: scale(1.08) translate(-1.5%, 1%); }
}

@keyframes solarFlare {
    0%, 100% { opacity: .55; background-position: 0 0, 0% 0; }
    50% { opacity: .9; background-position: 0 0, 100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .page-hero--solar-motion .page-hero-media,
    .page-hero--solar-motion .page-hero-sunflare,
    .page-hero--solar-motion .page-hero-copy {
        animation: none !important;
    }
}

@media (max-width: 960px) {
    .metric-row, .steps, .project-grid, .news-grid, .split-section, .contact-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding-top: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: .85rem;
        padding-bottom: 1.25rem;
    }

    .footer-secondary-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .85rem;
    }

    .footer-col-brand {
        text-align: center;
        padding: 1.35rem 1.15rem;
        background: rgba(255, 255, 255, 0.045);
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 16px;
    }

    .footer-brand-row {
        flex-direction: column;
        align-items: center;
        gap: .85rem;
        margin-bottom: .85rem;
    }

    .footer-brand-text {
        text-align: center;
    }

    .logo-text.footer-brand {
        white-space: normal;
        font-size: 1.08rem;
        line-height: 1.35;
    }

    .footer-product {
        margin-bottom: .35rem;
    }

    .footer-legal {
        font-size: .8rem;
        line-height: 1.6;
    }

    .footer-tagline {
        font-size: .92rem;
        margin-bottom: .55rem;
    }

    .footer-about {
        max-width: none;
        font-size: .86rem;
        line-height: 1.75;
    }

    .footer-col-links,
    .footer-col-contact {
        padding: 1rem 1rem .95rem;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
    }

    .footer-section-title {
        margin-bottom: .65rem;
        padding-bottom: .45rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: .88rem;
    }

    .footer-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: .1rem;
    }

    .footer-link {
        padding: .45rem .55rem;
        border-radius: 8px;
        font-size: .88rem;
    }

    .footer-link:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .footer-contact-list {
        gap: .5rem;
    }

    .footer-contact-item {
        grid-template-columns: 1fr;
        gap: .15rem;
        padding: .45rem .55rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
    }

    .footer-contact-key {
        font-size: .72rem;
        letter-spacing: 0.02em;
    }

    .footer-contact-value {
        font-size: .86rem;
        line-height: 1.55;
    }

    .footer-bottom {
        padding: .85rem 0 1rem;
        font-size: .82rem;
        line-height: 1.65;
    }

    .footer-bottom-inner {
        padding-inline: .25rem;
    }

    .header-inner {
        flex-wrap: nowrap;
    }
    /* In RTL, first flex item is on the physical right */
    .menu-toggle {
        display: inline-flex;
        order: -1;
        margin-inline-end: .15rem;
    }
    .logo-link { order: 0; min-width: 0; max-width: calc(100% - 110px); }
    .logo-img { width: 42px; height: 42px; }
    .logo-text {
        font-size: .95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        display: block;
    }
    .header-actions { order: 1; margin-inline-start: auto; }

    .header-actions-desktop {
        display: none !important;
    }

    .site-nav-actions {
        display: flex;
        flex-direction: column;
        gap: .45rem;
        margin-top: .55rem;
        padding-top: .75rem;
        border-top: 1px solid var(--sc-line);
    }

    .site-nav-actions .mud-button-root {
        justify-content: center;
    }

    .hero-brand {
        white-space: normal;
        font-size: clamp(1.55rem, 7vw, 2.4rem);
    }
    .site-nav {
        display: none;
        position: absolute;
        inset-inline: 1rem;
        top: calc(100% + .35rem);
        z-index: 70;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border: 1px solid var(--sc-line);
        border-radius: 12px;
        padding: .75rem;
        box-shadow: 0 12px 30px rgba(22,50,39,.12);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a {
        padding: .7rem .85rem;
        border-radius: 8px;
    }
    .site-nav a:hover,
    .site-nav a.is-active { background: rgba(11, 110, 79, 0.06); }
    .site-nav a.is-active::after { display: none; }
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(22, 50, 39, 0.28);
        cursor: pointer;
    }
    .hero-slider, .hero-slide { min-height: 85vh; }
    .hero-copy h1 {
        font-size: clamp(1.05rem, 4.2vw, 1.45rem);
    }
}

@media (max-width: 540px) {
    .footer-secondary-grid {
        grid-template-columns: 1fr;
    }

    .logo-img-footer {
        width: 64px;
        height: 64px;
    }

    .footer-col-brand {
        padding: 1.15rem .95rem;
    }

    .footer-col-links,
    .footer-col-contact {
        padding: .9rem .85rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .25rem;
    }

    .footer-link {
        text-align: center;
        padding: .5rem .35rem;
        font-size: .84rem;
    }
}

.metric-tile {
    border: 1px solid rgba(22, 50, 39, 0.08);
    min-height: 120px;
}

.metric-tile-clickable {
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.metric-tile-clickable:hover {
    border-color: rgba(22, 50, 39, 0.22);
    box-shadow: 0 4px 14px rgba(22, 50, 39, 0.08);
    transform: translateY(-1px);
}

.metric-tile-clickable:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.mini-bars {
    display: flex;
    align-items: end;
    gap: .35rem;
    min-height: 110px;
    overflow-x: auto;
    padding-bottom: .5rem;
}

.mini-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    min-width: 34px;
}

.mini-bar {
    width: 14px;
    background: #0b6e4f;
    border-radius: 3px 3px 0 0;
}

.mini-bar.prod { background: #e8a838; }

.mini-bar-item span {
    font-size: .65rem;
    opacity: .7;
    transform: rotate(-35deg);
    white-space: nowrap;
}

.activity-list { display: flex; flex-direction: column; gap: .75rem; }
.activity-item { display: flex; align-items: flex-start; gap: .5rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(22,50,39,.08); }

/* PWA install banner (bottom sheet — similar to forms.hmasraf.ir) */
.pwa-install-container {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.pwa-install-banner {
    pointer-events: auto;
    width: min(100% - 1.25rem, 420px);
    margin: 0 .625rem 1.1rem;
    padding: 1rem 1rem .95rem;
    border-radius: 16px 16px 14px 14px;
    background: linear-gradient(135deg, #0b6e4f 0%, #163227 100%);
    color: #fff;
    box-shadow: 0 -8px 28px rgba(10, 28, 20, 0.28);
    transform: translateY(120%);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
}

.pwa-install-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.pwa-install-banner.is-open-app {
    border-top: 3px solid var(--sc-primary);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    object-fit: cover;
    flex-shrink: 0;
}

.pwa-install-copy {
    flex: 1;
    min-width: 0;
}

.pwa-install-copy strong {
    display: block;
    font-size: .95rem;
    margin-bottom: .15rem;
}

.pwa-install-copy p {
    margin: 0;
    font-size: .8rem;
    opacity: .9;
    line-height: 1.45;
}

.pwa-install-actions {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex-shrink: 0;
}

.pwa-install-btn {
    border: 0;
    border-radius: 8px;
    padding: .45rem .75rem;
    min-width: 5.5rem;
    background: #fff;
    color: #0b6e4f;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
}

.pwa-install-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.pwa-dismiss-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: .35rem .75rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: .78rem;
    cursor: pointer;
}

.pwa-guide-steps {
    margin: 0;
    padding-inline-start: 1.25rem;
    line-height: 1.9;
}

/* iOS Add-to-Home guide sheet */
.pwa-ios-sheet {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
}

.pwa-ios-sheet.is-open {
    opacity: 1;
}

.pwa-ios-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 28, 20, 0.45);
}

.pwa-ios-sheet-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    margin: 0 .5rem env(safe-area-inset-bottom, 0);
    padding: .65rem 1.15rem 1.35rem;
    border-radius: 18px 18px 0 0;
    background: #fff;
    color: #163227;
    box-shadow: 0 -12px 40px rgba(10, 28, 20, 0.22);
    transform: translateY(24px);
    transition: transform .28s ease;
}

.pwa-ios-sheet.is-open .pwa-ios-sheet-panel {
    transform: translateY(0);
}

.pwa-ios-sheet-handle {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(22, 50, 39, 0.18);
    margin: .15rem auto .85rem;
}

.pwa-ios-sheet-app {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .85rem;
}

.pwa-ios-sheet-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(22, 50, 39, 0.12);
}

.pwa-ios-sheet-app strong {
    display: block;
    font-size: 1.05rem;
}

.pwa-ios-sheet-app p {
    margin: .15rem 0 0;
    font-size: .88rem;
    color: rgba(22, 50, 39, 0.75);
}

.pwa-ios-sheet-title {
    display: block;
    font-size: 1.05rem;
    margin-bottom: .5rem;
}

.pwa-ios-sheet-text {
    margin: 0 0 1rem;
    line-height: 1.8;
    font-size: .95rem;
}

.pwa-ios-sheet-steps {
    margin: 0 0 1rem;
    padding-inline-start: 1.2rem;
    line-height: 1.85;
    font-size: .92rem;
}

.pwa-ios-share-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .45rem;
    border-radius: 8px;
    background: rgba(11, 110, 79, 0.1);
    color: #0b6e4f;
    font-weight: 700;
    font-size: .8rem;
    vertical-align: middle;
}

.pwa-ios-sheet-close {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: .7rem 1rem;
    background: #0b6e4f;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.pwa-ios-sheet-arrow {
    text-align: center;
    margin-top: .65rem;
    font-size: 1.5rem;
    color: #0b6e4f;
    animation: pwa-ios-bounce 1.1s ease-in-out infinite;
}

@keyframes pwa-ios-bounce {
    0%, 100% { transform: translateY(0); opacity: .7; }
    50% { transform: translateY(6px); opacity: 1; }
}

@media (max-width: 720px) {
    .pwa-install-content {
        flex-wrap: wrap;
    }

    .pwa-install-actions {
        width: 100%;
        flex-direction: row;
        justify-content: stretch;
    }

    .pwa-install-btn,
    .pwa-dismiss-btn {
        flex: 1;
    }
}

/* Server-side data grids */
.sc-grid {
    background: #fff;
    border: 1px solid var(--sc-grid-border);
    border-radius: var(--sc-grid-radius);
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(22, 50, 39, 0.06);
    position: relative;
    z-index: 1;
}

.sc-grid-accent {
    height: 3px;
    background: var(--sc-grid-accent);
}

.sc-grid-actions-host {
    position: relative;
    z-index: 1;
}

.sc-grid-actions-cell,
.sc-grid .mud-table-cell:has(.mud-icon-button) {
    white-space: nowrap;
}

.sc-grid-actions-cell .mud-icon-button,
.sc-grid .mud-table-cell:has(.mud-icon-button) .mud-icon-button {
    pointer-events: auto;
    border-radius: 8px;
    transition: background-color .15s ease, transform .15s ease;
}

.sc-grid-actions-cell .mud-icon-button:hover,
.sc-grid .mud-table-cell:has(.mud-icon-button) .mud-icon-button:hover {
    background: rgba(11, 110, 79, 0.1);
}

.sc-grid-table {
    background: transparent;
}

.sc-grid .mud-table-toolbar {
    padding: 0 !important;
    background: transparent;
    border-bottom: none;
}

.sc-grid-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    padding: .9rem 1rem;
    background: linear-gradient(180deg, rgba(11, 110, 79, 0.07), rgba(255, 255, 255, 0));
    border-bottom: 1px solid rgba(22, 50, 39, 0.08);
}

.sc-grid-toolbar--solo {
    border-bottom: 1px solid rgba(22, 50, 39, 0.08);
}

.sc-grid-title-wrap {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
}

.sc-grid-title {
    font-weight: 700;
    color: var(--sc-ink);
    line-height: 1.35;
}

.sc-grid-meta {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    width: fit-content;
    padding: .18rem .6rem;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.08);
    color: var(--sc-primary);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.2;
}

.sc-grid-meta-icon {
    font-size: .95rem !important;
    opacity: .85;
}

.sc-grid-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.sc-grid-search {
    min-width: min(100%, 260px);
}

.sc-grid-search .mud-input-root {
    background: #fff;
    border-radius: 10px !important;
}

.sc-grid-search .mud-input-outlined-border {
    border-color: rgba(22, 50, 39, 0.14) !important;
}

.sc-grid .mud-table-head .mud-table-cell,
.sc-grid-th {
    font-weight: 700;
    color: #0f3d2c;
    background: var(--sc-grid-head-bg) !important;
    border-bottom: 1px solid rgba(22, 50, 39, 0.12) !important;
    white-space: nowrap;
    padding: .82rem 1rem !important;
    font-size: .82rem;
}

.sc-grid .mud-table-sort-label {
    color: inherit;
    font-weight: 700;
}

.sc-grid .mud-table-sort-label .mud-table-sort-label-icon {
    color: var(--sc-primary);
    opacity: .85;
}

.sc-grid .mud-table-cell {
    padding: .72rem 1rem !important;
    vertical-align: middle;
    border-bottom: 1px solid rgba(22, 50, 39, 0.06) !important;
    font-size: .92rem;
    line-height: 1.55;
}

.sc-grid .mud-table-body .mud-table-row:nth-child(even) {
    background: var(--sc-grid-row-alt);
}

.sc-grid .mud-table-row:hover {
    background: var(--sc-grid-row-hover) !important;
    box-shadow: inset 3px 0 0 var(--sc-primary);
}

.sc-grid-rownum-th,
.sc-grid-rownum {
    width: 64px;
    text-align: center !important;
    font-variant-numeric: tabular-nums;
    color: rgba(22, 50, 39, 0.65);
    font-weight: 700;
    background: rgba(11, 110, 79, 0.03);
    font-size: .82rem;
}

.sc-grid code,
.sc-grid .sc-grid-code {
    display: inline-block;
    max-width: 100%;
    padding: .18rem .5rem;
    border-radius: 6px;
    background: rgba(22, 50, 39, 0.05);
    border: 1px solid rgba(22, 50, 39, 0.08);
    font-size: .84em;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
}

.sc-grid .mud-chip {
    font-weight: 600;
}

.sc-grid .mud-table-pagination {
    border-top: 1px solid rgba(22, 50, 39, 0.08);
    background: rgba(247, 250, 248, 0.85);
    padding: .45rem 1rem !important;
}

.sc-grid .mud-table-pagination .mud-button-root {
    border-radius: 8px;
}

.sc-grid .mud-table-loading {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(2px);
}

.sc-grid-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 2.5rem 1rem;
    text-align: center;
}

.sc-grid-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(11, 110, 79, 0.08);
    color: var(--sc-primary);
    margin-bottom: .35rem;
}

.sc-grid-empty-icon .mud-icon-root {
    font-size: 1.75rem;
}

.sc-grid--embedded {
    margin-bottom: 0;
}

/* Compact tables inside dashboard cards */
.sc-simple-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(22, 50, 39, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.sc-simple-table tbody tr:nth-child(even) {
    background: var(--sc-grid-row-alt);
}

.sc-simple-table tbody tr:hover {
    background: var(--sc-grid-row-hover);
}

.sc-simple-table td {
    padding: .65rem .85rem;
    border-bottom: 1px solid rgba(22, 50, 39, 0.06);
    font-size: .9rem;
}

.sc-simple-table td:last-child {
    text-align: left;
    direction: ltr;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--sc-primary);
}

.sc-simple-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 600px) {
    .sc-grid-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sc-grid-actions {
        width: 100%;
    }

    .sc-grid-search {
        width: 100%;
        min-width: 0;
    }

    .sc-grid .mud-table-row {
        margin: .55rem .65rem;
        border: 1px solid rgba(22, 50, 39, 0.1);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 14px rgba(22, 50, 39, 0.05);
    }

    .sc-grid .mud-table-body .mud-table-row:nth-child(even) {
        background: #fff;
    }

    .sc-grid .mud-table-row:hover {
        box-shadow: 0 6px 18px rgba(22, 50, 39, 0.08);
    }

    .sc-grid .mud-table-cell {
        padding: .55rem .85rem !important;
    }

    .sc-grid-rownum {
        background: rgba(11, 110, 79, 0.06);
        font-weight: 700;
    }
}

.attachment-preview-wrap,
.attachment-modal-image-wrap {
    max-width: 100%;
    border: 1px solid var(--sc-grid-border, rgba(22, 50, 39, 0.1));
    border-radius: 10px;
    overflow: hidden;
    background: rgba(247, 250, 248, 0.95);
}

.attachment-preview-img,
.attachment-modal-image {
    display: block;
    max-width: 100%;
    max-height: 320px;
    margin: 0 auto;
    object-fit: contain;
}

.attachment-modal-image {
    max-height: 70vh;
}

/* —— Roadmap (نقشه راه) —— */
.roadmap-hero {
    background-position: center;
}

.roadmap-section {
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(11, 110, 79, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(232, 168, 56, 0.1), transparent 50%),
        var(--sc-bg);
}

.roadmap-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.12);
    overflow: hidden;
    margin-bottom: .75rem;
}

.roadmap-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sc-primary), #12956b 55%, var(--sc-secondary));
    transition: width .45s ease;
}

.roadmap-progress-label {
    margin: 0 0 2rem;
    font-size: .92rem;
    color: rgba(22, 50, 39, 0.72);
}

.roadmap-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.roadmap-timeline::before {
    content: "";
    position: absolute;
    top: .4rem;
    bottom: .4rem;
    right: 15px;
    width: 2px;
    background: linear-gradient(180deg, rgba(11, 110, 79, 0.35), rgba(232, 168, 56, 0.35));
}

.roadmap-item {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.25rem;
    position: relative;
}

.roadmap-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    z-index: 1;
    border: 2px solid rgba(11, 110, 79, 0.35);
    background: #fff;
    color: transparent;
    transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}

.roadmap-item.is-done .roadmap-marker {
    background: var(--sc-primary);
    border-color: var(--sc-primary);
    color: #fff;
    transform: scale(1.05);
}

.roadmap-item.is-pending .roadmap-marker {
    background: #fff;
    box-shadow: inset 0 0 0 5px rgba(11, 110, 79, 0.08);
}

.roadmap-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--sc-line);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.2rem;
    box-shadow: 0 8px 24px rgba(22, 50, 39, 0.04);
    transition: border-color .25s ease, transform .25s ease;
}

.roadmap-item.is-done .roadmap-card {
    border-color: rgba(11, 110, 79, 0.28);
    background: linear-gradient(135deg, rgba(11, 110, 79, 0.06), rgba(255, 255, 255, 0.95));
}

.roadmap-item:hover .roadmap-card {
    transform: translateY(-2px);
}

.roadmap-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: center;
    margin-bottom: .55rem;
    font-size: .85rem;
}

.roadmap-card-meta time {
    color: rgba(22, 50, 39, 0.65);
    font-variant-numeric: tabular-nums;
}

.roadmap-status {
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    background: rgba(22, 50, 39, 0.06);
    color: rgba(22, 50, 39, 0.7);
}

.roadmap-item.is-done .roadmap-status {
    background: rgba(11, 110, 79, 0.12);
    color: var(--sc-primary);
}

.roadmap-card h3 {
    margin: 0 0 .45rem;
    font-size: 1.15rem;
    color: var(--sc-ink);
}

.roadmap-card p {
    margin: 0;
    line-height: 1.85;
    color: rgba(22, 50, 39, 0.82);
    white-space: pre-wrap;
}

.roadmap-attachment-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    margin-top: 1rem;
}

.roadmap-attachment-thumb {
    display: block;
    margin-top: 0;
    padding: 0;
    border: 1px solid var(--sc-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: zoom-in;
    max-width: 220px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.roadmap-attachment-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(22, 50, 39, 0.1);
}

.roadmap-attachment-thumb img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.roadmap-attachment-download {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .25rem;
    padding: .45rem .85rem;
    border-radius: 999px;
    background: rgba(211, 47, 47, 0.08);
    color: #b71c1c;
    text-decoration: none;
    font-size: .9rem;
    transition: background .2s ease;
}

.roadmap-attachment-download:hover {
    background: rgba(211, 47, 47, 0.14);
}

.roadmap-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(10, 24, 18, 0.82);
    backdrop-filter: blur(2px);
}

.roadmap-lightbox-img {
    max-width: min(960px, 94vw);
    max-height: 86vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    object-fit: contain;
    background: #fff;
}

.roadmap-lightbox-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sc-ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 640px) {
    .roadmap-timeline::before { right: 11px; }
    .roadmap-item { grid-template-columns: 24px 1fr; gap: .75rem; }
    .roadmap-marker { width: 24px; height: 24px; }
    .roadmap-attachment-thumb { max-width: 100%; }
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
