

/* =====================================================
           Index Page Styles
           فقط استایل‌های اختصاصی همین صفحه
           ===================================================== */

.index-page {
    min-height: 100vh;
}

.view {
    min-height: 100vh;
}

    .view.active {
        display: block;
    }

/* =====================================================
           Splash
           ===================================================== */

.splash-view {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(24px + var(--app-safe-top)) 24px calc(24px + var(--app-safe-bottom));
    background: radial-gradient( circle at 20% 10%, rgba(255, 255, 255, .22), transparent 30% ), linear-gradient( 145deg, var(--app-primary-dark), var(--app-primary) );
    transition: opacity .45s ease, visibility .45s ease;
}

    .splash-view.hide {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

.splash-content {
    width: 100%;
    max-width: 350px;
    text-align: center;
    color: #ffffff;
}

.splash-logo {
    position: relative;
    width: 112px;
    height: 112px;
    margin: 0 auto 24px;
    border-radius: 34px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

    .splash-logo::before,
    .splash-logo::after {
        content: "";
        position: absolute;
        inset: -12px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 42px;
        animation: splash-pulse 2.2s ease-in-out infinite;
    }

    .splash-logo::after {
        inset: -24px;
        opacity: .45;
        animation-delay: .4s;
    }

    .splash-logo svg {
        width: 62px;
        height: 62px;
        fill: none;
        stroke: #ffffff;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.splash-title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

.splash-subtitle {
    margin: 7px 0 30px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
}

.splash-loader {
    width: 120px;
    height: 4px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, .20);
    overflow: hidden;
}

    .splash-loader span {
        display: block;
        width: 42%;
        height: 100%;
        border-radius: inherit;
        background: #ffffff;
        animation: splash-loading 1.3s ease-in-out infinite;
    }

.splash-version {
    position: absolute;
    right: 0;
    bottom: calc(18px + var(--app-safe-bottom));
    left: 0;
    color: rgba(255, 255, 255, .55);
    font-size: 10px;
    text-align: center;
}

/* =====================================================
           Auth
           ===================================================== */

.auth-view {
    min-height: 100vh;
    padding: calc(22px + var(--app-safe-top)) 18px calc(22px + var(--app-safe-bottom));
    background: radial-gradient( circle at 100% 0, var(--app-primary-soft), transparent 34% ), var(--app-bg);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    min-height: calc( 100vh - var(--app-safe-top) - var(--app-safe-bottom) - 44px );
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.auth-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: var(--app-card-radius);
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient( 145deg, var(--app-primary), var(--app-primary-dark) );
    box-shadow: 0 12px 28px rgba(var(--app-primary-rgb), .22);
}

    .auth-brand-logo svg {
        width: 26px;
        height: 26px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
    }

.auth-brand-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.auth-brand-text span {
    display: block;
    color: var(--app-muted);
    font-size: 9px;
}

.auth-art {
    position: relative;
    height: 230px;
    margin: 22px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-art-circle {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient( circle, var(--app-primary-soft), transparent 67% );
}

.auth-art-car {
    position: relative;
    z-index: 2;
    width: 280px;
    color: var(--app-primary);
    filter: drop-shadow( 0 18px 18px rgba(var(--app-primary-rgb), .14) );
}

    .auth-art-car svg {
        width: 100%;
        height: auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.45;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.auth-form {
    margin-top: auto;
    padding-top: 20px;
}

.auth-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.auth-description {
    margin: 7px 0 22px;
    color: var(--app-muted);
    font-size: 11px;
}

.mobile-input-box {
    position: relative;
}

.mobile-prefix {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 2;
    color: var(--app-muted);
    font-size: 12px;
    direction: ltr;
    transform: translateY(-50%);
}

.mobile-input-box .app-input {
    padding-left: 65px;
    direction: ltr;
    text-align: left;
}

.auth-policy {
    margin: 13px 4px 0;
    color: var(--app-muted);
    font-size: 9px;
    text-align: center;
}

    .auth-policy a {
        color: var(--app-primary);
    }

/* =====================================================
           OTP
           ===================================================== */

.otp-boxes {
    direction: ltr;
    margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.otp-input {
    width: 100%;
    height: 58px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-card-radius);
    color: var(--app-text);
    background: var(--app-surface);
    outline: 0;
    font-size: 23px;
    font-weight: 600;
    text-align: center;
    transition: border-color var(--app-transition), box-shadow var(--app-transition), transform var(--app-transition);
}

    .otp-input:focus {
        border-color: var(--app-primary);
        box-shadow: 0 0 0 4px var(--app-primary-soft);
        transform: translateY(-2px);
    }

.otp-mobile {
    color: var(--app-primary);
    direction: ltr;
    unicode-bidi: embed;
}

.otp-timer {
    min-height: 38px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-muted);
    font-size: 11px;
}

.otp-resend {
    border: 0;
    padding: 6px 10px;
    color: var(--app-primary);
    background: transparent;
    cursor: pointer;
}

/* =====================================================
           Home header
           ===================================================== */

.home-header-profile {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
}
.
.home-header-avatar {
    width: 100%;
    max-height: 100%;
    flex: 0 0 42px;
    object-fit: cover;
    background: transparent;
}
.home-header-profile img {
    width: 64px;
}
.home-header-user {
    min-width: 0;
}

    .home-header-user span {
        display: block;
        color: var(--app-muted);
        font-size: 9px;
    }

    .home-header-user strong {
        display: block;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.notification-button {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    min-width: 17px;
    height: 17px;
    border: 2px solid var(--app-surface);
    border-radius: 999px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--app-danger);
    font-size: 8px;
}

/* =====================================================
           Home
           ===================================================== */

.home-welcome {
    margin-bottom: 14px;
}

    .home-welcome h1 {
        margin: 0;
        font-size: 21px;
        font-weight: 600;
    }

    .home-welcome p {
        margin: 3px 0 0;
        color: var(--app-muted);
        font-size: 11px;
    }

.home-search {
    position: relative;
    margin-bottom: 15px;
}

    .home-search .app-input {
        height: 52px;
        padding-right: 48px;
        padding-left: 48px;
        box-shadow: var(--app-shadow-sm);
    }

.home-search-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    width: 21px;
    height: 21px;
    color: var(--app-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.home-search-voice {
    position: absolute;
    top: 50%;
    left: 9px;
    width: 35px;
    height: 35px;
    border: 0;
    border-radius: var(--app-card-radius);
    display: grid;
    place-items: center;
    color: var(--app-primary);
    background: var(--app-primary-soft);
    transform: translateY(-50%);
    cursor: pointer;
}

    .home-search-voice svg,
    .home-search-icon svg {
        width: 100%;
        height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* =====================================================
           Active vehicle
           ===================================================== */

.vehicle-hero {
    position: relative;
    min-height: 205px;
    margin-bottom: 18px;
    border-radius: var(--app-card-radius);
    padding: 17px;
    color: #ffffff;
    background: radial-gradient( circle at 10% 0, rgba(255, 255, 255, .24), transparent 34% ), linear-gradient( 145deg, var(--app-primary-dark), var(--app-primary) );
    box-shadow: 0 20px 45px rgba(var(--app-primary-rgb), .24);
    overflow: hidden;
}

    .vehicle-hero::after {
        content: "";
        position: absolute;
        right: -54px;
        bottom: -68px;
        width: 190px;
        height: 190px;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 50%;
    }

.vehicle-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.vehicle-label {
    color: rgba(255, 255, 255, .65);
    font-size: 9px;
}

.vehicle-name {
    margin-top: 2px;
    font-size: 17px;
    font-weight: 600;
}

.vehicle-model {
    color: rgba(255, 255, 255, .74);
    font-size: 10px;
}

.vehicle-change {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: var(--app-button-radius);
    padding: 0 3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ffffff;
    background: rgba(255, 255, 255, .10);
    font-size: 9px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    top: -12px;
    position: absolute;
    left: -12px;
}

    .vehicle-change svg {
        width: 32px;
        height: 32px;
        fill: currentColor;
    }

.vehicle-car-art {
    position: absolute;
    top: 16px;
    left: -8px;
    width: 245px;
    opacity: .96;
}

    .vehicle-car-art svg {
        width: 100%;
        height: auto;
        fill: none;
        stroke: rgba(255, 255, 255, .88);
        stroke-width: 1.2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.vehicle-details {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.vehicle-detail {
    min-width: 0;
    border: 1px solid rgb(0 0 0 / 16%);
    padding: 8px;
    background: rgba(0, 0, 0, .10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 0px;
}

    .vehicle-detail:first-child {
        border-right: 0px;
    }

    .vehicle-detail span {
        display: block;
        color: rgba(255, 255, 255, 1);
        font-size: 10px;
        line-height: 11px;
        text-align: center;
    }

    .vehicle-detail strong {
        display: block;
        margin-top: 2px;
        font-size: 10px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 16px;
        text-align: center;
    }

/* =====================================================
           Quick actions
           ===================================================== */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.quick-action {
    min-width: 0;
    border: 0;
    padding: 0;
    color: var(--app-text);
    background: transparent;
    text-align: center;
    cursor: pointer;
}

.quick-action-icon {
    position: relative;
    width: 56px;
    height: 56px;
    margin: 0 auto 6px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-button-radius);
    display: grid !important;
    place-items: center;
    color: var(--app-primary-dark);
    background: linear-gradient( 145deg, var(--app-surface), var(--app-surface-2) );
    box-shadow: var(--app-shadow-sm);
    transition: transform var(--app-transition), border-color var(--app-transition);
}

.quick-action:active .quick-action-icon {
    transform: scale(.94);
}

.quick-action-icon svg {
    width: 38px;
    height: 38px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-action span {
    display: block;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================
           Service reminder
           ===================================================== */

.service-reminder {
    position: relative;
    overflow: hidden;
    display: block;
}

    .service-reminder::before {
        content: "";
        position: absolute;
        top: -40px;
        left: -40px;
        width: 110px;
        height: 110px;
        border-radius: 50%;
        background: var(--app-primary-soft);
    }

.service-reminder-content {
    position: relative;
    z-index: 2;
}

.service-progress-top {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.service-progress-title strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
}

.service-progress-title span {
    display: block;
    color: var(--app-muted);
    font-size: 9px;
}

.service-progress-value {
    color: var(--app-primary-dark);
    font-size: 13px;
    font-weight: 600;
}

.service-progress-info {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    color: var(--app-muted);
    font-size: 9px;
}

/* =====================================================
           Promotional banner
           ===================================================== */

.promo-card {
    position: relative;
    min-width: 310px;
    height: 154px;
    border-radius: var(--app-card-radius);
    padding: 17px;
    color: #ffffff;
    background: linear-gradient( 135deg, #172a32, #284652 );
    overflow: hidden;
    scroll-snap-align: start;
}

    .promo-card.orange {
        background: linear-gradient( 135deg, #d97706, #f59e0b );
    }

    .promo-card.blue {
        background: linear-gradient( 135deg, #075985, #0284c7 );
    }

.promo-content {
    position: relative;
    z-index: 2;
    width: 62%;
}

.promo-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 8px;
    color: rgba(255, 255, 255, .84);
    background: rgba(255, 255, 255, .13);
    font-size: 8px;
}

.promo-card h3 {
    margin: 9px 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.promo-card p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, .68);
    font-size: 9px;
}

.promo-button {
    min-height: 31px;
    border: 0;
    border-radius: var(--app-card-radius);
    padding: 0 11px;
    color: #172126;
    background: #ffffff;
    font-size: 9px;
    cursor: pointer;
}

.promo-art {
    position: absolute;
    top: -10px;
    left: -35px;
    width: 200px;
    height: 100px;
    color: rgba(255, 255, 255, .74);
    text-align: left;
}

    .promo-art svg {
        width: 100px;
        max-height: 100px;
        stroke: currentColor;
        fill: currentColor;
        stroke-width: 1.25;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* =====================================================
           Partner and product
           ===================================================== */
.partner-card {
    width: 138px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-card-radius);
    padding: 11px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.partner-image {
    width: 100%;
    height: 82px;
    border-radius: var(--app-card-radius);
    object-fit: cover;
    background: var(--app-surface-2);
}

.partner-card strong {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.partner-card span {
    display: block;
    color: var(--app-muted);
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.partner-rating {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--app-warning);
    font-size: 8px;
}

/* =====================================================
           Search overlay content
           ===================================================== */

.search-page {
    min-height: 55vh;
}

.search-suggestions {
    margin-top: 16px;
}

.search-suggestion {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--app-text);
    background: transparent;
    text-align: right;
    cursor: pointer;
}

    .search-suggestion svg {
        width: 19px;
        height: 19px;
        color: var(--app-muted);
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
    }

/* =====================================================
           Floating SOS
           ===================================================== */

.sos-button {
    position: fixed;
    right: max( 18px, calc( 50% - var(--app-max-width) / 2 + 18px ) );
    bottom: calc( var(--app-bottom-height) + var(--app-safe-bottom) + 18px );
    z-index: 72;
    width: 62px;
    height: 62px;
    border: 4px solid var(--app-bg);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient( 145deg, #ef4444, #b91c1c );
    box-shadow: 0 14px 34px rgba(220, 38, 38, .32);
    cursor: pointer;
}

    .sos-button svg {
        width: 42px;
        height: 42px;
        fill: currentColor;
        stroke: currentColor;
        stroke-width: 1.8;
    }

/* =====================================================
           General page container
           ===================================================== */

.dynamic-page {
    display: none;
}

    .dynamic-page.active {
        display: block;
    }

.page-placeholder {
    min-height: 60vh;
    display: grid;
    place-items: center;
}

/* =====================================================
           Animations
           ===================================================== */

@keyframes splash-pulse {
    0%, 100% {
        opacity: .25;
        transform: scale(.92);
    }

    50% {
        opacity: .75;
        transform: scale(1);
    }
}

@keyframes splash-loading {
    0% {
        transform: translateX(130%);
    }

    100% {
        transform: translateX(-330%);
    }
}

@media (max-width: 370px) {
    .vehicle-car-art {
        width: 220px;
    }

    .promo-card {
        min-width: 285px;
    }

    .quick-action-icon {
        width: 52px;
        height: 52px;
    }
}

/* Business Directory */
.business-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px
}

    .business-toolbar .app-input {
        flex: 1
    }

.business-types {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 12px;
    flex-direction: column;
}

    .business-types::-webkit-scrollbar {
        display: none
    }

.business-type-chip {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text-soft);
    border-radius: var(--app-button-radius);
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
    cursor: pointer
}

    .business-type-chip.active {
        color: var(--app-primary-dark);
        border-color: var(--app-primary);
        background: var(--app-primary-soft)
    }

.business-list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.business-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0,1fr);
    gap: 11px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-card-radius);
    padding: 9px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
    cursor: pointer
}

.business-cover {
    width: 96px;
    height: 94px;
    object-fit: cover;
    border-radius: var(--app-card-radius);
    background: var(--app-surface-2)
}

.business-card-content {
    min-width: 0
}

.business-card-title {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 30px
}

    .business-card-title strong {
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

.business-verified {
    color: var(--app-info);
    font-size: 13px
}

.business-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    color: var(--app-muted);
    font-size: 9px
}

.business-status.open {
    color: var(--app-success)
}

.business-status.closed {
    color: var(--app-danger)
}

.business-address {
    margin-top: 6px;
    color: var(--app-text-soft);
    font-size: 9px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.business-tags {
    display: flex;
    gap: 5px;
    margin-top: 7px;
    overflow: hidden
}

    .business-tags span {
        font-size: 8px;
        padding: 2px 6px;
        border-radius: 999px;
        background: var(--app-surface-2);
        white-space: nowrap
    }

.business-favorite {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.92);
    color: var(--app-muted);
    cursor: pointer
}

    .business-favorite.active {
        color: var(--app-danger)
    }

    .business-favorite svg {
        width: 17px;
        height: 17px;
        fill: currentColor;
        stroke: currentColor
    }

.business-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5px 2px 10px;
    color: var(--app-muted);
    font-size: 10px
}

.business-detail-cover {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: var(--app-card-radius);
    background: var(--app-surface-2)
}

.business-detail-header {
    margin-top: 12px
}

    .business-detail-header h2 {
        margin: 0;
        font-size: 18px;
        font-weight: 600
    }

.business-detail-actions {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
    margin-top: 12px
}

.business-hours-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--app-border);
    padding: 8px 0;
    font-size: 10px
}

.business-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}
