.author-orders-page {
  color: #252827;
}

.author-orders-toolbar {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(40, 57, 62, 0.13);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(40, 57, 62, 0.06);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 20px 22px;
}

.author-orders-toolbar-copy {
  display: grid;
  gap: 4px;
}

.author-orders-toolbar-kicker {
  color: var(--author-accent, #28393e);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.author-orders-toolbar-copy strong {
  color: #252827;
  font-size: 1.12rem;
  line-height: 1.3;
}

.author-orders-toolbar-copy small {
  color: #65706d;
  font-size: 0.88rem;
  line-height: 1.45;
}

.author-orders-years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.author-orders-year {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(40, 57, 62, 0.18);
  border-radius: 999px;
  color: #39413f !important;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  min-width: 68px;
  padding: 7px 14px;
  text-decoration: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.author-orders-year:hover,
.author-orders-year:focus {
  border-color: var(--author-accent, #28393e);
  color: var(--author-accent, #28393e) !important;
  transform: translateY(-1px);
}

.author-orders-year.is-active {
  background: var(--author-accent, #28393e);
  border-color: var(--author-accent, #28393e);
  color: #fff !important;
}

.author-order-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.author-order-stat {
  --stat-color: var(--author-accent, #28393e);
  background: #fff;
  border: 1px solid rgba(40, 57, 62, 0.12);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(40, 57, 62, 0.05);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 86px;
  padding: 15px 17px;
}

.author-order-stat.is-paid {
  --stat-color: #2f8051;
}

.author-order-stat.is-pending {
  --stat-color: #a36b12;
}

.author-order-stat.is-cancelled {
  --stat-color: #b44848;
}

.author-order-stat span {
  color: #65706d;
  font-size: 0.79rem;
  font-weight: 700;
  text-transform: uppercase;
}

.author-order-stat strong {
  color: var(--stat-color);
  font-size: 1.45rem;
  line-height: 1;
}

.author-orders-list {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 0 !important;
}

.author-order-card {
  --order-state: #687572;
  --order-state-bg: #f3f6f5;
  background: #fff;
  border: 1px solid rgba(40, 57, 62, 0.13);
  border-radius: 11px;
  box-shadow: 0 14px 32px rgba(40, 57, 62, 0.07);
  overflow: hidden;
}

.author-order-card.is-paid {
  --order-state: #2f8051;
  --order-state-bg: #f0f8f3;
}

.author-order-card.is-pending {
  --order-state: #9b6817;
  --order-state-bg: #fff8e9;
}

.author-order-card.is-cancelled {
  --order-state: #b44848;
  --order-state-bg: #fff4f4;
}

.author-order-card-head {
  align-items: center;
  background: var(--order-state-bg);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 20px;
}

.author-order-heading {
  min-width: 0;
}

.author-order-eyebrow {
  color: #65706d;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.author-order-heading h2 {
  color: #252827;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.author-order-status {
  align-items: center;
  background: #fff;
  border: 1px solid var(--order-state);
  border-radius: 999px;
  color: var(--order-state);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.79rem;
  font-weight: 800;
  gap: 7px;
  line-height: 1;
  padding: 8px 12px;
}

.author-order-overview {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  padding: 0 20px;
}

.author-order-overview-item {
  border-left: 1px solid rgba(40, 57, 62, 0.11);
  display: grid;
  gap: 4px;
  padding: 18px 20px;
}

.author-order-overview-item:first-child {
  border-left: 0;
  padding-left: 0;
}

.author-order-overview-item:last-child {
  padding-right: 0;
}

.author-order-overview-item span {
  color: #697370;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.author-order-overview-item strong {
  color: #252827;
  font-size: 0.98rem;
  line-height: 1.35;
}

.author-order-overview-item.is-total strong {
  color: var(--author-accent, #28393e);
  font-size: 1.2rem;
}

.author-order-details {
  border-top: 1px solid rgba(40, 57, 62, 0.11);
}

.author-order-details > summary {
  align-items: center;
  color: var(--author-accent, #28393e);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  min-height: 52px;
  padding: 12px 20px;
  transition: background-color 0.2s ease;
}

.author-order-details > summary::-webkit-details-marker {
  display: none;
}

.author-order-details > summary:hover,
.author-order-details > summary:focus {
  background: rgba(40, 57, 62, 0.035);
}

.author-order-details-action {
  align-items: center;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  gap: 9px;
}

.author-order-details-count {
  color: #6a7471;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: auto;
}

.author-order-details-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.author-order-details[open] > summary {
  background: rgba(40, 57, 62, 0.035);
}

.author-order-details[open] .author-order-details-chevron {
  transform: rotate(180deg);
}

.author-order-details .when-open {
  display: none;
}

.author-order-details[open] .when-open {
  display: inline;
}

.author-order-details[open] .when-closed {
  display: none;
}

.author-order-lines {
  background: #f8faf9;
  border-top: 1px solid rgba(40, 57, 62, 0.09);
  display: grid;
  gap: 10px;
  padding: 14px 20px 20px;
}

.author-order-line {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(40, 57, 62, 0.11);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 1.5fr) repeat(5, minmax(90px, 0.72fr));
  padding: 13px 14px;
}

.author-order-line > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.author-order-line span {
  color: #707a77;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.author-order-line strong {
  color: #303634;
  font-size: 0.84rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.author-order-line-reference strong {
  color: var(--author-accent, #28393e);
  font-size: 0.92rem;
}

.author-order-book {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.author-order-book img {
  flex: 0 0 auto;
  height: 68px;
  object-fit: cover;
  width: 46px;
}

.author-order-book-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.author-order-book-copy small {
  color: #707a77;
  font-size: 0.72rem;
  line-height: 1.35;
}

.author-order-line-total {
  text-align: right;
}

.author-order-line-total strong {
  color: #252827;
  font-size: 0.94rem;
}

.author-order-lines-empty {
  color: #65706d;
  font-size: 0.88rem;
  margin: 0;
  padding: 8px 0;
}

.author-orders-empty {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(40, 57, 62, 0.13);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(40, 57, 62, 0.07);
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 28px;
  padding: 24px;
}

.author-orders-empty-icon {
  align-items: center;
  background: rgba(40, 57, 62, 0.08);
  border-radius: 50%;
  color: var(--author-accent, #28393e);
  display: inline-flex;
  font-size: 1.15rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.author-orders-empty h2 {
  color: #252827;
  font-size: 1.1rem;
  margin: 0 0 5px;
}

.author-orders-empty p {
  color: #65706d;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.author-orders-empty-link {
  background: var(--author-accent, #28393e);
  border-radius: 7px;
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 11px 15px;
  text-decoration: none !important;
}

@media (max-width: 991px) {
  .author-order-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-order-overview-item,
  .author-order-overview-item:first-child,
  .author-order-overview-item:last-child {
    border-left: 0;
    border-top: 1px solid rgba(40, 57, 62, 0.09);
    padding: 14px 0;
  }

  .author-order-overview-item:nth-child(odd) {
    padding-right: 16px;
  }

  .author-order-overview-item:nth-child(even) {
    border-left: 1px solid rgba(40, 57, 62, 0.09);
    padding-left: 16px;
  }

  .author-order-overview-item:nth-child(-n+2) {
    border-top: 0;
  }

  .author-order-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .author-order-line-reference,
  .author-order-line-total {
    grid-column: auto;
    text-align: left;
  }
}

@media (max-width: 767px) {
  .author-orders-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 17px;
  }

  .author-orders-years {
    justify-content: flex-start;
  }

  .author-orders-year {
    min-height: 36px;
    min-width: 62px;
    padding: 6px 12px;
  }

  .author-order-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-order-stat {
    min-height: 78px;
    padding: 13px 14px;
  }

  .author-order-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .author-order-overview {
    padding: 0 16px;
  }

  .author-order-details > summary {
    min-height: 50px;
    padding: 11px 16px;
  }

  .author-order-details-count {
    display: none;
  }

  .author-order-lines {
    padding: 12px 14px 16px;
  }

  .author-order-line {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .author-order-line-reference,
  .author-order-line-total {
    grid-column: 1 / -1;
  }

  .author-orders-empty {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 20px;
  }

  .author-orders-empty-link {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .author-order-overview-item strong {
    font-size: 0.9rem;
  }

  .author-order-overview-item.is-total strong {
    font-size: 1.05rem;
  }

  .author-order-details-action {
    font-size: 0.82rem;
  }
}

/* Palette ivoire propre à Baudelaire. */
.author-orders-toolbar,
.author-order-stat,
.author-order-card,
.author-orders-empty,
.author-orders-year,
.author-order-status,
.author-order-line {
  background: var(--portal-panel, #fffaf0);
  border-color: var(--portal-border, rgba(71, 68, 63, 0.18));
}

.author-order-lines {
  background: var(--portal-panel-alt, #f2eee5);
  border-color: var(--portal-border, rgba(71, 68, 63, 0.18));
}

.author-order-overview-item,
.author-order-details {
  border-color: var(--portal-border, rgba(71, 68, 63, 0.18));
}
