* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1a3a8f 0%, #2a56c6 100%);
    color: white;
    padding: 20px 0;
    border-radius: 10px 10px 0 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-left: 15px;
}

.logo-icon {
    font-size: 32px;
    background: white;
    color: #1a3a8f;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    margin-top: 20px;
}

.sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: #eef2ff;
    color: #1a3a8f;
}

.content {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.content-header h2 {
    color: #1a3a8f;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 14px;
}

.btn-primary {
    background: #1a3a8f;
    color: white;
}

.btn-primary:hover {
    background: #2a56c6;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #34ce57;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #e4606d;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a3a8f 0%, #2a56c6 100%);
}

.login-form {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-form .logo {
    justify-content: center;
    margin-bottom: 30px;
}

/* Form Styles */
.form-container {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-control:focus {
    border-color: #1a3a8f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 58, 143, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.invoice-item.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
    padding: 15px;
    background: #fefeff;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Customer Cards Grid */
.customers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.customer-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}

.customer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.customer-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.customer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a3a8f, #2a56c6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin-right: 15px;
}

.customer-info h3 {
    color: #1a3a8f;
    margin-bottom: 5px;
}

.customer-phone {
    color: #666;
    font-size: 14px;
}

.customer-details {
    margin-bottom: 15px;
}

.customer-email, .customer-address {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.customer-since {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.customer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-actions .btn {
    padding: 8px 15px;
    font-size: 13px;
}

/* Search Box */
.search-box {
    margin-bottom: 25px;
}

.search-box .form-control {
    max-width: 400px;
}

/* Stats Cards */
.customers-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    border-left: 4px solid #1a3a8f;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
    background: #eef2ff;
    color: #1a3a8f;
}

.stat-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #1a3a8f;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

/* Invoice Styles */
.invoice-preview {
    background: #ffffff;
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.business-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid #1a3a8f;
    padding-bottom: 20px;
}

.business-info-en {
    text-align: left;
}

.business-info-ar {
    text-align: right;
    direction: rtl;
}

.business-info-en h2, .business-info-ar h2 {
    color: #1a3a8f;
    font-size: 28px;
    margin-bottom: 5px;
}

.invoice-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin-bottom: 20px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-table th {
    background: #f0f4ff;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.invoice-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.invoice-totals {
    background: white;
    padding: 15px;
    border: 1px solid #eee;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #eee;
}

.totals-row.total {
    font-weight: bold;
    font-size: 18px;
    color: #1a3a8f;
    border-bottom: none;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    border-left: 4px solid #1a3a8f;
}

.dashboard-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    background: #eef2ff;
    color: #1a3a8f;
}

.dashboard-stat-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th {
    background: #f0f4ff;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: #1a3a8f;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background: #f9fafc;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-paid {
    background: #d4edda;
    color: #155724;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Customer Preview */
.customer-preview {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.customer-preview h3 {
    color: #1a3a8f;
    margin-bottom: 15px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    body {
        margin: 0;
        padding: 0;
    }
    .invoice-preview {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .customers-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px;
    }
    
    .customer-actions {
        flex-direction: column;
    }
    
    .customer-actions .btn {
        text-align: center;
    }
}
.invoice-item .form-group:nth-child(1) {
    flex: 3 !important; /* Description - larger */
}

.invoice-item .form-group:nth-child(2),
.invoice-item .form-group:nth-child(3),
.invoice-item .form-group:nth-child(4),
.invoice-item .form-group:nth-child(5) {
    flex: 1 !important; Quantity, Price, Amount, Remove - smaller ;
}