/* ============================================================
   CSS VARIABLES
   ============================================================ */

:root {
    --primary: #1a3a5c;
    --primary-dark: #0a1628;
    --primary-light: #2a5a7c;
    --accent: #c9a961;
    --accent-light: #e8d5a8;
    --accent-dark: #a8894a;
    --text-dark: #1a1a2e;
    --text-light: #6b7280;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --primary-color: #3498db;
    --primary-dark-color: #2980b9;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0,0,0,0.08);
    --border-radius: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Vazirmatn', sans-serif;
    --font-family-en: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #f5f5f5;
    line-height: 1.6;
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    color: var(--text-dark);
    padding-top: 72px;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================================
   ENGLISH DIRECTION
   ============================================================ */

html[lang="en"] {
    direction: ltr;
    text-align: left;
}

html[lang="en"] body,
html[lang="en"] .container,
html[lang="en"] .document-item,
html[lang="en"] .document-name,
html[lang="en"] .section-header h2,
html[lang="en"] .language-select,
html[lang="en"] .show-order-btn,
html[lang="en"] .mobile-order-button {
    font-family: var(--font-family-en);
}

html[lang="en"] .container {
    direction: ltr;
}

html[lang="en"] .document-item-content,
html[lang="en"] .order-item {
    direction: ltr;
}

html[lang="en"] #customerPhone {
    direction: ltr;
    text-align: left;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
    padding: 0 20px;
    height: 72px;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    flex-shrink: 0;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 22px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-family: 'Vazirmatn', sans-serif;
}

.logo-highlight {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.btn-nav-primary {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.btn-nav-primary:hover {
    background: var(--primary-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.25);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   LANGUAGE SELECTOR
   ============================================================ */

.language-selector {
    position: fixed;
    top: 82px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    direction: ltr;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.lang-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    transform: scale(1.1);
}

.lang-btn.active {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.lang-btn img {
    border-radius: 2px;
}

/* ============================================================
   MOBILE ORDER ALERT
   ============================================================ */

.mobile-order-alert {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 12px 15px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: space-between;
}

.mobile-order-alert.show {
    display: flex;
}

.show-order-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 12px;
}

.show-order-btn:active {
    background: rgba(255,255,255,0.3);
}

.mobile-order-button {
    display: none;
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
}

.mobile-order-button:hover {
    background: var(--primary-dark-color);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

/* ============================================================
   CONTAINER
   ============================================================ */

.container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 30px;
}

/* ============================================================
   SEARCH SECTION
   ============================================================ */

.search-section {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.section-header h2 {
    margin: 0;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.language-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 13px;
    min-width: 140px;
    background: white;
}

#documentSearch {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-family: var(--font-family);
    transition: border-color var(--transition) ease;
}

#documentSearch:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ============================================================
   CATEGORIES
   ============================================================ */

.categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-tab {
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition) ease;
    font-family: var(--font-family);
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
}

.category-tab:hover {
    background: #e9ecef;
}

.category-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.12);
}

/* ============================================================
   DOCUMENT LIST
   ============================================================ */

.document-list {
    max-height: 450px;
    overflow-y: auto;
    border: 2px solid #f0f0f0;
    border-radius: var(--border-radius);
    padding: 5px;
}

.document-list::-webkit-scrollbar {
    width: 8px;
}
.document-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.document-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
.document-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.document-item {
    padding: 6px 8px;
    border: 1px solid #f8f9fa;
    margin-bottom: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition) ease;
    font-weight: 400;
    font-size: 12px;
    min-height: auto;
}

.document-item:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateX(-3px);
}

.document-item:active {
    background-color: #e3f2fd;
}

.document-item.selected {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.document-item-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.document-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    order: 0;
    margin-left: 4px;
}

.document-icon-wrapper i {
    font-size: 16px;
    color: var(--primary-color);
}

.document-item.selected .document-icon-wrapper i {
    color: #856404;
}

.document-name {
    flex: 1;
    font-size: 12px;
    cursor: pointer;
    text-align: right;
    order: 2;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
}

.document-quantity {
    background: var(--success-color);
    color: white;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    order: 1;
    margin: 0;
    flex: 0 0 auto;
}

.document-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    order: 3;
    margin: 0;
    flex: 0 0 auto;
}

.document-plus-btn,
.document-minus-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    transition: opacity var(--transition) ease;
}

.document-plus-btn {
    background: var(--success-color);
    color: white;
    opacity: 0.2;
    pointer-events: none;
}

.document-item.selected .document-plus-btn {
    opacity: 1;
    pointer-events: auto;
}

.document-minus-btn {
    background: var(--danger-color);
    color: white;
    display: none;
    opacity: 1;
}

.document-item.has-quantity .document-minus-btn {
    display: flex;
}

/* ============================================================
   ORDER SECTION
   ============================================================ */

.order-section {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px var(--shadow-color);
    height: fit-content;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    height: 75vh;
}

.order-section h2 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.order-items-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    margin-bottom: 15px;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
    min-height: 200px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 5px;
}

.order-items::-webkit-scrollbar {
    width: 6px;
}
.order-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.order-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
.order-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================================
   ORDER ITEM
   ============================================================ */

.order-item {
    display: flex;
    flex-direction: column;
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 6px;
    border-radius: 5px;
    background-color: #fafafa;
    gap: 4px;
    font-size: 13px;
}

.order-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ===== HEADER ROW ===== */
.item-header {
    display: flex;
    align-items: center;
    gap: 4px 6px;
    width: 100%;
    flex-wrap: wrap;
}

.order-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 4px;
}

.order-icon-wrapper i {
    font-size: 14px;
    color: var(--primary-color);
}

.item-number {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.item-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 13px;
    word-break: break-word;
    flex: 0 1 auto;
    min-width: 0;
}

.copy-count-text {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
}

.item-owner-name {
    font-size: 12px;
    color: #2c3e50;
    background: #e8f0fe;
    padding: 1px 10px;
    border-radius: 12px;
    display: inline-block;
    margin: 0 4px;
    font-weight: 400;
    white-space: nowrap;
}

.owner-toggle-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: #f8f9fa;
    margin: 0 2px;
}

.owner-toggle-btn:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.owner-toggle-btn:active {
    transform: scale(0.95);
}

.owner-input {
    margin-top: 4px;
    padding: 4px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    width: 100%;
    max-width: 250px;
    background: #f8f9fa;
}

.owner-input:focus {
    outline: none;
    border-color: var(--primary-dark-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* ===== PRICE SECTION ===== */
.price-section {
    margin-top: 4px;
    width: 100%;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.price-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.price-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--success-color);
}

/* ===== COST DETAILS BUTTON ===== */
.cost-details-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 32px;
    height: 30px;
}

.cost-details-btn:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cost-details-btn:active {
    transform: scale(0.95);
}

.cost-details-btn.active {
    border-color: var(--primary-color);
    background-color: #e3f2fd;
    color: var(--primary-color);
}

.cost-details-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ===== PRICE BREAKDOWN ===== */
.price-breakdown {
    margin-top: 8px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 6px;
    border: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
    transition: all var(--transition) ease-in-out;
    max-height: 200px;
    overflow-y: auto;
}

.price-breakdown[style*="display: none"] {
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    opacity: 0;
    overflow: hidden;
}

.price-breakdown:not([style*="display: none"]) {
    max-height: 300px;
    opacity: 1;
}

.breakdown-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-size: 12px;
}

.breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    font-size: 12px;
    color: #666;
    gap: 15px;
}

.breakdown-line:last-child {
    margin-bottom: 0;
}

.breakdown-line span:first-child {
    font-weight: 500;
    flex: 1;
    text-align: right;
}

.breakdown-line span:last-child {
    font-family: var(--font-family);
    flex-shrink: 0;
    min-width: 100px;
    text-align: left;
}

/* ===== MAIN CONTROLS ROW ===== */
.item-main-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 4px;
}

.verification-type {
    width: auto;
    min-width: 100px;
    max-width: 160px;
    padding: 4px 6px;
    padding-left: 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 11px;
    flex-shrink: 0;
    background: white;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 6px center;
    background-size: 12px;
}

.verification-type:focus {
    outline: none;
    border-color: var(--primary-color);
}

.controls-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #2c3e50;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity-btn.minus:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.quantity-btn.plus:hover {
    background: var(--success-color);
    border-color: var(--success-color);
}

.quantity-btn:active {
    transform: scale(0.9);
}

.quantity-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: #f0f0f0;
    border-color: #ddd;
}

.quantity-btn.disabled:hover {
    background: #f0f0f0;
    border-color: #ddd;
    color: #2c3e50;
    transform: none;
}

.copy-count-display {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    color: #2c3e50;
}

.remove-btn {
    color: var(--danger-color);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 18px;
    background: none;
    border: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #fde8e8;
    color: #c0392b;
    transform: scale(1.1);
}

.remove-btn:active {
    transform: scale(0.95);
}

/* ============================================================
   LANGUAGE DROPDOWN WITH FLAGS
   ============================================================ */

.language-select-container {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 28px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    flex-shrink: 0;
}

.language-select-container select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}

.language-flag-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

.language-select-container::after {
    content: '▼';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 7px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.language-select-container:focus-within {
    border-color: var(--primary-color);
}

.language-select-container select option {
    font-size: 13px;
    padding: 4px 8px;
    font-family: var(--font-family);
}

/* ============================================================
   EMPTY MESSAGE
   ============================================================ */

.empty-message {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 40px 0;
    font-size: 13px;
}

/* ============================================================
   ADDITIONAL INFO
   ============================================================ */

.additional-info {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 6px;
    flex-shrink: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    gap: 8px;
    font-size: 13px;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-color);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition) ease;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary-color);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.additional-fields {
    display: none;
    margin-top: 12px;
    gap: 12px;
}

.additional-fields.show {
    display: flex;
    flex-direction: column;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-group label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 12px;
}

.field-group input,
.field-group textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 13px;
}

.field-group textarea {
    resize: vertical;
    min-height: 50px;
}

#customerPhone {
    direction: ltr;
    text-align: left;
    font-family: monospace;
}

/* ============================================================
   ORDER TOTAL
   ============================================================ */

.order-total {
    border-top: 2px solid #ecf0f1;
    padding-top: 15px;
    flex-shrink: 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.send-btn {
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition) ease;
    font-family: var(--font-family);
}

.send-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.send-btn:not(:disabled):hover {
    background: #128C7E;
    transform: translateY(-1px);
}

/* ============================================================
   ORDER WARNING
   ============================================================ */

.order-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
    font-size: 11px;
    line-height: 1.5;
}

.warning-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.warning-text {
    flex: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-about h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--white);
}

.footer-about h3 .logo-highlight {
    color: var(--accent);
}

.footer-about p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: 16px;
    max-width: 280px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 18px;
}

.footer-socials a:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4,
.footer-map-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-right: 4px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.contact-item i {
    width: 20px;
    color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 16px;
}

.contact-item span {
    word-break: break-word;
}

.address-item {
    margin-bottom: 14px;
}

.footer-map-column {
    min-width: 0;
}

.footer-map {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    max-width: 280px;
    margin-top: 8px;
}

.map-link {
    text-decoration: none;
    display: block;
}

.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    min-height: 70px;
}

.map-placeholder:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.map-placeholder i:first-child {
    font-size: 28px;
    color: var(--accent);
    flex-shrink: 0;
}

.map-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.map-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.map-placeholder i:last-child {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    transition: var(--transition);
}

.map-placeholder:hover i:last-child {
    color: var(--accent);
    transform: translateX(-4px);
}

.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-pro-number {
    color: var(--accent);
    font-weight: 500;
}

/* ============================================================
   MESSAGING MODAL
   ============================================================ */

.messaging-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.messaging-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.messaging-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    max-width: 340px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: modalContentIn 0.35s ease;
}

@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.messaging-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.messaging-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.messaging-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.messaging-modal-close:hover {
    background: #f0f0f0;
    color: #e74c3c;
}

.messaging-modal-subtitle {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: center;
}

.messaging-app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.messaging-app-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    width: 100%;
    min-height: 90px;
    text-align: center;
}

.messaging-app-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.messaging-app-btn:active {
    transform: translateY(0);
}

.messaging-app-btn.whatsapp:hover {
    border-color: #25D366;
    background: #f0faf4;
}

.messaging-app-btn.telegram:hover {
    border-color: #0088cc;
    background: #f0f7fc;
}

.messaging-app-btn.bale:hover {
    border-color: #1a73e8;
    background: #f0f4fe;
}

.messaging-app-btn.gmail:hover {
    border-color: #EA4335;
    background: #fef0ee;
}

.messaging-app-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    background: #f8f9fa;
    padding: 10px;
}

.messaging-app-btn:hover .messaging-app-icon {
    transform: scale(1.05);
}

.messaging-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.messaging-app-btn.whatsapp .messaging-app-icon {
    background: #e8f5e9;
}

.messaging-app-btn.telegram .messaging-app-icon {
    background: #e3f2fd;
}

.messaging-app-btn.bale .messaging-app-icon {
    background: #e8edf9;
}

.messaging-app-btn.gmail .messaging-app-icon {
    background: #fce8e6;
}

.messaging-app-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.messaging-modal-cancel {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: #7f8c8d;
    transition: all 0.2s ease;
}

.messaging-modal-cancel:hover {
    background: #f1f3f5;
    color: #2c3e50;
}

.phone-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
}

.phone-link:hover {
    color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablets */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 30px;
    }

    .footer-map-column {
        grid-column: span 3;
        max-width: 400px;
    }

    .footer-map {
        max-width: 100%;
    }

    .map-placeholder {
        max-width: 350px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        padding-top: 0 !important;
    }

    .navbar {
        height: 60px;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .hero {
        padding-top: 10px;
        padding-bottom: 40px;
    }
    
    .nav-logo a {
        font-size: 18px;
    }

    .logo-icon {
        font-size: 24px;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 20px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--gray-200);
        display: none;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        z-index: 999;
        width: 100%;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 15px;
    }

    .btn-nav-primary {
        margin-top: 8px;
        text-align: center;
        justify-content: center;
    }

    .phone-link {
        font-size: 18px;
        font-weight: 600;
    }

    .nav-toggle {
        display: flex;
    }

    .language-selector {
        position: fixed;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999;
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 12px rgba(0,0,0,0.15);
        border-radius: 16px;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        opacity: 1;
        visibility: visible;
    }
    
    .language-selector.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-50%) translateY(-10px);
    }

    .container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
        padding-top: 20px;
        padding-bottom: 120px;
    }

    .order-section {
        position: static;
        height: auto;
        margin-top: 20px;
        border: 2px solid var(--primary-color);
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0% { border-color: var(--primary-color); }
        50% { border-color: var(--primary-dark-color); }
        100% { border-color: var(--primary-color); }
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .language-select {
        min-width: 100%;
    }

    .additional-fields {
        flex-direction: column;
    }

    .order-items {
        max-height: 70vh;
        min-height: 120px;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 10px;
    }

    .item-header {
        flex-wrap: wrap;
        gap: 4px;
    }

    .item-main-info {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 8px;
    }

    .verification-type {
        width: 100%;
        min-width: unset;
        max-width: 100%;
        font-size: 12px;
        padding: 6px 8px;
        padding-left: 28px;
    }

    .controls-wrapper {
        justify-content: flex-end;
    }

    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .copy-count-display {
        min-width: 32px;
        font-size: 16px;
    }

    .cost-details-btn {
        min-width: 28px;
        height: 28px;
        padding: 2px 6px;
    }

    .cost-details-btn svg {
        width: 16px;
        height: 16px;
    }

    .language-select-container {
        width: 32px;
        height: 26px;
    }

    .language-flag-display {
        font-size: 14px;
    }

    .document-list {
        max-height: 60vh;
    }

    .categories {
        gap: 8px;
        margin-bottom: 15px;
        padding: 8px 0;
        flex-wrap: wrap;
        align-content: flex-start;
    }

    .category-tab {
        padding: 8px 10px;
        font-size: 12px;
        margin: 2px 4px;
    }

    .document-item-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        direction: rtl;
        gap: 10px;
    }

    .document-quantity {
        background: var(--success-color);
        color: #ffffff;
        width: 26px;
        height: 26px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: 700;
        font-size: 13px;
        line-height: 1;
        min-width: 26px;
        text-align: center;
        padding: 0;
        margin: 0 8px;
    }

    html[lang="en"] .document-quantity {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 14px;
    }

    .mobile-order-alert {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
    }

    .mobile-order-button {
        position: fixed !important;
        bottom: 70px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10000 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
        white-space: normal;
        word-break: keep-all;
        max-width: calc(100% - 40px);
        padding: 10px 14px !important;
        text-align: center;
        min-width: 110px;
    }

    .mobile-order-button > * {
        display: inline-block;
    }

    .price-main {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 0;
    }

    .price-breakdown {
        font-size: 10px;
        margin-top: 8px;
        width: 100%;
    }

    .breakdown-line {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        font-size: 11px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .breakdown-line span:first-child {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .breakdown-line span:last-child {
        white-space: nowrap;
        flex-shrink: 0;
    }

    #customerPhone {
        font-size: 16px;
    }

    .owner-input {
        max-width: 100%;
        width: 100%;
    }

    .footer {
        padding: 40px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-bottom: 24px;
    }

    .footer-map-column {
        grid-column: span 1;
        max-width: 100%;
    }

    .footer-about p {
        max-width: 100%;
    }

    .footer-map {
        max-width: 100%;
    }

    .map-placeholder {
        max-width: 100%;
        padding: 12px 16px;
    }

    .map-placeholder i:first-child {
        font-size: 24px;
    }

    .map-title {
        font-size: 13px;
    }

    .map-subtitle {
        font-size: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 16px 0;
        font-size: 12px;
    }

    .contact-item {
        font-size: 13px;
        gap: 10px;
    }

    .contact-item i {
        width: 18px;
        font-size: 14px;
    }

    .footer-socials a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .copy-count-text {
        font-size: 10px;
    }

    /* Messaging Modal Mobile */
    .messaging-modal {
        align-items: flex-end;
        justify-content: center;
    }

    .messaging-modal-content {
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        width: 100%;
        padding: 24px 20px 30px;
        animation: bottomSheetSlideUp 0.35s ease;
    }

    @keyframes bottomSheetSlideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .messaging-app-btn {
        padding: 14px 10px;
        min-height: 80px;
    }

    .messaging-app-icon {
        width: 50px;
        height: 50px;
        padding: 8px;
    }

    /* English Mobile */
    html[lang="en"] .item-header {
        flex-direction: row;
    }

    html[lang="en"] .price-main {
        flex-direction: row;
    }

    html[lang="en"] .breakdown-line {
        flex-direction: row;
    }

    html[lang="en"] .item-main-info {
        flex-direction: row;
        flex-wrap: wrap;
    }

    html[lang="en"] .mobile-order-button {
        right: 50%;
        left: auto;
        transform: translateX(50%);
    }

    html[lang="en"] .mobile-order-alert {
        text-align: left;
    }

    html[lang="en"] .verification-type {
        padding-right: 28px;
        padding-left: 8px;
        min-width: unset;
        max-width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .navbar {
        padding: 0 12px;
        height: 58px;
    }

    body {
        padding-top: 58px;
    }

    .nav-logo a {
        font-size: 16px;
    }

    .logo-icon {
        font-size: 20px;
    }

    .language-selector {
        top: 58px;  /* زیر هدر کوچک‌تر */
        padding: 3px 6px;
    }

    .nav-menu {
        top: 58px;
        padding: 12px 16px 20px;
    }

    .nav-link {
        font-size: 14px;
        padding: 10px 14px;
    }

    .btn-nav-primary {
        padding: 10px 18px;
        font-size: 14px;
    }

    .footer-grid {
        gap: 20px;
    }

    .footer-links ul li {
        margin-bottom: 6px;
    }

    .footer-links ul li a {
        font-size: 13px;
    }

    .contact-item {
        font-size: 12px;
    }

    .map-placeholder {
        padding: 10px 14px;
        min-height: 60px;
    }

    .map-placeholder i:first-child {
        font-size: 20px;
    }

    .map-title {
        font-size: 12px;
    }

    .map-subtitle {
        font-size: 10px;
    }

    .map-placeholder i:last-child {
        font-size: 12px;
    }
}

/* Desktop - Hide mobile elements */
@media (min-width: 769px) {
    .mobile-order-alert {
        display: none !important;
    }

    .mobile-order-button {
        display: none !important;
    }
}

/* ============================================================
   ENGLISH LANGUAGE OVERRIDES
   ============================================================ */

html[lang="en"] .order-warning {
    direction: ltr;
    text-align: left;
}

html[lang="en"] .document-name,
html[lang="en"] .item-name {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

html[lang="en"] .price-section,
html[lang="en"] .price-breakdown {
    direction: ltr;
    text-align: left;
}

html[lang="en"] .breakdown-line span:first-child {
    text-align: left;
    flex: 1;
}

html[lang="en"] .breakdown-line {
    direction: ltr;
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
}

html[lang="en"] .price-main {
    direction: ltr;
    justify-content: flex-start;
}

html[lang="en"] .price-label {
    margin-left: 0;
    margin-right: 8px;
}

html[lang="en"] .verification-type {
    font-size: 11px;
    padding: 4px 6px;
    min-width: 120px;
    max-width: 180px;
    background-position: right 6px center;
    padding-right: 24px;
    padding-left: 6px;
}

html[lang="en"] .language-select-container {
    width: 40px;
}

html[lang="en"] .language-select-container select option {
    font-family: var(--font-family-en);
}

html[lang="en"] .cost-details-btn {
    font-family: var(--font-family-en);
}

html[lang="en"] .document-icon-wrapper {
    margin-left: 0;
    margin-right: 4px;
}

html[lang="en"] .order-icon-wrapper {
    margin-left: 0;
    margin-right: 4px;
}

html[lang="en"] .item-header .order-icon-wrapper {
    order: 1;
}

html[lang="en"] .item-header .item-name {
    order: 2;
}

html[lang="en"] .messaging-modal-title {
    font-family: var(--font-family-en);
}

html[lang="en"] .messaging-modal-content {
    direction: ltr;
}

html[lang="en"] .messaging-app-btn {
    direction: ltr;
    font-family: var(--font-family-en);
}

html[lang="en"] .messaging-modal-subtitle {
    text-align: center;
}