/* Ambiance Admin : fond forestier dedie, distinct de l'accueil. */
body.admin-body {
  min-height: 100vh;
  background: #071b16 url("assets/home-forest-bg.png") center / cover fixed no-repeat;
}

.admin-body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(225, 239, 230, .8), rgba(209, 229, 215, .62));
}

.admin-body .topbar,
.admin-body .app-shell {
  position: relative;
  z-index: 1;
}

.admin-body .topbar {
  height: auto;
  min-height: 68px;
  background: rgba(4, 29, 22, .7);
  border-bottom-color: rgba(216, 182, 108, .92);
  box-shadow: 0 9px 24px rgba(3, 25, 19, .25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-body .brand strong { color: #fff7dc; }
.admin-body .brand small,
.admin-body .local-state { color: rgba(236, 245, 238, .84); }
.admin-body .season-badge {
  border: 1px solid rgba(255, 241, 203, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}

.admin-body .page-heading {
  padding: 7px 10px 16px;
  border-bottom: 1px solid rgba(178, 140, 62, .58);
}

.admin-body .page-heading h1 {
  color: #0c3028;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 3vw, 42px);
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-body .eyebrow { color: #876318; }
.admin-body .page-description {
  margin: 0 0 3px;
  color: #315c51;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.admin-body .filters,
.admin-body .summary-grid article,
.admin-body .table-frame,
.admin-body .details-panel {
  border-color: rgba(36, 79, 67, .22);
  background: rgba(250, 253, 250, .84);
  box-shadow: 0 9px 24px rgba(13, 48, 39, .1), inset 0 1px 0 rgba(255, 255, 255, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-body .table-frame { overflow: auto; }
.admin-body th { background: rgba(225, 237, 229, .88); }
.admin-body tbody tr:hover,
.admin-body tbody tr.selected { background: rgba(226, 242, 221, .72); }
.admin-body .details-title,
.admin-body .detail-actions,
.admin-body .money-row,
.admin-body .details-section { border-color: rgba(33, 78, 66, .15); }

/* Boutons : meme materiau transparent que les modules de l'accueil. */
.admin-body :is(.app-shell, dialog, .topbar) .button,
.admin-body :is(.app-shell, dialog) .beater-tab,
.admin-body :is(.app-shell, dialog) .choice-button,
.admin-body :is(.app-shell, dialog) .icon-button {
  border-color: rgba(255, 243, 211, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px rgba(6, 37, 29, .16);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease;
}

.admin-body :is(.app-shell, dialog, .topbar) .button:not(:disabled):hover,
.admin-body :is(.app-shell, dialog) .beater-tab:not(:disabled):hover,
.admin-body :is(.app-shell, dialog) .choice-button:not(:disabled):hover,
.admin-body :is(.app-shell, dialog) .icon-button:not(:disabled):hover {
  filter: brightness(1.09);
  border-color: rgba(231, 192, 110, .92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 9px 18px rgba(6, 37, 29, .21);
  transform: translateY(-1px);
}

.admin-body :is(.app-shell, dialog, .topbar) .button:not(:disabled):active,
.admin-body :is(.app-shell, dialog) .beater-tab:not(:disabled):active,
.admin-body :is(.app-shell, dialog) .choice-button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: inset 0 2px 5px rgba(7, 42, 33, .2);
}

.admin-body :is(.app-shell, dialog, .topbar) .button:disabled {
  border-color: rgba(255, 255, 255, .14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15) !important;
}

/* Neutres et validations. */
.admin-body :is(.app-shell, dialog) .button.ghost {
  background: rgba(255, 255, 255, .46) !important;
  border-color: rgba(29, 76, 63, .35) !important;
  color: #194d42 !important;
}

.admin-body :is(.app-shell, dialog) .button.primary,
.admin-body :is(.app-shell, dialog) .beater-tab.active {
  background: rgba(21, 92, 80, .76) !important;
  color: #fff !important;
}

.admin-body :is(.app-shell, dialog) .button.secondary,
.admin-body :is(.app-shell, dialog) .action-gate {
  background: rgba(211, 231, 111, .77) !important;
  border-color: rgba(80, 103, 29, .34) !important;
  color: #203321 !important;
}

.admin-body :is(.app-shell, dialog) .action-gate.is-open {
  background: rgba(191, 63, 66, .76) !important;
  color: #fff !important;
}

.admin-body :is(.app-shell, dialog) .action-gate.is-closed {
  background: rgba(214, 237, 102, .77) !important;
  color: #203321 !important;
}

.admin-body :is(.app-shell, dialog) .button.danger,
.admin-body :is(.app-shell, dialog) .action-close-hunt,
.admin-body :is(.app-shell, dialog) .action-cancel-registration,
.admin-body :is(.app-shell, dialog) .document-preview-danger {
  background: rgba(184, 66, 66, .78) !important;
  color: #fff !important;
}

/* Les couleurs de reperage restent distinctes, avec une transparence commune. */
.admin-body :is(.app-shell, dialog) .action-display { background: rgba(23, 109, 120, .76) !important; color: #fff !important; }
.admin-body :is(.app-shell, dialog) :is(.action-scan-target, .action-individual, .action-email-report) { background: rgba(36, 88, 115, .76) !important; color: #fff !important; }
.admin-body :is(.app-shell, dialog) .action-add { background: rgba(23, 105, 93, .76) !important; color: #fff !important; }
.admin-body :is(.app-shell, dialog) :is(.action-replace, .action-clear) { background: rgba(83, 106, 99, .76) !important; color: #fff !important; }
.admin-body :is(.app-shell, dialog) :is(.action-beaters, .action-hunt-pdf) { background: rgba(138, 103, 20, .78) !important; color: #fff !important; }
.admin-body :is(.app-shell, dialog) .action-hunt-table { background: rgba(140, 48, 40, .78) !important; color: #fff !important; }
.admin-body :is(.app-shell, dialog) .action-admin-register { background: rgba(36, 88, 115, .78) !important; color: #fff !important; }

.admin-body :is(.app-shell, dialog) .choice-button { background: rgba(255, 255, 255, .67); }
.admin-body :is(.app-shell, dialog) .paid-choice { background: rgba(237, 246, 238, .75); }
.admin-body :is(.app-shell, dialog) .debt-choice { background: rgba(255, 247, 230, .75); }
.admin-body :is(.app-shell, dialog) .icon-button {
  border: 1px solid rgba(25, 72, 60, .26);
  border-radius: 50%;
  background: rgba(255, 255, 255, .54);
  color: var(--pine-deep);
}

/* Le hub conserve ses reperes fonctionnels, mais adopte le verre teinte de l'accueil. */
.admin-body .topbar .header-reset { background: rgba(137, 63, 45, .72) !important; border-color: rgba(255, 224, 207, .36) !important; }
.admin-body .topbar .top-closure { background: rgba(184, 66, 66, .76) !important; border-color: rgba(255, 230, 225, .36) !important; }
.admin-body .topbar .action-accounts { background: rgba(49, 76, 107, .76) !important; border-color: rgba(225, 237, 252, .34) !important; color: #fff !important; }
.admin-body .topbar .action-kiosk { background: rgba(8, 85, 75, .76) !important; border-color: rgba(222, 246, 239, .32) !important; color: #fff !important; }
.admin-body .topbar .action-scan { background: rgba(33, 77, 108, .76) !important; border-color: rgba(224, 241, 253, .32) !important; color: #fff !important; }
.admin-body .topbar .action-back { background: rgba(15, 59, 49, .74) !important; border-color: rgba(235, 245, 238, .32) !important; color: #fff !important; }

.admin-body .app-shell .summary-eye {
  border: 1px solid rgba(25, 72, 60, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.admin-body .action-cancel-registration::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23194d42' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") !important;
}

.admin-body .action-admin-register::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h10l4 4v14H5z'/%3E%3Cpath d='M9 3v5h6M8 15l2.5 2.5L16 12'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

#adminRulesSignatureCanvas {
  display: block;
  width: 100%;
  height: 260px;
  margin-top: 14px;
  border: 2px solid var(--pine);
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.admin-body #adminRulesPhone {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 54px;
  padding: 0 13px;
  border: 1px solid #bac6c5;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
}

.admin-body #adminRulesPhone:focus {
  outline: 3px solid #d6ed66;
  outline-offset: 1px;
}

.admin-body .hunt-table-photo { position: relative; }
.admin-body .hunt-table-photo-delete {
  position: absolute;
  z-index: 1;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 227, 223, .8);
  border-radius: 50%;
  background: rgba(166, 53, 46, .9);
  box-shadow: 0 2px 7px rgba(42, 18, 15, .28);
  cursor: pointer;
}

.admin-body .hunt-table-photo-delete::before {
  content: "";
  width: 15px;
  height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
}

.admin-body .hunt-table-photo-delete:hover { filter: brightness(1.1); }

@media (min-width: 1001px) {
  .admin-body .details-panel {
    max-height: calc(100vh - 32px);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-color: #9aafa7 transparent;
  }

  .admin-body .details-panel::-webkit-scrollbar { width: 10px; }
  .admin-body .details-panel::-webkit-scrollbar-thumb { background: #b9c9c2; border: 3px solid rgba(255, 255, 255, .8); border-radius: 999px; }
}

@media (max-width: 1000px) {
  .admin-body .details-panel { max-height: none; overflow: visible; }
  .admin-body .page-heading { padding-inline: 0; }
}

@media (max-width: 640px) {
  .admin-body { background-attachment: scroll; }
  .admin-body .page-description { font-size: 14px; }
}
