:root {
    --ad-ink: #0b1220;
    --ad-muted: #64748b;
    --ad-line: #e2e8f0;
    --ad-sky: #0284c7;
    --ad-sky-soft: #e0f2fe;
    --ad-surface: #ffffff;
}

.ad-page {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: var(--ad-ink);
    background: #eef3f8;
}

.ad-stage {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    min-height: calc(100vh - 64px);
    max-height: calc(100vh - 64px);
    overflow: hidden;
}

.ad-visual {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.ad-visual__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 15%;
    filter: saturate(1.05) contrast(1.04);
}

.ad-visual__veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 15, 28, 0.12) 0%, rgba(8, 15, 28, 0.28) 45%, rgba(8, 15, 28, 0.9) 100%),
        linear-gradient(90deg, rgba(2, 132, 199, 0.18), transparent 42%);
}

.ad-visual__copy {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    padding: 28px 30px 32px;
    color: #fff;
}

.ad-visual__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 800;
    color: #e0f2fe;
}

.ad-visual__copy h1 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.35;
    max-width: 11em;
}

.ad-visual__copy p {
    margin: 0;
    max-width: 28em;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
}

.ad-form-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 22px;
    overflow: auto;
    background:
        radial-gradient(700px 260px at 100% 0%, rgba(14, 165, 233, 0.1), transparent 55%),
        linear-gradient(180deg, #f7fafc 0%, #eef2f7 100%);
}

.ad-form-shell {
    width: 100%;
    max-width: 520px;
}

.ad-panel {
    background: var(--ad-surface);
    border: 1px solid var(--ad-line);
    border-radius: 20px;
    padding: 22px 22px 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.ad-panel__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 900;
}

.ad-panel__desc {
    margin: 0 0 16px;
    color: var(--ad-muted);
    font-size: 13px;
    line-height: 1.7;
}

.ad-success,
.ad-errors {
    border-radius: 12px;
    padding: 11px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.7;
}

.ad-success {
    display: flex;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.ad-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ad-errors ul {
    margin: 0;
    padding-right: 16px;
}

.ad-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ad-field {
    margin-bottom: 12px;
}

.ad-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}

.ad-field > label .req {
    color: #dc2626;
}

.ad-input,
.ad-select,
.ad-textarea,
.ad-search {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: #fff;
    color: var(--ad-ink);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ad-input:focus,
.ad-select:focus,
.ad-textarea:focus,
.ad-search:focus {
    border-color: var(--ad-sky);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.ad-textarea {
    min-height: 58px;
    resize: none;
    line-height: 1.6;
}

.ad-roots {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ad-root-chip {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    min-height: 34px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all .15s ease;
}

.ad-root-chip:hover {
    border-color: #94a3b8;
}

.ad-root-chip.is-active {
    background: var(--ad-sky-soft);
    border-color: #7dd3fc;
    color: #075985;
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.25);
}

.ad-combo {
    position: relative;
}

.ad-combo__box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
}

.ad-combo__box.is-focus {
    border-color: var(--ad-sky);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.ad-combo__pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #075985;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.3;
}

.ad-combo__pill button {
    border: 0;
    background: transparent;
    color: #0369a1;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.ad-combo__input {
    flex: 1 1 140px;
    min-width: 120px;
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
    background: transparent;
    padding: 4px 2px;
    font-family: inherit;
    font-size: 13.5px;
}

.ad-combo__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 20;
    max-height: 220px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--ad-line);
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    display: none;
}

.ad-combo__menu.is-open {
    display: block;
}

.ad-combo__item {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    text-align: right;
    padding: 10px 12px;
    cursor: pointer;
    font-family: inherit;
}

.ad-combo__item:hover,
.ad-combo__item.is-active {
    background: #f0f9ff;
}

.ad-combo__item strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--ad-ink);
}

.ad-combo__item span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--ad-muted);
}

.ad-combo__empty {
    padding: 14px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 700;
}

.ad-hidden-inputs {
    display: none;
}

.ad-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 2px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
    color: #fff !important;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.26);
}

.ad-submit:hover {
    filter: brightness(1.03);
}

.ad-hint {
    margin: 10px 0 0;
    text-align: center;
    color: #94a3b8;
    font-size: 11.5px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .ad-stage {
        grid-template-columns: 1fr;
        max-height: none;
        min-height: auto;
        overflow: visible;
    }

    .ad-visual {
        min-height: 220px;
    }

    .ad-visual__copy h1 {
        font-size: 24px;
    }

    .ad-form-col {
        padding: 16px 12px 28px;
        align-items: flex-start;
    }

    .ad-grid-2 {
        grid-template-columns: 1fr;
    }
}
