@keyframes shimmer {
    0% {
        transform: translateX(-100%)
    }

    to {
        transform: translateX(100%)
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

@keyframes highlightPulse {
    0%,to {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(34,197,94,.3)
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(34,197,94,.5)
    }
}

:root {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #1a1a1a;
    --tg-theme-hint-color: #6c757d;
    --tg-theme-link-color: #0d6efd;
    --tg-theme-button-color: #0d6efd;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f8f9fa;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1)
}

* {
    box-sizing: border-box
}

body {
    background: linear-gradient(135deg,#667eea 0,#764ba2 100%);
    background-attachment: fixed;
    color: var(--tg-theme-text-color, #1a1a1a);
    font-family: "Vazirmatn","Tahoma","Arial","Helvetica",sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    scroll-padding: 10px
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem
}
.newly-updated {
    animation: bgFlash 1.2s cubic-bezier(.4,0,.2,1);
    background-color: #e0f7fa !important;
    transition: background-color 0.6s;
}
@keyframes bgFlash {
    0%   { background-color: #38bdf8aa; }
    60%  { background-color: #e0f7fa; }
    100% { background-color: transparent; }
}
.card {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    overflow: hidden
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0/.1),0 8px 10px -6px rgb(0 0 0/.1)
}

.card-header {
    background: linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color: #fff;
    border: 0;
    padding: 1.5rem;
    position: relative;
    overflow: hidden
}

.card-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,transparent 30%,rgba(255,255,255,.1) 50%,transparent 70%);
    animation: shimmer 3s infinite
}

.form-control,.form-label,.form-select {
    color: var(--tg-theme-text-color, #1a1a1a)
}

.form-label {
    font-weight: 600;
    margin-bottom: .5rem;
    font-size: .95rem;
    display: block
}

.form-control,.form-select {
    background: rgba(255,255,255,.8);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    text-align: right;
    direction: rtl;
    padding: .75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(5px)
}

.form-control:focus,.form-select:focus {
    background: rgba(255,255,255,.95);
    border-color: var(--primary-color);
    color: var(--tg-theme-text-color, #1a1a1a);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
    outline: 0;
    transform: translateY(-1px)
}

.file-upload-label:hover {
    border-color: var(--primary-color)
}

.form-control:hover,.form-select:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px)
}

.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 120px
}

.file-upload-label:hover {
    background: rgba(99,102,241,.05);
    transform: translateY(-2px)
}

.file-upload-label.dragover {
    border-color: var(--primary-color);
    background: rgba(99,102,241,.1);
    transform: scale(1.02)
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: .5rem
}

.step-progress {
    margin-bottom: 2rem;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .5rem
}

.step-indicator,.step-indicators {
    display: flex;
    align-items: center;
    position: relative
}

.step-indicators {
    justify-content: space-between;
    min-height: fit-content;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .5rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none
}

@media (min-width:769px) {
    .step-indicators {
        overflow-x: visible;
        scroll-behavior: auto;
        justify-content: space-between;
        position: relative;
        transform: none
    }
}

.step-indicators::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1
}

.step-indicator {
    flex-direction: column;
    z-index: 2;
    transition: var(--transition);
    pointer-events: auto;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 70px;
    margin: 0 5px
}

.step-indicator:hover {
    transform: translateY(-2px)
}

.step-label,.step-number {
    color: var(--secondary-color)
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: .5rem;
    transition: var(--transition);
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.1)
}

.step-indicator.active .step-number {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1)
}

.step-indicator.completed .step-number {
    background: var(--success-color);
    color: #fff
}

.step-label {
    font-size: .85rem;
    font-weight: 500;
    text-align: center;
    max-width: 55px;
    line-height: 1.2
}

.step-indicator.active .step-label {
    color: var(--primary-color);
    font-weight: 600
}

.step-indicator.completed .step-label {
    color: var(--success-color)
}

.form-step {
    display: none!important;
    animation: fadeIn .3s ease-in-out
}

.form-step.active {
    display: block!important
}

.step-title {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: .5rem;
    margin-bottom: 1.5rem
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color)
}

.step-buttons .btn {
    min-width: 120px
}

.review-summary {
    background: rgba(255,255,255,.8);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    border: 1px solid var(--border-color)
}

.review-section,.review-summary {
    margin-bottom: 1.5rem
}

.review-section:last-child {
    margin-bottom: 0
}

.review-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: .75rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid var(--border-color)
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05)
}

.review-item:last-child,.user-info-card p:last-child {
    border-bottom: none;
    margin-bottom: 0
}

.review-label {
    font-weight: 500;
    color: var(--secondary-color);
    min-width: 120px
}

.review-value {
    color: var(--tg-theme-text-color);
    text-align: left;
    flex: 1;
    word-break: break-word
}

.btn {
    border-radius: var(--border-radius-sm)!important;
    font-weight: 600;
    padding: .75rem 1.5rem;
    transition: var(--transition);
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    text-decoration: none;
    font-size: 1rem
}

.btn-primary {
    background: linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color: #fff;
    box-shadow: var(--shadow-md)
}

.btn-primary:hover {
    background: linear-gradient(135deg,var(--primary-hover),var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff
}

.btn-primary:active {
    transform: translateY(0)
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem
}

.btn-secondary {
    background: #6c757d;
    color: #fff
}

.btn-success {
    background: linear-gradient(135deg,var(--success-color),#059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16,185,129,.3)
}

.btn-danger {
    border-radius: var(--border-radius-sm)!important;
    background: linear-gradient(135deg,var(--danger-color),#dc2626);
    color: #fff!important;
    box-shadow: var(--shadow-md);
    border: 0;
    transition: var(--transition)
}

.btn-danger:focus,.btn-danger:hover {
    background: linear-gradient(135deg,#dc2626,var(--danger-color));
    color: #fff!important;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px)
}

.btn-danger:active {
    transform: translateY(0)
}

.alert {
    border-radius: var(--border-radius-sm);
    border: 0;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden
}

.alert-danger,.alert-success {
    color: #fff;
    box-shadow: var(--shadow-md)
}

.alert-success {
    background: linear-gradient(135deg,#10b981,#059669)
}

.alert-danger {
    background: linear-gradient(135deg,#ef4444,#dc2626)
}

.alert::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgba(255,255,255,.3)
}

.form-check {
    text-align: right;
    margin-bottom: 1rem
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-left: .75rem;
    margin-right: 0;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1)
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(99,102,241,.1)
}

.form-check-label {
    margin-right: .75rem;
    cursor: pointer;
    font-weight: 500;
    user-select: none
}

.advanced-fields {
    display: block!important;
    background: rgba(248,250,252,.8);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px)
}

.user-info-card {
    background: linear-gradient(135deg,rgba(99,102,241,.1),rgba(147,51,234,.1));
    border: 1px solid rgba(99,102,241,.2);
    backdrop-filter: blur(10px)
}

.user-info-card h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem
}

.user-info-card h6::before {
    content: "👤";
    font-size: 1.2rem
}

.user-info-card p {
    margin-bottom: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(99,102,241,.1)
}

.form-text,.invalid-feedback {
    text-align: right;
    font-size: .875rem;
    margin-top: .25rem
}

.form-text {
    color: var(--tg-theme-hint-color, #6c757d)
}

.invalid-feedback {
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: .25rem
}

.invalid-feedback::before {
    content: "⚠️";
    font-size: .75rem
}

.main-container {
    max-width: 600px;
    width: 100%;
    margin: 2rem auto;
    position: relative
}

.tab-item,.tab-selector {
    overflow: hidden;
    display: flex
}

.tab-selector {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: .5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,.2);
    position: relative
}

.tab-selector::before {
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,transparent,rgba(255,255,255,.1),transparent);
    animation: shimmer 3s infinite;
    pointer-events: none
}

.tab-selector::after {
    content: "";
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: calc(50% - .5rem);
    height: calc(100% - 1rem);
    background: linear-gradient(135deg,#fff 0,#f8fafc 100%);
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,.15),0 4px 16px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.8);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    z-index: 0;
    pointer-events: none
}

.tab-selector.list-active::after {
    transform: translateX(-100%)
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 1rem 1.5rem;
    border-radius: 1.5rem;
    color: rgba(255,255,255,.7);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all .4s cubic-bezier(.4,0,.2,1);
    align-items: center;
    justify-content: center;
    gap: .75rem;
    z-index: 1;
    position: relative;
    background: 0 0
}

.session-card::before,.tab-item::before,.tab-selector::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0
}

.tab-item::before {
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,.1);
    border-radius: 1.5rem;
    opacity: 0;
    transition: opacity .3s ease
}

.tab-item:hover::before {
    opacity: 1
}

.tab-item.active {
    color: #1e293b;
    font-weight: 600;
    transform: translateY(-2px);
    background: 0 0;
    box-shadow: none
}

.tab-item.active::before {
    opacity: 0
}

.tab-item i {
    font-size: 1.2rem
}

.content-card,.tab-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
    direction: rtl
}

.content-card {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,.3);
    box-shadow: 0 20px 60px rgba(0,0,0,.1),0 8px 24px rgba(0,0,0,.08);
    overflow: hidden;
    position: relative;
    min-height: 500px
}

.tab-content {
    padding: 2.5rem;
    opacity: 0;
    transform: translateX(30px);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all .4s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    flex: 1 1 auto;
    visibility: hidden
}

.tab-content.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
    visibility: visible
}

.tab-content.sliding-out-left,.tab-content.sliding-out-right {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
    visibility: hidden
}

.tab-content.sliding-out-right {
    transform: translateX(30px)
}

.tab-content.sliding-in-left,.tab-content.sliding-in-right {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
    visibility: visible
}

.tab-content.sliding-in-right {
    transform: translateX(30px)
}

.sessions-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem
}

.approved-session,.session-card {
    position: relative;
    overflow: hidden
}

.session-card {
    background: linear-gradient(135deg,#f8fafc 0,#e2e8f0 100%);
    border: 1px solid rgba(99,102,241,.1);
    border-radius: 1.25rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all .3s ease
}

.session-card::before {
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg,#6366f1,#8b5cf6)
}

.session-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.1)
}

.session-card.newly-updated {
    animation: highlightPulse 2s ease-in-out
}

.approved-session {
    background: linear-gradient(135deg,#ecfdf5 0,#d1fae5 100%)!important;
    box-shadow: 0 4px 12px rgba(16,185,129,.15),0 0 0 1px rgba(16,185,129,.1)!important
}

.approved-session::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg,#10b981 0,#059669 100%);
    z-index: 2
}

.approved-session::after {
    content: "تایید شده";
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg,#10b981 0,#059669 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(16,185,129,.3);
    letter-spacing: .5px
}

.approved-session:hover {
    transform: translateY(-2px)!important;
    box-shadow: 0 8px 20px rgba(16,185,129,.2),0 0 0 1px rgba(16,185,129,.15)!important
}

@media (hover:none) and (pointer:coarse) {
    .btn:active {
        transform: scale(.98)
    }

    .file-upload-label:active {
        transform: scale(.99)
    }

    .tab-item:active {
        transform: scale(.95)
    }
}

[dir=rtl] .bi {
    margin-left: .5rem;
    margin-right: 0
}

@media (max-width:768px) {
    .gender_both{width: 100%!important;
    }
    body {
        min-height: 100dvh
    }

    .main-container {
        min-height: auto;
        margin: .5rem;
        padding: 0
    }

    .tab-selector {
        margin: 15px 5px 1rem;
        border-radius: 1rem;
        padding: .3rem;
        position: relative
    }

    .tab-selector::after {
        content: "";
        position: absolute;
        top: .3rem;
        right: .3rem;
        width: calc(50% - .3rem);
        height: calc(100% - .6rem);
        background: linear-gradient(135deg,#fff 0,#f8fafc 100%);
        border-radius: 1rem;
        box-shadow: 0 6px 20px rgba(0,0,0,.1),0 2px 8px rgba(0,0,0,.05),inset 0 1px 0 rgba(255,255,255,.8);
        transition: transform .4s cubic-bezier(.4,0,.2,1);
        z-index: 0;
        pointer-events: none
    }

    .tab-selector.list-active::after {
        transform: translateX(-100%)
    }

    .tab-item {
        font-size: .95rem;
        padding: .6rem .8rem;
        min-height: 44px
    }

    .content-card {
        border-radius: 1.5rem;
        margin: 0;
        min-height: auto;
        height: auto
    }

    .tab-content {
        position: relative!important;
        min-height: auto!important;
        height: auto!important;
        padding: 1.25rem;
        opacity: 0!important;
        transform: translateX(20px)!important;
        display: none;
        justify-content: flex-start!important;
        transition: all .3s ease!important;
        visibility: hidden!important
    }

    .tab-content.active {
        display: flex!important;
        position: relative!important;
        opacity: 1!important;
        transform: translateX(0)!important;
        visibility: visible!important;
        animation: slideInMobile .3s ease-out
    }}
@keyframes slideInMobile {
        0%{opacity: 0;
        transform: translateX(20px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}
.form-step {
    padding: 0
}

.step-title {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    text-align: center
}

.form-control,.form-select {
    font-size: 16px!important;
    min-height: 48px;
    padding: .75rem 1rem;
    border-radius: .5rem;
    border: 2px solid #e2e8f0;
    transition: border-color .2s ease
}

.form-control:focus,.form-select:focus {
    border-color: var(--primary-color)!important;
    box-shadow: 0 0 0 3px rgba(99,102,241,.1)!important;
    outline: 0!important
}

.form-label {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .5rem;
    color: var(--tg-theme-text-color)
}

.form-text {
    font-size: .85rem;
    margin-top: .25rem;
    color: #6c757d
}

.row {
    margin: 0-.5rem
}

.row>* {
    padding: 0 .5rem
}

.step-indicators {
    padding: .75rem .5rem;
    scroll-padding: 0 20px
}

.step-indicator {
    padding: 5px
}

.step-label {
    word-wrap: break-word;
    overflow-wrap: break-word
}

.step-indicators {
    margin: 0-1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    justify-content: flex-start;
    gap: 1rem;
    min-height: fit-content;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    scroll-snap-type: x mandatory;
    background: linear-gradient(90deg,rgba(255,255,255,.8)0,transparent 10%,transparent 90%,rgba(255,255,255,.8) 100%)
}

.step-indicators::-webkit-scrollbar {
    height: 3px
}

.step-indicators::-webkit-scrollbar-track {
    background: 0 0
}

.step-indicators::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px
}

.step-progress {
    margin-bottom: 1.5rem;
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .25rem
}

.step-indicators::before {
    top: 35px
}

.step-indicator {
    flex-shrink: 0;
    min-width: 85px;
    margin: 0 2px;
    scroll-snap-align: center;
    -webkit-tap-highlight-color: rgba(99,102,241,.1)
}

.step-number {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
    margin-bottom: .5rem
}

.step-label {
    font-size: .75rem;
    line-height: 1.1;
    text-align: center;
    max-width: 80px;
    word-break: break-word;
    hyphens: auto
}

.btn {
    min-height: 48px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: .75rem;
    padding: .75rem 1.5rem;
    border: 0;
    cursor: pointer;
    transition: all .2s ease
}

.btn-primary {
    background: linear-gradient(135deg,var(--primary-color),var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,.3)
}

.btn-primary:focus,.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99,102,241,.4);
    color: #fff
}

.step-buttons {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color)
}

.step-buttons .d-flex {
    flex-direction: column-reverse;
    gap: .75rem
}

.step-buttons .btn {
    width: 100%;
    justify-content: center
}

.file-upload-wrapper {
    margin-bottom: 1rem
}

.file-upload-label {
    padding: 1.5rem 1rem;
    min-height: 100px;
    border: 2px dashed #cbd5e0;
    border-radius: .75rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(99,102,241,.05)
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: .5rem
}

.review-summary {
    padding: 1.25rem;
    border-radius: .75rem;
    background: rgba(248,250,252,.8);
    border: 1px solid #e2e8f0
}

.review-section h6 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color)
}

.review-item {
    flex-direction: column;
    gap: .25rem;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05)
}

.review-label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--secondary-color)
}

.review-value {
    font-size: .95rem;
    color: var(--tg-theme-text-color);
    word-break: break-word
}

.invalid-feedback {
    display: block;
    font-size: .875rem;
    margin-top: .25rem;
    color: var(--danger-color)
}

.form-control.is-valid,.form-select.is-valid {
    border-color: var(--success-color);
    background-image: none
}

.form-control.is-valid:focus,.form-select.is-valid:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16,185,129,.1)
}

.form-control.is-invalid,.form-select.is-invalid {
    border-color: var(--danger-color);
    background-image: none
}

.form-control.is-invalid:focus,.form-select.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239,68,68,.1)
}

.rejected-session {
    border: 2px solid #ef4444!important;
    background: linear-gradient(135deg,#fef2f2 0,#fee2e2 100%)!important;
    box-shadow: 0 3px 8px rgba(239,68,68,.12),0 0 0 1px rgba(239,68,68,.08)!important;
    position: relative;
    overflow: hidden
}

.rejected-session::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg,#ef4444 0,#dc2626 100%);
    z-index: 2
}

.rejected-session::after {
    content: "رد شده";
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg,#ef4444 0,#dc2626 100%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(239,68,68,.25);
    letter-spacing: .3px
}

.rejected-session:hover {
    transform: translateY(-1px)!important;
    box-shadow: 0 6px 16px rgba(239,68,68,.15),0 0 0 1px rgba(239,68,68,.12)!important
}

@media (max-width:480px) {
    .main-container {
        margin: .25rem
    }

    .tab-content {
        padding: 1rem!important
    }

    .tab-selector::after {
        top: .3rem;
        right: .3rem;
        width: calc(50% - .3rem);
        height: calc(100% - .6rem);
        border-radius: 1rem
    }

    .step-title {
        font-size: 1.1rem
    }

    .tab-item {
        padding: .6rem .4rem!important;
        flex-direction: row;
        gap: .3rem;
        min-height: 56px;
        border-radius: 1rem
    }

    .tab-item i {
        font-size: 1rem;
        margin: 0
    }

    .tab-item span {
        display: block!important;
        line-height: 1;
        text-align: center;
        max-width: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .step-number {
        width: 38px;
        height: 38px;
        font-size: .9rem
    }

    .step-label {
        font-size: .75rem;
        max-width: 50px
    }

    .form-control,.form-select {
        font-size: 16px;
        padding: .65rem .85rem
    }

    .btn {
        font-size: .9rem;
        padding: .65rem 1.25rem;
        min-height: 44px
    }

    .file-upload-label {
        padding: 1.25rem .75rem;
        min-height: 90px
    }

    .file-upload-icon {
        font-size: 1.5rem
    }

    .tab-content {
        position: relative!important;
        min-height: auto!important;
        height: auto!important;
        opacity: 0!important;
        transform: translateX(15px)!important;
        display: none;
        justify-content: flex-start!important;
        transition: all .25s ease!important;
        visibility: hidden!important
    }

    .tab-content.active {
        display: flex!important;
        position: relative!important;
        opacity: 1!important;
        transform: translateX(0)!important;
        visibility: visible!important
    }

    .rejected-session {
        border: 2px solid #ef4444!important;
        background: linear-gradient(135deg,#fef2f2 0,#fee2e2 100%)!important;
        box-shadow: 0 2px 6px rgba(239,68,68,.1),0 0 0 1px rgba(239,68,68,.05)!important;
        position: relative;
        overflow: hidden
    }

    .rejected-session::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg,#ef4444 0,#dc2626 100%);
        z-index: 2
    }

    .rejected-session::after {
        content: "رد شده";
        position: absolute;
        top: 8px;
        right: 8px;
        background: linear-gradient(135deg,#ef4444 0,#dc2626 100%);
        color: #fff;
        padding: 2px 8px;
        border-radius: 8px;
        font-size: .65rem;
        font-weight: 600;
        z-index: 3;
        box-shadow: 0 1px 3px rgba(239,68,68,.2);
        letter-spacing: .2px
    }

    .rejected-session:hover {
        transform: translateY(-1px)!important;
        box-shadow: 0 4px 12px rgba(239,68,68,.12),0 0 0 1px rgba(239,68,68,.08)!important
    }
}

@media screen and (max-height:600px) and (orientation:landscape) {
    .tab-selector::after {
        top: .25rem;
        right: .25rem;
        width: calc(50% - .25rem);
        height: calc(100% - .5rem);
        border-radius: .8rem;
        transition: transform .3s cubic-bezier(.4,0,.2,1)
    }

    .tab-selector.list-active::after {
        transform: translateX(-100%)
    }

    .rejected-session::after {
        top: 12px;
        right: 12px;
        padding: 4px 12px;
        font-size: .75rem;
        border-radius: 12px
    }

    .rejected-session::before {
        width: 6px
    }
}

.telegram-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(23,33,43,.97);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    backdrop-filter: blur(8px)
}

.telegram-container {
    background: #17212b;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column
}

.chat-messages {
    background: #0e1621;
    padding: 20px;
    min-height: 400px;
    background-image: radial-gradient(circle at 20% 30%,rgba(102,126,234,.05)0,transparent 50%),radial-gradient(circle at 80% 70%,rgba(118,75,162,.05)0,transparent 50%);
    overflow-y: auto;
    flex: 1
}

.message-group {
    margin-bottom: 20px
}

.message {
    background: #182533;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    overflow: hidden;
    position: relative;
    border: 1px solid #1e2a38
}

.message-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    cursor: pointer;
    transition: transform .3s ease;
    background: #0e1621;
    border-radius: 8px 8px 0 0
}

.message-image:hover {
    transform: scale(1.02)
}

.message-content {
    padding: 16px
}

.sender-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap
}

.sender-name {
    font-weight: 600;
    color: #50a2e9;
    font-size: 14px
}

.message-date {
    font-size: 12px;
    color: #8a96a3
}

.message-text {
    font-size: 15px;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word
}

.message-meta {
    justify-content: flex-end;
    font-size: 12px;
    color: #8a96a3;
    gap: 4px;
    margin-top: 8px
}

.close-overlay,.message-meta,.message-time {
    display: flex;
    align-items: center
}

.message-time {
    gap: 4px
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    background: rgba(0,0,0,.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    justify-content: center;
    transition: background .3s ease;
    z-index: 10
}

.close-overlay:hover {
    background: rgba(0,0,0,.7)
}

.rejected-session {
    border: 2px solid #ef4444!important;
    background: linear-gradient(135deg,#fef2f2 0,#fee2e2 100%)!important;
    box-shadow: 0 4px 12px rgba(239,68,68,.15),0 0 0 1px rgba(239,68,68,.1)!important;
    position: relative;
    overflow: hidden
}

.rejected-session::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg,#ef4444 0,#dc2626 100%);
    z-index: 2
}

.rejected-session::after {
    content: "رد شده";
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg,#ef4444 0,#dc2626 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(239,68,68,.3);
    letter-spacing: .5px
}

.rejected-session:hover {
    transform: translateY(-2px)!important;
    box-shadow: 0 8px 20px rgba(239,68,68,.2),0 0 0 1px rgba(239,68,68,.15)!important
}

@media (max-width:768px) {
    .rejected-session {
        border: 2px solid #ef4444!important;
        background: linear-gradient(135deg,#fef2f2 0,#fee2e2 100%)!important;
        box-shadow: 0 3px 8px rgba(239,68,68,.12),0 0 0 1px rgba(239,68,68,.08)!important;
        position: relative;
        overflow: hidden
    }

    .rejected-session::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(180deg,#ef4444 0,#dc2626 100%);
        z-index: 2
    }

    .rejected-session::after {
        content: "رد شده";
        position: absolute;
        top: 10px;
        right: 10px;
        background: linear-gradient(135deg,#ef4444 0,#dc2626 100%);
        color: #fff;
        padding: 3px 10px;
        border-radius: 10px;
        font-size: .7rem;
        font-weight: 600;
        z-index: 3;
        box-shadow: 0 2px 4px rgba(239,68,68,.25);
        letter-spacing: .3px
    }

    .rejected-session:hover {
        transform: translateY(-1px)!important;
        box-shadow: 0 6px 16px rgba(239,68,68,.15),0 0 0 1px rgba(239,68,68,.12)!important
    }

    .step-indicators::before {
        top: 35px;
        left: 0;
        right: 0;
        width: 120%
    }
    .step-indicators {
        gap: 0;
    }
}

@media (max-width:480px) {
    .main-container {
        margin: .25rem
    }

    .tab-content {
        padding: 1rem!important
    }

    .tab-selector::after {
        top: .3rem;
        right: .3rem;
        width: calc(50% - .3rem);
        height: calc(100% - .6rem);
        border-radius: 1rem
    }

    .step-title {
        font-size: 1.1rem
    }

    .tab-item {
        padding: .6rem .4rem!important;
        flex-direction: row;
        gap: .3rem;
        min-height: 56px;
        border-radius: 1rem
    }

    .tab-item i {
        font-size: 1rem;
        margin: 0
    }

    .tab-item span {
        display: block!important;
        line-height: 1;
        text-align: center;
        max-width: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .step-number {
        width: 38px;
        height: 38px;
        font-size: .9rem
    }

    .step-label {
        font-size: .75rem;
        max-width: 50px
    }

    .form-control,.form-select {
        font-size: 16px;
        padding: .65rem .85rem
    }

    .btn {
        font-size: .9rem;
        padding: .65rem 1.25rem;
        min-height: 44px
    }

    .file-upload-label {
        padding: 1.25rem .75rem;
        min-height: 90px
    }

    .file-upload-icon {
        font-size: 1.5rem
    }

    .tab-content {
        position: relative!important;
        min-height: auto!important;
        height: auto!important;
        opacity: 0!important;
        transform: translateX(15px)!important;
        display: none;
        justify-content: flex-start!important;
        transition: all .25s ease!important;
        visibility: hidden!important
    }

    .tab-content.active {
        display: flex!important;
        position: relative!important;
        opacity: 1!important;
        transform: translateX(0)!important;
        visibility: visible!important
    }

    .rejected-session {
        border: 2px solid #ef4444!important;
        background: linear-gradient(135deg,#fef2f2 0,#fee2e2 100%)!important;
        box-shadow: 0 2px 6px rgba(239,68,68,.1),0 0 0 1px rgba(239,68,68,.05)!important;
        position: relative;
        overflow: hidden
    }

    .rejected-session::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg,#ef4444 0,#dc2626 100%);
        z-index: 2
    }

    .rejected-session::after {
        content: "رد شده";
        position: absolute;
        top: 8px;
        right: 8px;
        background: linear-gradient(135deg,#ef4444 0,#dc2626 100%);
        color: #fff;
        padding: 2px 8px;
        border-radius: 8px;
        font-size: .65rem;
        font-weight: 600;
        z-index: 3;
        box-shadow: 0 1px 3px rgba(239,68,68,.2);
        letter-spacing: .2px
    }

    .rejected-session:hover {
        transform: translateY(-1px)!important;
        box-shadow: 0 4px 12px rgba(239,68,68,.12),0 0 0 1px rgba(239,68,68,.08)!important
    }
}

.time-picker-btn {
    border-left: 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.time-picker-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-picker-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* RTL adjustments for input group */
.input-group .time-picker-btn {
    order: 2;
    border-left: 1px solid #ced4da !important;
    border-right: 0 !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group .form-control {
    order: 1;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}