:root {
    /* Brand - Persian Green (replaces former blue system) */
    --brand-primary: #00A693;
    --brand-deep:    #008B7A;
    --brand-dark:    #00786B;
    --brand-mid:     #26B6A7;
    --brand-light:   #6FD6CA;
    --brand-tint:    #E8F8F6;
    --brand-primary-rgb: 0, 166, 147;
    --brand-deep-rgb:    0, 139, 122;
    --brand-mid-rgb:     38, 182, 167;
    /* Complementary - Carmine (errors / negative / delete) */
    --danger:      #C62839;
    --danger-deep: #A60013;
    --danger-tint: #FDECEE;
    --danger-rgb:  198, 40, 57;
}

@font-face {
    font-family: 'Pelak';
    src: url('../../Font/PelakFA-light.woff2') format('woff2'),
         url('../../Font/PelakFA-light.woff') format('woff'),
         url('../../Font/PelakFA-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pelak';
    src: url('../../Font/PelakFA-Regular.woff2') format('woff2'),
         url('../../Font/PelakFA-Regular.woff') format('woff'),
         url('../../Font/PelakFA-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pelak';
    src: url('../../Font/PelakFA-Bold.woff2') format('woff2'),
         url('../../Font/PelakFA-Bold.woff') format('woff'),
         url('../../Font/PelakFA-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Pelak', '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: 288px;
    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: 120px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: inherit;
}

.user-profile:hover {
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.profile-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    border: 1.5px solid rgba(0, 166, 147, 0.3);
    background: #0a4e56;
    flex-shrink: 0;
    display: block;
}

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

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.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(var(--brand-primary-rgb), 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--brand-primary);
    font-weight: 600;
    border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
}

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

/* بدون پکیج تاییدشده: آیتم‌های قفل‌شده منو مخفی می‌شوند */
.nav-item.nav-locked-by-package {
    display: none !important;
}

.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 12px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
    white-space: normal;
    line-height: 1.45;
    overflow-wrap: break-word;
}

.nav-submenu-link:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--brand-primary);
}

.nav-submenu-link.active {
    background: rgba(var(--brand-primary-rgb), 0.1);
    color: var(--brand-primary);
    font-weight: 600;
}

/* Top navigation bar */
.app-topbar {
    display: none;
}

body.has-app-topbar .app-topbar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: 64px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.app-topbar-inner {
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.app-topbar-start {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-topbar .mobile-menu-toggle {
    display: none;
}

.app-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.app-topbar-logo {
    height: 38px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-topbar-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.app-topbar-subtitle {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

.app-topbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.app-topbar-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.app-topbar-link:hover {
    background: rgba(var(--brand-primary-rgb), 0.1);
    color: var(--brand-deep);
}

.app-topbar-link.is-active {
    background: rgba(var(--brand-primary-rgb), 0.15);
    color: var(--brand-primary);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
}

.app-topbar-end {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sales-followup-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
}

.sales-followup-modal[hidden] {
    display: none;
}

.sales-followup-dialog {
    width: min(1280px, 100%);
    max-height: 100%;
    background: #f4f6f8;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sales-followup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
}

.sales-followup-head h2 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.sales-followup-head p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
}

.sales-followup-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.sales-followup-close:hover {
    background: #e2e8f0;
}

.sales-followup-body {
    padding: 16px;
    overflow: auto;
    min-height: 0;
    flex: 1;
}

.sales-followup-loading,
.sales-followup-error,
.sales-followup-empty {
    margin: 40px auto;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.sales-followup-board {
    display: flex;
    gap: 12px;
    align-items: stretch;
    overflow-x: auto;
    min-height: 420px;
    padding-bottom: 6px;
}

.sales-followup-col {
    flex: 1 0 180px;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-height: 420px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.sales-followup-col--new { border-top: 3px solid #86efac; }
.sales-followup-col--negotiation { border-top: 3px solid #f59e0b; }
.sales-followup-col--missing_docs { border-top: 3px solid #ea580c; }
.sales-followup-col--platform_quote { border-top: 3px solid #14b8a6; }
.sales-followup-col--agent_quote { border-top: 3px solid #7c3aed; }
.sales-followup-col--quote_presented { border-top: 3px solid #0f766e; }
.sales-followup-col--issuance_missing_docs { border-top: 3px solid #dc2626; }
.sales-followup-col--issuing { border-top: 3px solid #2563eb; }
.sales-followup-col--rejected { border-top: 3px solid #991b1b; }
.sales-followup-col--archived { border-top: 3px solid #64748b; }

.sales-followup-col-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 10px;
}

.sales-followup-col-head h3 {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
}

.sales-followup-col-head span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
}

.sales-followup-count {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.sales-followup-col--new .sales-followup-count { background: #dcfce7; color: #166534; }
.sales-followup-col--negotiation .sales-followup-count { background: #fef3c7; color: #b45309; }
.sales-followup-col--missing_docs .sales-followup-count { background: #ffedd5; color: #c2410c; }
.sales-followup-col--platform_quote .sales-followup-count { background: #ccfbf1; color: #0f766e; }
.sales-followup-col--agent_quote .sales-followup-count { background: #ede9fe; color: #6d28d9; }
.sales-followup-col--quote_presented .sales-followup-count { background: #ccfbf1; color: #115e59; }
.sales-followup-col--issuance_missing_docs .sales-followup-count { background: #fee2e2; color: #b91c1c; }
.sales-followup-col--issuing .sales-followup-count { background: #dbeafe; color: #1d4ed8; }
.sales-followup-col--rejected .sales-followup-count { background: #fee2e2; color: #991b1b; }
.sales-followup-col--archived .sales-followup-count { background: #e2e8f0; color: #475569; }

.sales-followup-col-body {
    flex: 1;
    padding: 8px;
    background: #f8fafc;
    border-radius: 0 0 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 280px;
}

.sales-followup-col-empty {
    flex: 1;
    border: 1px dashed #dbe3ea;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sales-followup-card {
    display: block;
    width: 100%;
    text-align: right;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sales-followup-card:hover {
    border-color: rgba(var(--brand-primary-rgb), 0.35);
}

.sales-followup-card strong {
    display: block;
    font-size: 13px;
    color: #0f172a;
}

.sales-followup-card small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

body.sales-followup-open {
    overflow: hidden;
}

.app-topbar-username {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.app-topbar-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.75);
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.app-topbar-icon-btn:hover {
    background: #fff;
    border-color: rgba(var(--brand-primary-rgb), 0.28);
    color: var(--brand-deep);
}

.app-topbar-icon-btn--logout {
    color: var(--danger);
    background: var(--danger-tint);
    border-color: rgba(var(--danger-rgb), 0.18);
}

.app-topbar-icon-btn--logout:hover {
    background: #f8d0d4;
    border-color: #e88a92;
    color: var(--danger-deep);
}

.app-topbar-notices {
    position: relative;
}

.app-topbar-notices-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 1200;
}

.app-topbar-notices-head {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.app-topbar-notices-empty {
    padding: 18px 8px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.app-topbar-notices-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.app-topbar-notices-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}

.app-topbar-notice {
    width: 100%;
    text-align: right;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.app-topbar-notice.is-unread {
    background: var(--brand-tint);
    border-color: rgba(var(--brand-primary-rgb), 0.2);
}

.app-topbar-notice-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.app-topbar-notice-date {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
}

.app-topbar-notice-body {
    font-size: 12px;
    color: #475569;
    line-height: 1.7;
    white-space: pre-wrap;
}

body.has-app-topbar {
    padding-top: 64px;
}

body.has-app-topbar .sidebar {
    top: 84px;
    height: calc(100vh - 104px);
}

body.has-app-topbar .main-content {
    min-height: calc(100vh - 64px);
}

body.has-app-topbar .mobile-header {
    display: none !important;
}

body.has-app-topbar .main-content.schematic-main {
    height: calc(100vh - 64px);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-right: 318px;
    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(var(--brand-primary-rgb), 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(var(--brand-mid-rgb), 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(var(--brand-primary-rgb), 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(var(--brand-primary-rgb), 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(var(--brand-mid-rgb), 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(var(--brand-primary-rgb), 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(var(--brand-primary-rgb), 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: var(--brand-primary);
}

.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: var(--brand-primary);
}

.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: var(--brand-primary);
}

/* 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: var(--brand-primary);
    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(var(--brand-primary-rgb), 0.08);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(var(--brand-primary-rgb), 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: var(--brand-primary);
    background-color: var(--brand-tint);
}

/* 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(var(--brand-primary-rgb), 0.15);
    color: var(--brand-primary);
    border-color: rgba(var(--brand-primary-rgb), 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: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 24px 20px;
}

.profile-card-container {
    display: flex;
    width: 100%;
    min-width: 0;
    padding: 0;
}

.role-cards-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    width: 100%;
}

.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: none;
    position: relative;
}

.profile-card-header {
    height: 84px;
    background: var(--brand-mid);
    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 16px 0;
    line-height: 1.4;
}

.profile-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px 0;
}

.profile-plan-caption {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
}

.profile-plan-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.profile-plan:not(.profile-plan--logo) .profile-plan-media {
    width: 100%;
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
}

.profile-plan--logo .profile-plan-media {
    background: transparent;
    border: none;
    padding: 0;
    min-height: 0;
}

.pkg-profile-logo {
    width: 112px;
    height: auto;
    display: block;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
}

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

.profile-codes .code-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.profile-codes .code-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    min-width: 0;
    width: 100%;
    text-align: right;
}

.profile-codes .code-field {
    flex: none;
    width: 100%;
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    min-height: 44px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-codes .code-field--rank-logo {
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 12px;
}

.profile-codes .code-rank-logo {
    height: 40px;
    width: 40px;
    max-width: 40px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.16));
}

.profile-codes .code-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 0;
    line-height: 1.35;
}

.profile-codes .code-field--rank-logo .code-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.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: var(--brand-mid);
}

.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: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* رنکینگ غیرفعال - در حال راه‌اندازی */
.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: var(--brand-deep);
    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: var(--brand-dark);
    background: var(--brand-tint);
    padding: 4px 10px;
    margin-right: 10px;
    border-radius: 6px;
    vertical-align: middle;
}

.role-cards-container {
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
}

.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: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    flex: 1 1 0;
    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 {
    position: relative;
    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;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.role-card-percent {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-deep);
    text-align: center;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.role-card-progress {
    display: none;
}

.role-card--locked {
    cursor: pointer;
}

.role-card[data-rank-id]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.role-card[data-rank-id]:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.role-card--locked .role-card-image {
    filter: grayscale(0.55) brightness(0.9);
}

.role-card--personal.role-card--locked .role-card-image--fill,
.role-card--org.role-card--locked .role-card-image--fill {
    filter: none;
}

.role-card:not(.role-card--locked) .role-card-lock {
    display: none;
}

.role-card--personal:not(.role-card--locked) .role-card-percent,
.role-card--org:not(.role-card--locked) .role-card-percent {
    color: #0f766e;
}

.role-card-lock {
    position: absolute;
    left: 50%;
    top: calc(100% + 2px);
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    background: transparent;
}

.role-card-lock svg {
    width: 16px;
    height: 16px;
    color: #111827;
    filter: none;
    background: none;
    border-radius: 0;
    padding: 0;
    box-sizing: content-box;
}

/* Personal ranking – seal badges */
.role-card--personal {
    --rank-progress: 0%;
    min-width: 0;
    padding: 12px 8px 14px;
}

.role-card-icon--seal {
    width: 96px;
    height: 96px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
    margin-bottom: 22px;
}

.role-card-image--seal {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

@property --rank-progress {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 0%;
}

.role-card--personal .role-card-image--ghost,
.role-card--org .role-card-image--ghost {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.48;
    filter: grayscale(1);
    pointer-events: none;
    z-index: 0;
}

.role-card--personal .role-card-image--fill,
.role-card--org .role-card-image--fill {
    position: relative;
    z-index: 1;
    -webkit-mask-image: linear-gradient(
        to top,
        #000 0%,
        #000 max(0%, calc(var(--rank-progress) - 6%)),
        rgb(0 0 0 / 0) var(--rank-progress)
    );
    mask-image: linear-gradient(
        to top,
        #000 0%,
        #000 max(0%, calc(var(--rank-progress) - 6%)),
        rgb(0 0 0 / 0) var(--rank-progress)
    );
}

.role-card--personal.role-card--filled .role-card-image--ghost,
.role-card--personal:not(.role-card--locked) .role-card-image--ghost,
.role-card--org.role-card--filled .role-card-image--ghost,
.role-card--org:not(.role-card--locked) .role-card-image--ghost {
    opacity: 0;
}

.role-card--personal.role-card--filled .role-card-image--fill,
.role-card--personal:not(.role-card--locked) .role-card-image--fill,
.role-card--org.role-card--filled .role-card-image--fill,
.role-card--org:not(.role-card--locked) .role-card-image--fill {
    -webkit-mask-image: none;
    mask-image: none;
}

/* Organizational ranking – shield badges */
.role-card--org {
    --rank-progress: 0%;
    min-width: 0;
    padding: 12px 6px 14px;
}

.role-card-icon--shield {
    width: 92px;
    height: 118px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
    margin-bottom: 22px;
}

.role-card-image--shield {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

/* Binary package ranks – trophy / medal badges */
.role-card--binary {
    --rank-progress: 0%;
    min-width: 0;
    padding: 12px 6px 14px;
}

.role-card-icon--trophy {
    width: 92px;
    height: 118px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
    margin-bottom: 22px;
}

.role-card-image--trophy {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

.role-card--binary .role-card-image--ghost {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.48;
    filter: grayscale(1);
    pointer-events: none;
    z-index: 0;
}

.role-card--binary .role-card-image--fill {
    position: relative;
    z-index: 1;
    -webkit-mask-image: linear-gradient(
        to top,
        #000 0%,
        #000 max(0%, calc(var(--rank-progress) - 6%)),
        rgb(0 0 0 / 0) var(--rank-progress)
    );
    mask-image: linear-gradient(
        to top,
        #000 0%,
        #000 max(0%, calc(var(--rank-progress) - 6%)),
        rgb(0 0 0 / 0) var(--rank-progress)
    );
}

.role-card--binary.role-card--filled .role-card-image--ghost,
.role-card--binary:not(.role-card--locked) .role-card-image--ghost {
    opacity: 0;
}

.role-card--binary.role-card--filled .role-card-image--fill,
.role-card--binary:not(.role-card--locked) .role-card-image--fill {
    -webkit-mask-image: none;
    mask-image: none;
}

.role-card--binary.role-card--locked .role-card-image--fill {
    filter: none;
}

.role-card--binary:not(.role-card--locked) .role-card-percent {
    color: #0f766e;
}

@media (max-width: 1100px) {
    .top-cards-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .profile-card-container {
        max-width: 360px;
        width: 100%;
        justify-self: stretch;
    }

    .role-cards-container {
        flex-wrap: wrap;
    }

    .role-card {
        flex: 1 1 calc(25% - 12px);
        min-width: 110px;
    }

    .role-card--org {
        flex: 1 1 calc(33.333% - 12px);
    }

    .role-card--binary {
        flex: 1 1 calc(33.333% - 12px);
    }
}

@media (max-width: 640px) {
    .top-cards-section {
        padding: 16px 12px;
    }

    .profile-card-container {
        max-width: none;
    }

    .role-cards-title {
        font-size: 14px;
        padding: 10px 12px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .badge-coming-soon {
        margin-right: 0;
    }

    .role-card {
        flex: 1 1 calc(50% - 12px);
    }

    .role-card-icon--seal {
        width: 80px;
        height: 80px;
    }

    .role-card-icon--shield {
        width: 80px;
        height: 104px;
    }

    .role-card-icon--trophy {
        width: 80px;
        height: 104px;
    }

    .role-card-label {
        font-size: 12px;
    }
}

/* Rank requirements modal */
.rank-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.rank-modal.open {
    display: flex;
}

body.rank-modal-open {
    overflow: hidden;
}

.rank-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.rank-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: min(90vh, 640px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    animation: modalSlideIn 0.28s ease-out;
}

.rank-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: var(--brand-deep);
}

.rank-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.rank-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.rank-modal-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.rank-modal-body {
    padding: 20px;
}

.rank-modal-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 12px;
    background: var(--brand-tint);
    margin-bottom: 18px;
}

.rank-modal-image {
    width: 88px;
    height: 112px;
    object-fit: contain;
    flex-shrink: 0;
}

.rank-modal-hero-meta {
    min-width: 0;
}

.rank-modal-group {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-dark);
    background: rgba(0, 166, 147, 0.12);
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.rank-modal-name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.rank-modal-progress {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-deep);
}

.rank-modal-section-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.rank-modal-requirements {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-modal-requirement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.rank-modal-requirement-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
}

.rank-modal-requirement.is-done {
    background: var(--brand-tint);
    border-color: rgba(0, 166, 147, 0.28);
}

.rank-modal-requirement.is-done .rank-modal-requirement-icon {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #fff;
}

.rank-modal-requirement-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #4b5563;
}

.rank-modal-requirement-body {
    min-width: 0;
    flex: 1;
}

.rank-modal-requirement-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-deep);
    margin-bottom: 4px;
}

.rank-modal-empty {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

/* Metrics Cards Section — 3 cards on the first row, 2 equal cards filling the second */
.metrics-cards-section {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    padding: 0 20px 30px 20px;
    align-items: stretch;
}

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

.metric-info-card:nth-child(4),
.metric-info-card:nth-child(5) {
    grid-column: span 3;
}

@media (max-width: 1100px) {
    .metrics-cards-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-info-card,
    .metric-info-card:nth-child(4),
    .metric-info-card:nth-child(5) {
        grid-column: auto;
    }

    .metric-info-card:last-child {
        grid-column: 1 / -1;
    }
}

.metric-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    padding-inline: 0 15px;
}

.metric-card-title-row .metric-card-blue-header {
    margin-left: 0;
    flex: 0 1 auto;
    min-width: 0;
}

.metric-card-blue-header {
    background: var(--brand-deep);
    padding: 6px 15px;
    margin: 0;
    text-align: right;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: 0;
    border-radius: 0 0 8px 8px;
    flex-shrink: 0;
}

.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;
    flex: 1;
}

.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: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    flex-shrink: 0;
    margin: 6px 0 0;
    margin-inline-end: 4px;
    overflow: hidden;
}

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

.metric-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

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

.banner-text {
    color: var(--brand-deep);
    font-weight: 500;
}

.banner-value {
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 13px;
}

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

.metric-card-banner--inline {
    position: static;
    margin: 0;
    margin-inline-start: auto;
    width: fit-content;
    white-space: nowrap;
    flex-shrink: 0;
}

.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: var(--brand-tint);
    color: var(--brand-primary);
}

.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;
    }
}

/* هدر موبایل — فقط در breakpoint موبایل نمایش داده می‌شود */
.mobile-header {
    display: none;
}

.mobile-nav-overlay {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1100px) {
    .app-topbar-nav {
        display: none;
    }

    .app-topbar-subtitle {
        display: none;
    }
}

@media (max-width: 768px) {
    body.has-app-topbar {
        padding-top: calc(56px + env(safe-area-inset-top, 0px));
    }

    body.has-app-topbar .app-topbar {
        height: calc(56px + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
    }

    body.has-app-topbar .app-topbar-inner {
        padding: 0 12px;
        gap: 10px;
    }

    body.has-app-topbar .app-topbar .mobile-menu-toggle {
        display: inline-flex;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: var(--brand-dark);
        cursor: pointer;
    }

    body.has-app-topbar .app-topbar .mobile-menu-toggle .hamburger-line {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    body.has-app-topbar .app-topbar-logo {
        height: 32px;
        max-width: 120px;
    }

    body.has-app-topbar .app-topbar-titles {
        display: none;
    }

    body.has-app-topbar .app-topbar-username {
        display: none;
    }

    body.has-app-topbar .app-topbar-icon-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    body.has-app-topbar .app-topbar-end {
        gap: 6px;
    }

    /* پنل اطلاعیه نسبت به کل هدر تراز شود تا از لبه صفحه بیرون نزند */
    body.has-app-topbar .app-topbar-notices {
        position: static;
    }

    body.has-app-topbar .app-topbar-notices-panel {
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: min(70vh, calc(100dvh - 56px - env(safe-area-inset-top, 0px) - 24px));
        overflow-y: auto;
    }

    body.has-app-topbar .mobile-header {
        display: none !important;
    }

    /* هدر ثابت بالای صفحه */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: calc(56px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 14px 0;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
        z-index: 1100;
    }

    .mobile-header-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        min-width: 0;
        text-decoration: none;
    }

    .mobile-header-logo img {
        height: 36px;
        width: auto;
        max-width: 160px;
        object-fit: contain;
    }

    .mobile-menu-toggle {
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: var(--brand-dark);
        cursor: pointer;
        transition: background 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-toggle:active {
        background: rgba(var(--brand-primary-rgb), 0.12);
    }

    .mobile-menu-toggle .hamburger-line {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    body.mobile-menu-open .mobile-menu-toggle .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.mobile-menu-open .mobile-menu-toggle .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    body.mobile-menu-open .mobile-menu-toggle .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-header-spacer {
        flex-shrink: 0;
        width: 44px;
        height: 44px;
    }

    /* Overlay پشت منوی کشویی */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        z-index: 1150;
    }

    body.mobile-menu-open .mobile-nav-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    /* منو در موبایل: دراور کشویی از سمت راست (RTL) */
    .sidebar,
    body.has-app-topbar .sidebar {
        width: min(320px, 86vw);
        height: 100%;
        height: 100dvh;
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        bottom: auto;
        margin: 0;
        padding: 12px 14px max(16px, env(safe-area-inset-bottom));
        border-radius: 16px 0 0 16px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-right: none;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
        z-index: 1200;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(105%);
        transition: transform 0.3s ease;
        overscroll-behavior: contain;
    }

    body.mobile-menu-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-header {
        display: block;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .sidebar .logo img {
        width: 72px;
        height: auto;
        max-height: 96px;
    }

    .sidebar .user-profile {
        display: flex;
    }

    .sidebar-nav {
        margin-top: 0;
        width: 100%;
    }

    .sidebar .nav-menu {
        display: block;
        padding: 0;
        margin: 0;
    }

    .sidebar .nav-item {
        margin-bottom: 3px;
        flex-shrink: unset;
    }

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

    .sidebar .nav-link {
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        gap: 0;
        min-width: 0;
        border-radius: 8px;
    }

    .sidebar .nav-item.active .nav-link {
        background: rgba(var(--brand-primary-rgb), 0.14);
        box-shadow: none;
    }

    .sidebar .nav-icon {
        margin-left: 10px;
        margin-bottom: 0;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
    }

    .sidebar .nav-item.active .nav-icon {
        background: transparent;
    }

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

    .sidebar .nav-text {
        font-size: 13px;
        font-weight: 500;
        text-align: right;
        line-height: 1.4;
        letter-spacing: 0;
    }

    .sidebar .nav-arrow {
        display: inline;
        margin-right: auto;
    }

    /* ساب‌منو داخل دراور — مثل دسکتاپ، گسترش عمودی */
    .sidebar .nav-submenu {
        position: static;
        right: auto;
        left: auto;
        bottom: auto;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        z-index: auto;
        transition: max-height 0.25s ease-out;
    }

    .sidebar .nav-item.has-submenu.open .nav-submenu {
        max-height: 400px;
        overflow: visible;
        padding: 4px 0 4px 0;
    }

    body > .nav-submenu.nav-submenu-mobile-panel {
        display: none !important;
    }

    .sidebar .nav-submenu-link {
        padding: 8px 12px 8px 12px;
        margin-bottom: 2px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 500;
        transition: background 0.2s ease;
        white-space: normal;
        line-height: 1.45;
        overflow-wrap: break-word;
    }

    .sidebar .nav-submenu-link:hover,
    .sidebar .nav-submenu-link:active {
        background: rgba(var(--brand-primary-rgb), 0.1);
    }

    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }

    body {
        padding-bottom: 0;
        flex-direction: column;
        width: 100%;
    }

    .main-content {
        margin-right: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 12px;
        padding-top: calc(56px + env(safe-area-inset-top, 0px) + 12px);
        padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
    }

    body.has-app-topbar .main-content {
        padding-top: 15px;
    }

    body.has-mobile-bottom-nav .main-content {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    body.has-app-topbar .main-content.schematic-main {
        padding-top: 0;
        height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
    }

    body.has-mobile-bottom-nav.has-app-topbar .main-content.schematic-main {
        height: calc(100dvh - 56px - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: flex-end;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1080;
        min-height: calc(64px + env(safe-area-inset-bottom, 0px));
        padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
    }

    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        padding: 4px 2px 2px;
        text-decoration: none;
        color: #64748b;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-nav-item.is-active {
        color: var(--brand-primary);
    }

    .mobile-bottom-nav-icon {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
    }

    .mobile-bottom-nav-label {
        font-size: 10px;
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
    }

    .mobile-bottom-nav-item--profile {
        position: relative;
        top: -18px;
        z-index: 1;
        gap: 6px;
        padding-top: 0;
    }

    .mobile-bottom-nav-avatar-wrap {
        display: flex;
        width: 56px;
        height: 56px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
        border: 3px solid #fff;
        overflow: hidden;
    }

    .mobile-bottom-nav-item--profile.is-active .mobile-bottom-nav-avatar-wrap {
        border-color: var(--brand-primary);
        box-shadow: 0 8px 20px rgba(var(--brand-primary-rgb), 0.28);
    }

    .mobile-bottom-nav-avatar {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 50%;
    }

    body.mobile-menu-open .mobile-bottom-nav {
        z-index: 1100;
        pointer-events: none;
        opacity: 0.35;
    }
    
    .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 {
        grid-template-columns: 1fr;
        padding: 0 0 16px;
        gap: 12px;
    }
    
    .metric-info-card,
    .metric-info-card:nth-child(4),
    .metric-info-card:nth-child(5),
    .metric-info-card:last-child {
        grid-column: auto;
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .top-section,
    .badges-section,
    .user-summary-section {
        width: 100%;
        max-width: 100%;
    }

    .badges-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .top-cards-section {
        padding: 8px 0 16px;
        gap: 12px;
    }

    .code-row {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
    }

    .code-label {
        min-width: 0;
        width: 100%;
        text-align: center;
    }

    .code-field {
        width: 100%;
        justify-content: center;
    }

    .code-text {
        text-align: center;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .chart-tabs {
        flex-wrap: wrap;
        width: 100%;
    }

    .chart-container {
        height: 240px;
    }

    .chart-legend {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }

    .sales-followup-modal {
        padding: 0;
        align-items: stretch;
    }

    .sales-followup-dialog {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .sales-followup-head {
        padding: 14px 12px;
        gap: 10px;
        align-items: flex-start;
    }

    .sales-followup-head h2 {
        font-size: 16px;
    }

    .sales-followup-body {
        padding: 12px;
    }

    .sales-followup-board {
        min-height: 0;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .sales-followup-col {
        flex: 0 0 min(260px, 82vw);
        min-width: min(260px, 82vw);
        min-height: 360px;
    }

    .report-header,
    .packages-header,
    .register-header {
        padding: 12px 4px 16px;
        margin-bottom: 12px;
    }

    .commission-summary,
    .summary-cards-section {
        grid-template-columns: 1fr;
        padding: 0 0 16px;
        gap: 12px;
    }

    .membership-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 0 16px;
        gap: 8px;
    }

    .membership-stats .stat-card {
        padding: 10px;
        gap: 8px;
        align-items: flex-start;
        min-width: 0;
    }

    .membership-stats .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 8px;
    }

    .membership-stats .stat-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .membership-stats .stat-info {
        min-width: 0;
    }

    .membership-stats .stat-label {
        font-size: 11px;
        line-height: 1.4;
        margin-bottom: 4px;
    }

    .membership-stats .stat-value {
        font-size: 18px;
        line-height: 1.2;
    }

    .shop-form-header {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-ins-grid {
        grid-template-columns: 1fr;
    }

    .shop-chat-box-footer {
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
    }

    .shop-chat-box-input {
        min-width: 0;
        width: 100%;
    }

    .shop-chat-box-send {
        width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions .cancel-btn,
    .form-actions .save-btn {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .under-development-content {
        padding: 32px 20px;
    }

    .main-content img,
    .main-content video {
        max-width: 100%;
    }

    input,
    select,
    textarea {
        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 var(--brand-deep);
}

.info-box-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--brand-deep-rgb), 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 var(--brand-deep);
    background: linear-gradient(135deg, rgba(var(--brand-deep-rgb), 0.05) 0%, rgba(255, 255, 255, 0.7) 100%);
}

.package-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--brand-deep);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.package-badge.popular {
    background: var(--brand-primary);
}

.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(var(--brand-deep-rgb), 0.1);
    border-radius: 12px;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--brand-deep);
    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: var(--brand-deep);
    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: var(--brand-dark);
}

/* 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(var(--brand-deep-rgb), 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: var(--brand-deep);
}

.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: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 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(var(--brand-deep-rgb), 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: var(--brand-deep);
    font-weight: 700;
}

.payment-method-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--brand-primary);
    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(var(--brand-deep-rgb), 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: var(--brand-deep);
    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: var(--brand-dark);
}

.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: var(--brand-dark);
    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: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 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: var(--brand-deep);
    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: var(--brand-dark);
}

.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: var(--danger);
    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: var(--brand-primary);
    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: var(--brand-dark);
}

.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: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 0.1);
    padding: 6px 12px;
    border-radius: 8px;
}

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

.sales-table thead {
    background: rgba(var(--brand-deep-rgb), 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(var(--brand-deep-rgb), 0.05);
}

.view-image-btn {
    background: var(--brand-deep);
    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: var(--brand-dark);
}

.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: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 0.05);
    transform: translateX(-5px);
}

.month-selector-item.active {
    background: rgba(var(--brand-deep-rgb), 0.1);
    border-color: var(--brand-deep);
    box-shadow: 0 4px 12px rgba(var(--brand-deep-rgb), 0.2);
}

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

.month-selector-item.active .month-selector-name {
    color: var(--brand-deep);
}

.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: var(--brand-deep);
    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(min(250px, 100%), 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: transparent;
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.summary-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.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: var(--brand-deep);
    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(min(200px, 100%), 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: var(--brand-deep);
    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: var(--brand-tint);
    color: var(--brand-dark);
}

.month-status.good {
    background: var(--brand-tint);
    color: var(--brand-primary);
}

.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(min(200px, 100%), 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: transparent;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

.stat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.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: var(--brand-deep);
    margin: 0;
}

.commission-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 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: transparent;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

.commission-summary .summary-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.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: var(--brand-deep);
    margin: 0;
}

.status-badge.pending {
    background: rgba(var(--brand-mid-rgb), 0.12);
    color: var(--brand-primary);
    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: 'Pelak', sans-serif;
    background: white;
    transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--brand-deep);
}

.filter-group-date {
    flex: 0 1 220px;
    min-width: 180px;
}

.filter-group-actions {
    flex: 0 0 auto;
    min-width: 0;
}

.filter-action-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--brand-deep);
    color: #fff;
    font-size: 14px;
    font-family: 'Pelak', sans-serif;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.filter-action-btn-ghost {
    background: transparent;
    color: var(--brand-deep);
    border: 1px solid var(--brand-deep);
}

.shamsi-date-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.shamsi-date-wrap .filter-input,
.shamsi-date-wrap .form-input,
.shamsi-date-wrap .crm-due-date {
    width: 100%;
    padding-left: 38px;
}

.shamsi-date-cal-btn {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--brand-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    padding: 0;
}

.shamsi-date-cal-btn:hover {
    background: rgba(var(--brand-primary-rgb), 0.12);
}

.shamsi-cal {
    position: fixed;
    z-index: 2400;
    width: 292px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 12px;
    font-family: 'Pelak', sans-serif;
}

.shamsi-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.shamsi-cal-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.shamsi-cal-nav,
.shamsi-cal-today {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    font-family: inherit;
}

.shamsi-cal-nav {
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
}

.shamsi-cal-nav:hover,
.shamsi-cal-today:hover {
    border-color: var(--brand-deep);
    color: var(--brand-deep);
}

.shamsi-cal-weekdays,
.shamsi-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.shamsi-cal-weekdays span {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    padding: 4px 0;
}

.shamsi-cal-day {
    height: 34px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: #111827;
}

.shamsi-cal-day.is-empty {
    pointer-events: none;
}

.shamsi-cal-day:hover:not(.is-empty) {
    background: rgba(var(--brand-primary-rgb), 0.12);
}

.shamsi-cal-day.is-today {
    box-shadow: inset 0 0 0 1px var(--brand-deep);
}

.shamsi-cal-day.is-selected {
    background: var(--brand-deep);
    color: #fff;
}

.shamsi-cal-footer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.shamsi-cal-today {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
}

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

.membership-filter-result {
    margin: 0 0 12px 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(var(--brand-deep-rgb), 0.08);
    border: 1px solid rgba(var(--brand-deep-rgb), 0.18);
    color: var(--brand-deep);
    font-size: 14px;
    font-weight: 700;
}

.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(var(--brand-deep-rgb), 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(var(--brand-deep-rgb), 0.05);
}

.member-count {
    display: inline-block;
    background: rgba(var(--brand-deep-rgb), 0.1);
    color: var(--brand-deep);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
}

.membership-package-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.membership-package-badge {
    width: 36px;
    height: 37px;
    object-fit: contain;
    flex-shrink: 0;
}

.membership-package-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

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

.status-badge.active {
    background: var(--brand-tint);
    color: var(--brand-primary);
}

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

.status-badge.team-right {
    background: #e0f2fe;
    color: #0369a1;
}

.status-badge.team-left {
    background: #fce7f3;
    color: #9d174d;
}

.status-badge.team-outside {
    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: var(--brand-deep);
    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: var(--brand-dark);
}

.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(var(--brand-deep-rgb), 0.1);
    border-color: var(--brand-deep);
    color: var(--brand-deep);
}

.pagination-btn.active {
    background: var(--brand-deep);
    color: white;
    border-color: var(--brand-deep);
}

.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: 16px;
        padding: 0 0 24px;
    }
    
    .month-selector-section {
        position: static;
        order: -1;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .summary-cards-section {
        grid-template-columns: 1fr;
    }

    .membership-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 0 16px;
        gap: 8px;
    }
    
    .months-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-section {
        flex-direction: column;
        margin: 0 0 16px;
        padding: 14px;
    }
    
    .filter-group {
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
    }
    
    .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: 'Pelak', sans-serif;
    background: white;
    transition: border-color 0.2s;
}

.supervisor-input:focus {
    outline: none;
    border-color: var(--brand-deep);
}

.supervisor-search-btn {
    background: var(--brand-deep);
    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: var(--brand-dark);
}

.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: var(--brand-primary);
    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: var(--brand-dark);
}

.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(var(--brand-deep-rgb), 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(var(--brand-deep-rgb), 0.05);
}

.supervisor-assign-btn {
    background: var(--brand-primary);
    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: var(--brand-dark);
}

.supervisor-agent-info {
    background: rgba(var(--brand-deep-rgb), 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: var(--brand-deep);
}

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

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

.search-supervisor-btn {
    background: var(--brand-deep);
    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: var(--brand-dark);
}

.supervisor-preview-card {
    background: rgba(var(--brand-deep-rgb), 0.05);
    border: 2px solid rgba(var(--brand-deep-rgb), 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 var(--brand-deep);
    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: var(--brand-deep);
    margin-left: 5px;
}

.confirm-btn {
    background: var(--brand-primary);
    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: var(--brand-dark);
}

/* 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;
}

/* پاپ‌آپ تکمیل پروفایل پس از ورود */
.profile-complete-prompt-modal .profile-complete-prompt-content {
    max-width: 420px;
    text-align: center;
}

.profile-complete-prompt-body {
    padding-top: 20px;
}

.profile-complete-prompt-message {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.7;
}

.profile-complete-prompt-actions {
    justify-content: center;
    border-top: none;
    padding-top: 12px;
    margin-top: 16px;
}

.profile-complete-prompt-actions .save-btn {
    min-width: 160px;
}

.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: 'Pelak', sans-serif;
    background: white;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-deep);
}

.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: var(--brand-deep);
    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: var(--brand-dark);
}

/* 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: var(--brand-deep);
    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: 1280px;
    overflow-x: hidden;
}

.shop-catalog {
    max-width: none;
    margin-bottom: 28px;
}

.shop-catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
}

.shop-catalog-titles {
    min-width: 0;
    flex: 1;
}

.shop-catalog-title {
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 4px;
    line-height: 1.4;
}

.shop-catalog-subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.shop-catalog-search {
    position: relative;
    flex: 0 0 280px;
    min-width: 200px;
}

.shop-catalog-search-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
}

.shop-catalog-search input {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    color: #334155;
    outline: none;
}

.shop-catalog-search input:focus {
    border-color: rgba(var(--brand-primary-rgb), 0.45);
    box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.12);
}

.shop-ins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 12px;
    align-items: stretch;
}

.shop-ins-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px;
    text-align: center;
    color: #6b7280;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
}

.shop-ins-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 96px;
    padding: 14px 16px;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    background: #fff;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.shop-ins-card:hover {
    border-color: rgba(var(--brand-primary-rgb), 0.35);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.shop-ins-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.shop-ins-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.shop-ins-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.shop-ins-name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-ins-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-selected-insurance {
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--brand-tint);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
    color: var(--brand-deep);
    font-weight: 700;
    font-size: 14px;
}

body.shop-modal-open {
    overflow: hidden;
}

.shop-request-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.shop-request-modal[hidden] {
    display: none;
}

.shop-request-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.shop-request-modal-box {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.shop-request-modal-box .shop-form-card {
    margin: 0;
}

.shop-request-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: #f3f4f6;
    color: #64748b;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.shop-request-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.shop-layout {
    display: block;
    max-width: none;
}

.shop-requests-column {
    display: block;
}

.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 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    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: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.shop-form .form-group {
    min-width: 0;
}

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

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

.shop-form .form-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 12px;
    font-size: 14px;
}

.shop-form .form-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: #64748b;
}

.shop-combo {
    position: relative;
}

.shop-combo-input {
    padding-left: 36px;
}

.shop-combo-caret {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: #64748b;
    pointer-events: none;
}

.shop-combo.is-open .shop-combo-input {
    border-color: var(--brand-deep);
}

.shop-combo.is-open .shop-combo-caret {
    transform: translateY(-50%) rotate(180deg);
    color: var(--brand-deep);
}

.shop-combo.is-disabled .shop-combo-input {
    background: #f3f4f6;
    color: #94a3b8;
    cursor: not-allowed;
}

.shop-combo-panel {
    position: fixed;
    z-index: 1400;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    max-height: 240px;
    overflow: auto;
}

.shop-combo-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.shop-combo-option {
    padding: 8px 14px;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
}

.shop-combo-option:hover,
.shop-combo-option.is-active {
    background: var(--brand-tint);
    color: var(--brand-dark);
}

.shop-combo-option.is-selected {
    font-weight: 700;
    color: var(--brand-dark);
}

.shop-combo-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #94a3b8;
}

.shop-form .form-label .required {
    color: var(--brand-primary);
}

.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: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 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-panel {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    scroll-margin-top: 80px;
}

.shop-requests-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f6;
}

.shop-requests-title {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
}

.shop-requests-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: #f3f4f6;
}

.shop-requests-tab {
    appearance: none;
    border: none;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.shop-requests-tab.is-active {
    background: #fff;
    color: var(--brand-deep);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.shop-requests-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #334155;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.shop-requests-tab.is-active .shop-requests-count {
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.shop-requests-pane {
    min-height: 180px;
}

.shop-requests-pane[hidden] {
    display: none;
}

.shop-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 20px;
}

.shop-empty-state[hidden] {
    display: none;
}

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

.shop-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 6px 0;
}

.shop-empty-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.shop-requests-table-wrap[hidden] {
    display: none;
}

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

.shop-requests-table thead {
    background: #f3faf8;
}

.shop-requests-table th {
    padding: 10px 12px;
    text-align: right;
    font-weight: 700;
    color: #334155;
    border-bottom: 1px solid #e5e7eb;
}

.shop-requests-table td {
    padding: 10px 12px;
    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(var(--brand-deep-rgb), 0.08);
}

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

.shop-status-pending {
    background: var(--brand-tint);
    color: var(--brand-primary);
}

.shop-status-approved {
    background: var(--brand-tint);
    color: var(--brand-dark);
}

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

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

@media (max-width: 1100px) {
    .shop-requests-toolbar {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .shop-page-content {
        padding: 0 0 24px 0;
        max-width: 100%;
    }
    .shop-catalog-head {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-catalog-title {
        font-size: 18px;
    }

    .shop-catalog-search {
        min-width: 0;
        flex: 1;
    }

    .shop-ins-grid {
        grid-template-columns: 1fr;
    }

    .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(var(--brand-deep-rgb), 0.15);
    transition: color 0.2s, background 0.2s;
}

.shop-chat-back-link:hover {
    color: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 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: var(--brand-deep);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.shop-chat-not-found-btn:hover {
    background: var(--brand-dark);
}

/* چیدمان: خلاصه درخواست سمت راست | چت کنارش سمت چپ (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(var(--brand-deep-rgb), 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, var(--brand-primary) 0%, var(--brand-dark) 100%);
    color: #fff;
}

.shop-chat-btn-issue {
    background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-dark) 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, var(--brand-deep) 0%, var(--brand-dark) 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: var(--brand-primary);
    font-weight: 500;
}

.shop-chat-box-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-primary);
    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, var(--brand-deep) 0%, var(--brand-dark) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--brand-deep-rgb), 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-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

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

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

.shop-chat-reply-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.4;
    flex-shrink: 0;
}

.shop-chat-reply-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.shop-chat-msg-me .shop-chat-reply-btn {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.shop-chat-msg-me .shop-chat-reply-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.shop-chat-edit-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.4;
    flex-shrink: 0;
}

.shop-chat-edit-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.shop-chat-msg-me .shop-chat-edit-btn {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.shop-chat-msg-me .shop-chat-edit-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.shop-chat-edited {
    font-size: 10px;
    opacity: 0.8;
    margin-right: 4px;
}

.shop-chat-msg-editing .shop-chat-bubble {
    max-width: 90%;
}

.shop-chat-edit-input {
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: #fff;
    color: #0f172a;
}

.shop-chat-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-start;
}

.shop-chat-edit-actions .shop-chat-btn-save,
.shop-chat-edit-actions .shop-chat-btn-cancel {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.shop-chat-edit-actions .shop-chat-btn-save {
    background: var(--brand-deep, #0d9488);
    color: #fff;
}

.shop-chat-edit-actions .shop-chat-btn-cancel {
    background: #e2e8f0;
    color: #334155;
}

.shop-chat-quote {
    display: flex;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    margin: 0 0 6px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.06);
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    overflow: hidden;
}

.shop-chat-quote:hover {
    background: rgba(15, 23, 42, 0.1);
}

.shop-chat-quote-bar {
    width: 3px;
    flex-shrink: 0;
    background: #3b82f6;
}

.shop-chat-quote-content {
    min-width: 0;
    flex: 1;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.shop-chat-msg-me .shop-chat-quote {
    background: rgba(0, 0, 0, 0.18);
}

.shop-chat-msg-me .shop-chat-quote-bar {
    background: rgba(255, 255, 255, 0.9);
}

.shop-chat-quote-who {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.3;
}

.shop-chat-msg-me .shop-chat-quote-who {
    color: #fff;
}

.shop-chat-quote-text {
    display: block;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.shop-chat-msg-me .shop-chat-quote-text {
    color: rgba(255, 255, 255, 0.85);
}

.shop-chat-msg-highlight .shop-chat-bubble {
    animation: shop-chat-flash 1.2s ease;
}

@keyframes shop-chat-flash {
    0%, 100% { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
    20%, 60% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35); }
}

.shop-chat-reply-to-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    position: relative;
}

.shop-chat-reply-to-bar::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    right: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #3b82f6;
}

.shop-chat-reply-to-icon {
    color: #3b82f6;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-right: 4px;
}

.shop-chat-reply-to-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-right: 6px;
}

.shop-chat-reply-to-who {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.3;
}

.shop-chat-reply-to-preview {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.shop-chat-reply-to-cancel {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    flex-shrink: 0;
}

.shop-chat-reply-to-cancel:hover {
    color: #0f172a;
}

.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: var(--brand-deep);
    box-shadow: 0 0 0 3px rgba(var(--brand-deep-rgb), 0.15);
}

.shop-chat-box-send {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-dark) 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(var(--brand-deep-rgb), 0.35);
}

@media (max-width: 768px) {
    .shop-chat-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .shop-chat-summary {
        padding: 14px 16px;
    }
    .shop-chat-row {
        grid-template-columns: 72px 1fr;
        font-size: 12px;
        gap: 8px;
    }
    .shop-chat-hero-title {
        font-size: 18px;
    }

    .shop-chat-hero {
        margin-bottom: 12px;
    }

    .shop-requests-table-wrap,
    .table-container,
    #crmPeopleTableWrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .shop-requests-table,
    .sales-table,
    .membership-table,
    .agents-table {
        min-width: 560px;
    }

    body.commission-page .sales-table {
        min-width: 0;
        width: 100%;
    }
}

/* صفحه پورسانت فروش شخصی — نسخه موبایل */
@media (max-width: 768px) {
    body.commission-page .report-header {
        padding: 8px 0 12px;
        margin-bottom: 8px;
    }

    body.commission-page .report-title {
        font-size: 20px;
        line-height: 1.4;
    }

    body.commission-page .report-subtitle {
        font-size: 12px;
        line-height: 1.7;
        color: #64748b;
    }

    body.commission-page .commission-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0 0 12px;
    }

    body.commission-page .commission-summary .summary-card {
        padding: 10px;
        gap: 8px;
        align-items: flex-start;
        min-width: 0;
        border-radius: 12px;
    }

    body.commission-page .commission-summary .summary-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 8px;
    }

    body.commission-page .commission-summary .summary-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    body.commission-page .commission-summary .summary-info {
        min-width: 0;
    }

    body.commission-page .commission-summary .summary-label {
        font-size: 11px;
        margin: 0 0 4px;
        line-height: 1.4;
    }

    body.commission-page .commission-summary .summary-value {
        font-size: 13px;
        font-weight: 700;
        line-height: 1.35;
        word-break: break-word;
    }

    body.commission-page .report-layout {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 0 0 24px;
    }

    body.commission-page .month-selector-section {
        position: static;
        order: 0;
        padding: 12px;
        border-radius: 14px;
    }

    body.commission-page .selector-title {
        font-size: 13px;
        margin: 0 0 10px;
        padding-bottom: 8px;
    }

    body.commission-page .months-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 2px 2px 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    body.commission-page .month-selector-item {
        flex: 0 0 auto;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        min-width: 104px;
        padding: 8px 10px;
        gap: 4px;
        transform: none;
    }

    body.commission-page .month-selector-item:hover {
        transform: none;
    }

    body.commission-page .month-selector-name {
        font-size: 12px;
    }

    body.commission-page .month-selector-amount-wrapper {
        align-items: flex-start;
        flex-direction: row;
        gap: 4px;
        flex-wrap: wrap;
    }

    body.commission-page .month-selector-amount {
        font-size: 11px;
    }

    body.commission-page .month-selector-currency {
        font-size: 10px;
    }

    body.commission-page .report-table-section {
        padding: 14px 12px;
        border-radius: 14px;
        overflow: hidden;
    }

    body.commission-page .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    body.commission-page .table-title {
        font-size: 14px;
        line-height: 1.5;
    }

    body.commission-page .selected-month-display {
        justify-content: space-between;
    }

    body.commission-page .month-label,
    body.commission-page .month-value {
        font-size: 12px;
    }

    body.commission-page .table-container {
        overflow: visible;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        border-radius: 0;
    }

    body.commission-page .sales-table,
    body.commission-page .sales-table thead,
    body.commission-page .sales-table tbody,
    body.commission-page .sales-table tfoot,
    body.commission-page .sales-table tr,
    body.commission-page .sales-table th,
    body.commission-page .sales-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    body.commission-page .sales-table thead {
        display: none;
    }

    body.commission-page .sales-table tbody tr {
        background: #fff;
        border: 1px solid #e8eaed;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }

    body.commission-page .sales-table tbody tr:hover {
        background: #fff;
    }

    body.commission-page .sales-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 0;
        border-bottom: 1px dashed #f1f5f9;
        text-align: left;
        font-size: 13px;
        line-height: 1.5;
        color: #1f2937;
    }

    body.commission-page .sales-table td:last-child {
        border-bottom: none;
        padding-bottom: 2px;
    }

    body.commission-page .sales-table td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        max-width: 42%;
        color: #64748b;
        font-size: 11px;
        font-weight: 600;
        text-align: right;
    }

    body.commission-page .sales-table td[colspan] {
        display: block;
        text-align: center;
        padding: 18px 8px;
        color: #94a3b8;
        font-size: 12px;
        line-height: 1.8;
        border-bottom: none;
    }

    body.commission-page .sales-table td[colspan]::before {
        display: none;
    }

    body.commission-page .sales-table tfoot tr {
        background: var(--brand-tint);
        border: 1px solid rgba(var(--brand-primary-rgb), 0.22);
        border-radius: 12px;
        padding: 10px 12px;
        margin-top: 4px;
    }

    body.commission-page .sales-table tfoot td {
        border-bottom: none;
        padding: 0;
        font-size: 13px;
    }

    body.commission-page .sales-table tfoot td[colspan="2"] {
        display: none;
    }

    body.commission-page .sales-table tfoot td:first-child,
    body.commission-page .sales-table tfoot #monthTotalCell {
        display: flex;
        justify-content: space-between;
        width: auto;
    }

    body.commission-page .sales-table tfoot td:first-child {
        color: #64748b;
        font-weight: 600;
        margin-bottom: 4px;
    }

    body.commission-page .sales-table tfoot td:first-child::before,
    body.commission-page .sales-table tfoot #monthTotalCell::before {
        display: none;
    }

    body.commission-page .sales-table tfoot #monthTotalCell {
        color: var(--brand-deep);
        font-size: 15px;
        justify-content: flex-start;
    }

    body.commission-page .status-badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 11px;
        white-space: nowrap;
    }

    body.commission-page .sales-table--kv td::before {
        display: none;
    }

    body.commission-page .sales-table--kv tbody tr {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    body.commission-page .sales-table--kv td {
        width: auto;
        border-bottom: none;
        padding: 0;
    }

    body.commission-page .sales-table--kv td:first-child {
        flex: 1 1 auto;
        min-width: 0;
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
        text-align: right;
        line-height: 1.6;
    }

    body.commission-page .sales-table--kv td:last-child {
        flex: 0 1 48%;
        color: var(--brand-deep);
        font-size: 13px;
        font-weight: 700;
        text-align: left;
        line-height: 1.6;
        word-break: break-word;
    }
}

.report-layout--single {
    display: block;
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 768px) {
    body.commission-page .report-layout--single {
        padding: 0 0 24px;
    }
}

/* باشگاه مشتریان */
.customer-club-page .commission-summary {
    padding-left: 0;
    padding-right: 0;
}

.customer-club-page .filter-section {
    margin-left: 0;
    margin-right: 0;
}

.customer-club-page .shop-requests-header {
    margin: 0 0 12px;
}

.customer-club-page .membership-filter-result {
    margin: 0 0 12px 0;
}

.customer-club-page .shop-requests-title {
    font-size: 18px;
}

.customer-club-page .shop-requests-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.customer-club-page .shop-requests-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .customer-club-page .report-header {
        padding: 8px 0 12px;
        margin-bottom: 8px;
    }

    .customer-club-page .report-title {
        font-size: 20px;
        line-height: 1.4;
    }

    .customer-club-page .report-subtitle {
        font-size: 12px;
        line-height: 1.7;
    }

    .customer-club-page .commission-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0 0 12px;
        margin-bottom: 0 !important;
    }

    .customer-club-page .commission-summary .summary-card {
        padding: 12px;
        gap: 8px;
        min-width: 0;
        border-radius: 12px;
    }

    .customer-club-page .commission-summary .summary-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-radius: 8px;
    }

    .customer-club-page .commission-summary .summary-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .customer-club-page .commission-summary .summary-label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .customer-club-page .commission-summary .summary-value {
        font-size: 18px;
        line-height: 1.2;
        word-break: break-word;
    }

    .customer-club-page .filter-section {
        flex-direction: column;
        gap: 12px;
        margin: 0 0 16px;
        padding: 14px;
    }

    .customer-club-page .filter-group,
    .customer-club-page .filter-group-date {
        flex-direction: column;
        align-items: stretch;
        flex: none;
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .customer-club-page .filter-label {
        white-space: normal;
        font-size: 13px;
    }

    .customer-club-page .filter-input,
    .customer-club-page .filter-select,
    .customer-club-page .shamsi-date-wrap {
        width: 100%;
        min-width: 0;
    }

    .customer-club-page .filter-group-actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .customer-club-page .filter-action-btn {
        flex: 1;
        text-align: center;
        min-height: 44px;
    }

    .customer-club-page .shop-requests-title {
        font-size: 16px;
    }

    .customer-club-page .shop-empty-state {
        padding: 28px 16px;
    }

    .customer-club-page .shop-requests-table-wrap {
        overflow: visible;
    }

    .customer-club-page .shop-requests-table,
    .customer-club-page .shop-requests-table thead,
    .customer-club-page .shop-requests-table tbody,
    .customer-club-page .shop-requests-table th,
    .customer-club-page .shop-requests-table td,
    .customer-club-page .shop-requests-table tr {
        display: block;
        width: 100%;
    }

    .customer-club-page .shop-requests-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .customer-club-page .shop-requests-table thead {
        display: none;
    }

    .customer-club-page .shop-requests-table tbody {
        padding: 12px;
    }

    .customer-club-page .shop-requests-table tbody tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        cursor: default;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    }

    .customer-club-page .shop-requests-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .customer-club-page .shop-requests-table tbody tr:hover {
        background: #fff;
    }

    .customer-club-page .shop-requests-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px dashed #eef2f6;
        text-align: left;
        word-break: break-word;
    }

    .customer-club-page .shop-requests-table td:last-child {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .customer-club-page .shop-requests-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        flex: 0 0 42%;
        text-align: right;
    }

    .customer-club-page .shop-requests-table td[data-label="ردیف"] {
        display: none;
    }

    .shamsi-cal {
        width: min(292px, calc(100vw - 16px));
    }
}

/* توسعه شخصی */
.personal-performance-page .membership-stats,
.personal-performance-page .filter-section,
.personal-performance-page .membership-table-section {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 768px) {
    .personal-performance-page .report-header {
        padding: 8px 0 12px;
        margin-bottom: 8px;
    }

    .personal-performance-page .report-title {
        font-size: 20px;
        line-height: 1.4;
    }

    .personal-performance-page .report-subtitle {
        font-size: 12px;
        line-height: 1.7;
    }

    .personal-performance-page .membership-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0 0 12px;
    }

    .personal-performance-page .membership-stats .stat-card:first-child {
        grid-column: 1 / -1;
    }

    .personal-performance-page .filter-section {
        flex-direction: column;
        gap: 12px;
        margin: 0 0 16px;
        padding: 14px;
    }

    .personal-performance-page .filter-group,
    .personal-performance-page .filter-group-date {
        flex-direction: column;
        align-items: stretch;
        flex: none;
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .personal-performance-page .filter-label {
        white-space: normal;
        font-size: 13px;
    }

    .personal-performance-page .filter-input,
    .personal-performance-page .filter-select,
    .personal-performance-page .shamsi-date-wrap {
        width: 100%;
        min-width: 0;
    }

    .personal-performance-page .filter-group-actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .personal-performance-page .filter-action-btn {
        flex: 1;
        text-align: center;
        min-height: 44px;
    }

    .personal-performance-page .membership-table-section {
        padding: 0 0 24px;
    }

    .personal-performance-page .table-container {
        padding: 12px;
        overflow: visible;
    }

    .personal-performance-page .membership-table,
    .personal-performance-page .membership-table thead,
    .personal-performance-page .membership-table tbody,
    .personal-performance-page .membership-table th,
    .personal-performance-page .membership-table td,
    .personal-performance-page .membership-table tr {
        display: block;
        width: 100%;
    }

    .personal-performance-page .membership-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .personal-performance-page .membership-table thead {
        display: none;
    }

    .personal-performance-page .membership-table tbody tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    }

    .personal-performance-page .membership-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .personal-performance-page .membership-table tbody tr:hover {
        background: #fff;
    }

    .personal-performance-page .membership-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px dashed #eef2f6;
        text-align: left;
        word-break: break-word;
        white-space: normal;
    }

    .personal-performance-page .membership-table td:last-child {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .personal-performance-page .membership-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        flex: 0 0 42%;
        text-align: right;
    }

    .personal-performance-page .membership-table td[data-label="ردیف"] {
        display: none;
    }

    .personal-performance-page .membership-table tr.table-empty-row {
        box-shadow: none;
    }

    .personal-performance-page .membership-table tr.table-empty-row td {
        display: block;
        text-align: center;
        border-bottom: none;
        padding: 1.5rem 0.5rem;
        color: #64748b;
    }

    .personal-performance-page .membership-table tr.table-empty-row td::before {
        content: none;
    }
}

/* گزارش عضویت توسعه‌دهندگان */
.membership-report-page .membership-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.membership-report-page .membership-stats .stat-card {
    min-width: 0;
    width: 100%;
}

.membership-report-page .membership-stats,
.membership-report-page .filter-section,
.membership-report-page .membership-table-section {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 768px) {
    .membership-report-page .report-header {
        padding: 8px 0 12px;
        margin-bottom: 8px;
    }

    .membership-report-page .report-title {
        font-size: 20px;
        line-height: 1.4;
    }

    .membership-report-page .report-subtitle {
        font-size: 12px;
        line-height: 1.7;
    }

    .membership-report-page .membership-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0 0 12px;
    }

    .membership-report-page .membership-stats .stat-card:first-child {
        grid-column: 1 / -1;
    }

    .membership-report-page .filter-section {
        flex-direction: column;
        gap: 12px;
        margin: 0 0 16px;
        padding: 14px;
    }

    .membership-report-page .filter-group,
    .membership-report-page .filter-group-date {
        flex-direction: column;
        align-items: stretch;
        flex: none;
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .membership-report-page .filter-label {
        white-space: normal;
        font-size: 13px;
    }

    .membership-report-page .filter-input,
    .membership-report-page .filter-select,
    .membership-report-page .shamsi-date-wrap {
        width: 100%;
        min-width: 0;
    }

    .membership-report-page .filter-group-actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .membership-report-page .filter-action-btn {
        flex: 1;
        text-align: center;
        min-height: 44px;
    }

    .membership-report-page .membership-table-section {
        padding: 0 0 24px;
    }

    .membership-report-page .table-container {
        padding: 12px;
        overflow: visible;
    }

    .membership-report-page .membership-table,
    .membership-report-page .membership-table thead,
    .membership-report-page .membership-table tbody,
    .membership-report-page .membership-table th,
    .membership-report-page .membership-table td,
    .membership-report-page .membership-table tr {
        display: block;
        width: 100%;
    }

    .membership-report-page .membership-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .membership-report-page .membership-table thead {
        display: none;
    }

    .membership-report-page .membership-table tbody tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    }

    .membership-report-page .membership-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .membership-report-page .membership-table tbody tr:hover {
        background: #fff;
    }

    .membership-report-page .membership-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px dashed #eef2f6;
        text-align: left;
        word-break: break-word;
        white-space: normal;
    }

    .membership-report-page .membership-table td:last-child {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .membership-report-page .membership-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        flex: 0 0 42%;
        text-align: right;
    }

    .membership-report-page .membership-table td[data-label="ردیف"] {
        display: none;
    }

    .membership-report-page .membership-table tr.table-empty-row {
        box-shadow: none;
    }

    .membership-report-page .membership-table tr.table-empty-row td {
        display: block;
        text-align: center;
        border-bottom: none;
        padding: 1.5rem 0.5rem;
        color: #64748b;
    }

    .membership-report-page .membership-table tr.table-empty-row td::before {
        content: none;
    }
}

/* تیکت پشتیبانی */
.support-ticket-page .shop-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.support-ticket-page .shop-requests-header {
    margin: 0 0 12px;
}

.support-ticket-page .shop-requests-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.support-ticket-page .shop-requests-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .support-ticket-page .report-header {
        padding: 8px 0 12px;
        margin-bottom: 8px;
    }

    .support-ticket-page .report-title {
        font-size: 20px;
        line-height: 1.4;
    }

    .support-ticket-page .report-subtitle {
        font-size: 12px;
        line-height: 1.7;
    }

    .support-ticket-page .shop-page-content {
        padding: 0 0 16px;
    }

    .support-ticket-page .shop-layout {
        gap: 16px;
    }

    .support-ticket-page .shop-form-card {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .support-ticket-page .shop-form-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .support-ticket-page .shop-form-title {
        font-size: 16px;
    }

    .support-ticket-page .shop-form-desc {
        font-size: 12px;
        line-height: 1.7;
    }

    .support-ticket-page .shop-form .form-input,
    .support-ticket-page .shop-form .form-textarea {
        width: 100%;
        min-width: 0;
        font-size: 16px;
        min-height: 44px;
    }

    .support-ticket-page .shop-form .form-textarea {
        min-height: 120px;
    }

    .support-ticket-page .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
        margin-top: 14px;
    }

    .support-ticket-page .form-actions .cancel-btn,
    .support-ticket-page .form-actions .save-btn {
        width: 100%;
        min-height: 44px;
    }

    .support-ticket-page .shop-requests-title {
        font-size: 16px;
    }

    .support-ticket-page .shop-empty-state {
        padding: 28px 16px;
    }

    .support-ticket-page .shop-requests-table-wrap {
        overflow: visible;
    }

    .support-ticket-page .shop-requests-table,
    .support-ticket-page .shop-requests-table thead,
    .support-ticket-page .shop-requests-table tbody,
    .support-ticket-page .shop-requests-table th,
    .support-ticket-page .shop-requests-table td,
    .support-ticket-page .shop-requests-table tr {
        display: block;
        width: 100%;
    }

    .support-ticket-page .shop-requests-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .support-ticket-page .shop-requests-table thead {
        display: none;
    }

    .support-ticket-page .shop-requests-table tbody {
        padding: 12px;
    }

    .support-ticket-page .shop-requests-table tbody tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    }

    .support-ticket-page .shop-requests-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .support-ticket-page .shop-requests-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px dashed #eef2f6;
        text-align: left;
        word-break: break-word;
    }

    .support-ticket-page .shop-requests-table td:last-child {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .support-ticket-page .shop-requests-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        flex: 0 0 36%;
        text-align: right;
    }
}

/* Social / Instagram banners page */
.social-page [hidden] {
    display: none !important;
}

.social-page.social-modal-open {
    overflow: hidden;
}

.social-page .main-content {
    min-width: 0;
    overflow-x: hidden;
}

.social-page .report-header {
    padding: 8px 0 16px;
    margin-bottom: 0;
}

.social-page .report-title {
    font-size: 28px;
    margin-bottom: 0;
}

.social-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--brand-tint);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.22);
    border-right: 4px solid var(--brand-primary);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 24px;
}

.social-notice-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #fff;
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-notice-text {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.7;
}

.social-section-title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.social-catalog-section,
.social-orders-section {
    min-width: 0;
}

.social-orders-section {
    margin-top: 28px;
}

.social-state {
    padding: 28px 16px;
    text-align: center;
    color: #64748b;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    margin-bottom: 16px;
}

.social-state-error {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.social-card {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.social-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.social-card-media {
    aspect-ratio: 9 / 16;
    background: #e2e8f0;
    overflow: hidden;
}

.social-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.social-card-img-empty {
    min-height: 100%;
    background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
}

.social-card-story {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.social-story-bars {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.social-story-bar {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.38);
}

.social-story-bar.is-active {
    background: #fff;
}

.social-story-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}

.social-story-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28%;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}

.social-story-prev { right: 0; }
.social-story-next { left: 0; }

.social-story-viewer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.social-story-viewer.open {
    display: flex;
}

.social-story-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
}

.social-story-viewer-box {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: min(92dvh, 92vh);
    background: #0f172a;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.social-story-viewer-box .social-story-bars {
    top: 52px;
}

.social-story-viewer-close {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.social-story-viewer-title {
    position: absolute;
    top: 14px;
    right: 16px;
    left: 56px;
    z-index: 3;
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-story-viewer-media {
    aspect-ratio: 9 / 16;
    background: #111827;
}

.social-story-viewer-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.social-story-viewer-count {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    z-index: 3;
}

.social-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.social-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.social-card-desc {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.social-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.social-card-price {
    font-weight: 800;
    color: var(--brand-primary);
    font-size: 0.92rem;
    min-width: 0;
}

.social-card-price span {
    font-weight: 600;
    font-size: 0.75rem;
    color: #64748b;
}

.social-card-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.social-card-btn:hover {
    opacity: 0.94;
}

.social-orders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-order {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    display: grid;
    gap: 10px;
    min-width: 0;
}

.social-order-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.social-order-title {
    font-size: 0.98rem;
    color: #0f172a;
    min-width: 0;
    word-break: break-word;
}

.social-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    color: #334155;
    flex-shrink: 0;
}

.social-badge-pending { background: #fef3c7; color: #92400e; }
.social-badge-approved { background: #dbeafe; color: #1e40af; }
.social-badge-completed { background: #d1fae5; color: #065f46; }
.social-badge-rejected { background: #fee2e2; color: #991b1b; }

.social-order-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}

.social-order-meta > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.social-order-meta span {
    font-size: 11px;
    color: #94a3b8;
}

.social-order-meta strong {
    font-size: 13px;
    color: #334155;
    word-break: break-word;
}

.social-order-note {
    margin: 0;
    color: #b91c1c;
    font-size: 12px;
    line-height: 1.6;
    background: #fef2f2;
    border-radius: 8px;
    padding: 8px 10px;
}

.social-order-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-order-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand-deep);
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
}

.social-order-link:hover {
    background: rgba(var(--brand-primary-rgb), 0.18);
}

.social-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.social-modal.open {
    display: flex;
}

.social-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.social-modal-box {
    position: relative;
    background: #fff;
    border-radius: 18px;
    width: min(480px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 24px 22px 20px;
    z-index: 1;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    -webkit-overflow-scrolling: touch;
}

.social-modal-close {
    position: absolute;
    top: 10px;
    left: 12px;
    border: none;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.social-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.social-modal-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    padding-left: 40px;
}

.social-modal-design {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.social-form-group {
    margin-bottom: 12px;
}

.social-form-group > label:not(.social-file-label) {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #334155;
}

.social-form-group input[type="text"],
.social-form-group input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    background: #fff;
}

.social-form-group input:focus {
    outline: none;
    border-color: rgba(var(--brand-primary-rgb), 0.5);
    box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.12);
}

.social-discount-row {
    display: flex;
    gap: 8px;
}

.social-discount-row input {
    flex: 1;
    min-width: 0;
}

.social-price-box,
.social-payment {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.social-price-box > div,
.social-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13px;
}

.social-price-box > div:last-child,
.social-payment-row:last-child {
    margin-bottom: 0;
}

.social-price-payable strong {
    color: var(--brand-primary);
    font-size: 15px;
}

.social-payment {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.social-payment-title {
    margin: 0 0 8px;
    font-weight: 700;
    color: #047857;
}

.social-payment-row span:first-child {
    color: #047857;
    flex-shrink: 0;
}

.social-payment-value {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.social-payment-row strong {
    direction: ltr;
    text-align: left;
    word-break: break-all;
    font-size: 13px;
}

.social-copy-btn {
    flex-shrink: 0;
    border: 1px solid #6ee7b7;
    background: #fff;
    color: #047857;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.social-copy-btn:hover {
    background: #d1fae5;
}

.social-copy-btn.is-copied {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.social-copy-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.social-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.social-receipt-wrap {
    position: relative;
}

.social-file-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    word-break: break-word;
}

.social-file-label:hover {
    border-color: var(--brand-primary);
    background: var(--brand-tint);
}

.social-hint {
    font-size: 12px;
    color: #64748b;
    margin: 6px 0 0;
    line-height: 1.6;
}

.social-free-hint {
    color: #065f46;
    background: #ecfdf5;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.social-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.social-btn-primary,
.social-btn-secondary {
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}

.social-btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
    color: #fff;
}

.social-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.social-btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

@media (max-width: 1200px) {
    .social-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .social-page .report-header {
        padding: 4px 0 10px;
    }

    .social-page .report-title {
        font-size: 20px;
        line-height: 1.4;
    }

    .social-notice {
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .social-notice-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .social-notice-text {
        font-size: 13px;
        line-height: 1.8;
    }

    .social-section-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .social-orders-section {
        margin-top: 20px;
        padding-bottom: 12px;
    }

    .social-state {
        padding: 20px 12px;
        border-radius: 12px;
        font-size: 13px;
    }

    .social-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .social-card {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    }

    .social-card:hover {
        transform: none;
    }

    .social-card-body {
        padding: 10px;
        gap: 6px;
    }

    .social-card-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .social-card-desc {
        display: none;
    }

    .social-card-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .social-card-btn {
        width: 100%;
        min-height: 40px;
        padding: 8px 10px;
    }

    .social-order {
        padding: 12px;
        border-radius: 12px;
    }

    .social-order-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-order-meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .social-order-meta > div {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 8px;
        border-bottom: 1px dashed #eef2f6;
    }

    .social-order-meta > div:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .social-order-links {
        flex-direction: column;
    }

    .social-order-link {
        justify-content: center;
        min-height: 40px;
    }

    .social-modal {
        padding: 0;
        align-items: flex-end;
    }

    .social-modal-box {
        width: 100%;
        max-height: min(92dvh, 92vh);
        border-radius: 20px 20px 0 0;
        padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .social-discount-row {
        flex-direction: column;
    }

    .social-discount-row .social-btn-secondary {
        width: 100%;
    }

    .social-payment-row,
    .social-price-box > div {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .social-payment-value {
        width: 100%;
        justify-content: space-between;
    }

    .social-modal-actions {
        flex-direction: column-reverse;
        position: sticky;
        bottom: 0;
        background: #fff;
        padding-top: 10px;
    }

    .social-btn-primary,
    .social-btn-secondary {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .social-grid {
        gap: 8px;
    }

    .social-card-title {
        font-size: 12px;
    }

    .social-card-price {
        font-size: 0.82rem;
    }
}

/* ---------- Shared app alert / confirm dialog ---------- */
body.app-dialog-open {
    overflow: hidden;
}

.app-dialog {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.app-dialog[hidden] {
    display: none !important;
}

.app-dialog.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.app-dialog-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 28px 24px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    text-align: center;
    transform: translateY(12px) scale(0.97);
    transition: transform 0.24s ease;
}

.app-dialog.open .app-dialog-box {
    transform: translateY(0) scale(1);
}

.app-dialog-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    background: var(--brand-tint);
}

.app-dialog-icon svg {
    width: 28px;
    height: 28px;
}

.app-dialog[data-type="success"] .app-dialog-icon {
    color: var(--brand-deep);
    background: var(--brand-tint);
}

.app-dialog[data-type="error"] .app-dialog-icon {
    color: var(--danger);
    background: var(--danger-tint);
}

.app-dialog[data-type="warning"] .app-dialog-icon,
.app-dialog[data-type="confirm"] .app-dialog-icon {
    color: #b45309;
    background: #fff7ed;
}

.app-dialog-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}

.app-dialog-message {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.8;
    color: #4b5563;
    white-space: pre-line;
}

.app-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.app-dialog-btn {
    min-width: 110px;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.app-dialog-btn:active {
    transform: translateY(1px);
}

.app-dialog-btn-ok {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(var(--brand-primary-rgb), 0.28);
}

.app-dialog-btn-ok:hover {
    background: var(--brand-deep);
}

.app-dialog-btn-ok.is-danger {
    background: var(--danger);
    box-shadow: 0 8px 18px rgba(var(--danger-rgb), 0.28);
}

.app-dialog-btn-ok.is-danger:hover {
    background: var(--danger-deep);
}

.app-dialog-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

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

.app-dialog:not(.is-confirm) .app-dialog-btn-cancel {
    display: none;
}

@media (max-width: 480px) {
    .app-dialog {
        padding: 14px;
        align-items: flex-end;
    }

    .app-dialog-box {
        max-width: none;
        border-radius: 18px 18px 14px 14px;
        padding: 24px 18px 18px;
    }

    .app-dialog-actions {
        flex-direction: column-reverse;
    }

    .app-dialog-btn {
        width: 100%;
    }
}

/* ========== بانک مستندات ========== */
.issuance-forms-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 0 40px;
}

.issuance-form-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.issuance-form-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 0.1);
}

.issuance-form-body {
    flex: 1;
    min-width: 0;
}

.issuance-form-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #64748b;
}

.issuance-form-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 0.12);
    border: 1px solid rgba(var(--brand-deep-rgb), 0.18);
}

.issuance-form-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.issuance-form-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
    color: #4b5563;
}

.issuance-form-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex-shrink: 0;
    min-width: 148px;
}

.issuance-form-download,
.issuance-form-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.issuance-form-download {
    background: var(--brand-deep);
    color: #fff;
    box-shadow: 0 8px 16px rgba(var(--brand-deep-rgb), 0.22);
}

.issuance-form-download:hover {
    background: var(--brand-dark);
}

.issuance-form-download[aria-busy="true"] {
    opacity: 0.7;
    pointer-events: none;
}

.issuance-form-view {
    background: rgba(var(--brand-deep-rgb), 0.08);
    color: var(--brand-deep);
    border: 1px solid rgba(var(--brand-deep-rgb), 0.18);
}

.issuance-form-view:hover {
    background: rgba(var(--brand-deep-rgb), 0.14);
}

@media (max-width: 768px) {
    .issuance-forms-page .report-header {
        padding: 8px 0 12px;
        margin-bottom: 8px;
    }

    .issuance-forms-page .report-title {
        font-size: 20px;
        line-height: 1.4;
    }

    .issuance-forms-page .report-subtitle {
        font-size: 12px;
        line-height: 1.7;
    }

    .issuance-form-card {
        flex-direction: column;
        padding: 18px 16px;
        gap: 14px;
    }

    .issuance-form-actions {
        width: 100%;
        min-width: 0;
    }

    .issuance-form-download,
    .issuance-form-view {
        width: 100%;
    }
}

/* ========== لغو همکاری ========== */
.cancel-cooperation-page .shop-page-content {
    padding: 0 0 40px;
    max-width: 760px;
}

.cancel-cooperation-page [hidden] {
    display: none !important;
}

.cancel-state-card,
.cancel-result-card {
    max-width: 760px;
}

.cancel-state-text {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.cancel-notice {
    margin: 8px 0 18px;
    padding: 16px 18px;
    background: rgba(var(--brand-primary-rgb), 0.08);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.18);
    border-radius: 12px;
    color: #334155;
}

.cancel-notice-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.cancel-notice p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.9;
}

.cancel-notice p:last-child {
    margin-bottom: 0;
}

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

.cancel-reason-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.cancel-reason-option:hover {
    border-color: rgba(var(--brand-primary-rgb), 0.4);
}

.cancel-reason-option:has(input:checked),
.cancel-reason-option.is-selected {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), 0.08);
}

.cancel-reason-option input {
    margin-top: 3px;
    accent-color: var(--brand-primary);
}

.cancel-reason-index {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-deep);
    background: rgba(var(--brand-deep-rgb), 0.12);
}

.cancel-reason-text {
    font-size: 14px;
    line-height: 1.7;
    color: #1f2937;
}

.cancel-pending-meta {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #334155;
}

.cancel-pending-meta p {
    margin: 0;
}

.cancel-return-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.cancel-return-row .form-input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .cancel-cooperation-page .shop-form-card {
        padding: 16px 14px;
    }

    .cancel-cooperation-page .shop-form .form-row {
        grid-template-columns: 1fr;
    }

    .cancel-return-row {
        flex-direction: column;
        align-items: stretch;
    }
}

