/* Administration. */

.stats { list-style: none; padding: 0; margin: 0 0 var(--s6); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.stats a {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s3) var(--s4); height: 100%; padding: var(--s5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--e1); color: var(--text); text-decoration: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
}
.stats a:hover { transform: translateY(-2px); box-shadow: var(--e2); border-color: var(--tone-line); color: var(--text); }
.stats strong { justify-self: end; font: 800 2.25rem/1 var(--font-display); letter-spacing: -0.04em; }
.stats a > span:last-child { grid-column: 1 / -1; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }

.callout { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); padding: var(--s5); margin-bottom: var(--s6); border: 1px solid var(--warn-line); border-radius: var(--r-lg); background: var(--warn-bg); }
.callout > div { flex: 1 1 16rem; }
.callout h2 { margin-bottom: var(--s1); }
.callout p { margin: 0; color: var(--text-2); }

.editor { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.editor-main, .editor-side { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
div.editor-main.panel { gap: var(--s5); }
.editor-main > .button, .editor-main.panel > .button { align-self: flex-start; }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); align-items: flex-end; margin: 0 0 var(--s5); padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--e1); }
.toolbar .field { flex: 1 1 13rem; max-width: 24rem; }
.panel .toolbar { box-shadow: none; background: var(--surface-2); margin: var(--s4) 0 0; border-radius: var(--r-md); }
.result-count { margin-bottom: var(--s3); font-weight: 600; }
.has-menus { overflow: visible; }
.has-menus th:first-child { border-top-left-radius: var(--r-lg); }
.has-menus th:last-child { border-top-right-radius: var(--r-lg); }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s4); font-size: var(--fs-sm); color: var(--text-2); }
.more { margin-top: var(--s4); }

.admin-list { list-style: none; padding: 0; margin: 0 0 var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--e1); }
.admin-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: var(--s3) var(--s4); }
.admin-list li + li { border-top: 1px solid var(--border); }
.admin-list li:hover { background: var(--surface-2); }
.admin-list li:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.admin-list li:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.admin-list-text { flex: 1 1 12rem; min-width: 0; }
.panel .admin-list { box-shadow: none; border-radius: var(--r-md); }
.meta-item { display: inline-flex; align-items: center; gap: var(--s1); }
.order-number { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: var(--r-sm); background: var(--surface-3); font: 700 var(--fs-sm) var(--font-display); color: var(--text-2); }
.move { display: inline-flex; gap: var(--s1); margin: 0; }
.move .icon-button { width: 2.5rem; height: 2.5rem; }
.move .icon-button:disabled { opacity: 0.35; cursor: default; background: var(--surface); }
.rename { display: flex; flex: 1 1 18rem; gap: var(--s3); align-items: flex-end; margin: 0; }
.rename .field { flex: 1; }
.status-bar { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s5); padding: var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }

.add-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.add-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); min-height: 5.5rem; padding: var(--s3); border: 1px dashed var(--border-control); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; text-align: center; transition: background-color var(--t), border-color var(--t), transform var(--t) var(--ease); }
.add-tile .icon { width: 1.5rem; height: 1.5rem; color: var(--accent-600); }
.add-tile:hover { background: var(--accent-50); border-color: var(--accent-600); border-style: solid; color: var(--accent-800); transform: translateY(-2px); }
.panel-foot { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--border); }

.form-page { max-width: 38rem; }
.form-page-wide { max-width: 50rem; }
div.form-page, section.form-page.panel { width: 100%; }
section.form-page.panel { padding: clamp(var(--s5), 3vw, var(--s7)); }
.confirm .chip-icon { margin-bottom: var(--s4); }
.credential { background: var(--navy-900); border-radius: var(--r-md); padding: var(--s5); text-align: center; }
.credential code { font-size: clamp(1.15rem, 5vw, 1.6rem); letter-spacing: 0.04em; font-weight: 600; color: var(--teal-300); user-select: all; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s4); font: 400 0.85rem/1.6 var(--font-mono); }
.progress-list { list-style: none; padding: 0; }
.progress-list li { padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.progress-list li > span { display: block; font-weight: 600; margin-bottom: var(--s2); }
.activity { list-style: none; padding: 0; margin: 0; font-size: var(--fs-sm); }
.activity li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
.activity li:last-child { border: 0; }
.activity time { color: var(--text-3); white-space: nowrap; font-size: var(--fs-xs); align-self: center; font-variant-numeric: tabular-nums; }

.settings { display: flex; flex-direction: column; gap: var(--s6); max-width: 64rem; }
.setting-card { scroll-margin-top: calc(var(--topbar) + var(--s4)); }
.setting-card h3 { margin: var(--s3) 0 0; }
.setting-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.preview-card { border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); padding: var(--s5); position: sticky; top: calc(var(--topbar) + var(--s4)); min-width: 0; }
.preview-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }
.preview-card-head h3 { margin: 0; }
.preview-card .contact-address { background: var(--surface); }

.preview-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); border: 1px dashed var(--accent-600); border-radius: var(--r-md); background: var(--accent-50); padding: var(--s3) var(--s4); margin-bottom: var(--s6); }
.preview-bar p { margin: 0; }

@media (max-width: 80rem) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 68rem) {
  .editor, .setting-columns { grid-template-columns: minmax(0, 1fr); }
  .preview-card { position: static; }
}
@media (max-width: 36rem) {
  .stats { gap: var(--s3); }
  .stats a { padding: var(--s4); }
  .toolbar > .button { width: 100%; }
}

/* Pages within one section of the administration. */
.subnav { display: flex; gap: var(--s1); overflow-x: auto; margin-bottom: var(--s6); border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.subnav a { display: inline-flex; align-items: center; min-height: var(--control); padding: 0 var(--s3); border-bottom: 3px solid transparent; color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current] { color: var(--accent-700); border-bottom-color: var(--accent-600); }

.status-list { list-style: none; padding: 0; margin: 0 0 var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.status-list li + li { border-top: 1px solid var(--border); }
.status-list a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2) var(--s4); min-height: 3.25rem; padding: var(--s2) var(--s4); color: var(--text); font-weight: 600; text-decoration: none; }
.status-list a:hover { background: var(--surface-2); color: var(--text); }
.status-list .badge { white-space: normal; }

.discount-form { max-width: 44rem; margin-bottom: var(--s6); }
.main > section > h2:first-child { margin-top: var(--s6); }
.editor-side .reel { margin-inline: auto; width: min(14rem, 100%); }
