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

body {
    font-family: 'Arial', 'Tahoma', sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: white;
    border-radius: 0;
    padding: 20px;
    box-shadow: none;
    min-height: 100vh;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 28px;
    margin-bottom: 30px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 15px;
    text-align: right;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: white;
    text-align: right;
    direction: rtl;
}

input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
    border-color: #ddd;
}

input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: #333;
    color: white;
    border-color: #333;
}

.btn-primary:hover {
    background: #000;
    border-color: #000;
}

.btn-secondary {
    background: #666;
    color: white;
    border-color: #666;
}

.btn-secondary:hover {
    background: #555;
    border-color: #555;
}

.btn-link {
    background: none;
    color: #333;
    text-decoration: underline;
    border: none;
    margin-top: 15px;
}

.btn-link:hover {
    color: #000;
}

.btn-large {
    padding: 15px;
    font-size: 18px;
    margin-top: 20px;
}

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

.header h2 {
    margin: 0;
}

.item {
    background: #fafafa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

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

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.total-section {
    background: #f9f9f9;
    border: 2px solid #333;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    text-align: center;
}

.total-section h3 {
    color: #333;
    border: none;
    margin: 0 0 10px 0;
    padding: 0;
}

#total-amount {
    font-size: 24px;
    font-weight: bold;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    display: none;
    z-index: 1000;
    text-align: center;
}

.message.success {
    background: #28a745;
    display: block;
}

.message.error {
    background: #dc3545;
    display: block;
}

.pdf-preview-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2000;
    overflow: auto;
}

.pdf-preview-header {
    background: #f9f9f9;
    border-bottom: 2px solid #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pdf-preview-content {
    padding: 20px;
}

.pdf-iframe {
    width: 100%;
    min-height: 80vh;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
}

.pdf-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.pdf-actions .btn {
    flex: 1;
}

.message.success {
    background: #333;
    display: block;
}

.message.error {
    background: #666;
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #333;
    border: none;
    padding: 0;
}

.send-method-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.send-method-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    width: 100%;
}

.send-method-btn:hover {
    border-color: #333;
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.send-method-btn:active {
    transform: translateY(0);
}

.method-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.send-method-btn[data-method="sms"] .method-icon {
    color: #007AFF;
}

.send-method-btn[data-method="whatsapp"] .method-icon {
    width: 32px;
    height: 32px;
}

.send-method-btn[data-method="telegram"] .method-icon {
    width: 32px;
    height: 32px;
}

.profile-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-info-row {
    display: flex;
    justify-content: flex-start;
    flex-direction: row-reverse;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.profile-value {
    color: #000;
    text-align: right;
    direction: rtl;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.nav-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.nav-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-card:hover {
    background: #f0f0f0;
    border-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-card-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.nav-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.nav-card-description {
    font-size: 12px;
    color: #666;
}

.parts-stats-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: white;
    border-radius: 4px;
    margin-bottom: 10px;
}

.parts-stats-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.invoice-history-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.invoice-history-item:hover {
    background: #f0f0f0;
    border-color: #333;
    transform: translateX(-3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.invoice-history-item-id {
    font-weight: bold;
    color: #333;
}

.invoice-history-item-date {
    font-size: 12px;
    color: #666;
}

.invoice-history-item-amount {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    margin-top: 5px;
}

.filter-buttons-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #f0f0f0;
    border-color: #333;
}

.filter-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
    }
    
    .container {
        padding: 16px !important;
        margin: 0;
    }
    
    .header {
        padding: 16px !important;
        margin: 0 !important;
        margin-bottom: 20px !important;
    }
    
    h1 {
        padding: 0 4px;
        margin-bottom: 24px;
    }
    
    h2 {
        padding: 0 4px;
    }
    
    h3 {
        padding: 0 4px;
    }
    
    .form-group {
        margin-bottom: 18px;
        padding: 0;
    }
    
    input[type="text"],
    input[type="tel"],
    input[type="password"],
    input[type="number"] {
        padding: 14px 16px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
        text-align: right;
        direction: rtl;
    }
    
    .btn {
        padding: 16px 20px;
        font-size: 15px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .item {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .total-section {
        padding: 20px 16px;
        margin-top: 24px;
    }
    
    .stats-grid {
        gap: 12px;
    }
    
    .stat-card {
        padding: 18px 16px;
    }
    
    .nav-card {
        padding: 20px 16px;
    }
    
    .nav-cards-grid {
        gap: 12px;
    }
    
    .profile-section {
        padding: 18px 16px;
        margin-bottom: 16px;
    }
    
    .invoice-history-item {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .parts-stats-item {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .filter-buttons-container {
        padding: 0 4px;
        margin-bottom: 16px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .pdf-preview-content {
        padding: 16px;
    }
    
    .modal-content {
        padding: 24px 20px;
        margin: 16px;
    }
    
    .message {
        right: 16px;
        left: 16px;
        padding: 16px 20px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 100%;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}