/* =====================================================
   فونت‌ها و متغیرها
===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,800;0,900;1,700&family=Montserrat:wght@300;400;600;700;800;900&family=Orbitron:wght@400;700;900&family=Yekan+Bakh:wght@300;400;700;900&family=Poppins:wght@300;400;600;700;900&family=Cinzel+Decorative:wght@400;700;900&family=Pirata+One&display=swap');

@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
}
@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0a1628;
    --primary-dark: #060e1a;
    --gold: #d4a847;
    --gold-light: #f0d080;
    --white: #ffffff;
    --white-soft: #f0f2f8;
    --gray-light: #e8ecf5;
    --gray-mid: #a8b2c8;
    --text-dark: #0a1628;
    --text-soft: #2a3a5a;
    --text-light: #7a8aa8;
    --shadow-soft: 0 8px 40px rgba(10, 22, 40, 0.06);
    --shadow-medium: 0 12px 50px rgba(10, 22, 40, 0.10);
    --shadow-deep: 0 25px 70px rgba(10, 22, 40, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: rgba(10, 22, 40, 0.04); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--gold), var(--primary)); border-radius: 10px; }

::selection { background: var(--gold); color: var(--white); }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Vazir', 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
    background: var(--white-soft);
    background-image: radial-gradient(circle at 0% 0%, rgba(10, 22, 40, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(212, 168, 71, 0.04) 0%, transparent 40%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 80px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}
body.loaded { opacity: 1; }

/* انیمیشن‌ها */
@keyframes fadeInUp { 0% { opacity:0; transform:translateY(40px) scale(0.97); } 100% { opacity:1; transform:translateY(0) scale(1); } }
@keyframes fadeInScale { 0% { opacity:0; transform:scale(0.92); } 100% { opacity:1; transform:scale(1); } }
@keyframes heartBeat { 0%,100% { transform:scale(1); } 50% { transform:scale(1.3); } }
@keyframes progressShrink { 0% { width:100%; } 100% { width:0%; } }
@keyframes notifIn { 0% { opacity:0; transform:translateX(-50px) scale(0.95); } 100% { opacity:1; transform:translateX(0) scale(1); } }
@keyframes notifOut { 0% { opacity:1; transform:translateX(0) scale(1); } 100% { opacity:0; transform:translateX(-50px) scale(0.95); } }
@keyframes modalIn { 0% { opacity:0; transform:scale(0.92) translateY(40px); } 100% { opacity:1; transform:scale(1) translateY(0); } }
@keyframes blinkSeparator { 0%,100% { opacity:0.4; } 50% { opacity:0.1; } }
@keyframes starSpin { 0% { transform:rotate(0deg) scale(1); } 50% { transform:rotate(180deg) scale(1.2); } 100% { transform:rotate(360deg) scale(1); } }
@keyframes glowPulse { 0%,100% { box-shadow:0 0 20px rgba(212,168,71,0.1); } 50% { box-shadow:0 0 40px rgba(212,168,71,0.25); } }
@keyframes float { 0% { transform:translateY(0); } 50% { transform:translateY(-8px); } 100% { transform:translateY(0); } }
@keyframes shake { 0%,100% { transform:translateX(0); } 10%,30%,50%,70%,90% { transform:translateX(-3px); } 20%,40%,60%,80% { transform:translateX(3px); } }
@keyframes pulse { 0% { transform:scale(1); box-shadow:0 0 0 0 rgba(10,22,40,0.1); } 70% { transform:scale(1.03); box-shadow:0 0 0 8px rgba(10,22,40,0); } 100% { transform:scale(1); box-shadow:0 0 0 0 rgba(10,22,40,0); } }
@keyframes bounceIn { 0% { opacity:0; transform:scale(0.3) translateY(-100px); } 50% { opacity:1; transform:scale(1.05) translateY(10px); } 70% { transform:scale(0.95) translateY(-5px); } 100% { opacity:1; transform:scale(1) translateY(0); } }
@keyframes rotateIn { 0% { opacity:0; transform:rotate(-180deg) scale(0.5); } 100% { opacity:1; transform:rotate(0deg) scale(1); } }

/* =====================================================
   هدر و لوگو
===================================================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    border-bottom: 2px solid rgba(212, 168, 71, 0.15);
    box-shadow: 0 4px 50px rgba(10, 22, 40, 0.04);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    position: relative;
}

.topbar-actions {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-logo {
    font-family: 'Cinzel Decorative', 'Pirata One', 'Playfair Display', serif;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #0a1628 20%, #d4a847 50%, #8b5e3c 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    animation: logoGlow 3s ease-in-out infinite, float 3s ease-in-out infinite;
    user-select: none;
    text-shadow: 0 0 30px rgba(212, 168, 71, 0.3);
    transition: transform 0.3s ease;
}
.brand-logo:hover {
    animation: logoGlow 1.5s ease-in-out infinite, pulse 0.8s ease infinite;
    transform: scale(1.02);
}
@keyframes logoGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(212, 168, 71, 0.3), 0 0 40px rgba(212, 168, 71, 0.1); }
    50% { text-shadow: 0 0 40px rgba(212, 168, 71, 0.6), 0 0 80px rgba(212, 168, 71, 0.25); }
}

.primary-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-weight: 700;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 25px rgba(10, 22, 40, 0.12);
}
.primary-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 40px rgba(10, 22, 40, 0.18);
}
.primary-button:active { transform: translateY(0px) scale(0.97); }

.finance-link {
    background: transparent;
    color: var(--primary);
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    border: 2px solid var(--primary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.finance-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.site-footer {
    margin-top: 60px;
    padding: 28px 0 18px;
    border-top: 2px solid rgba(10, 22, 40, 0.05);
    text-align: center;
}
.site-footer .brand {
    font-family: 'Cinzel Decorative', 'Pirata One', serif;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(212, 168, 71, 0.2);
}
.site-footer .sub {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
    font-weight: 400;
    letter-spacing: 1px;
}
.site-footer .sub .heart {
    color: #e74c3c;
    display: inline-block;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 25px;
    padding-bottom: 90px;
}
.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 22px;
    align-items: stretch;
}
.map-card, .customer-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(10, 22, 40, 0.05);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.map-card:hover, .customer-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px) scale(1.01);
}
.card-title {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(10, 22, 40, 0.04);
}
.card-title .club-title {
    font-family: 'Yekan Bakh', 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}
.card-title .club-title .star {
    color: var(--gold);
    display: inline-block;
    animation: starSpin 6s linear infinite;
}
.card-title .club-sub {
    display: block;
    font-size: 10px;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 2px;
}
.card-title .club-sub .dot { color: var(--gold); font-weight: 700; }
.customer-count {
    background: rgba(10, 22, 40, 0.04);
    border: 1px solid rgba(10, 22, 40, 0.06);
    border-radius: 30px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Orbitron', 'Vazir', monospace;
}

#map {
    width: 100%;
    height: 620px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f0f2f8 !important;
}
.leaflet-container { background: #f0f2f8 !important; }
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(10, 22, 40, 0.06) !important;
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.10) !important;
    padding: 2px;
}
.leaflet-popup-content {
    font-size: 11px !important;
    line-height: 1.6;
    margin: 8px 10px;
}
.leaflet-popup-content strong { color: #d4a847 !important; }
.leaflet-control-zoom {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(10, 22, 40, 0.08) !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.8) !important;
}
.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    color: #0a1628 !important;
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
}
.leaflet-control-zoom a:hover {
    background: #0a1628 !important;
    color: #ffffff !important;
}
.leaflet-control-custom {
    animation: float 2.5s ease-in-out infinite;
}
.customer-marker.selected {
    animation: selectedPulse 1.6s ease-in-out infinite;
    will-change: transform;
}
@keyframes selectedPulse {
    0%, 100% { transform: rotate(-45deg) scale(1); }
    50% { transform: rotate(-45deg) scale(1.08); }
}
.location-help {
    padding: 14px 22px;
    font-size: 13px;
    color: var(--text-light);
    background: rgba(10, 22, 40, 0.02);
    border-top: 1px solid rgba(10, 22, 40, 0.04);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
}
.location-help::before { content: '📍 '; }

.customer-card {
    padding: 0;
}
.empty-customer {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}
.empty-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.03);
    border-radius: 50%;
    font-size: 42px;
    border: 2px dashed rgba(10, 22, 40, 0.06);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}
.empty-customer h2 { color: var(--primary); font-size: 22px; }
.empty-customer p {
    max-width: 280px;
    line-height: 1.8;
    font-size: 13px;
    color: var(--text-light);
}
.customer-details {
    padding: 24px;
    animation: fadeInScale 0.4s ease;
}
.customer-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(10, 22, 40, 0.04);
}
.large-customer-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(10, 22, 40, 0.04);
    border: 2px solid rgba(212, 168, 71, 0.1);
    font-size: 30px;
}
.customer-top h2 { font-size: 22px; font-weight: 700; color: var(--primary); }
.customer-top p { margin: 2px 0 0; color: var(--text-light); font-size: 12px; }
.detail-list { padding: 16px 0; }
.detail-row {
    padding: 12px 0;
    border-bottom: 1px solid rgba(10, 22, 40, 0.04);
}
.detail-row span {
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.detail-row strong {
    display: block;
    margin-top: 4px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}
.customer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.edit-button {
    background: transparent;
    color: var(--primary);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.edit-button:hover { background: var(--primary); color: white; transform: translateY(-3px); }
.delete-button {
    background: transparent;
    color: #b03a3a;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 2px solid #b03a3a;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.delete-button:hover { background: #b03a3a; color: white; transform: translateY(-3px); }

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(10, 22, 40, 0.4);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.show { display: flex; }
.modal.show .modal-box { animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.modal-box {
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-deep);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(10, 22, 40, 0.04);
    padding-bottom: 16px;
}
.modal-header h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--primary); }
.modal-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 22, 40, 0.03);
    border: 1px solid rgba(10, 22, 40, 0.06);
    color: var(--text-light);
    font-size: 26px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--primary); color: white; transform: rotate(90deg); }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 6px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--white);
    border: 2px solid rgba(10, 22, 40, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(10, 22, 40, 0.04);
    transform: translateY(-1px);
}
.form-group textarea { min-height: 80px; resize: vertical; }

.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.type-option {
    background: var(--white);
    border: 2px solid rgba(10, 22, 40, 0.06);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
}
.type-option:hover { border-color: var(--primary); transform: translateY(-3px); }
.type-option input { display: none; }
.type-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(10, 22, 40, 0.02);
}
.type-option span { font-size: 28px; display: block; }

.status-check-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: rgba(10, 22, 40, 0.02);
    border-radius: 14px;
}
.status-check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.3s ease;
}
.status-check-item:hover { background: rgba(10, 22, 40, 0.04); }
.status-check-item input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); }
.status-check-item .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.active { background: #34d399; }
.dot.identified { background: #fde68a; }
.dot.no-cooperation { background: #f9fafb; }

.location-box {
    border: 1px solid rgba(10, 22, 40, 0.06);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.location-button {
    background: transparent;
    color: var(--primary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary);
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s ease;
}
.location-button:hover { background: var(--primary); color: white; }

.clear-location-btn {
    background: transparent;
    color: #b03a3a;
    border: 1px solid #b03a3a;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 4px;
}
.clear-location-btn:hover {
    background: #b03a3a;
    color: white;
}

.save-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 30px rgba(10, 22, 40, 0.08);
    margin-top: 16px;
}
.save-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(10, 22, 40, 0.15);
}

.notification-container {
    position: fixed;
    top: 90px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    width: 100%;
    direction: rtl;
    pointer-events: none;
}
.notification {
    pointer-events: auto;
    padding: 16px 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(10, 22, 40, 0.06);
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.12);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: notifIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}
.notification.hiding { animation: notifOut 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.notification.success { border-right: 5px solid #22c55e; background: linear-gradient(135deg, #f0fdf4, #ffffff); }
.notification.success .notif-icon { color: #22c55e; }
.notification.error { border-right: 5px solid #ef4444; background: linear-gradient(135deg, #fef2f2, #ffffff); }
.notification.error .notif-icon { color: #ef4444; }
.notification.warning { border-right: 5px solid #f59e0b; background: linear-gradient(135deg, #fffbeb, #ffffff); }
.notification.warning .notif-icon { color: #f59e0b; }
.notification.info { border-right: 5px solid var(--primary); background: linear-gradient(135deg, #f8fafc, #ffffff); }
.notification.info .notif-icon { color: var(--primary); }
.notification .notif-icon { font-size: 28px; flex-shrink: 0; width: 40px; text-align: center; }
.notification .notif-content { flex: 1; min-width: 0; }
.notification .notif-title { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.notification .notif-message { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.notification .notif-close { background: none; border: none; font-size: 20px; color: var(--text-light); cursor: pointer; padding: 0 4px; border-radius: 6px; transition: all 0.3s ease; flex-shrink: 0; line-height: 1; }
.notification .notif-close:hover { background: rgba(0, 0, 0, 0.04); color: var(--text-dark); }
.notification .notif-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(10, 22, 40, 0.06); overflow: hidden; }
.notification .notif-progress .bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); animation: progressShrink 4s linear forwards; }
.notification.success .notif-progress .bar { background: linear-gradient(90deg, #22c55e, #86efac); }
.notification.error .notif-progress .bar { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.notification.warning .notif-progress .bar { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.notification.info .notif-progress .bar { background: linear-gradient(90deg, var(--primary), var(--gold)); }

/* =====================================================
   مودال تأیید (جایگزین confirm)
===================================================== */
.confirm-modal .modal-box {
    max-width: 400px;
    text-align: center;
}
.confirm-modal .confirm-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}
.confirm-modal h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 10px;
}
.confirm-modal p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}
.confirm-modal .confirm-actions {
    display: flex;
    gap: 10px;
}
.confirm-modal .confirm-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.confirm-modal .confirm-actions .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}
.confirm-modal .confirm-actions .btn-cancel:hover {
    background: #e5e7eb;
}
.confirm-modal .confirm-actions .btn-danger {
    background: #ef4444;
    color: white;
}
.confirm-modal .confirm-actions .btn-danger:hover {
    background: #dc2626;
}

/* =====================================================
   سایر استایل‌ها
===================================================== */
.invoice-management-section { margin-top: 18px; border-top: 1px solid rgba(10, 22, 40, 0.04); padding-top: 18px; }
.invoice-item-row {
    display: grid;
    grid-template-columns: 2fr 0.8fr 1.2fr 1.2fr auto;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    animation: fadeInUp 0.3s ease;
}
.invoice-item-row input {
    padding: 6px 8px;                    /* کوچک‌تر */
    background: var(--white);
    border: 1px solid rgba(10, 22, 40, 0.08);
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;                     /* فونت کوچک‌تر */
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
}
.invoice-item-row input::placeholder {
    font-size: 10px;                     /* placeholder ریز */
    color: #a0a8b5;
}
.invoice-item-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 22, 40, 0.04); }
.invoice-item-total {
    padding: 10px;
    background: rgba(10, 22, 40, 0.02);
    border: 1px solid rgba(10, 22, 40, 0.06);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
}
.remove-invoice-item {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: #b03a3a;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}
.remove-invoice-item:hover { background: rgba(176, 58, 58, 0.06); transform: scale(1.05); }
.invoice-modal-box { max-width: 800px; }
.invoice-customer-name { background: rgba(10, 22, 40, 0.02); border: 1px solid rgba(10, 22, 40, 0.06); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; }
.invoice-customer-name span { display: block; color: var(--text-light); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; }
.invoice-customer-name strong { font-size: 20px; font-weight: 700; font-family: 'Yekan Bakh', 'Playfair Display', serif; color: var(--primary); }
.invoice-items-section { background: rgba(10, 22, 40, 0.01); border: 1px solid rgba(10, 22, 40, 0.04); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.invoice-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.invoice-section-header strong { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.add-item-button { background: transparent; color: var(--primary); border: 2px solid var(--primary); border-radius: var(--radius-sm); padding: 8px 16px; font-weight: 700; font-size: 12px; cursor: pointer; transition: all 0.3s ease; }
.add-item-button:hover { background: var(--primary); color: white; }
.invoice-summary { background: rgba(10, 22, 40, 0.01); border: 1px solid rgba(10, 22, 40, 0.04); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.invoice-summary > div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.invoice-summary span { color: var(--text-light); font-size: 13px; }
.invoice-summary strong { color: var(--text-dark); font-size: 15px; }
.invoice-summary input { width: 140px; padding: 8px 12px; border: 2px solid rgba(10, 22, 40, 0.06); border-radius: var(--radius-sm); font-family: 'Montserrat', sans-serif; font-size: 13px; }
.invoice-total { border-top: 1px solid rgba(10, 22, 40, 0.06); margin-top: 6px; padding-top: 12px !important; }
.invoice-total span { color: var(--primary) !important; font-weight: 700; }
.invoice-total strong { color: var(--primary) !important; font-size: 22px !important; font-family: 'Orbitron', 'Vazir', monospace !important; }
.invoice-status-box { margin-top: 16px; padding: 14px; border: 1px solid rgba(10, 22, 40, 0.04); border-radius: 14px; background: rgba(10, 22, 40, 0.01); }
.invoice-status-box > label { font-weight: 700; display: block; margin-bottom: 10px; font-size: 13px; color: var(--text-dark); }
.invoice-status-box .status-row { display: flex; gap: 20px; flex-wrap: wrap; }
.invoice-status-box .status-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-light); }
.invoice-status-box .status-row label input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }
.invoice-status-box .status-row small { color: var(--text-light); font-size: 11px; }

.hamburger-menu {
    position: relative;
    z-index: 2000;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #e7e9ee;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}
.hamburger-menu:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(10, 22, 40, 0.08); }
.hamburger-menu span {
    display: block;
    width: 22px;
    height: 2px;
    background: #0a1628;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger-menu.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger-menu.open span:nth-child(2) { opacity: 0; }
.hamburger-menu.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.export-modal-box { max-width: 500px !important; }
.export-options { display: flex; flex-direction: column; gap: 10px; }
.export-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid rgba(10, 22, 40, 0.06);
    border-radius: 14px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Montserrat', sans-serif;
    text-align: right;
    width: 100%;
    justify-content: flex-start;
}
.export-option:hover {
    border-color: var(--primary);
    background: rgba(10, 22, 40, 0.02);
    transform: translateX(-6px) scale(1.01);
    box-shadow: var(--shadow-soft);
}
.export-option:active { transform: scale(0.97); }
.export-option .export-icon {
    display: block;
    width: 24px;
    text-align: center;
    font-size: 20px;
    filter: none;
    opacity: 1;
    margin-left: 8px;
    transition: transform 0.3s ease;
}
.export-option:hover .export-icon {
    transform: scale(1.2);
}
.export-option div { flex: 1; }
.export-option strong { display: block; font-size: 15px; color: var(--text-dark); font-weight: 700; }
.export-option span { font-size: 12px; color: var(--text-light); font-weight: 300; display: none; }

.customers-list-section {
    margin-top: 30px;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    border: 1px solid rgba(10, 22, 40, 0.06);
    overflow: hidden;
    min-height: 200px;
}
.customers-list-title {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #0a1628;
    margin-bottom: 20px;
    font-family: 'Yekan Bakh', 'Playfair Display', serif;
}
.customers-list-container {
    height: auto;
    overflow-y: visible;
    padding: 0 20px;
    scroll-behavior: auto;
    scroll-snap-type: none;
    direction: rtl;
}
.customer-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #7a8aa8;
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    opacity: 0.6;
    transform: scale(0.95);
    border-bottom: 1px solid rgba(10, 22, 40, 0.04);
}
.customer-list-item.active {
    color: #0a1628;
    opacity: 1;
    transform: scale(1);
    font-weight: 800;
}
.customer-list-item .mini-icon { font-size: 20px; }
.customer-list-item .list-customer-name { flex: 1; }
.customer-list-item .list-customer-phone { font-size: 13px; color: #999; }
.no-location-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 14px;
    color: #ccc;
    filter: grayscale(1);
    opacity: 0.6;
}

.location-modal .modal-box {
    max-width: 600px;
    padding: 0;
    overflow: hidden;
}
.location-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(10, 22, 40, 0.06);
    margin: 0;
}
.location-modal #locationMap {
    height: 350px;
    width: 100%;
}
#locationConfirm {
    display: none;
    padding: 15px 20px;
    background: rgba(10, 22, 40, 0.02);
    border-top: 1px solid rgba(10, 22, 40, 0.06);
    text-align: center;
    direction: rtl;
}
#locationConfirm p {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}
#locationConfirm .confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
#locationConfirm .confirm-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}
#locationConfirm .btn-confirm-yes { background: #16a34a; color: white; }
#locationConfirm .btn-confirm-yes:hover { background: #15803d; }
#locationConfirm .btn-confirm-no { background: #dc2626; color: white; }
#locationConfirm .btn-confirm-no:hover { background: #b91c1c; }

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    border-radius: 50px;
    border: 1px solid rgba(10, 22, 40, 0.08);
    box-shadow: 0 8px 40px rgba(10, 22, 40, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
    gap: 4px;
    max-width: 500px;
    width: auto;
    animation: bottomNavIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bottom-nav:hover {
    transform: translateX(-50%) scale(1.03);
    box-shadow: 0 12px 40px rgba(10,22,40,0.18);
}
@keyframes bottomNavIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(30px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 30px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Vazir', 'Montserrat', sans-serif;
    position: relative;
}
.bottom-nav .nav-item:hover {
    color: var(--primary);
    background: rgba(10, 22, 40, 0.04);
}
.bottom-nav .nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 15px rgba(10, 22, 40, 0.25);
}

/* =====================================================
   ریسپانسیو و اصلاحات موبایل
===================================================== */
@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .page {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    input, textarea, select {
        font-size: 16px !important;
    }
    body {
        overflow-x: hidden;
    }
    .topbar { padding: 12px 15px; }
    .brand-logo { font-size: 28px; }
    .topbar-actions { left: 15px; }
    .primary-button, .finance-link { font-size: 11px; padding: 10px 16px; }
    .page { padding: 0 10px; }
    .map-card { min-height: 350px; height: 65vh; }
    #map { height: 65vh !important; min-height: 350px; }
    .customer-card { height: auto; max-height: none; overflow-y: visible; }
    .customers-list-section { height: auto; max-height: none; overflow-y: visible; }
    .dashboard { gap: 12px; }
    .type-grid { grid-template-columns: repeat(2, 1fr); }
    .customer-actions { grid-template-columns: 1fr; }
    .notification-container { top: 75px; left: 10px; max-width: 320px; }
    .notification { padding: 12px 16px; font-size: 13px; }
    .notification .notif-icon { font-size: 22px; }
    .bottom-nav {
        bottom: 10px;
        max-width: 90%;
        padding: 4px;
    }
    .bottom-nav .nav-item {
        font-size: 14px;
        padding: 10px 16px;
    }

    .invoice-item-row {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 12px;
    }
    .invoice-item-row > * {
        width: 100% !important;
        min-width: 0;
    }
    .invoice-item-row input {
        padding: 6px 8px;              /* کوچک‌تر */
        font-size: 11px !important;      /* فونت کوچک‌تر در موبایل */
    }
    .invoice-item-row input::placeholder {
        font-size: 10px;
    }
    .invoice-item-row .invoice-item-total {
        width: 100%;
        text-align: left;
        padding: 8px 12px;
        font-size: 13px;
        font-weight: bold;
        background: rgba(10, 22, 40, 0.04);
        border: 1px solid rgba(10, 22, 40, 0.08);
        border-radius: 8px;
        margin-top: 4px;
        white-space: normal;
    }
    .invoice-item-row .remove-invoice-item {
        align-self: flex-end;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .form-group input:focus,
    .form-group textarea:focus {
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .brand-logo { font-size: 24px; }
    #map { height: 55vh !important; min-height: 300px; }
    .modal-box { padding: 14px; }
    .type-grid { grid-template-columns: 1fr 1fr; }
    .notification-container { top: 65px; left: 6px; max-width: 280px; }
    .notification { padding: 10px 12px; font-size: 12px; }
    .notification .notif-icon { font-size: 18px; }
    .bottom-nav {
        max-width: 95%;
        padding: 3px;
    }
    .bottom-nav .nav-item {
        font-size: 13px;
        padding: 8px 10px;
    }
    .invoice-item-row { gap: 5px; }
    .invoice-item-row input { padding: 6px 8px; font-size: 11px !important; }
    .invoice-item-row input::placeholder { font-size: 10px; }
    .invoice-item-total { padding: 8px; font-size: 12px; }
    .remove-invoice-item { width: 30px; height: 30px; }
}