﻿/* ریست استایل‌ها */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    font-family: Vazir, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #f72585;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-light: #e9ecef;
    --gray: #adb5bd;
    --sidebar-width: 280px;
    --header-height: 60px;
    --bottom-nav-height: 65px;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --box-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: Vazir, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #333;
    overflow-x: hidden;
    touch-action: manipulation;
    line-height: 1.6;
    -webkit-user-select: none;
    user-select: none;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* صفحه ورود */
.login-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    animation: fadeIn 0.5s ease;
    width: 100%;
    height: 100%;
}

.login-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 30px 25px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    animation: slideUp 0.5s ease;
}

.app-icon {
    width: 80px;
    height: 80px;
    /*! background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); */
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
    animation: bounce 2s infinite;
}

.login-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-subtitle {
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

/* دکمه‌ها */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    gap: 10px;
    /*! width: 100%; */
    position: relative;
    overflow: hidden;
}

    .btn:active {
        transform: scale(0.98);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

    .btn-primary:hover {
        box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
    }

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
}

    .btn-success:hover {
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    }

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b5179e);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0dcaf0);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

    .btn-outline:hover {
        background-color: rgba(67, 97, 238, 0.1);
    }

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 30px;
}

/* هدر اپلیکیشن */
.app-header {
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: var(--box-shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
}

.header-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}

.header-icon {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

    .header-icon:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

.header-badge {
    background-color: var(--danger-color);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    position: absolute;
    top: -3px;
    left: -3px;
    border: 2px solid var(--primary-dark);
    font-weight: 700;
}

/* نوار پایینی */
.bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    height: var(--bottom-nav-height);
    background-color: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #8a8a8e;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.75rem;
    padding: 8px 0;
    cursor: pointer;
}

    .nav-item i {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .nav-item.active {
        color: var(--primary-color);
    }

        .nav-item.active i {
            color: var(--primary-color);
        }

.nav-badge {
    position: absolute;
    top: 8px;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* محتوای اصلی */
.main-content {
    padding: calc(var(--header-height) + 15px) 15px calc(var(--bottom-nav-height) + 15px);
    min-height: 100vh;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
}

/* صفحات */
.page {
    display: none;
    animation: fadeIn 0.3s;
}

    .page.active {
        display: block;
    }

.page-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* کارت‌های اپلیکیشنی */
.app-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    margin-bottom: 15px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

    .app-card:active {
        transform: scale(0.98);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--gray-light);
    padding: 15px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 15px;
}

/* لیست‌های لمسی */
.list-item {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    cursor: pointer;
}

    .list-item:active {
        background-color: var(--light-color);
    }

    .list-item:last-child {
        border-bottom: none;
    }

.list-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.list-content {
    flex: 1;
}

.list-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.list-subtitle {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* فرم‌ها */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 14px 15px;
    border-radius: var(--border-radius);
    border: 1.5px solid var(--gray-light);
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
    font-family: Vazir, sans-serif;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.15);
        outline: none;
    }

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* مودال‌ها */
.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    /*! padding: 20px; */
}

    .modal.active {
        display: flex;
        animation: fadeIn 0.3s;
    }

.modal-content {
    background-color: white;
    /*! border-radius: var(--border-radius); */
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

    .modal-close:hover {
        background-color: var(--gray-light);
    }

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* وضعیت‌ها */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.status-active {
    background-color: rgba(76, 201, 240, 0.15);
    color: #4cc9f0;
}

.status-paid {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
}

.status-unpaid {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.status-retired {
    background-color: rgba(248, 150, 30, 0.15);
    color: #f8961e;
}

.status-locked {
    background-color: rgba(108, 117, 125, 0.15);
    color: var(--secondary-color);
}

/* اعلان‌ها */
.app-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    z-index: 2000;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.3s;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-right: 4px solid var(--success-color);
    color: #155724;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-right: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: rgba(248, 150, 30, 0.1);
    border-right: 4px solid #f8961e;
    color: #856404;
}

.alert-info {
    background-color: rgba(76, 201, 240, 0.1);
    border-right: 4px solid #4cc9f0;
    color: #0c5460;
}

/* نمایش قدرت خرید */
.power-display {
    background: linear-gradient(135deg, #4cc9f0, #4895ef);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 6px 15px rgba(76, 201, 240, 0.3);
}

.power-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* خریدها */
.purchase-item {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    border-right: 4px solid var(--primary-color);
}

.purchase-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* بارگذاری */
.loading-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

    .loading-overlay.active {
        display: flex;
    }

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* سوایپ راهنما */
.swipe-hint {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* اقدامات سریع */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.quick-action {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    text-align: center;
    box-shadow: var(--box-shadow-light);
    transition: var(--transition);
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

    .quick-action:active {
        transform: scale(0.97);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .quick-action i {
        font-size: 1.8rem;
        margin-bottom: 10px;
        color: var(--primary-color);
    }

/* بدج‌ها */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1a1919;
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-success {
    background-color: var(--success-color);
}

.bg-danger {
    background-color: var(--danger-color);
}

.bg-warning {
    background-color: var(--warning-color);
}

.bg-info {
    background-color: var(--info-color);
}

.bg-secondary {
    background-color: var(--secondary-color);
}

/* شبکه‌بندی */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

.col-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 10px;
}

.col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 10px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 10px;
}

/* متن‌ها */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: var(--secondary-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-success {
    color: var(--success-color);
}

.text-primary {
    color: var(--primary-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--info-color);
}

.fw-bold {
    font-weight: 700;
}

.small {
    font-size: 0.85rem;
}

/* فواصل */
.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 5px;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 25px;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 5px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.mt-5 {
    margin-top: 25px;
}

.ms-1 {
    margin-right: 5px;
}

.ms-2 {
    margin-right: 10px;
}

.ms-3 {
    margin-right: 15px;
}

.ms-4 {
    margin-right: 20px;
}

.me-1 {
    margin-left: 5px;
}

.me-2 {
    margin-left: 10px;
}

.me-3 {
    margin-left: 15px;
}

.me-4 {
    margin-left: 20px;
}

.mx-1 {
    margin-right: 5px;
    margin-left: 5px;
}

.mx-2 {
    margin-right: 10px;
    margin-left: 10px;
}

.mx-3 {
    margin-right: 15px;
    margin-left: 15px;
}

.mx-4 {
    margin-right: 20px;
    margin-left: 20px;
}

.my-1 {
    margin-top: 5px;
    margin-bottom: 5px;
}

.my-2 {
    margin-top: 10px;
    margin-bottom: 10px;
}

.my-3 {
    margin-top: 15px;
    margin-bottom: 15px;
}

.my-4 {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* حاشیه‌ها */
.p-0 {
    padding: 0;
}

.p-1 {
    padding: 5px;
}

.p-2 {
    padding: 10px;
}

.p-3 {
    padding: 15px;
}

.p-4 {
    padding: 20px;
}

.p-5 {
    padding: 25px;
}

.pt-1 {
    padding-top: 5px;
}

.pt-2 {
    padding-top: 10px;
}

.pt-3 {
    padding-top: 15px;
}

.pt-4 {
    padding-top: 20px;
}

.pb-1 {
    padding-bottom: 5px;
}

.pb-2 {
    padding-bottom: 10px;
}

.pb-3 {
    padding-bottom: 15px;
}

.pb-4 {
    padding-bottom: 20px;
}

.ps-1 {
    padding-right: 5px;
}

.ps-2 {
    padding-right: 10px;
}

.ps-3 {
    padding-right: 15px;
}

.ps-4 {
    padding-right: 20px;
}

.pe-1 {
    padding-left: 5px;
}

.pe-2 {
    padding-left: 10px;
}

.pe-3 {
    padding-left: 15px;
}

.pe-4 {
    padding-left: 20px;
}

.px-1 {
    padding-right: 5px;
    padding-left: 5px;
}

.px-2 {
    padding-right: 10px;
    padding-left: 10px;
}

.px-3 {
    padding-right: 15px;
    padding-left: 15px;
}

.px-4 {
    padding-right: 20px;
    padding-left: 20px;
}

.py-1 {
    padding-top: 5px;
    padding-bottom: 5px;
}

.py-2 {
    padding-top: 10px;
    padding-bottom: 10px;
}

.py-3 {
    padding-top: 15px;
    padding-bottom: 15px;
}

.py-4 {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* دکمه نصب PWA */
.install-btn {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    box-shadow: var(--box-shadow);
    display: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 1001;
    animation: slideUp 0.3s;
}

    .install-btn.show {
        display: flex;
    }

/* جداساز */
hr {
    border: none;
    border-top: 1px solid var(--gray-light);
    margin: 20px 0;
}

/* لینک‌ها */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: var(--primary-dark);
    }

/* تنظیمات safe-area برای آیفون X و بالاتر */
@supports (padding: max(0px)) {
    .app-header, .main-content, .bottom-nav {
        padding-right: max(15px, env(safe-area-inset-right));
        padding-left: max(15px, env(safe-area-inset-left));
    }

    .bottom-nav {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* نمایش‌های انعطاف‌پذیر */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* کلاس‌های کمکی */
.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.vh-100 {
    height: 100vh;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.border {
    border: 1px solid var(--gray-light);
}

.border-rounded {
    border-radius: var(--border-radius);
}

.shadow-sm {
    box-shadow: var(--box-shadow-light);
}

.shadow {
    box-shadow: var(--box-shadow);
}

.bg-white {
    background-color: white;
}

.bg-light {
    background-color: var(--light-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-success {
    background-color: var(--success-color);
}

.bg-danger {
    background-color: var(--danger-color);
}

.bg-warning {
    background-color: var(--warning-color);
}

.bg-info {
    background-color: var(--info-color);
}
/* منوی سایدبار */
.sidebar-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: none;
}

    .sidebar-overlay.active {
        display: block;
        animation: fadeIn 0.3s;
    }

.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: white;
    z-index: 1200;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: var(--box-shadow);
}

    .sidebar.active {
        right: 0;
    }

.sidebar-header {
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 32px;
}

.sidebar-user-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-user-type {
    font-size: 0.85rem;
    opacity: 0.9;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    color: var(--dark-color);
    text-decoration: none;
    border-right: 4px solid transparent;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

    .sidebar-item:hover {
        background-color: var(--light-color);
    }

    .sidebar-item.active {
        background-color: rgba(67, 97, 238, 0.1);
        color: var(--primary-color);
        border-right-color: var(--primary-color);
    }

    .sidebar-item i {
        margin-left: 15px;
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
    }

.sidebar-badge {
    background-color: var(--danger-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    position: absolute;
    left: 20px;
    font-weight: 700;
}

/* اعلان‌ها */
.notifications-modal {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    background-color: white;
    z-index: 1500;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

    .notifications-modal.active {
        transform: translateY(0);
    }

.notifications-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-body {
    padding: 20px;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

    .notification-item:last-child {
        border-bottom: none;
    }

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .notification-icon.info {
        background-color: rgba(76, 201, 240, 0.15);
        color: #4cc9f0;
    }

    .notification-icon.success {
        background-color: rgba(40, 167, 69, 0.15);
        color: var(--success-color);
    }

    .notification-icon.warning {
        background-color: rgba(248, 150, 30, 0.15);
        color: #f8961e;
    }

    .notification-icon.danger {
        background-color: rgba(220, 53, 69, 0.15);
        color: #dc3545;
    }

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.notification-message {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--gray);
}

.notification-unread {
    background-color: rgba(67, 97, 238, 0.05);
}

/* تیکت‌ها */
.ticket-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 12px;
    border-right: 4px solid var(--primary-color);
    box-shadow: var(--box-shadow-light);
}

.ticket-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ticket-open {
    background-color: #ffebee;
    color: #d32f2f;
}

.ticket-closed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.ticket-replied {
    background-color: #e3f2fd;
    color: #1565c0;
}

.ticket-messages {
    margin-top: 15px;
    border-top: 1px solid var(--gray-light);
    padding-top: 15px;
}

.message {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    max-width: 85%;
}

.message-sender {
    background-color: #e3f2fd;
    margin-right: auto;
    border-top-right-radius: 0;
}

.message-receiver {
    background-color: #f3e5f5;
    margin-left: auto;
    border-top-left-radius: 0;
}

.message-info {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

/* فرم تیکت */
.ticket-form {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.reply-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

/* آپلود فایل */
.upload-area {
    border: 2px dashed var(--gray);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: #fafafa;
    margin-bottom: 20px;
}

    .upload-area:hover {
        border-color: var(--primary-color);
        background-color: rgba(67, 97, 238, 0.05);
    }

    .upload-area i {
        font-size: 3rem;
        color: var(--primary-color);
        margin-bottom: 15px;
    }

/* تب‌های مودال */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 20px;
}

.modal-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: none;
    background: none;
    font-weight: 700;
    color: var(--secondary-color);
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

    .modal-tab.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
    }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* پروفایل فروشگاه */
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 40px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.info-label {
    color: var(--secondary-color);
}

.info-value {
    font-weight: 700;
}

/* دراپ‌داون */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-width: 160px;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

    .dropdown-menu.show {
        display: block;
    }

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
}

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background-color: var(--light-color);
        color: var(--primary-color);
    }

/* انتخاب ماه */
.month-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.month-btn {
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid var(--gray-light);
    background: white;
    white-space: nowrap;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

    .month-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

/* خریدهای قفل شده */
.purchase-locked {
    opacity: 0.7;
    background-color: var(--light-color);
}

    .purchase-locked .btn {
        pointer-events: none;
        opacity: 0.5;
    }

/* مبالغ */
.amount-input {
    text-align: left;
    direction: ltr;
    font-family: 'Courier New', monospace;
}

.amount-display {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
}

/* گروه ورودی */
.input-group {
    display: flex;
    margin-bottom: 15px;
}

.input-group-text {
    padding: 14px 15px;
    background-color: var(--light-color);
    border: 1.5px solid var(--gray-light);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.input-group .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    border-right: none;
}

/* اسکرول */
.scroll-area {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

    .scroll-area::-webkit-scrollbar {
        width: 6px;
    }

    .scroll-area::-webkit-scrollbar-track {
        background: var(--gray-light);
    }

    .scroll-area::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }

.excel-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 15px;
}

    .excel-preview-table th {
        background-color: #2c3e50;
        color: white;
        padding: 8px;
        text-align: center;
        position: sticky;
        top: 0;
        white-space: nowrap;
    }

    .excel-preview-table td {
        padding: 6px;
        border: 1px solid #ddd;
        text-align: center;
        white-space: nowrap;
    }

    .excel-preview-table tr:nth-child(even) {
        background-color: #f8f9fa;
    }

    .excel-preview-table tr:hover {
        background-color: #e8f4fd;
    }
/* استایل برای لیست پرسنل */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* استایل صفحه‌بندی */
.pagination .page-item.active .page-link {
    background-color: #4361ee;
    border-color: #4361ee;
    color: white;
}

.pagination .page-link {
    color: #4361ee;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.25rem;
}

    .pagination .page-link:hover {
        background-color: #e9ecef;
        color: #2c4fe6;
    }

/* استایل برای فروشگاه‌های مسدود شده */
.blocked-shop {
    opacity: 0.8;
    border: 2px solid #dc3545;
}

    .blocked-shop .card-header {
        background-color: #f8d7da;
        border-bottom: 1px solid #f5c6cb;
    }

/* دکمه‌ها */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* استایل بادج‌ها */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* استایل responsive */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group .btn {
        padding: 0.2rem 0.4rem;
    }

    .pagination .page-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl; /* برای راست‌چین کردن به دلیل متن فارسی */
    gap: 8px;
    margin: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    cursor: pointer;
}

    .pagination-btn:hover {
        background-color: #007bff;
        color: white;
        border-color: #007bff;
    }

    .pagination-btn.active {
        background-color: #007bff;
        color: white;
        border-color: #007bff;
        font-weight: bold;
    }

.pagination-info {
    margin: 0 15px;
    color: #555;
    font-size: 14px;
}
/* استایل برای مدال تأیید */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .confirm-modal.show {
        display: flex;
        opacity: 1;
    }

.confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.confirm-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    z-index: 10000;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.confirm-modal.show .confirm-dialog {
    transform: translateY(0);
}

.confirm-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .confirm-header i {
        font-size: 24px;
    }

    .confirm-header h5 {
        margin: 0;
        font-weight: 600;
        color: #343a40;
    }

.confirm-body {
    padding: 24px;
    color: #495057;
    font-size: 15px;
    line-height: 1.6;
}

.confirm-footer {
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

    .confirm-footer .btn {
        min-width: 100px;
        border-radius: 8px;
        font-weight: 500;
        padding: 10px 20px;
    }

/* استایل برای فروشگاه مسدود شده */
.blocked-shop {
    opacity: 0.8;
    border: 1px solid #dc3545;
    position: relative;
}

    .blocked-shop::before {
        content: "مسدود شده";
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        background: #dc3545;
        color: white;
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: bold;
        z-index: 1;
    }
/* استایل مدال قوانین */
.terms-modal-content {
    font-family: 'Vazir', sans-serif;
}

.terms-header {
    border-bottom: 2px solid #4361ee;
    padding-bottom: 15px;
}

.terms-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-right: 4px solid #4361ee;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .terms-section h5 {
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }

    .terms-section ul {
        padding-right: 20px;
        margin-bottom: 0;
    }

    .terms-section li {
        margin-bottom: 8px;
        line-height: 1.6;
    }

.terms-body {
    scrollbar-width: thin;
    scrollbar-color: #4361ee #f1f1f1;
}

    .terms-body::-webkit-scrollbar {
        width: 8px;
    }

    .terms-body::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .terms-body::-webkit-scrollbar-thumb {
        background: #4361ee;
        border-radius: 4px;
    }

        .terms-body::-webkit-scrollbar-thumb:hover {
            background: #3a56d4;
        }

.terms-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

#accept-terms {
    transform: scale(1.2);
    margin-left: 10px;
}

    #accept-terms:checked {
        background-color: #4361ee;
        border-color: #4361ee;
    }
/* استایل آلرت شیشه‌ای با افکت مدرن */
.app-alert {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px) scale(0.9);
    width: 90%;
    max-width: 480px;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Vazir', sans-serif;
    direction: rtl;
}

    .app-alert.show {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
        visibility: visible;
    }

.alert-content {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* جلوه نئومورفیسم */
.alert-success .alert-content {
    background: rgba(46, 204, 113, 0.05);
    border: 1px solid rgba(46, 204, 113, 0.2);
    box-shadow: 0 8px 32px rgba(46, 204, 113, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.alert-error .alert-content {
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    box-shadow: 0 8px 32px rgba(231, 76, 60, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.alert-warning .alert-content {
    background: rgba(241, 196, 15, 0.05);
    border: 1px solid rgba(241, 196, 15, 0.2);
    box-shadow: 0 8px 32px rgba(241, 196, 15, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.alert-info .alert-content {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.alert-icon {
    font-size: 26px;
    margin-left: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.alert-success .alert-icon {
    color: #27ae60;
    text-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

.alert-error .alert-icon {
    color: #e74c3c;
    text-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.alert-warning .alert-icon {
    color: #f1c40f;
    text-shadow: 0 2px 4px rgba(241, 196, 15, 0.3);
}

.alert-info .alert-icon {
    color: #3498db;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.alert-message {
    flex-grow: 1;
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.alert-close {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px;
    margin-right: -8px;
    margin-left: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .alert-close:hover {
        background: rgba(255, 255, 255, 0.9);
        color: #2c3e50;
        transform: rotate(90deg) scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

/* انیمیشن حباب */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.app-alert.show .alert-content {
    animation: float 4s ease-in-out infinite;
}
