* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Almarai', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    transition: all 0.3s;
}

.sidebar-header {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-weight: 700;
}

.sidebar-menu {
    margin-top: 20px;
}

.menu-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

.menu-item:hover {
    background-color: #34495e;
    color: white;
}

.menu-item.active {
    background-color: #3498db;
    color: white;
}

.menu-item i {
    margin-left: 10px;
    font-size: 18px;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 20px;
    background-color: #f5f7fa;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.header h2 {
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 120px;
    margin-left: 10px;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.card h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 16px;
}

.card .value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

/* Content Sections */
.content-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.section-header h3 {
    color: #2c3e50;
}

/* Forms */
.invoice-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #7f8c8d;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

select.form-control {
    height: 40px;
}

textarea.form-control {
    min-height: 100px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Tables */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.items-table th,
.items-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.items-table th {
    background-color: #f8f9fa;
    color: #7f8c8d;
    font-weight: 700;
}

.items-table tr:hover {
    background-color: #f8f9fa;
}

/* Invoice Preview */
.invoice-preview {
    background-color: white;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.invoice-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.invoice-number {
    color: #7f8c8d;
}

.invoice-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.invoice-from,
.invoice-to {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.invoice-from h4,
.invoice-to h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.invoice-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-items th,
.invoice-items td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.invoice-items th {
    background-color: #f8f9fa;
    color: #7f8c8d;
}

.invoice-total {
    text-align: left;
    padding-top: 20px;
    border-top: 2px solid #3498db;
}

.invoice-total .total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.invoice-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #7f8c8d;
}

.invoice-notes {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* Search Form */
.search-form {
    display: flex;
    margin-bottom: 20px;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-form button {
    padding: 10px 20px;
    border: none;
    background-color: #3498db;
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
    }

    .invoice-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .invoice-details {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }

    .invoice-preview,
    .invoice-preview * {
        visibility: visible;
    }

    .invoice-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }

    .no-print {
        display: none !important;
    }
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}