:root {
    --primary: #0a662e;
    /* سبز قم */
    --accent: #d4af37;
    /* طلایی */
    --muted: #6b6b6b;
    --card-bg: #ffffff;
    --radius: 12px;
    --max-width: 900px;

    /* متغیرهای مورد نیاز برای مودال‌ها */
    --background: #ffffff;
    --text: #222222;
    --text-muted: #6b6b6b;
    --success: #0b9d57;
    --danger: #d64545;
}

@font-face {
    font-family: Dana;
    src: url(./font/Dana.woff);
}

* {
    box-sizing: border-box;
    font-family: Dana, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

a{
    text-decoration: inherit;
    color: inherit;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f6faf6 0%, #f0f6f0 100%);
    color: #222;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
}

.wrap {
    transition: opacity 0.2s ease-in-out, scale 0.2s ease-in-out;
    width: 100%;
    max-width: var(--max-width);
    margin: auto;
    padding: 16px;
}

.animateStep{
    opacity: 0;
    scale: 0.9;
}

.widthfc{
    width: fit-content !important;
}

/* header */
.site-header {
    margin-bottom: 18px;
}

.header-inner {
    display: flex;
    gap: 16px;
    align-items: center;
    background: linear-gradient(90deg, rgba(10, 102, 46, 0.06), rgba(212, 175, 55, 0.03));
    padding: 12px;
    border-radius: 14px;
}

.title h1 {
    margin: 0;
    font-size: 20px;
    color: var(--primary)
}

.subtitle {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px
}

.header-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover
}

/* card / steps */
.card {
    background: var(--card-bg);
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(10, 10, 10, 0.04)
}

.multi-step .step {
    background: var(--card-bg);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(10, 10, 10, 0.03)
}

.multi-step h2 {
    margin: 0 0 10px;
    color: var(--primary)
}

.muted {
    color: var(--muted);
    font-size: 14px
}

/* payment box */
.payment-box {
    border-radius: 10px;
    padding: 12px;
    border: 1px dashed rgba(10, 102, 46, 0.2);
    margin: 12px 0
}

.payment-box .amount {
    font-weight: 700;
    color: var(--primary)
}

.payment-box .card-number {
    margin-top: 6px;
    color: #333
}

.payment-box .card-number strong {
    white-space: nowrap;
}

.payment-box .card-name {
    font-size: 15.5px;
    margin-top: 6px;
    color: #333
}

/* form layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px
}

.field {
    display: block
}

/* نشانگر فیلدهای ضروری */
.field.required span::after {
    content: '*';
    color: #ff4444;
    margin-right: 3px;
    font-size: 1em;
}

.field.wide {
    grid-column: 1/-1
}

.field span {
    display: block;
    font-weight: 600;
    margin-bottom: 6px
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* date inputs */
.date-inputs {
    display: flex;
    gap: 8px;
}

.date-inputs input {
    text-align: center;
}

.date-inputs input:nth-child(3) {
    /* year */
    width: 40%;
}

.date-inputs input:nth-child(2),
/* month */
.date-inputs input:nth-child(1) {
    /* day */
    width: 30%;
}

/* upload area */
.upload-area {
    margin: 20px 0;
}

.upload-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: rgba(10, 102, 46, 0.03);
    border: 2px dashed rgba(10, 102, 46, 0.2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label:hover,
.upload-label:focus {
    background: rgba(10, 102, 46, 0.06);
    border-color: rgba(10, 102, 46, 0.4);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 12px;
}

.upload-text {
    text-align: center;
    margin-bottom: 12px;
}

.upload-text strong {
    display: block;
    color: var(--primary);
    margin-bottom: 4px;
}

.upload-text span {
    color: var(--muted);
    font-size: 14px;
}

.upload-hint {
    display: flex;
    gap: 3px;
    font-size: 12px;
    color: var(--muted);
}

/* receipt preview */
.receipt-preview {
    margin-top: 16px;
    text-align: center;
}

.receipt-preview img {
    max-width: 320px;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid #eee;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px
}

.btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700
}

.btn.primary {
    background: var(--primary);
    color: white
}

.btn.success {
    background: #0b9d57;
    color: white
}

.btn.danger {
    background: #d64545;
    color: white
}

.btn.link {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(10, 102, 46, 0.08)
}

/* review */
.review {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px
}

.review-block {
    background: #fbfbfb;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #f0f0f0
}

.review-table {
    width: 100%;
    border-collapse: collapse
}

.review-table tr {
    border-bottom: 1px solid #eee;
}
.review-table tr:last-child {
    border-bottom: unset;
}

.review-table tr td {
    padding: 8px;
}

@media (max-width: 360px){
    .review-table tr{
        display: flex;
        flex-wrap: wrap;
    }
}

#reviewReceipt img {
    max-width: 320px;
    width: 100%;
    border-radius: 8px
}

/* final message */
.final-message {
    margin-top: 12px;
    font-weight: 600;
    color: var(--primary)
}

/* footer */
.site-footer {
    text-align: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px
}

.finish-container{
    max-width: 530px;
    margin: 0 auto;
}

.finishPicture{
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
}

.finishPicture>img{
    width: 100%;
    height: 100%;
}

.finishMessage{
    margin-top: 16px;
    text-align: center;
}

#step-4 .actions{
    justify-content: center;
    font-size: 13px;
}
#step-4 .actions a{
    display: flex;
}

/* responsive */
@media (max-width:800px) {
    .form-grid {
        grid-template-columns: 1fr
    }

    .header-inner {
        flex-direction: row;
        align-items: center
    }

    .dome img {
        width: 54px;
        height: 54px
    }
}

@media (max-width:480px) {

    .header-inner {
        gap: 10px
    }

    .site-header .title h1 {
        font-size: 18px
    }
}

@media (max-width:240px) {
    .wrap>* {
        display: none !important;
    }
    .wrap::after{
        content: "صفحه نمایش دستگاه شما برای نمایش محتوا سایت بیش از حد کوچیک است و پشتیبانی نمی‌شود!";
        text-align: center;
        display: flex;
    }
}