@font-face {
    font-family: 'Vazir';
    src: url('../../Font/Vazir-FD-WOL.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('../../Font/Vazir-Thin-FD-WOL.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('../../Font/Vazir-Light-FD-WOL.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('../../Font/Vazir-Medium-FD-WOL.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('../../Font/Vazir-Bold-FD-WOL.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    direction: rtl;
    display: flex;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: calc(100vh - 60px);
    position: fixed;
    right: 20px;
    top: 30px;
    padding: 10px 15px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.sidebar-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    font-size: 9px;
    color: #999;
    margin-top: 2px;
}

.sidebar-nav {
    margin-top: 10px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 3px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nav-item.active .nav-link {
    background: rgba(37, 99, 235, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #2563eb;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.nav-item-logout {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-item-logout .nav-link {
    color: #475569;
}

.nav-item-logout .nav-link:hover {
    background: rgba(71, 85, 105, 0.1);
    color: #334155;
}

.nav-icon {
    font-size: 20px;
    margin-left: 15px;
    width: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-text {
    flex: 1;
    font-size: 14px;
}

.nav-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
}

.nav-item.has-submenu.open .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-right: 20px;
}

.nav-item.has-submenu.open .nav-submenu {
    max-height: 500px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.nav-submenu-item {
    margin-bottom: 2px;
}

.nav-submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 12px 8px 35px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
}

.nav-submenu-link:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #2563eb;
}

.nav-submenu-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 600;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-right: 290px;
    padding: 25px 30px;
    background: transparent;
    min-height: 100vh;
}

.top-section {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
    align-items: flex-start;
    justify-content: flex-end;
}

/* Badges Section */
.badges-section {
    width: 50%;
    max-width: 600px;
    /* استایل‌های خاص برای این section را اینجا اضافه کنید */
}

.badges-section .badges-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* User Summary Section */
.user-summary-section {
    width: 320px;
    flex-shrink: 0;
    /* استایل‌های خاص برای این section را اینجا اضافه کنید */
}

/* Glass Badge Container */
.glass-badge-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
    width: 100%;
}

/* Badges Row */
.badges-row {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
}

.role-badge {
    width: 100px;
    height: 100px;
    background: rgba(37, 99, 235, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.6);
    flex: 0 0 auto;
}

.role-badge.orange {
    background: rgba(59, 130, 246, 0.12);
}

.role-badge.silver {
    background: rgba(226, 232, 240, 0.5);
}

.role-badge.purple {
    background: rgba(96, 165, 250, 0.12);
}

.role-badge.green {
    background: rgba(37, 99, 235, 0.12);
}

.role-badge.gray {
    background: rgba(241, 245, 249, 0.8);
}

.badge-icon {
    margin-bottom: 8px;
}

.badge-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.badge-text {
    font-size: 7px;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 3px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-title {
    font-size: 9px;
    color: #333;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* Tier Badges */
.tier-badges {
    margin-top: 0;
    margin-bottom: 0;
}

.tier-badge {
    width: 100px;
    height: 100px;
    background: rgba(37, 99, 235, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    clip-path: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    flex: 0 0 auto;
}

.tier-badge.silver-shield {
    background: rgba(226, 232, 240, 0.5);
}

.tier-badge.blue-shield {
    background: rgba(59, 130, 246, 0.15);
}

.tier-badge.light-blue-shield {
    background: rgba(147, 197, 253, 0.2);
}

.shield-icon {
    margin-bottom: 12px;
}

.shield-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.shield-text {
    font-size: 7px;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 3px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.shield-title {
    font-size: 9px;
    color: #333;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* User Summary Card */
.user-summary-card {
    background: rgba(37, 99, 235, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 20px;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.summary-profile-img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.summary-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #2563eb;
}

.summary-codes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.code-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.code-label {
    font-size: 13px;
    color: #666;
    min-width: 95px;
    font-weight: 500;
}

.code-value {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 7px 12px;
    border-radius: 6px;
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.code-value span {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #333;
}

.copy-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.copy-btn:hover {
    opacity: 1;
    color: #2563eb;
}

.highest-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.record-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.record-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #2563eb;
}

/* Metrics Section */
.metrics-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 25px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

.metric-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.metric-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.highest-record-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
}

.highest-record-badge .record-number {
    color: #2563eb;
    font-weight: 700;
    font-size: 13px;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.metric-item.current {
    background: rgba(37, 99, 235, 0.08);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.metric-item.current .metric-value {
    font-size: 16px;
}

.metric-date {
    font-size: 12px;
    color: #666;
}

.metric-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.metric-change {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    margin-right: 8px;
}

.metric-change.negative {
    color: #64748b;
    background-color: #f1f5f9;
}

.metric-change.positive {
    color: #2563eb;
    background-color: #dbeafe;
}

/* Chart Section */
.chart-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.chart-tabs {
    display: flex;
    gap: 10px;
}

.chart-tab {
    padding: 6px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
    font-weight: 500;
}

.chart-tab:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.15);
}

.chart-tab.active {
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.3);
}

.chart-container {
    height: 380px;
    margin-bottom: 15px;
    position: relative;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

/* Profile Card — طراحی از اول، مینیمال و تمیز */
.top-cards-section {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px 20px;
    flex-wrap: wrap;
}

.profile-card-container {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
}

.role-cards-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    width: 100%;
    max-width: 420px;
    position: relative;
}

.profile-card-header {
    height: 84px;
    background: #3b82f6;
    position: relative;
}

.profile-card-content {
    padding: 56px 24px 28px;
    position: relative;
    background: #fff;
}

.profile-picture-wrapper {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: block;
}

.profile-name {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 22px 0;
    line-height: 1.4;
}

.profile-codes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.code-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.code-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    min-width: 80px;
    flex-shrink: 0;
}

.code-field {
    flex: 1;
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.code-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.copy-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: color 0.2s;
    flex-shrink: 0;
}

.copy-icon:hover {
    color: #3b82f6;
}

.copy-icon svg {
    width: 16px;
    height: 16px;
}

/* Role Cards Styles */
.role-cards-wrapper {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 12px;
    padding: 15px;
    margin: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: fit-content;
    max-width: 100%;
}

/* رنکینگ غیرفعال - در حال راه‌اندازی */
.role-cards-wrapper.ranking-disabled {
    cursor: not-allowed;
    position: relative;
    opacity: 0.92;
}

.role-cards-wrapper.ranking-disabled:hover {
    opacity: 0.75;
}

.role-cards-wrapper.ranking-disabled:hover .role-cards-container {
    filter: grayscale(0.5);
    opacity: 0.85;
}

.role-cards-wrapper.ranking-disabled .role-card {
    pointer-events: none;
}

.role-cards-wrapper.ranking-disabled .role-card:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.role-cards-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #2c5eaf;
    padding: 10px 20px;
    margin: 0 0 12px 0;
    text-align: right;
    border-radius: 8px;
}

.badge-coming-soon {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #1e40af;
    background: #dbeafe;
    padding: 4px 10px;
    margin-right: 10px;
    border-radius: 6px;
    vertical-align: middle;
}

.role-cards-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.role-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    flex: 0 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.2s, box-shadow 0.2s;
}

.role-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.role-card-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.role-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.role-card-label {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Metrics Cards Section */
.metrics-cards-section {
    display: flex;
    gap: 20px;
    padding: 0 20px 30px 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.metric-info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.metric-card-blue-header {
    background: #2c5eaf;
    padding: 6px 15px;
    margin: 0;
    text-align: right;
    width: fit-content;
    margin-left: auto;
    margin-right: 0;
    border-radius: 0 0 8px 8px;
}

.metric-card-blue-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.metric-info-card > .metric-card-header {
    padding: 15px 20px 0 20px;
}

.metric-info-card > .metric-card-main {
    padding: 0 20px;
}

.metric-info-card > .metric-card-breakdown {
    padding: 15px 20px 20px 20px;
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.metric-info-card > .metric-card-header {
    margin-bottom: 10px;
}

.metric-info-card .metric-card-title {
    display: none;
}

.metric-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: right;
    flex: 1;
}

.metric-card-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
    margin-right: 12px;
}

.metric-card-icon svg {
    width: 24px;
    height: 24px;
}

.metric-card-banner {
    position: absolute;
    top: 60px;
    left: 15px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    z-index: 10;
}

.banner-text {
    color: #0369a1;
    font-weight: 500;
}

.banner-value {
    color: #0284c7;
    font-weight: 700;
    font-size: 13px;
}

/* کارت‌های متریک: بنر در جریان عادی تا مرتب بماند (هر سه کارت) */
.metric-card-banner--compact {
    position: static;
    margin-top: 12px;
    margin-bottom: 4px;
    width: fit-content;
    white-space: nowrap;
}

.metric-card-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.metric-info-card > .metric-card-main {
    margin-top: 10px;
}

.metric-current-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.current-number {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.current-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.metric-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
    font-size: 13px;
    font-weight: 600;
}

.metric-change.negative {
    background-color: #f1f5f9;
    color: #64748b;
}

.metric-change.positive {
    background-color: #dbeafe;
    color: #2563eb;
}

.change-arrow {
    font-size: 12px;
}

.change-text {
    font-size: 13px;
}

.metric-card-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-label {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 400;
}

.breakdown-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .top-section {
        flex-direction: column;
    }
    
    .user-summary-card {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 1200px) {
    .metrics-section {
        grid-template-columns: 1fr;
    }
    
    .badges-row {
        justify-content: flex-start;
    }
    
    .top-section {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* منو در موبایل: نوار ثابت پایین صفحه — ظاهر جذاب‌تر، همان پس‌زمینه */
    .sidebar {
        width: calc(100% - 16px);
        height: auto;
        position: fixed;
        bottom: 8px;
        left: 8px;
        right: 8px;
        top: auto;
        margin: 0;
        padding: 10px 6px max(10px, env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
        /* همان پس‌زمینه شیشه‌ای */
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.6);
        box-shadow:
            0 -2px 0 0 rgba(255, 255, 255, 0.5),
            0 -8px 32px rgba(0, 0, 0, 0.1),
            0 1px 0 0 rgba(0, 0, 0, 0.04) inset;
        z-index: 1000;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar-header,
    .sidebar .user-profile {
        display: none;
    }
    .sidebar-nav {
        margin-top: 0;
        width: 100%;
    }
    .sidebar .nav-menu {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        gap: 6px;
        padding: 0 4px;
        margin: 0;
        min-width: min-content;
    }
    .sidebar .nav-item {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .sidebar .nav-item-logout {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        margin-right: auto;
    }
    .sidebar .nav-link {
        flex-direction: column;
        align-items: center;
        padding: 10px 12px;
        gap: 5px;
        min-width: 52px;
        border-radius: 14px;
        transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }
    .sidebar .nav-link:active {
        transform: scale(0.96);
    }
    .sidebar .nav-item.active .nav-link {
        background: rgba(37, 99, 235, 0.18);
        box-shadow: 0 2px 12px rgba(37, 99, 235, 0.2);
    }
    .sidebar .nav-item-logout .nav-link:active {
        transform: scale(0.96);
    }
    .sidebar .nav-icon {
        margin-left: 0;
        margin-bottom: 0;
        font-size: 22px;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        transition: background 0.2s ease;
    }
    .sidebar .nav-item.active .nav-icon {
        background: rgba(37, 99, 235, 0.12);
    }
    .sidebar .nav-icon svg {
        width: 22px;
        height: 22px;
    }
    .sidebar .nav-text {
        font-size: 10px;
        font-weight: 600;
        text-align: center;
        line-height: 1.2;
        letter-spacing: 0.02em;
    }
    .sidebar .nav-arrow {
        display: none;
    }
    /* ساب‌منو در موبایل: پنل بالای منوی اصلی — فقط وقتی باز است دیده می‌شود */
    .sidebar .nav-submenu {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
        z-index: 1001;
        transition: max-height 0.3s ease-out;
    }
    .sidebar .nav-item.has-submenu.open .nav-submenu {
        max-height: 50vh;
        overflow-y: auto;
        padding: 16px 14px 20px;
    }
    /* پنل زیرمنو وقتی با JS به body منتقل شده (تا بریده نشود) */
    body > .nav-submenu.nav-submenu-mobile-panel {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        max-height: 50vh;
        overflow-y: auto;
        padding: 16px 14px 20px;
        margin: 0;
        list-style: none;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
        z-index: 1001;
    }
    body > .nav-submenu.nav-submenu-mobile-panel .nav-submenu-item {
        margin-bottom: 6px;
    }
    body > .nav-submenu.nav-submenu-mobile-panel .nav-submenu-link {
        display: block;
        padding: 14px 18px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        color: #1e40af;
    }
    .sidebar .nav-submenu-link {
        padding: 14px 18px;
        margin-bottom: 6px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 500;
        transition: background 0.2s ease;
    }
    .sidebar .nav-submenu-link:hover {
        background: rgba(37, 99, 235, 0.1);
    }
    .sidebar .nav-submenu-link:active {
        background: rgba(37, 99, 235, 0.15);
    }
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }
    .main-content {
        margin-right: 0;
        padding: 15px;
        padding-bottom: 20px;
    }
    
    .badges-row {
        justify-content: center;
    }
    
    .role-badge {
        width: 120px;
        height: 120px;
    }
    
    .tier-badge {
        width: 150px;
        height: 170px;
    }
    
    .user-summary-card {
        width: 100%;
    }
    
    .metrics-cards-section {
        flex-direction: column;
        padding: 0 10px 20px 10px;
    }
    
    .metric-info-card {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Packages Page Styles */
.packages-header {
    padding: 30px 20px;
    margin-bottom: 30px;
}

.packages-info-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    margin: 0 20px 30px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border-right: 4px solid #2c5eaf;
}

.info-box-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 94, 175, 0.1);
    border-radius: 12px;
}

.info-box-content {
    flex: 1;
}

.info-box-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.info-box-text {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0;
}

.packages-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.packages-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.packages-section {
    padding: 0 20px 40px 20px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
}

.package-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.package-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.package-card.featured {
    border: 2px solid #2c5eaf;
    background: linear-gradient(135deg, rgba(44, 94, 175, 0.05) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.package-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2c5eaf;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.package-badge.popular {
    background: #2563eb;
}

.package-icon {
    font-size: 64px;
    text-align: center;
    margin: 20px 0;
}

.package-name {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.package-price {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(44, 94, 175, 0.1);
    border-radius: 12px;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #2c5eaf;
    display: block;
}

.price-currency {
    font-size: 16px;
    color: #666;
    margin-right: 5px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.package-features li {
    padding: 10px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.package-features li:last-child {
    border-bottom: none;
}

.package-button {
    width: 100%;
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.package-button:hover {
    background: #1e40af;
}

/* Payment Modal Styles */
.payment-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.payment-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
}

.payment-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.payment-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.payment-modal-close:hover {
    color: #333;
}

.payment-modal-body {
    padding: 25px;
}

.payment-package-info {
    background: rgba(44, 94, 175, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.payment-package-info span {
    display: block;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.payment-amount {
    font-size: 24px;
    font-weight: 700;
    color: #2c5eaf;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-method-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.payment-method-card:hover:not(.disabled) {
    border-color: #2c5eaf;
    background: rgba(44, 94, 175, 0.05);
    transform: translateX(-5px);
}

.payment-method-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f3f4f6;
}

.payment-method-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 94, 175, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.payment-method-card.disabled .payment-method-icon {
    background: #e5e7eb;
}

.payment-method-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
    flex: 1;
}

.payment-method-description {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.payment-method-arrow {
    font-size: 24px;
    color: #2c5eaf;
    font-weight: 700;
}

.payment-method-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2563eb;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Bank Transfer Page Styles */
.bank-transfer-page {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.bank-transfer-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 20px;
    animation: modalSlideIn 0.3s ease-out;
}

.bank-transfer-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
}

.back-button {
    background: #f3f4f6;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.back-button:hover {
    background: #e5e7eb;
}

.bank-transfer-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.bank-transfer-body {
    padding: 25px;
}

.bank-info-card {
    background: rgba(44, 94, 175, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.bank-info-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
}

.bank-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bank-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.bank-detail-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    min-width: 120px;
}

.bank-detail-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    flex: 1;
}

.copy-button {
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-button:hover {
    background: #1e40af;
}

.payment-instructions {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.instructions-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 10px 0;
}

.instructions-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
}

.instructions-text p {
    margin: 8px 0;
}

.receipt-upload-section {
    margin-top: 25px;
}

.upload-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
}

.upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.upload-area:hover {
    border-color: #2c5eaf;
    background: rgba(44, 94, 175, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin: 10px 0;
}

.upload-hint {
    font-size: 12px;
    color: #666;
    margin: 5px 0 15px 0;
}

.upload-button {
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.upload-button:hover {
    background: #1e40af;
}

.file-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 8px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.file-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.remove-file {
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-file:hover {
    background: #64748b;
}

.submit-button {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.submit-button:hover:not(:disabled) {
    background: #1d4ed8;
}

.submit-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Responsive Design for Packages Page */
@media (max-width: 768px) {
    .packages-title {
        font-size: 24px;
    }
    
    .packages-subtitle {
        font-size: 14px;
    }
    
    .packages-info-box {
        flex-direction: column;
        padding: 20px;
        margin: 0 10px 20px 10px;
    }
    
    .info-box-icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .payment-modal-content,
    .bank-transfer-content {
        width: 95%;
        margin: 10px;
    }
    
    .payment-method-card {
        flex-direction: column;
        text-align: center;
    }
    
    .bank-detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bank-detail-label {
        min-width: auto;
    }
}

/* Sales Report Page Styles */
.report-header {
    padding: 30px 20px;
    margin-bottom: 30px;
}

.report-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    padding: 0 20px 40px 20px;
}

.report-table-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.table-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.selected-month-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.month-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.month-value {
    font-size: 16px;
    font-weight: 700;
    color: #2c5eaf;
    background: rgba(44, 94, 175, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sales-table thead {
    background: rgba(44, 94, 175, 0.1);
}

.sales-table th {
    padding: 15px;
    text-align: right;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.sales-table td {
    padding: 15px;
    text-align: right;
    color: #555;
    border-bottom: 1px solid #f3f4f6;
}

.sales-table tbody tr:hover {
    background: rgba(44, 94, 175, 0.05);
}

.view-image-btn {
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.view-image-btn:hover {
    background: #1e40af;
}

.month-selector-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.selector-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.months-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.month-selector-item {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.month-selector-item:hover {
    border-color: #2c5eaf;
    background: rgba(44, 94, 175, 0.05);
    transform: translateX(-5px);
}

.month-selector-item.active {
    background: rgba(44, 94, 175, 0.1);
    border-color: #2c5eaf;
    box-shadow: 0 4px 12px rgba(44, 94, 175, 0.2);
}

.month-selector-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.month-selector-item.active .month-selector-name {
    color: #2c5eaf;
}

.month-selector-amount-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.month-selector-amount {
    font-size: 13px;
    font-weight: 700;
    color: #2c5eaf;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.month-selector-currency {
    font-size: 10px;
    color: #999;
}

/* Insurance Image Modal */
.insurance-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.insurance-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

.insurance-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.insurance-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.insurance-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.insurance-modal-close:hover {
    color: #333;
}

.insurance-modal-body {
    padding: 20px;
    text-align: center;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.insurance-image {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.report-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.report-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.summary-cards-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px 30px 20px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 94, 175, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c5eaf;
    margin: 0;
    font-family: 'Courier New', monospace;
}

.summary-currency {
    font-size: 12px;
    color: #999;
    margin-right: 5px;
}

.monthly-portal-section {
    padding: 0 20px 40px 20px;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.month-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.month-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.month-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.month-amount {
    font-size: 20px;
    font-weight: 700;
    color: #2c5eaf;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.month-currency {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.month-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.month-status.excellent {
    background: #dbeafe;
    color: #1d4ed8;
}

.month-status.good {
    background: #eff6ff;
    color: #2563eb;
}

.month-status.warning {
    background: #f1f5f9;
    color: #64748b;
}

.month-status.danger {
    background: #e2e8f0;
    color: #475569;
}

.chart-section {
    padding: 0 20px 40px 20px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.chart-container canvas {
    width: 100%;
    height: 400px;
}

/* Membership Report Page Styles */
.membership-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 20px 30px 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 94, 175, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c5eaf;
    margin: 0;
}

.commission-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 20px 30px 20px;
}

.commission-summary .summary-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
}

.commission-summary .summary-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 94, 175, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.commission-summary .summary-info {
    flex: 1;
}

.commission-summary .summary-label {
    font-size: 13px;
    color: #666;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.commission-summary .summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c5eaf;
    margin: 0;
}

.status-badge.pending {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.filter-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin: 0 20px 25px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.filter-input,
.filter-select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    background: white;
    transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #2c5eaf;
}

.membership-table-section {
    padding: 0 20px 40px 20px;
}

.table-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow-x: auto;
}

.membership-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.membership-table thead {
    background: rgba(44, 94, 175, 0.1);
}

.membership-table th {
    padding: 15px;
    text-align: right;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.membership-table td {
    padding: 15px;
    text-align: right;
    color: #555;
    border-bottom: 1px solid #f3f4f6;
}

.membership-table tbody tr:hover {
    background: rgba(44, 94, 175, 0.05);
}

.member-count {
    display: inline-block;
    background: rgba(44, 94, 175, 0.1);
    color: #2c5eaf;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.inactive {
    background: #f1f5f9;
    color: #64748b;
}

.membership-loading,
.membership-error {
    text-align: center;
    padding: 1.5rem;
    font-size: 15px;
}

.membership-error {
    color: #475569;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.view-btn {
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.view-btn:hover {
    background: #1e40af;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(44, 94, 175, 0.1);
    border-color: #2c5eaf;
    color: #2c5eaf;
}

.pagination-btn.active {
    background: #2c5eaf;
    color: white;
    border-color: #2c5eaf;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design for Report Pages */
@media (max-width: 768px) {
    .report-title {
        font-size: 24px;
    }
    
    .report-subtitle {
        font-size: 14px;
    }
    
    .report-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .month-selector-section {
        position: static;
        order: -1;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .summary-cards-section,
    .membership-stats {
        grid-template-columns: 1fr;
    }
    
    .months-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .membership-table {
        min-width: 800px;
    }
    
    .sales-table {
        min-width: 600px;
    }
}

/* Register Agents Page Styles */
.register-header {
    padding: 30px 20px;
    margin-bottom: 30px;
}

.register-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.register-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.supervisor-section {
    padding: 0 20px 25px 20px;
}

.supervisor-input-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.supervisor-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.supervisor-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.supervisor-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    background: white;
    transition: border-color 0.2s;
}

.supervisor-input:focus {
    outline: none;
    border-color: #2c5eaf;
}

.supervisor-search-btn {
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.supervisor-search-btn:hover {
    background: #1e40af;
}

.agents-table-section {
    padding: 0 20px 40px 20px;
}

.table-header-section {
    margin-bottom: 20px;
}

.table-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.add-agent-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-agent-btn:hover {
    background: #1d4ed8;
}

.agents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.agents-table thead {
    background: rgba(44, 94, 175, 0.1);
}

.agents-table th {
    padding: 15px;
    text-align: right;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.agents-table td {
    padding: 15px;
    text-align: right;
    color: #555;
    border-bottom: 1px solid #f3f4f6;
}

.agents-table tbody tr:hover {
    background: rgba(44, 94, 175, 0.05);
}

.supervisor-assign-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.supervisor-assign-btn:hover {
    background: #1d4ed8;
}

.supervisor-agent-info {
    background: rgba(44, 94, 175, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.agent-info-text {
    font-size: 15px;
    color: #333;
    margin: 0;
}

.agent-info-text strong {
    color: #2c5eaf;
}

.supervisor-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.supervisor-input-group .form-input {
    flex: 1;
}

.search-supervisor-btn {
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-supervisor-btn:hover {
    background: #1e40af;
}

.supervisor-preview-card {
    background: rgba(44, 94, 175, 0.05);
    border: 2px solid rgba(44, 94, 175, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.supervisor-preview-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #2c5eaf;
    flex-shrink: 0;
}

.supervisor-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supervisor-preview-info {
    flex: 1;
}

.supervisor-preview-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.supervisor-preview-code {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.supervisor-preview-code strong {
    color: #2c5eaf;
    margin-left: 5px;
}

.confirm-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.confirm-btn:hover {
    background: #1d4ed8;
}

/* Agent Modal Styles */
.agent-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.agent-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.agent-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.agent-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.agent-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.agent-modal-close:hover {
    color: #333;
}

.agent-modal-body {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    background: white;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #2c5eaf;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.cancel-btn {
    background: #f3f4f6;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cancel-btn:hover {
    background: #e5e7eb;
}

.save-btn {
    background: #2c5eaf;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.save-btn:hover {
    background: #1e40af;
}

/* Responsive Design for Register Agents Page */
@media (max-width: 768px) {
    .register-title {
        font-size: 24px;
    }
    
    .register-subtitle {
        font-size: 14px;
    }
    
    .supervisor-input-wrapper {
        flex-direction: column;
    }
    
    .supervisor-search-btn {
        width: 100%;
    }
    
    .table-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .add-agent-btn {
        width: 100%;
        justify-content: center;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .agents-table {
        min-width: 800px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .agent-modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* Under Development Section */
.under-development-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.under-development-content {
    text-align: center;
    max-width: 500px;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.under-development-icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.under-development-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c5eaf;
    margin: 0 0 20px 0;
}

.under-development-description {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
    margin: 0 0 15px 0;
}

.under-development-note {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
    margin: 0;
}

/* ========== Shop Page (فروشگاه - ثبت درخواست بیمه) ========== */
.shop-page-content {
    padding: 0 0 40px 0;
    max-width: 100%;
    overflow-x: hidden;
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    max-width: 1280px;
}

.shop-layout > * {
    min-width: 0;
}

.shop-form-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 26px 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 0;
}

.shop-form-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.shop-form-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 6px 0;
}

.shop-form-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.shop-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.shop-form .form-group-full {
    margin-bottom: 14px;
}

.shop-form .form-label {
    font-size: 13px;
    margin-bottom: 6px;
}

.shop-form .form-input {
    padding: 10px 12px;
    font-size: 14px;
}

.shop-form .form-label .required {
    color: #2563eb;
}

.shop-form .form-textarea {
    min-height: 80px;
    resize: vertical;
}

.shop-form .form-actions {
    margin-top: 18px;
    padding-top: 14px;
}

.shop-form .cancel-btn,
.shop-form .save-btn {
    padding: 10px 18px;
    font-size: 14px;
}

/* آپلود فایل فروشگاه */
.shop-file-upload {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 18px 20px;
    background: #f9fafb;
    transition: border-color 0.2s, background 0.2s;
}

.shop-file-upload:hover,
.shop-file-upload.shop-file-dragover {
    border-color: #2c5eaf;
    background: rgba(44, 94, 175, 0.06);
}

.shop-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.shop-file-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.shop-file-icon {
    font-size: 28px;
}

.shop-file-text {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.shop-file-hint {
    font-size: 12px;
    color: #9ca3af;
}

.shop-file-list {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
}

.shop-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 6px;
    font-size: 12px;
    color: #374151;
}

.shop-file-list li .shop-file-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
}

.shop-file-list li .shop-file-remove:hover {
    color: #475569;
}

/* بخش درخواست‌های من */
.shop-requests-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.shop-requests-section {
    margin-top: 0;
    min-width: 0;
    overflow: hidden;
}

.shop-requests-section-closed {
    margin-top: 0;
}
}

.shop-requests-header {
    margin-bottom: 18px;
}

.shop-requests-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.shop-requests-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 0;
}

.shop-empty-state {
    text-align: center;
    padding: 56px 32px;
}

.shop-empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.7;
}

.shop-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px 0;
}

.shop-empty-desc {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.shop-requests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.shop-requests-table thead {
    background: rgba(44, 94, 175, 0.1);
}

.shop-requests-table th {
    padding: 16px 18px;
    text-align: right;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
}

.shop-requests-table td {
    padding: 16px 18px;
    text-align: right;
    color: #555;
    border-bottom: 1px solid #f3f4f6;
}

.shop-requests-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

.shop-requests-table tbody tr:hover {
    background: rgba(44, 94, 175, 0.08);
}

.shop-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.shop-status-pending {
    background: #eff6ff;
    color: #2563eb;
}

.shop-status-approved {
    background: #dbeafe;
    color: #1d4ed8;
}

.shop-status-rejected {
    background: #f1f5f9;
    color: #475569;
}

.shop-status-closed {
    background: #e2e8f0;
    color: #475569;
}

@media (max-width: 768px) {
    .shop-page-content {
        padding: 0 0 24px 0;
        max-width: 100%;
    }
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .shop-form-card,
    .shop-requests-card {
        padding: 18px 16px;
    }
    .shop-form .form-row {
        grid-template-columns: 1fr;
    }
    .shop-requests-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .shop-requests-table {
        min-width: 480px;
    }
}

/* ========== Shop Request Chat (چت با کارشناس) ========== */
/* هدر صفحه */
.shop-chat-hero {
    margin-bottom: 24px;
}

.shop-chat-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #5b6b82;
    text-decoration: none;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(44, 94, 175, 0.15);
    transition: color 0.2s, background 0.2s;
}

.shop-chat-back-link:hover {
    color: #2c5eaf;
    background: rgba(44, 94, 175, 0.06);
}

.shop-chat-back-arrow {
    font-size: 14px;
    font-weight: 700;
}

.shop-chat-hero-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1f2e;
    margin: 0 0 4px 0;
}

.shop-chat-hero-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.shop-chat-not-found {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.shop-chat-not-found-icon {
    font-size: 42px;
    margin-bottom: 14px;
    opacity: 0.7;
}

.shop-chat-not-found-text {
    font-size: 15px;
    color: #475569;
    margin: 0 0 18px 0;
}

.shop-chat-not-found-btn {
    display: inline-block;
    padding: 10px 22px;
    background: #2c5eaf;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.shop-chat-not-found-btn:hover {
    background: #1e429f;
}

/* چیدمان: خلاصه درخواست سمت راست | چت کنارش سمت چپ (RTL) */
.shop-chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    align-items: stretch;
    max-width: 1280px;
}

/* کارت خلاصه درخواست — سمت راست */
.shop-chat-summary {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.shop-chat-summary-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.shop-chat-summary-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 94, 175, 0.1);
    border-radius: 6px;
    font-size: 12px;
}

.shop-chat-summary-title {
    font-size: 12px;
    font-weight: 700;
    color: #1a1f2e;
    margin: 0;
}

.shop-chat-summary-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shop-chat-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 6px;
    font-size: 10px;
    padding: 3px 0;
}

.shop-chat-row-full {
    grid-template-columns: 1fr;
}

.shop-chat-label {
    color: #64748b;
    font-weight: 500;
}

.shop-chat-summary-actions {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-chat-btn {
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: opacity 0.2s, transform 0.1s;
}

.shop-chat-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.shop-chat-btn-price {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
}

.shop-chat-btn-issue {
    background: linear-gradient(135deg, #2c5eaf 0%, #1e429f 100%);
    color: #fff;
}

/* کارت چت — کنار خلاصه (سمت چپ) */
.shop-chat-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 460px;
    overflow: hidden;
}

.shop-chat-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.shop-chat-box-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2c5eaf 0%, #1e429f 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shop-chat-box-info {
    flex: 1;
    min-width: 0;
}

.shop-chat-box-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1f2e;
    margin: 0 0 4px 0;
}

.shop-chat-box-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #2563eb;
    font-weight: 500;
}

.shop-chat-box-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    animation: shop-chat-pulse 2s ease-in-out infinite;
}

@keyframes shop-chat-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.shop-chat-box-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 260px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fafbfc;
}

.shop-chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.shop-chat-welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.shop-chat-welcome p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.shop-chat-msg {
    display: flex;
    justify-content: flex-start;
}

.shop-chat-msg-me {
    justify-content: flex-end;
}

.shop-chat-bubble {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.shop-chat-msg-me .shop-chat-bubble {
    background: linear-gradient(135deg, #2c5eaf 0%, #1e429f 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(44, 94, 175, 0.25);
}

.shop-chat-who {
    display: block;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #64748b;
}

.shop-chat-msg-me .shop-chat-who {
    color: rgba(255, 255, 255, 0.9);
}

.shop-chat-txt {
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.shop-chat-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 6px;
}

.shop-chat-msg-me .shop-chat-time {
    color: rgba(255, 255, 255, 0.8);
}

.shop-chat-box-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    align-items: flex-end;
}

.shop-chat-box-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 46px;
    max-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-chat-box-input:focus {
    outline: none;
    border-color: #2c5eaf;
    box-shadow: 0 0 0 3px rgba(44, 94, 175, 0.15);
}

.shop-chat-box-send {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2c5eaf 0%, #1e429f 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.2s;
}

.shop-chat-box-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 94, 175, 0.35);
}

@media (max-width: 768px) {
    .shop-chat-layout {
        grid-template-columns: 1fr;
    }
    .shop-chat-summary {
        padding: 14px 16px;
    }
    .shop-chat-row {
        grid-template-columns: 50px 1fr;
        font-size: 11px;
    }
    .shop-chat-hero-title {
        font-size: 20px;
    }
}

