:root {
    color-scheme: light;
    --navy-950: #061523;
    --navy-900: #0a2237;
    --navy-800: #12334c;
    --ink: #102d40;
    --muted: #617789;
    --surface: #edf4f7;
    --surface-strong: #f6fafb;
    --mint: #38e4b1;
    --mint-dark: #0ca97e;
    --cyan: #43c7ef;
    --danger: #cf4f5d;
    --warning: #d68a1f;
    --shadow-dark: rgba(13, 45, 65, .14);
    --shadow-light: rgba(255, 255, 255, .92);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--surface);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 84% 2%, rgba(56, 228, 177, .12), transparent 28rem),
        radial-gradient(circle at 10% 24%, rgba(67, 199, 239, .1), transparent 24rem),
        var(--surface);
    font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.8;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1:focus { outline: none; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.container.narrow { width: min(980px, calc(100% - 40px)); }
.ltr { direction: ltr; text-align: left; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(237, 244, 247, .84);
    border-bottom: 1px solid rgba(16, 45, 64, .06);
    backdrop-filter: blur(18px);
}

.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; color: var(--navy-900); }
.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--navy-950);
    background: linear-gradient(145deg, #72f3ca, #27cfa0);
    box-shadow: 7px 7px 16px rgba(12, 97, 78, .2), -6px -6px 14px rgba(255, 255, 255, .9);
    font-size: 1.35rem;
}

.main-nav { display: flex; align-items: center; gap: 22px; font-size: .93rem; font-weight: 700; }
.main-nav > a:not(.nav-action) { color: #456071; transition: color .2s ease; }
.main-nav > a:not(.nav-action):hover { color: var(--mint-dark); }
.logout-form { margin: 0; display: inline-flex; }

.nav-action, .button {
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 18px;
    cursor: pointer;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.button:hover, .nav-action:hover { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.primary {
    color: #052318;
    background: linear-gradient(145deg, #5cf0c2, #28d09f);
    box-shadow: 8px 8px 18px rgba(10, 101, 77, .2), -6px -6px 14px rgba(255, 255, 255, .8);
}
.subtle, .ghost {
    color: var(--ink);
    background: var(--surface);
    box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
}
.button.large { min-height: 52px; padding-inline: 24px; }
.button.full { width: 100%; }

.hero-section { padding: 78px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 72px; }
.hero-copy h1 { max-width: 650px; margin: 18px 0 20px; font-size: clamp(2.5rem, 5.5vw, 4.7rem); line-height: 1.15; letter-spacing: -.045em; color: var(--navy-950); }
.hero-copy > p { max-width: 640px; color: var(--muted); font-size: 1.13rem; line-height: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--mint-dark); font-size: .84rem; font-weight: 900; letter-spacing: .01em; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 6px rgba(56, 228, 177, .13); flex: 0 0 auto; }
.status-dot.off { background: #98a8b2; box-shadow: none; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; color: #587080; font-size: .86rem; }
.hero-trust span::before { content: "✓"; color: var(--mint-dark); margin-left: 7px; font-weight: 900; }

.hero-visual { position: relative; isolation: isolate; }
.hero-visual::before {
    content: "";
    position: absolute;
    inset: -12% -18%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 228, 177, .2), transparent 64%);
}
.hero-visual img { aspect-ratio: 1; object-fit: cover; border-radius: 38px; box-shadow: 22px 22px 44px rgba(10, 36, 57, .28), -15px -15px 32px rgba(255, 255, 255, .75); }
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 18px;
    background: rgba(246, 250, 251, .86);
    box-shadow: 12px 12px 30px rgba(5, 33, 51, .2), -7px -7px 22px rgba(255, 255, 255, .75);
    backdrop-filter: blur(15px);
}
.floating-card.top { top: 8%; right: -8%; }
.floating-card.bottom { bottom: 8%; left: -8%; }
.floating-card strong, .floating-card small { display: block; }
.floating-card strong { font-size: .9rem; }
.floating-card small { color: var(--muted); font-size: .73rem; }
.mini-icon, .pulse-ring { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--mint-dark); background: #ddf8ef; }
.pulse-ring { position: relative; border-radius: 50%; background: var(--mint); box-shadow: inset 0 0 0 11px #ddf8ef; }

.services-section { padding: 94px 0; background: rgba(255, 255, 255, .26); border-block: 1px solid rgba(16, 45, 64, .05); }
.section-heading { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 50px; margin-bottom: 42px; }
.section-heading h2, .about-copy h2 { margin: 7px 0 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.35; color: var(--navy-950); }
.section-heading > p { margin-bottom: 5px; color: var(--muted); }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.service-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 14px 14px 32px var(--shadow-dark), -14px -14px 32px var(--shadow-light);
    transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 19px 19px 38px rgba(13, 45, 65, .17), -14px -14px 30px var(--shadow-light); }
.service-image { position: relative; overflow: hidden; margin: 12px; border-radius: 20px; }
.service-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.service-card:hover .service-image img { transform: scale(1.025); }
.service-index { position: absolute; top: 14px; right: 14px; min-width: 44px; padding: 5px 10px; border-radius: 12px; color: white; background: rgba(6, 21, 35, .72); backdrop-filter: blur(8px); text-align: center; font-size: .8rem; font-weight: 900; }
.service-body { padding: 17px 24px 25px; }
.service-body h3 { margin-bottom: 8px; font-size: 1.35rem; color: var(--navy-900); }
.service-body > p { min-height: 58px; color: var(--muted); line-height: 1.8; }
.service-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 16px; border-top: 1px solid rgba(16, 45, 64, .08); }
.price { display: flex; flex-direction: column; line-height: 1.35; }
.price strong { font-size: 1.27rem; color: var(--navy-950); }
.price span { color: var(--muted); font-size: .78rem; }

.about-section { padding: 100px 0 120px; }
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: stretch; }
.soft-panel { border: 1px solid rgba(255, 255, 255, .72); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 14px 14px 32px var(--shadow-dark), -14px -14px 32px var(--shadow-light); }
.about-copy { padding: clamp(30px, 5vw, 58px); }
.about-copy p { margin: 20px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 2.1; }
.process-list { display: grid; gap: 18px; }
.process-item { display: flex; gap: 20px; align-items: flex-start; padding: 25px; border-radius: 22px; background: var(--surface); box-shadow: inset 4px 4px 10px rgba(13, 45, 65, .1), inset -5px -5px 12px rgba(255, 255, 255, .85); }
.process-item > span { flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--navy-900); background: linear-gradient(145deg, #72f3ca, #28d09f); font-weight: 900; }
.process-item strong { display: block; margin-bottom: 3px; font-size: 1.05rem; }
.process-item p { margin: 0; color: var(--muted); font-size: .9rem; }

.site-footer { padding: 52px 0; color: #d9e8ee; background: var(--navy-950); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .6fr; align-items: end; gap: 35px; }
.footer-brand { color: white; margin-bottom: 15px; }
.site-footer p { max-width: 540px; margin: 0; color: #92a9b7; font-size: .9rem; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; }
.footer-contact strong { margin-bottom: 8px; color: white; }
.footer-contact a { color: #a8bfcb; direction: ltr; text-align: right; }
.footer-meta { color: #6f8998; font-size: .82rem; }

.page-section { min-height: 70vh; padding: 70px 0 110px; }
.page-section.compact { display: flex; align-items: center; padding-top: 55px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 38px; }
.page-heading h1 { margin: 5px 0 0; color: var(--navy-950); font-size: clamp(2rem, 4vw, 3.3rem); }
.checkout-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: 30px; align-items: stretch; }
.checkout-visual { overflow: hidden; padding: 12px; }
.checkout-visual img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; border-radius: 20px; }
.checkout-card { padding: clamp(28px, 5vw, 50px); }
.checkout-card h1 { margin: 8px 0 14px; color: var(--navy-950); font-size: 2rem; }
.checkout-card > p { color: var(--muted); }
.checkout-price { margin: 28px 0 18px; padding: 20px 22px; border-radius: 18px; background: var(--surface); box-shadow: inset 5px 5px 12px rgba(13, 45, 65, .1), inset -5px -5px 12px white; }
.checkout-price span, .checkout-price strong { display: block; }
.checkout-price span { color: var(--muted); font-size: .82rem; }
.checkout-price strong { margin-top: 4px; font-size: 1.7rem; color: var(--navy-950); }
.checkout-price small { font-size: .8rem; color: var(--muted); }
.secure-note { margin-bottom: 24px; color: #4b6a77; font-size: .86rem; }
.secure-note span { color: var(--mint-dark); margin-left: 6px; }
.text-link { display: inline-block; margin-top: 17px; color: var(--mint-dark); font-weight: 800; font-size: .88rem; }
.centered { display: block; text-align: center; }

.empty-state { padding: 55px 30px; text-align: center; }
.empty-state h1, .empty-state h2 { color: var(--navy-950); }
.empty-state p { color: var(--muted); }
.order-list { display: grid; gap: 20px; }
.order-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 28px; }
.order-card h2 { margin: 5px 0 3px; font-size: 1.15rem; }
.order-card time, .order-number { color: var(--muted); font-size: .8rem; }
.order-number { direction: ltr; display: inline-block; }
.order-summary { display: grid; justify-items: end; gap: 6px; }
.order-summary small { color: var(--muted); }
.status-badge { display: inline-flex; padding: 5px 11px; border-radius: 99px; font-size: .76rem; font-weight: 900; white-space: nowrap; }
.status-badge.success { color: #087658; background: #d7f6ea; }
.status-badge.warning { color: #9a6211; background: #fff0cf; }
.status-badge.danger { color: #a63b48; background: #fae0e4; }
.status-badge.muted { color: #687985; background: #dde5e9; }

.result-container { max-width: 680px; }
.payment-result { padding: clamp(32px, 6vw, 58px); text-align: center; }
.result-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 19px; border-radius: 24px; background: #fff0cf; color: var(--warning); font-size: 2rem; font-weight: 900; box-shadow: 7px 7px 17px var(--shadow-dark), -7px -7px 17px white; }
.payment-result.success .result-icon { color: #087658; background: #d7f6ea; }
.payment-result.danger .result-icon { color: var(--danger); background: #fae0e4; }
.payment-result h1 { margin: 7px 0 8px; color: var(--navy-950); }
.payment-result > p { color: var(--muted); }
.payment-result dl { margin: 28px 0; padding: 10px 20px; border-radius: 18px; background: rgba(255,255,255,.45); text-align: right; }
.payment-result dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid rgba(16,45,64,.07); }
.payment-result dl div:last-child { border-bottom: 0; }
.payment-result dt { color: var(--muted); }
.payment-result dd { margin: 0; font-weight: 800; }

.admin-heading { align-items: center; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card { padding: 22px; }
.stat-card span, .stat-card strong { display: block; }
.stat-card span { color: var(--muted); font-size: .82rem; }
.stat-card strong { margin-top: 6px; color: var(--navy-950); font-size: 1.9rem; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.admin-tabs button { min-height: 44px; padding: 8px 18px; border: 0; border-radius: 14px; color: #587080; background: var(--surface); box-shadow: 5px 5px 12px var(--shadow-dark), -5px -5px 12px white; cursor: pointer; font-weight: 800; }
.admin-tabs button.active { color: #052318; background: linear-gradient(145deg, #5cf0c2, #28d09f); box-shadow: inset 3px 3px 8px rgba(8, 105, 77, .16), inset -3px -3px 8px rgba(255, 255, 255, .45); }
.admin-panel, .service-admin-list { padding: 28px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.panel-title h2 { margin: 0; color: var(--navy-950); font-size: 1.25rem; }
.panel-title p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; font-size: .88rem; }
th { color: var(--muted); font-size: .75rem; font-weight: 900; }
th, td { padding: 14px 12px; border-bottom: 1px solid rgba(16, 45, 64, .08); vertical-align: middle; }
td a { color: var(--mint-dark); font-weight: 800; }
.table-empty { color: var(--muted); text-align: center; }
.admin-split { display: grid; grid-template-columns: .78fr 1.22fr; gap: 24px; align-items: start; }
.service-admin-list { display: grid; gap: 10px; }
.service-admin-list .panel-title { margin-bottom: 10px; }
.service-admin-item { width: 100%; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 13px; padding: 9px; border: 0; border-radius: 16px; background: transparent; color: var(--ink); text-align: right; cursor: pointer; }
.service-admin-item:hover, .service-admin-item.active { background: rgba(255,255,255,.62); box-shadow: inset 3px 3px 8px rgba(13,45,65,.08), inset -3px -3px 8px white; }
.service-admin-item img { width: 58px; height: 58px; border-radius: 13px; object-fit: cover; }
.service-admin-item strong, .service-admin-item small { display: block; }
.service-admin-item strong { font-size: .84rem; }
.service-admin-item small { color: var(--muted); font-size: .72rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; margin-bottom: 20px; }
.field { display: grid; gap: 6px; color: #456071; font-size: .82rem; font-weight: 800; }
.field.full, .toggle-field.full { grid-column: 1 / -1; }
.field input, .field textarea, .form-control {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 13px;
    outline: none;
    color: var(--ink);
    background: var(--surface);
    box-shadow: inset 4px 4px 9px rgba(13,45,65,.1), inset -4px -4px 9px white;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .form-control:focus { border-color: rgba(12,169,126,.45); box-shadow: inset 4px 4px 9px rgba(13,45,65,.1), inset -4px -4px 9px white, 0 0 0 3px rgba(56,228,177,.12); }
.toggle-field { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; font-weight: 800; }
.toggle-field input { width: 19px; height: 19px; accent-color: var(--mint-dark); }
.form-section-title { margin: 28px 0 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(16,45,64,.08); color: var(--navy-900); font-size: 1rem; }
.form-hint { color: var(--muted); font-size: .8rem; }

.alert { margin: 15px 0; padding: 12px 16px; border-radius: 13px; font-size: .88rem; }
.alert.success { color: #087658; background: #d7f6ea; }
.alert.danger, .text-danger, .validation-message { color: #a63b48; background: #fae0e4; }
.validation-message { display: block; margin-bottom: 12px; padding: 9px 12px; border-radius: 10px; }
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--mint-dark); }
.invalid { outline: 1px solid var(--danger); }

/* Identity pages use the same soft visual language while remaining server-rendered. */
.site-main > h1, .site-main > .row, .site-main > div:not(.site-shell) { width: min(620px, calc(100% - 40px)); margin-inline: auto; }
.site-main > h1 { margin-top: 62px; color: var(--navy-950); }
.row { display: block; margin-bottom: 80px; padding: 28px; border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 14px 14px 32px var(--shadow-dark), -14px -14px 32px white; }
.row h2, .row h3 { color: var(--navy-900); }
.row hr { height: 1px; border: 0; background: rgba(16,45,64,.08); }
.row > [class*="col-md"] { width: 100%; }
.row > .col-md-6 + .col-md-6, .row > .col-md-6 + .col-md-offset-2, .row > .col-md-4 + .col-md-6 { display: none; }
.form-floating, .mb-3 { margin-bottom: 16px; }
.form-floating label, .form-label { display: block; margin-bottom: 6px; color: #456071; font-size: .82rem; font-weight: 800; }
.checkbox label { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 18px; height: 18px; accent-color: var(--mint-dark); }
.btn { min-height: 48px; padding: 10px 20px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 900; }
.btn-primary { color: #052318; background: linear-gradient(145deg, #5cf0c2, #28d09f); box-shadow: 7px 7px 16px rgba(10,101,77,.18), -5px -5px 12px white; }
.w-100 { width: 100%; }
.row p a { color: var(--mint-dark); font-weight: 800; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.nav-link { display: block; padding: 7px 11px; border-radius: 10px; color: var(--muted); }
.nav-link.active { color: var(--navy-900); background: #d7f6ea; }

#blazor-error-ui { display: none; position: fixed; inset: auto 20px 20px; z-index: 1000; padding: 13px 18px; border-radius: 13px; color: white; background: #a63b48; box-shadow: 0 12px 32px rgba(0,0,0,.22); }
#blazor-error-ui .reload { margin-right: 10px; text-decoration: underline; }
#blazor-error-ui .dismiss { position: absolute; left: 10px; cursor: pointer; }
.blazor-error-boundary { padding: 1rem; border-radius: 14px; color: white; background: var(--danger); }
.blazor-error-boundary::after { content: "خطایی رخ داد."; }

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 55px; }
    .hero-copy { text-align: center; }
    .hero-copy > p { margin-inline: auto; }
    .hero-actions, .hero-trust { justify-content: center; }
    .hero-visual { width: min(640px, 90%); margin-inline: auto; }
    .section-heading, .about-grid { grid-template-columns: 1fr; }
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-visual img { min-height: auto; aspect-ratio: 16/9; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-split { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-meta { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .container, .container.narrow { width: min(100% - 28px, 1160px); }
    .site-header { position: relative; }
    .nav-wrap { min-height: auto; padding-block: 15px; flex-direction: column; align-items: stretch; }
    .brand { align-self: center; }
    .main-nav { justify-content: center; gap: 8px 15px; flex-wrap: wrap; font-size: .82rem; }
    .nav-action { min-height: 38px; padding: 6px 12px; }
    .hero-section { padding: 55px 0 70px; }
    .hero-copy h1 { font-size: clamp(2.2rem, 11vw, 3.4rem); }
    .hero-actions { flex-direction: column; }
    .floating-card { min-width: 165px; padding: 10px 12px; }
    .floating-card.top { right: -5%; }
    .floating-card.bottom { left: -5%; }
    .service-grid { grid-template-columns: 1fr; }
    .service-body > p { min-height: auto; }
    .section-heading { gap: 14px; }
    .services-section, .about-section { padding: 70px 0; }
    .page-section { padding: 48px 0 80px; }
    .page-heading, .order-card { align-items: stretch; flex-direction: column; }
    .order-summary { justify-items: start; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full, .toggle-field.full { grid-column: auto; }
    .admin-panel, .service-admin-list { padding: 20px 15px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-meta { grid-column: auto; }
}

@media (max-width: 480px) {
    .service-footer { align-items: stretch; flex-direction: column; }
    .service-footer .button { width: 100%; }
    .hero-visual { width: 100%; }
    .floating-card { position: static; margin-top: 12px; }
    .admin-stats { grid-template-columns: 1fr; }
    .payment-result dl div { flex-direction: column; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
