/* صفحه عمومی ارسال تیکت — بدون نیاز به ورود */

body.public-ticket {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(900px 420px at 90% -10%, #e8f6f1, transparent 60%), #f2f7f5;
    color: #243b36;
    font-family: anjoman, IRANSans, Tahoma, sans-serif;
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #dce7e3;
}

.public-topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: .7rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.public-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.public-brand img {
    max-height: 46px;
    max-width: 190px;
    object-fit: contain;
}

.public-brand-name {
    font-weight: 700;
    color: #0b5d4e;
    font-size: 1.05rem;
}

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

.public-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 10px;
}

.public-main {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
    flex: 1 0 auto;
}

.public-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.25rem;
    color: #64748b;
    font-size: .85rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    justify-content: space-between;
    border-top: 1px solid #dce7e3;
}

.public-footer a {
    color: #0f766e;
    text-decoration: none;
}

/* ---------- کد امنیتی ---------- */

.ticket-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 44px;
    gap: .5rem;
    align-items: center;
}

.ticket-captcha .form-control {
    text-align: center;
    letter-spacing: .15em;
}

.captcha-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    background: #fff;
    border: 1px solid #dce7e3;
    border-radius: 10px;
    overflow: hidden;
}

.captcha-image img {
    max-height: 100%;
    max-width: 100%;
    display: block;
}

.captcha-image img:not([src]) {
    visibility: hidden;
}

.captcha-refresh {
    height: 48px;
    border: 1px solid #dce7e3;
    border-radius: 10px;
    background: #e6f2ef;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background .2s ease;
}

.captcha-refresh:hover {
    background: #d7ebe5;
}

/* ---------- پیام موفقیت ---------- */

.ticket-success {
    margin-top: 1.25rem;
    background: #fff;
    border: 1px solid #cfe7df;
    border-radius: 20px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-soft, 0 4px 18px rgba(15, 118, 110, .08));
    animation: facFade .45s ease both;
}

.ticket-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #0f766e;
    background: #e6f2ef;
    margin-bottom: .9rem;
}

.ticket-success h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0b5d4e;
    margin: 0 0 .4rem;
}

.ticket-success p {
    color: #64748b;
    margin: 0;
}

.ticket-code {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin: .9rem 0 .25rem;
    padding: .65rem 1.1rem;
    border-radius: 12px;
    background: #f4faf7;
    border: 1px dashed #9cc5bd;
    font-size: 1.15rem;
}

.ticket-code strong {
    letter-spacing: .12em;
    color: #0b5d4e;
    font-family: "Courier New", monospace;
    direction: ltr;
}

.ticket-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
    margin-top: 1.1rem;
}

.ticket-success-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* ---------- صفحه پیگیری ---------- */

.track-search {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}

.track-search .form-control {
    flex: 1;
    min-width: 200px;
    direction: ltr;
    text-align: center;
    letter-spacing: .08em;
}

.track-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.25rem 0 .75rem;
    color: #0b5d4e;
    font-weight: 700;
}

.track-card {
    background: #fff;
    border: 1px solid #dce7e3;
    border-radius: 14px;
    margin-bottom: .75rem;
    overflow: hidden;
}

.track-card-head {
    padding: .7rem 1rem;
    background: #e6f2ef;
    font-weight: 700;
    color: #0b5d4e;
}

.track-card-body {
    padding: .9rem 1rem;
    line-height: 1.9;
    color: #33413d;
    white-space: pre-wrap;
}

.track-reply {
    margin-top: .75rem;
}

@media (max-width: 575.98px) {
    .public-main {
        padding: 1rem .85rem 2rem;
    }

    .public-actions .btn {
        font-size: .8rem;
    }

    .ticket-captcha {
        grid-template-columns: minmax(0, 1fr) 110px 42px;
    }
}
