/* طلبات الزبائن — wide amartil shell + multi-column card grid */

.page-client-requests .page-head__title,
.page-requests-browse .page-head__title {
  color: var(--accent);
  font-weight: 700;
  animation: cr-fade-up .55s ease both;
}
.page-client-requests .page-head__sub,
.page-requests-browse .page-head__sub {
  color: var(--muted, #717171);
  animation: cr-fade-up .65s ease .08s both;
}

.req-browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 22px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--paper, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-sm);
}

.req-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.req-category-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--ab-radius-pill, 40px);
  background: var(--paper, #fff);
  border: 1px solid var(--line-strong, #ddd);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.req-category-tab:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  color: var(--ink);
}
.req-category-tab.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.req-category-tab__count {
  display: inline-flex;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(34, 34, 34, 0.08);
  color: inherit;
}
.req-category-tab.is-active .req-category-tab__count {
  background: rgba(255, 255, 255, 0.18);
}

.req-code-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.req-code-search-label {
  width: 100%;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted, #717171);
}
.req-code-search-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--line-strong, #ddd);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.req-code-search-input {
  border: 0;
  padding: 10px 12px;
  min-width: 140px;
  font: inherit;
  direction: ltr;
  text-align: left;
  background: transparent;
}
.req-code-search-input:focus {
  outline: none;
}
.req-code-search-btn {
  border: 0;
  border-inline-start: 1px solid var(--line);
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.req-code-search-btn:hover {
  background: var(--accent-deep, #e56a00);
}
.req-code-search-clear {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--danger);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}

.req-browse-meta {
  margin: 0 0 14px;
  color: var(--muted, #717171);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Force amartil multi-column on both browse routes (overrides single-column stacks) */
.page-client-requests .req-cards-browse,
.page-requests-browse .req-cards-browse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 1rem 0;
  align-items: start;
}

.page-client-requests .amartil-req-card,
.page-requests-browse .amartil-req-card {
  font-size: 0.95rem;
  padding: 14px 15px;
  min-width: 0;
  width: 100%;
  max-width: none;
}
.page-client-requests .amartil-req-card .req-badge,
.page-requests-browse .amartil-req-card .req-badge {
  font-size: 0.95rem;
}
.page-client-requests .amartil-req-card .req-intro,
.page-requests-browse .amartil-req-card .req-intro {
  font-size: 0.95rem;
  line-height: 1.7;
}
.page-client-requests .amartil-req-card .req-details,
.page-requests-browse .amartil-req-card .req-details {
  font-size: 0.88rem;
}
.page-client-requests .amartil-req-card .req-chips,
.page-requests-browse .amartil-req-card .req-chips {
  font-size: 0.85rem;
}
.page-client-requests .amartil-req-card .req-countdown,
.page-requests-browse .amartil-req-card .req-countdown {
  font-size: 0.9rem;
}
.page-client-requests .amartil-req-card .req-countdown.urgent,
.page-requests-browse .amartil-req-card .req-countdown.urgent {
  font-size: 0.95rem;
  min-height: 42px;
  padding: 10px 12px;
}

.lobby-req-card {
  animation: cr-rise .5s ease both;
}
.lobby-req-card:nth-child(2) { animation-delay: .04s; }
.lobby-req-card:nth-child(3) { animation-delay: .08s; }
.lobby-req-card:nth-child(4) { animation-delay: .12s; }

.req-cta-hint {
  margin: -4px 0 12px;
  font-size: 0.85rem;
  color: var(--muted, #717171);
  text-align: center;
}

@keyframes cr-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cr-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1199px) {
  .page-client-requests .req-cards-browse,
  .page-requests-browse .req-cards-browse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .page-client-requests .req-cards-browse,
  .page-requests-browse .req-cards-browse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .req-browse-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 14px;
    min-width: 0;
    overflow: hidden;
  }
  .req-toolbar {
    width: 100%;
    min-width: 0;
    gap: 8px;
  }
  .req-category-tab {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.92rem;
  }
  .req-code-search {
    width: 100%;
    min-width: 0;
  }
  .req-code-search-group {
    width: 100%;
    min-width: 0;
  }
  .req-code-search-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
  }
  .req-code-search-btn {
    flex: 0 0 auto;
    min-width: 4.5rem;
    min-height: 44px;
    padding: 10px 16px;
  }
  .page-client-requests .req-cards-browse,
  .page-requests-browse .req-cards-browse {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .req-browse-toolbar { padding: 12px; }
  .req-category-tab { font-size: 0.88rem; padding: 10px 12px; }
}
