:root {
  --purple: #dfdae0;
  --card-bg: #ececec;
  --pill: #ffffff;
  --yellow: #ffd400;
  --red: #f44336;
  --black: #111;
  --radius: 28px;
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 16px;
  background: var(--purple);
  font-family: "Tajawal", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--black);
  line-height: 1.5;
}

.page-header {
  text-align: right;
  color: #000000;
  margin-bottom: 18px;
}
.page-header h1 {
  font-weight: 800;
  margin: 0;
  font-size: clamp(20px, 3vw, 30px); /* يتغير حسب حجم الشاشة */
}

.orders-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

/* البطاقة */
.order-card {
  width: 100%;
  max-width: 680px;
  background: var(--card-bg);
  border-radius: 36px;
  padding: 24px 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/* شبكة عمودين: عناوين يمين وقيم يسار */
.row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.label {
  font-weight: 800;
  font-size: clamp(14px, 2.5vw, 20px);
  text-align: right;
  color: #000;
}

.value {
  background: var(--pill);
  border-radius: 48px;
  padding: 12px 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: clamp(12px, 2.5vw, 18px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow-x: auto; /* لو النص طويل */
}

/* زر النسخ */
.copy-btn {
  border: none;
  outline: none;
  background: #efefef;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: clamp(10px, 2vw, 14px);
  cursor: pointer;
  transition: transform 0.06s ease, background 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover {
  background: #e6e6e6;
}
.copy-btn:active {
  transform: scale(0.95);
}

/* الأزرار */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: clamp(14px, 2.5vw, 18px);
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.2s ease;
}
.btn:active {
  transform: scale(0.95);
}
.btn-accept {
  background: var(--yellow);
  color: #000;
}
.btn-reject {
  background: var(--red);
  color: #fff;
}

.date {
  text-align: center;
  font-weight: 800;
  margin-top: 6px;
  font-size: clamp(12px, 2.5vw, 16px);
}

/* المودال */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 22px;
  padding: 24px 18px;
  text-align: center;
}
.modal-card h2 {
  font-size: clamp(16px, 3vw, 22px);
  margin-bottom: 12px;
}
.modal-card input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 0 12px;
  font-size: 16px;
}
.modal-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 14px;
}

/* ✅ RESPONSIVE BREAKPOINTS */
@media (max-width: 600px) {
  .row {
    grid-template-columns: 1fr; /* العنوان فوق والقيمة تحت */
    gap: 6px;
  }
  .card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
}
.loader {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #ff0000;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.reject-message {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid #ff4d4d;
  color: #ff4d4d;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.4s ease;
}

.reject-message svg {
  flex-shrink: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.confirm-message {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0, 128, 0, 0.1);
  border: 1px solid #28a745;
  color: #28a745;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.4s ease;
}

.confirm-message svg {
  flex-shrink: 0;
}

