@font-face {
    font-family: pfont;
    src: url("../fonts/pfont-light.woff2") format("woff2");
    font-weight: 200;
}

@font-face {
    font-family: pfont;
    src: url("../fonts/pfont-Regular.woff2") format("woff2");
    font-weight: 400;
}

@font-face {
    font-family: pfont;
    src: url("../fonts/pfont-Bold.woff2") format("woff2");
    font-weight: 600;
}

@font-face {
    font-family: pfont;
    src: url("../fonts/pfont-ExtraBold.woff2") format("woff2");
    font-weight: 800;
}

:root {
    --blue: #132E75;
    --green: #38BB5B;
    --bg: #f6f8fc;
    --card: #fff;
    --text: #172033;
    --muted: #7a8599;
    --border: #e8edf5;
}

* {
    font-family: pfont, Tahoma, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

.site-header {
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.site-nav {
    height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
}

.brand strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.main-menu {
    display: flex;
    gap: 18px;
    align-items: center;
}

.main-menu a {
    text-decoration: none;
    color: #354159;
    font-weight: 600;
}

.login-link {
    background: rgba(19, 46, 117, .08);
    color: var(--blue) !important;
    padding: 10px 16px;
    border-radius: 14px;
}

.hero-section {
    padding: 76px 0 44px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 28px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    background: rgba(56, 187, 91, .12);
    color: var(--green);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-section h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 18px;
}

.hero-section p {
    font-size: 16px;
    line-height: 2.1;
    color: var(--muted);
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
}

.hero-card,
.form-card,
.side-help-card,
.service-card,
.category-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(20, 40, 80, .045);
}

.hero-card {
    padding: 28px;
}

.hero-card strong {
    font-size: 20px;
    font-weight: 800;
}

.hero-card ul {
    margin: 18px 0 0;
    padding: 0 18px 0 0;
    line-height: 2.2;
    color: var(--muted);
}

.section-block {
    padding: 44px 0;
}

.section-title {
    margin-bottom: 22px;
}

.section-title h2 {
    font-size: 24px;
    font-weight: 800;
}

.section-title p {
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-card {
    text-decoration: none;
    color: var(--text);
    padding: 20px;
}

.category-card span {
    display: block;
    color: var(--muted);
}

.category-card strong {
    display: block;
    font-size: 30px;
    font-weight: 800;
    margin: 8px 0;
}

.category-card small {
    color: var(--muted);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.service-card {
    display: flex;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
    padding: 18px;
    transition: .2s;
}

.service-card:hover {
    transform: translateY(-3px);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: #eef3ff;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 800;
    flex: 0 0 auto;
}

.service-icon.large {
    width: 64px;
    height: 64px;
    font-size: 22px;
}

.service-card h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--muted);
    line-height: 1.8;
    min-height: 50px;
}

.service-card span {
    color: var(--green);
    font-weight: 800;
}

.page-head {
    padding: 46px 0 28px;
}

.page-head h1 {
    font-size: 32px;
    font-weight: 800;
}

.page-head p {
    color: var(--muted);
    line-height: 2;
}

.service-search {
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin-top: 18px;
}

.service-search input,
.public-field input {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px 15px;
    width: 100%;
    outline: none;
}

.service-search button {
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 16px;
    padding: 0 22px;
    font-weight: 800;
}

.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.category-filter a {
    text-decoration: none;
    color: #354159;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 14px;
}

.category-filter a.active {
    background: var(--blue);
    color: #fff;
}

.empty-state {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 22px;
    padding: 28px;
    color: var(--muted);
}

.service-page-title {
    display: flex;
    gap: 16px;
    align-items: center;
}

.service-page-title strong {
    color: var(--green);
}

.service-form-shell {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}

.form-card,
.side-help-card {
    padding: 24px;
}

.form-card h2,
.side-help-card h3 {
    font-size: 20px;
    font-weight: 800;
}

.form-card p,
.side-help-card p,
.side-help-card li {
    color: var(--muted);
    line-height: 2;
}

.public-field {
    margin-top: 18px;
}

.public-field label {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
}

.text-ltr {
    direction: ltr;
    text-align: left;
}

.plate-widget {
    display: grid;
    grid-template-columns: 70px 80px 90px 70px;
    gap: 8px;
}

.plate-letter-btn {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.site-footer {
    padding: 30px 0;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 992px) {
    .hero-grid,
    .service-form-shell {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .main-menu {
        gap: 10px;
        font-size: 12px;
    }

    .hero-section h1 {
        font-size: 30px;
    }

    .category-grid,
    .service-grid {
        grid-template-columns: 1fr;
    }

    .plate-widget {
        grid-template-columns: 1fr 1fr;
    }
}
.web-message {
    margin-top: 14px;
    color: var(--muted);
    line-height: 2;
}

.service-result-box {
    margin-top: 18px;
}

.result-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
}

.result-card h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.result-row:last-child {
    border-bottom: 0;
}

.result-row span {
    color: var(--muted);
}

.result-row strong {
    direction: ltr;
    text-align: left;
}

.result-error {
    background: rgba(208, 68, 68, .08);
    color: #d04444;
    border: 1px solid rgba(208, 68, 68, .18);
    border-radius: 18px;
    padding: 14px;
    line-height: 2;
}

.request-detail-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 20px;
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.public-json-debug {
    direction: ltr;
    text-align: left;
    background: #101828;
    color: #e6edf7;
    border-radius: 18px;
    padding: 18px;
    font-family: Consolas, monospace;
    font-size: 13px;
    line-height: 1.8;
    overflow: auto;
    max-height: 520px;
}

@media print {
    .site-header,
    .site-footer,
    .request-actions {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .form-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

@media (max-width: 992px) {
    .request-detail-grid {
        grid-template-columns: 1fr;
    }
}
.bank-detect-box {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafd;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
}

.bank-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.bank-logo svg {
    width: 30px;
    height: 30px;
}

.bank-detect-box strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.bank-detect-box small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.text-success {
    color: #1f9d55 !important;
}

.text-danger {
    color: #d04444 !important;
}
.field-hint {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.plate-widget {
    display: grid;
    grid-template-columns: 70px 80px 90px 70px;
    gap: 8px;
    align-items: center;
    direction: ltr;
}

.plate-widget input,
.motor-plate-widget input {
    text-align: center;
    font-weight: 800;
    font-size: 18px;
}

.plate-letter-btn {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    min-height: 52px;
    font-weight: 800;
}

.motor-plate-widget {
    display: grid;
    grid-template-columns: 110px 160px;
    gap: 8px;
    direction: ltr;
}

.plate-letter-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.plate-letter-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 40, .45);
}

.plate-letter-modal-card {
    position: relative;
    background: #fff;
    width: min(460px, calc(100% - 32px));
    margin: 80px auto;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 24px 80px rgba(0,0,0,.18);
}

.plate-letter-modal-card h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 18px;
}

.plate-letter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.plate-letter-grid button {
    border: 1px solid var(--border);
    background: #f8fafd;
    border-radius: 14px;
    min-height: 46px;
    font-weight: 800;
}

.plate-modal-close {
    margin-top: 16px;
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 14px;
    padding: 10px 18px;
    font-weight: 800;
}

@media (max-width: 576px) {
    .plate-widget {
        grid-template-columns: 1fr 1fr;
    }

    .motor-plate-widget {
        grid-template-columns: 1fr;
    }

    .plate-letter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.jalali-date-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.jalali-date-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 40, .45);
}

.jalali-date-modal-card {
    position: relative;
    width: min(420px, calc(100% - 32px));
    margin: 90px auto;
    background: #fff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 24px 80px rgba(0,0,0,.18);
}

.jalali-date-modal-card h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 18px;
}

.jalali-date-selects {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    direction: ltr;
}

.jalali-date-selects select {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    font-weight: 800;
}

.jalali-date-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.jalali-date-actions button {
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 14px;
    padding: 10px 16px;
    font-weight: 800;
}

.jalali-date-actions button.secondary {
    background: #eef3ff;
    color: var(--blue);
}

/* Web Core v1 additions */
.required-star { color: #d04444; margin-right: 4px; }
.optional-label { color: var(--muted); font-size: 11px; margin-right: 8px; font-weight: 400; }
.public-field select,
.public-field textarea,
.public-field input[type="file"] {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px 15px;
    width: 100%;
    background: #fff;
    outline: none;
}
.public-field input:focus,
.public-field select:focus,
.public-field textarea:focus {
    border-color: rgba(19, 46, 117, .45);
    box-shadow: 0 0 0 4px rgba(19, 46, 117, .07);
}
.field-error {
    color: #d04444;
    font-size: 12px;
    margin-top: 7px;
    min-height: 2px;
}
.web-message.is-error { color: #d04444; }
.web-message.is-success { color: #1f9d55; }
.web-message.is-loading { color: var(--blue); }
.result-value {
    display: flex;
    align-items: center;
    gap: 10px;
}
.result-highlight {
    background: rgba(56, 187, 91, .07);
    border-radius: 12px;
    padding-inline: 10px;
}
.copy-value-btn {
    border: 1px solid var(--border);
    background: #f8fafd;
    color: var(--blue);
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 12px;
}
.result-image {
    display: block;
    max-width: 100%;
    max-height: 560px;
    border-radius: 16px;
    object-fit: contain;
}
.future-payment-box {
    margin-top: 16px;
    border: 1px dashed rgba(19, 46, 117, .2);
    background: rgba(19, 46, 117, .04);
    border-radius: 16px;
    padding: 12px;
    color: var(--muted);
}
.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.calendar-head button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 13px;
    font-size: 22px;
}
.calendar-year-row { margin-bottom: 14px; }
.calendar-year-row select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 10px;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
}
.calendar-day {
    border: 1px solid var(--border);
    background: #f8fafd;
    border-radius: 10px;
    height: 42px;
}
.calendar-day:hover {
    background: var(--blue);
    color: #fff;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .site-nav { height: auto; padding: 14px 0; gap: 14px; flex-wrap: wrap; }
}

.app-user-actions{
    display:flex;
    align-items:center;
    gap:8px;
}
.logout-chip{
    background:#fff!important;
    color:#d04444!important;
    border:1px solid rgba(208,68,68,.18);
}