:root {
  --a-bg: #f4f1ea;
  --a-panel: #ffffff;
  --a-border: #d8d3c6;
  --a-strong: #2b2b2b;
  --a-text: #1f1f1f;
  --a-muted: #6b6b6b;
  --a-accent: #c0392b;
  --a-ok: #2f8f46;
  --a-warn: #c98a00;
  --a-shadow: rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --a-bg: #17171a;
    --a-panel: #232327;
    --a-border: #3a3a40;
    --a-strong: #e8e6df;
    --a-text: #f0efe9;
    --a-muted: #a0a0a8;
    --a-accent: #e0574a;
    --a-ok: #4fb96a;
    --a-warn: #e0a52b;
    --a-shadow: rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

body.admin {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--a-bg);
  color: var(--a-text);
}

/* --- layout ------------------------------------------------------------- */

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-nav {
  background: var(--a-panel);
  border-right: 1px solid var(--a-border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-brand {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  color: var(--a-strong);
  text-decoration: none;
}

.admin-brand small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--a-muted);
  text-transform: none;
}

.admin-nav a.nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--a-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-nav a.nav-link:hover { background: var(--a-bg); }

.admin-nav a.nav-link.active {
  background: var(--a-accent);
  color: #fff;
}

.nav-spacer { flex: 1; }

.nav-user {
  border-top: 1px solid var(--a-border);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--a-muted);
}

.nav-user strong { color: var(--a-text); display: block; font-size: 0.9rem; }

.admin-main {
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem;
  max-width: 1200px;
}

.admin-main h1 {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
}

.page-lead {
  margin: 0 0 1.6rem;
  color: var(--a-muted);
  font-size: 0.9rem;
}

/* --- panels & tables ---------------------------------------------------- */

.panel {
  background: var(--a-panel);
  border: 1px solid var(--a-border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px var(--a-shadow);
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--a-muted);
}

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.data th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--a-muted);
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--a-border);
  white-space: nowrap;
}

table.data td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--a-border);
  vertical-align: middle;
}

table.data tr:last-child td { border-bottom: none; }

/* an age category, indented under its sport in the pages list */
table.data tr.child-row td { padding-top: 0.4rem; padding-bottom: 0.4rem; }
table.data tr.child-row td:nth-child(2) { padding-left: 1.4rem; opacity: 0.85; }
table.data tr.child-row td:nth-child(3) { font-weight: 400; }

.row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.row-actions form { display: inline; }

/* --- stats -------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--a-panel);
  border: 1px solid var(--a-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

.stat .num { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat .lbl { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--a-muted); }
.stat.alert .num { color: var(--a-accent); }
a.stat:hover { border-color: var(--a-accent); }

/* --- forms -------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--a-muted);
}

/* up to five video links under one heading, one per line */
.video-links-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 560px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--a-muted);
}

.video-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-row .video-num {
  flex: 0 0 1.3em;
  text-align: right;
  font-weight: 700;
  color: var(--a-muted);
}

.video-row input {
  flex: 1 1 auto;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="file"],
select,
textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  background: var(--a-bg);
  color: var(--a-text);
  width: 100%;
}

textarea {
  min-height: 340px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  resize: vertical;
}

/* a WYSIWYG editor stands in front of the big HTML textareas (wysiwyg.js);
   the textarea itself is hidden but stays in the form, carrying the value */
.wysiwyg { margin-top: 0.35rem; }

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem;
  border: 1px solid var(--a-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--a-panel);
}

.wysiwyg-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 2rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--a-text);
  cursor: pointer;
}

.wysiwyg-btn:hover { background: var(--a-bg); border-color: var(--a-border); }

.wysiwyg-split {
  width: 1px;
  align-self: stretch;
  margin: 0.2rem 0.3rem;
  background: var(--a-border);
}

.wysiwyg-mode-btn {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--a-muted);
}

.wysiwyg-mode-btn.is-active { background: var(--a-accent); color: #fff; }

.wysiwyg-editor {
  min-height: 340px;
  max-height: 640px;
  overflow-y: auto;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--a-border);
  border-radius: 0 0 8px 8px;
  background: var(--a-bg);
  color: var(--a-text);
  line-height: 1.55;
}

.wysiwyg-editor:focus-visible,
.wysiwyg-editor:focus { outline: 2px solid var(--a-accent); outline-offset: -1px; }
.wysiwyg-editor p { margin: 0 0 0.8em; }
.wysiwyg-editor img { max-width: 100%; }
.wysiwyg-editor[hidden] { display: none; }

/* a short message (like the sign-up confirmation popup) does not need the
   full-height box the Info text and bio fields get */
.wysiwyg-editor--compact { min-height: 110px; max-height: 320px; }

/* a one-line field (the page title): no room to grow, and no scrollbar */
.wysiwyg-editor--inline {
  min-height: 0;
  max-height: none;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem 0.7rem;
}
.wysiwyg-editor--inline p { display: inline; margin: 0; }

/* the raw-HTML textarea keeps the same footprint whichever mode is shown */
.wysiwyg textarea[data-wysiwyg] { border-radius: 0 0 8px 8px; }

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--a-accent);
  outline-offset: 1px;
}

label.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

label.check input { width: auto; }

.form-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  background: var(--a-panel);
  color: var(--a-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.btn:hover { border-color: var(--a-strong); }
.btn.primary { background: var(--a-accent); border-color: var(--a-accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: var(--a-ok); border-color: var(--a-ok); color: #fff; }
.btn.danger { color: var(--a-accent); }
.btn.danger:hover { background: var(--a-accent); color: #fff; border-color: var(--a-accent); }
.btn.small { font-size: 0.75rem; padding: 0.3rem 0.6rem; }

/* --- badges & flashes --------------------------------------------------- */

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.badge.pending { color: var(--a-warn); }
.badge.approved { color: var(--a-ok); }
.badge.rejected { color: var(--a-accent); }
.badge.info { color: var(--a-muted); }

.flashes { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.5rem; }

.flashes li {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid;
}

.flashes li.ok { color: var(--a-ok); background: color-mix(in srgb, var(--a-ok) 10%, transparent); }
.flashes li.error { color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 10%, transparent); }

/* --- login -------------------------------------------------------------- */

body.admin.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* language selector (admin.css has no copy of the public .langbar rules) */
.langbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0 0 1.2rem;
  font-size: 0.78rem;
}

.langbar-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--a-muted);
}

.langbar select {
  width: auto;
  min-width: 150px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}

.login-wrap {
  width: 100%;
  max-width: 380px;
}

.login-wrap .langbar {
  justify-content: flex-end;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--a-muted);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--a-panel);
  border: 1px solid var(--a-border);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  box-shadow: 0 10px 30px var(--a-shadow);
}

.login-card h1 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-card .sub { margin: 0 0 1.5rem; color: var(--a-muted); font-size: 0.85rem; }
.login-card .field + .field { margin-top: 1rem; }
.login-card .btn { width: 100%; margin-top: 1.4rem; }
.login-back { display: block; text-align: center; margin-top: 1.2rem; font-size: 0.8rem; color: var(--a-muted); }

.hint { font-size: 0.78rem; color: var(--a-muted); margin: 0.4rem 0 0; font-weight: 400; text-transform: none; letter-spacing: normal; }

.banner-preview {
  border: 1px dashed var(--a-border);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  margin-bottom: 1rem;
}

.banner-preview img { max-width: 100%; max-height: 180px; }

@media (max-width: 800px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: none; border-bottom: 1px solid var(--a-border); }
  .admin-brand { width: 100%; margin-bottom: 0.5rem; }
  .nav-spacer { display: none; }
  .nav-user { border-top: none; padding-top: 0; margin-top: 0; }
}

.admin-main a:not(.btn):not(.stat) {
  color: var(--a-accent);
  text-decoration: none;
  font-weight: 600;
}

.admin-main a:not(.btn):not(.stat):hover { text-decoration: underline; }

.lang-switch {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: 420px;
}

.reference-text {
  margin-top: 0.6rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--a-border);
  background: var(--a-bg);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

img.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
img.thumb-lg { max-width: 160px; border-radius: 8px; display: block; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}

.photo-item {
  margin: 0;
  border: 1px solid var(--a-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--a-bg);
  display: flex;
  flex-direction: column;
}

.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }

.photo-item figcaption {
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  color: var(--a-muted);
  flex: 1;
}

.photo-item form { padding: 0 0.6rem 0.6rem; }

.player-details summary { cursor: pointer; }

.player-list {
  margin: 0.4rem 0 0;
  padding-left: 1.4rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* --- bulk translation ---------------------------------------------------- */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.4rem;
}

.lang-pick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  background: var(--a-bg);
  cursor: pointer;
  font-size: 0.88rem;
}

.lang-pick:hover { border-color: var(--a-accent); }
.lang-pick input { width: auto; margin: 0; }
.lang-name { flex: 1; }

.lang-state {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--a-muted);
  white-space: nowrap;
}

.lang-state.is-full { color: var(--a-ok); font-weight: 700; }

.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--a-bg);
  border: 1px solid var(--a-border);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--a-accent);
  transition: width 0.4s ease;
}

.progress-line {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0.7rem 0 1rem;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar { transition: none; }
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.4rem;
}

/* --- crop control -------------------------------------------------------- */

.crop { max-width: 260px; }

.crop-frame {
  position: relative;
  width: 100%;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--a-bg);
}

.crop-frame img { width: 100%; height: 100%; display: block; }

.crop-hint { margin-top: 0.4rem; }

.cat-grid { display: grid; gap: 0.5rem; max-width: 460px; }

.cat-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 0.5rem;
  align-items: center;
}

.cat-select { width: auto; min-width: 110px; padding: 0.25rem 0.4rem; font-size: 0.8rem; }

.section-head {
  font-size: 1.1rem;
  margin: 2.2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--a-border);
  text-transform: none;
  letter-spacing: 0;
  color: var(--a-text);
}

.icon-head {
  margin: 1.2rem 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--a-muted);
}

.stats-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stats-bar .field { max-width: 220px; }
.stats-bar .row-actions { align-items: center; }

/* --- visitors-over-time chart --------------------------------------- */

.stats-chart {
  margin: 0;
}

.stats-chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  font-family: inherit;
}

.stats-chart .col {
  fill: var(--a-accent);
}

.stats-chart .hit {
  fill: transparent;
}

.stats-chart .col-group:hover .col {
  fill: var(--a-strong);
}

.stats-chart .col-group:hover .hit {
  fill: color-mix(in srgb, var(--a-accent) 9%, transparent);
}

.stats-chart .axis { stroke: var(--a-strong); stroke-width: 1; }
.stats-chart .grid { stroke: var(--a-border); stroke-width: 1; }

.stats-chart .axis-text {
  fill: var(--a-muted);
  font-size: 11px;
}

.stats-chart .tick { text-anchor: middle; }

.stats-chart .peak-text {
  fill: var(--a-text);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}

.stats-chart figcaption {
  margin-top: 0.4rem;
}

.stats-chart-table {
  margin-top: 0.9rem;
}

.stats-chart-table > summary {
  cursor: pointer;
  display: inline-block;
  padding: 0.2rem 0;
}

@media (prefers-reduced-motion: reduce) {
  .stats-chart .col, .stats-chart .hit { transition: none; }
}

.order-cell { display: flex; gap: 0.25rem; }
.order-cell .btn { padding: 0.15rem 0.45rem; line-height: 1.1; }
.order-cell button:disabled { opacity: 0.35; cursor: default; }

/* Icon preview in the page editor: the same square tile the visitor sees, so
   the admin can slide the title up and down and watch where it lands. */
.icon-preview {
  position: relative;
  width: 160px;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--a-strong);
  border-radius: 14px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.icon-preview-label {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: calc(var(--label-pos, 100) * 1%);
  transform: translateY(calc(var(--label-pos, 100) * -1%));
  text-align: center;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #000;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.pos-title {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.pos-slider {
  width: 100%;
  max-width: 200px;
  accent-color: var(--a-accent);
}

.pos-scale {
  display: flex;
  justify-content: space-between;
  max-width: 200px;
  font-size: 0.72rem;
  color: var(--a-muted);
}

.line-input {
  margin-bottom: 0.4rem;
}

/* the preview is drawn from admin.css alone, so it needs its own copy of the
   rule that stacks a two-line caption (style.css is not loaded in here) */
.icon-preview .label-line {
  display: block;
  line-height: 1.15;
}

/* the caption preview when the icon has no picture of its own */
.icon-preview.no-photo {
  background-color: var(--a-panel);
  /* no picture means the built-in icon, whose caption sits in the middle */
  --label-pos: 50;
}

/* The text-above-the-banner preview shows the real thing, so admin.css needs
   the handful of rules style.css uses for it. */
.header-preview-wrap {
  margin-top: 1.2rem;
}

.header-preview {
  margin-top: 0.4rem;
  padding: 1rem;
  border: 1px dashed var(--a-border);
  border-radius: 10px;
  background: var(--a-bg);
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-preview .header-text {
  width: 100%;
  margin: 0;
  text-align: center;
  color: var(--a-text);
  font-weight: 700;
  line-height: 1.25;
  white-space: pre-line;
}

.header-preview .header-text.has-border {
  border: 2px solid var(--a-strong);
  border-radius: 10px;
  padding: 0.8rem 1rem;
}

/* the preview shows the exact pixel size, capped so a huge headline still
   fits the panel rather than pushing it sideways */
.header-preview .header-text {
  font-size: min(calc(var(--header-px, 34) * 1px), 12vw);
}

.header-preview .font-system { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
.header-preview .font-serif { font-family: Georgia, "Times New Roman", Times, serif; }
.header-preview .font-mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.header-preview .font-condensed { font-family: "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif; }
.header-preview .font-rounded { font-family: "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif; }

/* score boxes sit side by side with the colon between them */
.score-cell {
  white-space: nowrap;
}

.score-cell input {
  width: 4.5rem;
  display: inline-block;
}

.score-cell span {
  margin: 0 0.3rem;
  font-weight: 700;
}

.admin .results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin .results-table th,
.admin .results-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--a-border);
}

.admin .results-table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--a-muted);
}

.login-remember {
  margin-top: 0.4rem;
}

.login-hint {
  margin: 0.3rem 0 0.9rem;
  font-size: 0.78rem;
}

/* --- light-touch motion (no entrance animations; this is a work tool) --- */

.btn,
.admin-nav a.nav-link,
.a11y-opt {
  transition: transform 0.14s ease, box-shadow 0.14s ease,
              background 0.14s ease, color 0.14s ease, border-color 0.14s ease,
              filter 0.14s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(0, 0, 0, 0.12); }
.btn:active { transform: translateY(0) scale(0.97); box-shadow: none; }

.panel {
  transition: box-shadow 0.18s ease;
}
.panel:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

table.data tbody tr {
  transition: background 0.13s ease;
}

.flashes li {
  animation: a-flash-in 0.28s ease both;
}

@keyframes a-flash-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .admin-nav a.nav-link, .a11y-opt, .panel, table.data tbody tr {
    transition: none;
  }
  .btn:hover, .btn:active, .panel:hover { transform: none; box-shadow: none; }
  .flashes li { animation: none; }
}
