/* /public_html/assets/css/dashboard-requests.css */

/* Layout principal */
.requests-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 14px 12px 18px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 980px) {
  .requests-panel {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }
}

/* Cards */
.req-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.req-card-title {
  padding: 14px 14px 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
}

.req-card-body {
  padding: 12px 14px 16px;
}

/* Form grids */
.req-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .req-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Inputs - harmonise un peu si ton thème le permet */
.req-card .input {
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
}

.req-card .input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.req-card .form-label {
  font-size: 12px;
  opacity: 0.82;
  margin-bottom: 6px;
}

.req-card .form-hint {
  margin-top: 8px;
  opacity: 0.78;
  font-size: 12.5px;
}

/* Actions */
.form-actions {
  margin-top: 12px;
}

/* Checkbox */
.req-check {
  display: flex;
  gap: 10px;
  align-items: center;
  user-select: none;
  font-size: 13px;
  opacity: 0.92;
}

.req-check input {
  transform: scale(1.05);
}

/* Historique toolbar */
.req-history-toolbar {
  margin-bottom: 12px;
}

.req-history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.req-pill {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.20);
  color: rgba(255, 255, 255, 0.90);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.req-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.26);
}

.req-pill.is-active {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.10);
}

/* List */
.req-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Item (base) */
.req-history-item {
  border-radius: 16px;
  padding: 12px 12px 11px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}

.req-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.req-history-type {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.req-history-summary {
  font-size: 13px;
  opacity: 0.92;
  margin-top: 6px;
}

.req-history-date {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.70;
}

/* Status chip */
.req-history-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  white-space: nowrap;
}

.req-status--new {
  background: rgba(255, 210, 90, 0.14);
  border-color: rgba(255, 210, 90, 0.25);
}

.req-status--progress {
  background: rgba(120, 200, 255, 0.12);
  border-color: rgba(120, 200, 255, 0.25);
}

.req-status--done {
  background: rgba(90, 240, 170, 0.12);
  border-color: rgba(90, 240, 170, 0.25);
}

.req-status--rejected {
  background: rgba(255, 120, 120, 0.12);
  border-color: rgba(255, 120, 120, 0.25);
}

/* Details variant */
.req-history-item--details {
  padding: 0;
}

.req-history-item--details summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 12px 11px;
}

.req-history-item--details summary::-webkit-details-marker {
  display: none;
}

.req-history-main {
  min-width: 0;
}

.req-history-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.req-history-expandHint {
  opacity: 0.65;
  transition: transform 140ms ease, opacity 140ms ease;
}

.req-history-item--details[open] .req-history-expandHint {
  opacity: 0.9;
  transform: rotate(180deg);
}

.req-history-replyPreview {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.10);
  font-size: 13px;
  opacity: 0.92;
}

/* Details content */
.req-history-details {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.12);
}

.req-kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.req-kv:last-child {
  border-bottom: 0;
}

.req-kv .k {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 800;
}

.req-kv .v {
  font-size: 13px;
  opacity: 0.95;
}

.req-prewrap {
  white-space: pre-wrap;
}

/* =========================================================
   THEME LIGHT – Requests (overrides)
   ========================================================= */

html[data-theme="light"] .req-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html[data-theme="light"] .req-card-title {
  color: rgba(12, 16, 24, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.03),
    rgba(0, 0, 0, 0.00)
  );
}

html[data-theme="light"] .req-card .form-label,
html[data-theme="light"] .req-card .form-hint,
html[data-theme="light"] .req-check {
  color: rgba(12, 16, 24, 0.82);
  opacity: 1;
}

html[data-theme="light"] .req-card .input {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: rgba(12, 16, 24, 0.92);
}

html[data-theme="light"] .req-card .input::placeholder {
  color: rgba(12, 16, 24, 0.45);
}

html[data-theme="light"] .req-card .input:focus {
  border-color: rgba(0, 0, 0, 0.20);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

/* Pills */
html[data-theme="light"] .req-pill {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: rgba(12, 16, 24, 0.86);
}

html[data-theme="light"] .req-pill:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .req-pill.is-active {
  border-color: rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.10);
}

/* Items */
html[data-theme="light"] .req-history-item {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(12, 16, 24, 0.92);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

html[data-theme="light"] .req-history-summary {
  opacity: 0.90;
}

html[data-theme="light"] .req-history-date,
html[data-theme="light"] .req-history-expandHint {
  opacity: 0.62;
}

/* Status chip (base) */
html[data-theme="light"] .req-history-status {
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.04);
  color: rgba(12, 16, 24, 0.86);
}

/* Status colors remain, just a bit more visible on light */
html[data-theme="light"] .req-status--new {
  background: rgba(255, 210, 90, 0.22);
  border-color: rgba(255, 210, 90, 0.38);
}

html[data-theme="light"] .req-status--progress {
  background: rgba(120, 200, 255, 0.20);
  border-color: rgba(120, 200, 255, 0.36);
}

html[data-theme="light"] .req-status--done {
  background: rgba(90, 240, 170, 0.20);
  border-color: rgba(90, 240, 170, 0.34);
}

html[data-theme="light"] .req-status--rejected {
  background: rgba(255, 120, 120, 0.20);
  border-color: rgba(255, 120, 120, 0.34);
}

/* Details */
html[data-theme="light"] .req-history-details {
  border-top: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.03);
}

html[data-theme="light"] .req-kv {
  border-bottom: 1px dashed rgba(0,0,0,0.10);
}

html[data-theme="light"] .req-kv .k {
  color: rgba(12, 16, 24, 0.70);
  opacity: 1;
}

html[data-theme="light"] .req-kv .v {
  color: rgba(12, 16, 24, 0.92);
  opacity: 1;
}