<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>تقرير الهالك</title>
  <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <style>
    :root {
      --primary-color: #2c5fa8;
      --secondary-color: #4a7cc8;
      --accent-color: #e74c3c;
      --light-color: #f8f9fa;
      --dark-color: #343a40;
      --border-color: #dee2e6;
      --success-color: #28a745;
    }
    
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: 'Cairo', Tahoma, sans-serif;
      background: linear-gradient(135deg, #f0f2f5 0%, #e6e9f0 100%);
      margin: 0;
      padding: 20px;
      direction: rtl;
      color: #333;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    
    .report-container {
      max-width: 900px;
      width: 100%;
      margin: 20px auto;
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
      overflow: hidden;
      padding: 0;
    }

    /* ====== Header ====== */
    .report-header {
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
      color: white;
      padding: 25px 30px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: relative;
    }
    
    .report-header::after {
      content: '';
      position: absolute;
      bottom: 0;
      right: 0;
      width: 100%;
      height: 4px;
      background: linear-gradient(90deg, var(--accent-color) 0%, #ff7f50 100%);
    }
    
    .report-header img {
      height: 70px;
      filter: brightness(0) invert(1);
    }
    
    .report-title {
      text-align: center;
      flex-grow: 1;
    }
    
    .report-title h1 {
      margin: 0;
      font-size: 28px;
      font-weight: 700;
      letter-spacing: 0.5px;
    }
    
    .report-title p {
      margin: 5px 0 0;
      font-size: 16px;
      opacity: 0.9;
    }

    /* ====== Report Info ====== */
    .report-info {
      display: flex;
      justify-content: space-between;
      padding: 15px 30px;
      background-color: #f8fafc;
      border-bottom: 1px solid var(--border-color);
    }
    
    .info-item {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .info-item i {
      color: var(--primary-color);
      font-size: 16px;
    }
    
    .info-item span {
      font-weight: 600;
      color: var(--dark-color);
    }

    /* ====== Main Content ====== */
    .report-content {
      padding: 30px;
    }
    
    .section-title {
      position: relative;
      padding-bottom: 10px;
      margin-bottom: 20px;
      font-size: 20px;
      color: var(--primary-color);
      font-weight: 600;
    }
    
    .section-title::after {
      content: '';
      position: absolute;
      bottom: 0;
      right: 0;
      width: 60px;
      height: 3px;
      background-color: var(--accent-color);
      border-radius: 3px;
    }

    /* ====== Table ====== */
    .report-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      margin: 25px 0;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 0 0 1px var(--border-color);
    }
    
    .report-table th {
      background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
      padding: 16px 12px;
      text-align: center;
      font-weight: 600;
      color: var(--dark-color);
      border-bottom: 2px solid var(--border-color);
    }
    
    .report-table td {
      padding: 14px 12px;
      text-align: center;
      border-bottom: 1px solid var(--border-color);
      transition: background-color 0.2s;
    }
    
    .report-table tr:last-child td {
      border-bottom: none;
    }
    
    .report-table tr:hover td {
      background-color: rgba(44, 95, 168, 0.03);
    }
    
    .report-table tr:nth-child(even) {
      background-color: #fafbfc;
    }

    /* ====== Footer ====== */
    .report-footer {
      display: flex;
      justify-content: space-between;
      margin-top: 40px;
      padding-top: 20px;
      border-top: 1px dashed var(--border-color);
    }
    
    .footer-section {
      text-align: center;
      width: 45%;
    }
    
    .signature-line {
      margin-top: 60px;
      border-top: 1px solid #aaa;
      padding-top: 10px;
      font-weight: 600;
      color: var(--dark-color);
    }

    /* ====== Print Button ====== */
    .print-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 30px auto;
      padding: 14px 32px;
      font-size: 16px;
      font-weight: 600;
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
      color: #fff;
      border: none;
      border-radius: 50px;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(44, 95, 168, 0.25);
    }
    
    .print-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(44, 95, 168, 0.35);
    }
    
    .print-btn:active {
      transform: translateY(0);
    }

    /* ====== Watermark ====== */
    .watermark {
      position: absolute;
      opacity: 0.03;
      font-size: 120px;
      font-weight: 800;
      color: var(--primary-color);
      transform: rotate(-45deg);
      pointer-events: none;
      z-index: -1;
      user-select: none;
    }

    /* ====== Responsive Design ====== */
    @media (max-width: 768px) {
      .report-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
      }
      
      .report-info {
        flex-direction: column;
        gap: 10px;
      }
      
      .report-footer {
        flex-direction: column;
        gap: 30px;
      }
      
      .footer-section {
        width: 100%;
      }
      
      .report-table {
        display: block;
        overflow-x: auto;
      }
    }

    @media print {
      body {
        background: #fff;
        padding: 0;
      }
      
      .report-container {
        box-shadow: none;
        margin: 0;
        max-width: 100%;
      }
      
      .print-btn {
        display: none;
      }
      
      .watermark {
        opacity: 0.05;
      }
    }
  </style>
</head>
<body>
  <div class="report-container">
    <!-- Header -->
    <div class="report-header">
      <img src="https://cdn-icons-png.flaticon.com/512/3500/3500839.png" alt="شعار الشركة">
      <div class="report-title">
        <h1>تقرير الهالك</h1>
        <p>نظام إدارة المخزون والمستودعات</p>
      </div>
    </div>

    <!-- Report Info -->
    <div class="report-info">
      <div class="info-item">
        <i class="fas fa-file-alt"></i>
        <span>رقم التقرير: 1</span>
      </div>
      <div class="info-item">
        <i class="fas fa-calendar-alt"></i>
        <span>التاريخ: 2025-08-21</span>
      </div>
      <div class="info-item">
        <i class="fas fa-store"></i>
        <span>الفرع: فرع القاهرة</span>
      </div>
    </div>

    <!-- Main Content -->
    <div class="report-content">
      <h2 class="section-title">تفاصيل الصنف</h2>
      
      <table class="report-table">
        <tr>
          <th>اسم الصنف</th>
          <td>صنف تجريبي</td>
        </tr>
        <tr>
          <th>مصدر الصنف</th>
          <td>مورد 1</td>
        </tr>
        <tr>
          <th>كود الصنف</th>
          <td>1001</td>
        </tr>
        <tr>
          <th>الكمية</th>
          <td>5</td>
        </tr>
        <tr>
          <th>قيمة الشراء</th>
          <td>200 درهم</td>
        </tr>
        <tr>
          <th>الإجمالي</th>
          <td>1000 درهم</td>
        </tr>
        <tr>
          <th>سبب الهالك</th>
          <td>انتهاء الصلاحية</td>
        </tr>
      </table>

      <!-- Footer -->
      <div class="report-footer">
        <div class="footer-section">
          <div class="signature-line">توقيع المسؤول</div>
        </div>
        <div class="footer-section">
          <div class="signature-line">اعتماد الإدارة</div>
        </div>
      </div>
    </div>
  </div>

  <!-- Print Button -->
  <button class="print-btn" onclick="window.print()">
    <i class="fas fa-print"></i>
    طباعة التقرير
  </button>

  <!-- Watermark -->
  <div class="watermark">تقرير الهالك</div>
</body>
</html>