:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --border-color: #dee2e6;
}

body {
  font-family: "Almarai", sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
  direction: rtl;
  color: #333;
}

@media print {
  body {
    background: white;
    padding: 0 !important;
    margin: 0 !important;
  }

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

  .invoice-container {
    box-shadow: none;
    border: none;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    min-height: auto !important;
    page-break-after: avoid !important;
  }

  .warranty,
  .invoice-notes {
    page-break-inside: avoid !important;
  }
}


.container {
  max-width: 800px;
  margin: 0 auto;
}

.invoice-container {
  background: white;
  padding: 30px;
  border-radius: 10px;
  width: 210mm;
  min-height: 297mm;
  margin: 20px auto;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 20px;
}

.header h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
  margin-top: 0;
  font-size: 28px;
  font-weight: 700;
}

.header p {
  margin: 5px 0;
  color: #666;
}

.invoice-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 15px;
  background-color: var(--light-color);
  border-radius: 5px;
  font-weight: 500;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.details-table th {
  background-color: var(--secondary-color);
  color: white;
  padding: 12px 10px;
  text-align: right;
  font-weight: bold;
}

.details-table td {
  padding: 10px 5px;
  border-bottom: 1px solid var(--border-color);
}

.details-table tr:last-child td {
  border-bottom: none;
}

.total {
  font-size: 1.3em;
  font-weight: bold;
  margin-top: 30px 0;
  padding: 15px;
  background-color: var(--light-color);
  border-radius: 5px;
}

.warranty {
  margin-top: 50px;
  border-top: 2px solid var(--border-color);
  padding-top: 20px;
}

.warranty h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 22px;
}

.warranty ul {
  padding-right: 20px;
  line-height: 1.8;
}

.warranty li {
  margin-bottom: 10px;
}

.form-container {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--primary-color);
}

input,
select {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: "Almarai", sans-serif;
  font-size: 15px;
  transition: border-color 0.3s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Almarai", sans-serif;
  font-weight: 500;
  width: 100%;
  margin-top: 10px;
  font-size: 16px;
  transition: all 0.3s;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.print-btn {
  background-color: var(--success-color) !important;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Almarai", sans-serif;
  font-weight: 500;
  width: 100%;
  margin-top: 10px;
  font-size: 16px;
  transition: all 0.3s;
}

.add-btn {
  background-color: var(--secondary-color);
}

.new-invoice-btn {
  background-color: var(--accent-color);
}

.red-btn {
  background-color: var(--accent-color);
}

.company-logo {
  max-width: 150px;
}

.customer_info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 0px 10px;
}

#finalTotal {
  font-weight: bolder;
  color: var(--secondary-color);
}

.invoice-notes {
  border-right: 3px solid var(--secondary-color);
  padding-right: 20px;
}

.btn {
  padding: 10px 25px;
  border-radius: 5px;
  color: #fff;
  text-decoration: none;
}

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

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