/**
 * RShop — coquille administration (/admin)
 * Menu horizontal, fond sombre, violet marque
 */

/* --- Page --- */
body.adm-page-v2 {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(165deg, #0c0a12 0%, #12101c 40%, #0e0c14 100%);
  color: var(--rs-text, #ece8f5);
  font-family: var(--rs-font-sans, 'Inter', system-ui, sans-serif);
}

body.adm-page-v2 .adm-gate {
  max-width: 42rem;
  margin: 3rem auto;
  padding: 1.5rem;
}

/* --- App shell --- */
.adm-shell {
  --adm-violet: #7c3aed;
  --adm-violet-dim: rgba(124, 58, 237, 0.22);
  --adm-surface: rgba(22, 18, 32, 0.92);
  --adm-border: rgba(180, 160, 230, 0.14);
  --adm-muted: #9b91b3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.adm-shell__surface {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.25rem 1.5rem;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .adm-shell__surface {
    padding: 0 2rem 2rem;
  }
}

/* --- Header --- */
.adm-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  padding: 1rem 0 0.75rem;
  margin-bottom: 0.25rem;
  background: linear-gradient(180deg, rgba(12, 10, 18, 0.97) 60%, rgba(12, 10, 18, 0.85) 100%);
  border-bottom: 1px solid var(--adm-border);
  backdrop-filter: blur(10px);
}

.adm-top__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.adm-top__brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--adm-border);
}

.adm-top__brand span {
  font-family: var(--rs-font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.adm-top__titles {
  flex: 1;
  min-width: 200px;
}

.adm-top__titles h1 {
  margin: 0;
  font-family: var(--rs-font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.adm-top__sub {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--adm-muted);
  line-height: 1.35;
  max-width: 36rem;
}

.adm-top__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

@media (min-width: 900px) {
  .adm-top__actions {
    width: auto;
    justify-content: flex-end;
  }
}

.adm-top__search {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  padding: 0 0.65rem;
  height: 38px;
}

.adm-top__search input {
  flex: 1;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.8125rem;
  outline: none;
  min-width: 0;
}

.adm-top__search input::placeholder {
  color: rgba(155, 145, 179, 0.7);
}

.adm-btn-boutique {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #f5f0ff;
  background: linear-gradient(135deg, var(--adm-violet) 0%, #5b21b6 100%);
  border: none;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 2px 12px var(--adm-violet-dim);
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.adm-btn-boutique:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: #fff;
}

.adm-top__profile {
  min-height: 38px;
  display: flex;
  align-items: center;
}

/* Badge session (optionnel) */
.adm-top__badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  background: var(--adm-violet-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-right: 0.35rem;
  display: none;
}

@media (min-width: 640px) {
  .adm-top__badge {
    display: inline-block;
  }
}

/* --- Menu horizontal --- */
.adm-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0 1rem;
  margin: 0 -0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--adm-violet-dim) transparent;
  -webkit-overflow-scrolling: touch;
}

.adm-nav::-webkit-scrollbar {
  height: 4px;
}

.adm-nav::-webkit-scrollbar-thumb {
  background: var(--adm-violet-dim);
  border-radius: 4px;
}

.adm-nav__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--adm-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.adm-nav__btn:hover {
  color: #e8e0f5;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.25);
}

.adm-nav__btn--active {
  color: #faf5ff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35) 0%, rgba(91, 33, 182, 0.25) 100%);
  border-color: rgba(196, 181, 253, 0.35);
  box-shadow: 0 0 20px var(--adm-violet-dim);
}

.adm-nav__ico {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.92;
}

/* --- Zone contenu --- */
.adm-main {
  flex: 1;
  padding-top: 0.25rem;
}

.adm-main__inner {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .adm-main__inner {
    padding: 1.5rem 1.75rem 2rem;
  }
}

/* --- Footer bar --- */
.adm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  color: var(--adm-muted);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
}

/* Masquer anciens éléments RCC / hub */
.adm-shell .rcc-aurora,
.adm-shell #admSectionChrome,
.adm-shell #panel-hub,
.adm-shell .adm-cc-hub {
  display: none !important;
}

.adm-shell .rcc-header {
  display: none;
}

.adm-shell .rcc-body.adm-content {
  padding: 0;
  margin: 0;
}

.adm-shell .adm-content__inner.rcc-inner {
  padding: 0;
  max-width: none;
}

.adm-shell .rcc-panels {
  gap: 0;
}

.adm-shell .adm-panel {
  animation: admPanelIn 0.22s ease-out;
}

@keyframes admPanelIn {
  from {
    opacity: 0.75;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Cartes & tableaux : lisibilité */
.adm-shell .acc-card {
  background: rgba(10, 8, 16, 0.55);
  border: 1px solid var(--adm-border);
  border-radius: 14px;
}

.adm-shell .adm-table {
  font-size: 0.8125rem;
}

.adm-shell .adm-hint {
  color: var(--adm-muted);
  font-size: 0.8rem;
}

.adm-shell .rcc-tray {
  margin-top: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--adm-border);
  background: rgba(0, 0, 0, 0.2);
}

/* Commandes : hero un peu plus compact */
.adm-shell .adm-cc-orders-hero {
  padding: 1rem 0 1.25rem;
  margin-bottom: 0.5rem;
}
