/* projects.css — صفحة المشاريع (Aurora tokens، متوافقة مع الثيم الفاتح) */

.pj-page{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 90px;
}

/* ===== HERO ===== */
.pj-hero{
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--au-surface, rgba(219,234,254,.5));
  border: 1px solid var(--au-border, rgba(37,99,235,.14));
  margin-bottom: 14px;
}
.pj-hero__type{
  font-size: 12px; font-weight: 800; color: var(--au-accent, #0284c7);
  letter-spacing: .02em;
}
.pj-hero__title{
  margin: 4px 0 2px; font-size: 24px; font-weight: 900; color: var(--au-text-1, #0b0d23);
  letter-spacing: -.01em;
}
.pj-hero__sub{ margin: 0; font-size: 12.5px; color: var(--au-text-3, #64748b); }

/* ===== CONTROLS ===== */
.pj-controls{
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.pj-search{ position: relative; flex: 1; min-width: 220px; }
.pj-search input{
  width: 100%; height: 46px; padding: 0 40px 0 14px;
  border-radius: 13px;
  border: 1px solid var(--au-border, rgba(37,99,235,.18));
  background: var(--au-surface, #fff);
  color: var(--au-text-1, #0b0d23);
  font-size: 14px; outline: none; font-family: inherit;
}
.pj-search input:focus{
  border-color: var(--au-accent, #0284c7);
  box-shadow: 0 0 0 3px rgba(6,182,212,.18);
}
.pj-search svg{
  position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%);
  color: var(--au-text-3, #64748b); pointer-events: none;
}
.pj-select, .pj-need{
  height: 46px; padding: 0 12px;
  border-radius: 13px;
  border: 1px solid var(--au-border, rgba(37,99,235,.18));
  background: var(--au-surface, #fff);
  color: var(--au-text-1, #0b0d23);
  font-size: 13.5px; font-family: inherit; outline: none;
}
.pj-select{ min-width: 150px; cursor: pointer; }
.pj-need{ width: 170px; text-align: center; font-weight: 700; }
.pj-need:focus, .pj-select:focus{ border-color: var(--au-accent, #0284c7); }

.pj-btn{
  height: 46px; padding: 0 16px;
  border-radius: 13px; cursor: pointer;
  border: 1px solid var(--au-border, rgba(37,99,235,.18));
  background: var(--au-surface, #fff);
  color: var(--au-text-1, #0b0d23);
  font-size: 13px; font-weight: 800; font-family: inherit;
}
.pj-btn:hover{ border-color: var(--au-accent, #0284c7); }
.pj-btn--admin{
  background: linear-gradient(135deg, var(--au-accent, #06b6d4), #0ea5e9);
  color: #fff; border: 0;
  box-shadow: 0 6px 18px rgba(6,182,212,.3);
}

/* ===== LIST ===== */
.pj-list{ display: flex; flex-direction: column; gap: 10px; }

.pj-card{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--au-surface, #fff);
  border: 1px solid var(--au-border, rgba(37,99,235,.14));
}
.pj-card--off{ border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.06); }

.pj-card__info{ min-width: 0; }
.pj-card__title{
  font-size: 15px; font-weight: 900; color: var(--au-text-1, #0b0d23);
  word-break: break-word; line-height: 1.3;
}
.pj-card__meta{ font-size: 12px; color: var(--au-text-3, #64748b); margin-top: 3px; }

.pj-card__side{
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: flex-end;
}

.pj-total{
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 16px; border-radius: 12px;
  background: rgba(6,182,212,.10);
  border: 1px solid rgba(6,182,212,.28);
}
.pj-total__num{ font-size: 20px; font-weight: 900; color: var(--au-accent, #0284c7); line-height: 1.1; }
.pj-total__lbl{ font-size: 10px; font-weight: 800; color: var(--au-text-3, #64748b); }

.pj-avail{ font-size: 12px; color: var(--au-text-2, #334155); }
.pj-avail b{ color: var(--au-ok, #10b981); font-size: 14px; }

.pj-badge{
  padding: 6px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.pj-badge--ok{ background: rgba(16,185,129,.14); color: #067647; border: 1px solid rgba(16,185,129,.35); }
.pj-badge--bad{ background: rgba(239,68,68,.12); color: #b42318; border: 1px solid rgba(239,68,68,.35); }
.pj-badge--warn{ background: rgba(245,158,11,.14); color: #b45309; border: 1px solid rgba(245,158,11,.4); }
.pj-badge--muted{ background: var(--au-surface-2, rgba(219,234,254,.5)); color: var(--au-text-3, #64748b); border: 1px dashed var(--au-border, rgba(37,99,235,.2)); }

.pj-contact{
  font-size: 13px; font-weight: 800; color: #b45309;
  background: rgba(245,158,11,.12);
  border: 1px dashed rgba(245,158,11,.5);
  border-radius: 12px; padding: 10px 14px;
  text-align: center; line-height: 1.6;
}

.pj-resv{
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; font-weight: 800; color: #b45309;
  border-top: 1px dashed var(--au-border, rgba(37,99,235,.14));
  padding-top: 8px; margin-top: 2px;
}
.pj-resv--none{ color: var(--au-text-4, #94a3b8); font-weight: 600; }
.pj-resv__chip{
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.4);
  color: #b45309;
  padding: 2px 9px; border-radius: 99px; font-size: 11px;
}
.pj-resv__chip b{ color: #92400e; }

.pj-more, .pj-empty, .pj-hint{
  text-align: center; padding: 26px 14px;
  color: var(--au-text-3, #64748b); font-size: 13px;
  background: var(--au-surface, rgba(219,234,254,.35));
  border: 1px dashed var(--au-border, rgba(37,99,235,.16));
  border-radius: 14px;
}
.pj-hint{ font-size: 14px; }
.pj-hint b{ color: var(--au-text-1, #0b0d23); }

/* ===== MODAL: إدارة البراندات ===== */
.pj-modal{ position: fixed; inset: 0; z-index: 1600; display: none; }
.pj-modal.is-open{ display: block; }
.pj-modal__backdrop{
  position: absolute; inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pj-modal__card{
  position: relative;
  width: min(520px, calc(100vw - 24px));
  max-height: 84vh; margin: 7vh auto 0;
  display: flex; flex-direction: column;
  background: var(--au-surface-strong, #fff);
  border: 1px solid var(--au-border-2, rgba(37,99,235,.2));
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(2,6,23,.35);
  overflow: hidden;
}
.pj-modal__head{
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 16px 18px 10px;
}
.pj-modal__title{ font-size: 16px; font-weight: 900; color: var(--au-text-1, #0b0d23); }
.pj-modal__sub{ font-size: 11.5px; color: var(--au-text-3, #64748b); margin-top: 4px; line-height: 1.6; }
.pj-modal__x{
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  border: 1px solid var(--au-border, rgba(37,99,235,.18));
  background: var(--au-surface-2, rgba(219,234,254,.5));
  color: var(--au-text-2, #334155); cursor: pointer; font-size: 14px;
}
.pj-modal__x:hover{ background: var(--au-bad, #ef4444); color: #fff; border-color: transparent; }
.pj-modal__body{ padding: 0 18px 18px; overflow-y: auto; }
.pj-modal__body > input{
  width: 100%; height: 40px; padding: 0 12px; margin-bottom: 10px;
  border-radius: 11px;
  border: 1px solid var(--au-border, rgba(37,99,235,.18));
  background: var(--au-surface, #fff);
  color: var(--au-text-1, #0b0d23);
  font-size: 13px; font-family: inherit; outline: none;
}

.pj-brandrow{
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--au-border, rgba(37,99,235,.12));
  margin-bottom: 6px;
  background: var(--au-surface, #fff);
}
.pj-brandrow__name{ font-size: 13.5px; font-weight: 800; color: var(--au-text-1, #0b0d23); }
.pj-switch{ display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.pj-switch input{ width: 18px; height: 18px; accent-color: var(--au-ok, #10b981); cursor: pointer; }
.pj-switch__lbl{ font-size: 12px; font-weight: 800; color: var(--au-text-2, #334155); min-width: 62px; }

/* ===== موبايل ===== */
@media (max-width: 640px){
  .pj-card{ grid-template-columns: 1fr; }
  .pj-card__side{ justify-content: flex-start; }
  .pj-need{ width: 100%; }
  .pj-select{ flex: 1; }
}
